Skip to content

Commit

Permalink
Added warning if time of day closer than dtime to midnight
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronny Meier committed May 26, 2021
1 parent 4ec41d4 commit 4466ee8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/histFileMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4466ee8

Please sign in to comment.