<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 <hmjbarbosa@GMAIL.COM></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> 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>> Dear Oluseun,<br>><br>> Verify the invalid descriptor. If you have 432 X-values, your X-step<br>> cannot be -32.767... that would mean almost going 40 times around<br>> the globe!<br>><br>> Please check the grads help pages:<br>><br>> http://grads.iges.org/grads/gadoc/descriptorfile.html<br>><br>> There you will learn howto properly setup XDEF<br>><br>> Cheers,<br>> Henrique<br>><br>><br>> On 4/12/06, oluseun idowu <oluseun_idowu @yahoo.com=""> wrote:<br>> ><br>> > Dear Diane,<br>> > Many thanks for your help. I gave the command<br>>
><br>> > [oluseun@b129pc124 ~]$ gribmap -v -i sample_grib_file.ctl<br>> ><br>> > This is the error message<br>> ><br>> > Open Error: Missing or invalid dimension increment value<br>> > --> The invalid description file record is:<br>> > --> xdef 432 linear 340.000000 -32.767000<br>> ><br>> ><br>> > The data file was not opened.<br>> > File name is: sample_grib_file.ctl<br>> ><br>> > Anyway as you suggested, I attach the file to this email and again, the data<br>> > was received from UK Met Office<br>> > from their limited area model<br>> ><br>> > I will expect your reply. Thanks once more!<br>> ><br>> > Idowu<br>> ><br>> > Below is the description of the file as given to me from UK Met Office.<br>> > ----------------------------------------------------------------------<br>> > OK, I've attached a sample grib file to this e-mail.
It
contains the<br>> > level-1 model temperature field at T+48 and T+54. Once you confirm you<br>> > can read this I'll put the full data-set for one forecast onto our ftp<br>> > server: email.metoffice.gov.uk. This will be ~660Mb of data. We can get<br>> > these file-sizes down if you can work with data over a smaller<br>> > geographical area or you don't need all the vertical levels.<br>> ><br>> > Luke.<br>> > ----------------------------------------------------------------------------------------------------------------------------------------------------<br>> ><br>> ><br>> ><br>> > Diane Stokes <Diane.Stokes @noaa.gov=""> wrote:<br>> ><br>> > Dear Idowu,<br>> ><br>> > That's just a warning message. It's possible that reasonable variable<br>> > names were chosen for your data. Did you try to run gribmap on the new<br>> > ctl file yet?<br>> ><br>> > gribm
ap -v -i
sample_grib_file.grib.ctl<br>> > The "-v" (verbose) option is important as it will tell you which records<br>> > matched. Other options may be necessary as well, but the above is a start.<br>> ><br>> > If g ribmap does not work, please post your control file to the list.<br>> ><br>> > That may help us to help you.<br>> ><br>> > Also, where did you get your sample grib file, sample_grib_file.grib?<br>> ><br>> > Diane<br>> ><br>> ><br>> > oluseun idowu wrote:<br>> > > Dear Diane,<br>> > > Thanks for your help. I can find the grib2ctl.pl in my system now though<br>> > > under grib_files folder. The next problem is that in an attempt to make<br>> > > grib.ctl file the error message below was reported. Any further help?<br>> > ><br>> > > [oluseun@b129pc124 ~]$ ./grib_files/grib2ctl.pl sample_grib_file.grib<br>> > >
>sample_grib_file.grib.ctl<br>> > ><br>> > > Undefined parameter table (center 74-2 table 160), using NCEP-opn<br>> > ><br>> > > Undefined parameter table (center 74-2 table 160), using NCEP-opn<br>> > ><br>> > ><br>> > ><br>> > ><br>> > > */Diane Stokes /* wrote:<br>> > ><br>> > > The web address is actually:<br>> > ><br>> > ><br>> > http://www.cpc.ncep.noaa.gov/products/wesley/grib2ctl.html<br>> > ><br>> > > There's some useful information there in addition to the link to the<br>> > > script.<br>> > ><br>> > > Diane<br>> > ><br>> > > See Hai Ooi wrote:<br>> > > > Dear Oluseun Idowu,<br>> > > ><br>> > > > The grib2 ctl.pl is available in the website you<br>> > > > indicated<br>> > > >
[http://www.cpc.noaa.gov/products/wesley/grib2ctl.html]<br>> > > > Anyway, hope the attached perl file can help you to<br>> > > > resolve your problem. If in doubt, please refer to the<br>> > > > usage document in the above-mentioned webpage.<br>> > > ><br>> > > > Best regards.<br>> > > ><br>> > > > Ooi<br>> > > ><br>> > > ><br>> > > ><br>> > > > Send instant messages to your online friends<br>> > > http://uk.messenger.yahoo.com<br>> > ><br>> > ><br>> > ><br>> > ------------------------------------------------------------------------<br>> > > To help you stay safe and secure online, we've developed the all new<br>> > > *Yahoo! Security Centre*<br>> > > .<br>> > ><br>> ><br>> > --<br>> > Diane Stokes<br>> > Environmental Modeling Center<br>> &
gt;
National Weather Service/NOAA<br>> ><br>> ><br>> ><br>> ><br>> ><br>> > ________________________________<br>> > Yahoo! Cars NEW - sell your car and browse thousands of new and used cars<br>> > online search now ________________________________<br>> ><br>> ><br>> ><br>> ><br>><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°</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>