Package: xclim
VersionsDocumentation and SupportOpen SourceCoding StandardsDevelopment Statusxclimis 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.xclimis built usingxarrayand can seamlessly benefit from the parallelization handling provided bydask.
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:importxclimimportxarrayasxrds=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.xclimcurrently 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 Installxclimcan be installed from PyPI:$pipinstallxclimor from Anaconda (conda-forge):$condainstall-cconda-forgexclimDocumentationThe official documentation is athttps://xclim.readthedocs.io/How to make the most of xclim:Basic Usage ExamplesandIn-Depth Examples.ConventionsIn order to provide a coherent interface,xclimtries to follow different sets of conventions. In particular, input data should follow theCF conventionswhenever possible for variable attributes. Variable names are usually the ones used inCMIP6, when they exist.However, xclim willalwaysassume 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")Contributing to xclimxclimis 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 ofxclimby suggesting new features, new indices or report bugs, please leave us a message on theissue tracker.If you have a support/usage question or would like to translatexclimto a new language, be sure to check out the existingfirst!If you would like to contribute code or documentation (which is greatly appreciated!), check out theContributing Guidelinesbefore you begin!How to cite this libraryIf you wish to citexclimin 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.05415To cite a specific version ofxclim, the bibliographical reference information can be found throughZenodoLicenseThis is free software: you can redistribute it and/or modify it under the terms of theApache License 2.0. A copy of this license is provided in the code repository (LICENSE).Creditsxclimdevelopment is funded throughOuranos, Environment and Climate Change Canada (ECCC), theFonds vertand 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 withCookiecutterand theaudreyfeldroy/cookiecutter-pypackageproject template.