I have encountered an issue with using a negative year in the units attribute 
of time variables in NetCDF files. The interpretation in cftime (Python) is 
that year zero does not exist, while in other software such as Panoply the 
interpretation is that year zero exists. This affects how the time variable is 
read and displayed, and effectively causes one year difference between the 
different implementations. The CF Conventions (Section 4.4. Time Coordinate) do 
not explicitly state how negative years should be treated, except for stating 
that year 0 has a special meaning. On the contrary, ISO 8601, seems to be more 
on the side of including year 0.

In particular, this issues comes up when using Julian date in NetCDF files, 
which has a reference time of 1 January 4713 BCE, 12:00 UTC. As of now it is 
impossible to use it in NetCDF files and get consistent results in Python 
(through the netCDF4 package) and Panoply.

I suppose there are multiple possible solutions to the problem. Either all 
implementations start using the same method of counting
negative years (and it would be helpful if the CF Conventions make this 
unambiguous), or there would have to be information about the year numbering 
convention included in the NetCDF file, such as a new attribute or an indicator 
included in the `units` or `calendar` attributes.

Related issue in cftime: [#200](https://github.com/Unidata/cftime/issues/200).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/cf-convention/cf-conventions/issues/298

This list forwards relevant notifications from Github.  It is distinct from 
cf-metad...@cgd.ucar.edu, 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 
cf-metadata-unsubscribe-requ...@listserv.llnl.gov.

Reply via email to