NCL Website header
NCL Home > Documentation > Functions > General applied math

wgt_runave_Wrap

Calculates a weighted running average on the rightmost dimension and retains metadata.

Prototype

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"  ; This library is automatically loaded
                                                             ; from NCL V6.2.0 onward.
                                                             ; No need for user to explicitly load.

	function wgt_runave_Wrap (
		x    : numeric,  
		wgt  : numeric,  
		opt  : integer   
	)

	return_val  :  float or double

Arguments

x

An array with one or more dimensions. The fastest varying (i.e. rightmost) dimension will be the dimension on which the weighted running average is performed. Missing values should be indicated by x@_FillValue. If x@_FillValue is not set, then the NCL default (appropriate to the type of x) is assumed.

wgt

A one-dimensional vector containing all the weights. Most commonly, the number of weights is an odd number.

opt

End-point option (opt = 0 is the most common option)

For a full description of the opt argument, see the wgt_runave page.

Description

This function is identical to wgt_runave, except the return value will have metadata added based on metadata attached to x. See the wgt_runave page for full documentation and examples.