Skip to content

Commit 7a1a4bc

Browse files
committed
Correction to if-statement from ESCOMP#39
Adding here separately to facilitate testing.
1 parent ba707fb commit 7a1a4bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/riverroute/RtmHistFile.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ subroutine htape_timeconst(t, mode)
868868

869869
dim1id(1) = time_dimid
870870
str = 'days since ' // basedate // " " // basesec
871-
if (tape(t)%hlist(1)%avgflag /= 'I') then ! NOT instantaneous fields tape
871+
if (rtmhist_avgflag_pertape(t) /= 'I') then ! NOT instantaneous fields tape
872872
step_or_bounds = 'time_bounds'
873873
long_name = 'time at exact middle of ' // step_or_bounds
874874
call ncd_defvar(nfid(t), 'time', tape(t)%ncprec, 1, dim1id, varid, &
@@ -909,7 +909,7 @@ subroutine htape_timeconst(t, mode)
909909
long_name = 'time step')
910910

911911
dim2id(1) = nbnd_dimid; dim2id(2) = time_dimid
912-
if (tape(t)%hlist(1)%avgflag /= 'I') then ! NOT instantaneous fields tape
912+
if (rtmhist_avgflag_pertape(t) /= 'I') then ! NOT instantaneous fields tape
913913
call ncd_defvar(nfid(t), 'time_bounds', ncd_double, 2, dim2id, varid, &
914914
long_name = 'time interval endpoints', &
915915
units=str)
@@ -945,7 +945,7 @@ subroutine htape_timeconst(t, mode)
945945

946946
timedata(1) = tape(t)%begtime ! beginning time
947947
timedata(2) = mdcur + mscur / secspday ! end time
948-
if (tape(t)%hlist(1)%avgflag /= 'I') then ! NOT instantaneous fields tape
948+
if (rtmhist_avgflag_pertape(t) /= 'I') then ! NOT instantaneous fields tape
949949
time = (timedata(1) + timedata(2)) * 0.5_r8
950950
call ncd_io('time_bounds', timedata, 'write', nfid(t), nt=tape(t)%ntimes)
951951
else

0 commit comments

Comments
 (0)