Versions |
|
Documentation and Support |
|
Open Source |
|
Coding Standards |
|
Development Status |
xclim is an operational Python library for climate services, providing numerous climate-related indicator tools with an extensible framework for constructing custom climate indicators, statistical downscaling and bias adjustment of climate model simulations, as well as climate model ensemble analysis tools.
xclim is built using xarray and can seamlessly benefit from the parallelization handling provided by dask. Its objective is to make it as simple as possible for users to perform typical climate services data treatment workflows. Leveraging xarray and dask, users can easily bias-adjust climate simulations over large spatial domains or compute indices from large climate datasets.
For example, the following would compute monthly mean temperature from daily mean temperature:
import xclim
import xarray as xr
ds = xr.open_dataset(filename)
tg = xclim.atmos.tg_mean(ds.tas, freq="MS")
For applications where metadata and missing values are important to get right, xclim provides a class for each index that validates inputs, checks for missing values, converts units and assigns metadata attributes to the output. This also provides a mechanism for users to customize the indices to their own specifications and preferences. xclim currently provides over 150 indices related to mean, minimum and maximum daily temperature, daily precipitation, streamflow and sea ice concentration, numerous bias-adjustment algorithms, as well as a dedicated module for ensemble analysis.
Quick Install
xclim can be installed from PyPI:
$ pip install xclim
or from Anaconda (conda-forge):
$ conda install -c conda-forge xclim
Documentation
The official documentation is at https://xclim.readthedocs.io/
How to make the most of xclim: Basic Usage Examples and In-Depth Examples.
Conventions
In order to provide a coherent interface, xclim tries to follow different sets of conventions. In particular, input data should follow the CF conventions whenever possible for variable attributes. Variable names are usually the ones used in CMIP6, when they exist.
However, xclim will always assume the temporal coordinate is named “time”. If your data uses another name (for example: “T”), you can rename the variable with:
ds = ds.rename(T="time")
xclim employs a black-compatible code formatting style (via a modified ruff configuration) and (mostly) adheres to the NumPy docstring style. For more information on coding and development conventions, see the Contributing Guidelines.
Contributing to xclim
xclim is in active development and is being used in production by climate services specialists around the world.
- If you’re interested in participating in the development of xclim by suggesting new features, new indices or report bugs, please leave us a message on the issue tracker.
If you would like to contribute code or documentation (which is greatly appreciated!), check out the Contributing Guidelines before you begin!
How to cite this library
If you wish to cite xclim in a research publication, we kindly ask that you refer to our article published in The Journal of Open Source Software (JOSS): https://doi.org/10.21105/joss.05415
To cite a specific version of xclim, the bibliographical reference information can be found through Zenodo
License
This is free software: you can redistribute it and/or modify it under the terms of the Apache License 2.0. A copy of this license is provided in the code repository (LICENSE).
Energy and Carbon Usage
The xclim development team is interested in thoroughly testing our software while also reducing the environmental impact of the software we develop. This repository uses the ECO-CI tool to estimate and track the energy use and carbon emissions of our continuous integration workflows.
ECO-CI Energy Use and Carbon Emissions from CI Workflows (since November 2024) |
||
Testing suite (main branch) |
Energy Usage |
|
Carbon Emissions |
||
Credits
xclim development is funded through Ouranos, Environment and Climate Change Canada (ECCC), the Fonds vert and the Fonds d’électrification et de changements climatiques (FECC), the Canadian Foundation for Innovation (CFI), and the Fonds de recherche du Québec (FRQ).
This package was created with Cookiecutter and the audreyfeldroy/cookiecutter-pypackage project template.
Release files for xclim 0.62.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xclim-0.62.0.tar.gz | 886.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xclim-0.62.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / xclim-0.62.0.tar.gz
| Download URL | xclim-0.62.0.tar.gz |
|---|---|
| Size | 886.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78404c1136a4d59a6a69425be11ac4eb969d368101ac14bdebc52f6c458a3430
|
|
BLAKE2b-256 checksum How to use checksums |
0036156c7f3784e70b10a16f4a1345c8f153962c37cd6d335bf23f1b730e855f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency logRelease files / xclim-0.62.0-py3-none-any.whl
| Download URL | xclim-0.62.0-py3-none-any.whl |
|---|---|
| Size | 386.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c0277f7060aebd3f2f8b92e59c2b8016b2c8d4a3cdac2e6f7ae0141210f899f
|
|
BLAKE2b-256 checksum How to use checksums |
368596e5501dc9c16787b38b3762cb596302a3db84854bc104ad991077d35d54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency log