A simple finite difference‐based approximation for biogeochemical tangent linear and adjoint models

by Helen Hill for CBIOMES

CBIOMES investigators Paul Mattern and Chris Edwards present a technique that accurately approximates tangent linear and adjoint models for data assimilation applications based only on evaluations of the nonlinear model. The resulting approximation offers a simple way to create readily maintained tangent linear and adjoint model code as only major changes to the nonlinear model formulation necessitate modifications of the tangent linear or adjoint model code.

Data assimilation seeks to optimally combine theory (typically in the form of a numerical model) with observations as in, for example, weather forecasting where measurements of the atmosphere are used to improve the computer model‐generated forecast.

In general, data assimilation applications require extra computer code to calculate the appropriate adjustments needed to shift the model toward the observations, but this data assimilation code is time‐consuming to build, and must be updated whenever changes are made to the model code.

In a new paper published in the Journal of Geophysical Research – Oceans, investigators in the UCSC CBIOMES group, Paul Mattern and Chris Edwards, detail what they describe as a relatively easy technique to automatically generate the data assimilation code from the underlying model code alone through a method in which changes to the model code are automatically propagated to the data assimilation code.

Although their approach is simple to construct and maintain, it comes at a cost of increased computer execution time, however, as the researchers note, their approach is particularly well‐suited to marine biogeochemical models, where they can take advantage of typical features of these types of models to allow their approach to become computationally viable.

To illustrate their approximation in a realistic application, the pair uses a 3‐dimensional coupled physical‐biogeochemical 4D‐Var data assimilation system, set in the California Current system, in which the approximation is only applied to an 11 state variable biogeochemical model.

With it they were able to demonstrate that the automatically generated data assimilation code only takes 3% to 15% longer to run than the assimilation code created by hand yet results in functionally equivalent results. “In our application, the approximation‐based model solution tracks the reference solution accurately over 30 4‐day assimilation cycles while leads to no more than a ∼10% increase in the computational cost compared to the hand‐coded reference,” says Paul.

To find out more about this work contact: Paul


Mattern, J.P. and C.A. Edwards (2018), A simple difference quotient-based approximation for biogeochemical tangent linear and adjoint models, online at Journal of Geophysical Research – Oceans, doi: 10.1029/2018JC014283


Chris’s talk about this work from  2018 CBIOMES annual meeting (Chris’s presentation starts at 0:50)