<div dir="ltr"><div><div><div>Gary,<br></div>Thanks for your reply.<br><br></div>Yes, it is my own personal script. Here is the code for assigning the arrays:<br><br>'set gxout print' <br>'set prnopts %g 1'<br>'d 2.5e6*qvapor'<br>tt = 1 <br>while (tt <= nt) <br> <a href="http://lvq.tt">lvq.tt</a> = sublin(result,blank_lines+tt)<br></div> say tt" "<a href="http://lvq.tt">lvq.tt</a>" "nt<br><div> tt = tt + 1 <br>endwhile <br>'d 1005*(t+300)'<br>tt = 1<br>while (tt <= nt)<br> CpT.tt = sublin(result,blank_lines+tt)<br></div><div> say tt" "CpT.tt" "nt<br></div><div> tt = tt + 1<br>endwhile <br><br></div><div>Output from this portion is shown as:<br><br></div><div>1 43504.7 13<br>2 43400.9 13<br>3 44271.9 13<br>4 42382.9 13<br>5 42426 13<br>6 40946.4 13<br>7 37313.4 13<br>8 32887.1 13<br>9 30245.9 13<br>10 30008.8 13<br>11 28724.1 13<br>12 29439.1 13<br>13 28436.3 13<br>1 302984 13<br>2 303499 13<br>3 304544 13<br>4 306799 13<br>5 307953 13<br>6 309824 13<br>7 311769 13<br>8 313546 13<br>9 314621 13<br>10 315541 13<br>11 316056 13<br>12 316285 13<br>13 316526 13<br><br></div><div>so in this script instance, nt is set to 13 (and I checked the code to make sure nt doesn't get changed later on in the script, and it doesn't), and CpT.nt = CpT.13 = 316526. I added<br></div><div>say CpT.nt<br></div><div>just before the code line where the crash is occurring. It prints accurately. However, the very next line...Grads just doesn't like it.<br><br></div><div>I'm running the pre-compiled version 2.1.a3 on Linux. Not sure if it's the CentOS5.9 or the i686 compilation, though.<br><br></div><div>Jeff<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 29, 2016 at 1:35 PM, Love, Mr. Gary, Contractor, Code 7542 <span dir="ltr"><<a href="mailto:gary.love.ctr@nrlmry.navy.mil" target="_blank">gary.love.ctr@nrlmry.navy.mil</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div class="m_8893514304963236477WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Jeff,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Your script must be local to you. I could not find it at <a href="ftp://cola.gmu.edu/grads/scripts/" target="_blank">ftp://cola.gmu.edu/grads/<wbr>scripts/</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Anyway I made a simple test script shown below that works fine, so there must be an assignment problem in you script probably with CpT.1 or CpT.nt.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">function main()<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">nt=10<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">CpT.1=302984<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">CpT.nt=316526<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">a=CpT.1<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">b=CpT.nt<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">say a<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">say b<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">deltatheta=b-a<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">say deltatheta<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">return<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Gary<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> [mailto:<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@<wbr>gradsusr.org</a>] <b>On Behalf Of </b>Jeff Duda<br><b>Sent:</b> Thursday, December 29, 2016 10:55 AM<br><b>To:</b> GrADS Users Forum<br><b>Subject:</b> [gradsusr] mysterious scripting error<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><div><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">I have this snippet of code:<br><br>a = CpT.1 <br>b = CpT.nt <br>say a <br>say b<br><b><u>deltatheta = b-a</u></b><br>say deltatheta<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">where CpT.1 and CpT.nt have been previously defined. When I run the script, I get this output<br><br>302984 <br>316526 <br>Non-numeric args to numeric operation<br> Error occurred on line 62<br> In file <a href="http://mixing_diagram.gs" target="_blank">mixing_diagram.gs</a><u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">Line 62 is underlined and in bold in the code above. Why is this error occurring?<u></u><u></u></p></div><p class="MsoNormal">Jeff Duda<br clear="all"><u></u><u></u></p><div><div><div><div><div><p class="MsoNormal"><br>-- <u></u><u></u></p><div><div><div><div><div><p class="MsoNormal">Jeff Duda<br>Post-doctoral research fellow<br>University of Oklahoma School of Meteorology<u></u><u></u></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br>______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Jeff Duda<br>Post-doctoral research fellow<br>University of Oklahoma School of Meteorology<br></div></div></div></div></div>
</div></div>