earthkit.meteo.wind.fieldlist.direction¶
- earthkit.meteo.wind.fieldlist.direction(u, v, convention='meteo', to_positive=True)¶
Compute the direction/angle of a vector quantity.
- Parameters:
u (
FieldList|Field) – u wind/x vector component.v (
FieldList|Field) – v wind/y vector component (same units asu). Must be of the same type asu(FieldList or Field) and have the same number of fields asu.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 whenconventionis “polar”. Otherwise they lie in the [-180, 180] range.
- Returns:
Direction/angle (degrees). The result has the same type as the input (FieldList or Field).
- Return type:
FieldList|Field
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: