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

Fix xarray support with decode_coords='all' #3664

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

dopplershift
Copy link
Member

@dopplershift dopplershift commented Oct 25, 2024

Description Of Changes

This support was added in pydata/xarray#2844 and handles converting the grid_mapping variable to a coordinate in xarray itself, which was incompatible with some assumptions in parse_cf(). Add some handling for the case where the grid_mapping. Also add decode_coords='all' to our full test suite (parametrized) and adjust a few tests as necessary; this includes removing a test for not removing grid_mapping attribute since that's not a universal truth any more (beyond our control).

This is motivated by being compatible with rioxarray, which relies on decode_coords='all' for its own projection handling, and can be used to load GOES data and do direct image remapping.

Checklist

  • Tests added

@dopplershift dopplershift added Type: Bug Something is not working like it should Area: Xarray Pertains to xarray integration labels Oct 25, 2024
@dopplershift dopplershift added this to the 1.7.0 milestone Oct 25, 2024
@dopplershift dopplershift requested review from jthielen and a team as code owners October 25, 2024 21:58
@dopplershift dopplershift requested review from dcamron and removed request for a team October 25, 2024 21:58
tests/test_xarray.py Dismissed Show dismissed Hide dismissed
This support was added in pydata/xarray#2844 and handles converting the
grid_mapping variable to a coordinate in xarray itself, which was
incompatible with some assumptions in parse_cf(). Add some handling for
the case where the grid_mapping. Also add decode_coords='all' to our
full test suite and adjust a few tests as necessary.
@dcamron dcamron merged commit 2bb4d56 into Unidata:main Oct 28, 2024
57 checks passed
@dopplershift dopplershift deleted the xarray-decode branch October 28, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Xarray Pertains to xarray integration Type: Bug Something is not working like it should
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants