Skip to content

Commit

Permalink
Merge pull request #642 from andrew-platt/b/IfW_Echo
Browse files Browse the repository at this point in the history
[BugFix] Reenable InflowWind echo file lost in #596
  • Loading branch information
andrew-platt authored Jan 22, 2021
2 parents ea03fc5 + 5eb3fc0 commit eb5206d
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 106 deletions.
2 changes: 1 addition & 1 deletion modules/inflowwind/src/InflowWind.f90
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ SUBROUTINE InflowWind_Init( InitInp, InputGuess, p, ContStates, DiscStates,

ENDIF

CALL InflowWind_ParseInputFileInfo( InputFileData, InFileInfo, PriPath, TmpErrStat, TmpErrMsg )
CALL InflowWind_ParseInputFileInfo( InputFileData, InFileInfo, PriPath, InitInp%InputFileName, EchoFileName, TmpErrStat, TmpErrMsg )
CALL SetErrStat(TmpErrStat,TmpErrMsg,ErrStat,ErrMsg,RoutineName)
IF ( ErrStat >= AbortErrLev ) THEN
CALL Cleanup()
Expand Down
217 changes: 122 additions & 95 deletions modules/inflowwind/src/InflowWind_Subs.f90

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions modules/inflowwind/tests/ifw_test_tools.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function getInputFileData()
'------- InflowWind v3.01.* INPUT FILE ------------------------------------------------------------------------- ', &
'Steady 8 m/s winds with no shear for FAST CertTests #20 and #25 ', &
'--------------------------------------------------------------------------------------------------------------- ', &
' true Echo - Echo input data to <RootName>.ech (flag) ', &
' false Echo - Echo input data to <RootName>.ech (flag) ', &
' 1 WindType - switch for wind file type (1=steady; 2=uniform; 3=binary TurbSim FF; 4=binary Bladed-style FF; 5=HAWC format; 6=User defined; 7=native Bladed FF) ', &
' 0 PropagationDir - Direction of wind propagation (meteoroligical rotation from aligned with X (positive rotates towards -Y) -- degrees) ', &
' 0 VFlowAng - Upflow angle (degrees) (not used for native Bladed format WindType=7) ', &
Expand Down Expand Up @@ -84,7 +84,7 @@ function getInputFileDataWindType2()
'------- InflowWind v3.01.* INPUT FILE ------------------------------------------------------------------------- ', &
'Steady 8 m/s winds with no shear for FAST CertTests #20 and #25 ', &
'--------------------------------------------------------------------------------------------------------------- ', &
' true Echo - Echo input data to <RootName>.ech (flag) ', &
' true Echo - Echo input data to <RootName>.ech (flag) ', &
' 2 WindType - switch for wind file type (1=steady; 2=uniform; 3=binary TurbSim FF; 4=binary Bladed-style FF; 5=HAWC format; 6=User defined; 7=native Bladed FF) ', &
' 0 PropagationDir - Direction of wind propagation (meteoroligical rotation from aligned with X (positive rotates towards -Y) -- degrees) ', &
' 0 VFlowAng - Upflow angle (degrees) (not used for native Bladed format WindType=7) ', &
Expand Down
2 changes: 1 addition & 1 deletion modules/inflowwind/tests/test_bladed_wind.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ subroutine test_bladed_wind_input()
PriPath = ""

InFileInfo = getInputFileData()
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, TmpErrStat, TmpErrMsg)
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, "inputFile.inp", "test.ech", TmpErrStat, TmpErrMsg)

@assertEqual(0, TmpErrStat, message='Error message: '//trim(TmpErrMsg)//NewLine//'ErrStat: ')
@assertEqual(trim(expected), InputFileData%BladedFF_FileName)
Expand Down
2 changes: 1 addition & 1 deletion modules/inflowwind/tests/test_hawc_wind.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ subroutine test_hawc_wind_input()
expected_fnw = "wasp\Output\basic_5w.bin"

InFileInfo = getInputFileData()
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, TmpErrStat, TmpErrMsg)
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, "inputFile.inp", "test.ech", TmpErrStat, TmpErrMsg)

@assertEqual(0, TmpErrStat, message='Error message: '//trim(TmpErrMsg)//NewLine//'ErrStat: ')

Expand Down
4 changes: 2 additions & 2 deletions modules/inflowwind/tests/test_outputs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ subroutine test_outputs_parsing()
PriPath = ""

InFileInfo = getInputFileData()
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, TmpErrStat, TmpErrMsg)
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, "inputFile.inp", "test.ech", TmpErrStat, TmpErrMsg)

@assertEqual(0, TmpErrStat, message='Error message: '//trim(TmpErrMsg)//NewLine//'ErrStat: ')
@assertEqual(.FALSE., InputFileData%SumPrint)
Expand Down Expand Up @@ -50,7 +50,7 @@ subroutine test_outputs_parsing_alternate()
'"Wind1VelX,Wind1VelY" - Wind velocity at point WindVxiList(1),WindVyiList(1),WindVziList(1). X, Y, and Z direction components. ' &
/)

CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, TmpErrStat, TmpErrMsg)
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, "inputFile.inp", "test.ech", TmpErrStat, TmpErrMsg)

@assertEqual(0, TmpErrStat, message='Error message: '//trim(TmpErrMsg)//NewLine//'ErrStat: ')
@assertEqual(.TRUE., InputFileData%SumPrint)
Expand Down
4 changes: 2 additions & 2 deletions modules/inflowwind/tests/test_steady_wind.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ subroutine test_steady_wind_input_single_height()
PriPath = ""

InFileInfo = getInputFileData()
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, TmpErrStat, TmpErrMsg)
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, "inputFile.inp", "test.ech", TmpErrStat, TmpErrMsg)

@assertEqual(0, TmpErrStat, message='Error message: '//trim(TmpErrMsg)//NewLine//'ErrStat: ')
@assertEqual(1, InputFileData%WindType)
Expand Down Expand Up @@ -50,7 +50,7 @@ subroutine test_steady_wind_input_mult_heights()
' 80,100 WindVziList - List of coordinates in the inertial Z direction (m) ' &
/)

CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, TmpErrStat, TmpErrMsg)
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, "inputFile.inp", "test.ech", TmpErrStat, TmpErrMsg)

@assertEqual(0, TmpErrStat, message='Error message: '//trim(TmpErrMsg)//NewLine//'ErrStat: ')
@assertEqual(1, InputFileData%WindType)
Expand Down
2 changes: 1 addition & 1 deletion modules/inflowwind/tests/test_turbsim_wind.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ subroutine test_steady_wind_input_single_height()
PriPath = ""

InFileInfo = getInputFileData()
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, TmpErrStat, TmpErrMsg)
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, "inputFile.inp", "test.ech", TmpErrStat, TmpErrMsg)

@assertEqual(0, TmpErrStat, message='Error message: '//trim(TmpErrMsg)//NewLine//'ErrStat: ')
@assertEqual(trim(expected), InputFileData%TSFF_FileName)
Expand Down
2 changes: 1 addition & 1 deletion modules/inflowwind/tests/test_uniform_wind.F90
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ subroutine test_uniform_wind_input()
PriPath = ""

InFileInfo = getInputFileData()
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, TmpErrStat, TmpErrMsg)
CALL InflowWind_ParseInputFileInfo(InputFileData , InFileInfo, PriPath, "inputFile.inp", "test.ech", TmpErrStat, TmpErrMsg)

@assertEqual(0, TmpErrStat, message='Error message: '//trim(TmpErrMsg)//NewLine//'ErrStat: ')
@assertEqual(trim(expected), InputFileData%Uniform_FileName)
Expand Down

0 comments on commit eb5206d

Please sign in to comment.