Skip to content

Add reduced gaussian grid mapping support#613

Merged
dcherian merged 4 commits intomainfrom
reduced-gaussian
Feb 3, 2026
Merged

Add reduced gaussian grid mapping support#613
dcherian merged 4 commits intomainfrom
reduced-gaussian

Conversation

@dcherian
Copy link
Contributor

@dcherian dcherian commented Feb 3, 2026

Summary

  • Add support for the reduced_gaussian grid mapping type to GridMapping, used extensively in atmospheric/climate models (e.g., ECMWF IFS)
  • Handle pyproj.CRS.from_cf() incompatibility by detecting reduced_gaussian and building a geographic CRS via pyproj.CRS.from_json_dict() with the earth shape parameters
  • Add 3 synthetic O2 test fixtures (global, land compress, region compress) and 4 new tests

Test plan

  • All 4 new reduced gaussian grid mapping tests pass
  • All 5 existing grid mapping tests pass (no regressions)
  • Full test suite passes (195 passed, 6 skipped)

🤖 Generated with Claude Code

dcherian and others added 4 commits February 3, 2026 11:29
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>
@dcherian dcherian merged commit dd89dd0 into main Feb 3, 2026
11 checks passed
@dcherian dcherian deleted the reduced-gaussian branch February 3, 2026 19:15
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

Successfully merging this pull request may close these issues.

1 participant