issue_comments
10 rows where issue = 238990919 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- CF conventions for time doesn't support years · 10 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
465760182 | https://github.com/pydata/xarray/issues/1467#issuecomment-465760182 | https://api.github.com/repos/pydata/xarray/issues/1467 | MDEyOklzc3VlQ29tbWVudDQ2NTc2MDE4Mg== | jbusecke 14314623 | 2019-02-20T21:25:01Z | 2019-02-20T21:25:01Z | CONTRIBUTOR | I have run into this problem multiple times. The latest example I found were some [CORE ocean model runs] (https://rda.ucar.edu/datasets/ds262.0/index.html#!description).
The time dimension of some (they mix units) of these files is given as
I understand that 'fully' supporting to decode this unit is hard and should probably addressed upstream. But I think it might be useful to have a utility function that converts a dataset with these units into someting quickly useable with xarray?
E.g. one could load the dataset with This way the user is aware that something is not decoded exactly, but can work with the data. Is this something that people could see useful here? Id be happy to give an implementation a shot if there is interest. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CF conventions for time doesn't support years 238990919 | |
427078097 | https://github.com/pydata/xarray/issues/1467#issuecomment-427078097 | https://api.github.com/repos/pydata/xarray/issues/1467 | MDEyOklzc3VlQ29tbWVudDQyNzA3ODA5Nw== | rabernat 1197350 | 2018-10-04T16:11:16Z | 2018-10-04T16:11:16Z | MEMBER | Month unit support in cftime is being discussed in in https://github.com/Unidata/cftime/pull/69 Perhaps xarray folks would like to weigh in. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CF conventions for time doesn't support years 238990919 | |
319325871 | https://github.com/pydata/xarray/issues/1467#issuecomment-319325871 | https://api.github.com/repos/pydata/xarray/issues/1467 | MDEyOklzc3VlQ29tbWVudDMxOTMyNTg3MQ== | fmaussion 10050469 | 2017-08-01T09:57:42Z | 2017-08-02T16:05:15Z | MEMBER | Hi Matthias, I think your solution is fine. The best is simply to avoid "months" as units altogether. If one has a "real" calendar one can also let pandas and xarray do the job:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CF conventions for time doesn't support years 238990919 | |
319296663 | https://github.com/pydata/xarray/issues/1467#issuecomment-319296663 | https://api.github.com/repos/pydata/xarray/issues/1467 | MDEyOklzc3VlQ29tbWVudDMxOTI5NjY2Mw== | matthiasdemuzere 6926916 | 2017-08-01T07:54:43Z | 2017-08-01T07:54:43Z | NONE | In order to construct a netcdf file with a 2D field on a monthly resolution (for X number of years), I currently use the lines of code mentioned below. Since I do not care about the type of calendar, I just use 360_day, in which each month of the year has 30 days. Perhaps this can be useful for others. In case a better solution is available, please let me know! ``` import numpy as np import pandas as pd import xarray as xr 51 years, saving first day of each month.mmhours = np.arange(0,(5136024),30*24) attrs = {'units': 'Hours since 1955-01-01T12:00:00', 'calendar' : '360_day'} target = np.random.rand(len(mmhours),10,10) lat = np.arange(50,51,0.1) lon = np.arange(3,4,0.1) target_xr = xr.Dataset({'test': (['time', 'lat', 'lon'], target)}, coords={'time': ('time', mmhours, attrs) ,'lat': lat, 'lon': lon}) target_xr.to_netcdf('test.nc', encoding={'test': {'zlib': True}}) ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CF conventions for time doesn't support years 238990919 | |
318927935 | https://github.com/pydata/xarray/issues/1467#issuecomment-318927935 | https://api.github.com/repos/pydata/xarray/issues/1467 | MDEyOklzc3VlQ29tbWVudDMxODkyNzkzNQ== | matthiasdemuzere 6926916 | 2017-07-30T20:39:05Z | 2017-07-30T20:39:05Z | NONE | I actually have a similar issues with respect to 'months'. I want to write out my xarray dataarray as a netcdf file, with months as time intervals (one value per month, doesn't matter what day of the month is used as a reference). As with the 'years' described above, this does not seem to work in the current framework? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CF conventions for time doesn't support years 238990919 | |
311771725 | https://github.com/pydata/xarray/issues/1467#issuecomment-311771725 | https://api.github.com/repos/pydata/xarray/issues/1467 | MDEyOklzc3VlQ29tbWVudDMxMTc3MTcyNQ== | jhamman 2443309 | 2017-06-28T20:02:49Z | 2017-06-28T20:02:49Z | MEMBER | I would think that this sort of feature belongs in |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CF conventions for time doesn't support years 238990919 | |
311636103 | https://github.com/pydata/xarray/issues/1467#issuecomment-311636103 | https://api.github.com/repos/pydata/xarray/issues/1467 | MDEyOklzc3VlQ29tbWVudDMxMTYzNjEwMw== | benbovy 4160723 | 2017-06-28T11:45:18Z | 2017-06-28T11:45:18Z | MEMBER | Although I'm not a specialist of CF conventions, this issue may be related to this one: https://github.com/Unidata/netcdftime/issues/5. The forthcoming |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CF conventions for time doesn't support years 238990919 | |
311634421 | https://github.com/pydata/xarray/issues/1467#issuecomment-311634421 | https://api.github.com/repos/pydata/xarray/issues/1467 | MDEyOklzc3VlQ29tbWVudDMxMTYzNDQyMQ== | fmaussion 10050469 | 2017-06-28T11:36:37Z | 2017-06-28T11:36:37Z | MEMBER |
Can you pinpoint to which part of the CF convention? From the link I read: I agree however that interpreting "years" as being "calendar years" is the only way that makes sense. For the record, netCDF4 also doesn't like "years": ```python import netCDF4 ds = netCDF4.Dataset('/home/mowglie/Downloads/histsoc_population_0.5deg_1861-2005.nc4') time = ds.variables['time'] netCDF4.num2date(time[:], units=time.units) ValueError Traceback (most recent call last) <ipython-input-15-b38f64c7bce4> in <module>() 2 ds = netCDF4.Dataset('histsoc_population_0.5deg_1861-2005.nc4') 3 time = ds.variables['time'] ----> 4 netCDF4.num2date(time[:], units=time.units) netCDF4/_netCDF4.pyx in netCDF4._netCDF4.num2date (netCDF4/_netCDF4.c:66463)() ValueError: unsupported time units ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CF conventions for time doesn't support years 238990919 | |
311621960 | https://github.com/pydata/xarray/issues/1467#issuecomment-311621960 | https://api.github.com/repos/pydata/xarray/issues/1467 | MDEyOklzc3VlQ29tbWVudDMxMTYyMTk2MA== | mangecoeur 743508 | 2017-06-28T10:33:33Z | 2017-06-28T10:33:33Z | CONTRIBUTOR | I think I do mean 'years' in the CF convention sense, in this case the time dimension is:
This is correctly interpreted by the NASA Panoply NetCDF file viewer. From glancing at the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CF conventions for time doesn't support years 238990919 | |
311620076 | https://github.com/pydata/xarray/issues/1467#issuecomment-311620076 | https://api.github.com/repos/pydata/xarray/issues/1467 | MDEyOklzc3VlQ29tbWVudDMxMTYyMDA3Ng== | fmaussion 10050469 | 2017-06-28T10:24:36Z | 2017-06-28T10:24:36Z | MEMBER | I am not sure to understand what you are asking us to do here. The problem with "years" is that their use is not recommended by the CF conventions. Very often (and I think your file means it this way), users would like years to be simple "calendar years" , i.e. : 1901-01-01, 1902-01-01, but this is not what the unit "years" means in the CF conventions: see http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#time-coordinate |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CF conventions for time doesn't support years 238990919 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [performed_via_github_app] TEXT, [issue] INTEGER REFERENCES [issues]([id]) ); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 7