Recipes for adjoint code construction

ACM Transactions on Mathematical Software - Tập 24 Số 4 - Trang 437-474 - 1998
Ralf Giering1, T. Kaminski1
1Max-Planck-Institut für Meteorologie

Tóm tắt

Adjoint models are increasingly being developed for use in meteorology and oceanography. Typical applications are data assimilation, model tuning, sensitivity analysis, and determination of singular vectors. The adjoint model computes the gradient of a cost function with respect to control variables. Generation of adjoint code may be seen as the special case of differentiation of algorithms in reverse mode, where the dependent function is a scalar. The described method for adjoint code generation is based on a few basic principles, which permits the establishment of simple construction rules for adjoint statements and complete adjoint subprograms. These rules are presented and illustrated with some examples. Conflicts that occur due to loops and redefinition of variables are also discussed. Direct coding of the adjoint of a more sophisticated model is extremely time consuming and subject to errors. Hence, automatic generation of adjoint code represents a distinct advantage. An implementation of the method, described in this article, is the tangent linear and adjoint model compiler (TAMC).

Từ khóa


Tài liệu tham khảo

BANERJEE U., Dependence Analysis for Supercomputing, 10.1007/978-1-4684-6894-6

BAUR W., 1983, The complexity of partial derivatives, Theoretical Computer Science, 22, 317, 10.1016/0304-3975(83)90110-X

BENNET W., 1989, The Kalman smoother for a linear quasi-geostrophic model of ocean circulation, Dynamics of Atmospheres and Oceans, 13, 219, 10.1016/0377-0265(89)90041-9

BISCHOF C. H., Argonne National Laboratory, Argonne, Ill. To appear in IEEE Computational Science &amp

CACUCCI D., 1981, Sensitivity theory for nonlinear systems. Part I: Nonlinear functional analysis approach, Journal of Mathematical Physics, 22, 2794, 10.1063/1.525186

CHRISTIANSON B., School of Information Sciences

COURTIER P., 1987, Variational assimilation of meteorological observations with the adjoint vorticity equation Part II: Numerical results, Quarterly Journal of the Royal Meteorological Society, 113, 1329, 10.1002/qj.49711347813

GHIL M., 1989, Meteorological data assimilation for oceanographers. Part I: Description and theoretical framework, Dynamics of Atmospheres and Oceans, 13, 171, 10.1016/0377-0265(89)90040-7

GIERING R., Users manual

GIERING R. AND MAIER-REIMER E. 1997. Data assimilation into the Hamburg LSG OGCM with its adjoint model in prep. GIERING R. AND MAIER-REIMER E. 1997. Data assimilation into the Hamburg LSG OGCM with its adjoint model in prep.

GILBERT J., 1992, Automatic Differentiation and Iterative Processes, Optimization Methods and Software, 1, 13, 10.1080/10556789208805503

GRIEWANK A., Mathematical Programming: Recent Developments and Applications

GRIEWANK A., 1992, Achieving logarithmic growth of temporal and spatial complexity in reverse automatic differentiation, Optimization Methods and Software, 1, 35, 10.1080/10556789208805505

KAMINSKI T., 1996, Sensitivity of the seasonal cycle of CO2 at remote monitoring stations with respect to seasonal surface exchange fluxes determined with the adjoint of an atmospheric transport model, Physics and Chemistry of the Earth, 21, 5, 10.1016/S0079-1946(97)81142-1

KEARFOTT R., Computational Differentiation: Techniques, Applications, and Tools, 75

KENNEDY K., Program Flow Analysis: Theory and Applications

LONG R., 1989, Data assimilation into a numerical equatorial ocean model. Part I: The model and assimilation algorithm, Dynamics of Atmospheres and Oceans, 13, 379, 10.1016/0377-0265(89)90047-X

LONG R., 1989, Data assimilation into a numerical equatorial ocean model. Part II: Assimilation experiments, Dynamics of Atmospheres and Oceans, 13, 413, 10.1016/0377-0265(89)90048-1

F., 1991, EGS 16th General Assembly, C107

MAROTZKE J. ZHANG Q. GIERING R. STAMMER D. HILL C. AND LEE T. 1998. The Linearization and Adjoint of the MIT Ocean General Circulation Model. in prep. MAROTZKE J. ZHANG Q. GIERING R. STAMMER D. HILL C. AND LEE T. 1998. The Linearization and Adjoint of the MIT Ocean General Circulation Model. in prep.

NAG, Fortran Library Manual--Mark 13

ROSTAING N., 1993, Automatic differentiation in Odyss~e, Tellus, 45, 558, 10.3402/tellusa.v45i5.15060

SCHR TER, Ocean Circulation Models: Combining Data and Dynamics, 257

SCHR TER, 1992, Variational assimilation of GEOSAT data into an eddy-resolving model of the gulf-stream extension area, Journal of Physical Oceanography, 23, 925, 10.1175/1520-0485(1993)023<0925:VAOGDI>2.0.CO;2

TALAGRAND O., Automatic Differentiation of Algorithms: Theory, Implementation and Application, 169

TALAGRAND O., 1987, Variational assimilation of meteorological observations with the adjoint vorticity equation Part I: Theory, Quarterly Journal of the Royal Meteorological Society, 113, 1311, 10.1002/qj.49711347812

THACKER W. 1987. Three lectures on fitting numerical models to observations. Technical report GKSS Forschungszentrum Geesthacht GmbH Geesthacht Federal Republic of Germany. THACKER W. 1987. Three lectures on fitting numerical models to observations. Technical report GKSS Forschungszentrum Geesthacht GmbH Geesthacht Federal Republic of Germany.

THACKER W., Automatic Differentiation of Algorithms: Theory, Implementation and Application, 191

TZIPERMAN E., 1989, An optimal control/adjoint equation approach to studying the ocean general circulation, Journal of Physical Oceanography, 19, 1471, 10.1175/1520-0485(1989)019<1471:AOCEAT>2.0.CO;2

TZIPERMAN E., 1992, Ocean data analysis using a general circulation model, I, simulations, Journal of Physical Oceanography, 22, 1434, 10.1175/1520-0485(1992)022<1434:ODAUAG>2.0.CO;2

TZIPERMAN E., 1992, Ocean data analysis using a general circulation model, II, North Atlantic model, Journal of Physical Oceanography, 22, 1458, 10.1175/1520-0485(1992)022<1458:ODAUAG>2.0.CO;2

WEBSTER S., 1994, Workshop on Adjoint Applications in Dynamic Meterology

Q., 1996, Generalized adjoint for physical processes with parameterized discontinuities: Part i: Basic issues and heuristic examples, J. Atmospheric Sciences, 53, 1123, 10.1175/1520-0469(1996)053<1123:GAFPPW>2.0.CO;2

Q., 1996, Generalized adjoint for physical processes with parameterized discontinuities: Part ii: Vector formulations and matching conditions, J. Atmospheric Sciences, 53, 1143, 10.1175/1520-0469(1996)053<1143:GAFPPW>2.0.CO;2