Metadata-Version: 2.5
Name: xclim
Version: 1.0.0
Summary: Climate indices computation package based on Xarray.
Keywords: xclim,xarray,climate,climatology,bias correction,ensemble,indicators,analysis
Author-email: Travis Logan <logan.travis@ouranos.ca>
Maintainer-email: Trevor James Smith <smith.trevorj@ouranos.ca>, Pascal Bourgault <bourgault.pascal@ouranos.ca>
Requires-Python: >=3.11.0
Description-Content-Type: text/x-rst
License-Expression: Apache-2.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Natural Language :: French
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Classifier: Topic :: Scientific/Engineering :: Hydrology
Classifier: Typing :: Typed
License-File: AUTHORS.rst
License-File: LICENSE
Requires-Dist: boltons >=20.1
Requires-Dist: bottleneck >=1.3.1
Requires-Dist: cf-xarray >=0.9.3
Requires-Dist: cftime >=1.4.1
Requires-Dist: click >=8.1
Requires-Dist: dask[array] >=2024.8.1
Requires-Dist: docstring_parser
Requires-Dist: filelock >=4.2.1
Requires-Dist: numba >=0.60.0
Requires-Dist: numpy >=2.0
Requires-Dist: packaging >=24.0
Requires-Dist: pandas >=2.2.0
Requires-Dist: pint >=0.24.4
Requires-Dist: pyarrow >=15.0
Requires-Dist: pyyaml >=6.0.1
Requires-Dist: scikit-learn >=1.2.0
Requires-Dist: scipy >=1.11.0
Requires-Dist: xarray >=2024.11.0
Requires-Dist: yamale >=5.0.0
Requires-Dist: flox >=0.9 ; extra == "performance"
Requires-Dist: numbagg >=0.8 ; extra == "performance"
Requires-Dist: matplotlib >=3.8.0 ; extra == "plot"
Requires-Dist: lmoments3 >=1.0.7 ; extra == "stats"
Requires-Dist: pymannkendall >=1.4.0 ; extra == "stats"
Requires-Dist: pandas-stubs >=2.2 ; extra == "types"
Project-URL: About Ouranos, https://www.ouranos.ca/en/
Project-URL: Changelog, https://xclim.readthedocs.io/en/stable/changelog.html
Project-URL: Homepage, https://xclim.readthedocs.io/
Project-URL: Issue tracker, https://github.com/Ouranosinc/xclim/issues
Project-URL: Mastodon, https://fosstodon.org/@xclim
Project-URL: Source, https://github.com/Ouranosinc/xclim/
Project-URL: Zenodo, https://doi.org/10.5281/zenodo.2795043
Provides-Extra: performance
Provides-Extra: plot
Provides-Extra: stats
Provides-Extra: types
Import-Name: xclim

===============================================================
xclim: Climate services library |logo| |logo-dark| |logo-light|
===============================================================

+----------------------------+----------------------------------------------------------------------+
| Versions                   | |pypi| |conda| |versions|                                            |
+----------------------------+----------------------------------------------------------------------+
| Documentation and Support  | |docs| |discussions|                                                 |
+----------------------------+----------------------------------------------------------------------+
| Open Source                | |license| |ossf-score| |zenodo| |pyOpenSci| |joss|                   |
+----------------------------+----------------------------------------------------------------------+
| Coding Standards           | |ruff| |prek| |mypy| |pre-commit-ci| |ossf-bp| |fossa| |zizmor|      |
+----------------------------+----------------------------------------------------------------------+
| Development Status         | |status| |build| |coveralls|                                         |
+----------------------------+----------------------------------------------------------------------+

.. warning::
    This branch of `xclim` is under active development and contains many breaking changes compared to v0.61+.
    For the latest stable release, please refer to the `main` branch or the PyPI/Conda package.

`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 compute many different climate indicators 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 these indicators to their own specifications and preferences.
`xclim` currently provides over 150 climate indicators related to mean, minimum and maximum daily temperature, daily precipitation,
streamflow and sea ice concentration, as well as a dedicated module for ensemble analysis and a data validation/health-check module.

.. _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")

`xclim` employs a `black`_-compatible code formatting style (via a modified `ruff`_ configuration) and (mostly) adheres to the `NumPy docstring`_ style.
The library is also fully compliant with `mypy`_ (`ty`_) for a coherent and consistent static- and duck-typed code base.
For more information on coding and development conventions, see the `Contributing Guidelines`_.

.. _black: https://black.readthedocs.io/en/stable/
.. _mypy: https://www.mypy-lang.org/
.. _ruff: https://docs.astral.sh/ruff/
.. _ty: https://docs.astral.sh/ty/
.. _CF Conventions: http://cfconventions.org/
.. _CMIP6: https://clipc-services.ceda.ac.uk/dreq/mipVars.html
.. _NumPy docstring: https://numpydoc.readthedocs.io/en/stable/format.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/main/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/main/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    | Energy Usage     | |energy-last| |energy-average| |energy-total|   |
|                  +------------------+-------------------------------------------------+
| (*main* branch)  | Carbon Emissions | |carbon-last| |carbon-average| |carbon-total|   |
+------------------+------------------+-------------------------------------------------+

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_).

.. image:: https://raw.githubusercontent.com/Ouranosinc/.github/refs/heads/main/images/logo-ouranos-horizontal-couleur.svg
        :target: https://www.ouranos.ca/
        :align: center
        :class: ouranos-logo no-theme center

|ouranos-dark| |ouranos-light|

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
.. _ECO-CI: https://www.green-coding.io/
.. _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

.. |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/main/LICENSE
        :alt: License

.. |ossf-bp| image:: https://bestpractices.coreinfrastructure.org/projects/6041/badge
        :target: https://bestpractices.coreinfrastructure.org/projects/6041
        :alt: Open Source Security Foundation Best Practices

.. |ossf-score| image:: https://api.securityscorecards.dev/projects/github.com/Ouranosinc/xclim/badge
        :target: https://securityscorecards.dev/viewer/?uri=github.com/Ouranosinc/xclim
        :alt: Open Source Security Foundation 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

.. |logo| image:: https://raw.githubusercontent.com/Ouranosinc/xclim/main/docs/logos/xclim-logo-small-light.png
        :target: https://github.com/Ouranosinc/xclim
        :alt: xclim
        :class: xclim-logo-small no-theme

.. |logo-light| image:: https://raw.githubusercontent.com/Ouranosinc/xclim/main/docs/logos/empty.png
        :target: https://github.com/Ouranosinc/xclim
        :alt:
        :class: xclim-logo-small only-light-inline

.. |logo-dark| image:: https://raw.githubusercontent.com/Ouranosinc/xclim/main/docs/logos/empty.png
        :target: https://github.com/Ouranosinc/xclim
        :alt:
        :class: xclim-logo-small only-dark-inline

.. |mypy| image:: https://www.mypy-lang.org/static/mypy_badge.svg
        :target: https://mypy-lang.org/
        :alt: mypy

.. |pre-commit-ci| image:: https://results.pre-commit.ci/badge/github/Ouranosinc/xclim/main.svg
        :target: https://results.pre-commit.ci/latest/github/Ouranosinc/xclim/main
        :alt: pre-commit.ci status

.. |prek| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json
        :target: https://github.com/j178/prek
        :alt: prek

.. |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

.. |zizmor| image:: https://img.shields.io/badge/%F0%9F%8C%88-zizmor-white?labelColor=white
        :target: https://zizmor.sh/
        :alt: zizmor

.. Ouranos Logos

.. |ouranos-light| image:: https://raw.githubusercontent.com/Ouranosinc/xclim/main/docs/logos/empty.png
        :target: https://www.ouranos.ca/
        :alt:
        :class: ouranos-logo only-light center

.. |ouranos-dark| image:: https://raw.githubusercontent.com/Ouranosinc/xclim/main/docs/logos/empty.png
        :target: https://www.ouranos.ca/
        :alt:
        :class: ouranos-logo only-dark center

.. Energy Metrics by https://github.com/green-coding-solutions/eco-ci-energy-estimation

.. |energy-total| image:: https://api.green-coding.io/v1/ci/badge/get?repo=Ouranosinc/xclim&branch=main&workflow=5828641&mode=totals
        :target: https://metrics.green-coding.io/ci.html?repo=Ouranosinc/xclim&branch=main&workflow=5828641
        :alt: Energy Consumption (Total)

.. |energy-last| image:: https://api.green-coding.io/v1/ci/badge/get?repo=Ouranosinc/xclim&branch=main&workflow=5828641
        :target: https://metrics.green-coding.io/ci.html?repo=Ouranosinc/xclim&branch=main&workflow=5828641
        :alt: Energy Consumption (Last run)

.. |energy-average| image:: https://api.green-coding.io/v1/ci/badge/get?repo=Ouranosinc/xclim&branch=main&workflow=5828641&mode=avg&duration_days=90
        :target: https://metrics.green-coding.io/ci.html?repo=Ouranosinc/xclim&branch=main&workflow=5828641
        :alt: Energy Consumption (Last 90 days moving average)

.. |carbon-total| image:: https://api.green-coding.io/v1/ci/badge/get?repo=Ouranosinc/xclim&branch=main&workflow=5828641&mode=totals&metric=carbon
        :target: https://metrics.green-coding.io/ci.html?repo=Ouranosinc/xclim&branch=main&workflow=5828641
        :alt: Carbon Emissions (Total)

.. |carbon-last| image:: https://api.green-coding.io/v1/ci/badge/get?repo=Ouranosinc/xclim&branch=main&workflow=5828641&metric=carbon
        :target: https://metrics.green-coding.io/ci.html?repo=Ouranosinc/xclim&branch=main&workflow=5828641
        :alt: Carbon Emissions (Last run)

.. |carbon-average| image:: https://api.green-coding.io/v1/ci/badge/get?repo=Ouranosinc/xclim&branch=main&workflow=5828641&mode=avg&duration_days=90&metric=carbon
        :target: https://metrics.green-coding.io/ci.html?repo=Ouranosinc/xclim&branch=main&workflow=5828641
        :alt: Carbon Emissions (Last 90 days moving average)

