Skip to main content

Package for calculating meteorological indices

Project description

DDC Meteorological Indices

This is the Danube Data Cube Meteorological Indices library, a python implementation for calculating common meteorological indices, utilizing data cubes.

The following indices are available:

  • SPI, Standardized Precipitation Index, utilizing both gamma and Pearson Type III distributions
  • SPEI, Standardized Precipitation Evapotranspiration Index, utilizing both gamma and Pearson Type III distributions
  • PDSI, Palmer Drought Severity Index
  • PNI, Percentage of Normal Precipitation Index

Installation

$ pip install ddc-indices

Example

$ python

# Calculating the Standardized Precipitation Index (SPI)
>>> import xarray as xr
>>> from ddc_indices import DdcIndices
>>> from ddc_indices import SpiConfig

# import my dataset containing precipitation data
>>> dataset = xr.open_zarr('path_to_zarr')
>>> config = SpiConfig(variables={'prec': 'prec'}, periodicity='daily')
>>> spi = DdcIndices().initialize(dataset, config)
>>> spi.compute()
>>> spi.index

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

ddc-indices-0.5.2.tar.gz (18.5 kB view hashes)

Uploaded Source

Built Distribution

ddc_indices-0.5.2-py3-none-any.whl (21.1 kB view hashes)

Uploaded Python 3

Supported by

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