======================================
xclim: Climate services library |logo|
======================================
+----------------------------+-----------------------------------------------------+
| Versions | |pypi| |conda| |versions| |
+----------------------------+-----------------------------------------------------+
| Documentation and Support | |docs| |discussions| |
+----------------------------+-----------------------------------------------------+
| Open Source | |license| |fair| |ossf| |zenodo| |pyOpenSci| |joss| |
+----------------------------+-----------------------------------------------------+
| Coding Standards | |black| |ruff| |pre-commit| |security| |fossa| |
+----------------------------+-----------------------------------------------------+
| Development Status | |status| |build| |coveralls| |
+----------------------------+-----------------------------------------------------+
`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:
.. code-block:: python
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.
.. _xarray: https://docs.xarray.dev/
.. _dask: https://docs.dask.org/
Quick Install
-------------
`xclim` can be installed from PyPI:
.. code-block:: shell
$ pip install xclim
or from Anaconda (conda-forge):
.. code-block:: shell
$ 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`_.
.. _Basic Usage Examples: https://xclim.readthedocs.io/en/stable/notebooks/usage.html
.. _In-Depth Examples: https://xclim.readthedocs.io/en/stable/notebooks/index.html
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:
.. code-block:: python
ds = ds.rename(T="time")
.. _CF Conventions: http://cfconventions.org/
.. _CMIP6: https://clipc-services.ceda.ac.uk/dreq/mipVars.html
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 have a support/usage question or would like to translate `xclim` to a new language, be sure to check out the existing |discussions| first!
* If you would like to contribute code or documentation (which is greatly appreciated!), check out the `Contributing Guidelines`_ before you begin!
.. _issue tracker: https://github.com/Ouranosinc/xclim/issues
.. _Contributing Guidelines: https://github.com/Ouranosinc/xclim/blob/master/CONTRIBUTING.rst
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`_
.. _JOSS: https://joss.theoj.org/
.. _Zenodo: https://doi.org/10.5281/zenodo.2795043
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`_).
.. _Apache License 2.0: https://opensource.org/license/apache-2-0/
.. _LICENSE: https://github.com/Ouranosinc/xclim/blob/master/LICENSE
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.
.. _audreyfeldroy/cookiecutter-pypackage: https://github.com/audreyfeldroy/cookiecutter-pypackage/
.. _CFI: https://www.innovation.ca/
.. _Cookiecutter: https://github.com/cookiecutter/cookiecutter/
.. _ECCC: https://www.canada.ca/en/environment-climate-change.html
.. _FECC: https://www.environnement.gouv.qc.ca/ministere/fonds-electrification-changements-climatiques/index.htm
.. _Fonds vert: https://www.environnement.gouv.qc.ca/ministere/fonds-vert/index.htm
.. _FRQ: https://frq.gouv.qc.ca/
.. _Ouranos: https://www.ouranos.ca/
.. |pypi| image:: https://img.shields.io/pypi/v/xclim.svg
:target: https://pypi.python.org/pypi/xclim
:alt: Python Package Index Build
.. |conda| image:: https://img.shields.io/conda/vn/conda-forge/xclim.svg
:target: https://anaconda.org/conda-forge/xclim
:alt: Conda-forge Build Version
.. |discussions| image:: https://img.shields.io/badge/GitHub-Discussions-blue
:target: https://github.com/Ouranosinc/xclim/discussions
:alt: Static Badge
.. |gitter| image:: https://badges.gitter.im/Ouranosinc/xclim.svg
:target: https://gitter.im/Ouranosinc/xclim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
:alt: Gitter Chat
.. |build| image:: https://github.com/Ouranosinc/xclim/actions/workflows/main.yml/badge.svg
:target: https://github.com/Ouranosinc/xclim/actions/workflows/main.yml
:alt: Build Status
.. |coveralls| image:: https://coveralls.io/repos/github/Ouranosinc/xclim/badge.svg
:target: https://coveralls.io/github/Ouranosinc/xclim
:alt: Coveralls
.. |docs| image:: https://readthedocs.org/projects/xclim/badge
:target: https://xclim.readthedocs.io/en/latest
:alt: Documentation Status
.. |zenodo| image:: https://zenodo.org/badge/142608764.svg
:target: https://zenodo.org/badge/latestdoi/142608764
:alt: DOI
.. |pyOpenSci| image:: https://tinyurl.com/y22nb8up
:target: https://github.com/pyOpenSci/software-review/issues/73
:alt: pyOpenSci
.. |joss| image:: https://joss.theoj.org/papers/10.21105/joss.05415/status.svg
:target: https://doi.org/10.21105/joss.05415
:alt: JOSS
.. |license| image:: https://img.shields.io/github/license/Ouranosinc/xclim.svg
:target: https://github.com/Ouranosinc/xclim/blob/master/LICENSE
:alt: License
.. |security| image:: https://bestpractices.coreinfrastructure.org/projects/6041/badge
:target: https://bestpractices.coreinfrastructure.org/projects/6041
:alt: Open Source Security Foundation
.. |fair| image:: https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B-yellow
:target: https://fair-software.eu
:alt: FAIR Software Compliance
.. |ossf| image:: https://api.securityscorecards.dev/projects/github.com/Ouranosinc/xclim/badge
:target: https://securityscorecards.dev/viewer/?uri=github.com/Ouranosinc/xclim
:alt: OpenSSF Scorecard
.. |fossa| image:: https://app.fossa.com/api/projects/git%2Bgithub.com%2FOuranosinc%2Fxclim.svg?type=shield
:target: https://app.fossa.com/projects/git%2Bgithub.com%2FOuranosinc%2Fxclim?ref=badge_shield
:alt: FOSSA
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Python Black
.. |logo| image:: https://raw.githubusercontent.com/Ouranosinc/xclim/master/docs/logos/xclim-logo-small.png
:target: https://github.com/Ouranosinc/xclim
:alt: Xclim
.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/Ouranosinc/xclim/master.svg
:target: https://results.pre-commit.ci/latest/github/Ouranosinc/xclim/master
:alt: pre-commit.ci status
.. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
:target: https://github.com/astral-sh/ruff
:alt: Ruff
.. |status| image:: https://www.repostatus.org/badges/latest/active.svg
:target: https://www.repostatus.org/#active
:alt: Project Status: Active – The project has reached a stable, usable state and is being actively developed.
.. |versions| image:: https://img.shields.io/pypi/pyversions/xclim.svg
:target: https://pypi.python.org/pypi/xclim
:alt: Supported Python Versions
Raw data
{
"_id": null,
"home_page": "",
"name": "xclim",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9.0",
"maintainer_email": "Trevor James Smith <smith.trevorj@ouranos.ca>, Pascal Bourgault <bourgault.pascal@ouranos.ca>",
"keywords": "xclim,xarray,climate,climatology,bias correction,ensemble,indicators,analysis",
"author": "",
"author_email": "Travis Logan <logan.travis@ouranos.ca>",
"download_url": "https://files.pythonhosted.org/packages/4a/bd/23b4634282ec1d5901a1ab75a16fcde77e4e0ecd3f9919ef871a416eedb4/xclim-0.48.2.tar.gz",
"platform": null,
"description": "======================================\nxclim: Climate services library |logo|\n======================================\n\n+----------------------------+-----------------------------------------------------+\n| Versions | |pypi| |conda| |versions| |\n+----------------------------+-----------------------------------------------------+\n| Documentation and Support | |docs| |discussions| |\n+----------------------------+-----------------------------------------------------+\n| Open Source | |license| |fair| |ossf| |zenodo| |pyOpenSci| |joss| |\n+----------------------------+-----------------------------------------------------+\n| Coding Standards | |black| |ruff| |pre-commit| |security| |fossa| |\n+----------------------------+-----------------------------------------------------+\n| Development Status | |status| |build| |coveralls| |\n+----------------------------+-----------------------------------------------------+\n\n`xclim` is an operational Python library for climate services, providing numerous climate-related indicator tools\nwith an extensible framework for constructing custom climate indicators, statistical downscaling and bias\nadjustment of climate model simulations, as well as climate model ensemble analysis tools.\n\n`xclim` is built using `xarray`_ and can seamlessly benefit from the parallelization handling provided by `dask`_.\nIts objective is to make it as simple as possible for users to perform typical climate services data treatment workflows.\nLeveraging xarray and dask, users can easily bias-adjust climate simulations over large spatial domains or compute indices from large climate datasets.\n\nFor example, the following would compute monthly mean temperature from daily mean temperature:\n\n.. code-block:: python\n\n import xclim\n import xarray as xr\n\n ds = xr.open_dataset(filename)\n tg = xclim.atmos.tg_mean(ds.tas, freq=\"MS\")\n\nFor applications where metadata and missing values are important to get right, xclim provides a class for each index\nthat validates inputs, checks for missing values, converts units and assigns metadata attributes to the output.\nThis also provides a mechanism for users to customize the indices to their own specifications and preferences.\n`xclim` currently provides over 150 indices related to mean, minimum and maximum daily temperature, daily precipitation,\nstreamflow and sea ice concentration, numerous bias-adjustment algorithms, as well as a dedicated module for ensemble analysis.\n\n.. _xarray: https://docs.xarray.dev/\n.. _dask: https://docs.dask.org/\n\nQuick Install\n-------------\n`xclim` can be installed from PyPI:\n\n.. code-block:: shell\n\n $ pip install xclim\n\nor from Anaconda (conda-forge):\n\n.. code-block:: shell\n\n $ conda install -c conda-forge xclim\n\nDocumentation\n-------------\nThe official documentation is at https://xclim.readthedocs.io/\n\nHow to make the most of xclim: `Basic Usage Examples`_ and `In-Depth Examples`_.\n\n.. _Basic Usage Examples: https://xclim.readthedocs.io/en/stable/notebooks/usage.html\n.. _In-Depth Examples: https://xclim.readthedocs.io/en/stable/notebooks/index.html\n\nConventions\n-----------\nIn 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.\n\nHowever, 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:\n\n.. code-block:: python\n\n ds = ds.rename(T=\"time\")\n\n.. _CF Conventions: http://cfconventions.org/\n.. _CMIP6: https://clipc-services.ceda.ac.uk/dreq/mipVars.html\n\nContributing to xclim\n---------------------\n`xclim` is in active development and is being used in production by climate services specialists around the world.\n\n* 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`_.\n * If you have a support/usage question or would like to translate `xclim` to a new language, be sure to check out the existing |discussions| first!\n\n* If you would like to contribute code or documentation (which is greatly appreciated!), check out the `Contributing Guidelines`_ before you begin!\n\n.. _issue tracker: https://github.com/Ouranosinc/xclim/issues\n.. _Contributing Guidelines: https://github.com/Ouranosinc/xclim/blob/master/CONTRIBUTING.rst\n\nHow to cite this library\n------------------------\nIf 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\n\nTo cite a specific version of `xclim`, the bibliographical reference information can be found through `Zenodo`_\n\n.. _JOSS: https://joss.theoj.org/\n.. _Zenodo: https://doi.org/10.5281/zenodo.2795043\n\nLicense\n-------\nThis 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`_).\n\n.. _Apache License 2.0: https://opensource.org/license/apache-2-0/\n.. _LICENSE: https://github.com/Ouranosinc/xclim/blob/master/LICENSE\n\nCredits\n-------\n`xclim` development is funded through Ouranos_, Environment and Climate Change Canada (ECCC_), the `Fonds vert`_ and the Fonds d'\u00e9lectrification et de changements climatiques (FECC_), the Canadian Foundation for Innovation (CFI_), and the Fonds de recherche du Qu\u00e9bec (FRQ_).\n\nThis package was created with Cookiecutter_ and the `audreyfeldroy/cookiecutter-pypackage`_ project template.\n\n.. _audreyfeldroy/cookiecutter-pypackage: https://github.com/audreyfeldroy/cookiecutter-pypackage/\n.. _CFI: https://www.innovation.ca/\n.. _Cookiecutter: https://github.com/cookiecutter/cookiecutter/\n.. _ECCC: https://www.canada.ca/en/environment-climate-change.html\n.. _FECC: https://www.environnement.gouv.qc.ca/ministere/fonds-electrification-changements-climatiques/index.htm\n.. _Fonds vert: https://www.environnement.gouv.qc.ca/ministere/fonds-vert/index.htm\n.. _FRQ: https://frq.gouv.qc.ca/\n.. _Ouranos: https://www.ouranos.ca/\n\n.. |pypi| image:: https://img.shields.io/pypi/v/xclim.svg\n :target: https://pypi.python.org/pypi/xclim\n :alt: Python Package Index Build\n\n.. |conda| image:: https://img.shields.io/conda/vn/conda-forge/xclim.svg\n :target: https://anaconda.org/conda-forge/xclim\n :alt: Conda-forge Build Version\n\n.. |discussions| image:: https://img.shields.io/badge/GitHub-Discussions-blue\n :target: https://github.com/Ouranosinc/xclim/discussions\n :alt: Static Badge\n\n.. |gitter| image:: https://badges.gitter.im/Ouranosinc/xclim.svg\n :target: https://gitter.im/Ouranosinc/xclim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge\n :alt: Gitter Chat\n\n.. |build| image:: https://github.com/Ouranosinc/xclim/actions/workflows/main.yml/badge.svg\n :target: https://github.com/Ouranosinc/xclim/actions/workflows/main.yml\n :alt: Build Status\n\n.. |coveralls| image:: https://coveralls.io/repos/github/Ouranosinc/xclim/badge.svg\n :target: https://coveralls.io/github/Ouranosinc/xclim\n :alt: Coveralls\n\n.. |docs| image:: https://readthedocs.org/projects/xclim/badge\n :target: https://xclim.readthedocs.io/en/latest\n :alt: Documentation Status\n\n.. |zenodo| image:: https://zenodo.org/badge/142608764.svg\n :target: https://zenodo.org/badge/latestdoi/142608764\n :alt: DOI\n\n.. |pyOpenSci| image:: https://tinyurl.com/y22nb8up\n :target: https://github.com/pyOpenSci/software-review/issues/73\n :alt: pyOpenSci\n\n.. |joss| image:: https://joss.theoj.org/papers/10.21105/joss.05415/status.svg\n :target: https://doi.org/10.21105/joss.05415\n :alt: JOSS\n\n.. |license| image:: https://img.shields.io/github/license/Ouranosinc/xclim.svg\n :target: https://github.com/Ouranosinc/xclim/blob/master/LICENSE\n :alt: License\n\n.. |security| image:: https://bestpractices.coreinfrastructure.org/projects/6041/badge\n :target: https://bestpractices.coreinfrastructure.org/projects/6041\n :alt: Open Source Security Foundation\n\n.. |fair| image:: https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B-yellow\n :target: https://fair-software.eu\n :alt: FAIR Software Compliance\n\n.. |ossf| image:: https://api.securityscorecards.dev/projects/github.com/Ouranosinc/xclim/badge\n :target: https://securityscorecards.dev/viewer/?uri=github.com/Ouranosinc/xclim\n :alt: OpenSSF Scorecard\n\n.. |fossa| image:: https://app.fossa.com/api/projects/git%2Bgithub.com%2FOuranosinc%2Fxclim.svg?type=shield\n :target: https://app.fossa.com/projects/git%2Bgithub.com%2FOuranosinc%2Fxclim?ref=badge_shield\n :alt: FOSSA\n\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Python Black\n\n.. |logo| image:: https://raw.githubusercontent.com/Ouranosinc/xclim/master/docs/logos/xclim-logo-small.png\n :target: https://github.com/Ouranosinc/xclim\n :alt: Xclim\n\n.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/Ouranosinc/xclim/master.svg\n :target: https://results.pre-commit.ci/latest/github/Ouranosinc/xclim/master\n :alt: pre-commit.ci status\n\n.. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n :target: https://github.com/astral-sh/ruff\n :alt: Ruff\n\n.. |status| image:: https://www.repostatus.org/badges/latest/active.svg\n :target: https://www.repostatus.org/#active\n :alt: Project Status: Active \u2013 The project has reached a stable, usable state and is being actively developed.\n\n.. |versions| image:: https://img.shields.io/pypi/pyversions/xclim.svg\n :target: https://pypi.python.org/pypi/xclim\n :alt: Supported Python Versions\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Climate indices computation package based on Xarray.",
"version": "0.48.2",
"project_urls": {
"About Ouranos": "https://www.ouranos.ca/en/",
"Changelog": "https://xclim.readthedocs.io/en/stable/history.html",
"Homepage": "https://xclim.readthedocs.io/",
"Issue tracker": "https://github.com/Ouranosinc/xclim/issues",
"Source": "https://github.com/Ouranosinc/xclim/"
},
"split_keywords": [
"xclim",
"xarray",
"climate",
"climatology",
"bias correction",
"ensemble",
"indicators",
"analysis"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3576830caa45e90f56ede89cb0225402cbc310b0b1ea81e56a1c4c374cefd9ab",
"md5": "8af0c936547a4bdc7559d5f66f5515a8",
"sha256": "40f9cd6b20a82f3f2fe324012518368b00b199c7a3f579721e50c048d762f7c2"
},
"downloads": -1,
"filename": "xclim-0.48.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8af0c936547a4bdc7559d5f66f5515a8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9.0",
"size": 398214,
"upload_time": "2024-02-26T17:51:04",
"upload_time_iso_8601": "2024-02-26T17:51:04.983306Z",
"url": "https://files.pythonhosted.org/packages/35/76/830caa45e90f56ede89cb0225402cbc310b0b1ea81e56a1c4c374cefd9ab/xclim-0.48.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4abd23b4634282ec1d5901a1ab75a16fcde77e4e0ecd3f9919ef871a416eedb4",
"md5": "1a15dde72dc4d3102e1db9bf49befde6",
"sha256": "fb72c9cf982eb54aa94d98614a273ab3ae9997325790ad23d25b980f79156092"
},
"downloads": -1,
"filename": "xclim-0.48.2.tar.gz",
"has_sig": false,
"md5_digest": "1a15dde72dc4d3102e1db9bf49befde6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9.0",
"size": 872744,
"upload_time": "2024-02-26T17:51:09",
"upload_time_iso_8601": "2024-02-26T17:51:09.950771Z",
"url": "https://files.pythonhosted.org/packages/4a/bd/23b4634282ec1d5901a1ab75a16fcde77e4e0ecd3f9919ef871a416eedb4/xclim-0.48.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-26 17:51:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Ouranosinc",
"github_project": "xclim",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "xclim"
}