home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 308734219

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/1451#issuecomment-308734219 https://api.github.com/repos/pydata/xarray/issues/1451 308734219 MDEyOklzc3VlQ29tbWVudDMwODczNDIxOQ== 10194086 2017-06-15T13:48:13Z 2017-06-15T13:48:13Z MEMBER

I tried to dig a bit into this...

The reason behind _cleanup_netcdf_time_units is to clean up things as u'Hour␣␣since 1680-01-01 00:00:00' (double space). However, it does not correct for the case (e.g. daYs remains daYs). Also, the clean up is not tested. This seems to be a reasonable thing to do, but, as mentioned the ref_date is changed, too. Thus we have to decide if

  • we want to keep the cleaning of the "Hour since" part, and if the case should be corrected as well (daYs). If yes potentially add tests.
  • the user-defined ref_date string (e.g. 2015-01-01) should be changed (I would say no). And if no, if it needs a sanity check or if pd.Timestamp(ref_date) does the sanity check for us.

In the CF conventions they refer to the udunits library. And, as mentioned, provide examples without "T". But this seems to be the standard in udunits, version 1. While in the udunits, version 2, the timestamp format includes "T".

TIMSTAMP: <year> (<month> <day>?)? "T" <hour> (<minute> <second>?)?

But udunits2 also mentions that it should be able to parse all formats of udunits1. So leaving out the "T" seems to be the safer option.

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