[wxqc] Average wind direction?

steveh at softwx.com steveh at softwx.com
Thu Aug 10 23:00:12 EDT 2006


Hi,

For wind direction, you could use a unit vector average (not weighted by speed). 
Steps:
1. Convert wind dir degrees to radians
2. x = sin(winddir in radians)
3. y = cos(winddir in radians)
4. Vx = avg(x)      //i.e. sum(x) / number of samples
5. Vy = avg(y)
6. avg wind dir in radians = arcTan(Vx / Vy)
7. convert avg wind dir to degrees

Note that you have to include code to fixup the resultant quadrant. In Object Pascal (Delphi) there is an function that simplifies this; in step 6 you would use
avgWindDirRad := ArcTan2(Vx, Vy);

and after converting to degrees...
if (avgWindDirDeg < 0) then avgWindDirDeg := avgWindDirDeg + 180;

Here is a source for some detailed info on the topic:
http://www.bom.gov.au/bmrc/csr/prc/usepa-met-obs,4.5.99.rtf

Steve
  
======= At 2006-08-10, 10:46:20 you wrote: =======

>So, as I'm slowly making progress on this Perl script in the bits of
>time I get here and there, I'm stumped on how to come up with a wind
>direction average.  Maybe I'm putting too much thought into this?  I
>have several documents that describe the data fields, but no one
>document is clear on all of the elements (i.e., one document says the
>avg wind speed is an average over 5 minutes, another one says it's a
>10 minute sustained (minimum?) wind).
>
>Anyway I Google'd for info on average the wind direction and appears
>some of them try to take into account hte wind speed as well as part
>of that calculation.  I assumed it was just a an average sample based
>on direction alone.  Am I overanalyzing this?
>
>What formulas are people using to calculate the average wind direction
>in their own programming?
>
>-- 
>Joe Morris
>_______________________________________________
>wxqc mailing list
>Post messages to wxqc at lists.gladstonefamily.net
>To unsubcribe or change delivery options, please go to:
>http://pond1.gladstonefamily.net:8080/mailman/listinfo/wxqc
>
>The contents of this message are the responsibility of the author.




More information about the wxqc mailing list