[ncl-talk] Daniell filters of length 6, 12, and 12

Dennis Shea shea at ucar.edu
Thu Jul 16 11:42:47 MDT 2020


NCL's *specx_anal*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/specx_anal.shtml>
uses a modified Daniell smoother. It requires the argument 'jave' to be an
odd number.
Please read the documentation.

Also see: *   https://www.ncl.ucar.edu/Applications/filter.shtml*
<https://www.ncl.ucar.edu/Applications/filter.shtml>

===

There is no explicit Daniell filter function in NCL. You can write your own.
undef ("daniell_filter")
function daniell_filter(x[*]:numeric,n[1]:integer ... )
begin
    :
    xDaniell = ...
    :
    return(xDaniell)
end
;---------------  MAIN -------------

   iopt = 0    ; remove series mean
   jave = 0    ; no smoothing; return *periodogram estimates*
   pct  = 0.1  ; taper 10% of the data
   dof  = specx_anal
<https://www.ncl.ucar.edu/Document/Functions/Built-in/specx_anal.shtml>
(x,iopt,jave,pct)

     spcx = dog at spcx    ; explicitly extract periodogram estimates
     n = 12
     spcx = daniell_filter(spcx, n, ...)    ; apply daniell filter to
periodogram
     spcx at info = "Spectra after daniell filter n="+n

--------------------

On Wed, Jul 15, 2020 at 9:00 AM Xi Chang <xi.chang01 at gmail.com> wrote:

> Dear NCL,
>
> Is there any way to creat Daniell Filter for smoothing the spectra in NCL?
>
> Thanks
> Chang
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200716/172e0afc/attachment.html>


More information about the ncl-talk mailing list