<p class="MsoPlainText">Dear GrADS users,</p><p class="MsoPlainText"><br></p><p class="MsoPlainText">I
want to extract daily averages from a monthly file having 3 hourly out
put data. I am using the following script (in blue color). Script is
working fine but the result of daily averages obtained by this script
are different when I compare it by directly opening the 3 hourly output
file in GrADS and do manual daily average at particular lat and lon
information. The manual command is as follows.</p><br><p class="MsoPlainText">Any idea in this regard?<br></p><p class="MsoPlainText"><br></p><p class="MsoPlainText"><span style="color: rgb(0, 0, 255);">&#39;set gxout fwrite&#39;</span><br style="color: rgb(0, 0, 255);">
<span style="color: rgb(0, 0, 255);">
&#39;disable fwrite&#39;</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">
&#39;set fwrite SRF_avg_daily.grd&#39;</span><br style="color: rgb(0, 0, 255);">
<span style="color: rgb(0, 0, 255);">
&#39;open /RAID/RegCM_A2/ERA40_09/SRF.1961010100.ctl&#39;</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">
&#39;set x 1 303&#39;</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">
&#39;set y 1 226&#39;</span><br style="color: rgb(0, 0, 255);">
<span style="color: rgb(0, 0, 255);" lang="ES">t=1<br>
tmax=248<br>
while(t&lt;=tmax)<br>
&#39;set t &#39;t<br>
&#39;define a=avg(t2min,t+0,t+7)&#39;<br>
&#39;d const(a,-9999.0,-u)&#39;<br>
</span><span style="" lang="FR"><span style="color: rgb(0, 0, 255);">t=t+8</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">
endwhile</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">
&#39;close 1&#39;</span><br>
</span><br>
</p>

<br>Regards,<br><br><br>Mubashar<br><br clear="all"><br>-- <br>Muhammad Mubashar Ahmad Dogar<br>Scientific Officer (Climatology Section),<br>Global Change Impact Studies Centre (GCISC),<br>NCP complex, Quaid-e-Azam University Campus,<br>
Shahdra road, Islamabad, Pakistan.<br>Tel:  +92519230226<br>Mob:+923315144169<br>email: <a href="mailto:mubashardogar@yahoo.com">mubashardogar@yahoo.com</a><br>          <a href="mailto:mubashar.ahmad@gcisc.org.pk">mubashar.ahmad@gcisc.org.pk</a><br>