-
-
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
concat result not correct for particular dataset #3681
Comments
Are they completely identical? I see you've used |
good point, How to use
But this didn't work. |
Looks like instead of using ds3 = xr.concat([ds1,ds2], dim='time', join='left')
Is that what you're after? Best to check through the data explicitly |
Since lat is a dimension coordinate or "index variable" you want join="override" instead of compat="override". A PR to make the docs clearer on this would be appreciated! |
Unfortunately,
|
Ah thanks, there is a bug here. xarray is trying to overwrite indexes for the |
MCVE Code Sample
data here: https://www.dropbox.com/sh/8eist9mmlf41mpc/AAB8yp6ERz-b4VYozL8tsj-ma?dl=0
Expected Output
since ds3.lat should be identical to ds1.lat
Problem Description
I've encountered a particular NetCDF dataset which is not handled correctly by the Xarray
concat
operation. It's a climate dataset with 96 latitude points which has been split into two time segments. After concatenation (dim = 'time') there are suddenly 142 latitude points even though the latitude arrays are completely identical AFAIK.As a workaround, I've tried to reindex the result (
ds3
) as followsbut that yields an incomplete field after the year 2061. This can be seen by issuing:
with white areas indicating missing data. There is no missing data in the source files.
Output of
xr.show_versions()
xarray: 0.14.1
pandas: 0.25.1
numpy: 1.16.4
scipy: 1.3.1
netCDF4: 1.4.2
pydap: None
h5netcdf: None
h5py: 2.9.0
Nio: None
zarr: None
cftime: 1.0.0b1
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: 1.2.1
dask: 2.3.0
distributed: 2.3.2
matplotlib: 3.0.2
cartopy: 0.17.0
seaborn: 0.9.0
numbagg: None
setuptools: 41.0.1
pip: 19.2.2
conda: 4.8.1
pytest: 5.0.1
IPython: 7.7.0
sphinx: 2.1.2
The text was updated successfully, but these errors were encountered: