Silent value assignment failure in open_zarr Dataset due to hidden mode='r' #10153
Replies: 1 comment
-
Hi @jkmacc-LANL - sorry this never got a response. Assuming you found a solution in the 5 years since the original post, I'll just remind future readers that all Xarray backends are read-only. Xarray doesn't support in-place editing as the OP was assuming. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Xarray devs,
Thanks for your work on this fantastic package. I'm a new user, and the subtleties of different data stores are unfamiliar to me. I got tripped up by the fact that Zarr stores are (silently) read-only, and I think it would be helpful if this were more prominent in the docstring or zarr section of the docs.
When I try to assign values to parts of a local Zarr-backed Dataset, I get a silent failure:
The answer seems to be buried in the
open_zarr
source code:Expected Output
Assignment that follows the examples in the documentation.
mode='r'
in theopen_zarr
docstring would be the most helpful.I'm happy to make a PR on 1 & 3, but I'm not familiar with the reasoning behind why stores are never mixed-mode.
Thanks again!
Output of
xr.show_versions()
xarray: 0.12.3
pandas: 0.24.2
numpy: 1.16.3
scipy: 1.3.0
netCDF4: None
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: 2.3.1
cftime: None
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: 1.2.2
distributed: 1.28.1
matplotlib: 3.1.0
cartopy: None
seaborn: None
numbagg: None
setuptools: 41.0.1
pip: 19.1
conda: None
pytest: None
IPython: 7.5.0
sphinx: None
Beta Was this translation helpful? Give feedback.
All reactions