Data Assimilation

Interactive tutorials on combining dynamical models with observations to estimate the true state of a chaotic system. Each notebook is self-contained and runs entirely in your browser via WebAssembly — no installation required.

Variational & Ensemble DA

3DVAR, 4DVAR & Ensemble Kalman Filter on Lorenz 63

A twin-experiment walkthrough of three foundational data assimilation algorithms on the chaotic Lorenz 63 system. Starting from a perturbed initial condition, synthetic observations are assimilated to recover the true trajectory — illustrating how each algorithm exploits the model and observations differently.

𝒥(x) = ½(x−xᵇ)ᵀ B⁻¹(x−xᵇ) + ½(y−Hx)ᵀ R⁻¹(y−Hx)
  • 3DVAR: Tikhonov least-squares analysis at a single time
  • 4DVAR: time-window variational assimilation (BPTT for physics)
  • EnKF: flow-dependent ensemble Kalman filter with inflation
  • Reliability diagrams: ensemble spread vs. analysis error
  • Observation frequency sensitivity for all three methods
▶ Open Notebook
Hybrid ML–DA

Neural Network Emulators in the DA Loop

Replacing or augmenting the dynamical forecast model with a neural network emulator trained on ensemble trajectories. Explores how differentiable emulators enable gradient-based 4DVAR without a hand-coded adjoint, and how model error affects the analysis cycle.

∂𝒥/∂x₀ = M* [Σₖ Hᵀ R⁻¹(yₖ − Hxₖ)]
  • LSTM / MLP surrogate for the Lorenz 96 model
  • Automatic differentiation through the emulator for 4DVAR
  • Hybrid physics + ML covariance estimation
  • Sensitivity to emulator bias and ensemble size
Coming soon
Score-based DA

Diffusion Models as Data Assimilation Priors

Score-based generative models (diffusion / flow-matching) can encode complex, non-Gaussian background error distributions learned from model climatology. This tutorial replaces the Gaussian 𝐁 matrix with a learned score function and samples the posterior via Langevin dynamics.

xₜ₋₁ = xₜ + δ∇ₓ log p(xₜ) + √(2δ) ε
  • Score matching on Lorenz 96 climatological ensembles
  • Posterior sampling with observation conditioning
  • Comparison with Gaussian EnKF in non-Gaussian regimes
  • Scalability to higher-dimensional state spaces
Coming soon