Hi Jeff,
I am using DEGRIB to convert grib2 files into a XML format, but i need to calulate wind direction and wind speed.
I believe this is stored in a grib message as
UGRD
VGRD
both in M/S
I used the formla atan2(y,x)
Where y is the V and x is U
is this correct? and is the output in DEG.
I am getting a little lost here, and wondered if you could help me out.
Ian
Wind Direction U and V
Ian,
Well, you are half right...but not quite. Yes, UGRD & VGRD are the way wind is 'packed' into GRIB messages. However, the numbers are not straight forward. Here are the formulas to get wind speed (M/S) & direction (grid relative) from the U & V
DIRECTION=57.29578*(arctangent(UGRD,VGRD))+180.
SPEED=SQRT(UGRD*UGRD+VGRD*VGRD)
Clear as mud...right? In essence, the UGRD is the North/South wind component (North is + & South is -) and VGRD is the East/West wind component (East is + West is - [I think...]).
Remember...you asked for it
Thanks,
Jeff
Well, you are half right...but not quite. Yes, UGRD & VGRD are the way wind is 'packed' into GRIB messages. However, the numbers are not straight forward. Here are the formulas to get wind speed (M/S) & direction (grid relative) from the U & V
DIRECTION=57.29578*(arctangent(UGRD,VGRD))+180.
SPEED=SQRT(UGRD*UGRD+VGRD*VGRD)
Clear as mud...right? In essence, the UGRD is the North/South wind component (North is + & South is -) and VGRD is the East/West wind component (East is + West is - [I think...]).
Remember...you asked for it

Thanks,
Jeff
Jeff,
No probs mate for the confusion, just glad you could help me out.
While Iam picking your brain for the maths, perhaps you would be able to help me out again.
I have two more calcs to do
1. PRATE, [kg/(m^2 s) to mm/h
2. Weather strings.
Now i was going to use the DAVIS weather software which came with my weather station to give a description of the weather based on the output of the GRIB model, but this is only based on pressure trends.
Is there a WMO standard for simple weather strings. I have looked on google, but have not found anything as of yet which made much sence to me.
Ian.
P.S
Wingridds is getting better with every relaese - keep up the good work.
No probs mate for the confusion, just glad you could help me out.
While Iam picking your brain for the maths, perhaps you would be able to help me out again.
I have two more calcs to do
1. PRATE, [kg/(m^2 s) to mm/h
2. Weather strings.
Now i was going to use the DAVIS weather software which came with my weather station to give a description of the weather based on the output of the GRIB model, but this is only based on pressure trends.
Is there a WMO standard for simple weather strings. I have looked on google, but have not found anything as of yet which made much sence to me.
Ian.
P.S
Wingridds is getting better with every relaese - keep up the good work.