The chaotic Lorenz’63 model is a much-used testbed used to examine the capabilities of data-assimilation methods to handle nonlinear, unstable, and chaotic dynamics. This chapter will repeat some experiments that demonstrate the strengths of ensemble methods for highly nonlinear dynamics. We mainly focus on applying three different ensemble methods, the ensemble smoother (ES), ensemble Kalman smoother (EnKS), and ensemble Kalman filter (EnKF).

## 1 The Lorenz’63 Model

We will now repeat an example from  Evensen (1997) and Evensen & Van Leeuwen (2000) with the chaotic Lorenz (1963) model to demonstrate the properties of three different ensemble methods, the ensemble smoother (ES), ensemble Kalman smoother (EnKS), and ensemble Kalman filter (EnKF), when applied to highly nonlinear dynamics. The famous Lorenz (1963) model is a coupled system of three nonlinear ordinary differential equations

\begin{aligned} \frac{\partial x}{\partial t}&=\sigma (y-x) , \end{aligned}
(15.1)
\begin{aligned} \frac{\partial y}{\partial t}&=\rho x-y-xz , \end{aligned}
(15.2)
\begin{aligned} \frac{\partial z}{\partial t}&=xy-\beta z . \end{aligned}
(15.3)

Here x(t), y(t), and z(t) are the dependent variables, and we use the common parameter values $$\sigma =10$$, $$\rho =28$$, and $$\beta =8/3$$. The initial conditions for the reference case are $$(x(0), y(0), z(0))= (1.508870, -1.531271, 25.46091)$$ and the time interval is $$t\in [0,40]$$.

We generate the observations and initial conditions by adding normally distributed white noise with zero mean and variance equal to 2.0 to the reference solution. We also measure all the variables x, y, and z at regular time intervals $$\Delta t=0.5$$. This value is half the typical revolution time in each of the wings of the system. The ensemble size is $$N=2000$$. The current setup corresponds to Experiment B from (Evensen, 1997). In the upper plots in Figs. 15.1, 15.2 and 15.3, the red line denotes the estimate and the blue line is the reference solution. In the lower plots the red line is the standard deviation estimated from ensemble statistics, while the blue line is the abosulute value of the true residuals with respect to the reference solution.

## 2 Ensemble Smoother Solution

The ensemble smoother (ES) does not split the assimilation interval into multiple assimilation windows but rather attempts to tackle the smoother formulation from Sect. 2.4.1. The key to the ES method is using an unconstrained ensemble integration over the whole assimilation interval that represents the prior error statistics. After that, all measurements are processed in one go to produce the posterior estimate. Thus, the ES attempts to solve Bayes’ theorem in Eq. (2.10). The ES uses Approx. 4, by assuming a Gaussian prior, but also Approx. 8 by using a finite but large ensemble size. With this approach, we do not need to make any of the Approxs. 1 (Markov model), 2 (uncorrelated measurement errors in time), or 3 (filtering approximation). Furthermore, for a linear measurement operator, as in the current example, the linearization, the sampling, and the linear regression approximations 5, 6, and 7 do not apply. Interestingly, for a linear model with Gaussian statistics, ES provides the optimal solution. However, for a highly nonlinear model like the Lorenz equations, the Gaussian assumption for the prior is severe.

Figure 15.1 presents the ES solution and estimated error variance for the x-component. ES performs rather poorly for this example. However, even if the fit to the reference trajectory is poor, the ES solution captures most of the transitions. The main problem is to estimate of the amplitudes in the reference solution. We attribute the cause for the weak performance to non-Gaussian contributions in the prior distribution for the model evolution, as can be expected in such a strongly nonlinear case.

The error estimates evaluated from the posterior ensemble are not large enough at the peaks where the smoother performs poorly. The underestimated errors result from neglecting the non-Gaussian contribution from the probability distribution for the model evolution. Otherwise, the error estimate looks reasonable with minima at the measurement locations and maxima between the measurements.

## 3 Ensemble Kalman Filter Solution

As for the advection example in Chap. 14 we now apply the Approxs. 1 (Markov model), 2 (uncorrelated measurement errors in time), and 3 (assimilation time-window approximation). Furthermore, in addition to the Approx. 4 (Gaussian priors) and 8 (the ensemble representation), we compute the filter solution by only updating the state at the end of the time window. As when using ES, the linearization, the sampling, and the linear regression approximations 5, 6, and 7 do not apply. As for the advection case in Chap. 14, we update the solution at the end of each time window, using the standard EnKF update equation in a filtering configuration.

EnKF does an excellent job tracking the reference solution as shown in Fig. 15.2 and captures all transitions. For example, at $$t=9$$, 11, 19, and 24, the model prediction is about to go to the wrong wing of the attractor, but EnKF updates the solution to the correct wing. The corresponding peaks in the estimated and actual errors indicate these unstable locations in state space. At $$t=5$$ and 20, the estimated solution misses the reference solution’s amplitudes, as reflected in the error estimates. Thus, the error-variance estimate is consistent, showing significant peaks at the locations where the ensemble has problems tracking the reference solution. Note also the similarity between the actual error and the estimated standard deviation. Thus, for all peaks in the residual, a corresponding one is present in the error variance estimate.

The error estimates show the same behavior as in Miller et al. (1994) with significant error growth when the model solution passes through the unstable regions of the state space, and otherwise weak error variance growth or even decay in the stable regions. For instance, observe the low error variance for $$t\in [25,28]$$ corresponding to the solution’s oscillation around one of the wings.

For this nonlinear problem, EnKF performs better than ES. The reason is that the ensemble of realizations are recursively pulled toward the measured solution and are not allowed to diverge toward the wrong wing. In addition, the Gaussian update increments lead to an approximately Gaussian ensemble distributed around one of the wings. ES does not exploit this property of the sequential updating, and the realizations evolve freely and lead to non-Gaussian ensemble distributions.

## 4 Ensemble Kalman Smoother Solution

The ensemble Kalman smoother (EnKS) is an extension of EnKF that allows for computing a smoother solution. In addition to updating the solution at the end of the time window, it uses time correlations from the ensemble to update the solution at all previously desired time instants. Thus, EnKS attempts to solve the recursive smoother problem from Sect. 2.4.3. It is a simple computation to obtain the EnKS solution for previous time-instants as soon as one has computed the EnKF solution. In the current example, the only code difference between the EnKF and EnKS is the number of time instants we include in the state vector. Also, when computing the EnKS solution, we define the number of previous time instants to update, and hence, we use a lagged EnKS implementation. The main additional computational cost of EnKS compared with EnKF is storing the ensemble of the variables we want to update at all time instants when we wish to compute the smoother solution. We refer to the extended discussion of EnKF and EnKS in Evensen  (2009b, Chap. 9).

As for the EnKF solution we apply the Approxs. 1 (Markov model) and 2 (uncorrelated measurement errors in time). However, since the method allows for updating previous time windows, we do not apply the time window Approx. 3. The Approx. 4 (Gaussian priors) and 8 (the ensemble representation) apply as for EnKF. As when using ES and EnKF, the linearization, the sampling, and the linear regression approximations 5, 6, and 7 do not apply.

Figure 15.3 shows the solution obtained by EnKS. This solution is smoother than the EnKF solution and provides a better fit for the reference trajectory. In addition, EnKS recovers all of the problematic locations in the EnKF solution.

EnKS reduces the error estimates throughout the time interval, including the significant error peaks seen in the EnKF solution. As for the EnKF solution, there are corresponding peaks in the error estimates and the residuals, which suggests that the EnKS error estimate is consistent with the actual errors.

The code used in these examples is available from https://github.com/geirev/EnKF_lorenz.git.