From 5d0a1832964762ada1ffa535801dac0c97ccd76c Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Thu, 15 Jun 2023 13:42:27 -0600 Subject: [PATCH 1/2] 0th timestep fixes --- src/riverroute/RtmHistFile.F90 | 5 +++-- src/riverroute/RtmTimeManager.F90 | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/riverroute/RtmHistFile.F90 b/src/riverroute/RtmHistFile.F90 index cfd190e..7dab2c6 100644 --- a/src/riverroute/RtmHistFile.F90 +++ b/src/riverroute/RtmHistFile.F90 @@ -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. diff --git a/src/riverroute/RtmTimeManager.F90 b/src/riverroute/RtmTimeManager.F90 index 45e24ba..997ba63 100644 --- a/src/riverroute/RtmTimeManager.F90 +++ b/src/riverroute/RtmTimeManager.F90 @@ -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 From 9d24b690fcd240cd1191d3237b97b1bd0fa0ec2b Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Thu, 14 Dec 2023 16:41:28 -0700 Subject: [PATCH 2/2] Remove instances of !KO --- src/riverroute/RtmHistFile.F90 | 4 ---- src/riverroute/RtmTimeManager.F90 | 3 --- 2 files changed, 7 deletions(-) diff --git a/src/riverroute/RtmHistFile.F90 b/src/riverroute/RtmHistFile.F90 index 7dab2c6..75c5d5b 100644 --- a/src/riverroute/RtmHistFile.F90 +++ b/src/riverroute/RtmHistFile.F90 @@ -983,10 +983,6 @@ subroutine RtmHistHtapesWrapup( rstwr, nlend ) ! and write data to history files if end of history interval. do t = 1, ntapes -!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. if (tape(t)%nhtfrq==0) then !monthly average diff --git a/src/riverroute/RtmTimeManager.F90 b/src/riverroute/RtmTimeManager.F90 index 997ba63..66d1a83 100644 --- a/src/riverroute/RtmTimeManager.F90 +++ b/src/riverroute/RtmTimeManager.F90 @@ -1000,10 +1000,7 @@ 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 -!KO is_first_step = (nstep == 0) -!KO is_first_step = (nstep == 1) -!KO end function is_first_step