convert grib2 to binary format with wgrib2

Lee and Amy Byerle leebyerle at COMCAST.NET
Thu Apr 9 07:03:17 EDT 2009


Romero, 
Have you tried just degribbing one field and see if it plots correctly? Then try another and cat them together (remember the order for ctl file). I use wgrib option for -nh (no header). 

Lee 
----- Original Message ----- 
From: "Wesley Ebisuzaki" <Wesley.Ebisuzaki at NOAA.GOV> 
To: GRADSUSR at LIST.CINECA.IT 
Sent: Wednesday, April 8, 2009 12:20:34 PM GMT -06:00 Guadalajara / Mexico City / Monterrey 
Subject: Re: convert grib2 to binary format with wgrib2 

Hi, 

In a grib file, the fields can be in any order. With a binary file, 
GrADS expects 
the fields to be in a specific order. In grib, a missing field is just 
not there. In 
a binary file, a missing field is an array of missing values. 
It is possible rearrange the order of the grib records and to add the 
missing fields, 
but why? 

Wesley Ebisuzaki 

P.Romero 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? 
> 
> Please help, 
> 
> Thanks, 
> 
> P.Romero 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090409/caea989b/attachment.html 


More information about the gradsusr mailing list