Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F/sea state+ #970

Closed
wants to merge 39 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
93492be
Reorganize HD src files for SeaState Module
HaymanConsulting Sep 21, 2021
32b2e74
Initial SeaState Module Functionality
HaymanConsulting Sep 22, 2021
13969b4
Merge remote-tracking branch 'HaymanConsulting/F/HD_MSL2SWL_fix' into…
HaymanConsulting Sep 22, 2021
5fd9600
Added Registry Pointers support
HaymanConsulting Dec 1, 2021
fe4cc1d
ExctnDisp/WaveDisp functionality update for HD
HaymanConsulting Dec 1, 2021
cbde766
Added SeaState module integration in OpenFAST
HaymanConsulting Dec 1, 2021
737ee8f
Added ExctnCutOff to Input file / parsing
HaymanConsulting Dec 6, 2021
d762b70
Update SeaState Interp Comments
HaymanConsulting Dec 6, 2021
9ea1f1c
Update VS build for SeaState
HaymanConsulting Dec 6, 2021
8417499
Merge remote-tracking branch 'NREL/dev' into f/SeaState+
HaymanConsulting Dec 7, 2021
01dda52
Update for SeaState managed outputs
HaymanConsulting Dec 9, 2021
607b1af
Small Cmake updates for SeaState functionality
HaymanConsulting Dec 9, 2021
34cb10e
CMakeLists change to find filename of seastae_Interp.f90
HaymanConsulting Dec 9, 2021
a892f92
More CMakeLists Corrections for SeaState Update
HaymanConsulting Dec 9, 2021
2e85095
More CMakelists debugging
HaymanConsulting Dec 9, 2021
4d3f68d
CMaklists bug fix?
HaymanConsulting Dec 10, 2021
3c17694
More Cmakelists debug for SeaState
HaymanConsulting Dec 10, 2021
ab392b1
FIxed gfortran compile errors and Cmake error
HaymanConsulting Dec 10, 2021
046d012
SeaState: fix case issue in file names for registry files
andrew-platt Dec 14, 2021
ec0458d
SeaState: regenerate Types files with -noextrap flags
andrew-platt Dec 14, 2021
4a566f2
Merge pull request #18 from andrew-platt/f/SeaState+
HaymanConsulting Dec 14, 2021
fc92514
Fixed broken WaveElevation data in Morison
HaymanConsulting Dec 21, 2021
ec32f76
Fixed output handling for channels larger than 9 characters
HaymanConsulting Dec 21, 2021
4600072
Remove debugging print statement
HaymanConsulting Jan 5, 2022
e397699
Fix reporting of max/min wave elevations in output file
HaymanConsulting Jan 5, 2022
903ebb2
Implemented SeaState outputs via the glue-code
HaymanConsulting Jan 5, 2022
79589c7
Bug fix for Max/Min WaveElevation Ouputs
HaymanConsulting Jan 18, 2022
9d14af7
vs-build bug fixe: Added new SeaState project
HaymanConsulting Jan 19, 2022
6cc5286
Updates for Writing Kinematics Files
HaymanConsulting Jan 24, 2022
b741b04
Bug Fix: Correct number of grid points in XY directions based on NX, …
HaymanConsulting Jan 25, 2022
34c38fc
Fixed bug with repeating wave kinematics
HaymanConsulting Jan 31, 2022
e361b6f
Finished WaveMod = 6 implementation plus bug fixes
HaymanConsulting Jan 31, 2022
78c3849
seastate: change WtrDpth to ReKi so double precision will compile
andrew-platt Feb 2, 2022
4baac0b
Tweaks to Writing and Reading Wave Kinematics + code cleanup
HaymanConsulting Feb 2, 2022
8d914b1
Merge pull request #19 from andrew-platt/f/SeaState+
HaymanConsulting Feb 2, 2022
62dbc21
Fixed a small type casting issue in SeaState Interpolator
HaymanConsulting Feb 3, 2022
595544c
Proposed bug fixes for OpenFAST issues #844 and #847
HaymanConsulting Feb 3, 2022
2592679
Altered casting (again) for Time index calculation in SeaState_Interp
HaymanConsulting Feb 9, 2022
325d1a9
Fix for elements below seabed check
HaymanConsulting Feb 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Implemented SeaState outputs via the glue-code
HaymanConsulting committed Jan 5, 2022
commit 903ebb2639f05d139ccbe3bf0c88cd254217eb49
54 changes: 39 additions & 15 deletions modules/openfast-library/src/FAST_Subs.f90
Original file line number Diff line number Diff line change
@@ -914,7 +914,6 @@ SUBROUTINE FAST_InitializeAll( t_initial, p_FAST, y_FAST, m_FAST, ED, BD, SrvD,
Init%InData_HD%WaveElevC0 => Init%OutData_SeaSt%WaveElevC0
CALL MOVE_ALLOC( Init%OutData_SeaSt%WaveElevC, Init%InData_HD%WaveElevC )
Init%InData_HD%WaveDirArr => Init%OutData_SeaSt%WaveDirArr
Init%InData_HD%WaveElev => Init%OutData_SeaSt%WaveElev
Init%InData_HD%WaveElev1 => Init%OutData_SeaSt%WaveElev1
Init%InData_HD%WaveElev2 => Init%OutData_SeaSt%WaveElev2

@@ -933,7 +932,6 @@ SUBROUTINE FAST_InitializeAll( t_initial, p_FAST, y_FAST, m_FAST, ED, BD, SrvD,
nullify(Init%OutData_SeaSt%WaveTime)
nullify(Init%OutData_SeaSt%WaveElevC0)
nullify(Init%OutData_SeaSt%WaveDirArr)
nullify(Init%OutData_SeaSt%WaveElev)
nullify(Init%OutData_SeaSt%WaveElev1)
nullify(Init%OutData_SeaSt%WaveElev2)

@@ -996,7 +994,6 @@ SUBROUTINE FAST_InitializeAll( t_initial, p_FAST, y_FAST, m_FAST, ED, BD, SrvD,
nullify(Init%InData_HD%WaveAcc)
nullify(Init%InData_HD%WaveVel)
nullify(Init%InData_HD%WaveTime)
nullify(Init%InData_HD%WaveElev)
nullify(Init%InData_HD%WaveElev1)
nullify(Init%InData_HD%WaveElev2)

@@ -2064,6 +2061,7 @@ SUBROUTINE FAST_InitOutput( p_FAST, y_FAST, Init, ErrStat, ErrMsg )
IF ( ALLOCATED( Init%OutData_AD%rotors(1)%WriteOutputHdr)) y_FAST%numOuts(Module_AD) = SIZE(Init%OutData_AD%rotors(1)%WriteOutputHdr)
ENDIF
IF ( ALLOCATED( Init%OutData_SrvD%WriteOutputHdr ) ) y_FAST%numOuts(Module_SrvD) = SIZE(Init%OutData_SrvD%WriteOutputHdr)
IF ( ALLOCATED( Init%OutData_SeaSt%WriteOutputHdr ) ) y_FAST%numOuts(Module_SeaSt) = SIZE(Init%OutData_SeaSt%WriteOutputHdr)
IF ( ALLOCATED( Init%OutData_HD%WriteOutputHdr ) ) y_FAST%numOuts(Module_HD) = SIZE(Init%OutData_HD%WriteOutputHdr)
IF ( ALLOCATED( Init%OutData_SD%WriteOutputHdr ) ) y_FAST%numOuts(Module_SD) = SIZE(Init%OutData_SD%WriteOutputHdr)
IF ( ALLOCATED( Init%OutData_ExtPtfm%WriteOutputHdr) ) y_FAST%numOuts(Module_ExtPtfm)= SIZE(Init%OutData_ExtPtfm%WriteOutputHdr)
@@ -2139,6 +2137,12 @@ SUBROUTINE FAST_InitOutput( p_FAST, y_FAST, Init, ErrStat, ErrMsg )
indxNext = indxNext + 1
END DO

DO i=1,y_FAST%numOuts(Module_SeaSt) !SeaState
y_FAST%ChannelNames(indxNext) = Init%OutData_SeaSt%WriteOutputHdr(i)
y_FAST%ChannelUnits(indxNext) = Init%OutData_SeaSt%WriteOutputUnt(i)
indxNext = indxNext + 1
END DO

DO i=1,y_FAST%numOuts(Module_HD) !HydroDyn
y_FAST%ChannelNames(indxNext) = Init%OutData_HD%WriteOutputHdr(i)
y_FAST%ChannelUnits(indxNext) = Init%OutData_HD%WriteOutputUnt(i)
@@ -4062,13 +4066,13 @@ SUBROUTINE FAST_Solution0_T(Turbine, ErrStat, ErrMsg)

CALL FAST_Solution0(Turbine%p_FAST, Turbine%y_FAST, Turbine%m_FAST, &
Turbine%ED, Turbine%BD, Turbine%SrvD, Turbine%AD14, Turbine%AD, Turbine%IfW, Turbine%OpFM, Turbine%SC_DX,&
Turbine%HD, Turbine%SD, Turbine%ExtPtfm, Turbine%MAP, Turbine%FEAM, Turbine%MD, Turbine%Orca, &
Turbine%SeaSt, Turbine%HD, Turbine%SD, Turbine%ExtPtfm, Turbine%MAP, Turbine%FEAM, Turbine%MD, Turbine%Orca, &
Turbine%IceF, Turbine%IceD, Turbine%MeshMapData, ErrStat, ErrMsg )

END SUBROUTINE FAST_Solution0_T
!----------------------------------------------------------------------------------------------------------------------------------
!> Routine that calls CalcOutput for the first time of the simulation (at t=0). After the initial solve, data arrays are initialized.
SUBROUTINE FAST_Solution0(p_FAST, y_FAST, m_FAST, ED, BD, SrvD, AD14, AD, IfW, OpFM, SC_DX, HD, SD, ExtPtfm, &
SUBROUTINE FAST_Solution0(p_FAST, y_FAST, m_FAST, ED, BD, SrvD, AD14, AD, IfW, OpFM, SC_DX, SeaSt, HD, SD, ExtPtfm, &
MAPp, FEAM, MD, Orca, IceF, IceD, MeshMapData, ErrStat, ErrMsg )

TYPE(FAST_ParameterType), INTENT(IN ) :: p_FAST !< Parameters for the glue code
@@ -4083,6 +4087,7 @@ SUBROUTINE FAST_Solution0(p_FAST, y_FAST, m_FAST, ED, BD, SrvD, AD14, AD, IfW, O
TYPE(InflowWind_Data), INTENT(INOUT) :: IfW !< InflowWind data
TYPE(OpenFOAM_Data), INTENT(INOUT) :: OpFM !< OpenFOAM data
TYPE(SCDataEx_Data), INTENT(INOUT) :: SC_DX !< Supercontroller exchange data
TYPE(SeaState_Data), INTENT(INOUT) :: SeaSt !< SeaState data
TYPE(HydroDyn_Data), INTENT(INOUT) :: HD !< HydroDyn data
TYPE(SubDyn_Data), INTENT(INOUT) :: SD !< SubDyn data
TYPE(ExtPtfm_Data), INTENT(INOUT) :: ExtPtfm !< ExtPtfm_MCKF data
@@ -4128,6 +4133,11 @@ SUBROUTINE FAST_Solution0(p_FAST, y_FAST, m_FAST, ED, BD, SrvD, AD14, AD, IfW, O
IF ( p_FAST%CompServo == Module_SrvD ) CALL SrvD_SetExternalInputs( p_FAST, m_FAST, SrvD%Input(1) )
IF ( p_FAST%CompInflow == Module_IfW ) CALL IfW_SetExternalInputs( IfW%p, m_FAST, ED%y, IfW%Input(1) )

if ( P_FAST%CompSeaSt == Module_SeaSt ) then
call SeaSt_CalcOutput( t_initial, SeaSt%u, SeaSt%p, SeaSt%x(1), SeaSt%xd(1), SeaSt%z(1), SeaSt%OtherSt(1), SeaSt%y, SeaSt%m, ErrStat2, ErrMsg2 )
call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
end if

CALL CalcOutputs_And_SolveForInputs( n_t_global, t_initial, STATE_CURR, m_FAST%calcJacobian, m_FAST%NextJacCalcTime, &
p_FAST, m_FAST, y_FAST%WriteThisStep, ED, BD, SrvD, AD14, AD, IfW, OpFM, HD, SD, ExtPtfm, &
MAPp, FEAM, MD, Orca, IceF, IceD, MeshMapData, ErrStat2, ErrMsg2 )
@@ -4142,7 +4152,7 @@ SUBROUTINE FAST_Solution0(p_FAST, y_FAST, m_FAST, ED, BD, SrvD, AD14, AD, IfW, O
! Check to see if we should output data this time step:
!----------------------------------------------------------------------------------------

CALL WriteOutputToFile(n_t_global_next, t_initial, p_FAST, y_FAST, ED, BD, AD14, AD, IfW, OpFM, HD, SD, ExtPtfm, SrvD, MAPp, FEAM, MD, Orca, IceF, IceD, MeshMapData, ErrStat2, ErrMsg2)
CALL WriteOutputToFile(n_t_global_next, t_initial, p_FAST, y_FAST, ED, BD, AD14, AD, IfW, OpFM, SeaSt, HD, SD, ExtPtfm, SrvD, MAPp, FEAM, MD, Orca, IceF, IceD, MeshMapData, ErrStat2, ErrMsg2)
CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )

! turn off VTK output when
@@ -4636,13 +4646,13 @@ SUBROUTINE FAST_Solution_T(t_initial, n_t_global, Turbine, ErrStat, ErrMsg )

CALL FAST_Solution(t_initial, n_t_global, Turbine%p_FAST, Turbine%y_FAST, Turbine%m_FAST, &
Turbine%ED, Turbine%BD, Turbine%SrvD, Turbine%AD14, Turbine%AD, Turbine%IfW, Turbine%OpFM, Turbine%SC_DX, &
Turbine%HD, Turbine%SD, Turbine%ExtPtfm, Turbine%MAP, Turbine%FEAM, Turbine%MD, Turbine%Orca, &
Turbine%SeaSt, Turbine%HD, Turbine%SD, Turbine%ExtPtfm, Turbine%MAP, Turbine%FEAM, Turbine%MD, Turbine%Orca, &
Turbine%IceF, Turbine%IceD, Turbine%MeshMapData, ErrStat, ErrMsg )

END SUBROUTINE FAST_Solution_T
!----------------------------------------------------------------------------------------------------------------------------------
!> This routine takes data from n_t_global and gets values at n_t_global + 1
SUBROUTINE FAST_Solution(t_initial, n_t_global, p_FAST, y_FAST, m_FAST, ED, BD, SrvD, AD14, AD, IfW, OpFM, SC_DX, HD, SD, ExtPtfm, &
SUBROUTINE FAST_Solution(t_initial, n_t_global, p_FAST, y_FAST, m_FAST, ED, BD, SrvD, AD14, AD, IfW, OpFM, SC_DX, SeaSt, HD, SD, ExtPtfm, &
MAPp, FEAM, MD, Orca, IceF, IceD, MeshMapData, ErrStat, ErrMsg )

REAL(DbKi), INTENT(IN ) :: t_initial !< initial time
@@ -4660,6 +4670,7 @@ SUBROUTINE FAST_Solution(t_initial, n_t_global, p_FAST, y_FAST, m_FAST, ED, BD,
TYPE(InflowWind_Data), INTENT(INOUT) :: IfW !< InflowWind data
TYPE(OpenFOAM_Data), INTENT(INOUT) :: OpFM !< OpenFOAM data
TYPE(SCDataEx_Data), INTENT(INOUT) :: SC_DX !< Supercontroller Exchange data
TYPE(SeaState_Data), INTENT(INOUT) :: SeaSt !< SeaState data
TYPE(HydroDyn_Data), INTENT(INOUT) :: HD !< HydroDyn data
TYPE(SubDyn_Data), INTENT(INOUT) :: SD !< SubDyn data
TYPE(ExtPtfm_Data), INTENT(INOUT) :: ExtPtfm !< ExtPtfm_MCKF data
@@ -4884,6 +4895,10 @@ SUBROUTINE FAST_Solution(t_initial, n_t_global, p_FAST, y_FAST, m_FAST, ED, BD,
CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
END IF

if ( P_FAST%CompSeaSt == Module_SeaSt ) then
call SeaSt_CalcOutput( t_global_next, SeaSt%u, SeaSt%p, SeaSt%x(1), SeaSt%xd(1), SeaSt%z(1), SeaSt%OtherSt(1), SeaSt%y, SeaSt%m, ErrStat2, ErrMsg2 )
call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
end if

! HydroDyn: copy final predictions to actual states
IF ( p_FAST%CompHydro == Module_HD ) THEN
@@ -4996,7 +5011,7 @@ SUBROUTINE FAST_Solution(t_initial, n_t_global, p_FAST, y_FAST, m_FAST, ED, BD,
!! Check to see if we should output data this time step:
!----------------------------------------------------------------------------------------

CALL WriteOutputToFile(n_t_global_next, t_global_next, p_FAST, y_FAST, ED, BD, AD14, AD, IfW, OpFM, HD, SD, ExtPtfm, &
CALL WriteOutputToFile(n_t_global_next, t_global_next, p_FAST, y_FAST, ED, BD, AD14, AD, IfW, OpFM, SeaSt, HD, SD, ExtPtfm, &
SrvD, MAPp, FEAM, MD, Orca, IceF, IceD, MeshMapData, ErrStat2, ErrMsg2)
CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )

@@ -5033,7 +5048,7 @@ END FUNCTION NeedWriteOutput
!> This routine determines if it's time to write to the output files--based on a previous call to fast_subs::needwriteoutput--, and
!! calls the routine to write to the files with the output data. It should be called after all the output solves for a given time
!! have been completed, and assumes y_FAST\%WriteThisStep has been set.
SUBROUTINE WriteOutputToFile(n_t_global, t_global, p_FAST, y_FAST, ED, BD, AD14, AD, IfW, OpFM, HD, SD, ExtPtfm, &
SUBROUTINE WriteOutputToFile(n_t_global, t_global, p_FAST, y_FAST, ED, BD, AD14, AD, IfW, OpFM, SeaSt, HD, SD, ExtPtfm, &
SrvD, MAPp, FEAM, MD, Orca, IceF, IceD, MeshMapData, ErrStat, ErrMsg)
!...............................................................................................................................
INTEGER(IntKi), INTENT(IN ) :: n_t_global !< Current global time step
@@ -5048,6 +5063,7 @@ SUBROUTINE WriteOutputToFile(n_t_global, t_global, p_FAST, y_FAST, ED, BD, AD14,
TYPE(AeroDyn_Data), INTENT(IN ) :: AD !< AeroDyn data
TYPE(InflowWind_Data), INTENT(IN ) :: IfW !< InflowWind data
TYPE(OpenFOAM_Data), INTENT(IN ) :: OpFM !< OpenFOAM data
TYPE(SeaState_Data), INTENT(IN ) :: SeaSt !< SeaState data
TYPE(HydroDyn_Data), INTENT(IN ) :: HD !< HydroDyn data
TYPE(SubDyn_Data), INTENT(IN ) :: SD !< SubDyn data
TYPE(ExtPtfm_Data), INTENT(IN ) :: ExtPtfm !< ExtPtfm_MCKF data
@@ -5075,7 +5091,7 @@ SUBROUTINE WriteOutputToFile(n_t_global, t_global, p_FAST, y_FAST, ED, BD, AD14,

! Generate glue-code output file
CALL WrOutputLine( t_global, p_FAST, y_FAST, IfW%y%WriteOutput, OpFM%y%WriteOutput, ED%y%WriteOutput, &
AD%y, SrvD%y%WriteOutput, HD%y%WriteOutput, SD%y%WriteOutput, ExtPtfm%y%WriteOutput, MAPp%y%WriteOutput, &
AD%y, SrvD%y%WriteOutput, SeaSt%y%WriteOutput, HD%y%WriteOutput, SD%y%WriteOutput, ExtPtfm%y%WriteOutput, MAPp%y%WriteOutput, &
FEAM%y%WriteOutput, MD%y%WriteOutput, Orca%y%WriteOutput, IceF%y%WriteOutput, IceD%y, BD%y, ErrStat, ErrMsg )

ENDIF
@@ -5091,7 +5107,7 @@ SUBROUTINE WriteOutputToFile(n_t_global, t_global, p_FAST, y_FAST, ED, BD, AD14,
END SUBROUTINE WriteOutputToFile
!----------------------------------------------------------------------------------------------------------------------------------
!> This routine writes the module output to the primary output file(s).
SUBROUTINE WrOutputLine( t, p_FAST, y_FAST, IfWOutput, OpFMOutput, EDOutput, y_AD, SrvDOutput, HDOutput, SDOutput, ExtPtfmOutput,&
SUBROUTINE WrOutputLine( t, p_FAST, y_FAST, IfWOutput, OpFMOutput, EDOutput, y_AD, SrvDOutput, SeaStOutput, HDOutput, SDOutput, ExtPtfmOutput,&
MAPOutput, FEAMOutput, MDOutput, OrcaOutput, IceFOutput, y_IceD, y_BD, ErrStat, ErrMsg)

IMPLICIT NONE
@@ -5107,6 +5123,7 @@ SUBROUTINE WrOutputLine( t, p_FAST, y_FAST, IfWOutput, OpFMOutput, EDOutput, y_A
REAL(ReKi), ALLOCATABLE, INTENT(IN) :: EDOutput (:) !< ElastoDyn WriteOutput values
TYPE(AD_OutputType), INTENT(IN) :: y_AD !< AeroDyn outputs (WriteOutput values are subset of allocated Rotors)
REAL(ReKi), ALLOCATABLE, INTENT(IN) :: SrvDOutput (:) !< ServoDyn WriteOutput values
REAL(ReKi), ALLOCATABLE, INTENT(IN) :: SeaStOutput (:) !< SeaState WriteOutput values
REAL(ReKi), ALLOCATABLE, INTENT(IN) :: HDOutput (:) !< HydroDyn WriteOutput values
REAL(ReKi), ALLOCATABLE, INTENT(IN) :: SDOutput (:) !< SubDyn WriteOutput values
REAL(ReKi), ALLOCATABLE, INTENT(IN) :: ExtPtfmOutput (:) !< ExtPtfm_MCKF WriteOutput values
@@ -5131,7 +5148,7 @@ SUBROUTINE WrOutputLine( t, p_FAST, y_FAST, IfWOutput, OpFMOutput, EDOutput, y_A
ErrStat = ErrID_None
ErrMsg = ''

CALL FillOutputAry(p_FAST, y_FAST, IfWOutput, OpFMOutput, EDOutput, y_AD, SrvDOutput, HDOutput, SDOutput, ExtPtfmOutput, &
CALL FillOutputAry(p_FAST, y_FAST, IfWOutput, OpFMOutput, EDOutput, y_AD, SrvDOutput, SeaStOutput, HDOutput, SDOutput, ExtPtfmOutput, &
MAPOutput, FEAMOutput, MDOutput, OrcaOutput, IceFOutput, y_IceD, y_BD, OutputAry)

IF (p_FAST%WrTxtOutFile) THEN
@@ -5192,15 +5209,15 @@ SUBROUTINE FillOutputAry_T(Turbine, Outputs)

CALL FillOutputAry(Turbine%p_FAST, Turbine%y_FAST, Turbine%IfW%y%WriteOutput, Turbine%OpFM%y%WriteOutput, &
Turbine%ED%y%WriteOutput, Turbine%AD%y, Turbine%SrvD%y%WriteOutput, &
Turbine%HD%y%WriteOutput, Turbine%SD%y%WriteOutput, Turbine%ExtPtfm%y%WriteOutput, Turbine%MAP%y%WriteOutput, &
Turbine%SeaSt%y%WriteOutput, Turbine%HD%y%WriteOutput, Turbine%SD%y%WriteOutput, Turbine%ExtPtfm%y%WriteOutput, Turbine%MAP%y%WriteOutput, &
Turbine%FEAM%y%WriteOutput, Turbine%MD%y%WriteOutput, Turbine%Orca%y%WriteOutput, &
Turbine%IceF%y%WriteOutput, Turbine%IceD%y, Turbine%BD%y, Outputs)

END SUBROUTINE FillOutputAry_T
!----------------------------------------------------------------------------------------------------------------------------------
!> This routine concatenates all of the WriteOutput values from the module Output into one array to be written to the FAST
!! output file.
SUBROUTINE FillOutputAry(p_FAST, y_FAST, IfWOutput, OpFMOutput, EDOutput, y_AD, SrvDOutput, HDOutput, SDOutput, ExtPtfmOutput, &
SUBROUTINE FillOutputAry(p_FAST, y_FAST, IfWOutput, OpFMOutput, EDOutput, y_AD, SrvDOutput, SeaStOutput, HDOutput, SDOutput, ExtPtfmOutput, &
MAPOutput, FEAMOutput, MDOutput, OrcaOutput, IceFOutput, y_IceD, y_BD, OutputAry)

TYPE(FAST_ParameterType), INTENT(IN) :: p_FAST !< Glue-code simulation parameters
@@ -5211,6 +5228,7 @@ SUBROUTINE FillOutputAry(p_FAST, y_FAST, IfWOutput, OpFMOutput, EDOutput, y_AD,
REAL(ReKi), ALLOCATABLE, INTENT(IN) :: EDOutput (:) !< ElastoDyn WriteOutput values
TYPE(AD_OutputType), INTENT(IN) :: y_AD !< AeroDyn outputs (WriteOutput values are subset of allocated Rotors)
REAL(ReKi), ALLOCATABLE, INTENT(IN) :: SrvDOutput (:) !< ServoDyn WriteOutput values
REAL(ReKi), ALLOCATABLE, INTENT(IN) :: SeaStOutput (:) !< SeaState WriteOutput values
REAL(ReKi), ALLOCATABLE, INTENT(IN) :: HDOutput (:) !< HydroDyn WriteOutput values
REAL(ReKi), ALLOCATABLE, INTENT(IN) :: SDOutput (:) !< SubDyn WriteOutput values
REAL(ReKi), ALLOCATABLE, INTENT(IN) :: ExtPtfmOutput (:) !< ExtPtfm_MCKF WriteOutput values
@@ -5280,6 +5298,12 @@ SUBROUTINE FillOutputAry(p_FAST, y_FAST, IfWOutput, OpFMOutput, EDOutput, y_AD,
indxNext = IndxLast + 1
END IF

IF ( y_FAST%numOuts(Module_SeaSt) > 0 ) THEN
indxLast = indxNext + SIZE(SeaStOutput) - 1
OutputAry(indxNext:indxLast) = SeaStOutput
indxNext = IndxLast + 1
END IF

IF ( y_FAST%numOuts(Module_HD) > 0 ) THEN
indxLast = indxNext + SIZE(HDOutput) - 1
OutputAry(indxNext:indxLast) = HDOutput