diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90 index 2be5c56a08..867020321b 100644 --- a/src/main/histFileMod.F90 +++ b/src/main/histFileMod.F90 @@ -2021,7 +2021,6 @@ subroutine hist_update_hbuf_field_2d (t, f, bounds, num2d) local_secpl = mod(local_secpl,isecspday) if (valid) then weight = calc_weight_local_time(local_secpl, tod) - if (weight > 0 .and. field(k-beg1d+1,j) /= spval) then if (nacs(k,j) == 0) hbuf(k,j) = 0._r8 hbuf(k,j) = hbuf(k,j) + field(k-beg1d+1,j)*real(weight) @@ -5752,6 +5751,10 @@ function avgflag_valid(avgflag, blank_valid) result(valid) read(avgflag(2:6), *) tod if (tod >= 0 .and. tod <= isecspday) then valid = .true. + if(tod < dtime .or. isecspday - tod <= dtime) then + write(iulog,*) 'Warning: Local time history output ', avgflag, ' is closer than ', & + 'dtime to midnight! This problematic particularly for daily output.' + end if else valid = .false. end if