NCL Home > Documentation > Functions > General applied math


Performs nine point local smoothing on one or more 2D grids and retains metadata.


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 smth9_Wrap (
		x     : numeric,  
		p     : numeric,  
		q     : numeric,  
		wrap  : logical   

	return_val [dimsizes(x)] :  float or double



A grid of two or more dimensions. The two rightmost dimensions are the dimensions to be smoothed. If missing values are present, the attribute x@_FillValue must be set appropriately.


Two scalars which affect the degree of smoothing. In general, for good results, set p = 0.50. With p = 0.50, a value of q = -0.25 results in "light" smoothing and q = 0.25 results in "heavy" smoothing. A value of q = 0.0 results in a 5-point local smoother.


False if the rightmost dimension is not to be treated as cyclic. True when the rightmost dimension is treated as cyclic. x should not include the cyclic point.


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