wind_components

metpy.calc.wind_components(speed, wdir)[source]

Calculate the U, V wind vector components from the speed and direction.

Parameters:
  • speed (array_like) – The wind speed (magnitude)
  • wdir (array_like) – The wind direction, specified as the direction from which the wind is blowing, with 360 degrees being North.
Returns:

u, v (tuple of array_like) – The wind components in the X (East-West) and Y (North-South) directions, respectively.

Examples

>>> from metpy.units import units
>>> metpy.calc.wind_components(10. * units('m/s'), 225. * units.deg)
(<Quantity(7.071067811865475, 'meter / second')>,
 <Quantity(7.071067811865477, 'meter / second')>)