hi ezaron,

Sorry about replying so late! And Thanks your suggestions very much! I'd have a try sincerely! Looking forward a new talk about this!

ezaron wrote:

Hi Li,

Suppose you are interested in a linear function of the model's trajectory. Let the value of this function be denoted, y. Then there exists another function, call it K(x,t), which permits you to compute y using an inner product:

y = \int_D \int_0^T K(x,t) u(x,t) dx dt.

The model's trajectory is denoted u(x,t), where one could image u to be a vector containing components of velocity, temperature, salinity, etc., the usual prognostic variables computed by ROMS. Of course, (x,t) denote (space,time) coordinates.

You indicated "MKE" which I will guess refers to "mean kinetic energy at time t=T". This is not a linear function, but presumably the sensitivity of this quantity interests you for a perturbation around some basic state trajectory,

y = \int_D \int_0^T \bar{u}(x,t) \delta(t-T) u(x,t) dx dt,

so the function K is given by \bar{u}(x,t) \delta(t-T), i.e., it equals the basic state (the velocity vector field) at the time of interest, times a delta-function at that time of interest.

The adjoint model can be used to compute the quantity A=dy/du(x,t=0). For a given perturbation u'(x) given at t=0, the adjoint computes the quantity A(x) such that

y' = \int_D A(x) u'(x) dx. (Note that I am being a little vague about a factor related to the area of the domain, but you can figure this out by verifying this equation for a very small test perturbation field, u'(x), once you have computed A(x) using the adjoint model.)

Thus, you would take your velocity field, \bar{u}(x,t), at time t=T and input this to the adjoint (and zero out all the other components (temp and salinity) of the input fields). Then integrate the adjoint model backwards in time to t=0. The adjoint fields at the initial time are A(x). You should convince yourself they approximately satisfy the equation above. (Since y' and u' are perturbations, you will compute these from the differences of two model runs.)

Good luck!