Skip to main content

Python index-calculator is an xclim wrapperto calculate climate indices from CMORized netCDF files.

Project description

index_calculator

https://github.com/ludwiglierhammer/index_calculator/actions/workflows/ci.yml/badge.svg https://codecov.io/gh/ludwiglierhammer/index_calculator/branch/master/graph/badge.svg https://img.shields.io/pypi/v/index_calculator.svg Documentation Status pre-commit.ci status

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

Features

  • Calculate climate indices via xclim.

  • Write standardized netCDF attributes.

  • Write on disk with a project-specific output file name.

Installation

You can install the package directly with pip:

pip install index_calculator

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

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 PYTHONPATH

Requirements

  • python3.6 or higher

  • numpy

  • pandas

  • xarray

  • xclim

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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

index_calculator-0.6.3.tar.gz (14.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

index_calculator-0.6.3-py3-none-any.whl (14.7 MB view details)

Uploaded Python 3

File details

Details for the file index_calculator-0.6.3.tar.gz.

File metadata

  • Download URL: index_calculator-0.6.3.tar.gz
  • Upload date:
  • Size: 14.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.0

File hashes

Hashes for index_calculator-0.6.3.tar.gz
Algorithm Hash digest
SHA256 ee05ddfb37916d63f19e11a714dc1ebf24201f6b1b156552238a90e3f60e56af
MD5 6bbe11ddb6404880a79a84936849da15
BLAKE2b-256 8c4f8dca27d931ec964e1eca1fab769462f92b943805637fdec44cbcf8c08be9

See more details on using hashes here.

File details

Details for the file index_calculator-0.6.3-py3-none-any.whl.

File metadata

File hashes

Hashes for index_calculator-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 091f5e4e3435ebcc74613b00a2efdd5f057bca0ae404a69f36f81d8cd2684743
MD5 5df59d6a89d3c6ab4fdaa19b373c9678
BLAKE2b-256 778e6259eec7a5da6cd155c8e7d74020020a00b65f4eae013d6d5666250f2047

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page