earthkit.meteo.wind.array.direction

earthkit.meteo.wind.array.direction(u, v, convention='meteo', to_positive=True)

Compute the direction/angle of a vector quantity.

Parameters:
  • u (array-like) – u wind/x vector component

  • v (array-like) – v wind/y vector component (same units as u)

  • convention (str, optional) –

    Specify how the direction/angle is interpreted. The possible values are as follows:

    • ”meteo”: the direction is the meteorological wind direction (see below for explanation)

    • ”polar”: the direction is measured anti-clockwise from the x axis (East/right) to the vector

  • to_positive (bool, optional) – If True, the resulting values are mapped into the [0, 360] range when convention is “polar”. Otherwise they lie in the [-180, 180] range.

Returns:

Direction/angle (degrees)

Return type:

array-like

Notes

The meteorological wind direction is the direction from which the wind is blowing. Wind direction increases clockwise such that a northerly wind is 0°, an easterly wind is 90°, a southerly wind is 180°, and a westerly wind is 270°. The figure below illustrates how it is related to the actual orientation of the wind vector:

../../../../../_images/wind_direction.png