Fix WCRP Geophysical Variable Detection + time bounds for sea-ice (SImon/SIday)#404
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #404 +/- ##
=======================================
+ Coverage 74.9% 75.0% +0.1%
=======================================
Files 28 28
Lines 5246 5265 +19
Branches 963 968 +5
=======================================
+ Hits 3929 3950 +21
+ Misses 1092 1091 -1
+ Partials 225 224 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rbeucher
approved these changes
May 28, 2026
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
Sea-ice CMORisation applied only half of its curvilinear-grid transformation:
the data variable stayed on the model
(nj, ni)dimensions while the supergridcoordinates were built on
(j, i), leaving orphanedlat/lonvariables thatthe WCRP
wcrp_cmip6:1.0Geophysical Variable Detection check counted asdata variables. The CICE time-bounds variable was also dropped, leaving a
dangling
time:boundsreference.Problem
Three coupled causes:
seaice_dim_rename = {ni:i, nj:j, ...}, but thefilter
if k in self.dskeeps only variables.ni/njare puredimensions (no coordinate variable), so the rename was discarded and
siconcstayed on
(time, nj, ni).TLAT/TLON -> lat/lon; these2-D variables have no
standard_nameand were left behind on(nj, ni),redundant with the supergrid
latitude/longitudeon(j, i).time:bounds = "time_bounds"(variable
time_boundson dimd2), but the bounds machinery expectstime_bnds, sotime_boundswas never loaded and the reference dangled.Fix (
sea_ice.py)if k in self.ds or k in self.ds.dims, soni->i/nj->japply andsiconcbecomes(time, j, i), aligned with thesupergrid.
lat/loninupdate_attributesand set thedata variable's
coordinates = "latitude longitude"(clearing the stale"TLON TLAT time")._normalise_time_bounds): followtime:boundsto the real variable, rename it to
time_bndsand its non-time dim tobnds,and add
time_boundsto the load set so it is not discarded.Files changed
src/access_moppy/sea_ice.py_normalise_time_bounds(+52/-2)tests/unit/test_sea_ice.py