Skip to content

Commit

Permalink
0th timestep fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
olyson committed Jun 15, 2023
1 parent abd2bc4 commit 5d0a183
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/riverroute/RtmHistFile.F90
Original file line number Diff line number Diff line change
Expand Up @@ -983,8 +983,9 @@ subroutine RtmHistHtapesWrapup( rstwr, nlend )
! and write data to history files if end of history interval.
do t = 1, ntapes

! Skip nstep=0 if monthly average
if (nstep==0 .and. tape(t)%nhtfrq==0) cycle
!KO ! Should no longer be needed
!KO ! Skip nstep=0 if monthly average
!KO if (nstep==0 .and. tape(t)%nhtfrq==0) cycle

! Determine if end of history interval
tape(t)%is_endhist = .false.
Expand Down
5 changes: 4 additions & 1 deletion src/riverroute/RtmTimeManager.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,10 @@ logical function is_first_step()
call ESMF_ClockGet( tm_clock, advanceCount=step_no, rc=rc )
call chkrc(rc, sub//': error return from ESMF_ClockGet')
nstep = step_no
is_first_step = (nstep == 0)
!KO is_first_step = (nstep == 0)
!KO
is_first_step = (nstep == 1)
!KO

end function is_first_step

Expand Down

0 comments on commit 5d0a183

Please sign in to comment.