convert grib2 to binary format with wgrib2

Arlindo da Silva arlindo.dasilva at GMAIL.COM
Wed Apr 8 15:27:42 EDT 2009


On Wed, Apr 8, 2009 at 11:55 AM, P.Romero <romero619 at hotmail.com> wrote:

>  I have questions about converting my grib2 data to binary:
>
>
>
> I tried running “wgrib2 mygrib2file.grb2 –bin mydata.bin”, which created a
> very large binary file.
>
> I then tried to use my existing .ctl file (that I had created with
> g2ctl.pl), and modify it to point to the new binary file.
>
> This seemed to work, grads didn’t complain when I tried to load the control
> file.
>
> However, when I tried to plot something, the values were completely off.
>
>
> Whats the correct way to export a grib2 file to binary using wgrib2 &
> create a proper .ctl file for this binary file?
>
>
>

Lats4d would give you a binary file in the same order as the ctl:

lats4d -i mydata.ctl -o mydata -format stream -v

(or use "-format sequential" for a fortran sequential file). This should
work with your ctl.  In addition you can any kind of subsetting/regridding
that lats4d usually does. See

    http://opengrads.org/doc/scripts/lats4d/

Remember, with grads v2 lats4d can only write binaries.

         Arlindo

-
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090408/2c4c92a4/attachment.html 


More information about the gradsusr mailing list