Description
Code Sample, a copy-pastable example if possible
To get the data to reproduce the example: aws s3 sync s3://olgabot-maca/xarray-coordinates-to-variables/ .
or download this .tar.gz
file.
Problem description
When I create a dataset, I set a bunch of metadata as coordinates
, not variables
:
But when I reload that exact same dataset with xr.open_dataset
, the coordinates
have be moved into variables
!!
Interestingly, I think this is happening upon dataset creation because ds.variables
already has the erroneous metadata:
Expected Output
I expected the coordinates and variables to be consistent between opening and closing the file
Output of xr.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.3.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-97-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
xarray: 0.10.0rc1-2-gf83361c
pandas: 0.20.3
numpy: 1.13.3
scipy: 0.19.1
netCDF4: None
h5netcdf: None
Nio: None
bottleneck: None
cyordereddict: None
dask: None
matplotlib: None
cartopy: None
seaborn: None
setuptools: 36.5.0.post20170921
pip: 9.0.1
conda: None
pytest: None
IPython: 6.1.0
sphinx: None