NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
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
netcdfgroup
archives: