With those poor people (like me) who need to decode a cryptic GRIB file,
I want to share loadgrib (http://ocgmod1.marine.usf.edu/loadgrib/), a
octave function to import variables from a GRIB file. GRIB is the file
format used by most weather forecasting centers to store their model
forecasts. It is standardized by the World Meteorological Organization.
This function is based on the wgrib tool of Wesley Ebisuzaki which he
placed into the public domain.
The example below shows the usage of loadgrib. It gives the air
temperature forecast in your home town (based on forecast of the NCEP
Global Forecast System). You will need wget and octave-forge.
my_lon = 278; % your longitude in degrees East [0:360]
my_lat = 28; % your latitude in degrees North [-90:90]
t = floor(time/86400) * 86400; % epoch time of last midnight
my_date = strftime('%Y%m%d',gmtime(t)); % current date in UTC
% load about 41 MB from NCEP GFS
system(['wget -O gfs.grib ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.' my_date '/gfs.t00z.sfluxgrbf24']);