-
-
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
Advanced interpolation returning unexpected shape #9839
Comments
Respectfully, can you minimize the example, including:
|
ok, I updated, not quite sure what you mean by minimizing ? |
It needs to be self-contained — i.e. not requiring someone to download a file. |
The trick is that it looks somewhat dependent on the dataset file , because for some older datasets I use, the advanced interpolation works, but not for this kind of 'newer' datasets (which basically looks quite similar and are properly read by open_mf fct). this is why I added the dataset file. otherwise if I had been able to tell that this is a pure interpolation problem that I can reproduce on all kind of datasets files I use, then I would probably have managed to create a true self-contained example indeed. |
and besides, advanced indexing using |
OK, I think I understand what happening. |
yeah i believe the string non-dim coord is tripping it up. |
What happened?
Hi !
Iam using Xarray since quite some time and recently I started using fresh NC files from https://cds.climate.copernicus.eu/ (up to now, using NC4 files that I have from quite some time now). I have an issue regarding Xarray' interpolation with advanced indexing: the returned shape by interp() is not as expected.
basically Iam just doing advanced interpolation as mentioned here https://docs.xarray.dev/en/stable/user-guide/interpolation.html#advanced-interpolation.
It used to work perfectly with my older datasets.
thanks
Vianney
What did you expect to happen?
I would expect res.shape to be (100,) or similar (and actually I get this result with older datasets. but I don't understand why I get (705, 715, 2) ! this does not corrrespond to anything, as we can see from the below description of the dataset:
Minimal Complete Verifiable Example
dataset.zip
Output:
MVCE confirmation
Relevant log output
Anything else we need to know?
the expected log is (100,)
Environment
INSTALLED VERSIONS
commit: None
python: 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:27:10) [MSC v.1938 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 140 Stepping 1, GenuineIntel
byteorder: little
LC_ALL: None
LANG: fr
LOCALE: ('fr_FR', 'cp1252')
libhdf5: 1.14.3
libnetcdf: 4.9.2
xarray: 2024.11.0
pandas: 2.2.2
numpy: 1.26.4
scipy: 1.14.0
netCDF4: 1.6.5
pydap: None
h5netcdf: None
h5py: 3.11.0
zarr: None
cftime: 1.6.4
nc_time_axis: None
iris: None
bottleneck: None
dask: 2024.7.0
distributed: 2024.7.0
matplotlib: 3.9.1
cartopy: 0.23.0
seaborn: None
numbagg: None
fsspec: 2024.6.1
cupy: 13.2.0
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 70.3.0
pip: 24.0
conda: 24.5.0
pytest: 8.2.2
mypy: None
IPython: 8.26.0
sphinx: 7.4.0
The text was updated successfully, but these errors were encountered: