<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 href="http://script.gs">script.gs</a>, and the second into a dummy.ctl</div>
<div>Then I opened grads and ran <a href="http://script.gs">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 href="http://script.gs">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 class="gmail_quote">On 9 February 2011 18:27, Jennifer Adams <span dir="ltr"><<a href="mailto:jma@cola.iges.org">jma@cola.iges.org</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">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 class="h5"><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 class="h5">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 class="im"><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></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 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 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>