home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 130840069

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/523#issuecomment-130840069 https://api.github.com/repos/pydata/xarray/issues/523 130840069 MDEyOklzc3VlQ29tbWVudDEzMDg0MDA2OQ== 950575 2015-08-13T20:52:28Z 2015-08-13T21:01:31Z CONTRIBUTOR

Just so you see how messy this can be. The year 0000, because it does not exist, is used to store climatology in COARDS and CF. The coards package issued a warning but did the wrong thing:

python from coards import parse units = 'days since 0000-01-01 00:00:00' parse(0, units) coards/__init__.py:60: UserWarning: Shifted data 366 days to the future, since year zero does not exist. UserWarning) datetime.datetime(1, 1, 1, 0, 0)

If someone accidentally saves that date back with this object it will no longer be year 0 and other CDMs might choke by not recognizing it as climatology. cf_units does the right thing:

python import cf_units u = cf_units.Unit('days since 0000-01-01 00:00:00', calendar=cf_units.CALENDAR_NO_LEAP) ut = u.utime() ut.num2date(0) 0-01-01 00:00:00

But that object is pretty much useless for pandas and xray because of the non-standard calendar. The object is useful to annotate plots or to save the data metadata back the same way it was before.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  99847237
Powered by Datasette · Queries took 0.492ms · About: xarray-datasette