You are here

Python Climate Indices

Download Software

Climate indices for everyone

Code developed by NIDIS for calculating various climate indices, which provide a geographical and temporal picture of the severity of precipitation and temperature anomalies.


  • Palmer Drought Indicies (PDSI, scPDSI, Z-Index, PHDI)
  • Standardized Precipitation Index (SPI)
  • Standardised Precipitation-Evapotranspiration Index (SPEI)
  • Potential EvapoTranspiration (PET)
  • Percentage of Normal Precipitation (PNP)

Written in Python these modules can be used to compute indices corresponding to a specified climatological dataset (i.e. temperature and precipitation).

The base unit of computation is the time series of values for a location, and currently supported location types are grid cells and climate divisions.

Example processing scripts are included using NetCDF as the input/output format.

Processing parameters available include calibration period, month scales (for SPI, SPEI, and PNP), and choice of distribution fittings (gamma or Pearson III).