<div>Zablone,</div><div><br></div>In that case, I haven't succesfully reached that point. <div><br></div><div>I have set <a href="http://script.gs">script.gs</a> as:</div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><div>
<font face="Courier" size="3"><span style="font-size: 12px; ">'open dummy.ctl'</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">file=7hA01.out.txt</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">nlinesinfile=755</span></font></div>
<div><font face="Courier" size="3"><span style="font-size: 12px; ">i=1</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">'set gxout fwrite'</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">'set fwrite 7hA01.out.bin'</span></font></div>
<div><font face="Courier" size="3"><span style="font-size: 12px; ">while (i<=nlinesinfile)</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; "> res = read(file)</span></font></div><div>
<font face="Courier" size="3"><span style="font-size: 12px; "> line2=sublin(res,2)</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; "> val = subwrd(line2,2)</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; "> 'd 'val</span></font></div>
<div><font face="Courier" size="3"><span style="font-size: 12px; "> i=i+1</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">endwhile</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">'disable fwrite'</span></font></div>
</span><div><br></div><div>And dummy.ctl as:</div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><div><font size="3"><span style="font-size: 12px; "><font face="Courier">dset foo</font></span></font></div>
<div><font size="3"><span style="font-size: 12px; "><font face="Courier">options template</font></span></font></div><div><font size="3"><span style="font-size: 12px; "><font face="Courier">undef -9.99e8</font></span></font></div>
<div><font size="3"><span style="font-size: 12px; "><font face="Courier">xdef 1 linear 1 1</font></span></font></div><div><font size="3"><span style="font-size: 12px; "><font face="Courier">ydef 1 linear 1 1</font></span></font></div>
<div><font size="3"><span style="font-size: 12px; "><font face="Courier">zdef 1 linear 1 1</font></span></font></div><div><font size="3"><span style="font-size: 12px; "><font face="Courier">tdef 755 linear 0Z01JAN1948 1mo</font></span></font></div>
<div><font size="3"><span style="font-size: 12px; "><font face="Courier">vars 1</font></span></font></div><div><font size="3"><span style="font-size: 12px; "><font face="Courier">foo 0 99 foo</font></span></font></div><div>
<font size="3"><span style="font-size: 12px; "><font face="Courier">endvars</font></span></font></div></span></div><div><br></div><div>I opened grads and entered '<a href="http://script.gs">script.gs</a>' and got this:</div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><div>Warning: OPTIONS keyword "template" is used, but the</div><div> DSET entry contains no substitution templates.</div>
<div><br></div><div>And I also acquired the file 7hA01.out.bin</div><div><br></div><div>Then I ran the script <a href="http://control.gs">control.gs</a>, that is: </div><div><span class="Apple-style-span" style="color: rgb(80, 0, 80); font-size: 19px; "><font face="Courier" size="3"><span style="font-size: 12px; ">dset ^7hA01.out.bin</span></font><div>
<font face="Courier" size="3"><span style="font-size: 12px; ">undef -9.99e8</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">xdef 1 linear 1 1</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">ydef 1 linear 1 1</span></font></div>
<div><font face="Courier" size="3"><span style="font-size: 12px; ">zdef 1 linear 1 1</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">tdef 755 linear 0Z01JAN1948 1mo</span></font></div>
<div><font face="Courier" size="3"><span style="font-size: 12px; ">vars 1</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">var 0 99 var</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">endvars</span></font></div>
</span></div></span></div><div><br></div><div>And I got this message:</div><div><div>Syntax Error</div><div> Error occurred on line 1</div><div> In file <a href="http://control.gs">control.gs</a></div></div><div><br></div>
<div>I changed it to:</div><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(80, 0, 80); font-family: arial, sans-serif; font-size: 19px; "><font face="Courier" size="3"><span style="font-size: 12px; ">dset 7hA01.out.bin</span></font><div>
<font face="Courier" size="3"><span style="font-size: 12px; ">undef -9.99e8</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">xdef 1 linear 1 1</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">ydef 1 linear 1 1</span></font></div>
<div><font face="Courier" size="3"><span style="font-size: 12px; ">zdef 1 linear 1 1</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">tdef 755 linear 0Z01JAN1948 1mo</span></font></div>
<div><font face="Courier" size="3"><span style="font-size: 12px; ">vars 1</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">var 0 99 var</span></font></div><div><font face="Courier" size="3"><span style="font-size: 12px; ">endvars</span></font></div>
</span></div><div><br></div><div>And got this:</div><div><div>Non-numeric args to numeric operation</div><div> Error occurred on line 2</div><div> In file <a href="http://control.gs">control.gs</a></div></div><div><br>
</div>
<div>Obviously I am not doing this the proper way. How do I do this please?</div><br><div class="gmail_quote">On 11 February 2011 13:04, Zablone Owiti <span dir="ltr"><<a href="mailto:zablonowiti@yahoo.com">zablonowiti@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="color:#000;font-size:14pt">James, <br><br> You cannot open the 7hA0.out.bin file directly as you attempted. You need to open it via a Control file that was done by Jennifer. The control file is:<div class="im">
<font face="Courier" size="3"><span style="font-size:12px"><br>dset ^7hA01.out.bin</span></font><div><font face="Courier" size="3"><span style="font-size:12px">undef -9.99e8</span></font></div>
<div><font face="Courier" size="3"><span style="font-size:12px">xdef 1 linear 1 1</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">ydef 1 linear 1 1</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">zdef 1 linear 1 1</span></font></div>
<div><font face="Courier" size="3"><span style="font-size:12px">tdef 755 linear 0Z01JAN1948 1mo</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">vars 1</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">var 0 99 var</span></font></div>
<div><font face="Courier" size="3"><span style="font-size:12px">endvars</span></font></div><br><span></span><div> </div></div><div><div><div><b><em>===================================================</em></b></div><div><b><em><font color="#007f40" face="lucida console, sans-serif">ZABLONE OWITI<br>
</font><font face="garamond, new york, times, serif"><div class="im">GRADUATE STUDENT<br>Nanjing University of Information, Science and Technology<br></div>College of Atmospheric Science<div class="im"><br>Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China<br>
</div></font></em></b><div class="im"><font color="#333333" face="garamond, new york, times, serif">Tel: +86-25-58731402<br>Fax: +86-25-58731456</font></div></div><div class="im"><div><b><em><font face="garamond, new york, times, serif">Mob. 15077895632</font></em></b></div>
<div><b><em>Website: <a rel="nofollow" href="http://www.nuist.edu.cn/" target="_blank">www.nuist.edu.cn</a><br></em></b><i><strong>====================================================<br></strong><span style="font-style:italic;font-family:inherit"><div class="MsoNormal">
<i><span style="color:rgb(227, 108, 10);font-size:12pt">"The real art of conversation is not only to say the right thing at the right time, but also to leave unsaid the wrong thing at the tempting moment."</span></i><i><span style="color:rgb(227, 108, 10);font-size:12pt"></span></i></div>
<div class="MsoNormal"> </div></span></i><br></div></div></div></div><div style="font-family:inherit;font-size:14pt"><br><div style="font-family:inherit;font-size:12pt"><font face="Arial" size="2"><div style="border:1px solid rgb(204, 204, 204);line-height:0pt;font-size:0pt;margin:5px 0px;padding:0pt" readonly>
</div><b><span style="font-weight:bold">From:</span></b> James Ciarlo` <<a href="mailto:james.ciarlo@physics.org" target="_blank">james.ciarlo@physics.org</a>><div class="im"><br><b><span style="font-weight:bold">To:</span></b> GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>><br>
<b><span style="font-weight:bold">Cc:</span></b> <br></div><b><span style="font-weight:bold">Sent:</span></b> Friday, 11 February 2011 6:40 PM<div class="im"><br><b><span style="font-weight:bold">Subject:</span></b> Re: [gradsusr] opening text file data<br>
</div></font><div><div></div><div class="h5"><br> <div><div>Hi, </div><div><br></div><div>sorry I took long to answer. Thank you all for your help</div><div><br></div><div>Jennifer, I have copied the first script you wrote into a <a rel="nofollow" href="http://script.gs" target="_blank">script.gs</a>, and the second into a dummy.ctl</div>
<div>Then I opened grads and ran <a rel="nofollow" href="http://script.gs" target="_blank">script.gs</a> and got the following error:</div><div><br></div><div>Warning: OPTIONS keyword "template" is used, but the</div>
<div> DSET entry contains no substitution templates.</div>
<div><br></div><div>Then I changed the contents of dummy.ctl to the third set and ran <a rel="nofollow" href="http://script.gs" target="_blank">script.gs</a> and I obtained 7hA01.out.bin</div><div>However when I tried using open with grads I got the following error</div>
<div><br></div><div><div>ga-> open 7hA01.out.bin</div><div>Scanning description file: 7hA01.out.bin</div><div>Open Error: Unknown keyword in description file</div><div> --> The invalid description file record is:</div>
<div> --> o-ER`0Ej.Eá¦3E=E3;E;E5:E{7E¤ø1E\31Eá0Eáº+Eͼ+EÍL5E2E)<9Eu;Eׯ;Eq)<EH=EÉ2E</div><div>û9EìY1E¤¨2E-Eq¥/E\[6Ef6Eìq9Ef¦;E)ô=E</div><div> The data file was not opened.</div></div><div><br></div><div>James</div>
<div><br></div><br><div>On 9 February 2011 18:27, Jennifer Adams <span dir="ltr"><<a rel="nofollow" href="mailto:jma@cola.iges.org" target="_blank">jma@cola.iges.org</a>></span> wrote:<br><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div style="word-wrap:break-word">James, <div>Before GrADS can handle your data, you need to convert it from text to binary. Try something like this: </div><div><br></div><div><div><font face="Courier" size="3"><span style="font-size:12px">'open dummy.ctl'</span></font></div>
<div><font face="Courier" size="3"><span style="font-size:12px">file=7hA01.out.txt</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">nlinesinfile=755</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">i=1</span></font></div>
<div><font face="Courier" size="3"><span style="font-size:12px">'set gxout fwrite'</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">'set fwrite 7hA01.out.bin'</span></font></div>
<div><font face="Courier" size="3"><span style="font-size:12px">while (i<=nlinesinfile)</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px"> res = read(file)</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px"> line2=sublin(res,2)</span></font></div>
<div><font face="Courier" size="3"><span style="font-size:12px"> val = subwrd(line2,2)</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px"> 'd 'val</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px"> i=i+1</span></font></div>
<div><font face="Courier" size="3"><span style="font-size:12px">endwhile</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">'disable fwrite'</span></font></div></div><div><br></div>
<div>...dummy.ctl looks like this:</div><div><div><br></div><div><font size="3"><span style="font-size:12px"><font face="Courier">dset foo</font></span></font></div><div><font size="3"><span style="font-size:12px"><font face="Courier">options template</font></span></font></div>
<div><font size="3"><span style="font-size:12px"><font face="Courier">undef -9.99e8</font></span></font></div><div><font size="3"><span style="font-size:12px"><font face="Courier">xdef 1 linear 1 1</font></span></font></div>
<div><font size="3"><span style="font-size:12px"><font face="Courier">ydef 1 linear 1 1</font></span></font></div><div><font size="3"><span style="font-size:12px"><font face="Courier">zdef 1 linear 1 1</font></span></font></div>
<div><font size="3"><span style="font-size:12px"><font face="Courier">tdef 755 linear 0Z01JAN1948 1mo</font></span></font></div><div><font size="3"><span style="font-size:12px"><font face="Courier">vars 1</font></span></font></div>
<div><font size="3"><span style="font-size:12px"><font face="Courier">foo 0 99 foo</font></span></font></div><div><font size="3"><span style="font-size:12px"><font face="Courier">endvars</font></span></font></div></div><div>
<br></div><div>... and your new GrADS data set looks like this: </div><div><br></div><div><div><font face="Courier" size="3"><span style="font-size:12px">dset ^7hA01.out.bin</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">undef -9.99e8</span></font></div>
<div><font face="Courier" size="3"><span style="font-size:12px">xdef 1 linear 1 1</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">ydef 1 linear 1 1</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">zdef 1 linear 1 1</span></font></div>
<div><font face="Courier" size="3"><span style="font-size:12px">tdef 755 linear 0Z01JAN1948 1mo</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">vars 1</span></font></div><div><font face="Courier" size="3"><span style="font-size:12px">var 0 99 var</span></font></div>
<div><font face="Courier" size="3"><span style="font-size:12px">endvars</span></font></div><div><br></div></div><div><br></div><div>--Jennifer</div><div><div></div><div><div><br></div><div><br></div><div><br></div>
<div>On Feb 7, 2011, at 10:48 AM, James Ciarlo` wrote:</div></div></div><div><div><br><blockquote type="cite"><div><div></div><div>Hi,<div><br></div><div>I have several text files such as the one I attached and I need to open them which GrADS but I cannot understand how to do so. Can someone help me please?</div>
<div><br></div><div>James</div> </div></div><span><7hA01.out.txt></span>_______________________________________________<div><br>gradsusr mailing list<br><a rel="nofollow" href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a rel="nofollow" href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br></div></blockquote></div><font color="#888888"><br><div> <div style="word-wrap:break-word;font-size:12px">
<div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a rel="nofollow" href="mailto:jma@cola.iges.org" target="_blank">jma@cola.iges.org</a></div>
<div>
<br></div><br></div> </div><br></font></div></div><br>_______________________________________________<br>
gradsusr mailing list<br>
<a rel="nofollow" href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a rel="nofollow" href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br>
</div><br><br></div></div></div></div></div><br></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></div>