netCDF time representation

We used the cited ACM algorithm for various CDF things starting around 1985
or so with reasonable success.  A packaging for it and related conversions is
available with the current CDF distribution, for those that might want to try
it.
------------------------------- Referenced Note ---------------------------
Received: from unidata.ucar.edu by watson.ibm.com (IBM VM SMTP V2R2) with TCP;
   Tue, 18 Feb 1992 21:42:55 EST
Received: by unidata.ucar.edu id AA27589
  (5.65c/IDA-1.4.4 for netcdfgroup-send); Tue, 18 Feb 1992 19:24:12 -0700
Received: from shark.mel.dit.CSIRO.AU by unidata.ucar.edu with SMTP id AA27585
  (5.65c/IDA-1.4.4 for <netcdfgroup@xxxxxxxxxxxxxxxx>); Tue, 18 Feb 1992 
19:24:06 -0700
Received: from atmos.dar.csiro.au by shark.mel.dit.csiro.au with SMTP id AA22730
  (5.65c/IDA-1.4.4/DIT-1.3 for 
<@shark.mel.dit.CSIRO.AU:netcdfgroup@xxxxxxxxxxxxxxxx>); Wed, 19 Feb 1992 
13:24:11 +1100
Received: from hail.dar.csiro.au by atmos.dar.csiro.au via SMTP (5.65+bind 
1.5+ida/910805.SGI/DAR)
        for @shark.mel.dit.CSIRO.AU:netcdfgroup@xxxxxxxxxxxxxxxx id AA06597; 
Wed, 19 Feb 1992 13:23:55 +1100
Received: by hail.dar.csiro.au (5.65+bind 1.5+ida/910805.SGI/DAR)
        for @atmos.dar.CSIRO.AU:netcdfgroup@xxxxxxxxxxxxxxxx id AA03335; Wed, 
19 Feb 1992 13:23:52 +1100
Message-Id: <9202190223.AA03335@xxxxxxxxxxxxxxxxx>

After reading everyone's comments I have come to following conclusions.

I strongly support Steve Emmerson's proposal in
<9202121649.AA10185@xxxxxxxxxxxxxxxxxxxxxx>
to extend units system to allow a time unit & origin to be specified as:
>        double time(time);
>        time:units="milliseconds @ (1992-2-12 07:58:27 -700)";

I suggest a minor change of form of local time differential (TDF) ('-700'
in example).  If separator ':' is used in time of day then it should also be
used in TDF:
        time:units="milliseconds @ (1992-2-12 07:58:27 -7:00)";
This appears to be more in line with the following Intenational Standard:
ISO 3307. Information interchange - Representation of time of the day

The following other ISO standards are also relevant:
ISO 2014. Writing of calendar dates in all-numeric form
ISO 2711. Information processing interchange - Representation of ordinal dates

It appears that there are some (very rare I suspect) situations when double
precision is inadequate. The obvious solution seems to me to be to
implement proposed type hyperlong (64-bit integer), as mentioned in section 3.1
(p23) of NetCDF User's Guide. Would need support functions to do arithmetic,
etc., but these would not be as complex as for multi-component proposal.

Now I would like to share my experience with date/time stuff.

I am aware of two commonly used time origins:

Unix uses 00:00:00 UTC, January 1, 1970. (UTC or 'Coordinated Universal Time'
is the modern name for what used to be called Greenwich Mean Time or GMT.)
The C date & time functions in <time.h> use times in whole seconds from this
origin.

Astronomers & others use start of 'Julian era', which is noon UTC some date
about 4713 BC. Times measured from this origin in days are called 'Julian Day
Numbers'.  Double (53-bit) precision gives accuracy of current (e.g. 1992)
times to about 0.02 milliseconds.

I have found it convenient to add 12 hours to the Julian Day Number, so the
origin is midnight rather than noon.

It would be nice to be able to easily use Julian Day Numbers, with either
noon or midnight origin. But it may not be desirable to explicitly specify
date of origin. I'm not sure what it is. Would one use Gregorian or Julian
calendar? I suggest a special way of specifying the date of Julian Day 0
such as:
        time:units="milliseconds @ (JDN=0 00:00:00 -7:00)";

Algorithms for conversion between Julian Day Number & calendar date are given
by:
Fliegel, H.F. & Van Flandern, T.C., Comm.ACM V11 N10, Oct 1968, p657
&  Press, W.H., et.al. (1986) 'Numerical Recipes', Cambridge, pp 10-13

There is Fortran source code for my date/time routines datejd.f, datjdj.f,
days.f, daysgj.f, jd.f, jdgj.f, jdj.f available by anonymous ftp to
atmos.dar.csiro.au followed by "cd netcdf/hld". These cover both modern
Gregorian & old Julian calendar (which I once had to use for a historian
wanting to calculate tides in 17th century)

Harvey Davies                   CSIRO Division of Atmospheric Research,
Internet: hld@xxxxxxxxxxxx      Private Bag No. 1, Mordialloc,
Phone: +61 3 586 7574           Victoria 3195,  Australia





  • 1992 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: