<div dir="ltr"><br><br>
<div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Waheed</b> <span dir="ltr"><<a href="mailto:waheed.met@gmail.com">waheed.met@gmail.com</a>></span><br>Date: Mon, May 24, 2010 at 5:18 PM<br>
Subject: how to find monthly sum: when using lats4d<br>To: <a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br><br><br>
<div dir="ltr">
<div class="gmail_quote"><br>
<div dir="ltr">
<p>hello<br> <br>dear i am converting daily precipitaion data (aphrodite) form 1961 to 2007 from ctl type to nc(netcdf) type , i have done it but now i want to find the monthly total from 1961-2007 using lats4d<br> but i am not understading how to do?<br>
the script that i have wrtten is as :</p>
<p>'reinit'<br>'open data-aphd\APHRO_PAK_005deg_V0902.1961-2007/APHRO_PAK_005deg_V0902.ctl'<br>ti=1<br>tf=ti+30<br>y=1961<br>while (y<=2007)<br>while (ti<=16832)<br>'set t 'ti<br>'lats4d -v -i <br>
data-aphd\APHRO_PAK_005deg_V0902.1961-2007/APHRO_PAK_005deg_V0902.ctl -ftype ctl -o waheed/JAN'y' -func sum(precip,t='ti',t='tf')'<br>ti=ti+365<br>'set t 'ti<br>'q time'<br>say result<br>
res=subwrd(result,3) <br>yf=substr(res,9,4)<br>if (y=yf)<br>ti=ti+1<br>'set t 'ti<br>endif<br>y=y+1<br>endwhile<br>endwhile</p>
<p> <br> <br> <br>any help <br> <br> <br>thanx in advance <br> <br>Regards<br></p></div><br></div><br><br clear="all"><br>-- <br>waheed iqbal<br>(Meteorologist)<br>Pakistan Meteorological Department<br>R & D islamabad<br>
+923334547814<br></div></div><br><br clear="all"><br>-- <br>waheed iqbal<br>(Meteorologist)<br>Pakistan Meteorological Department<br>R & D islamabad<br>+923334547814<br></div>