WGRIB2 Question

Wesley Ebisuzaki Wesley.Ebisuzaki at NOAA.GOV
Thu Oct 11 15:27:43 EDT 2007


Mark Sponsler wrote:
> Is it possible to write the invetory from wgrib2 out to a text file? I
> don't need the actual data values in the grib, just the inventory.  The
> best I can do now is using the -spread option, which writes a snipet of
> the invetory out along with all the data (which will work in a pinch):
> wgrib2.exe grib_file -v -d 1 | wgrib2.exe -i grib_file -spread
> rec1_out.txt
>
> Just trying to get the 'date' out of the first record so I can automate
> building a ctl file.
>
> Any help would be appreciated.
>
> Thanks,
> Mark
>
Mark,

   How about

    wgrib2 grib -d 1  > line1

or

   date=`wgrib2  new.grb2 -d 1 -t  | sed 's/.*d=//'`

        Wesley



More information about the gradsusr mailing list