What You'll Learn
- 1Map machine learning tasks onto the places in a modelling chain where they actually pay off
- 2Fit a pattern scaling emulator and evaluate it on a scenario it never saw
- 3Explain why random train and test splits leak skill in climate fields
- 4Implement latitude weighted RMSE and anomaly correlation correctly
Where ML Fits in the Chain
Machine learning is not a substitute for a climate model; it is a substitute for the expensive parts of one. The four places it earns its keep are emulation, where a cheap network replaces an expensive general circulation model for large ensembles; downscaling, where a statistical map moves coarse output to station or city scale; parameterisation, where a network replaces a subgrid scheme such as convection or cloud microphysics; and detection, where a classifier finds storms, heat domes, or atmospheric rivers in archives too large to read by hand.
Each task has a different tolerance for error. Emulation for sensitivity analysis can tolerate a few tenths of a degree of bias because the question is relative. Downscaling for impact modelling cannot, because the tail of the distribution is the product. Parameterisation replacement sits inside a dynamical core and must conserve mass and energy to machine precision, which rules out most off the shelf architectures. A useful first question is therefore not which model to use, but what conservation and extrapolation properties the task demands.
| Task | Physics baseline | Common ML approach | Characteristic failure |
|---|---|---|---|
| Global emulator | Full GCM | Pattern scaling, neural network on forcing | Fails on scenarios outside the training range |
| Statistical downscaling | Dynamical downscaling | Quantile mapping, U-Net, generative networks | Trains on a single climate, breaks under change |
| Subgrid parameterisation | Tuned scheme in a dynamical core | Differentiable networks, neural operators | Conserves nothing unless constrained |
| Event detection | Thresholding on reanalysis | CNN or transformer classifiers | Label bias from the detector used to build labels |
| Post-processing | Model output at a point | EMOS, quantile regression, ensembles | Overfits short verification records |
Emulators and Pattern Scaling
The simplest emulator that works is pattern scaling: each grid cell's response is a fixed spatial pattern multiplied by a global mean quantity, usually global mean temperature or cumulative emissions.
The per-cell coefficient comes from ordinary least squares on training scenarios, and the residual is what the method cannot explain, which for temperature is small and for precipitation is not. More expressive emulators add a second predictor such as the gradient of warming, a low dimensional compression by empirical orthogonal functions, or a convolutional network that sees the large scale state.
ClimateBench is the standard benchmark for this comparison. It packages CMIP6 output from four models across the historical run and three single forcing experiments, with area weighted RMSE, zonal mean error, and annual mean error as the scoring rules, and linear regression and pattern scaling as the baselines. Any claimed improvement should be measured against those baselines rather than against the raw GCM, because beating pattern scaling on surface temperature is easy and beating it on precipitation at the global scale is not.
Downscaling
Statistical downscaling learns a conditional distribution from coarse predictors to a fine target, and the method you pick depends on whether you need a deterministic value or a plausible field. Quantile delta mapping preserves the change in quantiles relative to the training period and is the workhorse for station data. Bias correction plus spatial disaggregation corrects the distribution then interpolates the pattern. Generative models, including conditional Wasserstein GANs and diffusion models, go further and synthesise fields with realistic spatial texture, which matters when the impact model needs coherent precipitation patches rather than per pixel values.
The open problem is the assumption of stationarity. A network trained on 1980 to 2010 learns a relationship between the coarse state and the fine state that was formed under one climate, and applying it to a world two degrees warmer is extrapolation. The standard safeguards are to train on a large model world that already contains a wider range of climates, to evaluate on the most recent period as a pseudo future test, and to carry the residual spread as an uncertainty rather than reporting a single downscaled number.
Replacing Subgrid Physics
Convection, turbulence, and cloud microphysics are the parameterisations with the largest structural uncertainty, and they are also the parts that most reward machine learning because they are expensive and poorly constrained. Two research directions dominate. The first trains a network to mimic an existing high resolution simulation and then nests it inside a coarse dynamical core, which gives a fast proxy for a scheme you already trust. The second makes the whole core differentiable so that the parameters of a learned scheme can be optimised against observations by gradient descent.
Results worth knowing: hybrid machine learning augmented solvers have been shown to integrate an idealised general circulation model roughly a thousand times faster than a research dynamical core while reaching comparable forecast skill, after training on decades of high resolution simulations. The same papers are explicit about the caveats, which are that the learned component extrapolates badly outside its training distribution and that conservation has to be imposed by construction, for example by predicting a flux that the core then applies rather than predicting a state directly.
Evaluation Without Leakage
Climate fields are autocorrelated in space and in time, so a random split leaks. If January 1985 is in the training set and January 1986 is in the test set, the model can score well by remembering last winter rather than by learning a mapping. The fixes are standard and non-negotiable: block by year, block by ensemble member, and hold out an entire scenario, for example training on historical plus a mid range pathway and testing on a high forcing pathway.
The second evaluation problem is the baseline. A model that beats nothing is not a result, so every skill claim needs a physics reference: the persistence forecast, the climatology, the linear trend, and the pattern scaling emulator. The third is the metric. Global mean RMSE hides regional failure, so use latitude weighted RMSE, anomaly correlation, and for probabilistic output the continuous ranked probability score, and report them per season and per region.
Two Implementations
The first is the scoring toolkit every climate ML paper needs, implemented directly.
import numpy as np
def lat_weights(lat_deg):
"""Cosine latitude weights, normalised to mean one."""
w = np.cos(np.deg2rad(np.asarray(lat_deg, dtype=float)))
return w / w.mean()
def weighted_rmse(pred, obs, lat):
"""Area weighted RMSE over the latitude axis of a (time, lat, lon) field."""
w = lat_weights(lat)[:, None]
return float(np.sqrt(np.average((pred - obs) ** 2, weights=w)))
def anomaly_corr(pred, obs, lat):
"""Correlation of anomalies after removing the seasonal and mean state."""
w = lat_weights(lat)[:, None]
def anom(x):
clim = x.reshape(-1, 12, x.shape[1], x.shape[2]).mean(axis=0)
return x - np.tile(clim[None], (x.shape[0] // 12, 1, 1, 1))
a, b = anom(pred).ravel(), anom(obs).ravel()
return float(np.corrcoef(a, b)[0, 1])
rng = np.random.default_rng(2)
lat = np.linspace(-80, 80, 21)
truth = rng.normal(0, 1, (120, lat.size, 40))
pred = truth + rng.normal(0, 0.4, truth.shape)
print("RMSE", round(weighted_rmse(pred, truth, lat), 3))
print("anomaly correlation", round(anomaly_corr(pred, truth, lat), 3))
The second fits a pattern scaling emulator, holds out a whole scenario, and compares against a linear in time baseline.
import numpy as np
def pattern_scaling(forcing, field):
"""Per-cell least squares of a (time, ncell) field onto a (time,) predictor."""
X = np.column_stack([np.ones(forcing.size), forcing])
return np.linalg.lstsq(X, field, rcond=None)[0]
def apply_scaling(beta, forcing):
return np.column_stack([np.ones(forcing.size), forcing]) @ beta
rng = np.random.default_rng(11)
years = np.arange(1980, 2101)
# Training scenarios: two emissions pathways, held out third
gmt_train = np.vstack([0.02 * (years - 1980), 0.03 * (years - 1980)])
land = 6000
pattern = rng.normal(1.0, 0.3, land) # regional sensitivity
train_field = (gmt_train[:, :, None] * pattern[None]).reshape(-1, land)
train_forcing = gmt_train.ravel()
beta = pattern_scaling(train_forcing, train_field)
gmt_test = 0.045 * (years - 1980) # warmer pathway, never seen
truth_test = gmt_test[:, None] * pattern[None]
pred_test = apply_scaling(beta, gmt_test)
base = np.tile(train_field.mean(axis=0), (years.size, 1))
rmse_ps = float(np.sqrt(np.mean((pred_test - truth_test) ** 2)))
rmse_clim = float(np.sqrt(np.mean((base - truth_test) ** 2)))
print("held-out RMSE, pattern scaling", round(rmse_ps, 3))
print("held-out RMSE, climatology ", round(rmse_clim, 3))
When Not to Use ML
Three situations argue against it. If the quantity is tightly constrained by conservation, use a physics solver and let ML tune parameters rather than predict states. If the deployment scenario lies outside the training range, no architecture choice fixes the extrapolation, so either widen the training set with a large ensemble or stay with a physical model whose response to forcing is imposed. And if the record you would train on is shorter than the variability you want to capture, you will fit noise: a 40 year verification record cannot calibrate a 10 parameter post-processing model without strong regularisation or pooling across stations.
The pragmatic pattern in operational practice is hybrid. Physics provides the dynamics and the conservation, machine learning provides the fast correction of known biases and the emulation of expensive components, and evaluation is blocked by design with the physics baseline reported alongside. That combination has already reached production in post-processing of precipitation forecasts and in the emulation of ice sheet and carbon cycle components, where the speedup buys ensembles that would otherwise be unaffordable.
Common Mistakes
Splitting a climate field dataset randomly
Fix: Block by year and hold out whole scenarios, since random splits leak through temporal autocorrelation.
Reporting skill against a climatology-free baseline
Fix: Always include pattern scaling and the linear trend as references, and report latitude weighted metrics rather than a global mean RMSE.
Letting a network predict a state inside a dynamical core
Fix: Predict a flux or a tendency that the core then applies, so mass and energy conservation survive the substitution.
Best Practices
- Hold out an entire scenario for the final evaluation
- Report latitude weighted RMSE, anomaly correlation, and CRPS by region
- Constrain learned schemes to be conservative by construction
- Publish the training range so readers can see the extrapolation risk
Key Takeaways
- ML earns its place where it replaces an expensive component: emulation, downscaling, parameterisation, and detection
- Pattern scaling is a strong baseline: per-cell regression on global mean temperature that most learned models must beat
- Random splits leak in autocorrelated fields, so block by year and hold out a scenario
- Learned schemes conserve nothing unless conservation is imposed by construction, usually by predicting tendencies or fluxes
Frequently Asked Questions
Is machine learning replacing climate models?
No. The dynamical core is still physics, and the expensive runs that generate training data are still general circulation models. What ML changes is the cost of the second tier: ensembles, sensitivity studies, downscaling, and long integrations that were previously unaffordable.
How do I know an emulator is safe for a scenario it never saw?
You check the overlap between the training range and the deployment range in every predictor, then evaluate on the warmest held out period available and report the error growth as a function of distance from the training distribution. If the deployment state is outside the training envelope, the emulator should be flagged rather than trusted.
Do neural networks improve precipitation forecasts?
In post-processing, consistently, because the main error is a systematic distributional bias that a quantile model can remove. As a substitute for a convection scheme, the answer is mixed: networks reproduce a scheme they were trained on, but beating a well tuned scheme on the same metrics is still rare outside idealised settings.
Interview Questions
Q1: Why does a random train test split inflate climate ML skill?
Adjacent times in an autocorrelated field share state, so the model sees nearly the same sample in both sets and appears to generalise when it is only remembering.
Q2: What is pattern scaling and why is it the baseline to beat?
It regresses each grid cell on a global mean predictor, and it captures most of the forced response of temperature with two parameters per cell, so a learned model must show clear improvement to justify its complexity.
Q3: How would you make a neural parameterisation conservative?
Have it predict a tendency or a flux that the dynamical core integrates, or parameterise a streamfunction, so that the discrete conservation properties of the core are preserved by construction.