Re: Alternative for rmMonAnnCycTLL?

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri Feb 04 2011 - 07:50:22 MST

A decadal monthly filter will require at least 120 weights.

[1]
The simplest is a running average of length 121.
This means you will have 60 months at the beginning and end
that will be missing (_FillValue). The running average has some
drawbacks but is a good starting point.

[2] The filwgts_lanczos allows for better filter characteristics.
If you want a very good filter response you must use more weights.
Still for your purposes I speculate use nwt=121 [fca=1.120.]
will produce a beter filter than the running average.

[3] You could also use FFTs but this has other issues.

===
If you do not know fileters, please consult a book, eg

Digital Filters, Richard W. Hamming

Look at the article referenced in the filwgts_lanczos

Reference: C. Duchon
J. Applied Meteorology; August,1979; pp 1016-1022
Lanczos Filtering in One and Two Dimensions

On 2/3/11 5:34 PM, sbasu@iarc.uaf.edu wrote:
> Hi,
>
> I got the mean and I am trying to add a 10 year filter before doing the
> mean calculation. I am using the function "filwgts_lanczos" and here is
> that portion of my script.
>
> ;************************************************
> ; Filtering
> ;************************************************
>
> dt = 1 ; 1 month per time step
> t1 = 12 ; 1yrs or 12 months (low frequency cutoff,
> expressed in time domain)
> t2 = 120 ; 10 yrs or 120 months (high frequency
> cutoff, expressed in time domain)
>
> fca = dt/t1 ; (low frequency cutoff)
> fcb = dt/t2 ; (high frequency cutoff)
> nwt = 3
> ihp = 0
> nsigma = 1.
> wgt = filwgts_lanczos (nwt, ihp, fca, fcb, nsigma)
> opt =0
> sst = wgt_runave_n (sst, wgt, opt,0)
> printVarSummary(sst)
>
> For doing 10yr filter is this a correct function to use? My dataset is
> monthly sst from NOAA Reconstructed. Have I defined t1 and t2 values
> properly in order to get 10yr filter?
>
>
> Thanks,
>
>
> Adam Phillips wrote:
>> Hi Soumik,
>> There are various other functions that do the same thing. Take a look at
>> this list:
>> http://www.ncl.ucar.edu/Document/Functions/climo.shtml
>>
>> There are various forms of rmMonAnnCycTLL (ex. rmAnnCyc1e1D), along with
>> functions that calculate the climatology (ex. clmMonLLT), and other
>> functions that take the climatology and remove it from an array (ex.
>> calcMonAnomLLT).
>>
>> Now, of course, you could remove the annual cycle manually with a do
>> loop like this:
>>
>> ; arr is an array dimensioned time x lat x lon, starts in Jan,
>> ; ends in Dec. (UNTESTED)
>>
>> do gg = 0,11
>> arrT = arr(gg::12,:,:)
>> mon_avg = dim_avg_n_Wrap(arrT,0)
>> printVarSummary(mon_avg)
>> mon_avg_c = conform(arrT,mon_avg,(/1,2/))
>> printVarSummary(mon_avg_c)
>> delete(mon_avg)
>> arr(gg::12,:,:) = (/ arrT - mon_avg_c /)
>> delete(mon_avg_c)
>> delete(arrT)
>> end do
>>
>> Good luck,
>>
>> On 02/03/2011 03:12 PM, sbasu@iarc.uaf.edu wrote:
>>> Hi,
>>>
>>> Is there any other way to calculate monthly anomalies from monthly SST
>>> data other than using "rmMonAnnCycTLL" ?
>>>
>>> Thanks,
>>> Soumik
>>>
>>>
>>
>> --
>> __________________________________________________
>> asphilli@ucar.edu
>> National Center for Atmospheric Research tel: (303) 497-1726
>> Climate and Global Dynamics Division fax: (303) 497-1333
>> P.O. Box 3000
>> Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
>> _______________________________________________
>> 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 Feb 4 07:50:29 2011

This archive was generated by hypermail 2.1.8 : Fri Feb 04 2011 - 09:26:53 MST