To calculate direction with Uwind and Vwind
NASER SARHAN
meet100 at YAHOO.COM
Sat Oct 7 18:52:10 EDT 2006
Dear MacLeod and Jeremy,
Why you did not use this formula
'set gxout barb'
'd u;v' or
'd u;v; mag (u,v)'
Many Thanks
Naser
Mac MacLeod <mmacleod at SCOTIAWEATHER.COM> wrote:
Hi Jeremy
Following is a formulation provided me by Dr. Brian Doty to calculate wind
direction and speed utililizing the u component and the v component of the
wind at any level.
This particular code piece is from a script that calcualtes the 10 metre
wind output values for selected points from the GFS.
****** Calculate the 10 metre AGL wind direction and speed
************************************
'define spd10 = mag(u10,v10) '
'display spd10 '
WndSpd10 = subwrd(result,4)
WndSpd10 = math_format(fmt,WndSpd10)
'define d1 = -atan2(u10,-v10)*180/3.1416'
'define d2 = const(maskout(d1,d1),0,-u)'
'define d3 = const(360+maskout(d1,-d2),0,-u)'
'define dir10 = d2+d3'
'display dir10'
Wnddir10 = subwrd(result,4)
If (Wnddir10 < 1)
Wnddir10 = math_nint(360.0)
ELSE
Wnddir10 = math_format(fmt,Wnddir10)
ENDIF
The WndSpd10 = subwrd(result,4) then WndSpd10 = math_format(fmt,WndSpd10)
and the section:
Wnddir10 = subwrd(result,4)
If (Wnddir10 < 1)
Wnddir10 = math_nint(360.0)
ELSE
Wnddir10 = math_format(fmt,Wnddir10)
ENDIF
permit me to print out these values as integers.
All the best with this.
Regards,
Mac MacLeod
M.A.(Mac) MacLeod
President and General Manager,
Scotia Weather Services Inc.
192 Wyse Road, Suite 8,
Dartmouth, Nova Scotia, B3A 1M9
Tele: 902-468-3866
Cell: 902-225-5747
Fax: 902-461-1768
E-mail: mmacleod at scotiaweather.com
visit us at: www.scotiaweather.com
----- Original Message -----
From: "Jeremy Gaultier"
To:
Sent: Friday, October 06, 2006 5:27 PM
Subject: To calculate direction with Uwind and Vwind
> Hello,
>
> I seek a formulate to calculate the direction of the moderate wind to the
> data Uwind and Vwind component coming from GFS on Nomads.
> I did not find any formula on the Web, can you help me?
>
> Thank you in advance.
> Good day.
>
Kind Regards
Naser Sarhan
School of Environmental Sciences
University of East Anglia
Norwich NR4 7TJ
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20061007/0e57256d/attachment.html
More information about the gradsusr
mailing list