Dear everyone,
I'd like to use the following code to do the band-pass filter,
;--------------------
; FFT filter (band filter) interannual...
;--------------------
x = vara
ntim = dimsizes(vara&time)
fca = 1./(8.0*12) ; minimum freq 8-year, 8*12 months
fcb = 1./13. ; maximum freq 13-month
xtaper = taper(x(lev|:,lat|:,lon|:,time|:), 0.1, 0) ; taper
xdtrend = dtrend(xtaper,False) ; detrend
cf = ezfftf (xdtrend) ; sub period (2, ntim/2)
fcf = fspan(0, 0.5, ntim/2)
ifcf = ind(fcf.lt.fca .or. fcf.gt.fcb)
cf(:,:,:,:,ifcf) = 0.0 ; set coef to zero
xfft = ezfftb (cf, cf_at_xbar)
After filtering, the magnitudes for the beginning and ending points are very low, and even not correct. I know there must be something unreal for those points due to FFT, but why and how the FFT method cause such kind of problem? and how to reduce the errors and keep the information?
Thanks.
Best regards,
Xuguang
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 25 2009 - 07:30:11 MDT
This archive was generated by hypermail 2.2.0 : Wed Sep 02 2009 - 12:24:39 MDT