Skip to content

Fix int64 ocean grid index coordinates breaking THREDDS access - #638

Merged
rbeucher merged 1 commit into
mainfrom
fix/ocean-index-coord-int32
Aug 24, 2026
Merged

Fix int64 ocean grid index coordinates breaking THREDDS access#638
rbeucher merged 1 commit into
mainfrom
fix/ocean-index-coord-int32

Conversation

@rbeucher

Copy link
Copy Markdown
Member

Summary

  • Paola reported that Laurie's published ACCESS-ESM1.5 ocean CMIP6Plus files fail on THREDDS' OPeNDAP and NCSS services.
  • Of the three issues she flagged, two (the coordinates attribute pointing at native grid vars like geolon_c/geolat_c, and spurious bnds/vertices coordinate variables) were already fixed on main in earlier PRs.
  • The third — index/bounds variables written as int64 — is fixed here for the remaining case: the ocean grid's i/j index coordinates, built via a bare np.arange() in ocean_supergrid.py, defaulted to the platform int (int64 on 64-bit Linux) with nothing downstream casting them back to int32.

Test plan

  • Added a regression test asserting i/j are int32 in tests/unit/test_supergrid.py
  • pixi run -e test python -m pytest tests/unit — 1790 passed, 2 skipped

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

np.arange() defaults to the platform int (int64 on 64-bit Linux), so
the ocean tripolar grid's i/j index dimension variables were written
as int64. THREDDS' OPeNDAP and NCSS services fail on int64 index
variables, breaking access to published ocean files.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@rbeucher
rbeucher merged commit e889a08 into main Aug 24, 2026
2 checks passed
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.2%. Comparing base (3ccc6ca) to head (549b88b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #638   +/-   ##
=====================================
  Coverage   77.2%   77.2%           
=====================================
  Files         40      40           
  Lines       8514    8514           
  Branches    1590    1590           
=====================================
  Hits        6575    6575           
  Misses      1610    1610           
  Partials     329     329           
Flag Coverage Δ
unit 77.2% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rbeucher
rbeucher deleted the fix/ocean-index-coord-int32 branch August 24, 2026 10:21
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