From 78c6072ef93ecf0a278f67a7f63ae1d5f297ba0d Mon Sep 17 00:00:00 2001 From: Bonnie Jonkman Date: Thu, 21 Mar 2019 10:00:56 -0600 Subject: [PATCH 1/2] InflowWind: Fix array index for invalid channels If an invalid channel name is selected, InflowWind uses a default index of 0. However, the `m%Allouts` array it was indexing into started with 1 instead of 0. --- modules-local/inflowwind/src/InflowWind_Subs.f90 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules-local/inflowwind/src/InflowWind_Subs.f90 b/modules-local/inflowwind/src/InflowWind_Subs.f90 index 3d39e46f49..c4372c37d2 100644 --- a/modules-local/inflowwind/src/InflowWind_Subs.f90 +++ b/modules-local/inflowwind/src/InflowWind_Subs.f90 @@ -1384,9 +1384,11 @@ SUBROUTINE InflowWind_SetParameters( InitInp, InputFileData, p, m, ErrStat, ErrM end if ! Allocate array for AllOuts - CALL AllocAry( m%AllOuts, MaxOutPts, 'AllOuts', TmpErrStat, TmpErrMsg ) - CALL SetErrStat(TmpErrStat,TmpErrMsg,ErrStat,ErrMsg,RoutineName) - IF ( ErrStat>= AbortErrLev ) RETURN + ALLOCATE( m%AllOuts(0:MaxOutPts), Stat=TmpErrStat ) + IF (TmpErrStat/=0) THEN + CALL SetErrStat(ErrID_Fatal,"Error allocating memory for m%AllOuts.",ErrStat,ErrMsg,RoutineName) + RETURN + END IF m%AllOuts = 0.0_ReKi From fcff548d735826c0ba582c934a052a4d2dde5db1 Mon Sep 17 00:00:00 2001 From: Bonnie Jonkman Date: Wed, 20 Mar 2019 13:39:19 -0600 Subject: [PATCH 2/2] HD: fixed typos in echo file --- modules-local/hydrodyn/src/HydroDyn_Input.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules-local/hydrodyn/src/HydroDyn_Input.f90 b/modules-local/hydrodyn/src/HydroDyn_Input.f90 index 388dca6ebd..7c39aad002 100644 --- a/modules-local/hydrodyn/src/HydroDyn_Input.f90 +++ b/modules-local/hydrodyn/src/HydroDyn_Input.f90 @@ -974,7 +974,7 @@ SUBROUTINE HydroDynInput_GetInput( InitInp, ErrStat, ErrMsg ) ! SumQTF -- Full Sum-Frequency forces computed with full QTFs from WAMIT file: {0: No Sum-frequency forces, [10, 11, or 12]: WAMIT file to use} - CALL ReadVar ( UnIn, FileName, InitInp%WAMIT2%SumQTF, 'DiffQTF', 'Full Sum-Frequency forces computed with full QTFs from WAMIT file: {0: No Sum-frequency forces, [10, 11, or 12]: WAMIT file to use}', ErrStat2, ErrMsg2, UnEchoLocal ) + CALL ReadVar ( UnIn, FileName, InitInp%WAMIT2%SumQTF, 'SumQTF', 'Full Sum-Frequency forces computed with full QTFs from WAMIT file: {0: No Sum-frequency forces, [10, 11, or 12]: WAMIT file to use}', ErrStat2, ErrMsg2, UnEchoLocal ) CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'HydroDynInput_GetInput' ) IF (ErrStat >= AbortErrLev) THEN