Skip to content

Commit

Permalink
IfW: change logic flag for LidarEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-platt committed Dec 19, 2024
1 parent 8193c7a commit a8fe70e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modules/inflowwind/src/InflowWind.f90
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ SUBROUTINE InflowWind_Init( InitInp, InputGuess, p, ContStates, DiscStates, Cons
p%lidar%ConsiderHubMotion = InputFileData%ConsiderHubMotion

! Disable Lidar if not allowed (FAST.Farm doesn't allow this)
if (InitInp%LidarDisable) then
if (.not. InitInp%LidarEnabled) then
if (p%lidar%SensorType /= SensorType_None) then
call WrScr(' WARNING: LiDAR cannot be used with this instance of InflowWind (not usable with FAST.Farm).')
call WrScr(' --> Disabling LiDAR.')
Expand Down
2 changes: 1 addition & 1 deletion modules/inflowwind/src/InflowWind.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ typedef ^ ^ ReKi WtrDpth
typedef ^ ^ ReKi MSL2SWL - - - "Mean sea level to still water level" m
typedef ^ ^ IntKi BoxExceedAllowIdx - -1 - "Extrapolate winds outside box starting at this index (for OLAF wakes and LidarSim)" -
typedef ^ ^ LOGICAL BoxExceedAllowF - .FALSE. - "Flag to allow Extrapolation winds outside box starting at this index (for OLAF wakes and LidarSim)" -
typedef ^ ^ LOGICAL LidarDisable - .true. - "Disable LiDAR for this instance of InflowWind? (FAST.Farm not compatible)" -
typedef ^ ^ LOGICAL LidarEnabled - .false. - "Enable LiDAR for this instance of InflowWind? (FAST.Farm, ADI, and InflowWind driver/library are not compatible)" -


# Init Output
Expand Down
10 changes: 5 additions & 5 deletions modules/inflowwind/src/InflowWind_Types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ MODULE InflowWind_Types
REAL(ReKi) :: MSL2SWL !< Mean sea level to still water level [m]
INTEGER(IntKi) :: BoxExceedAllowIdx = -1 !< Extrapolate winds outside box starting at this index (for OLAF wakes and LidarSim) [-]
LOGICAL :: BoxExceedAllowF = .FALSE. !< Flag to allow Extrapolation winds outside box starting at this index (for OLAF wakes and LidarSim) [-]
LOGICAL :: LidarDisable = .true. !< Disable LiDAR for this instance of InflowWind? (FAST.Farm not compatible) [-]
LOGICAL :: LidarEnabled = .false. !< Enable LiDAR for this instance of InflowWind? (FAST.Farm, ADI, and InflowWind driver/library are not compatible) [-]
END TYPE InflowWind_InitInputType
! =======================
! ========= InflowWind_InitOutputType =======
Expand Down Expand Up @@ -1111,7 +1111,7 @@ SUBROUTINE InflowWind_CopyInitInput( SrcInitInputData, DstInitInputData, CtrlCod
DstInitInputData%MSL2SWL = SrcInitInputData%MSL2SWL
DstInitInputData%BoxExceedAllowIdx = SrcInitInputData%BoxExceedAllowIdx
DstInitInputData%BoxExceedAllowF = SrcInitInputData%BoxExceedAllowF
DstInitInputData%LidarDisable = SrcInitInputData%LidarDisable
DstInitInputData%LidarEnabled = SrcInitInputData%LidarEnabled
END SUBROUTINE InflowWind_CopyInitInput

SUBROUTINE InflowWind_DestroyInitInput( InitInputData, ErrStat, ErrMsg, DEALLOCATEpointers )
Expand Down Expand Up @@ -1265,7 +1265,7 @@ SUBROUTINE InflowWind_PackInitInput( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat
Re_BufSz = Re_BufSz + 1 ! MSL2SWL
Int_BufSz = Int_BufSz + 1 ! BoxExceedAllowIdx
Int_BufSz = Int_BufSz + 1 ! BoxExceedAllowF
Int_BufSz = Int_BufSz + 1 ! LidarDisable
Int_BufSz = Int_BufSz + 1 ! LidarEnabled
IF ( Re_BufSz .GT. 0 ) THEN
ALLOCATE( ReKiBuf( Re_BufSz ), STAT=ErrStat2 )
IF (ErrStat2 /= 0) THEN
Expand Down Expand Up @@ -1441,7 +1441,7 @@ SUBROUTINE InflowWind_PackInitInput( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat
Int_Xferred = Int_Xferred + 1
IntKiBuf(Int_Xferred) = TRANSFER(InData%BoxExceedAllowF, IntKiBuf(1))
Int_Xferred = Int_Xferred + 1
IntKiBuf(Int_Xferred) = TRANSFER(InData%LidarDisable, IntKiBuf(1))
IntKiBuf(Int_Xferred) = TRANSFER(InData%LidarEnabled, IntKiBuf(1))
Int_Xferred = Int_Xferred + 1
END SUBROUTINE InflowWind_PackInitInput

Expand Down Expand Up @@ -1667,7 +1667,7 @@ SUBROUTINE InflowWind_UnPackInitInput( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrS
Int_Xferred = Int_Xferred + 1
OutData%BoxExceedAllowF = TRANSFER(IntKiBuf(Int_Xferred), OutData%BoxExceedAllowF)
Int_Xferred = Int_Xferred + 1
OutData%LidarDisable = TRANSFER(IntKiBuf(Int_Xferred), OutData%LidarDisable)
OutData%LidarEnabled = TRANSFER(IntKiBuf(Int_Xferred), OutData%LidarEnabled)
Int_Xferred = Int_Xferred + 1
END SUBROUTINE InflowWind_UnPackInitInput

Expand Down
2 changes: 1 addition & 1 deletion modules/openfast-library/src/FAST_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ SUBROUTINE FAST_InitializeAll( t_initial, p_FAST, y_FAST, m_FAST, ED, BD, SrvD,
END IF

! lidar
Init%InData_IfW%LidarDisable = .false. ! allowed with OF, but not FF
Init%InData_IfW%LidarEnabled = .true. ! allowed with OF, but not FF
Init%InData_IfW%lidar%Tmax = p_FAST%TMax
Init%InData_IfW%lidar%HubPosition = ED%y%HubPtMotion%Position(:,1)

Expand Down

0 comments on commit a8fe70e

Please sign in to comment.