Add reduced gaussian grid mapping support#613
Merged
Conversation
Handle grid_mapping_name="reduced_gaussian" in _create_grid_mapping() by building a geographic pyproj.CRS via from_json_dict() with the earth shape parameters, since pyproj doesn't recognize "reduced_gaussian" natively. Add synthetic O2 test fixtures (global, land compress, region compress) and tests for discovery, CRS properties, and propagation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* origin/main: Add HEALPix grid mapping support to GridMapping (#614) [pre-commit.ci] pre-commit autoupdate (#612) Raise ValueError in `_get_ordered_vertices()` with "mixed" order (#595) Bump actions/upload-artifact from 4 to 5 (#605) Bump actions/checkout from 5 to 6 (#606) Dont preserve attributes when creating bounds (#608) Bump actions/download-artifact from 5 to 6 (#603) Bump astral-sh/setup-uv from 4 to 7 (#604) Bump codecov/codecov-action from 5.5.0 to 5.5.1 (#599) Bump actions/setup-python from 5 to 6 (#597) [pre-commit.ci] pre-commit autoupdate (#600) Fix singleton coord in core dim orders (#592) # Conflicts: # cf_xarray/accessor.py
Use the actual coordinate variable names (healpix_index, reduced_gaussian_index, grid_points) instead of longitude/latitude for these grid types. For compressed reduced gaussian subsets, also detect the gather variable via its compress attribute. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of hardcoding "reduced_gaussian_index" in the compress attribute check, match against the variable names already found via the standard_name lookup. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
reduced_gaussiangrid mapping type toGridMapping, used extensively in atmospheric/climate models (e.g., ECMWF IFS)pyproj.CRS.from_cf()incompatibility by detectingreduced_gaussianand building a geographic CRS viapyproj.CRS.from_json_dict()with the earth shape parametersTest plan
🤖 Generated with Claude Code