Yue (Michael) Ying

The ensemble Kalman filter

From the scalar precision-weighted average of Chapter 1 to the full state vector: the best linear unbiased estimate is a matrix update, xa = xb + K(y − Hxb). But the covariance is too big to store — so the ensemble carries it, and the analysis becomes a linear combination of the ensemble perturbations. This widget assimilates the very same observation as Chapter 2 into the very same ensemble, performing the stochastic EnKF update live in your browser:

xam = xbm + K (ym − H xbm),   K = PbHT / (H PbHT + R),   ym = y + εm, εm ~ N(0, R).

With a single scalar observation, the gain K is one vector — the covariance of every grid cell with the simulated observation, divided by the observation-space variance plus the observation error R: the same dipole you saw as the correlation map in Chapter 2, re-used as the update pattern. No matrix is ever assembled.

Try it: drag the obs error slider and watch the pull — a small σo trusts the observation and collapses the analysis band onto the truth ring; a large σo barely moves the ensemble. Walk through members with the member slider (the update arrow in the scatter shows how far each member is pulled), and click or drag on a map to move the black state marker.

Background mean T + 4 K contours

Analysis mean T + 4 K contours

Scatter · bg → analysis

50
1.00

  • truth
  • background members
  • analysis members
  • highlighted member
  • observation

Reading the panels

1 · The background — the forecast: the same position-uncertainty ensemble as Chapter 2 (std 50 km), its 4 K contours a loose coloured band around the truth ring. The shading is the ensemble mean — position uncertainty averages out the blob, so the forecast mean is broader and weaker than the truth (the dark ring). The selected member's ring is thick and its blob centre is marked. The observation (red circle) reads 5.53 K — some members see it as warmer, some as colder, depending on where their blob sits.

2 · The analysis — every member after the EnKF update. Each one has been pushed toward the observed value: the contour band tightens around the truth ring, the shading is the analysis mean (pulled toward the observation, its peak rising toward the truth ring's value), and the selected member's blob centre moves toward the observation (the dashed line shows where it came from). The tighter the band, the smaller σo — try it. Far from the observation the band barely moves: a single observation cannot constrain the whole field.

3 · The scatter — the update in the joint distribution: background points (aqua) are pulled to analysis points (red), with the observed value and its ±σo band (amber). The arrow connects the selected member's before/after. Members that read too warm at the observation are pulled down, members that read too cold are pulled up — the cloud contracts toward the observation. The reported gain K = Var(Hxb) / (Var(Hxb) + σo2) is the fraction of the innovation the filter applies: σo = 1 K gives K ≈ 0.84, so each member moves 84% of the way.

→ Evensen et al., Data Assimilation Fundamentals (2022), Ch 6, 8 — linear analysis and the EnKF update.