-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should non-real-world calendars allow dates with year zero? #114
Comments
According to the CF conventions (http://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/cf-conventions.html#climatological-statistics), I think that the current behaviour is actually the right thing to do: The COARDS standard offers limited support for climatological time. For compatibility with COARDS, time coordinates should also be recognised as climatological if they have a units attribute of time-units relative to midnight on 1 January in year 0 i.e. since 0-1-1 in udunits syntax, and provided they refer to the real-world calendar. We do not recommend this convention because (a) it does not provide any information about the intervals used to compute the climatology, and (b) there is no standard for how dates since year 1 will be encoded with units having a reference time in year 0, since this year does not exist; consequently there may be inconsistencies among software packages in the interpretation of the time coordinates. Year 0 may be a valid year in non-real-world calendars, and therefore cannot be used to signal climatological time in such cases. |
Thanks @davidhassell -- I agree that year zero should not be allowed for real-world calendars based on this standard. I guess I wonder if it should be for non-real-world calendars (e.g. noleap), based on this portion of the statement above:
and the fact that cftime already allows units attributes with a year zero reference date in such cases, Unidata/netcdf4-python#470. I don't have a strong opinion here though, so I'm totally fine leaving this be for now. I recognize these standards are complicated topics. |
year zero is allowed in all non-real world calendars now, but not for real-world calendars. There appears to be consensus that this is the best solution for now, so closing... |
Currently while reference dates with year zero are allowed for all non-real-world calendars (see Unidata/netcdf4-python#470):
Some cftime date types (all but
Datetime360Day
) with year zero are not. For example:This behavior seems inconsistent (and I think may have been introduced in #12, where I followed the logic that had been established in assessing the validity of dates under timedelta arithmetic). Should this be relaxed?
The text was updated successfully, but these errors were encountered: