diff --git a/src/riverroute/RtmHistFile.F90 b/src/riverroute/RtmHistFile.F90 index cfd190e..0b982af 100644 --- a/src/riverroute/RtmHistFile.F90 +++ b/src/riverroute/RtmHistFile.F90 @@ -176,7 +176,7 @@ module RtmHistFile type(file_desc_t), target :: nfid(max_tapes) ! file ids type(file_desc_t), target :: ncid_hist(max_tapes) ! file ids for history restart files integer :: time_dimid ! time dimension id - integer :: hist_interval_dimid ! time bounds dimension id + integer :: nbnd_dimid ! time bounds dimension id integer :: strlen_dimid ! string dimension id !----------------------------------------------------------------------- @@ -748,7 +748,7 @@ subroutine htape_create (t, histrest) call ncd_defdim(lnfid, 'string_length', 8, strlen_dimid) if ( .not. lhistrest )then - call ncd_defdim(lnfid, 'hist_interval', 2, hist_interval_dimid) + call ncd_defdim(lnfid, 'nbnd', 2, nbnd_dimid) call ncd_defdim(lnfid, 'time', ncd_unlimited, time_dimid) if (masterproc)then write(iulog,*) trim(subname), & @@ -838,18 +838,24 @@ subroutine htape_timeconst(t, mode) dim1id(1) = time_dimid call ncd_defvar(nfid(t) , 'mcdate', ncd_int, 1, dim1id , varid, & long_name = 'current date (YYYYMMDD)') + call ncd_putatt(nfid(t), varid, 'calendar', caldesc) call ncd_defvar(nfid(t) , 'mcsec' , ncd_int, 1, dim1id , varid, & long_name = 'current seconds of current date', units='s') + call ncd_putatt(nfid(t), varid, 'calendar', caldesc) call ncd_defvar(nfid(t) , 'mdcur' , ncd_int, 1, dim1id , varid, & long_name = 'current day (from base day)') + call ncd_putatt(nfid(t), varid, 'calendar', caldesc) call ncd_defvar(nfid(t) , 'mscur' , ncd_int, 1, dim1id , varid, & long_name = 'current seconds of current day') + call ncd_putatt(nfid(t), varid, 'calendar', caldesc) call ncd_defvar(nfid(t) , 'nstep' , ncd_int, 1, dim1id , varid, & long_name = 'time step') - dim2id(1) = hist_interval_dimid; dim2id(2) = time_dimid + dim2id(1) = nbnd_dimid; dim2id(2) = time_dimid call ncd_defvar(nfid(t), 'time_bounds', ncd_double, 2, dim2id, varid, & - long_name = 'history time interval endpoints') + long_name = 'time interval endpoints', & + units=str) + call ncd_putatt(nfid(t), varid, 'calendar', caldesc) dim2id(1) = strlen_dimid; dim2id(2) = time_dimid call ncd_defvar(nfid(t), 'date_written', ncd_char, 2, dim2id, varid)