[Thread Prev][Thread Next][Index]

Re: [ferret_users] Calculating relative vorticity



Amazingly, I think Ryo is wrong about the sphere/cosine business. If (u,v) is given on a lat/lon grid, then Ferret will do this automatically. To add the cosine factor explicitly as in the example will produce an error.

The documentation (Ch3 Sec2.4.1. General information about transformations), says:

When calculating integrals and derivatives (@IIN, @DIN, @DDC, @DDF, and @DDB) Ferret attempts to use standardized units for the grid coordinates. If the underlying axis is in a known unit of length Ferret converts grid box lengths to meters. If the underlying axis is in a known unit of time Ferret converts grid box lengths to seconds. If the underlying axis is degrees of longitude a factor of COSINE (latitude) is applied to the grid box lengths in meters.

Even Ryo is not perfect! Astonishing!

Billy K

On Jun 25, 2008, at 1:14 PM, Ryo Furue wrote:

Hi Paulo Santiago and Savin,

| Supposing you are using relative vorticity defined as
|
| zeta = du/dx - dv/dy
|
| in Ferret, you can do something like:
|
| let dudx = u[i=@ddc]
| let dvdy = v[j=@ddc]
| let zeta = dudx - dvdy

Except that zeta = dv/dx - du/dy  , assuming that u and x are
eastward and v and y are northward.

I have two more caveats:

1) The formula above is correct only when u and v are defined on the
 same grid;

2) The formula above is an approximation on a sphere.  The real curl
 is dv/dx - d(u cos(phi))/dy/cos(phi)  or something like that
 (please don't believe it without checking), where phi is the
 latitude, dx = a cos(phi) d(lambda), and dy = a d(phi).
 If you want to include the cosine factor you can use

    let c = cos(pi*y[gy=u]/180.0)
    let cu = c * u
    let dudy  = cu[j=@ddc]
    let dv/dx = v[i=@ddc]
    let zeta = dvdx - dudy/c

 or along the lines.

Cheers,
Ryo



[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement