issues: 1143489702
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1143489702 | I_kwDOAMm_X85EKESm | 6288 | `Dataset.to_zarr()` does not preserve CRS information | 44147817 | closed | 0 | 6 | 2022-02-18T17:51:02Z | 2022-08-29T23:40:44Z | 2022-03-21T05:19:48Z | CONTRIBUTOR | What happened?When writing a DataArray with CRS information to zarr, after converting it to a Dataset, the CRS is not readable from the zarr file. What did you expect to happen?To be able to retrieve the CRS information from the zarr file. Minimal Complete Verifiable Example```python da = xr.DataArray(np.arange(9).reshape(3,3), coords={'x':range(3), 'y':range(3)} ) da = da.rio.write_crs(4326) da.to_dataset(name='var').to_zarr('var.zarr') xr.open_zarr('var.zarr')['var'].rio.crs == None # returns True ``` Anything else we need to know?I'd be happy to have a look at this if it is indeed a bug. EnvironmentINSTALLED VERSIONScommit: None python: 3.9.0 (default, Jan 17 2022, 21:57:22) [GCC 9.3.0] python-bits: 64 OS: Linux OS-release: 5.11.0-1028-aws machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: C.UTF-8 LOCALE: ('en_US', 'UTF-8') libhdf5: 1.12.1 libnetcdf: None xarray: 0.20.1 pandas: 1.3.4 numpy: 1.21.4 scipy: 1.7.3 netCDF4: None pydap: None h5netcdf: None h5py: 3.6.0 Nio: None zarr: 2.11.0 cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: 1.2.10 cfgrib: None iris: None bottleneck: None dask: 2022.01.0 distributed: 2022.01.0 matplotlib: 3.5.1 cartopy: None seaborn: None numbagg: None fsspec: 2021.11.1 cupy: None pint: None sparse: None setuptools: 60.2.0 pip: 21.3.1 conda: None pytest: 6.2.5 IPython: 8.0.0 sphinx: None |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/6288/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |