# ERA5: How to calculate wind speed and wind direction from u and v components of the wind?

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°.
Because trigonometry uses a polar coordinate system in which 0° is along the x axis, the meteorological angle definition can wreak havoc on typical angle calculations.
Fortunately, it is still easy to compute the wind components, u and v, given the meteorological wind angle. Let Φ be the meteorological wind direction angle, then the following equations can be applied:

\begin{align*} u &= - \mid\overrightarrow{\rm V}\mid \sin \phi \\ v &= - \mid\overrightarrow{\rm V}\mid \cos \phi \\ \mid\overrightarrow{\rm V}\mid &= \sqrt{u^2 + v^2} \end{align*}

Note that Φ must be in radians. If Φ is in degrees, multiply the angle by π/180 before using the trig functions.

It is also possible to compute Φ from u and v using the atan2 function.

On a spreadsheet, use the following equation to get an answer in degrees in the range 0 ≤ Φ < 360:

$\phi =\mod\left(180 + \frac{180}{\pi}atan2(v,u),360\right)$

The atan2 arguments vary by type of software and in some applications the arguments (v, u) are switched around. For more details please have a look at the section 'Realizations of the function in common computer languages' in the following link: https://en.wikipedia.org/wiki/Atan2

This document has been produced in the context of the Copernicus Climate Change Service (C3S).

The activities leading to these results have been contracted by the European Centre for Medium-Range Weather Forecasts, operator of C3S on behalf of the European Union (Delegation Agreement signed on 11/11/2014 and Contribution Agreement signed on 22/07/2021). All information in this document is provided "as is" and no guarantee or warranty is given that the information is fit for any particular purpose.

The users thereof use the information at their sole risk and liability. For the avoidance of all doubt , the European Commission and the European Centre for Medium - Range Weather Forecasts have no liability in respect of this document, which is merely representing the author's view.

Related articles

• Page:
• Page:
• Page:
• Page:
• Page: