There are several existing solutions to your question, depending on
the constraints or requirements of your application. Some of these
use encodings that are not supported by Udunits, but are explicitly
legal under the current version of CF. Here are two leading solutions:
1. time@units = "days since 1930-01-01"
+ time@calendar = "gregorian"
* Compatible with current CF conventions
* Compatible with Udunits-1 and -2
* Compatible with many existing general purpose softwares
* Conforms to the "western world's" actual historic calendar
* Complies with CF and COARDS precautions to AVOID fuzzy
. units of months or years
* Numeric time step is NOT constant for increments of
. months or years
2. time@units = "months (or years) since 1930-01-01"
+ time@calendar = "360_day"
* Compatible with current CF conventions
* NOT compatible with Udunits-1 or -2
* Compatible with SOME existing general purpose softwares
* DOES NOT conform to the "western world's" actual historic calendar
* DOES NOT comply with CF and COARDS precautions to AVOID fuzzy
. units of months or years, but reasonable in this context
* Numeric time step IS constant for increments of
. months or years
So, what constraints are important for you, and will either of the
above solutions be satisfactory?
--Dave A.
NOAA/PSD/CIRES
On 3/14/2011 6:31 PM, John Caron wrote:
because udunits converts units like months and years to a fixed
number of seconds, one cant really use things like months and years
as units, since you get things like this:
0 months since 1930-01-01 == 1930-01-01T00:00:00Z
1 months since 1930-01-01 == 1930-01-31T10:29:03Z
2 months since 1930-01-01 == 1930-03-02T20:58:07Z
3 months since 1930-01-01 == 1930-04-02T07:27:11Z
4 months since 1930-01-01 == 1930-05-02T17:56:15Z
5 months since 1930-01-01 == 1930-06-02T04:25:19Z
6 months since 1930-01-01 == 1930-07-02T14:54:22Z
7 months since 1930-01-01 == 1930-08-02T01:23:26Z
8 months since 1930-01-01 == 1930-09-01T11:52:30Z
9 months since 1930-01-01 == 1930-10-01T22:21:34Z
10 months since 1930-01-01 == 1930-11-01T08:50:38Z
11 months since 1930-01-01 == 1930-12-01T19:19:42Z
0 years since 1850-01-01 == 1850-01-01T00:00:00Z
10 years since 1850-01-01 == 1860-01-01T10:07:39Z
20 years since 1850-01-01 == 1869-12-31T20:15:19Z
30 years since 1850-01-01 == 1880-01-01T06:22:59Z
40 years since 1850-01-01 == 1889-12-31T16:30:38Z
50 years since 1850-01-01 == 1900-01-01T02:38:18Z
60 years since 1850-01-01 == 1910-01-01T12:45:58Z
70 years since 1850-01-01 == 1920-01-01T22:53:38Z
80 years since 1850-01-01 == 1930-01-01T09:01:17Z
90 years since 1850-01-01 == 1940-01-01T19:08:57Z
whereas you might really want:
0 months since 1930-01-01 = 1930-01-01T00:00Z
1 months since 1930-01-01 = 1930-02-01T00:00Z
2 months since 1930-01-01 = 1930-03-01T00:00Z
3 months since 1930-01-01 = 1930-04-01T00:00Z
4 months since 1930-01-01 = 1930-05-01T00:00Z
5 months since 1930-01-01 = 1930-06-01T00:00Z
6 months since 1930-01-01 = 1930-07-01T00:00Z
7 months since 1930-01-01 = 1930-08-01T00:00Z
8 months since 1930-01-01 = 1930-09-01T00:00Z
9 months since 1930-01-01 = 1930-10-01T00:00Z
10 months since 1930-01-01 = 1930-11-01T00:00Z
11 months since 1930-01-01 = 1930-12-01T00:00Z
0 years since 1850-01-01 = 1850-01-01T00:00Z
10 years since 1850-01-01 = 1860-01-01T00:00Z
20 years since 1850-01-01 = 1870-01-01T00:00Z
30 years since 1850-01-01 = 1880-01-01T00:00Z
40 years since 1850-01-01 = 1890-01-01T00:00Z
50 years since 1850-01-01 = 1900-01-01T00:00Z
60 years since 1850-01-01 = 1910-01-01T00:00Z
70 years since 1850-01-01 = 1920-01-01T00:00Z
80 years since 1850-01-01 = 1930-01-01T00:00Z
90 years since 1850-01-01 = 1940-01-01T00:00Z
the solutions that occur to me are:
1) use ISO date strings
2) change the way udunits works
3) create another syntax that can be distinguished from udunits and
make it work like the above
4) something else i havent thought of
any ideas?
_______________________________________________
CF-metadata mailing list
CF-metadata@cgd.ucar.edu
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata