[ncl-talk] A request for data file and problem on "bw_bandpass_filter" function

15295538792 15295538792 at 163.com
Sun Jan 13 19:12:35 MST 2019


Thanks Dave and Dennis for your help and suggestions. I've got the data file I need. I'll compare the butterworth filter with the Lanczos low pass filter carefully and choose an appropriate one.


Best wishes
Shouli Xuan

2019-01-14 

15295538792 



发件人:Dave Allured - NOAA Affiliate <dave.allured at noaa.gov>
发送时间:2019-01-14 04:33
主题:Re: [ncl-talk] A request for data file and problem on "bw_bandpass_filter" function
收件人:"Shouli Xuan"<15295538792 at 163.com>
抄送:"ncl-talk"<ncl-talk at ucar.edu>

Shouli Xuan,

Documentation for bw_bandpass_filter says it is optimized for narrow bandwidths.  Low pass is far outside the intended purpose of this function.  I looked at the reference paper (David Russell, 2005) and the source code.  It looks like this function may be unstable if you try to use it as a low pass filter.  Therefore you should find alternate code for low pass Butterworth filter, or else use a different filter.


The source code applies fca and fcb in a symmetric way.  This is why exchanging them gives the same results.  However, this is completely accidental, and outside the specifications for this function.  In general it is a mistake to use function parameters outside of their intended constraints (fcb > fca in this case).


I want to reinforce Dennis's suggestion.  Compare any special filter code with the NCL Lanczos low pass filter.  Check the filter responses in both time and frequency domains, as shown in examples filters_8.ncl and filters_9.ncl.


--Dave




On Sun, Jan 13, 2019 at 11:46 AM Dennis Shea <shea at ucar.edu> wrote:

[1] DATA: The years have changed but the files are available at:



ftp ftp.cgd.ucar.edu
anonymous
your_email
cd pub/shea/MJO
mget *                            .

quit
==========


Note: The file names have changed slightly from those used in the examples. For example:

olr.day.anomalies.1980-2005.nc  ==> olr.day.anomalies.1980-2011.nc
Perhaps, some minor changes in the graphic resources will be needed. 

==========
/ftp/pub/shea/MJO
-rw-r--r-- 1 shea cgdcas 458055500 Jan 11 10:08 MODEL.SST.HAD187001-198110.OI198111-201703.nc
-rw-r--r-- 1 shea cgdcas  30699392 Jan 11 10:18 OLR.12hr_2yrs.wheeler.nc
-rw-r--r-- 1 shea cgdcas 858482293 Jan 11 09:40 olr.day.anomalies.1979-2011.nc.gz
-rw-r--r-- 1 shea cgdcas 304335976 Jan 11 10:10 olr.day.mean.nc
-rw-r--r-- 1 shea cgdcas 615513004 Jan 11 10:24 pregpcp19962008.daily.nc
-rw-r--r-- 1 shea cgdcas 350655700 Jan 11 10:23 TRMM.200006-200109.thin.nc
-rw-r--r-- 1 shea cgdcas 929887809 Jan 11 09:41 uwnd.day.anomalies.1979-2011.200.nc.gz
-rw-r--r-- 1 shea cgdcas 934253770 Jan 11 09:41 uwnd.day.anomalies.1979-2011.850.nc.gz
-rw-r--r-- 1 shea cgdcas 939714739 Jan 11 09:41 vwnd.day.anomalies.1979-2011.200.nc.gz
-rw-r--r-- 1 shea cgdcas 939092767 Jan 11 09:41 vwnd.day.anomalies.1979-2011.850.nc.gz

====
The *gz files will have to be unpacked:
   %>  gzip -d *nc.gz
====


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


There are several examples of Butterworth filters. 

These included comaprison with Lanczos filters.


I do not know why: ".. exchange values of ca and cb .." does not change the results.
I don't have time to look right now. 

Perhaps the interface between NCL and the ubderlying fortran code does an exvhange.


re: making the band pass into a low-pass filter. Pergform xome comparisons withe a Lanczos low pass filter.


Good Luck





On Sat, Jan 12, 2019 at 8:27 PM 15295538792 <15295538792 at 163.com> wrote:

Dear NCL experts,

I'm writing to ask if you could send me the data file named "uwnd.day.850.anomalies.1980-2005.nc" which is used in the script "bfband_2.ncl". I can't find it in the online data files. In addition, I'd like to consult you about the function "bw_bandpass_filter" which applies a Butterworth bandpass filter to time series. The online documentation says that the cut-off paramaters ca and cb of this function should meet a condition of ca>cb (fcb>fca). However, when I exchanged the values of ca and cb, the results remained the same. How could this happen? In fact, I want to use this bandpass filter as a low pass filter which need only one cut-off frequency. So which parameter should I set to arbitrarily large (ca or cb)? Is there anything wrong in my script?  Please help. Thanking in anticipation. (PS: Input and output data files as well as ncl script I used has been attached to this email.)


Sincerely,
Shouli Xuan
Email:15295538792 at 163.com

2019-01-13


15295538792
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190114/436f10c7/attachment.html>


More information about the ncl-talk mailing list