Repository for the climextRemes R and Python package for extreme value analysis of climate data, including generalized extreme value and peaks-over-threshold (using the point process approach) models, as well as tools for estimating risk ratios with uncertainty.

Many of the methods are discussed in Paciorek, Stone and Wehner (

Note that we have not fully tested climextRemes in Python 2, though we don't anticipate any problems.

Thanks to Hari Krishnan of Lawrence Berkeley National Laboratory for extensive help in porting the package for use in Python.

Development of this software was supported by the Director, Office of Science, Office of Biological and Environmental Research of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231 as part of their Regional & Global Climate Modeling (RGCM) Program within the Calibrated And Systematic Characterization Attribution and Detection of Extremes Scientific Focus Area (CASCADE SFA).


climextRemes is distributed as an R package through CRAN and as a Python package for the Anaconda distribution of Python through the CASCADE channel (conda install -c cascade climextremes). The Python package merely wraps the core functionality in the R package.

To install climextRemes from this repository, follow these instructions.

For Python (first install the R package, either from CRAN or per instructions below). These instructions should work on in a Linux or MacOS terminal; Windows users may need to make some modifications.

pip install rpy2
git clone
cd climextRemes/climextRemes/inst/python_wrapper

# install to default package location:
python install

# alternatively, install to user-specified location:
PYTHONVERSION=python3.5  # modify as needed
mkdir -p ${INSTALLDIR}/lib/${PYTHONVERSION}/site-packages
python install --prefix=${INSTALLDIR}

To use climextRemes in Python (note the lower-case 'r'):

import climextremes

For R:

VERSION=0.2.0 # modify as needed
Rscript -e "install.packages(c('extRemes', 'ncdf4'))"
git clone
R CMD build climextRemes
# install to default package location
R CMD INSTALL climextRemes_${VERSION}.tar.gz
# alternatively, install to user-specified location
R CMD INSTALL --library=/tmp/foo climextRemes_${VERSION}.tar.gz