py-cordex is a Python library for managing CORDEX grids, handling rotated/projection-based domains, and supporting CMORization of regional climate data. It enables compliant metadata, grid generation, and integration with xarray for climate workflows.
This package offers Python tools for the CORDEX community and aims to simplify working with CORDEX grids and metadata. Most tools leverage the xarray
API to create grid and coordinate information and data of CORDEX domains in the form of an xarray.Dataset
directly from the official CORDEX archive specifications.
Please have a look at the introduction notebook!
You can use this package, for example, to easily access CORDEX grid definitions:
import cordex as cx
cx.domain("EUR-11")
To create an xarray Dataset:
And make a quick plot using the accessor:
cx.domain("EUR-11").cx.map()
For planned features, please have a look at the issues, grab one, and contribute!
You can install py-cordex using pip or conda, for example:
pip install py-cordex
or
conda install -c conda-forge py-cordex
For instructions to install py-cordex from source, please have a look at the contributing guide. If you want to contribute, please get in contact as early as possible, for example, using draft pull requests.
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Parts of this package have been developed within the project Pilot Lab Exascale Earth System Modelling (PL-ExaESM).