Re: 2-6 days band pass filter

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Sep 05 2013 - 18:59:04 MDT

For 2 to 6 daya [ 1.0/(2*365) to 1.0/(6*365) cycles per year]

You need a *lot* of weights: say 751

On 9/5/13 4:37 PM, Soumik Basu wrote:
> Hi,
>
> I am trying to a band pass filter 0f 2-6 days. My data has 6 hourly time
> steps. My questions are:
>
> 1) For using 2-6 days band pass filter on transient eddy kinetic energy
> how many weights should I use? I am using 101 weights.
>
> 2)How can negative values come when it does not have any negative values
> before doing the running average.
>
> Here is the printVarSummary before running average
>
> Variable: eke775
> Type: float
> Total Size: 47185920 bytes
> 11796480 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 360] x [lat | 128] x [lon | 256]
> Coordinates:
> time: [30.5..120.25]
> lat: [-88.92773535229591..88.92773535229591]
> lon: [ 0..358.59375]
> Number Of Attributes: 2
> lev_p : 775
> _FillValue : 9.96921e+36
> (0)
> (0) min=6.84898e-06 max=2269.73
>
> Here is the printVarSummary and min max after running average
>
>
> Variable: eke_f
> Type: float
> Total Size: 47185920 bytes
> 11796480 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 360] x [lat | 128] x [lon | 256]
> Coordinates:
> time: [30.5..120.25]
> lat: [-88.92773535229591..88.92773535229591]
> lon: [ 0..358.59375]
> Number Of Attributes: 3
> lev_p : 775
> _FillValue : 9.96921e+36
> wgt_runave_op_ncl : wgt_runave_n
> (0)
> (0) min=-689.534 max=1134.18
>
>
> This is the part of the script I am using for filtering and running
> average:
>
> ;*******************************************************
> ; Calculate band pass filter weights
> ;*******************************************************
> ;lanczos weights for 2-6 day bandpass using 6-hourly data
>
>
> ;number of timesteps in low pass cutoff -- in this case 6 days (6*4 = 24
> time steps)
>
>
> low = 24
>
>
> ;number of timesteps in high pass cutoff -- in this case 2 days (8 time
> steps)
>
>
> high= 8.
>
>
> nwt = 101 ;A scalar indicating the total number of weights
>
> ;(must be an odd number; nwt >= 3).
>
> ;The more weights, the better the filter, but there is a
>
> ;greater loss of data.
>
> fca = 1./low ;A scalar indicating the cut-off frequency of the ideal
>
> ;high or low-pass filter: (0.0 < fca < 0.5)
>
> fcb = 1./high ;A scalar used only when a band-pass filter is desired.
>
> ;It is the second cut-off frequency (fca < fcb < 0.5).
>
> ihp = 2 ;A scalar indicating the low-pass filter:
>
> ;ihp = 0; high-pass ihp = 1; band-pass ihp = 2.
>
> nsigma = 1. ;A scalar indicating the power of the sigma factor (nsigma
> >= 0).
>
> ;Note: nsigma=1. is common.
>
>
> ; compute weights
>
>
> wts = filwgts_lancos (nwt, ihp, fca, fcb, nsigma)
>
>
> print(wts)
>
>
> print(wts@resp+" "+wts@freq)
>
>
> ;********************************************************
> ; apply lanczos wts to 6 hourly data -> band pass filtering
> ;********************************************************
>
>
> eke_f = wgt_runave_n_Wrap(eke775,wts,0,0)
>
>
> printVarSummary(eke_f)
> printMinMax(eke_f,True)
>
> Thanks,
> Soumik
>
>
>
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Sep 5 18:59:13 2013

This archive was generated by hypermail 2.1.8 : Mon Sep 16 2013 - 13:43:52 MDT