-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] xr.concat inverts coordinates order #4072
Comments
don't use the What you want to compare is the order of dimensions referenced by a variable:
and you will notice that the order does not change. To make this less confusing, maybe we should always sort the coordinates when displaying them? I'm guessing that right now they are displayed in the order they were added to the coordinates. |
This rings a bell! It has be discussed in #2811. I've done extensive checks back then, but didn't come up with an PR. My workaround or solution is outlined in this comment. Code might have been changed! |
@keewis yes you are right, but still a consistent ordering would be less confusing, including maybe also the Dimensions field. |
closed by #4419 |
Following the issue #3969
Merging two datasets using xr.concat inverts the coordinates order.
MCVE Code Sample
Current Output
Expected Output
Problem Description
The concat function should not invert the coordinates but maintain the original order.
Versions
INSTALLED VERSIONS
------------------ commit: None python: 3.6.8 (default, May 7 2019, 14:58:50) [GCC 8.3.0] python-bits: 64 OS: Linux OS-release: 4.15.0-88-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: C.UTF-8 LOCALE: en_US.UTF-8 libhdf5: None libnetcdf: Nonexarray: 0.15.1
pandas: 1.0.3
numpy: 1.18.2
scipy: None
netCDF4: None
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: None
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: None
distributed: None
matplotlib: 3.2.0
cartopy: None
seaborn: None
numbagg: None
setuptools: 46.1.3
pip: 9.0.1
conda: None
pytest: None
IPython: 7.13.0
sphinx: 2.4.3
The text was updated successfully, but these errors were encountered: