# [ncl-talk] Lanczos Filtering

Dennis Shea shea at ucar.edu
Tue Dec 5 12:03:11 MST 2017

```Please look at the filtering examples:
https://www.ncl.ucar.edu/Applications/filter.shtml

In particular, run Example 8

[1] yes, of course ... more weights can create a sharper cutoff but there
is a larger loass od data at the beginning and end.

[2] re: practical criterion .... That is up to you as a scientist.

--
Note ncl-talk is not the place to learn about filtering.

Good luck

On Tue, Dec 5, 2017 at 9:14 AM, Kiswendsida Hyacinthe GUIGMA <
karongseba at gmail.com> wrote:

> Dear NCL users,
> I am very new on NCL and I am trying to filter my rainfall data using
> Lanczos Filter (bandpass 10-90 day filtering). My question concerns the
> processing of the weights. I would like to know
> 1-is there any relationship between the number of weights to choose and
> the cutoff frequencies?
> 2-is there any practical criterion to choose the number of weights? I know
> that this number influences the loss of data.
> Below is my code:
>
> ------------------------------------------------------------
> ------------------------------------------------------------
> ----------------------------------------------
> ;import the file
> rr=gpcp->precip
> ;filter parameters
> ihp=2 ;bandpass
> sigma=1.0 ; Lanczos sigma
> nWgt    = 81  ; number of weights -> means 40 data lost at the beginning
> and 40 data lost at the end.
> fca     = 1./90.            ; start freq ;highpass= 90 days
> fcb     = 1./10.                        ; last  freq; lowpass= 10 days
> wgt     = filwgts_lanczos (nWgt, ihp, fca, fcb, sigma )
> printVarSummary(wgt)
> xBPF    = wgt_runave_n_Wrap ( rr, wgt, 0, 0)      ; 10-90 day bp performed
> across time dimension(0) of rr (meaning the time dimension)
>  -----------------------------------------------------------
> ------------------------------------------------------------
> ----------------------------------------------
>
>
>
>
>
> Cheers,
>
> GUIGMA
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171205/3f8f5823/attachment.html>
```