fix: regression fixes for CMIP6-to-CMIP7 conversion and supplementary dataset selection#553
Closed
lewisjared wants to merge 31 commits intoremove-out-namefrom
Closed
fix: regression fixes for CMIP6-to-CMIP7 conversion and supplementary dataset selection#553lewisjared wants to merge 31 commits intoremove-out-namefrom
lewisjared wants to merge 31 commits intoremove-out-namefrom
Conversation
PMP annual cycle: make flexible timestamp
Add additional celery configuration
- Simplified the extraction of variable mappings from the CMIP7 Data Request - Removed out_name usages
Two bugs caused non-r1i1p1f1 datasets to always produce r1i1p1f1:
1. convert_variant_index() used isinstance(value, int) which missed
numpy integer types (np.int32, np.int64) from netCDF attributes,
falling through to the default return of f"{prefix}1"
2. convert_cmip6_to_cmip7_attrs() defaulted all missing individual
indexes to 1 and rebuilt variant_label from those defaults,
overwriting the correct variant_label even when it was present
Fix: parse variant_label as fallback when individual indexes are
missing, and handle numpy integer types in convert_variant_index().
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.
Description
A collection of fixes addressing regression issues in the CMIP6-to-CMIP7 conversion pipeline and supplementary dataset selection logic:
AddSupplementaryDataset.applymethod could select multiple supplementary datasets (e.g. areacella) for the same model when different main datasets in the group preferred different supplementaries due to score ties. Changed iteration from per-unique-facet-combination to per-matching_facets-group, scoring each candidate against ALL main datasets and taking the max score. This eliminates spurious experiment entries (1pctCO2,esm-1pct-brch-1000PgC,hist-GHG) from appearing alongside expectedhistorical+ SSP data.Checklist
Please confirm that this pull request has done the following:
changelog/