This paper describes the design of Odyssee, a system for FORTRAN progr
ams manipulations and its application to automatic differentiation. Th
e Odyssee system manipulates FORTRAN programs as symbolic objects. It
is an open system built as a toolkit, written in a high-level programm
ing language adapted to this purpose. The use of a variational method
to perform data assimilation requires the computation of the gradient
of a cost function represented by a large-size FORTRAN program. The us
ual drawback in the reverse automatic differentiation method is the st
orage requirement. The Odyssee system allows one to implement storage/
recomputation strategies in order to fit the needed compromizes. We pr
esent the implementation of the strategy used in the weather forecasti
ng ARPEGE/IFs project to produce the adjoint code from the code repres
enting the numerical model. Odyssee produces the same code as the hand
-written adjoint code for the ARPEGE/IFS project.