Awesome Open Source
Awesome Open Source

xclim: Climate indices computations logo

License Build Status Python Package Index Build Conda-forge Build Version Coveralls CodeFactor DOI Python Black Documentation Status Gitter Chat

xclim is a library of functions to compute climate indices from observations or model simulations. It is built using xarray and can benefit from the parallelization handling provided by dask. Its objective is to make it as simple as possible for users to compute indices from large climate datasets and for scientists to write new indices with very little boilerplate.

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.icclim.TG(ds.tas, freq='YS')

For applications where meta-data 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 50 indices related to mean, minimum and maximum daily temperature, daily precipitation, streamflow and sea ice concentration.


The official documentation is at


xclim is in active development and it's being used in production by climate services specialists. If you're interested in participating to the development, want to suggest features, new indices or report bugs, please leave us a message on the issue tracker. There is also a chat room on gitter (Gitter Chat ).

How to cite this library

If you wish to cite xclim in a research publication, we kindly ask that you use the bibliographical reference information available through Zenodo


This work is made possible thanks to the contribution of the Canadian Center for Climate Services.

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (1,123,251
Xarray (125
Related Projects