Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Land extremes: the tail and how warming moves it

GeoStack · application · 3 December 2026

Abstract

Heat and rain extremes at stations: their return levels as fields over space, how those move with warming, and how much warming made one event more likely. The running example is daily maximum temperature at Spanish stations, 1896 to 2026.

describemathax
fitinferax, pyrox
physicsGeoNumerics
dataGeoStack (geotoolz)
assembleGeoModels
orchestratepipekit
dashed, numbered: off the shelf the lens expects, or no library yet
Dhanded to the data-engineering lens
Phas a probabilistic-numerics counterpart

The question and the data

How hot can a summer day get at a place, how sure are we, and how has that moved as the climate warmed? The mean is useless here: the tail is the product.

One station · daily Tx · illustrative

An illustrative six-year record of daily maximum temperature: a seasonal cycle with noise, a dashed threshold, each year's maximum in purple and every day above the threshold in green.

threshold uu

year 1year 6

Block maximaone per year→ GEV(μ,σ,ξ)\mathrm{GEV}(\mu, \sigma, \xi)temporal_block_maxima

Exceedancesevery day above uu→ rate ρu\rho_u, GPD(σu,ξ)\mathrm{GPD}(\sigma_u, \xi)decluster_runs

One tail, one ξ\xiL4a point process in (time, value)→ return level yRy_R

Two ways to keep the tail of a record: six maxima, or every day over a threshold. Both estimate the same shape ξ\xi, because both are views of one point process.

The data are daily maximum temperatures (Tx) at land stations. The curriculum in pyrox-xtreme runs on the real Copernicus record over Spain, and so does every number on this page:

SourceCopernicus CDS, in-situ surface land observations, through xrproducts CDSInsituArchive
Record198 Spanish stations, 6.8 million daily values, 1896 to 2026
Used107 stations with long records: 23 to 120 years each, 49% of the 107 × 125 station-years observed
Covariateselevation, distance to the coast and slope per station, built once
Running exampleAlbacete (1.86° W, 38.95° N): 115 annual maxima from 1901 to 2025, 35.0 to 45.0 °C

A daily record says almost nothing about its tail directly. The first step is to keep only the part that does: one maximum per year, or every day above a high threshold. The figure shows both on an illustrative record, and the next section shows why they estimate the same thing.

Three arrows, no L3

Stations are points, and the spatial GEV maps them straight to a field, so the grid step is part of the L4 model.

TransitionCardWhat is estimatedIn the stack
L1 → L2 extractpart of lnd.tx.extremesannual maxima, or declustered exceedances, per stationpyrox_xtreme.extraction (temporal_block_maxima, decluster_runs, estimate_extremal_index)
L2 → L4 maplnd.tx.extremes, lnd.precip.potGEV parameters as fields over space, shifting with time or warmingpyrox_xtreme (GeneralizedExtremeValueDistribution, assemble_nonstationary_gev_fields); GP fields from pyrox-gp; NUTS
L4 → L5 derivelnd.tx.derivereturn-level change per °C; the probability ratio of an observed eventpyrox_xtreme (nonstationary_return_level, nonstationary_return_period)

One tail, three views

Extreme-value theory gives the tail a fixed form whatever the parent distribution. Block maxima, threshold exceedances and the point process are three ways to fit it, and they share their parameters.

Block maxima: the GEV

Let ymax,b,jy_{\text{max},b,j} be the maximum at station jj in year bb. For long enough blocks it follows a generalised extreme value distribution with location μ\mu, scale σ>0\sigma > 0 and shape ξ\xi; ξ<0\xi < 0 bounds the tail (heat), ξ>0\xi > 0 makes it heavy (rain):

F(y;μ,σ,ξ)=exp⁡{−[1+ξy−μσ]+−1/ξ}F(y; \mu, \sigma, \xi) = \exp\left\{ -\left[ 1 + \xi \frac{y - \mu}{\sigma} \right]_+^{-1/\xi} \right\}

The RR-year return level yRy_R is the value exceeded with probability 1/R1/R in a year:

yR=μ−σξ[1−(−log⁡(1−1R))−ξ]y_R = \mu - \frac{\sigma}{\xi} \left[ 1 - \left( -\log\left(1 - \frac{1}{R}\right) \right)^{-\xi} \right]

Threshold exceedances: a rate and a GPD

Keeping every day above a high threshold uu uses more of the record. Exceedances arrive at a rate ρu\rho_u per year, and their excesses y−uy - u follow a generalised Pareto distribution with scale σu=σ+ξ(u−μ)\sigma_u = \sigma + \xi (u - \mu) and the same ξ\xi:

P(y−u>v∣y>u)=[1+ξvσu]+−1/ξ, yR=u+σuξ[(Rρu)ξ−1]\mathbb{P}(y - u > v \mid y > u) = \left[ 1 + \frac{\xi v}{\sigma_u} \right]_+^{-1/\xi}, \text{ } y_R = u + \frac{\sigma_u}{\xi} \left[ (R \rho_u)^{\xi} - 1 \right]

Here yy, μ\mu, uu, vv and yRy_R are real numbers in °C, σ,σu>0\sigma, \sigma_u > 0 are in °C too, ξ∈R\xi \in \mathbb{R} has no units, RR is in years and ρu\rho_u is in yr−1\mathrm{yr^{-1}}.

Hot days come in spells, so exceedances are declustered first (decluster_runs) or counted with the extremal index (estimate_extremal_index); otherwise the rate counts one heatwave several times.

The point process that holds both

The points (ti,yi)(t_i, y_i) with yi>uy_i > u form a Poisson process on time × value. Its expected count in a box, tt in years, is

Λ([t1,t2]×[y,∞))=(t2−t1)[1+ξy−μσ]+−1/ξ\Lambda\left([t_1, t_2] \times [y, \infty)\right) = (t_2 - t_1) \left[ 1 + \xi \frac{y - \mu}{\sigma} \right]_+^{-1/\xi}

The chance of no point above yy in one year is exp⁡(−Λ)\exp(-\Lambda), which is the GEV above; the conditional law of a point’s excess over uu is the GPD. This is the same object as the persistence model of Trace Sources: a ground rate in time, a size for each event, and a sieve that keeps only some. There the sieve is a satellite’s detection curve; here it is the threshold, Pd(y)=1[y>u]P_d(y) = \mathbf{1}[y > u].

Letting the tail move

Non-stationarity puts a covariate x(t)x(t) in the location, with tt the year: the calendar year itself in the tutorials, or the global-mean temperature anomaly G(t)G(t) for attribution. With σ\sigma and ξ\xi fixed, every return level shifts one for one with μ\mu:

μ(t)=μ0+μ1x(t), ∂yR∂x=μ1 for every R\mu(t) = \mu_0 + \mu_1 x(t), \text{ } \frac{\partial y_R}{\partial x} = \mu_1 \text{ for every } R

Attribution compares two worlds. For an observed maximum yobsy_\text{obs}, the probability ratio is its exceedance probability under today’s covariate xnowx_\text{now} over that under a reference one, xrefx_\text{ref}:

PR=1−F(yobs;xnow)1−F(yobs;xref)\mathrm{PR} = \frac{1 - F(y_\text{obs}; x_\text{now})}{1 - F(y_\text{obs}; x_\text{ref})}

Albacete, 1901 to 2025

The running example: the longest record in the set, fitted with a linear trend in the location by NUTS (tutorial 10).

Posterior medians from the linear-trend GEV of tutorial 10 on the real record. The curve moves up by about 1.4 °C at every return period, so the same heat is roughly four times as likely.

Figure 1:Posterior medians from the linear-trend GEV of tutorial 10 on the real record. The curve moves up by about 1.4 °C at every return period, so the same heat is roughly four times as likely.

QuantityPosterior [95% interval unless noted]
Warming of the location μ\mu+0.115 °C per decade [+0.026, +0.202]; +1.43 °C over 1901–2025 [+0.32, +2.50]
P(μ1>0∣data)\mathbb{P}(\mu_1 > 0 \mid \text{data})0.994
Shape ξ\xi−0.09, 90% interval [−0.16, −0.01]: a bounded upper tail, as expected for temperature
Model choiceWAIC 443.2 against 447.9 for the stationary fit; a trend in σ\sigma as well does not help (its slope straddles 0)
100-year level43.0 °C under the 1901 climate, 44.4 °C under 2025’s: +1.4 °C, the same shift at R=10R = 10 and R=200R = 200
1901’s 100-year day todayabout once in 26 years

The shift is the same at every return period, as the model says it must be when only μ\mu moves. The probability ratio between the two climates for 1901’s 100-year day is about 100/26≈4100 / 26 \approx 4. It is a trend in the calendar, not yet an attribution: the covariate is the year, not the warming, and the attribution card swaps one for the other.

The stack

Land extremes owns no assemble library: the model is short enough to live in the fit shelf.

StepLibrariesShelf
Station dataxrproducts (CDSInsituArchive, StationCollection)data
Extractionpyrox_xtreme.extraction: block maxima, r-largest, thresholds, declustering, extremal indexfit
Distributionspyrox_xtreme: GEV and its three types, GPD, their return levels and periods, stationary or notfit
Spatial fieldspyrox-gp, kernellib; a two-range Gaussian copula, two_range_correlationfit
Trends in timeassemble_nonstationary_gev_fields; diffrax for the energy-balance trend; Markov GPs from pyrox-gpfit
Point processespyrox_xtreme.point_processes (TemporalDomain, EventHistory, integrate_log_intensity)fit
Synthetic truthpyrox_xtreme.simulations (simulate_temp_extremes, simulate_precip_extremes, generate_physical_gmst)fit
Benchmarkpipekit-evaluateorch

The ladder of complexity

Each axis climbs on its own, and the rung below is the reference for the one above. The space axis is already climbed on real data.

The space axis · 107 Spanish stations

One stationnb 02120 maxima near Zaragozay100y_{100} 43.4 °C [42.1, 46.0]

pool nothing

Every station, alonenb 04107 stations, NUTS or Laplacey100y_{100} interval 3.9 °C wide on average

pool partly

Hierarchical poolingnb 05stations share hyperpriorsinterval 2.3 °C wide: 40% narrower

pool by distance

A GP field for μ(s)\mu(\vect{s})nb 07neighbours share a locationa smooth map of the typical maximum

add a covariate

GP fields for μ\mu, σ\sigmanb 08log⁡σ\log \sigma on elevation and coastσ\sigma smaller high up and inland

free the tail

GP fields for μ\mu, σ\sigma, ξ\xinb 09the shape set free tooξ(s)\xi(\vect{s}) signal to noise 0.14: no map

Each rung adds one idea and is checked against the one below. Pooling buys the most; the last rung shows where the data stops.

The space axis, on real data

Every axis

AxisSimplestRungs aboveIn the stackStatus
What is kept of the recordannual maximathe r largest per year; declustered exceedances over a threshold; every exceedance as a point processtemporal_block_maxima, r_largest_block_maxima, quantile_threshold, decluster_runs, estimate_extremal_indexlanded; open a point-process likelihood in GEV parameters
Timestationarya linear trend in the year (Coles); a forced energy-balance ODE inside NUTS; a state-space GP trend; the trend on global-mean warming instead of the calendarassemble_nonstationary_gev_fields; diffrax; Markov GPs; generate_physical_gmstlanded tutorials 10–12, one station; open an observed G(t)G(t) series
Space: the marginsone stationevery station alone; hierarchical pooling; GP fields for μ\mu, then σ\sigma with covariates, then ξ\xipyrox-gp, kernelliblanded tutorials 04–09
Space: the dependencestations independent given the fieldsa Gaussian copula with two ranges; max-stable or r-Pareto processes for extremes that happen togethertwo_range_correlationpartial the copula; open max-stable
Space and time togethertrend at one station, fields with no trendμ0(s)+μ1(s)x(t)\mu_0(\vect{s}) + \mu_1(\vect{s}) x(t): fields that move, the model of the first cardassemble_nonstationary_gev_fieldspartial the primitive; open a tutorial on real data
The variabledaily maximum temperature, ξ<0\xi < 0precipitation, ξ>0\xi > 0 and scaled by Clausius–Clapeyron; wind gusts; compound heat and droughtsimulate_precip_extremes, simulate_wind_extremes, FrechetType2GEVDpartial synthetic only; open compound events
InferenceNUTSLaplace; mean-field VI; an amortized set encoder from station maxima to fieldsnumpyro; pyroxlanded NUTS, Laplace, VI; open the encoder

The cycle on every tier

TierForward model1 · Model2 · Inference3 · Emulator4 · Emulator inference5 · Amortized
I · Stationary GEViid block maximaexistsNUTS; Laplaceskippednoneopen
II · Non-stationary GEVμ\mu shifts with x(t)x(t)existsNUTS, with linear, ODE and state-space trendsskippednoneopen
III · Spatial GEVμ0(s)\mu_0(\vect{s}), μ1(s)\mu_1(\vect{s}) as GP fieldsexistsNUTS and mean-field VI with GP fieldsintensity-integral emulatoropenset encoder
IV · Point processa marked spatio-temporal processgenericNUTSopenopenopen

The suite: three cards

CardTransitionSynthetic truth → oracleReal-data trackHeadline scoresStatus
lnd.tx.extremesL2 → L4simulate_temp_extremes → NUTS over the spatial GEVCDS in-situ stations over Spain, years held out in blocksreturn-level coverage, threshold-weighted CRPS4b
lnd.tx.deriveL4 → L5return-level change at a known warming shiftheld-out recent decadeserror at x+Δxx + \Delta x; coverage of the change per °Ccard
lnd.precip.potL2 → L4a point process → NUTSstation networks, one network held out at a timetime-rescaling KS; POD and FAR; Clausius–Clapeyron scalingcard

The first card: lnd.tx.extremes

With a synthetic truth the maxima are drawn from known μ0\mu_0, μ1\mu_1, σ\sigma and ξ\xi, so the oracle is NUTS on the true model and the fast rungs (quantile regression, Laplace, an amortized set encoder) are scored against it. With real data there is no truth: years are held out in blocks, and the scores are the threshold-weighted CRPS and the coverage of withheld maxima by the predicted return-level interval. The floor is a stationary GEV per station; the bar is the hierarchical fit, which the tutorials show is already 40% sharper.

Sketch

A code sketch of the first card, lnd.tx.extremes, on the real record: the names marked today exist; the arguments are sketched. Nothing here runs yet.

import numpyro
from pyrox_xtreme import (
    GeneralizedExtremeValueDistribution,
    assemble_nonstationary_gev_fields,
    nonstationary_return_level,
)
from pyrox_xtreme.extraction import temporal_block_maxima
from xrproducts import CDSInsituArchive

# Shapes: J = 107 stations; Y = 125 years; S = 1,000 posterior draws

# today* (xrproducts)
# daily maximum temperature at every station
archive = CDSInsituArchive(root, preset="cds_insitu_land", time_aggregation="daily")
daily = archive.load()                                             # → (time, J)

# today* (pyrox_xtreme.extraction)
# y_max,b,j = max over year b of Tx_j(t)
maxima = temporal_block_maxima(daily, freq="YS")                   # (time, J) → (Y, J)

# user
def model(maxima, year):
    # μ₀(𝐬), μ₁(𝐬) ~ GP over the stations; log σ, ξ pooled
    mu0, mu1, log_sigma, xi = priors(stations)                     # (J,), (J,), (), ()
    # today* (pyrox_xtreme)
    # μ(𝐬, t) = μ₀(𝐬) + x(t) μ₁(𝐬), t the year of each block
    loc, scale, shape = assemble_nonstationary_gev_fields(
        mu0, mu1, log_sigma, xi, year
    )                                                              # → (Y, J) each
    # today (pyrox_xtreme)
    # y_max,b,j ~ GEV(μ(𝐬_j, t), σ, ξ), missing years masked
    gev = GeneralizedExtremeValueDistribution(loc, scale, shape)
    with numpyro.handlers.mask(mask=observed):
        numpyro.sample("z", gev, obs=maxima)

# today* (pyrox_xtreme)
# y_100(𝐬) under the 2025 covariate, draw by draw
levels = nonstationary_return_level(100.0, loc_2025, scale, shape)  # → (S, J)

Gaps

Where it doesn’t fit