Sal,<br>I think to do this the way you want to, you're going to have to write a script and put that line inside a while loop. Something like:<br><br>sum = 0<br>n = 1<br>while (n <= #_of_days)<br> sum = sum + ave(t2,n*t+3,n*t+15,1)<br>
n = n +1<br>endwhile<br><br>average = sum/(n-1)<br><br>Obviously, watch where your quotation marks go.<br><br>Hope this helps.<br><br>Jeff Duda<br><br><div class="gmail_quote">On Mon, May 2, 2011 at 10:19 PM, Salvador Salazar <span dir="ltr"><<a href="mailto:sal.salazar1@gmail.com">sal.salazar1@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi everyone,<div><br></div><div>I have a beginner question regarding the GrADS 'ave' (average) function. I'm trying to simply take the average temperature for a domain over several days, but only for night time hours. So, once I set up my domain in GrADS, I use the following command:</div>
<div><br></div><div>d ave(t2,t+3,t+15,24)</div><div><br></div><div>Where t2 is temperature at 2 meters, t+3 increments the UTC time to make it 8 o'clock at night, t+15 makes it 8 o'clock in the morning, and the 24 increments the time daily once the night's temperatures have been averaged. So far, this is giving me garbage plots. I saw the users guide section for the 'ave' function, but I can't find any similar problem. Do you guys know how to make this work?</div>
<div><br></div><div>Any help would be greatly appreciated,</div><div>Sal</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>Iowa State University<br>Meteorology Graduate Student<br>3134 Agronomy Hall<br><a href="http://www.meteor.iastate.edu/~jdduda">www.meteor.iastate.edu/~jdduda</a><br>