<div dir="ltr">Use gribmap to make the index file. I don't know what you are attempting by copying a text file. Gribmap is a Grads utility, so look for it in your GADDIR location.<div><br></div><div>gribmap -e -i (control file)</div>
<div><br></div><div>Jeff Duda</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 16, 2014 at 7:52 PM, Ethan Sacoransky <span dir="ltr"><<a href="mailto:ethan.saco@me.com" target="_blank">ethan.saco@me.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">You guys are the best. That worked. Now, just need to copy and paste into a text document in order to convert into an index file. Only problem is that control files will not open on a Mac OSX 10.7.5. Does anybody know of any programs that can do this?<div>
<span class="HOEnZb"><font color="#888888">Ethan</font></span><div><div class="h5"><br><div><div>On 2014-01-16, at 8:29 PM, Eric Altshuler wrote:</div><br><blockquote type="cite"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div>
<div style="font-size:12pt;font-family:arial,helvetica,sans-serif">Another way to make sure the shell finds the g2ctl script is to execute it using either an absolute path, for example:<div><br></div><div>/path/to/scripts/g2ctl</div>
<div><br></div><div>or with a relative path, e.g. if g2ctl is in the current directory:</div><div><br></div><div>./g2ctl</div><div><br></div><div>Also, make sure the file 'g2ctl' has owner execute permission. Sometimes, when downloading an executable file from the internet, the local file does not have execute permission. To make sure it does, do this:</div>
<div><br></div><div>chmod u+x g2ctl</div><div><br></div><div>There are other possible issues, such as where perl is installed on your system. If it's not where the script is looking for it, there will be an error. Hopefully this won't happen.</div>
<div><br></div><div>Eric<br><br><hr><b>From:<span> </span></b>"Aaron @ LSC Perry" <<a href="mailto:Aaron.Perry@lsc.vsc.edu" target="_blank">Aaron.Perry@lsc.vsc.edu</a>><br><b>To:<span> </span></b>"GrADS Users Forum" <<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>><br>
<b>Sent:<span> </span></b>Thursday, January 16, 2014 7:45:22 PM<br><b>Subject:<span> </span></b>Re: [gradsusr] Opening a Grb2 File<br><br><div style="direction:ltr;font-size:10pt;font-family:Tahoma">Ethan,<br><br>You must first tell your bash what g2ctl is and where it is located.<br>
<br>Open up a new terminal and type "gedit .bashrc"<br><br>>From there, set an alias for g2ctl (including the absolute path to where it's located in your filesystem)<br><br>Then exit out of the terminal and try running g2ctl again and see if it works.<br>
<div><br><div style="font-family:Tahoma;font-size:13px"><div style="font-family:Tahoma;font-size:13px"><div style="font-family:Tahoma;font-size:13px"><div style="font-family:Tahoma;font-size:13px"><div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px"><div style="font-family:Tahoma;font-size:13px"><div style="font-family:Tahoma;font-size:13px"><font size="3"><font face="Arial"><font face="Tahoma"><font><br>Onward and Upward,<br>
<br></font>Aaron D. Perry<br></font><font size="3"><font size="3"><font face="Tahoma">Boston, MA<br>Lyndon State College '16<br>Twitter:<span> </span><a href="https://twitter.com/AaronPerryLSC" target="_blank">@AaronPerryLSC</a><br>
</font></font></font></font></font><font size="3"><font face="Arial"><font size="3"><font size="3"><font face="Tahoma">Mobile: 617-780-4312</font></font></font></font></font></div></div></div></div></div></div></div></div>
</div><div style="font-size:16px;font-family:'Times New Roman'"><hr><div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b><span> </span><a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> [<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>] on behalf of Ethan Sacoransky [<a href="mailto:ethan.saco@me.com" target="_blank">ethan.saco@me.com</a>]<br>
<b>Sent:</b><span> </span>Thursday, January 16, 2014 7:05 PM<br><b>To:</b><span> </span>GrADS Users Forum<br><b>Subject:</b><span> </span>Re: [gradsusr] Opening a Grb2 File<br></font><br></div><div></div><div><div>Hey Eric,</div>
Unfortunately, this command is still not working in a basic terminal shell. Here is what I put through: 'g2ctl grib2_gfs_4_20140112_1200_009.grb2 > grib2_gfs_4_20140112_1200_009.ctl' and this is the error I am getting: '-bash: g2ctl: command not found'. Any thoughts on this would be much appreciated.<div>
Thanks,</div><div>Ethan<br><div><div>On 2014-01-16, at 6:52 PM, Eric Altshuler wrote:</div><br><blockquote><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div>
<div style="font-family:arial,helvetica,sans-serif;font-size:12pt">Hi Ethan,<div><br></div><div>The g2ctl is a perl script, not a grads command. You have to run it from the shell command line, not inside grads.</div><div>
<br></div><div>Best regards,<br><br><div><span></span>Eric L. Altshuler<br>Research Scientist<br>Center for Ocean-Land-Atmosphere Studies<br>253 Research Hall, Mail Stop 6C5<div>George Mason University</div><div>4400 University Drive<br>
Fairfax, VA 22030 USA<br><br>E-mail:<span> </span><a href="mailto:ela@cola.iges.org" target="_blank">ela@cola.iges.org</a><br>Phone: (703) 993-5725<br>Fax: (703) 993-5770</div><span></span><br></div><br><hr><b>From:<span> </span></b>"Ethan Sacoransky" <<a href="mailto:ethan.saco@me.com" target="_blank">ethan.saco@me.com</a>><br>
<b>To:<span> </span></b>"GrADS Users Forum" <<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>><br><b>Sent:<span> </span></b>Thursday, January 16, 2014 6:50:55 PM<br><b>Subject:<span> </span></b>Re: [gradsusr] Opening a Grb2 File<br>
<br>Hi Aaron,<br>I am attempting to carry out this process by typing in 'g2ctl gfs_4_20140112_1200_009.grb2 > gfs_4_20140112_1200_009.ctl'. I got an error saying 'unknown command: g2ctl'. Any thoughts on this? Thanks so much.<br>
<br>Ethan<br><br>On 2014-01-16, at 6:39 PM, Perry, Aaron @ LSC wrote:<br><br>> Hi Ethan,<br>><span> </span><br>> In order to open a grib2 file in GrADS, a control (.ctl) and an index (.idx) file must exist.<br>><span> </span><br>
> To create a .ctl file with g2ctl, use this command in your terminal:<br>><span> </span><br>> g2ctl grib2_file.grb2 > grib2_file.ctl<br>><span> </span><br>> Then to create the .idx file with gribmap, use this command:<br>
><span> </span><br>> gribmap -i grib2_file.ctl<br>><span> </span><br>><span> </span><br>> Onward and Upward,<br>><span> </span><br>> Aaron D. Perry<br>> Boston, MA<br>> Lyndon State College '16<br>
> Twitter: @AaronPerryLSC<br>> Mobile: 617-780-4312<br>><span> </span><br>> ________________________________________<br>> From:<span> </span><a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a><span> </span>[<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>] on behalf of Ethan Sacoransky [<a href="mailto:ethan.saco@me.com" target="_blank">ethan.saco@me.com</a>]<br>
> Sent: Thursday, January 16, 2014 6:23 PM<br>> To:<span> </span><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>> Subject: [gradsusr] Opening a Grb2 File<br>><span> </span><br>
> Good evening everyone,<br>><span> </span><br>> In an attempt to open up a grib2 file, I have downloaded and unpacked the wgrib2 tar file and copied the g2ctl script onto a text edit file. When I type in the command 'run g2ctl gfs_4_20140112_1200_009.grb2' I get the prompt, "error opening script file: g2ctl". Any thoughts on why this would be?<br>
><span> </span><br>> Ethan<br>><span> </span><br>><span> </span><br>> _______________________________________________<br>> gradsusr mailing list<br>><span> </span><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
><span> </span><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>><span> </span><br>> _______________________________________________<br>
> gradsusr mailing list<br>><span> </span><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>><span> </span><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br><br>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a></div>
</span></blockquote></div><br></div></div></div></div><br>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a></div>
</span></blockquote></div><br></div></div></div></div><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br>
</div>