To calculate direction with Uwind and Vwind

Mac MacLeod mmacleod at SCOTIAWEATHER.COM
Fri Oct 6 10:39:39 EDT 2006


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" <webmaster at METEOROLOGIC.NET>
To: <GRADSUSR at LIST.CINECA.IT>
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.
>



More information about the gradsusr mailing list