An alternative Approach to Building Adjoints

Julia Levin
IMCS, Rutgers University


New components are constantly added to ROMS, and in order to incorporate them into assimilation algorithms, ROMS users need to build corresponding adjoint codes. The ROMS adjoint has been built by “symbolic” manipulation of the forward ROMS code. The algorithm is based on applying a set of “inversion” rules for every single operator in the code. An alternative approach to building an adjoint consists of analytically deriving the discrete adjoint equations and then coding them up. In certain circumstances, it is easier to obtain an adjoint code using this alternative approach. Moreover, it gives a clear definition of the adjoint variables and their physical meaning.

We describe the approach in a simple setting, first in a continuous, and then in a discrete form.