A ``time variable'' is one which represents date and time, which
we will refer to hereafter just as ``time''. An ``interval of time''
is the difference between two times.
It would be possible to describe time in terms of six components
(year, month, day, hour, minute, second) in a netCDF file, using
six component variables of various data types. However, it is more
efficient and for many purposes more convenient to represent a time
as a single number, giving the elapsed interval since a certain
reference time, which may be either implicit or explicit. We refer
to conversion from the components of a time into a single number
as ``encoding'', and the reverse as ``decoding''. Encoding and decoding
are complicated because year and month are units with lengths that
depend on the date and the calendar in use, so special provisions
are needed for time axes.
A ``calendar'' defines the set of valid dates (year-month-day
combinations). The standard calendar is the Gregorian (the calendar
of udunits), but climate models do not always use this. For instance,
in the calendar of the Hadley Centre GCM, all months have 30 days.
The elapsed interval in units of fixed length (days, hours, minutes,
seconds) between two times will not necessarily be the same in two
different calendars, because there may be different numbers of valid
dates between them. For example, the interval between 1 February
1996 and 1 March 1996 is one month, and equals 29 days in the standard
calendar, but 30 days in the Hadley Centre model calendar, since
30 February is a valid date in the latter. Therefore the encoding
of a time into an elapsed interval will depend on the calendar,
and it is necessary to know the calendar when converting. This standard
permits the use of the standard calendar (below, section
26) and of other calendars (section 27).
The calendar attribute, described in the following sections,
indicates the calendar in use. If a time coordinate variable has
no calendar attribute, the global calendar attribute
(section 5), if present, applies to it.
This standard permits two different methods, distinguished by
their units, of encoding a time into a number. These methods,
referred to as ``relative time'' and ``absolute time'', are described
in the following sections (24 and 25).
Relative time is a more familiar method, but absolute time offers
important advantages.
Time variables may have an attribute time_format, to
specify a format for printing the date and time, according to the
conventions of the Unix (TM) date command.
Time coordinate variables must always explicitly include the units
attribute; there is no default value.
|