diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90 index 01c0aaffd9..58fa969e60 100644 --- a/src/main/histFileMod.F90 +++ b/src/main/histFileMod.F90 @@ -3409,7 +3409,7 @@ subroutine htape_timeconst(t, f, mode) dim1id(1) = time_dimid str = 'days since ' // basedate // " " // basesec - if (tape(t)%hlist(1)%avgflag /= 'I') then ! NOT instantaneous fields tape + if (hist_avgflag_pertape(t) /= 'I') then ! NOT instantaneous fields tape step_or_bounds = 'time_bounds' long_name = 'time at exact middle of ' // step_or_bounds call ncd_defvar(nfid(t,f), 'time', tape(t)%ncprec, 1, dim1id, varid, & @@ -3472,7 +3472,7 @@ subroutine htape_timeconst(t, f, mode) long_name = 'time step') dim2id(1) = hist_interval_dimid; dim2id(2) = time_dimid - if (tape(t)%hlist(1)%avgflag /= 'I') then ! NOT instantaneous fields tape + if (hist_avgflag_pertape(t) /= 'I') then ! NOT instantaneous fields tape call ncd_defvar(nfid(t,f), 'time_bounds', ncd_double, 2, dim2id, varid, & long_name = 'history time interval endpoints') end if @@ -3505,7 +3505,7 @@ subroutine htape_timeconst(t, f, mode) timedata(1) = tape(t)%begtime ! beginning time timedata(2) = mdcur + mscur/secspday ! end time - if (tape(t)%hlist(1)%avgflag /= 'I') then ! NOT instantaneous fields tape + if (hist_avgflag_pertape(t) /= 'I') then ! NOT instantaneous fields tape time = (timedata(1) + timedata(2)) * 0.5_r8 call ncd_io('time_bounds', timedata, 'write', nfid(t,f), nt=tape(t)%ntimes(f)) else