<div dir="ltr">To those who responded,<div><br></div><div>Thank you for the responses! Those seemed to do the trick. However, instead of the &#39;endwhile&#39; error, I am now receiving this error:</div><div><br></div><div>Data Request Warning:  Request is completely outside file limits<br></div><div><br></div><div>This error is repeated 9 times. The text file that is created also contains only one column with each value being 0.0. </div><div><br></div><div>-Justin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 5, 2016 at 11:38 AM, sushant puranik <span dir="ltr">&lt;<a href="mailto:sushantpuranik@gmail.com" target="_blank">sushantpuranik@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Along with the suggested changes simply press enter button once at ending line of your script.</p>
<div class="gmail_quote"><div><div class="h5">On 5 Jul 2016 8:45 pm, &quot;Justin Hicks&quot; &lt;<a href="mailto:jhicks2014@gmail.com" target="_blank">jhicks2014@gmail.com</a>&gt; wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">GrADS users,<div><br></div><div>I am running a script that should output values into a 2 column table. The first column will be the time (monthly in the form of 00Z01JAN1979) and the second column will be the value of the variable (evap) at that time. After running the code below, I receive an error saying &quot;Unable to locate ENDWHILE statement for the WHILE statement at line 18.&quot;</div><div><br></div><div>This is the script I&#39;m running; everything before the while statement is setting up a mask (in this case, the mask only outputs values for Africa):</div><div><br></div><div><div>&#39;reinit&#39;</div><div>&#39;open /data2/control/Region15_AFR_mask_TEST.nc&#39;</div><div>&#39;set t 1 last&#39;</div><div>&#39;set dfile 1&#39;</div><div>&#39;set lon -179.5 179.5&#39;</div><div>&#39;set lat -89.5 89.5&#39;</div><div>&#39;open /data2/control/GLDAS_VIC10_M.ctl&#39;</div><div>&#39;set dfile 2&#39;</div><div>&#39;set lon -179.5 179.5&#39;</div><div>&#39;set lat -89.5 89.5&#39;</div><div>&#39;set time 00Z01JAN1979 00Z01JAN2016&#39;</div><div>&#39;set dfile 1&#39;</div><div>&#39;d aave(maskout(evap.2,mask.1(time=00Z01JAN1979)),lon=-179.5,lon=179.5,lat=-89.5,lat=89.5)&#39;</div><div>&#39;set gxout print&#39;</div><div>&#39;set prnopts %6.2f 1 1&#39;</div><div>nmonths = 428</div><div>i = 1</div><div>while (i &lt;= nmonths)</div><div> &#39;set t &#39;i</div><div> &#39;q time&#39;</div><div>rectime = sublin(result,5)</div><div>recdate = subwrd(rectime,6) </div><div> &#39;d aave(maskout(evap.2,mask.1(time=00Z01JAN1979)),lon=-179.5,lon=179.5,lat=-89.5,lat=89.5)&#39;</div><div>evap = sublin(result,2)</div><div>evap = subwrd(evap,1)</div><div>string = rectime&#39; &#39;evap</div><div> &#39;write(&#39;GLDAS_MASK_DATA.txt&#39; ,  string ,append)&#39;</div><div> i = i + 1</div><div>endwhile</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div>I&#39;m not sure why GrADS is giving me this error.</div><div><br></div><div>-Justin</div></div>
<br></div></div><span class="">_______________________________________________<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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></span></blockquote></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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>