Re: Parameter of function--filwgts_lanczos

From: Dave Allured - NOAA Affiliate <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Fri Dec 14 2012 - 16:29:07 MST

Li Yang,

1. Number of weights.

My informal rule is to always use a number of weights that is at least
5 times 1/fca, the reciprocal of the lower cutoff frequency in a
digital filter, at least for climate analysis. The whole reason for
using a digital filter is to get sharp cutoff. If there are not
enough weights, then the filter will have a slow or mushy cutoff, and
the signal that you are looking for will have significant
contamination from out-of-band frequencies.

You want a band pass filter for 2 to 7 years, with monthly data. With
a band pass filter, the lower cutoff frequency is the one associated
with the higher time limit on the band specification (7 years). Using
the nomenclature on the filter example page that you referenced:

   dt = 1 month per time step
   t1 = 7 years = 84 months (low frequency cutoff, expressed in time domain)
   fca = dt/t1 = 1./84. = 0.0119 time steps (low frequency cutoff)
   nwt = 5 * 1/fca = 5/0.0119 = (420 rounded up) = 421 weights

2. End point problem.

The only solution is to get additional data points outside of your
study time range. With 421 weights and monthly data, you need about
18 additional years (210 time steps) before your study period, and 18
additional years after your study period. For example, to get
complete filter output for 1970 to 1990, you need valid time series
for 1952 through 2008.

I do not have experience with other filter types. Maybe someone else
can answer your other question comparing filter types.

Caveats:

1. When designing a digital filter, always examine carefully the
filter response curve. See examples on the referenced web page.

2. Here are caveats and reference information recently posted by Dennis Shea:
http://www.ncl.ucar.edu/Support/talk_archives/2012/2294.html

3. Please read other NCL discussions on this topic, there is more
good advice. Enter "filter weights" into the NCL search box. HTH.

--Dave
* Reply only to list, please *

On Fri, Dec 14, 2012 at 10:16 AM, Li Yang <liyang0711@gmail.com> wrote:
> Hi,
>
> I have two question to ask you.
> First is,
> I want to use Band pass filters for 2-7 years in the monthly data. But I do
> not know how to select the parameter of this function--filwgts_lanczos.
> How to select the best parameter (e.g. nwt , how to select it?).
> And I also want to solve the End point problems(that is End point is valid
> point),when I use the function--filwgts_lanczos to filter . How do I do.
> Second is,
> In this website http://www.ncl.ucar.edu/Applications/filter.shtml,
> the filwgts_lanczos and FFT all use to Band pass filters.But I do not kow
> which is best .And if I use Band pass filters for 2-7 years,the
> filwgts_lanczos or
> FFT?
>
>
> Best Wishes
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Dec 14 16:29:21 2012

This archive was generated by hypermail 2.1.8 : Fri Dec 21 2012 - 10:43:23 MST