cf.relative_vorticity(u, v, wrap=None, one_sided_at_boundary=False, radius=6371229.0, cyclic=None)[source]

Calculate the relative vorticity using centred finite differences.

The relative vorticity of wind defined on a Cartesian domain (such as a plane projection) is defined as

ζcartesian = δv/δx − δu/δy

where x and y are points on along the ‘X’ and ‘Y’ Cartesian dimensions respectively; and u and v denote the ‘X’ and ‘Y’ components of the horizontal winds.

If the wind field field is defined on a spherical latitude-longitude domain then a correction factor is included:

ζspherical = δv/δx − δu/δy + (u/a)tan(ϕ)

where u and v denote the longitudinal and latitudinal components of the horizontal wind field; a is the radius of the Earth; and ϕ is the latitude at each point.

The relative vorticity is calculated using centred finite differences (see the one_sided_at_boundary parameter).

The grid may be global or limited area. If missing values are present then missing values will be returned at points where the centred finite difference could not be calculated. The boundary conditions may be cyclic in longitude. The non-cyclic boundaries may either be filled with missing values or calculated with off-centre finite differences.

Reference: H.B. Bluestein, Synoptic-Dynamic Meteorology in Midlatitudes, 1992, Oxford Univ. Press p113-114

u: Field

A field containing the x-wind. Must be on the same grid as the y-wind.

v: Field

A field containing the y-wind. Must be on the same grid as the x-wind.

radius: optional

The radius of the sphere when the winds are on a spherical polar coordinate domain. May be any numeric scalar object that can be converted to a Data object (which includes numpy array and Data objects). By default radius has a value of 6371229.0 metres, representing the Earth’s radius. If units are not specified then units of metres are assumed.

Parameter example:

Five equivalent ways to set a radius of 6371200 metres: radius=6371200, radius=numpy.array(6371200), radius=cf.Data(6371200), radius=cf.Data(6371200, 'm'), radius=cf.Data(6371.2, 'km').

wrap: bool, optional

Whether the longitude is cyclic or not. By default this is autodetected.

one_sided_at_boundary: bool, optional

If True then if the field is not cyclic off-centre finite differences are calculated at the boundaries, otherwise missing values are used at the boundaries.


The relative vorticity calculated with centred finite differences.