<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE title=owaParaStyle>P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
<META content="MSHTML 6.00.5730.13" name=GENERATOR></HEAD>
<BODY ocsi="x">
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2>Here is what I do, based on info I dug up in the wgrib2
pages:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2>There is a small bug in the grib2 file system that requires
a kludge so that grads can view it:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2>bash script segment:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2>wgrib2 $downloaded_grib_file -set_flag_table_3.3 48 -grib
$modified_grib_file</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2>g2ctl $modified_grib_file >
$CTL_filename</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2>gribmap -1 $CTL_filename</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2>Of course you may need to point to the full path for wgrib2
g2ctl gribmap.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2>In short, take the downloaded grib file , use wgrib2 to
adjust the resolution parameter using "-set_flag_table_3.3 48" output to a new
grib file. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2>Then use g2ctl to make the contrl file.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2>This is for files downloaded from NCEP, so presumably
should be same as for NOAA. It has something to do with grid spacing, and my
impression (which may be wrong) is it may only be necessasry for certain grids
like the lambert conformal.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2>Regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=404213414-26082010><FONT face=Arial
color=#008000 size=2>Alister.</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> gradsusr-bounces@gradsusr.org
[mailto:gradsusr-bounces@gradsusr.org] <B>On Behalf Of </B>Joralf
Quist<BR><B>Sent:</B> Thursday, August 26, 2010 8:26 AM<BR><B>To:</B>
gradsusr@gradsusr.org<BR><B>Subject:</B> [gradsusr] Making .ctl file of grib2
files<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr><FONT face=Tahoma color=#000000 size=2>Hi all,</FONT></DIV>
<DIV dir=ltr><FONT face=Tahoma size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Tahoma size=2>Another question which is bothering me.
I've got grib2files which I download through a perlscript from the NOAA server.
Ofcourse I want to make a .ctl file, so I can read them into Grads.</FONT></DIV>
<DIV dir=ltr><FONT face=Tahoma size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Tahoma size=2>I've downloaded the latest version of
g2ctl and installed wgrib2. I can read the file with wgrib2, it
gives:</FONT></DIV>
<DIV dir=ltr><FONT face=Tahoma size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Tahoma size=2>-bash-3.2$ ./wgrib2
gfs.2010082606-gfs.t06z.pgrbf00.grib2<BR>1:115:d=2010082606:TMP:2 m above
ground:anl:<BR>2:35533:d=2010082606:RH:2 m above
ground:anl:<BR>3.1:89724:d=2010082606:UGRD:10 m above
ground:anl:<BR>3.2:89724:d=2010082606:VGRD:10 m above
ground:anl:<BR>4:219680:d=2010082606:TCDC:convective cloud
layer:anl:<BR>5:219976:d=2010082606:PRMSL:mean sea level:anl:<BR></FONT></DIV>
<DIV dir=ltr><FONT face=Tahoma size=2>But whenever I try to make a ctl file it
gives this error message:</FONT></DIV>
<DIV dir=ltr><FONT face=Tahoma size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Tahoma size=2>-bash-3.2$ ./g2ctl.pl
gfs.2010082606-gfs.t06z.pgrbf00.grib2>forecast.ctl<BR>*** script needs to be
modified ***<BR>*** unknown grid ***<BR></FONT></DIV>
<DIV dir=ltr><FONT face=Tahoma size=2><FONT face=tahoma>My collegue did manage
to make a .ctl file in Windows with the same perlscript. But I want it to run in
Linux.</FONT></DIV></FONT>
<DIV dir=ltr><FONT face=Tahoma size=2><FONT
face=tahoma></FONT> </DIV></FONT>
<DIV dir=ltr><FONT face=Tahoma size=2>I've looked into the perlscript but
couldn't find any information about this error. As anybody got a clue how to fix
this problem?</FONT></DIV>
<DIV dir=ltr><FONT face=Tahoma size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Tahoma size=2>I'm using version 2.0.a5.oga.5 of the Grid
Analysis and Display System (GrADS) on a x86_64 x86_64 x86_64 GNU/Linux
OS.</FONT></DIV>
<P><FONT face=Tahoma size=2></FONT> </P>
<P><FONT face=Tahoma size=2>Oh, and I see my reply to my last thread was put in
a new thread, how do I correctly reply to the messages on the list?</FONT></P>
<P><FONT face=Tahoma size=2></FONT> </P>
<P><FONT face=Tahoma size=2>Thanks a lot!</FONT></P>
<P><FONT face=Tahoma size=2></FONT> </P>
<P><FONT face=Tahoma size=2>Joralf Quist</FONT></P>
<DIV dir=ltr><BR><BR></DIV></BODY></HTML>