HHMMSS = 10000 * hour + 100 * minutes + seconds
YYYYDDD = 1000 * year + day
where the year is 4-digits (1994, say, rather than just 94), and the
day is the Julian day-number (1,...,365 or 366).
A time step sequence is a sequence of dates and times
{ [date(0),time(0)], [date(1),time(1)], ... [date[N],time[N] }
having a starting date and time [date(0),time(0)], a time increment dT,
and such that each [date(K),time(K)] is exactly dT away from
[date(K-1),time(K-1)]. Note that
each file has a time step
sequence (where by convention, time increment dT=0 means that
the data in the file is time-independent, and routines like
READ3() and WRITE3() which deal with time-independent files ignore the
date-and-time arguments.
Standard-Year and Standard-Week files are files for climatological and similar year-independent data. For these files, INTERP3() and possibly WKDAY() can be used to extract data for dates and times for the relevant day of year 0 according to the patterns
...
!! Standard-Year data:
!! Note: Fortran MOD() doesn't work "right"
!! for negative numbers:
IF ( JDATE .GT. 0 ) THEN
DAY = MOD( JDATE, 1000 )
ELSE
YEAR = (-JDATE)/1000 + 1
DAY = MOD( JDATE + 1000*YEAR, 1000 )
END IF
IF ( .NOT.INTERP3(<.file>, <.variable>, DAY, JTIME, ... )
...
!! Standard-Week data:
DAY = WKDAY( JDATE )
IF ( .NOT.INTERP3(<.file>, <.variable>, DAY, JTIME, ... )
...
Standard-year files should cover a period at least from
Year 1:Day 1 and at least through Year 1:Day 366,
and standard-week files should cover a period at least from
Year 1:Day 1 and at least through Year 1:Day 8.
Note that for monthly data valid at the middle of the month,
the starting date should be something like Year (-1),
Day 351, the time step 30.5 days (732 hours), and the ending date
Year 1, Day 16.
There are a number of utility routines available for manipulating dates and times, in addition to programs gregdate and juldate for converting back and forth between model-convention Julian dates and ordinary calendar dates. Note that for these utility routines, time increments may perfectly well be negative -- just make sure you keep the parts all positive or all negative; a time increment of -33000 means to step three and a half hours into the past, for example; the hours part is -3, the minutes part is -30, and the seconds part is 0. This way of representing dates and times is easy to understand and manipulate when you are watching code in the debugger (you don't have to turn the UNIXism "seconds since Jan. 1, 1970" into something meaningful for your model run, nor do you have to remember whether April has 30 days or 31 when your model run crosses over from April to May). The utility routines for manipulating dates and times are the following:
Next Section: Calling from Fortran
To: Models-3/EDSS I/O API: The Help Pages