Anyone using NCL to do a data filtering? (reconstruct the dominate frequency of wavelet)

From: LEO_ARIES <Leo_Aries_at_nyahnyahspammersnyahnyah>
Date: Wed, 31 Jan 2007 22:47:10 +0800

Hi, all

     I'm using NCL to do some wavelet analysis , including signal filtering. I've searched only
related tips in ncl-talk, which is listed below :
     http://www.ncl.ucar.edu/Support/talk_archives/2006/0997.html
and I think this tips concern on the same question with me.

    Since Ncl do not offer a way for wavelet filtering. I write some codes below :

....... ( most parts of the codes are in http://www.ncl.ucar.edu/Applications/Scripts/wavelet_2.ncl)

; **** calculate the temporal series of scale avg power
  scale = w_at_scale
  Cdelta = w_at_cdelta
  powernorm = power
  powernorm = power/conform(power,scale,0)
  scaleavg = dj*dt/Cdelta*dim_sum_Wrap(powernorm(time|:,{period|80.:120.})) ; based on Eq(24) of Torrence etal 1998

 ; **** reconstruct the filtered series at a certain band
  pi = 3.1415926
  realwave = w(0,:,:)/sqrt(conform(power,scale,0))
  realwave!0 = "period"
  realwave&period = w_at_period
  realwave!1 = "time"
  realwave&time = time

  scale_fil = dj*sqrt(dt)*(pi^0.25)/Cdelta*dim_sum_Wrap(realwave(time|:,{period|10.:50.})) ; 10yr - 50 yr band pass,based on Equation(29)

I wish it can help someone who do the same job and also be thankful if anyone who can check it .

Good Luck

Lin

  

LEO_ARIES
2007-01-31

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 31 2007 - 07:47:10 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 06 2007 - 15:01:34 MST