lair.air.wind_components#

lair.air.wind_components(speed, wind_direction)[source]#

Calculate the u and v components of the wind.

Parameters:
  • speed (float) – Wind speed in m/s.

  • wind_direction (float) – Wind direction in degrees clockwise from North (specified as blowing from).

Returns:

tuple[float, float] – u and v components of the wind.

Return type:

tuple[Any, Any]

See also

wind_direction

The direction from the components.

Examples

A west wind (blowing from 270 degrees) at 10 m/s blows toward the east, so u is positive:

>>> from lair.air import wind_components
>>> u, v = wind_components(10.0, 270.0)
>>> round(float(u), 6), round(float(v), 6)
(10.0, 0.0)