Repository navigation
Fix --resume for CMIP7 compound variable names - #743
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #743 +/- ##
=======================================
+ Coverage 79.7% 79.8% +0.1%
=======================================
Files 41 41
Lines 9173 9180 +7
Branches 1710 1711 +1
=======================================
+ Hits 7315 7326 +11
+ Misses 1524 1522 -2
+ Partials 334 332 -2
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.
Fix #742
Problem
With
cmip_version: CMIP7,--resumenever resumes.find_resume_checkpointderives the expected
variable_idwith a CMIP6-style parse:For
ocean.wmo.tavg-ol-hxy-sea.mon.glbthis giveswmo.tavg-ol-hxy-sea.mon.glb, which never equals the file'svariable_id = 'wmo'. Every existing split is rejected, the function returnsNone, and the worker reprocesses from the first input year into a newversion directory, leaving the previous partial version behind.
Observed in production: an esm-piControl
wmorun with 107 complete,marker-carrying splits in
v20261006/returned no checkpoint.Fix
A new helper,
_resume_file_identity(), returns the frequency and the globalattributes that identify a variable's output files.
realm.variable.branding.frequency.region): match onvariable_id,branding_suffix,frequencyandregion.variable_idfrom the table-qualified name).Matching on
variable_idalone would not be enough for CMIP7.atmos.tas.tavg-h2m-hxy-u,atmos.tas.tmaxavg-h2m-hxy-uandatmos.tas.tminavg-h2m-hxy-uall writevariable_id = 'tas', so a tasmaxresume could adopt tas files as its checkpoint.
The same change fixes the split length for CMIP7 daily variables.
_canonical_frequencyparses CMIP6 table names and falls back to'mon'forCMIP7 names, so
split_years: autoresolved to 10 years for daily variablesinstead of 5. The frequency is now taken from the compound name.
Attribute comparison is case-insensitive, because regions appear as both
glband
GLB.