Workflow orchestration layer for CDO-based climate analysis
Project description
cdo-flow
Workflow orchestration layer for CDO-based climate analysis, built on top of python-cdo-wrapper.
Install
pip install cdo-flow
Requires CDO to be installed for steps that execute CDO operators.
Quick start
from cdo_flow import Workflow, python_step, cdo_step
from python_cdo_wrapper.query import CDOQueryTemplate
# Pure Python step
@python_step
def write_data(ctx):
ctx.output("result.txt").write_text("hello")
# CDO step via decorator
@cdo_step
def regrid(ctx, cdo):
cdo.query(ctx.inputs["data"]).remap_bil("r360x180").to_file(ctx.output("regridded.nc"))
# Inline CDO chain
wf = Workflow(name="demo", run_dir="./runs")
wf.add_step("write", write_data)
wf.add_step(
"select_tas",
chain=CDOQueryTemplate().select_var("tas").year_mean(),
inputs={"data": "/path/to/input.nc"},
output=["tas_annual.nc"],
)
result = wf.run()
YAML workflows
name: my_workflow
steps:
- id: select
type: cdo
inputs:
data: /path/to/input.nc
operator_chain:
- op: selname
args: [tas]
- op: yearmean
output: tas_annual.nc
cdo-flow validate my_workflow.yml
cdo-flow run my_workflow.yml --dry-run
cdo-flow run my_workflow.yml
License
MIT
Project details
Release history Release notifications | RSS feed
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 cdo_flow-0.1.0.tar.gz.
File metadata
- Download URL: cdo_flow-0.1.0.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60735a2d7613cf4231cd3790dc4b2b18bc80dcddf9bb684f8c33f06edc720ab0
|
|
| MD5 |
de946f5e5793a6a4ad222775b957c7c7
|
|
| BLAKE2b-256 |
1fe2f9175703c152aee0690f1acca026a5abe6c22094fe40899c05bae4349650
|
Provenance
The following attestation bundles were made for cdo_flow-0.1.0.tar.gz:
Publisher:
publish.yml on NarenKarthikBM/cdo-flow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cdo_flow-0.1.0.tar.gz -
Subject digest:
60735a2d7613cf4231cd3790dc4b2b18bc80dcddf9bb684f8c33f06edc720ab0 - Sigstore transparency entry: 1472298172
- Sigstore integration time:
-
Permalink:
NarenKarthikBM/cdo-flow@2bd68f6102a59d3658b36332dae3ed747c1013ec -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/NarenKarthikBM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2bd68f6102a59d3658b36332dae3ed747c1013ec -
Trigger Event:
push
-
Statement type:
File details
Details for the file cdo_flow-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cdo_flow-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11ba393e5779a1f86e472fa3d3c032b6e394922e082ade97c18e33f7f3e0e3ca
|
|
| MD5 |
ac0d9d5cd5f4da1e42bd36dc350c8603
|
|
| BLAKE2b-256 |
1e4f6ab758f80f55d33ac28ba159ff557358a65da9eb8862e24fbc711afb06db
|
Provenance
The following attestation bundles were made for cdo_flow-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on NarenKarthikBM/cdo-flow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cdo_flow-0.1.0-py3-none-any.whl -
Subject digest:
11ba393e5779a1f86e472fa3d3c032b6e394922e082ade97c18e33f7f3e0e3ca - Sigstore transparency entry: 1472298244
- Sigstore integration time:
-
Permalink:
NarenKarthikBM/cdo-flow@2bd68f6102a59d3658b36332dae3ed747c1013ec -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/NarenKarthikBM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2bd68f6102a59d3658b36332dae3ed747c1013ec -
Trigger Event:
push
-
Statement type: