# Re: [ferret_users] velocity projected onto isotherm?

```Hi Yangxing,

|          I recently encounter a difficult problem. Suppose I have
| ocean currents (u,v) and temperature (temp), how can I calculate the
| cross-isotherm of component of currents in ferret?

can be relatively easily computed from the horizontal
velocity field:

U = [integration from bottom to Z(x,y)] u(x,y,z) dz
V = [integration from bottom to Z(x,y)] v(x,y,z) dz

where z = Z(x,y) is the depth of the target isotherm.  Then,
vertical volume flux (per unit horizontal area) across the
isotherm is

w* = div(U,V) .

When the field is not steady, w* is the sum of
the cross-isotherm velocity and the vertical migration
speed of the isotherm.  It think it's difficult to separate
the two at each timestep.

If you are interested in mean values, then compute w* at
each timestep and take a time average, which will give
you the mean cross-isothermal flux, if the mean migration
of the isotherm is zero over the averaging period.

I included a derivation of these results in an Appendix of

Furue, McCreary, and Yu. 2009.
J. Phys. Oceanogr. 39(9): 2024--2051.

To do this in Ferret, take the vertical indefinite
integral (z=@IIN) of the horizontal velocity components,
2) project (regrid) the result onto temperature
coordinates, and 3) take the horizontal divergence.

I'm not sure whether or z=@IIN gives you exact results.
(I'd have to read the documentation.)

Hope this helps,
Ryo

```