wind_direction

metpy.calc.wind_direction(u, v)[source]

Compute the wind direction from u and v-components.

Parameters:
  • u (array_like) – Wind component in the X (East-West) direction
  • v (array_like) – Wind component in the Y (North-South) direction
Returns:

direction (pint.Quantity) – The direction of the wind in interval [0, 360] degrees, specified as the direction from which it is blowing, with 360 being North.

Notes

In the case of calm winds (where u and v are zero), this function returns a direction of 0.