<div dir="ltr"><b>I referred to the code for the function wk_spacetime as given on this <a href="http://www.mit.edu/course/13/13.715/ncarg-5.5.1/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl">link</a>. The result of the code is supposed to be in congruence with the methods used in the paper "<a href="https://journals.ametsoc.org/jas/article/56/3/374/24501">Convectively coupled equatorial waves: Analysis of clouds and temperature in the wavenumber–frequency domain</a>", according to which at first the 3 harmonics of the seasonal cycle are to be removed (as mentioned in Methodology part of the paper) but according to the code for wk_spacetime function, they have removed the annual cycle instead. Correct me if I am understanding it wrong. I am pasting the part of the code where the annual cycle is removed.</b><div><br></div><div><pre style="color:rgb(0,0,0);white-space:pre-wrap">;-------------------------------------------------------------------
; Remove dominant signals
; (a) Explicitly remove *long term* linear trend
; For consistency with JET code keep the grid point means.
; This necessitates that 'dtrend_msg' be used because 'dtrend'
; always removes the mean(s).
; (b) All variations >= approx 'nDayWin' days if full year available
;-------------------------------------------------------------------
dNam = getvardims( x )
work = x($dNam(1)$|:,$dNam(2)$|:,$dNam(0)$|:) ; reorder (lat,lon,time)
;;work = dtrend( work , False ) ; remove mean + overall long term temporal trend
work = dtrend_msg(ispan(0,ntim-1,1)*1.0, work, False, False) ; remove just trend
if (isatt(work,"_FillValue")) then
delete(work@_FillValue) ; dtrend_msg adds this att
end if
; replace with detrended
x = (/ work($dNam(0)$|:,$dNam(1)$|:,$dNam(2)$|:) /) ; values (time,lat,lon)
delete(work)
if (nDayTot.ge.365) then ; rmv dominant signals
rmvMeans = False ; original code did not remove
x = rmvAnnualCycle(x, spd, nDayTot, rmvMeans, fCrit, 0)
end if
if (debug) then
print("===> Post removal of trend and signal <===")
printVarSummary( x ) ; (time,lat,lon)
printMinMax( x, True )
end if
</pre><br class="gmail-Apple-interchange-newline"></div><div><b>Please help.</b></div><div><b>Regards.</b></div><div><b>Mayuresh </b></div></div>