Ensemble Kalman Filter

An implementation of the Ensemble Kalman filter is provided for sequential data assimilation. Use is through the Ensemble_Kalman class.

The EnKF aproximates the probability distribution of the solution through a finite ensemble of members, (see also Markov Chain Monte Carlo). This estimate is updated at each prediction step in a Bayesian fashion, with the predicted ensemble forming the prior. Upon incorporating the measurement data, we have a posterior distribution.

Classes

  • Ensemble_Kalman : Implements the filter.
Author: Adam G. Peddle
Version: 1.0
class EnKF.Ensemble_Kalman(x_meas, Nx, ensemble_size)[source]

This class implements the update step of the ensemble Kalman filter. Once initialised, the point of access for the user is through the apply method.

Attributes

  • Nx : The spatial domain size
  • N : the number of ensemble members
  • H : the measurement operator such that
\[d = H\psi\]

where \(d\) is the vector of observations, \(H\) is the measurement operator, and \(\psi\) is the full solution vector.

Methods

  • _ensemble_perturbation : Computes the ensemble perturbation
  • _perturb_observations : Computes the perturbed observations and
    ensemble of perturbations
  • apply: Applies the EnKF to a predicted solution for some measurement

Parameters

  • x_meas : The indices where measurements are known on the solution grid
  • Nx : The number of gridpoints
  • ensemble_size : The number of ensemble members

See Also

    1. Evensen, The Ensemble Kalman Filter: theoretical formulation and practical implementation. 2003. Ocean Dynamics. DOI:10.1007/s10236-003-0036-9.
apply(A, d)[source]

Applies the EnKF, updating the predicted ensemble matrix with the measured data. The result is the posterior distribution, i.e. the best estimate for the state of the system.

Let n be the size of the model state vector, N be the number of ensemble members, and m be the number of measurements.

Parameters

  • A : the prior distribution (real, size n x N)
  • d : the measurement vector (real, size m)

Returns

  • The posterior distribution after data has been assimilated. This matrix is suitable for continued use in MCMC solvers.