1
$\begingroup$

How would one compute the standard deviation of wind direction that can assume values between 0 and 360°? I have the wind information in u and v components and corresponding angle. Getting the average is possible to take the average of u and v and then compute the angle, while just averaging the angular information could result in averages of 180° when wind directions strays around 0°. If I took standard deviations of u and v, how would I have to compute them to get the standard deviation of the angle?

$\endgroup$
3
  • 2
    $\begingroup$ Circular measures of dispersion are not as intuitive as you might hope and are affected by whether you are just looking at angles or also at magnitudes. It is worth looking at en.wikipedia.org/wiki/… $\endgroup$
    – Henry
    Commented Dec 19, 2019 at 14:14
  • 1
    $\begingroup$ Could you explain what a standard deviation of an angle might mean, given that the numerical measure of an angle is defined only up to an integral multiple of 360 degrees? $\endgroup$
    – whuber
    Commented Dec 19, 2019 at 15:13
  • $\begingroup$ Sorry for my imprecise description. So basically I have 20Hz wind data and I want to plot the 10min average wind direction over time and have errorbars on it. To calculate those, I want to take the standard deviation - which is too large and wrong if wind direction values jump between 359 and 0, same for averaging. But the averaging issue can be dealt with by averaging wind in x and y directions and then compute the direction from them. I am not comfortable doing that with computing standard deviations from the wind components and go from there, not sure if that's allowed. $\endgroup$
    – sfluck
    Commented Dec 19, 2019 at 15:52

1 Answer 1

0
$\begingroup$

I had a similar problem and used Yamartino method: https://en.wikipedia.org/wiki/Yamartino_method which is one pass approximation for wind direction variation. in python it something like (the code is not optimised though):

from math import *
def yamartino(thetalist):
    s=0
    c=0
    n=0.0
    for theta in thetalist:
        s=s+sin(radians(theta))
        c=c+cos(radians(theta))
        n+=1
    s=s/n
    c=c/n
    eps=(1-(s**2+c**2))**0.5
    sigma=asin(eps)*(1+(2.0/3.0**0.5-1)*eps**3)
    return degrees(sigma)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.