<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Of course you can write more than one variable to a binary file, you just have to be careful in the order in which you write the grids. Please see: <div><a href="http://iges.org/grads/gadoc/aboutgriddeddata.html#structure">http://iges.org/grads/gadoc/aboutgriddeddata.html#structure</a></div><div>--Jennifer</div><div><br></div><div><br><div><div>On Mar 5, 2011, at 8:25 AM, LeeJoice, Robert N wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div> <font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">Jennifer,<br> <br> Do you have to only output a single variable to each binary data file? I could see the utility of this to create line graphs within GrADS from text data. <br> <br> Robert LeeJoice<br> <br> <br> On 2/9/11 11:27 AM, "Jennifer Adams" <<a href="jma@cola.iges.org">jma@cola.iges.org</a>> wrote:<br> <br> </span></font><blockquote type="cite"><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">James, <br> Before GrADS can handle your data, you need to convert it from text to binary. Try something like this: <br> <br> </span></font><font size="1"><font face="Courier, Courier New"><span style="font-size:9pt">'open dummy.ctl'<br> file=7hA01.out.txt<br> nlinesinfile=755<br> i=1<br> 'set gxout fwrite'<br> 'set fwrite 7hA01.out.bin'<br> while (i<=nlinesinfile)<br> res = read(file)<br> line2=sublin(res,2)<br> val = subwrd(line2,2)<br> 'd 'val<br> i=i+1<br> endwhile<br> 'disable fwrite'<br> </span></font></font><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt"><br> ...dummy.ctl looks like this:<br> <br> </span></font><font size="1"><font face="Courier, Courier New"><span style="font-size:9pt">dset foo<br> options template<br> undef -9.99e8<br> xdef 1 linear 1 1<br> ydef 1 linear 1 1<br> zdef 1 linear 1 1<br> tdef 755 linear 0Z01JAN1948 1mo<br> vars 1<br> foo 0 99 foo<br> endvars<br> </span></font></font><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt"><br> ... and your new GrADS data set looks like this: <br> <br> </span></font><font size="1"><font face="Courier, Courier New"><span style="font-size:9pt">dset ^7hA01.out.bin<br> undef -9.99e8<br> xdef 1 linear 1 1<br> ydef 1 linear 1 1<br> zdef 1 linear 1 1<br> tdef 755 linear 0Z01JAN1948 1mo<br> vars 1<br> var 0 99 var<br> endvars<br> </span></font></font><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt"><br> <br> --Jennifer<br> <br> <br> <br> On Feb 7, 2011, at 10:48 AM, James Ciarlo` wrote:<br> <br> </span></font><blockquote type="cite"><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">Hi,<br> <br> 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?<br> <br> James<br> <7hA01.out.txt>_______________________________________________<br> gradsusr mailing list<br> <a href="gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br> <a href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br> </span></font></blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt"><br> <br> </span><font size="1"><span style="font-size:9pt">--<br> Jennifer M. Adams<br> IGES/COLA<br> 4041 Powder Mill Road, Suite 302<br> Calverton, MD 20705<br> <a href="jma@cola.iges.org">jma@cola.iges.org</a><br> <br> <br> </span></font><span style="font-size:11pt"> <br> <br> <br> <hr align="CENTER" size="3" width="95%"></span></font><font size="2"><font face="Consolas, Courier New, Courier"><span style="font-size:10pt">_______________________________________________<br> gradsusr mailing list<br> <a href="gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br> <a href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br> </span></font></font></blockquote> </div> _______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></blockquote></div><br><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><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">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div> </div><br></div></body></html>