-
Notifications
You must be signed in to change notification settings - Fork 10
feat(pmp): add CMIP7 data requirements and test data specs for PMP diagnostics #526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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].
…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
|
Hi @lewisjared, thank you for the test! I am retrieving facet information as like in the following lines: climate-ref/packages/climate-ref-pmp/src/climate_ref_pmp/diagnostics/variability_modes.py Lines 98 to 101 in eaeec56
Could you remind me how I can get |
packages/climate-ref-pmp/src/climate_ref_pmp/diagnostics/annual_cycle.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
|
@lewisjared could you please help rerunning your CMIP7-like-data-testing workflow to check the figure files? |

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