Skip to content

Commit

Permalink
FAST_Subs: make call to WriteOutputToFile consistent
Browse files Browse the repository at this point in the history
Replace argument `m_FAST%t_global` with calculated `t_global` in `FAST_SUBS::FAST_WriteOutput`
  • Loading branch information
andrew-platt committed Dec 18, 2023
1 parent 04202d9 commit 76cef7f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/openfast-library/src/FAST_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -8037,10 +8037,10 @@ SUBROUTINE FAST_WriteOutput_T(t_initial, n_t_global, Turbine, ErrStat, ErrMsg )
END SUBROUTINE FAST_WriteOutput_T
!----------------------------------------------------------------------------------------------------------------------------------
!> This routine writes the outputs at this timestep
SUBROUTINE FAST_WriteOutput(t_global, n_t_global, p_FAST, y_FAST, m_FAST, ED, BD, SrvD, AD14, AD, ExtLd, IfW, ExtInfw, SC_DX, &
SUBROUTINE FAST_WriteOutput(t_initial, n_t_global, p_FAST, y_FAST, m_FAST, ED, BD, SrvD, AD14, AD, ExtLd, IfW, ExtInfw, SC_DX, &
SeaSt, HD, SD, ExtPtfm, MAPp, FEAM, MD, Orca, IceF, IceD, MeshMapData, ErrStat, ErrMsg )

REAL(DbKi), INTENT(IN ) :: t_global !< initial time
REAL(DbKi), INTENT(IN ) :: t_initial !< initial time
INTEGER(IntKi), INTENT(IN ) :: n_t_global !< loop counter

TYPE(FAST_ParameterType), INTENT(IN ) :: p_FAST !< Parameters for the glue code
Expand Down Expand Up @@ -8074,7 +8074,7 @@ SUBROUTINE FAST_WriteOutput(t_global, n_t_global, p_FAST, y_FAST, m_FAST, ED, BD

! local variables
INTEGER(IntKi) :: I, k ! generic loop counters

REAL(DbKi) :: t_global ! this simulation time (m_FAST%t_global + p_FAST%dt)
INTEGER(IntKi) :: ErrStat2
CHARACTER(ErrMsgLen) :: ErrMsg2
CHARACTER(*), PARAMETER :: RoutineName = 'FAST_WriteOutput'
Expand All @@ -8083,11 +8083,12 @@ SUBROUTINE FAST_WriteOutput(t_global, n_t_global, p_FAST, y_FAST, m_FAST, ED, BD
ErrStat = ErrID_None
ErrMsg = ""

t_global = t_initial + n_t_global*p_FAST%DT

!----------------------------------------------------------------------------------------
!! Check to see if we should output data this time step:
!----------------------------------------------------------------------------------------
CALL WriteOutputToFile(n_t_global, m_FAST%t_global, p_FAST, y_FAST, ED, BD, AD14, AD, IfW, ExtInfw, SeaSt, HD, SD, ExtPtfm, &
CALL WriteOutputToFile(n_t_global, t_global, p_FAST, y_FAST, ED, BD, AD14, AD, IfW, ExtInfw, SeaSt, HD, SD, ExtPtfm, &
SrvD, MAPp, FEAM, MD, Orca, IceF, IceD, MeshMapData, ErrStat2, ErrMsg2)
CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )

Expand Down

0 comments on commit 76cef7f

Please sign in to comment.