roocs-woodpecker-cmip6-decadal-plugin
CMIP6-decadal fixes for Woodpecker.
This plugin registers the CMIP6-decadal fix family, including:
cmip6_decadal.time_metadatacmip6_decadal.calendar_normalizationcmip6_decadal.realization_variable
Install
pip install roocs-woodpecker-cmip6-decadal-plugin
For a development checkout:
pip install -e .
Verify
woodpecker list-fixes --dataset CMIP6-decadal
pytest
Example
See examples/usage.py for a minimal public API example using
woodpecker.testing.make_cmip6_decadal().
Add An Adaptation
CMIP6-decadal adaptation modules use:
cmip6d_<sequence>_<short_name>.py
Keep the sequence stable for review/order history, and use a short name that
matches the public adaptation id where practical. For example,
cmip6d_0002_calendar.py registers
cmip6_decadal.calendar_normalization.
An adaptation only needs to declare when a CMIP6-decadal dataset needs a change, how to preview that change, and how to apply it in place.
Use the existing modules as templates:
| Module | Shows |
|---|---|
cmip6d_0001_time_meta.py |
Simple metadata normalization with a helper predicate and one changed attribute. |
cmip6d_0002_calendar.py |
Prepare-phase calendar normalization for pre-concatenation use. |
cmip6d_0014_reftime_coord.py |
Coordinate creation derived from existing time/start metadata. |
cmip6d_0015_leadtime_coord.py |
Coordinate creation that depends on a previous adaptation step. |
Most modules follow the same shape:
- A private
_needs_*predicate. - Optional private helper functions for the actual mutation.
- One
@FixFunctionRegistry.registerclass. matches()delegates tois_cmip6_decadal_netcdf().check()returns short user-facing findings.apply()returnsTrueon dry-run when it would change the dataset, and mutates only whendry_run=False.
Checklist:
- Add a module under
src/woodpecker_cmip6_decadal_plugin/. - Register one
FixFunctionsubclass with@FixFunctionRegistry.register. - Import the class from
woodpecker_cmip6_decadal_plugin.__init__. - Add the step to
recipes/cmip6_decadal_full_recipe.jsonwith the intendedphase. Omitphaseonly when the step belongs to the defaultapplyphase. - Add or extend a synthetic dataset test in
tests/test_cmip6_decadal_plugin.py.
Use phase: "prepare" for pre-concatenation changes, phase: "apply" for
normal C3S/CDS adaptation, and phase: "finalize" for post-processing after
the normal adaptation flow.
The notebook docs/notebooks/cmip6_decadal_recipe_example.ipynb shows the
public API flow: load c3s.cmip6_decadal, run the prepare phase, then run
the normal apply phase.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file roocs_woodpecker_cmip6_decadal_plugin-0.7.1.tar.gz.
File metadata
- Download URL: roocs_woodpecker_cmip6_decadal_plugin-0.7.1.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e85ad4fffca6a9a94a4e2be82f4a97880f663d9a6f4fc5698f5114f658ef00f
|
|
| MD5 |
c96d7289927fc3bc0b50ebaf3fa109f9
|
|
| BLAKE2b-256 |
bda826c3b5c74c237c63528f572c87314b608f367412849480a7bf6650911e2f
|
File details
Details for the file roocs_woodpecker_cmip6_decadal_plugin-0.7.1-py3-none-any.whl.
File metadata
- Download URL: roocs_woodpecker_cmip6_decadal_plugin-0.7.1-py3-none-any.whl
- Upload date:
- Size: 24.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cc50a9a75cd8a1588f60d46481cc4797d199543d55deaa87f9dd09ffdf70d0f
|
|
| MD5 |
c3ed24069a5c24c37801eb2ad79e653d
|
|
| BLAKE2b-256 |
8a35e5692a7707bf007a1eaf049b3b5c5013eb7e5b462f45382d01e6919397d9
|