Skip to content

Commit d9fdab0

Browse files
committed
Change "if instantaneous" statemt with more appropriate conditional
Matches commit eeedbc6 in ESCOMP#2838
1 parent ebf652e commit d9fdab0

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
@@ -3409,7 +3409,7 @@ subroutine htape_timeconst(t, f, mode)
34093409

34103410
dim1id(1) = time_dimid
34113411
str = 'days since ' // basedate // " " // basesec
3412-
if (tape(t)%hlist(1)%avgflag /= 'I') then ! NOT instantaneous fields tape
3412+
if (hist_avgflag_pertape(t) /= 'I') then ! NOT instantaneous fields tape
34133413
step_or_bounds = 'time_bounds'
34143414
long_name = 'time at exact middle of ' // step_or_bounds
34153415
call ncd_defvar(nfid(t,f), 'time', tape(t)%ncprec, 1, dim1id, varid, &
@@ -3472,7 +3472,7 @@ subroutine htape_timeconst(t, f, mode)
34723472
long_name = 'time step')
34733473

34743474
dim2id(1) = hist_interval_dimid; dim2id(2) = time_dimid
3475-
if (tape(t)%hlist(1)%avgflag /= 'I') then ! NOT instantaneous fields tape
3475+
if (hist_avgflag_pertape(t) /= 'I') then ! NOT instantaneous fields tape
34763476
call ncd_defvar(nfid(t,f), 'time_bounds', ncd_double, 2, dim2id, varid, &
34773477
long_name = 'history time interval endpoints')
34783478
end if
@@ -3505,7 +3505,7 @@ subroutine htape_timeconst(t, f, mode)
35053505

35063506
timedata(1) = tape(t)%begtime ! beginning time
35073507
timedata(2) = mdcur + mscur/secspday ! end time
3508-
if (tape(t)%hlist(1)%avgflag /= 'I') then ! NOT instantaneous fields tape
3508+
if (hist_avgflag_pertape(t) /= 'I') then ! NOT instantaneous fields tape
35093509
time = (timedata(1) + timedata(2)) * 0.5_r8
35103510
call ncd_io('time_bounds', timedata, 'write', nfid(t,f), nt=tape(t)%ntimes(f))
35113511
else

0 commit comments

Comments
 (0)