<div id="RTEContent">Thank you all for your help. I have written to the UK office to see if the grib files can be properly encoded.<br> <br> Can you pls tell me the commands (step by step) to use when I want to, create the ctl with grib2ctl.pl and modify the X and Y steps? And again, to change the name of the variable so that I can input the final ctl file and eventually able to plot with GrADS.<br> <br> Thanks <br><br><b><i>Henrique Barbosa &lt;hmjbarbosa@GMAIL.COM&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Dear Oluseun,<br><br>There is a program call wgrib which is very usefull to find out what is<br>inside a misterius grib file. Here's the output I have from runing it<br>with your sample file:<br><br>71 hbarbosa@azusa hbarbosa&gt; wgrib -verf -V sample_grib_file.grib<br><br>Undefined parameter table (center 74-2 table 160), using NCEP-opn<br>rec 1:0:date 2006032218 PVORT kpds5=4 kpds6=
 205
 kpds7=1 levels=(0,1)<br>grid=255  48hr fcst:<br>  PVORT=Pot. vorticity [km^2/kg/s]<br>  timerange 0 P1 48 P2 0 TimeU 1  nx 432 ny 432 GDS grid 0 num_in_ave<br>0 missing 0<br>  center 74 subcenter 2 process 1 Table 160<br>  latlon: lat  -37.500000 to 40.080000 by -32.767000  nxny 186624<br>          long 340.000000 to 57.580000 by -32.767000, (432 x 432) scan<br>64 mode 0 bdsgrid 1<br>  min/max data 269.25 314.125  num bits 24  BDS_Ref 269.25  DecScale 0<br>BinScale -18<br><br>rec 2:560228:date 2006032300 PVORT kpds5=4 kpds6=205 kpds7=1<br>levels=(0,1) grid=255  54hr fcst:<br>  PVORT=Pot. vorticity [km^2/kg/s]<br>  timerange 0 P1 54 P2 0 TimeU 1  nx 432 ny 432 GDS grid 0 num_in_ave<br>0 missing 0<br>  center 74 subcenter 2 process 1 Table 160<br>  latlon: lat  -37.500000 to 40.080000 by -32.767000  nxny 186624<br>          long 340.000000 to 57.580000 by -32.767000, (432 x 432) scan<br>64 mode 0 bdsgrid 1<br>  min/max data 266.75 310.375  num bits 24  BDS_Ref 266.75  DecScale
 0<br>BinScale -18<br><br><br>As you can see, you grib file is wrongly encoded and it reports that<br>the step in X and Y<br>directions are -32.767 degrees.... and that is exactly what you get when you run<br>grib2ctl.pl<br><br>Well, what I did then was to create the ctl with grib2ctl.pl and<br>modify the X and Y steps.<br>I did it like:<br><br>X-step = (40.08 - (-37.5)) / 432 = 0.17958333<br>Y-step = (57.58 - (340-360)) / 432 = 0.17958333<br><br>Oh, I also changed the name of the variable because your grib file<br>uses a non-standard<br>table and grib2ctl was confused... So here is the final ctl for you file:<br><br>dset ^sample_grib_file.grib<br>index ^sample_grib_file.grib.idx<br>undef 9.999E+20<br>title sample_grib_file.grib<br>*  produced by grib2ctl v0.9.12.5p33k<br>dtype grib 255<br>ydef 432 linear -37.500000 0.17958333<br>xdef 432 linear 340.000000 0.17958333<br>tdef 2 linear 18Z22mar2006 6hr<br>zdef 1 linear 1 1<br>vars 1<br>temp  0 4,205,1  ** temp<br>ENDVARS<br><br
 >now you
 just have to run gribmap on it and you should get it right.<br>I did and I am sending attached an image of the temperature field.<br><br>By the way, I would write to the UKMet guys if I were you. Just to check<br>why their grib files are encoded with the wrong X-Y-step.<br><br>Cheers,<br>Henrique<br><br><br>On 4/12/06, Henrique Barbosa <hmjbarbosa @gmail.com=""> wrote:<br>&gt; Dear Oluseun,<br>&gt;<br>&gt; Verify the invalid descriptor. If you have 432 X-values, your X-step<br>&gt; cannot be -32.767... that would mean almost going 40 times around<br>&gt; the globe!<br>&gt;<br>&gt; Please check the grads help pages:<br>&gt;<br>&gt; http://grads.iges.org/grads/gadoc/descriptorfile.html<br>&gt;<br>&gt; There you will learn howto properly setup XDEF<br>&gt;<br>&gt; Cheers,<br>&gt; Henrique<br>&gt;<br>&gt;<br>&gt; On 4/12/06, oluseun idowu <oluseun_idowu @yahoo.com=""> wrote:<br>&gt; &gt;<br>&gt; &gt;  Dear Diane,<br>&gt; &gt; Many thanks for your help. I gave the command<br>&gt;
 &gt;<br>&gt; &gt; [oluseun@b129pc124 ~]$ gribmap -v -i sample_grib_file.ctl<br>&gt; &gt;<br>&gt; &gt; This is the error message<br>&gt; &gt;<br>&gt; &gt; Open Error: Missing or invalid dimension increment value<br>&gt; &gt;  --&gt; The invalid description file record is:<br>&gt; &gt;  --&gt; xdef 432 linear 340.000000 -32.767000<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;  The data file was not opened.<br>&gt; &gt; File name is: sample_grib_file.ctl<br>&gt; &gt;<br>&gt; &gt; Anyway as you suggested, I attach the file to this email and again, the data<br>&gt; &gt; was received from UK Met Office<br>&gt; &gt; from their limited area model<br>&gt; &gt;<br>&gt; &gt; I will expect your reply. Thanks once more!<br>&gt; &gt;<br>&gt; &gt; Idowu<br>&gt; &gt;<br>&gt; &gt; Below is the description of the file as given to me from UK Met Office.<br>&gt; &gt; ----------------------------------------------------------------------<br>&gt; &gt; OK, I've attached a sample grib file to this e-mail.
  It
 contains the<br>&gt; &gt; level-1 model temperature field at T+48 and T+54. Once you confirm you<br>&gt; &gt; can read this I'll put the full data-set for one forecast onto our ftp<br>&gt; &gt; server: email.metoffice.gov.uk. This will be ~660Mb of data. We can get<br>&gt; &gt; these file-sizes down if you can work with data over a smaller<br>&gt; &gt; geographical area or you don't need all the vertical levels.<br>&gt; &gt;<br>&gt; &gt;  Luke.<br>&gt; &gt; ----------------------------------------------------------------------------------------------------------------------------------------------------<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; Diane Stokes <Diane.Stokes @noaa.gov=""> wrote:<br>&gt; &gt;<br>&gt; &gt;  Dear Idowu,<br>&gt; &gt;<br>&gt; &gt; That's just a warning message. It's possible that reasonable variable<br>&gt; &gt; names were chosen for your data. Did you try to run gribmap on the new<br>&gt; &gt; ctl file yet?<br>&gt; &gt;<br>&gt; &gt;  gribm
 ap -v -i
 sample_grib_file.grib.ctl<br>&gt; &gt; The "-v" (verbose) option is important as it will tell you which records<br>&gt; &gt; matched. Other options may be necessary as well, but the above is a start.<br>&gt; &gt;<br>&gt; &gt; If g ribmap does not work, please post your control file to the list.<br>&gt; &gt;<br>&gt; &gt; That may help us to help you.<br>&gt; &gt;<br>&gt; &gt; Also, where did you get your sample grib file, sample_grib_file.grib?<br>&gt; &gt;<br>&gt; &gt;  Diane<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; oluseun idowu wrote:<br>&gt; &gt; &gt; Dear Diane,<br>&gt; &gt; &gt; Thanks for your help. I can find the grib2ctl.pl in my system now though<br>&gt; &gt; &gt; under grib_files folder. The next problem is that in an attempt to make<br>&gt; &gt; &gt; grib.ctl file the error message below was reported. Any further help?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; [oluseun@b129pc124 ~]$ ./grib_files/grib2ctl.pl sample_grib_file.grib<br>&gt; &gt; &gt;
 &gt;sample_grib_file.grib.ctl<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Undefined parameter table (center 74-2 table 160), using NCEP-opn<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Undefined parameter table (center 74-2 table 160), using NCEP-opn<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; */Diane Stokes /* wrote:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; The web address is actually:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; http://www.cpc.ncep.noaa.gov/products/wesley/grib2ctl.html<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; There's some useful information there in addition to the link to the<br>&gt; &gt; &gt; script.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Diane<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; See Hai Ooi wrote:<br>&gt; &gt; &gt; &gt; Dear Oluseun Idowu,<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; The grib2 ctl.pl is available in the website you<br>&gt; &gt; &gt; &gt; indicated<br>&gt; &gt; &gt; &gt;
 [http://www.cpc.noaa.gov/products/wesley/grib2ctl.html]<br>&gt; &gt; &gt; &gt; Anyway, hope the attached perl file can help you to<br>&gt; &gt; &gt; &gt; resolve your problem. If in doubt, please refer to the<br>&gt; &gt; &gt; &gt; usage document in the above-mentioned webpage.<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; Best regards.<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; Ooi<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; Send instant messages to your online friends<br>&gt; &gt; &gt; http://uk.messenger.yahoo.com<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; ------------------------------------------------------------------------<br>&gt; &gt; &gt; To help you stay safe and secure online, we've developed the all new<br>&gt; &gt; &gt; *Yahoo! Security Centre*<br>&gt; &gt; &gt; .<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt; --<br>&gt; &gt; Diane Stokes<br>&gt; &gt; Environmental Modeling Center<br>&gt; &
 gt;
 National Weather Service/NOAA<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;  ________________________________<br>&gt; &gt;  Yahoo! Cars NEW - sell your car and browse thousands of new and used cars<br>&gt; &gt; online search now ________________________________<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt;<br></Diane.Stokes></oluseun_idowu></hmjbarbosa></blockquote><br></div><p>
                <hr size=1><font face="Arial" size="2"><a href="http://us.rd.yahoo.com/mail/uk/taglines/default/360/*http://uk.360.yahoo.com">Yahoo! 360&deg;</a> <font color="red">NEW</font> – Your one place to <a href="http://us.rd.yahoo.com/mail/uk/taglines/default/360/*http://uk.360.yahoo.com">blog, create, publish & share</a>!</font>