[gradsusr] how to find monthly sum from a ctl file while writing it as nc file using lats4d

Waheed waheed.met at gmail.com
Mon May 24 23:17:52 EDT 2010


---------- Forwarded message ----------
From: Waheed <waheed.met at gmail.com>
Date: Mon, May 24, 2010 at 5:18 PM
Subject: how to find monthly sum: when using lats4d
To: dasilva at alum.mit.edu



 hello

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
 but i am not understading how to do?
the script that i have wrtten is as :

'reinit'
'open data-aphd\APHRO_PAK_005deg_V0902.1961-2007/APHRO_PAK_005deg_V0902.ctl'
ti=1
tf=ti+30
y=1961
while (y<=2007)
while (ti<=16832)
'set t 'ti
'lats4d -v -i
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')'
ti=ti+365
'set t 'ti
'q time'
say result
res=subwrd(result,3)
yf=substr(res,9,4)
if (y=yf)
ti=ti+1
'set t 'ti
endif
y=y+1
endwhile
endwhile




any help


thanx in advance

Regards




-- 
waheed iqbal
(Meteorologist)
Pakistan Meteorological Department
R & D islamabad
+923334547814



-- 
waheed iqbal
(Meteorologist)
Pakistan Meteorological Department
R & D islamabad
+923334547814
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100525/ffa4d2fd/attachment-0003.html 


More information about the gradsusr mailing list