Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

What is the best way to average wind direction? I have found many conflicting suggestions elsewhere. Best one I saw is to average SINs of all angles in radians and take inverse SIN of the result.

This is to be used to produce a windrose where the input must have one record per hour, but the data provided has several records per hour.

share|improve this question
1  
The real questions, I think, are 1) what do you mean by an average direction? 2) what do you want to use this for? –  Robert Israel Jun 10 '11 at 19:08
add comment

2 Answers

up vote 4 down vote accepted

While it's not quite meaningless to average the direction of the wind, it's ill-defined in many cases (imagine that you have a perfect east wind and a perfect west wind and you want to find the direction of their average!), and probably not really what you're after. Assuming that you have velocity data for the wind as well as directional data, you're best off turning the velocity+direction into a vector, adding those vectors, and then if you need a direction in the end, taking the direction of the result. In the case where your wind always has the same speed (or at least can be assumed to have constant speed), this is better than the mechanism you suggest: for instance, in your method an east wind ($\theta_0=0^{\circ}$) and a north wind ($\theta_1=90^{\circ}$) will give $s_0 = \sin(0^{\circ}) = 0$ and $s_1 = \sin(90^{\circ}) = 1$, so $s_{avg} = 0.5$ and $\theta_{avg} = \sin^{-1}(s_{avg}) = 30^{\circ}$, whereas the average-of-vectors method yields $v_0 = (\cos(\theta_0),\sin(\theta_0)) = (1,0), v_1 = (0,1), v_{avg} = (0.5, 0.5)$ and $\theta_{avg} = 45^{\circ}$. It also has the advantage that it's rotationally invariant; rotating the entire assemblage by any constant value (for instance, making your north wind a northeast wind and your east wind a southeast wind) will give an average that's the average of the initial data rotated by that amount. Note that in the case where the average is ill-defined, this method will yield a zero vector for the combined wind's direction, and so it (correctly) breaks down when trying to find an angle from that result.

share|improve this answer
    
You are right, the sine method is plain wrong. Thank you for the vector suggestion. +1 –  avguchenko Jun 11 '11 at 1:36
add comment

Averaging the sines of the inputs and taking the inverse sine of the result can't give you a sensible answer, since the range of the inverse sine function is $180^\circ$ rather than $360^\circ$.

You probably want to take the magnitude of the wind into account. For example, if you have a wind blowing to the east (at $0^\circ$) at 10 mph for half the time and to the north (at $90^\circ$) at 2 mph half the time, the average probably shouldn't be $45^\circ$ but something much closer to $0^\circ$.

A good solution would be to take the vectors of wind direction, add them all together and divide by the number of samples. For example, in the above case the average speed would be

$$\frac{(10,0) + (0,2)}{2} = (5,1)$$

which, if we plug it into the atan2 function gives a wind direction of $11.31^\circ$, or just slightly north of east. This method also has the nice property that it generalizes easily to higher dimensions which, though it might not be relevant for your work, is often an indicator that you're on the right track.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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