sci.geo.meteorology (Meteorology) (sci.geo.meteorology) For the discussion of meteorology and related topics.

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Old June 15th 06, 09:04 PM posted to sci.geo.meteorology
external usenet poster
 
First recorded activity by Weather-Banter: Jun 2006
Posts: 1
Default Extracting wind data from grib files

I'm working on a simulation and would like to extract weather data from
grib files.

I'm not very familiar with grib files, but have manged to successfully
compile wgrib.c, and grib2ctl.c However, I'm still in the dark about
how to actually extract what I need from the files.

Which is: wind direction and speed for the nearest given latitude and
longitude.

To this end I would write a function, preferably in ANSI C (with an
eventual port to VB6, and/or VC++).

For example, a prototype of
float get_windspeed(float,float);

With usage like...

windspeed = getwindspeed(latitude,longitude);

I really don't want to reinvent the wheel, and I know there are a few
grib viewers out there that graphically display wind barbs based on
grib data, but what I really need is just the data itself.

I recently obtained a grib file centered at N27, W86 that is suppose to
have wind data for a 100 nm radius. Here's what I get when I run wgrib
and grib2ctl....what do I do with this?

-bash-2.05b$ ./wgrib -V n27w86.grb
rec 1:0:date 2006061512 UGRD kpds5=33 kpds6=1 kpds7=1 levels=(0,1)
grid=233 sfc 24hr fcst: bitmap: 2 undef
UGRD=u wind [m/s]
timerange 0 P1 24 P2 0 TimeU 1 nx 5 ny 7 GDS grid 0 num_in_ave 0
missing 0
center 7 subcenter 0 process 88 Table 0 scan: WE:NS winds(N/S)
latlon: lat 30.000000 to 24.038000 by 1.000000 nxny 35
long -89.000000 to -84.017000 by 1.250000, (5 x 7) scan 0
mode 128 bdsgrid 1
min/max data -6.93 2.23 num bits 8 BDS_Ref -693 DecScale 2
BinScale 2

rec 2:128:date 2006061512 VGRD kpds5=34 kpds6=1 kpds7=1 levels=(0,1)
grid=233 sfc 24hr fcst: bitmap: 2 undef
VGRD=v wind [m/s]
timerange 0 P1 24 P2 0 TimeU 1 nx 5 ny 7 GDS grid 0 num_in_ave 0
missing 0
center 7 subcenter 0 process 88 Table 0 scan: WE:NS winds(N/S)
latlon: lat 30.000000 to 24.038000 by 1.000000 nxny 35
long -89.000000 to -84.017000 by 1.250000, (5 x 7) scan 0
mode 128 bdsgrid 1
min/max data -4.05 2.87 num bits 8 BDS_Ref -405 DecScale 2
BinScale 2


-bash-2.05b$ ./grib2ctl.sh n27w86.grb
dset ^n27w86.grb
index ^n27w86.grb.idx
undef 9.999E+20
title n27w86.grb
* produced by grib2ctl v0.9.12.5p34b
dtype grib 233
options yrev
ydef 7 linear 24.038000 1
xdef 5 linear -89.000000 1.250000
tdef 1 linear 12Z15jun2006 1mo
zdef 1 linear 1 1
vars 2
UGRDsfc 0 33,1,1 ** surface u wind [m/s]
VGRDsfc 0 34,1,1 ** surface v wind [m/s]
ENDVARS




Any help appreciated....I'm stumped.

G

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How open GRIB files Karol_tom sci.geo.meteorology (Meteorology) 2 March 22nd 10 09:25 PM
Interpolating GRIB wind vectors [email protected] sci.geo.meteorology (Meteorology) 2 June 4th 07 11:34 AM
hi red GRIB files Dave sci.geo.meteorology (Meteorology) 1 June 4th 04 12:30 PM
grib files and coordinate location ob3wan sci.geo.meteorology (Meteorology) 1 January 16th 04 12:56 PM
Amateur techo wants to source GRIB data ... help? Alan Smith uk.sci.weather (UK Weather) 2 October 30th 03 11:46 AM


All times are GMT. The time now is 04:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Weather Banter.
The comments are property of their posters.
 

About Us

"It's about Weather"

 

Copyright © 2017