[ncl-talk] Annual to Decadal

임수연 soottong at gmail.com
Tue Jul 25 00:03:36 MDT 2017


Dear All

I want to calculate decadal mean from annual data.
The dimension of annual data(T_annual) is:
[year|2000] x [lat|10] x [lon|19]
And the dimension what I want to get(T_decade) is:
[decade|200] x [lat|10] x [lon|19]

I attempted to use avg function:
---------------------------------------------
T_decade  =  new((/200,10,19/),float)

T_decade!0 = "decade"
T_decade!1 = "lat"
T_decade!2 = "lon"
T_decade&lat = T_annual&lat
T_decade&lon = T_annual&lon

Do i = 0,199
     n = 10*i
     T_decade(i,:,:)=avg(T_annual(n:n+9,:,:))
End Do
---------------------------------------------

and it seems not a good way.
Could you advise me how to calculate decadal mean from annual data?
Thank you.

Soo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170725/e72d0d32/attachment.html 


More information about the ncl-talk mailing list