home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 188985482 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 3

  • shoyer 2
  • jhamman 2
  • fmaussion 2

issue 1

  • Converting rasm file to netCDF3 using xarray · 6 ✖

author_association 1

  • MEMBER 6
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
269391038 https://github.com/pydata/xarray/issues/1114#issuecomment-269391038 https://api.github.com/repos/pydata/xarray/issues/1114 MDEyOklzc3VlQ29tbWVudDI2OTM5MTAzOA== jhamman 2443309 2016-12-27T22:21:23Z 2016-12-27T22:21:23Z MEMBER

I see. I should have looked at the attributes. https://github.com/pydata/xarray-data/issues/7 fixes these issue and the dataset can now be read with scipy.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Converting rasm file to netCDF3 using xarray 188985482
269389355 https://github.com/pydata/xarray/issues/1114#issuecomment-269389355 https://api.github.com/repos/pydata/xarray/issues/1114 MDEyOklzc3VlQ29tbWVudDI2OTM4OTM1NQ== shoyer 1217238 2016-12-27T22:06:35Z 2016-12-27T22:06:35Z MEMBER

It looks like scipy gets confused between the the dimensions = '1' netCDF attribute and the variable's actual dimensions, so this is another scipy bug. When it sets the dimensions netCDF attribute, it overwrites the Python attribute of the same name: https://github.com/scipy/scipy/blob/c48dfa43eae3474f06353ed3664caed945e9aee1/scipy/io/netcdf.py#L837-L849

The simple work around is to remove the dimensions attribute from each of these variables.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Converting rasm file to netCDF3 using xarray 188985482
269388714 https://github.com/pydata/xarray/issues/1114#issuecomment-269388714 https://api.github.com/repos/pydata/xarray/issues/1114 MDEyOklzc3VlQ29tbWVudDI2OTM4ODcxNA== jhamman 2443309 2016-12-27T22:00:32Z 2016-12-27T22:00:32Z MEMBER

I also think this is a scipy bug. After converting the file to netCDF3 CLASSIC mode, I get an error in the scipy backend...

```shell $ ncks -3 rasm.nc rasm.nc

$ ncdump -k rasm.nc classic $ ncdump -h rasm.nc netcdf rasm { dimensions: time = 36 ; y = 205 ; x = 275 ; variables: double Tair(time, y, x) ; Tair:_FillValue = 9.96920996838687e+36 ; Tair:units = "C" ; Tair:long_name = "Surface air temperature" ; Tair:dimensions = "2" ; Tair:type_preferred = "double" ; Tair:time_rep = "instantaneous" ; Tair:coordinates = "yc xc" ; double time(time) ; time:dimensions = "1" ; time:long_name = "time" ; time:type_preferred = "int" ; time:units = "days since 0001-01-01" ; time:calendar = "noleap" ; double xc(y, x) ; xc:long_name = "longitude of grid cell center" ; xc:units = "degrees_east" ; xc:bounds = "xv" ; double yc(y, x) ; yc:long_name = "latitude of grid cell center" ; yc:units = "degrees_north" ; yc:bounds = "yv" ;

// global attributes: :title = "/workspace/jhamman/processed/R1002RBRxaaa01a/lnd/temp/R1002RBRxaaa01a.vic.ha.1979-09-01.nc" ; :institution = "U.W." ; :source = "RACM R1002RBRxaaa01a" ; :output_frequency = "daily" ; :output_mode = "averaged" ; :convention = "CF-1.4" ; :references = "Based on the initial model of Liang et al., 1994, JGR, 99, 14,415- 14,429." ; :comment = "Output from the Variable Infiltration Capacity (VIC) model." ; :nco_openmp_thread_number = 1 ; :NCO = "\"4.6.0\"" ; :history = "Tue Dec 27 13:38:40 2016: ncks -3 rasm.nc rasm.nc\n", "history deleted for brevity" ; }```

```Python

In [1]: from scipy.io import netcdf ...: f = netcdf.netcdf_file('rasm.nc', 'r') ...: for k, v in f.variables.items(): ...: print(k, v.dimensions) ...:
yc ('y', 'x') xc ('y', 'x') time b'1' Tair b'2'

In [2]: import xarray as xr ...: xr.open_dataset('rasm.nc', engine='netcdf4') <xarray.Dataset> Dimensions: (time: 36, x: 275, y: 205) Coordinates: * time (time) datetime64[ns] 1980-09-16T12:00:00 1980-10-17 ... xc (y, x) float64 189.2 189.4 189.6 189.7 189.9 190.1 190.2 190.4 ... yc (y, x) float64 16.53 16.78 17.02 17.27 17.51 17.76 18.0 18.25 ... * y (y) int64 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... * x (x) int64 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... Data variables: Tair (time, y, x) float64 nan nan nan nan nan nan nan nan nan nan ... ```

I don't know where scipy is getting the b'1' and b'2' dimensions. I can push the converted dataset to xarray-data but that doesn't really solve the problem of using scipy.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Converting rasm file to netCDF3 using xarray 188985482
260203632 https://github.com/pydata/xarray/issues/1114#issuecomment-260203632 https://api.github.com/repos/pydata/xarray/issues/1114 MDEyOklzc3VlQ29tbWVudDI2MDIwMzYzMg== fmaussion 10050469 2016-11-13T18:41:35Z 2016-11-13T18:41:35Z MEMBER

Yes, it works. But opening it with scipy throws a new error (to xarray's defense, the file I created with ncks also can't be opened with scipy- but it can with ncview).

I think all this gets way to complicated for a Sunday evening and a simple demo file ;-)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Converting rasm file to netCDF3 using xarray 188985482
260203017 https://github.com/pydata/xarray/issues/1114#issuecomment-260203017 https://api.github.com/repos/pydata/xarray/issues/1114 MDEyOklzc3VlQ29tbWVudDI2MDIwMzAxNw== shoyer 1217238 2016-11-13T18:31:48Z 2016-11-13T18:31:48Z MEMBER

Can you write it as netcdf3 using engine="netcdf4"? This might be a scipy bug.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Converting rasm file to netCDF3 using xarray 188985482
260202760 https://github.com/pydata/xarray/issues/1114#issuecomment-260202760 https://api.github.com/repos/pydata/xarray/issues/1114 MDEyOklzc3VlQ29tbWVudDI2MDIwMjc2MA== fmaussion 10050469 2016-11-13T18:27:14Z 2016-11-13T18:27:14Z MEMBER

Should we try to get to the source of this, or should I simply use ncks to do the conversion?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Converting rasm file to netCDF3 using xarray 188985482

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

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]);
Powered by Datasette · Queries took 13.6ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows