Skip to content

Commit 08753cd

Browse files
committed
Correction to if-statemt as in ESCOMP#2838, added here to facilitate testing
1 parent 1c3ae10 commit 08753cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/histFileMod.F90

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

33733373
dim1id(1) = time_dimid
33743374
str = 'days since ' // basedate // " " // basesec
3375-
if (tape(t)%hlist(1)%avgflag /= 'I') then ! NOT instantaneous fields tape
3375+
if (hist_avgflag_pertape(t) /= 'I') then ! NOT instantaneous fields tape
33763376
step_or_bounds = 'time_bounds'
33773377
long_name = 'time at exact middle of ' // step_or_bounds
33783378
call ncd_defvar(nfid(t), 'time', tape(t)%ncprec, 1, dim1id, varid, &
@@ -3439,7 +3439,7 @@ subroutine htape_timeconst(t, mode)
34393439
long_name = 'time step')
34403440

34413441
dim2id(1) = nbnd_dimid; dim2id(2) = time_dimid
3442-
if (tape(t)%hlist(1)%avgflag /= 'I') then ! NOT instantaneous fields tape
3442+
if (hist_avgflag_pertape(t) /= 'I') then ! NOT instantaneous fields tape
34433443
call ncd_defvar(nfid(t), 'time_bounds', ncd_double, 2, dim2id, varid, &
34443444
long_name = 'time interval endpoints', &
34453445
units = str)
@@ -3474,7 +3474,7 @@ subroutine htape_timeconst(t, mode)
34743474

34753475
timedata(1) = tape(t)%begtime ! beginning time
34763476
timedata(2) = mdcur + mscur/secspday ! end time
3477-
if (tape(t)%hlist(1)%avgflag /= 'I') then ! NOT instantaneous fields tape
3477+
if (hist_avgflag_pertape(t) /= 'I') then ! NOT instantaneous fields tape
34783478
time = (timedata(1) + timedata(2)) * 0.5_r8
34793479
call ncd_io('time_bounds', timedata, 'write', nfid(t), nt=tape(t)%ntimes)
34803480
else

0 commit comments

Comments
 (0)