[gradsusr] (no subject)

Sedighe Mehravar s.mehravar64 at gmail.com
Mon Nov 9 04:09:27 EST 2020


Hello
Dear Users,
I want to calculate anomaly precipitation with  chirps monthly data (It is
one nc file with 477 t size since  jan. 1981 to oct. 2020 ). At first I
calculated Climatic average for each month (Jan , Feb, ....) with this
script:
'sdfopen F:\chrips\repre.nc'
'define janclim=ave(repre,t=1,t=477,12)'
'set sdfwrite F:\chrips\janclim.nc'
'sdfwrite janclim'
So I calculated 12 Climatic average nc files (janclim.nc , Febclim.nc ,
.....). After that I wanted to calculate Anomaly precipitation each month.I
mean, during this period 12 anomalies had to be calculated (Jananomaly.nc ,
Febanomaly.nc ,....) that t size in each file should be 40 . I tried the
script below but the output files had 1 t size.
I would be very grateful if anyone could help me.


*****************************Script
'reinit'
'sdfopen F:\chrips\repre.nc'
'sdfopen F:\chrips\meanclim\janclim.nc'
i = 1
while(i<=477)
'set t 'i
'define jananomaly=(repre.1-janclim.2)'
'set sdfwrite F:\chrips\jananomaly.nc'
'sdfwrite jananomaly'
i = i + 12
endwhile
'reinit'


ه
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20201109/adad22e8/attachment.html>


More information about the gradsusr mailing list