Skip to main content

roocs-woodpecker-cmip6-decadal-plugin

CMIP6-decadal fixes for Woodpecker.

This plugin registers the CMIP6-decadal fix family, including:

  • cmip6_decadal.time_metadata
  • cmip6_decadal.calendar_normalization
  • cmip6_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:

  1. A private _needs_* predicate.
  2. Optional private helper functions for the actual mutation.
  3. One @FixFunctionRegistry.register class.
  4. matches() delegates to is_cmip6_decadal_netcdf().
  5. check() returns short user-facing findings.
  6. apply() returns True on dry-run when it would change the dataset, and mutates only when dry_run=False.

Checklist:

  1. Add a module under src/woodpecker_cmip6_decadal_plugin/.
  2. Register one FixFunction subclass with @FixFunctionRegistry.register.
  3. Import the class from woodpecker_cmip6_decadal_plugin.__init__.
  4. Add the step to recipes/cmip6_decadal_full_recipe.json with the intended phase. Omit phase only when the step belongs to the default apply phase.
  5. 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.

Metadata

Release files for roocs-woodpecker-cmip6-decadal-plugin 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for roocs-woodpecker-cmip6-decadal-plugin 0.7.1
File Size Uploaded
roocs_woodpecker_cmip6_decadal_plugin-0.7.1.tar.gz 16.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for roocs-woodpecker-cmip6-decadal-plugin 0.7.1
File Interpreter ABI Platform
roocs_woodpecker_cmip6_decadal_plugin-0.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 41.1 kB

Release files / roocs_woodpecker_cmip6_decadal_plugin-0.7.1.tar.gz

Download URL roocs_woodpecker_cmip6_decadal_plugin-0.7.1.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0e85ad4fffca6a9a94a4e2be82f4a97880f663d9a6f4fc5698f5114f658ef00f
BLAKE2b-256 checksum
How to use checksums
bda826c3b5c74c237c63528f572c87314b608f367412849480a7bf6650911e2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / roocs_woodpecker_cmip6_decadal_plugin-0.7.1-py3-none-any.whl

Download URL roocs_woodpecker_cmip6_decadal_plugin-0.7.1-py3-none-any.whl
Size 24.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cc50a9a75cd8a1588f60d46481cc4797d199543d55deaa87f9dd09ffdf70d0f
BLAKE2b-256 checksum
How to use checksums
8a35e5692a7707bf007a1eaf049b3b5c5013eb7e5b462f45382d01e6919397d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page