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 https://xclim.readthedocs.io/
xclim is in active development and it's being used in production by climate services specialists.
- 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. There is also a chat room on gitter ( ).
- If you would like to contribute code or documentation (which is greatly appreciated!), check out the Contributing Guidelines before you begin!
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.