Skip to content
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

Errors with assign_latlon_coords() and sel_latlon() after updating xarray #53

Open
tinaok opened this issue May 5, 2024 · 0 comments
Open

Comments

@tinaok
Copy link
Contributor

tinaok commented May 5, 2024

Environment:

xarray version: 2024.3.0 (errors observed), 2023.12.0 (errors observed), 2023.10.1 (working)
xdggs version: [specify version if known]
Python version: 3.11
Operating System: Mac (works with xarray 2023.10.1) & on https://pangeo-eosc.vm.fedcloud.eu/ (not working.)

Description:
I have encountered issues with the xdggs library functions assign_latlon_coords() and sel_latlon() after updating xarray to newer versions. The functions worked as expected with xarray version 2023.10.1 but fail with versions 2024.3.0 and 2023.12.0.

To Reproduce:
I tested using the notebook available at:
https://github.com/xarray-contrib/xdggs/blob/main/examples/example_healpy.ipynb

** Issue 1:**
ds_idx.dggs.sel_latlon([48.0, 48.1], -5.0) causes a crash with the following traceback:

KeyError: "not all values found in index 'cell_ids'"
   at File "/srv/conda/envs/notebook/lib/python3.11/site-packages/xarray/core/indexes.py:784, in PandasIndex.sel(self, labels, method, tolerance)

スクリーンショット 2024-05-05 15 39 10

** Issue 2:**
ds_idx.dggs.assign_latlon_coords() also results in an error:

ValueError: too many values to unpack (expected 2)
   at File "/srv/conda/envs/notebook/lib/python3.11/site-packages/xdggs/accessor.py:79, in DGGSAccessor.assign_latlon_coords(self)
スクリーンショット 2024-05-05 15 40 16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant