Fix int64 ocean grid index coordinates breaking THREDDS access - #638
Merged
Conversation
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>
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
coordinatesattribute pointing at native grid vars likegeolon_c/geolat_c, and spuriousbnds/verticescoordinate variables) were already fixed onmainin earlier PRs.int64— is fixed here for the remaining case: the ocean grid'si/jindex coordinates, built via a barenp.arange()inocean_supergrid.py, defaulted to the platform int (int64on 64-bit Linux) with nothing downstream casting them back toint32.Test plan
i/jareint32intests/unit/test_supergrid.pypixi run -e test python -m pytest tests/unit— 1790 passed, 2 skippedCo-Authored-By: Claude Sonnet 5 noreply@anthropic.com