Skip to content

climate-service-center/index_calculator

Repository files navigation

Calculate climate indicators with standardized project-specific attributes: index_calculator

Versions Python Package Index Build Supported Python Versions
Documentation and Support Documentation Status
Open Source License DOI
Coding Standards Python Black Ruff pre-commit.ci status Open Source Security Foundation FOSSA
Development Status Project Status: Active – The project has reached a stable, usable state and is being actively developed. Build Status 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:

pip install index_calculator

If you want to contribute, we recommend cloning the repository, setup a conda environmant and installing the package in development mode, e.g.

git clone https://github.com/ludwiglierhammer/index_calculator
cd index_calculator
conda env create -f ci/requirements/environment.yml
conda activate xcalc-tests
pip install -e . --no-deps

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
  • xclim
  • numpy
  • pandas
  • xarray
  • cf_xarray
  • cftime

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.