Skip to content

Commit

Permalink
change time_op value to "point" for instantaneous fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Courtney Peverley committed Nov 8, 2023
1 parent 7a0e528 commit f955d7f
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/control/cam_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -805,16 +805,9 @@ subroutine history_readnl(nlfile)
end if
else
! Append file type - instantaneous or accumulated - to filename
! specifier provided
filename_len = len(trim(hfilename_spec(t)))
if (hfilename_spec(t)(filename_len-2:) == '.nc') then
! File template ends in '.nc', place file type flag appropriately
hfilename_spec(t) = hfilename_spec(t)(1:filename_len-3) // '%f.nc'
else
! File template does not end in '.nc', place file type flag at end
! and append '.nc'
hfilename_spec(t) = trim(hfilename_spec(t)) // '%f.nc'
end if
! specifier provided (in front of the .nc extension).
filename_len = len_trim(hfilename_spec(t))
hfilename_spec(t) = hfilename_spec(t)(:filename_len-3) // '%f.nc'
end if
!
! Only one time sample allowed per monthly average file
Expand Down Expand Up @@ -2525,7 +2518,7 @@ subroutine AvgflagToString(avgflag, time_op)
case ('N')
time_op(:) = 'mean_over_nsteps'
case ('I')
time_op(:) = ' '
time_op(:) = 'point'
case ('X')
time_op(:) = 'maximum'
case ('M')
Expand Down

0 comments on commit f955d7f

Please sign in to comment.