vorticity

vorticity(fx, fy, mode='fdiff', poles_missing_values=False)

Computes the vertical component of the curl differential operator for 2-dimensional vector fields. For wind fields (i.e. when the input fieldsets are u and v wind components) it computes the relative vorticity (\(\zeta\)).

Parameters
  • fx (Fieldset) – zonal (west-east) vector component fieldset

  • fy (Fieldset) – meridional (south-north) vector component fieldset

  • mode ({"fdiff", "felem"}, default: "fdiff") – specifies the computation mode (see below). New in Metview version 1.5.3.

  • poles_missing_values (bool, default: False) – puts missing values at the poles when mode is “felem”. New in Metview version 1.5.3.

Return type

Fieldset

The numerical method to compute the vorticity is based on the value of mode.

When mode is “fdiff”:

  • a second order finite-difference approximation is used

  • the output fields contain missing values at the poles

  • only works for regular latitude-longitude grids

When mode is “felem”:

  • a finite-element technique is used

  • works with (regular and reduced) latitude-longitude and Gaussian grids

  • no missing values are allowed in fs!

  • the computations are performed by using regrid() with the nabla=”uv_vorticity” option

The computations for a vector field f=(fx,fy) are based on the following formula:

\[\zeta =\frac{1}{R \ cos\phi}\frac{\partial f_y}{\partial \lambda} - \frac{1}{R}\frac{\partial f_x}{\partial \phi} + \frac{f_x}{R}tan\phi\]

where:

  • R is the radius of the Earth (in m)

  • \(\phi\) is the latitude

  • \(\lambda\) is the longitude

If the input fields are horizontal wind components the ecCodes paramId of the resulting field is set to 138 (relative vorticity).