You'll find the <a href="http://www.iges.org/grads/gadoc/script.html">scripting language</a> page of interest in your work. Specifically, arrays are referenced by dots. array.x.y = value in this case<br><br>For repetitive execution, the syntax is <br>
while (condition)<br>...<br>...<br>...<br>endwhile<br><br>Jeff Duda<br><br><div class="gmail_quote">On Fri, Jan 4, 2013 at 6:08 AM, Filipa Varino <span dir="ltr"><<a href="mailto:fcvarino@fc.ul.pt" target="_blank">fcvarino@fc.ul.pt</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="PT"><div><p class="MsoNormal">Dear all<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-GB">I am trying to create a 2D array which is the sum of two variables, but I don’t know how to do it in GRADS.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">I would like to computed it for each lon and lat point. <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">In Matlab it would look like:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">For X=1:10<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-GB">For Y=1:10<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-GB">Var(X,Y)=A+B<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-GB">End<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">End<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">Any idea?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal">
<span lang="EN-GB">Thanks in advance<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">Best Regards<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p>
<span class="HOEnZb"><font color="#888888"><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">Filipa Varino <u></u><u></u></span></p></font></span></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><br clear="all"><br>-- <br>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br>