home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 269388714

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/issues/1114#issuecomment-269388714 https://api.github.com/repos/pydata/xarray/issues/1114 269388714 MDEyOklzc3VlQ29tbWVudDI2OTM4ODcxNA== 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
}
  188985482
Powered by Datasette · Queries took 1.157ms · About: xarray-datasette