<div>Idowu,</div> <div>Perhaps you could mention, when you write to UKMO, that the grib files from their global models (which we have at ACMAD on SYNERGIE) present no problem (to us) in creating ctl files and dsiplaying in GrADS. I suppose the files you are trying to work with are from the Africa-LAM model, which we do not have. If this is the case, perhaps the could code the later in a similar way to the former.</div> <div>BTW, if you are working on a Windows platform, this could also be a source of problems, because when you transfer files from *NIX to Windows, the later may try to interpret the data as ASCII.</div> <div> </div> <div>For you to create ctl file, proceed as:</div> <div>grib2ctl.pl <EM>grib_file_name >ctl_file_name</EM></div> <div><EM></EM>the <EM>grib_file_name</EM> is the file you have in grib format</div> <div>the<EM> ctl_file_name</EM> is the name you have to give</div> <div> </div> <div>If your grib file contains a combination of
analyses and forecasts, it is useful to use<BR>grib2ctl.pl -verf <EM>grib_file_name >ctl_file_name</EM></div> <div><EM></EM> </div> <div>Once you have created the ctl file you have to use gribmap as follows:</div> <div>gribmap -i <EM>ctl_file_name</EM> -0 -v</div> <div>the -v option is useful to show which records have matched (i.e. successfully scanned).</div> <div> </div> <div>Zilore Mumba</div> <div><BR><B><EM>oluseun idowu <oluseun_idowu@YAHOO.COM></EM></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"> <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="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">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> <div> <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></BLOCKQUOTE><BR><BR><BR><p>
<hr size=1><a href="http://us.rd.yahoo.com/mail_us/taglines/postman3/*http://us.rd.yahoo.com/evt=39666/*http://beta.messenger.yahoo.com">Yahoo! Messenger with Voice.</a> PC-to-Phone calls for ridiculously low rates.