<div dir="ltr">Jennifer,<div><br></div><div>I am still getting values of 0 in my text file (and on the terminal). Typing in a &#39;q dims&#39; command gives LEV=0  Z=1    for the mask and LEV=0  Z=0  for the GLDAS file. Could the inconsistency be the issue? </div><div><br></div><div>There aren&#39;t any errors displayed on the terminal. And just to note, taking out the while statement gives me monthly values on the terminal when the maskout function is in use, so I assume the issue is within the while statement.</div><div><br></div><div>-Justin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 5, 2016 at 2:47 PM, Jennifer M Adams <span dir="ltr">&lt;<a href="mailto:jadams21@gmu.edu" target="_blank">jadams21@gmu.edu</a>&gt;</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">
<br>
<div><br>
<div><span class="">
<div>On Jul 5, 2016, at 1:51 PM, Justin Hicks &lt;<a href="mailto:jhicks2014@gmail.com" target="_blank">jhicks2014@gmail.com</a>&gt; wrote:</div>
<br>
</span><blockquote type="cite">
<div dir="ltr">Jennifer,
<div><br>
</div>
<div>How would I go about making the lat/lon values fixed? I know the aave function needs 4 different lat/lon arguments. Would this just be &#39;d ave(.......,lon=-179.5,lon=-179.5,lat=-89.5,lat=-89.5)’
</div>
</div>
</blockquote>
Correct. These args provide the range for your average. <br>
<blockquote type="cite">
<div dir="ltr">
<div>   or     &#39;d ave(.......,x=1,x=1,y=1,y=1)’?</div>
</div>
</blockquote>
No. This will give you an average over only one grid point.</div>
<div><br>
</div>
<div>The ‘set x 1’ and ’set y 1’ commands are there to restrict the dimension environment to match the result that comes out of aave(), which does not vary in X or Y. Those dimensions need to be fixed, and it doesn’t matter at all what they are, it could just
 as easily be ‘set x 22’ and ‘set y 89’.</div><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div>—Jennifer</div></font></span><div><div class="h5">
<div><br>
</div>
<div><br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div>-Justin</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jul 5, 2016 at 12:25 PM, Jennifer M Adams <span dir="ltr">
&lt;<a href="mailto:jadams21@gmu.edu" target="_blank">jadams21@gmu.edu</a>&gt;</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">Hi, Justin — 
<div>Your dimension environment isn’t set properly. When using the aave() function, make sure the lat and lon dimensions are fixed — you’ve got them varying. Also, the LEV dimension value at z=1 may be different for your two data sets. Put in a &#39;say result’
 statement after each display and it should print out more than just the warning message; it should show you what the dimensions are for the variables in your expression, and that should guide you as to where the mismatch is. I also think you can remove most
 of the code before the &#39;while’ statement:</div>
<div><br>
</div>
<div>‘open /data2/control/Region15_AFR_mask_TEST.nc&#39;</div>
<span>
<div>&#39;open /data2/control/GLDAS_VIC10_M.ctl&#39;</div>
<div>‘set dfile 2’</div>
</span>
<div>‘set x 1’</div>
<div>‘set y 1’</div>
<div>‘set gxout print&#39;</div>
<div>‘set prnopts %6.2f 1 1’</div>
<div>nmonths=428</div>
<div>i=1</div>
<div>while (i&lt;nmonths)</div>
<div>  ‘set t ‘i</div>
<div>  ...</div>
<div>  ‘d aave ….&#39;  </div>
<div>  say ‘t=’t’  </div>
<div>  say result</div>
<div>  ….</div>
<div>  i=i+1</div>
<div>endwhile</div>
<div><br>
</div>
<div>—Jennifer</div>
<div>
<div>
<div><br>
<div>
<div>On Jul 5, 2016, at 12:00 PM, Justin Hicks &lt;<a href="mailto:jhicks2014@gmail.com" target="_blank">jhicks2014@gmail.com</a>&gt; wrote:</div>
<br>
<blockquote type="cite">
<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>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>
<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>_______________________________________________<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" 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>
</blockquote>
</div>
<br>
</div>
_______________________________________________<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>
</blockquote>
</div>
<br>
</div>
</div>
<div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-size:12px">--</div>
<div style="font-size:12px">Jennifer Miletta Adams<br>
Center for Ocean-Land-Atmosphere Studies (COLA)<br>
George Mason University<br>
<br>
<br>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
_______________________________________________<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>
</blockquote>
</div>
<br>
</div>
_______________________________________________<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>
</blockquote>
</div>
<br>
<div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-size:12px">--</div>
<div style="font-size:12px">Jennifer Miletta Adams<br>
Center for Ocean-Land-Atmosphere Studies (COLA)<br>
George Mason University<br>
<br>
<br>
</div>
</div>
</div>
</div>
<br>
</div></div></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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>