degrib msg and submsg
Wesley Ebisuzaki
Wesley.Ebisuzaki at NOAA.GOV
Tue Oct 9 10:33:14 EDT 2007
Patrick,
Patrick Reuter wrote:
> Dear all,
>
> I download grib2 files and have problems to degrib into Grads.
>
> I have the following inventory :
>
> 1:115:d=2007100706:HGT:850 mb:15 hour fcst
> 2:227347:d=2007100706:TMP:850 mb:15 hour fcst
> 3:315793:d=2007100706:RH:850 mb:15 hour fcst
> 4.1:411471:d=2007100706:UGRD:850 mb:15 hour fcst
> 4.2:411471:d=2007100706:VGRD:850 mb:15 hour fcst
>
> And I want to extract BOTH the UGRD/VGRD values. Here are my degrib
> commands :
>
> ./degrib grib2file -C -msg 4.1 -Flt -Interp -GrADS -out UGRD
> ./degrib grib2file -C -msg 4.2 -Flt -Interp -GrADS -out VGRD
>
The notation 4.1 (message #4, submessage #1) is unique to wgrib2. You
should consult the degrib documentation to see how they handle submessages.
If all else fails, you can also use wgrib2 to convert submessages to
messages by
wgrib2 -grib new_grib old_grib
> The first command works fine, but in the second command, I always get
> the following error message :
>
> ERROR: In call to Grib2Convert.
> ERROR: In call to ReadGrib2Record.
> ERROR: Unpack library error code (0 2)
>
> In other words, since the VGRD data is always stored in GRIB2
> submessages, I can't access to it.
>
> Is anybody familiar with my problem ?
>
> Thanks in advance
>
> Patrick
BTW if the grib2 files are lat-lon/mercator/gaussian-grid then you should
consider converting the files into netcdf using wgrib2. The netcdf files
can be opened by GrADS using the sdfopen command. I believe that
degrib can produce netcdf files too.
Wesley
More information about the gradsusr
mailing list