Note: The TENAX methodology was developed and published by Marra et al. (2024). A MATLAB reference implementation is available on Zenodo (DOI: 10.5281/zenodo.8332232). This Python package is a collaborative project — full details in the documentation.
About
pyTENAX is a Python implementation of the TENAX model — a non-stationary, non-asymptotic statistical framework for estimating extreme sub-hourly precipitation return levels using temperature as a covariate, grounded in Clausius–Clapeyron physics.
I am the main maintainer of this repository. Beyond the core implementation, I built the full ReadTheDocs documentation including background theory, API reference, and Jupyter notebook tutorials. The package also includes a SMEV (Simplified Metastatistical Extreme Value) class and a Weibull tail hypothesis test.
How It Works
The model integrates three components to estimate return levels:
1. Magnitude Model W(x; T)
A left-censored Weibull distribution characterizes precipitation event intensities at temperature T. The scale parameter follows exponential Clausius–Clapeyron dependence: λ(T) = λ₀·eaT. The shape parameter κ(T) = κ₀ + bT captures how scaling varies across quantiles.
2. Temperature Model g(T)
A generalized Gaussian distribution (β=4) fitted to temperatures preceding peak intensities, estimated via maximum likelihood.
3. Return Level Estimation
The marginal distribution F(x) = ∫W(x; T)·g(T)dT is computed by Monte Carlo integration, producing return level curves with bootstrap uncertainty.
For the full API reference and step-by-step tutorials, see the documentation.
Methodology Citation
Marra, F., Koukoula, M., Canale, A., and Peleg, N. (2024).
Predicting extreme sub-hourly precipitation intensification based on temperature shifts.
Hydrology and Earth System Sciences, 28, 375–389.
https://doi.org/10.5194/hess-28-375-2024