Applies split-cosine-bell tapering to one or more series across the rightmost dimension.
function taper ( x : numeric, p  : numeric, option : numeric ) return_val [*] : numeric
An array of one or more dimensions. The tapering will be performed on the rightmost dimension.
A scalar (0.0 ≤ p ≤ 1.0) which specifies the proportion of the series to be tapered. Typically, p = 0.1 (corresponding to 10% of the series).
As of NCL V6.2.1, option can be set to:
- option = 0
Results in the series being tapered to the series mean
(this is the default behavior in older versions of this function)
- option = 1
Forces the function to taper to 0.0
- option not equal to 0 or 1
Acts like option = 0
Returns an array dimensioned the same as x.
The return type is floating point if the input is floating point, and double if the input is of type double.
This function is used prior to performing a fast fourier transform (FFT) to a series that is not cyclic. It reduces the leakage from strong spectral peaks. See chapter five of the following reference:
Fourier Analysis of Time Series
Use taper_n if the dimension to do the calculation on is not the rightmost dimension and reordering is not desired. This function can be significantly faster than taper.
Let x be a 1D array of length nx (e.g. nx = 800):
xTaper = taper(x, 0.1, 0) xCoef = ezfftf(xTaper)Example 2
Define x(time, lat, lon) where ntim = 500, nlat = 64, mlon = 128: