Metadata-Version: 2.4
Name: xsdba
Version: 0.7.0
Summary: Statistical correction and bias adjustment tools for xarray.
Keywords: xsdba,bias adjustment,statistics,statistical downscaling,xarray,xclim
Author-email: Éric Dupuis <dupuis.eric@ouranos.ca>, Pascal Bourgault <bourgault.pascal@ouranos.ca>
Maintainer-email: Éric Dupuis <dupuis.eric@ouranos.ca>, Trevor James Smith <smith.trevorj@ouranos.ca>
Requires-Python: >=3.10.0
Description-Content-Type: text/x-rst
License-Expression: Apache-2.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
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 :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Typing :: Typed
License-File: LICENSE
Requires-Dist: boltons >=20.1
Requires-Dist: bottleneck >=1.3.1
Requires-Dist: cf_xarray>=0.10.0
Requires-Dist: cftime >=1.4.1
Requires-Dist: dask[array] >=2024.8.1
Requires-Dist: filelock >=3.14.0
Requires-Dist: jsonpickle >=3.1.0
Requires-Dist: matplotlib >=3.8.0
Requires-Dist: numba >=0.58.1
Requires-Dist: numpy >=1.26.0
Requires-Dist: packaging
Requires-Dist: pandas >=2.2.0
Requires-Dist: pint>=0.24.4
Requires-Dist: rich >=13.7.0
Requires-Dist: scipy >=1.11.0
Requires-Dist: statsmodels >=0.14.2
Requires-Dist: typer >=0.24.1
Requires-Dist: xarray >=2023.11.0
Requires-Dist: xsdba[extras] ; extra == "all"
Requires-Dist: xsdba[sbck] ; extra == "all"
Requires-Dist: fastnanquantile >=0.0.2 ; extra == "extras"
Requires-Dist: POT >=0.9.4 ; extra == "extras"
Requires-Dist: xclim >=0.56.0 ; extra == "extras"
Requires-Dist: sbck >=1.4.2 ; extra == "sbck"
Project-URL: About Ouranos, https://ouranos.ca/en/
Project-URL: Changelog, https://xsdba.readthedocs.io/en/stable/changelog.html
Project-URL: Homepage, https://xsdba.readthedocs.io/
Project-URL: Issue tracker, https://github.com/Ouranosinc/xsdba/issues
Project-URL: Source, https://github.com/Ouranosinc/xsdba
Provides-Extra: all
Provides-Extra: extras
Provides-Extra: sbck

==========================================================
xsdba: Statistical Downscaling and Bias Adjustment library
==========================================================

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

Statistical correction and bias adjustment tools for xarray.

* Free software: Apache Software License 2.0
* Documentation: https://xsdba.readthedocs.io.

Features
--------

* The `xsdba` submodule provides a collection of bias-adjustment methods meant to correct for systematic biases found in climate model simulations relative to observations.
  Almost all adjustment algorithms conform to the `train` - `adjust` scheme, meaning that adjustment factors are first estimated on training data sets, then applied in a distinct step to the data to be adjusted.
  Given a reference time series (`ref`), historical simulations (`hist`) and simulations to be adjusted (`sim`), any bias-adjustment method would be applied by first estimating the adjustment factors between the historical simulation and the observation series, and then applying these factors to `sim``, which could be a future simulation:

* Time grouping (months, day of year, season) can be done within bias adjustment methods.

* Properties and measures utilities can be used to assess the quality of adjustments.

Quick Install
-------------
`xsdba` can be installed from PyPI:

.. code-block:: shell

    $ pip install xsdba

Documentation
-------------
The official documentation is at https://xsdba.readthedocs.io/

How to make the most of `xsdba`: `Basic Usage Examples`_ and `In-Depth Examples`_.

`xsdba` was first developed as the submodule `sdba` of `xclim`_. A `migration guide`_  is available for users of `sdba`.

.. _Basic Usage Examples: https://xsdba.readthedocs.io/en/latest/notebooks/example.html
.. _In-Depth Examples: https://xsdba.readthedocs.io/en/latest/notebooks/advanced_example.html
.. _xclim: https://xclim.readthedocs.io/
.. _migration guide: https://xsdba.readthedocs.io/en/stable/xclim_migration_guide.html

Acknowledgments
---------------

`xsdba` development is funded through `Ouranos`_, a not-for-profit collaborative innovation organization fostering resilient adaptation to climate change, based in Québec, Canada.

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

|ouranos-dark| |ouranos-light|

This package was created with Cookiecutter_ and the `Ouranosinc/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/cookiecutter/cookiecutter
.. _Ouranos: https://www.ouranos.ca/en
.. _Ouranosinc/cookiecutter-pypackage: https://github.com/Ouranosinc/cookiecutter-pypackage

.. |build| image:: https://github.com/Ouranosinc/xsdba/actions/workflows/main.yml/badge.svg
        :target: https://github.com/Ouranosinc/xsdba/actions
        :alt: Build Status

.. |conda| image:: https://img.shields.io/conda/vn/conda-forge/xsdba.svg
        :target: https://anaconda.org/conda-forge/xsdba
        :alt: Conda-forge Build Version

.. |coveralls| image:: https://coveralls.io/repos/github/Ouranosinc/xsdba/badge.svg
        :target: https://coveralls.io/github/Ouranosinc/xsdba
        :alt: Coveralls

.. |docs| image:: https://readthedocs.org/projects/xsdba/badge/?version=latest
        :target: https://xsdba.readthedocs.io/en/latest/?version=latest
        :alt: Documentation Status

.. |license| image:: https://img.shields.io/github/license/Ouranosinc/xsdba.svg
        :target: https://github.com/Ouranosinc/xsdba/blob/main/LICENSE
        :alt: License

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

.. |ossf-score| image:: https://api.securityscorecards.dev/projects/github.com/Ouranosinc/xsdba/badge
        :target: https://securityscorecards.dev/viewer/?uri=github.com/Ouranosinc/xsdba
        :alt: OpenSSF Scorecard

.. |pre-commit-ci| image:: https://results.pre-commit.ci/badge/github/Ouranosinc/xsdba/main.svg
        :target: https://results.pre-commit.ci/latest/github/Ouranosinc/xsdba/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

.. |pypi| image:: https://img.shields.io/pypi/v/xsdba.svg
        :target: https://pypi.python.org/pypi/xsdba
        :alt: PyPI

.. |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/xsdba.svg
        :target: https://pypi.python.org/pypi/xsdba
        :alt: Supported Python Versions

.. |zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.14983948.svg
        :target: https://doi.org/10.5281/zenodo.14983948
        :alt: DOI

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

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

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

.. Ouranos Logos

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

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

