home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 158518147

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
158518147 MDU6SXNzdWUxNTg1MTgxNDc= 869 open netCDF gives 'time' dim with 1969 change in timezone 2049051 closed 0     5 2016-06-04T18:46:38Z 2016-06-04T20:20:46Z 2016-06-04T19:47:39Z CONTRIBUTOR      

I'm on xarray version 0.7.2 netCDF4-python version 1.2.2 Python version via Conda: 3.5.1 |Continuum Analytics, Inc.| (default, Dec 7 2015, 11:16:01) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]

The time dim on Datasets read in from netCDF files seems to change timezones in 1969. This is especially a pain for annual data because the bug causes annual indexes to shift by one year. I've seen this problem in reanalysis for NCEP/NCAR, Twentieth Century Reanalysis, and some reconstructed SST fields.

For example, if a read in a netCDF file. Take NCEP/NCAR Reanalysis 1 monthly mean geopotential height as an example (ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis.derived/pressure/hgt.mon.mean.nc ; a 278 MB file).

``` python import xarray as xr

ds = xr.open_dataset('~/Downloads/hgt.mon.mean.nc') print(ds.time) ```

The interesting part of this printed time dim is always around 1969:

... '1969-09-01T00:00:00.000000000Z', '1969-10-01T00:00:00.000000000Z', '1969-11-01T00:00:00.000000000Z', '1969-12-01T00:00:00.000000000Z', '1969-12-31T17:00:00.000000000-0700', '1970-01-31T17:00:00.000000000-0700', '1970-02-28T17:00:00.000000000-0700', ...

You can see we go from Z to-0700. It also gives me an extra measure for Dec 1969 :-\

I don't think this is a hidden calendar or datetime-like feature that I'm unaware of...? Seems like a bug with you guys or upstream.

Thanks for your help!

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/869/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 1,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 5 rows from issue in issue_comments
Powered by Datasette · Queries took 0.674ms · About: xarray-datasette