NCL Home > Documentation > Functions > General applied math

taper

Applies split-cosine-bell tapering to one or more series.

Prototype

	function taper (
		x       : numeric,  
		p       : numeric,  
		option  : numeric   
	)

	return_val [*] :  numeric

Arguments

x

An array of one or more dimensions. The tapering will be performed on the rightmost dimension.

p

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).

option

Reserved for future use (not currently used).

Return value

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.

Description

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
Peter Bloomfield
Wiley-Interscience, 1976

See Also

ezfftf

Examples

Example 1

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:

  xTaper = taper(x(lat|:, lon|:, time|:), 0.1, 0)
  xCoef  = ezfftf(xTaper)