Metadata-Version: 2.1
Name: index_calculator
Version: 0.7.0
Summary: Python index-calculator is an xclim wrapperto calculate climate indices from CMORized netCDF files.
Home-page: https://github.com/ludwiglierhammer/index_calculator
Author: Ludwig Lierhammer
Author-email: ludwig.lierhammer@hereon.de
License: MIT license
Keywords: index_calculator
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.6
License-File: LICENSE
License-File: AUTHORS.rst

============================================================================================
Calculate climate indicators with standardized project-specific attributes: index_calculator
============================================================================================

+----------------------------+-----------------------------------------------------+
| Versions                   | |pypi|                                              |
+----------------------------+-----------------------------------------------------+
| Documentation and Support  | |docs| |versions|                                   |
+----------------------------+-----------------------------------------------------+
| Open Source                | |license| |zenodo|                                  |
+----------------------------+-----------------------------------------------------+
| Coding Standards           | |black| |pre-commit|                                |
+----------------------------+-----------------------------------------------------+
| Development Status         | |status| |build| |coveralls|                        |
+----------------------------+-----------------------------------------------------+

Python index_calculator is an xclim wrapper to calculate climate indicators from CMORized netCDF files.

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

Features
--------
* Calculate climate indices via xclim.
* Write standardized netCDF attributes.
* Write on disk with a project-specific output file name.

Available projects
------------------
You can calculate climate indicators using index_calculator with the projects listed in the table below.

+--------------------+--------------+
| CMIP               | CMIP5, CMIP6 |
+--------------------+--------------+
| CORDEX             | CORDEX       |
+--------------------+--------------+
| Observational data | E-OBS, HYRAS |
+--------------------+--------------+
| Reanalysis data    | ERA5         |
+--------------------+--------------+

Installation
------------

You can install the package directly with pip:

.. code-block:: console

     pip install index_calculator

If you want to contribute, I recommend cloning the repository and installing the package in development mode, e.g.

.. code-block:: console

    git clone https://github.com/ludwiglierhammer/index_calculator
    cd index_calculator
    pip install -e .

This will install the package but you can still edit it and you don't need the package in your :code:`PYTHONPATH`


Requirements
------------

* python3.6 or higher

* xclim

* numpy

* pandas

* xarray

* cf_xarray

* cftime


Contact
-------
In cases of any problems, needs or wishes do not hesitate to contact:

ludwig.lierhammer@hereon.de

Credits
-------

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

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage

.. |pypi| image:: https://img.shields.io/pypi/v/index_calculator.svg
        :target: https://pypi.python.org/pypi/index_calculator
        :alt: Python Package Index Build

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

.. |versions| image:: https://img.shields.io/pypi/pyversions/index_calculator.svg
        :target: https://pypi.python.org/pypi/index_calculator
        :alt: Supported Python Versions

.. |license| image:: https://img.shields.io/github/license/ludwiglierhammer/index_calculator.svg
        :target: https://github.com/ludwiglierhammer/index_calculator/blob/master/LICENSE
        :alt: License

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
        :target: https://github.com/psf/black
        :alt: Python Black

.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/ludwiglierhammer/index_calculator/master.svg
   :target: https://results.pre-commit.ci/latest/github/ludwiglierhammer/index_calculator/master
   :alt: pre-commit.ci status

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

.. |build| image:: https://github.com/ludwiglierhammer/index_calculator/actions/workflows/ci.yml/badge.svg
        :target: https://github.com/ludwiglierhammer/index_calculator/actions/workflows/ci.yml
        :alt: Build Status

.. |coveralls| image:: https://codecov.io/gh/ludwiglierhammer/index_calculator/branch/master/graph/badge.svg
	:target: https://codecov.io/gh/ludwiglierhammer/index_calculator
	:alt: Coveralls

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


=======
History
=======

0.1.0 (2022-03-08)
------------------

* First release on PyPI.

0.2.0 (2022-07-07)
------------------

* documentation on readthedocs
* tests
* new cli arguments added

0.2.1 (2022-07-12)
------------------

* install data and tables via pip

0.3.0 (2022-07-19)
------------------

* new indices implemented

  * CD: number of cold and dry days
  * CHDYYx: Maximum number of consecutive heat days
  * CSDI: Cold spell duration index
  * CW: Number of cold and wet days
  * DTR: Mean of daily temperature range
  * GD: Number of growing degree days
  * GDYYx: Number of consecutive growing degree days
  * HD17: Number of heating degree days
  * PRCPTOT: Total precipitation amount
  * RDYYp: Number of wet days with precip over percentile
  * RYYpTOT: Precipitation fraction with precip over percentile
  * TG10p: Fraction of days with mean temperature under 10th percentile
  * TG90p: Fraction of days with mean temperature under 90th percentile
  * TX10p: Fraction of days with maximum temperature under 10th percentile
  * TX90p: Fraction of days with maximum temperature under 90th percentile
  * TN10p: Fraction of days with minimum temperature under 10th percentile
  * TN90p: Fraction of days with minimum temperature under 90th percentile
  * WD: Number of warm and dry days
  * WSDI: Warm spell duration index
  * WW: Number of warm and wet days

0.3.1 (2022-07-20)
------------------

* adjustments fro automatically project-specific outfile name generation

0.3.2 (2022-07-21)
------------------

* project-specific directory structure for cordex, cmip5 and cmip6

0.3.3 (2022-08-10)
------------------

* more documentation
* properties to classes
* classes automatically call functions

0.4.0 (2022-11-25)
------------------

* split output files into several files
* restructuring time encoding
* properties removed

0.5.0 (2023-01-04)
------------------

* new indices:
  * CSf (Number of cold spells)
  * HSf (Number of hot spells)
  * HSx (Maximum length of hot spells)
  * SD (Number od snow days)
  * SCD (Snow cover duration)
  * Sint (Snowfall intensity)
  * Sfreq (Snowfall freqeuncy)
  * UTCI (Universal Thermal Climate Index)

* add time bounds
* index-calculator version in DRS

0.5.1 (2023-01-23)
-------------------

* add grid mapping if necessary

0.5.2 (2023-02-07)
------------------

* add input format and component information to index_calculation.pjson

0.5.3 (2023-02-13)
------------------

* new projects E-OBS and ERA5 included

0.5.4 (2023-02-15)
------------------

* new project HYRAS
* ignore time-dependent data variables other than input variable

0.5.5 (2023-02-16)
------------------

* new index (WI): number of winter days (tas<-10°C)
* use pyhomogenize>=0.2.9
* write time and time_bnds to float

0.5.6 (2023-02-22)
------------------

* time controlling to pyhomogenize

0.6.0 (2023-03-03)
------------------

* new indices:
  * HW: maximum length of heat waves
  * GSS: start of growing season
  * GSE: end of growing season
  * FFS: start of frost-free season
  * FFE: end of frost-free season
  * RRm: mean daily precipitation
  * RRYYp: precipitation percentile value
* rename RYYp to RYYpABS and RDYYP to RYYp according to ICCLIM
* optional argument perc woth percentile indicators

0.6.1 (2023-03-09)
------------------

* some metadata corrections

0.6.2 (2023-03-10)
------------------

* component name adjusments with HYRAS

0.6.3 (2023-03-13)
------------------

* take coordinate attributes from input dataset

0.6.4 (2023-03-13)
------------------

* HYRAS file naming convention
* convert precip units from mm to mm day-1


0.6.5 (2023-03-16)
------------------

* rename variavle names to CF variable names
* metadata with SQI, CHDYY and CHDYYx

0.6.6 (2023-03-21)
------------------

* filter out small values before calculating precipitation percentiles
* raw percentile indicators (`RR95p`) has to time axis but a dayofyear axis

0.6.7 (2023-03-22)
------------------

* HYRAS file naming convention
* delete blanks from output file name
* calcualte indicators woth length of time axis is 1

0.7.0 (2023-03-22)
------------------

* published in zenodo
