PDF
\(\newcommand{\footnotename}{footnote}\) \(\def \LWRfootnote {1}\) \(\newcommand {\footnote }[2][\LWRfootnote ]{{}^{\mathrm {#1}}}\) \(\newcommand {\footnotemark }[1][\LWRfootnote ]{{}^{\mathrm {#1}}}\) \(\let \LWRorighspace \hspace \) \(\renewcommand {\hspace }{\ifstar \LWRorighspace \LWRorighspace }\) \(\newcommand {\mathnormal }[1]{{#1}}\) \(\newcommand \ensuremath [1]{#1}\) \(\newcommand {\LWRframebox }[2][]{\fbox {#2}} \newcommand {\framebox }[1][]{\LWRframebox } \) \(\newcommand {\setlength }[2]{}\) \(\newcommand {\addtolength }[2]{}\) \(\newcommand {\setcounter }[2]{}\) \(\newcommand {\addtocounter }[2]{}\) \(\newcommand {\arabic }[1]{}\) \(\newcommand {\number }[1]{}\) \(\newcommand {\noalign }[1]{\text {#1}\notag \\}\) \(\newcommand {\cline }[1]{}\) \(\newcommand {\directlua }[1]{\text {(directlua)}}\) \(\newcommand {\luatexdirectlua }[1]{\text {(directlua)}}\) \(\newcommand {\protect }{}\) \(\def \LWRabsorbnumber #1 {}\) \(\def \LWRabsorbquotenumber "#1 {}\) \(\newcommand {\LWRabsorboption }[1][]{}\) \(\newcommand {\LWRabsorbtwooptions }[1][]{\LWRabsorboption }\) \(\def \mathchar {\ifnextchar "\LWRabsorbquotenumber \LWRabsorbnumber }\) \(\def \mathcode #1={\mathchar }\) \(\let \delcode \mathcode \) \(\let \delimiter \mathchar \) \(\def \oe {\unicode {x0153}}\) \(\def \OE {\unicode {x0152}}\) \(\def \ae {\unicode {x00E6}}\) \(\def \AE {\unicode {x00C6}}\) \(\def \aa {\unicode {x00E5}}\) \(\def \AA {\unicode {x00C5}}\) \(\def \o {\unicode {x00F8}}\) \(\def \O {\unicode {x00D8}}\) \(\def \l {\unicode {x0142}}\) \(\def \L {\unicode {x0141}}\) \(\def \ss {\unicode {x00DF}}\) \(\def \SS {\unicode {x1E9E}}\) \(\def \dag {\unicode {x2020}}\) \(\def \ddag {\unicode {x2021}}\) \(\def \P {\unicode {x00B6}}\) \(\def \copyright {\unicode {x00A9}}\) \(\def \pounds {\unicode {x00A3}}\) \(\let \LWRref \ref \) \(\renewcommand {\ref }{\ifstar \LWRref \LWRref }\) \( \newcommand {\multicolumn }[3]{#3}\) \(\require {textcomp}\) \(\newcommand {\intertext }[1]{\text {#1}\notag \\}\) \(\let \Hat \hat \) \(\let \Check \check \) \(\let \Tilde \tilde \) \(\let \Acute \acute \) \(\let \Grave \grave \) \(\let \Dot \dot \) \(\let \Ddot \ddot \) \(\let \Breve \breve \) \(\let \Bar \bar \) \(\let \Vec \vec \)

Preconditioning Weak-Constraint 4D-Var: A Parallelisable Implementation in Firedrake

Jemima M. Tabeart, David Ham, Josh Hope-Collins

Abstract

Data assimilation refers to a class of methods which seek to find the most likely state of a dynamical system by combining information from a (numerical) model of the system of interest with measurements of the system [2]. The most mature application of data assimilation is to numerical weather prediction, where large dimensional problems (\(10^9\) dimensional states and \(10^7\) measurements) need to be solved in a very short amount of time. Algorithms also need to be highly parallelisable in order to exploit high performance computing resources available at meteorological centres.

In variational data assimilation methods, a non-linear least squares problem is solved via a Gauss-Newton approach [5]. One computationally expensive component of this implementation consists of approximately solving large linear systems. Preconditioners can help to speed up the convergence of iterative methods, but it can be challenging to design effective and efficient preconditioning methods. This is particularly true for the weak-constraint 4D-Var problem, which accounts for the fact that the numerical model itself is imperfect. Relaxing the assumption of a perfect model increases the size of the state space, but introduces the possibility of using parallel-in-time [3] methods, compared to the strong constraint method where model evaluations must be performed in serial.

For a fixed time window \([t_0,t_N]\), \(\mathbf {x}^t_i\in \mathbb {R}^s\) denotes the true state of a dynamical system of interest at time \(t_i\), with observations \(\mathbf {y}_i\in \mathbb {R}^{p_i}\) made at times \(t_i\). Prior information obtained from a numerical model, \(\mathbf {x}_b \in \mathbb {R}^s\), is then combined with the observation information to find \(\mathbf {x}_i\in \mathbb {R}^s\), the most likely state of the system at time \(t_i\). The prior, or background state, is valid at initial time \(t_0\) and can be written as an approximation to the true state via \(\mathbf {x}_b = \mathbf {x}^t_0 + \epsilon ^b\). We assume that the background errors \(\epsilon ^b\sim \mathcal {N} (0,B) \). We define a, possibly non-linear, observation operator \(\mathcal {H}_i:\mathbb {R}^{s} \rightarrow \mathbb {R}^{p_i}\) which maps from state variable space to observation space at time \(t_i\). Observations are written as \(\mathbf {y}_i = \mathcal {H}_i[\mathbf {x}^t_i]+\epsilon _i \in \mathbb {R}^{p_i}\), for \(i=0,1,\dots ,N\), where the observation error \(\epsilon _i\sim \mathcal {N}(0,R_i)\) for \(R_i\in \mathbb {R}^{p_i\times p_i}\).

This weak constraint 4D-Var problem then leads to a non-linear objective function of the form:

\begin{align*} \label {eq:CostFn} J(\mathbf {x})=&\frac {1}{2}(\mathbf {x}-\mathbf {x}_0)^T{{B}^{-1}}(\mathbf {x}-\mathbf {x}_0)+\frac {1}{2}\sum _{i=0}^{N}(\mathbf {y}_i-\mathcal {H}_i[\mathbf {x}_i])^T{R}_i^{-1}(\mathbf {y}_i-\mathcal {H}_i[\mathbf {x}_i])\\& +\frac {1}{2}\sum _{i=1}^N(\mathbf {x}_{i}-\mathcal {M}_i(\mathbf {x}_{i-1}))^\top {Q}_{i}^{-1}(\mathbf {x}_{i}-\mathcal {M}_i(\mathbf {x}_{i-1})), \end{align*}

Within each outer loop, the inner loop minimises a quadratic objective function to find \(\boldsymbol \delta \mathbf {x}^{(l)}\in \mathbb {R}^{s( N+1)}\), where \(\boldsymbol \delta \mathbf {x}^{(l)} = \mathbf {x}^{(l+1)}-\mathbf {x}^{(l)}\). Writing \(\boldsymbol \delta \mathbf {x} = (\boldsymbol \delta \mathbf {x}_0^\top ,\boldsymbol \delta \mathbf {x}_1^\top ,\dots ,\boldsymbol \delta \mathbf {x}_N^\top )^\top \), the full non-linear observation operator \(\mathcal {H}_i\) (similarly the model operator \(\mathcal {M}_i\)) is linearised about the current best guess \(\mathbf {x}_i^{(l)}\) to obtain the linearised operator \(H^{(l)}_i\) (respectively \(M^{(l)}_i\)). The updated initial guess \(\boldsymbol \delta \mathbf {x}_0^{(l)}\) is propagated forward between observation times by \(M^{(l)}_i\) to obtain \(\boldsymbol \delta \mathbf {x}^{(l)}_{i+1} = M^{(l)}_i\boldsymbol \delta \mathbf {x}^{(l)}_{i}\).

The aim of the inner loop is to solve the symmetric positive definite system given by

\begin{equation} \label {eq:Primal} \mathbf {S}\delta \mathbf {x} = \mathbf {L}^T\mathbf {D}^{-1}\mathbf {b}+\mathbf {H}^T\mathbf {R}^{-1}\mathbf {d}, \quad \quad \mathbf {S} = \mathbf {L}^T\mathbf {D}^{-1}\mathbf {L}+\mathbf {H}^T\mathbf {R}^{-1}\mathbf {H} \end{equation}

where

\begin{align*} \mathbf {D}=\left (\begin{smallmatrix} B & & & \\ & Q_1 & & \\ & & \ddots & \\ & & & Q_{N}\\ \end {smallmatrix}\right ), \quad \mathbf {L}=\left (\begin{smallmatrix} I & & & \\ -M_1& I & & \\ &\ddots & \ddots & \\ & & -M_N&I\\ \end {smallmatrix}\right ), \quad \mathbf {R}=\left (\begin{smallmatrix} R_0 & & & \\ & R_1 & & \\ & & \ddots & \\ & & & R_{N}\\ \end {smallmatrix}\right ), \quad \mathbf {H}=\left (\begin{smallmatrix} H_0 & & & \\ & H_1 & & \\ & & \ddots & \\ & & & H_{N}\\ \end {smallmatrix}\right ), \end{align*} with \(M_i,H_i\) being the linearisations of \(\mathcal {M}_i\) and \(\mathcal {H}_i\) about the current solution.

However, the primal formulation, (1), has limited potential for acceleration via preconditioning approaches. In particular, it is difficult to exploit the inherent parallelism in the forward problem when designing preconditioners. Recent work has focused on a reformulation of the linearised objective function as a saddle point system [6] which takes the form

\begin{equation} \label {eq:saddlepointsystem} \begin{pmatrix} \mathbf {D} & \mathbf {0} & \mathbf {L} \\ \mathbf {0} & {\mathbf {R}} & \mathbf {H} \\ \mathbf {L}^{\top } & \mathbf {H}^{\top } & \mathbf {0}\end {pmatrix} \begin{pmatrix}\boldsymbol \delta \boldsymbol \eta \\ \boldsymbol \delta \boldsymbol {\nu } \\ \boldsymbol \delta \mathbf {x} \end {pmatrix}=\begin{pmatrix} \mathbf {b} \\ \mathbf {d} \\ \mathbf {0} \end {pmatrix}. \end{equation}

A number of approaches to precondition the model term, \(\mathbf {L}\), have been proposed (see e.g. [6, 7, 12, 11]), many of which impose parallel-in-time structure on \(\widehat {\mathbf {L}}^{-1} \approx \mathbf {L}^{-1}\). However, testing and comparing these new preconditioners in realistic frameworks is not straightforward. Variational data assimilation requires access to linearised model and adjoint operators. The time cost of implementing these for a new problem means that researchers often test their new approaches on a limited number of toy problems, such as the Lorenz 96 problem [9] or the shallow water equations. If available (and accessible to the researchers), the next step is a full scale implementation within an operational code, meaning that even in the best case there is a gap in test problems. Data assimilation methods are also increasingly being applied to other dynamical systems, and the properties of the usual toy models that make them appropriate for weather applications may no longer be desirable or relevant for other applications.

In this project we integrate both weak- and strong-constraint 4D-Var algorithms within the Firedrake [8] and PETSc [1] frameworks, for both the primal (1) and saddle point (2) problems. Firedrake is an automated system for the solution of partial differential equations using the finite element method. In particular, this means that tangent linear and adjoint operators are available automatically, significantly reducing the implementational burden of applying variational data assimilation methods to new models. For the user, the cost of setting up the 4D-Var system is not substantially higher than the cost of a single run of the forward model \(\mathcal {M}_{i}\) and application of the observation operators \(\mathcal {H}_{i}\). This implementation is also done in parallel.

In this talk I will present the integration of variational data assimilation problems within Firedrake, and demonstrate how this ‘plug-and-play’ approach allows users to focus on the numerical linear algebra aspects of their problem rather than the implementation of test problems. In particular I will present a theoretical and practical comparison of existing and new preconditioners for the model term, \(\mathbf {L}\), including the block Toeplitz approaches of [6, 11], block diagonal approximations as studied in [12], and block (\(\alpha \))-circulant preconditioners as used in the all-at-once setting (see e.g [10, 4]).

References