Home |
Search |
Today's Posts |
![]() |
|
sci.geo.meteorology (Meteorology) (sci.geo.meteorology) For the discussion of meteorology and related topics. |
|
LinkBack | Thread Tools | Display Modes |
#1
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How open GRIB files | sci.geo.meteorology (Meteorology) | |||
Interpolating GRIB wind vectors | sci.geo.meteorology (Meteorology) | |||
hi red GRIB files | sci.geo.meteorology (Meteorology) | |||
grib files and coordinate location | sci.geo.meteorology (Meteorology) | |||
Amateur techo wants to source GRIB data ... help? | uk.sci.weather (UK Weather) |