Dear @larsbarring and @davidhassell

Taking Lars's points in reverse.

* I agree with what David proposes for referring to UDUNITS instead of 
`udunits.dat`.

* It seems better to me not to have an independent entry for the deprecated 
`gregorian`, which would make it more prominent than it is now. If someone is 
reading the CF standard to find out what `gregorian` means, because they've 
found it in CF-netCDF data, and they don't immediately notice it in the entry 
for the `standard` calendar, they'd easily find it with a text search. If 
they're intending to write data, they're better off not knowing about 
`gregorian`!

* I agree that the `standard` calendar of UDUNITS should be explained. Looking 
again at the CF 1.8, I see that it _is_ explained, but this comes further down, 
following the text for arbitrary calendars about `month_lengths` etc. I have 
reproduced the current text below, for reference. I propose that we delete the 
existing text and instead insert into the entry for this calendar an 
abbreviated version rewritten to be more consistent with CF text and less 
UDUNITS-specific, as follows:

`standard`: Mixed Gregorian/Julian calendar as defined by [UDUNITS]. This is 
the default calendar. A deprecated alternative name for this calendar is 
`gregorian`. In this calendar, date/times after (and including) `1582-10-15 
0:0:0` are in the Gregorian calendar, in which a year is a leap year if either 
(i) it is divisible by 4 but not by 100 or (ii) it is divisible by 400. 
Date/times before (and excluding) `1582-10-5 0:0:0` are in the Julian calendar. 
Year 1 AD or CE in the `standard` calendar is also year 1 of the `julian` 
calendar. In this calendar, `1582-10-15 0:0:0` is exactly 1 day later than 
`1582-10-4 0:0:0` and the intervening dates are undefined. Therefore it is 
recommended that date/times in the range from (and including) `1582-10-5 0:0:0` 
until (but excluding) `1582-10-15 0:0:0` should not be used as reference in 
`units`, and that a time coordinate variable should not include any date/times 
in this range, because their interpretation is unclear. It is also recommended 
that a reference date/time before the discontinuity should not be used for 
date/times after the discontinuity, and vice-versa.

`proleptic_gregorian`: A calendar with the Gregorian rules for leap-years 
extended to years before 1582. All dates consistent with these rules are 
allowed, both before and after `1582-10-15 0:0:0`.

In this proposed text, I have been more explicit about the problems with the 
calendar and the recommendations to avoid them. I have moved the Gregorian 
leap-year rules from `proleptic_gregorian` to `standard`, and I have stated 
explicitly that the illegal range of dates in `standard` is OK in 
`proleptic_gregorian`, as I believe to be the case. I don't think any of this 
changes the convention, but I think it's useful to be clear. Is it all OK? It 
would imply some more things in the conformance document.

The existing text also says, "For time coordinates that do cross the 
discontinuity the `proleptic_gregorian` calendar should be used instead." I 
don't think this recommendation makes sense. You can't use the 
`proleptic_gregorian` calendar to represent dates in the Julian calendar. If 
they are real historical dates, with daily resolution, you have no choice but 
`standard` to do it properly. If you don't mind about being inexact, for 
instance if you only want the 1st of the month, you could use any calendar, 
including model calendars, to encode the dates; `proleptic_gregorian` wouldn't 
be particularly better. Hence I propose we should omit that recommendation.

Cheers

Jonathan

Current text:


The mixed Gregorian/Julian calendar used by Udunits is explained in the 
following excerpt from the udunits(3) man page:

> The udunits(3) package uses a mixed Gregorian/Julian  calendar  system.   
> Dates  prior to 1582-10-15 are assumed to use the Julian calendar, which was 
> introduced by  Julius  Caesar in 46 BCE and is based on a year that is 
> exactly 365.25 days long.  Dates on and after 1582-10-15 are assumed to use  
> the Gregorian calendar, which was introduced on that date and is based on a 
> year that is exactly 365.2425 days long.  (A year
is  actually  approximately 365.242198781 days long.)  Seemingly strange 
behavior of the udunits(3) package can  result if  a user-given time interval 
includes the changeover date. For example, utCalendar() and utInvCalendar() can 
be used to show that 1582-10-15 *preceded* 1582-10-14 by 9 days.

Due to problems caused by the discontinuity in the default mixed 
Gregorian/Julian calendar, we strongly recommend that this calendar should only 
be used when the time coordinate does not cross the discontinuity. For time 
coordinates that do cross the discontinuity the `proleptic_gregorian` calendar 
should be used instead.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://urldefense.us/v3/__https://github.com/cf-convention/cf-conventions/issues/298*issuecomment-866170037__;Iw!!G2kpM7uM-TzIFchu!hB237jHbPpdC3yWY-OfkgqCusfolvW0i6qCjEYr4aAHnVrT44I-ueKANjaVhMzEPJ3dI6Zg968g$
 
This list forwards relevant notifications from Github.  It is distinct from 
[email protected], although if you do nothing, a subscription to the 
UCAR list will result in a subscription to this list.
To unsubscribe from this list only, send a message to 
[email protected].

Reply via email to