[GIS] Extract geographic subregion from grib2 file

grib-2

I'd like to extract a sub-region from a grib2 data file (GFS data from NOAA), writing the results into a separage grib2 file. I'd prefer it if I could use a lat/lon bounding box (the GFS data is on a regular lat/lon grid) but can deal with converting the latitudes/longitudes to grid coordinates.

I've tried some things wgrib2 but am running into configuration problems. None of the documented tricks directly address this. Before I go further down that route, which will probably require compiling from source, I'd like to confirm that (a) wgrib2 can actually do what I want and (b) fully understand the syntax for doing so. What looks like the relevant option for wgrib2, -small_grib, is marked as "beta", and it's not clear if "small grib" is just a term used in the help messages or if it is different from a "regular" grib file all together.

Alternately, if there are other tools/approaches for achieving the same ends, I'd like to know about them.

Best Answer

The easiest way is to download the regional subset of the GFS data from nomads.ncep.noaa.gov. Just select the grib_filter and fill in the blanks. The grib_filter web page has been using wgrib2 and the -small_grib option for 7 years, so the -small_grib option works.