[ncl-talk] Removing seasonal cycle from monthly data

Sri.durgesh Nandini-Weiss sri.durgesh.nandini-weiss at uni-hamburg.de
Mon Nov 4 03:58:56 MST 2019


Hello everyone,

I am doing a simple calculation on monthly means data e.g. temp from 
1850-2000.

I would like to calculate the mean, standard deviation (e.g tempfrom 
1986-2006). For this the seasonal cycles of the respective periods 
should be removed otherwise its probably not Gaussian so i want to 
extract the seasonal cycle out of my data.

Are the below steps the correct way to do this? My script is successful 
in retrieving the anomalies.

;=================================================================
; Concepts illustrated:
;   - Calculates long term monthly means (monthly climatology) from 
monthly data: (time,lev,lat,lon) version
;   - Compute monthly anomalies using monthly climatology
;   - Calculates climatological anomalies by subtracting the long term 
mean from each point.
;   - Assumes monthly data. If the input data contains metadata (e.g. 
coordinate variables and attributes), these will be retained.
;==================================================================
   yrStrt = 1986
   yrLast = 2006

   f = addfile("zo_hist_1850-2005_ens_1-100.nc","r")
   TIME   = f->time
   TIME = TIME-31
   YYYY   = cd_calendar(TIME,-1)/100                 ; entire file
   iYYYY  = ind(YYYY.ge.yrStrt .and. YYYY.le.yrLast)  ;this is from 1 
Jan 1986 to 1 Dec 2006

   zo = f->zo(iYYYY,:,:,:,:) ; [time | 240] x [ens:100] x [depth:1] x 
[lat | 192] x [lon | 288]
   zo at _FillValue = 9.96921e+36
   printVarSummary(zo)
   printMinMax(zo,0)

   zo1 = dim_avg_n_Wrap( zo, 2)                                     
;[time | 240] x [ens:100] x [lat | 192] x [lon | 288]
   printVarSummary(zo1)

;==================================================================
; Compute monthly climatology
;==================================================================

   zo2 = clmMonTLLL( zo1 )                                          ; 
[month | 12] x [ens | 100] x [lat | 45] x [lon | 90]
   printVarSummary(zo2)

;==================================================================
; Compute  monthly anomalies from the above climatology to remove 
seasonal cycle
;==================================================================

     zAnom = calcMonAnomTLLL (zo1,zo2)
printVarSummary(zAnom) ;[time | 240] x [ens | 100] x [lat | 45] x [lon | 90]

     zAnom at long_name = "Anomalies from monthly Climatology"
     printVarSummary(zAnom)
     printMinMax(zAnom, 0)


Or should i be using rmMonAnnCycLLLT (removes the annual cycle from the 
monthly data) instead?

Would be grateful for some guidance on this!

Sri

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191104/85673d17/attachment.html>


More information about the ncl-talk mailing list