<div dir="ltr"><div><div>The average function itself has what you needed. ave(var1,t=1,t=360,<b>12</b>), this means it will average values from t=1,t=13,t=25 ... until t=360.Example of point value extraction.<br>
<br>&#39;sdfopen <a href="http://foo.nc" target="_blank">foo.nc</a>&#39;<br>lonvalue=90<br>latvalue=0<br>levvalue=850<br>tvalue=1<br>&#39;set lon &#39;lonvalue<br>&#39;set lat &#39;latvalue<br>&#39;set t &#39;tvalue<br>&#39;set lev &#39;levvalue<br>

&#39;d variable1&#39;<br>catch=sublin(result,4)<br>&#39;set gxout fwrite&#39;
<br>&#39;set fwrite point.dat&#39;<br>&#39;d &#39;catch<br>&#39;disable fwrite&#39;<br><br></div>This is a basic one, modify it as your need requires. I&#39;m not sure about excel, but this will create a binary file, which can be opened by GrADS (using a controller file) and Scilab (which I use for further analysis).<br>
<br></div>Yunus.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Mar 31, 2013 at 2:25 PM, avi kojokro <span dir="ltr">&lt;<a href="mailto:kojokroavi@gmail.com" target="_blank">kojokroavi@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"><div dir="rtl"><div dir="ltr" style="text-align:left"><span lang="en"><span>I&#39;m trying</span> <span>to do</span> <span>a script of </span></span><span lang="en"><span><span lang="en"><span>averages</span></span></span> <span>like this</span> <span>example</span> <span>:<br>

<br><br>&#39;set t 1 &#39;<br>&#39;define varav=ave(t850-273.16,t=1,t=1,1)&#39;<br>&#39;d varav&#39;<br>cc=subwrd(result,4)<br>&#39;draw string 0.5 8 jan=&#39;cc<br><br></span></span><span lang="en"><span>I want</span> <span>my</span> <span>script</span> <span>calculates</span> <span>every 12</span> <span>months,</span> <span>how do I create</span> <span>a loop</span> <span>script</span> <span>that</span> <span>calculates</span> <span>every 12</span> <span>month</span> <span>average</span> <span>of the same</span> <span>month.<br>

</span></span><span lang="en"><span>I</span> <span>will give</span> <span>an example of what</span> <span>I mean</span><span>:</span> <span>I want to begin</span> <span>to calculate</span> <span>average of</span> <span>January 1979</span> <span>and then</span> <span>later</span> <span>to calculate</span> <span>directly</span> <span>the</span> <span>January 1980</span> <span>and so on.<br>

</span></span><span lang="en"><span>Is it possible</span> <span>that the</span> <span>result</span> <span>will write</span> <span>directly to the</span> <span>Excel</span> <span>file</span><span>, then</span> <span>how to</span> <span>write</span> <span>the command</span> <span>to it.</span><br>

<br><span>Please note</span> <span>that I</span> <span>first started</span> <span>Grads.<br><br></span></span>Thank you so much. <br><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div dir="ltr" style="text-align:left">
avi<br>
</div><div dir="ltr" style="text-align:left"><br></div><div style="text-align:right"><br></div></font></span></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></div>