get_wind_components

metpy.calc.get_wind_components(u, v)[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')>)

Deprecated since version 0.9.0: Function has been renamed to wind_components and will be removed from MetPy in 0.12.0.