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/5028#issuecomment-860879523,https://api.github.com/repos/pydata/xarray/issues/5028,860879523,MDEyOklzc3VlQ29tbWVudDg2MDg3OTUyMw==,88113,2021-06-14T17:58:36Z,2021-06-14T17:58:36Z,NONE,"A heads up that https://github.com/zarr-developers/zarr-python/pull/755 reverses the default behavior of `FSStore` and so as of Zarr 2.8.3 this _might_ ""just work""?","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,830507003 https://github.com/pydata/xarray/issues/5028#issuecomment-799393304,https://api.github.com/repos/pydata/xarray/issues/5028,799393304,MDEyOklzc3VlQ29tbWVudDc5OTM5MzMwNA==,4426586,2021-03-15T12:50:33Z,2021-03-15T13:05:40Z,NONE,"The issue appears to be in [`zarr.storage.FSStore`](https://zarr.readthedocs.io/en/stable/api/storage.html#zarr.storage.FSStore), and is also discussed in [zarr#649](https://github.com/zarr-developers/zarr-python/issues/649#issuecomment-725518097). [Recently](https://github.com/pydata/xarray/blame/d2582c2f8811a3bd527d47c945b1cccd4983a1d3/xarray/backends/zarr.py#L299), a `storage_options` argument was added to `open_zarr()`. This argument might be used to provide the extra option `storage_options={'normalize_keys': False}` to Zarr. Coming back to my last example: ```python zarr.open_consolidated('http://localhost:8080/', storage_options={'normalize_keys': False})['Group'].Variable[0,0,0] ``` Works. **Work-around**, instantiate the store first: ```python xr.open_zarr(store=zarr.storage.FSStore('http://localhost:8080/', normalize_keys=False), group='Group', consolidated=True).Variable[0,0,0].compute() # = 1 ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,830507003 https://github.com/pydata/xarray/issues/5028#issuecomment-799381383,https://api.github.com/repos/pydata/xarray/issues/5028,799381383,MDEyOklzc3VlQ29tbWVudDc5OTM4MTM4Mw==,4426586,2021-03-15T12:31:03Z,2021-03-15T12:31:03Z,NONE,"Interestingly, the same applies to locally created and remotely opened data sets. The variables are recognized correctly from the consolidated metadata, but on opening are made lower case. A quick example: ```python import xarray as xr, numpy as np x, y, t = np.arange(500), np.arange(500), np.arange(0,500,6) xr.Dataset( data_vars={'Group/Variable': (('t', 'y', 'x'), np.ones((t.size, x.size, y.size)))}, coords={'x': x, 'y': y, 'Time': t} ).to_zarr('/tmp/zarr2058', consolidated=True) ``` Locally, everything is fine (every value should be 1). ```python xr.open_zarr('/tmp/zarr2058', group='Group').Variable[0,0,0].compute() # = 1 ``` However, if we access the data via http, the values are not read correctly. To test, start a local webserver: ```bash python3 -m http.server -d /tmp/zarr2058 8080 ``` Open our array, the group and variable are properly cased (and derived from `.zmetadata`): ```python xr.open_zarr('http://localhost:8080/', group='Group', consolidated=True) ``` However, access to one of the variables will yield a lower case request to the server, and output `nan` for any array position: ```python xr.open_zarr('http://localhost:8080/', group='Group', consolidated=True).Variable[0,0,0].compute() # = nan ``` The terminal will read the requested url, all in lower case: ``` ""GET /group/variable/0.0.0 HTTP/1.1"" 404 ``` However, the problem appears to be in Zarr, not (only) in xarray: ```python zarr.open_group('http://localhost:8080/')['Group'] ``` Behaves exactly the same. **Environment**:
Output of xr.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 3.7.7 (default, Mar 23 2020, 22:36:06) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 5.8.0-44-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.4 libnetcdf: 4.6.1 xarray: 0.15.0 pandas: 1.1.3 numpy: 1.18.1 scipy: 1.4.1 netCDF4: 1.4.2 pydap: None h5netcdf: 0.10.0 h5py: 2.10.0 Nio: None zarr: 2.6.1 cftime: 1.4.1 nc_time_axis: None PseudoNetCDF: None rasterio: 1.1.0 cfgrib: None iris: None bottleneck: None dask: 2.13.0 distributed: 2.30.1 matplotlib: 3.3.2 cartopy: None seaborn: None numbagg: None setuptools: 52.0.0.post20210125 pip: 21.0.1 conda: None pytest: None IPython: 7.13.0 sphinx: None
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,830507003