Re: 2-6 days band pass filter

From: Dave Allured - NOAA Affiliate <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Fri Sep 06 2013 - 14:21:39 MDT

Also, reducing the number of weights will lower the quality of the
filter. That means that more of the signal OUTSIDE the frequency band
gets into the output, and also more of the signal INSIDE the frequency
band is reduced.

The best solution is to provide extra data before and after the time
period that you want to analyze, if you can get it. Short time series
may not be appropriate to analyze with a running average filter and
narrow band specifications, because you can not construct a filter of
sufficient quality to get meaningful results.

Before applying a digital filter to your data, it is best to
experiment with filter parameters and their response curves. This
will give you good insight into the trade-offs; quality of cut-off
regions, number of weights, and how much extra data is needed at the
start and end of the time series. There are several examples on the
NCL Filters page that generate Lanczos response curves. HTH.

   http://www.ncl.ucar.edu/Applications/filter.shtml

--Dave

On Fri, Sep 6, 2013 at 1:50 PM, Maria Gehne <mgehne@ucar.edu> wrote:
> Hi Soumik,
>
> the missing values at the beginning and end of the filtered data array are
> not errors.
>
> When you do a moving average the filtered value at time t, say y_t, depends
> on the original values before and after the time you are looking at. The
> number of points before and after depends on the number of weights you are
> using. So if your number of weights is N then the filtered value y_t depends
> on the (N-1)/2 values before and after x_t (the original data at time t).
>
> When you get to the end-points of your original data there are not enough
> data points on one side to compute the average and NCL puts in a missing
> value instead.
>
> In your case, you say you have 360 data points and your filter has 359
> weights. In that case only 2 values in your filtered data will not be
> missing.
>
> I would suggest you play with changing the number of weights to see how the
> filtered data depends on the number of weights you use. That will give you a
> better feeling for how the moving average works.
>
> Best,
> Maria
>
>
> On 09/06/2013 12:26 PM, Soumik Basu wrote:
>
> Hello,
>
> I would like to add some details to my problem mentioned in the last email
> about weights and weighted running average.
> I have this array of eke which does not have any missing values
>
> 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
>
> So when I do a running average of this array using 2-6days band pass
> filter(359 weights) it was seen that most of the values are missing values
> in this array as a result the running average is wrong.
> Can anybody please give me some suggestions about what can cause such
> problems in a weighted running average. I am attaching the code.
>
> 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=-295.503 max=333.579
>
>
> Thanks,
> Soumik
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> --
> Maria Gehne
> Postdoctoral Fellow
> NCAR/CGD/CAS
> P.O. Box 3000
> Boulder, CO 80307
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Sep 6 14:21:49 2013

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