Abstract. We consider the solution of a (generalized) eigenvalue problem arising in physical oceanography that involves the evaluation of both the tangent-linear and adjoint versions of the underlying numerical model. Two different approaches are discussed. First, tangent-linear and adjoint models are generated by the software tool TAF and used separately. Second, the two models are combined into a single derivative model based on optimally preaccumulated local gradients of all scalar assignments. The coupled tangent-linear / adjoint model promises to be a good solution for small or medium sized problems. However, the simplicity of the example code at hand prevents us from observing considerable run time differences between the two approaches.