Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Learning what the model gets wrong
Every forecast model leaves something out: clouds smaller than a grid box, turbulence, chemistry. Data assimilation produces, cycle after cycle, the best estimates of the real state, and the systematic gap between those estimates and what the model predicted is a record of the model’s mistakes. A machine learning model trained on that record can add the missing piece back, giving a hybrid of physics and learned correction.
ECMWF has trained neural networks on analysis increments to correct model biases, and learned emulators such as GraphCast are now initialised from 4D-Var analyses.
- 1. Model error arises from…
- 2. Training data for a correction can come from…
- 3. A hybrid model combines…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Model error: the difference between the true tendency and the model tendency, estimated from (x_a(t + Δt) − M(x_a(t)))/Δt or from analysis increments averaged over time.
- Hybrid models: x(t + Δt) = M(x(t)) + Δt·g_θ(x(t)), with g_θ a neural network or regression; also called a universal differential equation when trained inside the solver.
- Learning from imperfect data: analyses contain errors, and the correction can absorb them; Brajard et al. (2020) alternated DA and training to learn a full model from sparse noisy observations.
- Emulators: learned forecast models (GraphCast, FourCastNet, AIFS) are trained on reanalyses and then run from analyses; differentiable emulators provide adjoints for 4D-Var.
- Learned assimilation: networks that map observations to analyses or learn covariances, localisation and inflation.
- Online versus offline: offline training uses stored analyses; online training updates the correction as DA cycles run.
- 1. Model error per unit time is estimated by…
- 2. A correction trained inside the solver is…
- 3. Learned weather emulators are trained on…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.A model with missing physics
Exercise 1.
- Truth: Lorenz-96 with 40 variables, F = 8, plus a local term 1 − 0.04 x_i². Forecast model: Lorenz-96 without it.
- Local features at each point: 1, x_i, x_i², x_i³, x_(i−1), x_(i+1), with coefficients shared by all points.
- A least-squares fit of the one-step model error on a true trajectory.
Practice.
- Use local features and shared weights: physics is the same at every grid point, so data from all points train one model.
- Estimate model error from many cycles and hold out later cycles for testing.
- Expect the correction to absorb analysis errors; judge it by forecast skill, not by its coefficients.
- Keep the learned term small and stable; check long free runs for blow-up.
- Tools: PyTorch or JAX for neural corrections, DAPPER for DA experiments, and torchdiffeq or Diffrax for training inside solvers.
import numpy as np
D = (Xa[1:] - model_step(Xa[:-1])) / dt # model error from consecutive analyses
F = local_features(Xa[:-1]).reshape(-1, 6) # same features at every grid point
w = np.linalg.lstsq(F, D.reshape(-1), rcond=None)[0]
def hybrid_tendency(x):
return l96(x) + local_features(x) @ w- 1. Shared weights across grid points…
- 2. A learned correction should be judged by…
- 3. A JAX library for training inside ODE solvers:
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
What the regression sees. With the true trajectory, (x(t + Δt) − M(x(t)))/Δt equals the missing tendency averaged over one step, so least squares on the right features recovers it: Exercise 1 found 0.99 + 0.01 x_i − 0.041 x_i², and the one-step error fell from 0.046 to 0.003.
Learning from analyses. Analyses are noisy, and their errors are correlated with the model that produced them. Consecutive analyses also differ by the assimilation increment, which pulls the state towards observations at every other grid point. The regression on analyses therefore learns a mixture of model error and assimilation effects. In Exercise 2 its coefficients were far from the truth (constant 0.388, x² coefficient −0.003), yet over the attractor the learned term averaged about 0.17 against 0.31 for the true term and correlated with it at about 0.8.
Why it still helps. Forecast skill depends on the correction’s effect along the trajectories the system actually visits, not on matching the formula. A correction that captures the mean and much of the state dependence removes most of the systematic drift.
- 1. Fitting on the true trajectory recovered the x² coefficient as…
- 2. Coefficients learned from analyses were…
- 3. Forecast skill depends on the correction…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.Can a correction learned only from data-assimilation analyses of an imperfect model recover the analysis and forecast skill of the perfect model?
History.
- D. Dee and A. da Silva (1998) estimated forecast model bias within data assimilation.
- T. Danforth, E. Kalnay and T. Miyoshi (2007) corrected model bias from analysis increments.
- J. Brajard, A. Carrassi, M. Bocquet and L. Bertino (2020) combined DA and machine learning to learn a model from sparse noisy observations.
- A. Farchi et al. (2021) and the ECMWF team (2023) learned model error corrections online inside 4D-Var.
Exercise 2. Every other variable observed every 0.05 time units with error 1; EnKF with 20 members, Gaspari–Cohn half-width 4, inflation 1.1. Training: analyses from 1500 cycles of the imperfect model. Test: 400 later cycles with each model, analysis RMSE after 50 cycles and forecast RMSE from every 10th analysis. Seed 0:
| model | analysis RMSE | forecast RMSE at 0.5 | at 1.0 |
|---|---|---|---|
| imperfect | 0.56 | 1.6 | 2.8 |
| learned from analyses | 0.47 | 1.2 | 2.0 |
| learned from truth | 0.46 | 1.1 | 2.0 |
| perfect | 0.46 | 1.1 | 2.0 |
- The correction learned from analyses removed most of the gap to the perfect model: forecast error at 1.0 time unit fell from 2.8 to 2.0.
- Its coefficients did not match the true term; the correction learned from the true trajectory did (0.989 and −0.041 against 1 and −0.04).
- Seeds 1 and 2: forecast error at 1.0 fell from 2.3 to 1.5 and from 3.1 to 2.1 (perfect 1.5 and 2.1); analysis RMSE from 0.53 to 0.45 and from 0.57 to 0.5.
ML-enhanced data assimilation in practice
- Weather: ECMWF learns model-error corrections inside 4D-Var and initialises its AIFS learned model from 4D-Var analyses.
- Ocean and sea ice: learned bias corrections for coupled models.
- Emulators in DA: learned forecast models provide fast ensembles and automatic adjoints.
- End-to-end: models trained directly from observations without a physical model, still an open research area.
References
- D. P. Dee and A. M. da Silva (1998). “Data assimilation in the presence of forecast bias.” Quarterly Journal of the Royal Meteorological Society.
- C. M. Danforth, E. Kalnay and T. Miyoshi (2007). “Estimating and correcting global weather model error.” Monthly Weather Review.
- J. Brajard, A. Carrassi, M. Bocquet and L. Bertino (2020). “Combining data assimilation and machine learning to emulate a dynamical model from sparse and noisy observations.” Journal of Computational Science.
- A. Farchi, P. Laloyaux, M. Bonavita and M. Bocquet (2021). “Using machine learning to correct model error in data assimilation and forecast applications.” Quarterly Journal of the Royal Meteorological Society.
- R. Lam et al. (2023). “Learning skillful medium-range global weather forecasting.” Science.