feat(pmp): add CMIP7 data requirements and test data specs for PMP diagnostics#526
Open
lewisjared wants to merge 11 commits intomainfrom
Open
feat(pmp): add CMIP7 data requirements and test data specs for PMP diagnostics#526lewisjared wants to merge 11 commits intomainfrom
lewisjared wants to merge 11 commits intomainfrom
Conversation
…tics Add CMIP7 as an alternative source type alongside CMIP6 for all PMP diagnostics (AnnualCycle, ENSO, ExtratropicalModesOfVariability). Each diagnostic now returns tuple-of-tuples data_requirements with both CMIP6 and CMIP7 options, and includes test_data_spec with test cases for both source types.
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
…ariable/obs pairs Instead of duplicating each make_data_requirement call for CMIP6 and CMIP7, the helper now returns both pairs and the class flattens them via a generator.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds CMIP7 support to REF-PMP diagnostics by extending data requirements and defining fetchable test-case specifications, alongside existing CMIP6 behavior.
Changes:
- Add CMIP7
DataRequirementalternatives (usingvariant_labelfor grouping) for ENSO and variability-modes diagnostics. - Extend annual-cycle helper to parameterize model
SourceDatasetType(CMIP6 vs CMIP7) and add CMIP7 requirements across variables. - Introduce
TestDataSpecification/TestCasedefinitions for CMIP6 and CMIP7 inputs for PMP diagnostics.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
packages/climate-ref-pmp/src/climate_ref_pmp/diagnostics/annual_cycle.py |
Parameterizes model source type in make_data_requirement, adds CMIP7 requirement variants, and adds test-case requests. |
packages/climate-ref-pmp/src/climate_ref_pmp/diagnostics/enso.py |
Adds CMIP7 requirement variant and defines CMIP6/CMIP7 + Obs4MIPs test-case requests. |
packages/climate-ref-pmp/src/climate_ref_pmp/diagnostics/variability_modes.py |
Adds CMIP7 requirement variant and defines CMIP6/CMIP7 + Obs4MIPs test-case requests for modes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/climate-ref-pmp/src/climate_ref_pmp/diagnostics/variability_modes.py
Show resolved
Hide resolved
packages/climate-ref-pmp/src/climate_ref_pmp/diagnostics/annual_cycle.py
Outdated
Show resolved
Hide resolved
packages/climate-ref-pmp/src/climate_ref_pmp/diagnostics/annual_cycle.py
Outdated
Show resolved
Hide resolved
packages/climate-ref-pmp/src/climate_ref_pmp/diagnostics/annual_cycle.py
Show resolved
Hide resolved
- Add get_model_source_type helper to pmp_driver for detecting CMIP6 vs CMIP7 - Update build_cmd/build_cmds and build_execution_result in all three PMP diagnostics to use the detected model source type instead of hard-coding SourceDatasetType.CMIP6 - Use variant_label instead of member_id when running CMIP7 data - Add RegistryRequest for PMPClimatology reference data in annual cycle test data specifications
CMIP7 does not use table_id; frequency is the correct facet for filtering. Replace table_id: Amon with frequency: mon and table_id: fx with frequency: fx in all CMIP7Request facets.
Obs datasets (HadISST-1-1, 20CR, GPCP-Monthly-3-2, TropFlux-1-0, CERES-EBAF-4-2) are not available on ESGF but exist in the obs4ref registry. Switch from Obs4MIPsRequest to RegistryRequest with registry_name="obs4ref" and source_type="obs4MIPs" so the data can be fetched while still being accessible via definition.datasets[SourceDatasetType.obs4MIPs].
Contributor
Author
…mp-cmip7 * 'pmp-cmip7' of github.com:Climate-REF/climate-ref: chore(deps-dev): bump the python-dependencies group with 4 updates chore(deps): bump the github-actions group with 2 updates
Contributor
|
Hi @lewisjared, thank you for the test! I am retrieving facet information as like in the following lines: Could you remind me how I can get |
lewisjared
commented
Feb 12, 2026
packages/climate-ref-pmp/src/climate_ref_pmp/diagnostics/annual_cycle.py
Show resolved
Hide resolved
Contributor
|
@lewisjared could you please help rerunning your CMIP7-like-data-testing workflow to check the figure files? |
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
DataRequiremententries alongside existing CMIP6 ones for all three PMP diagnostic families (annual cycle, ENSO, variability modes)make_data_requirement/_get_data_requirementshelpers to accept asource_typeparameter and usevariant_labelinstead ofmember_idfor CMIP7 group-by facetsTestDataSpecificationwith CMIP6 and CMIP7 test cases for each diagnostic, usingCMIP6Request,CMIP7Request, andObs4MIPsRequestTest plan
make test-diagnostic-pmp