home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 486390856

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/1809#issuecomment-486390856 https://api.github.com/repos/pydata/xarray/issues/1809 486390856 MDEyOklzc3VlQ29tbWVudDQ4NjM5MDg1Ng== 4133310 2019-04-24T19:22:52Z 2019-04-24T19:24:27Z NONE

I can't seem recreate this with a minimal example, xarray roundtrips a NetCDF file with a coordinates attribute correctly:

```python from netCDF4 import Dataset import xarray as xr

with Dataset('test.nc', format='NETCDF4', mode='w') as nc: nc.createDimension('dim1', size=0) var = nc.createVariable('var1', 'f8', dimensions=('dim1')) var[:] = [1., 2., 3.] var.setncattr('coordinates', 'dim1')

xr.open_dataset('test.nc').to_netcdf('test2.nc') ```

There is something peculiar about how WRF handles the coordinates attribute, but I can't see anything off about it yet.

Interestingly, I can workaround the WRF coordinates issue by setting decode_coords=False in xarray.open_dataset(), for example, this works:

python xr.open_dataset('wrfout_d01_2019-04-16_15_00_00', decode_coords=False).to_netcdf('test.nc')

while this doesn't:

python xr.open_dataset('wrfout_d01_2019-04-16_15_00_00').to_netcdf('test.nc')

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