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 1061868498,I_kwDOAMm_X84_StPS,6021,Variable name becomes lowercase when saving to GCS with `to_zarr`,23640870,closed,0,,,2,2021-11-24T00:57:21Z,2021-11-24T17:16:32Z,2021-11-24T17:16:32Z,NONE,,,,"**What happened**: A variable name was transformed to lowercase when saving a dataset to GCS with `ds.to_zarr` **What you expected to happen**: Variable name should remain unchanged. **Minimal Complete Verifiable Example**: ```python import xarray as xr ds = xr.Dataset({'TEMPERATURE': xr.DataArray(data=[0, 1], dims=['x'])}) ds.to_zarr('gs://bucket/test.zarr') print(xr.open_dataset('gs://bucket/test.zarr', engine='zarr').data_vars) ``` and the last line prints ``` Data variables: temperature (x) int64 ... ``` It also shows up as lowercase if I do `gsutil ls gs://bucket/test.zarr`. **Anything else we need to know?**: Does not happen if writing the dataset to a local path or if I pass `fsspec.get_mapper('gs://bucket/test.zarr')` to `ds.to_zarr`. Should I even be able to use `ds.to_zarr` with a string GCS path if I do not pass any `storage_options` ? **Environment**:
Output of xr.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 3.7.10 | packaged by conda-forge | (default, Feb 19 2021, 16:07:37) [GCC 9.3.0] python-bits: 64 OS: Linux OS-release: 5.4.0-1057-gcp machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: C.UTF-8 LOCALE: ('en_US', 'UTF-8') libhdf5: 1.10.5 libnetcdf: 4.6.3 xarray: 0.19.0 pandas: 1.0.1 numpy: 1.19.4 scipy: 1.5.4 netCDF4: 1.5.5 pydap: None h5netcdf: 0.8.1 h5py: 2.10.0 Nio: None zarr: 2.7.0 cftime: 1.2.1 nc_time_axis: 1.2.0 PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2021.11.1 distributed: 2021.11.1 matplotlib: 3.2.2 cartopy: 0.19.0.post1 seaborn: None numbagg: None pint: 0.15 setuptools: 49.6.0.post20210108 pip: 20.2.4 conda: 4.10.1 pytest: 6.0.1 IPython: 7.29.0 sphinx: 3.2.1 Also: fsspec: 2021.06.0 gcsfs: 2021.06.0
@martindurant ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6021/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue