NCL Home > Documentation > Functions > Interpolation

linint1_n_Wrap

Interpolates from one series to another using piecewise linear interpolation across the given 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 linint1_n_Wrap (
		xi           : numeric,  
		fi           : numeric,  
		fiCyclic [1] : logical,  
		xo       [*] : numeric,  
		foOption     : integer,  
		dim      [1] : integer   
	)

	return_val  :  float or double

Arguments

xi

An array that specifies the X coordinates of the fi array. It must be strictly monotonically increasing or decreasing, and can be unequally spaced. If xi is multi-dimensional, then its dimensions must be the same size as fi's dimensions. If it is one-dimensional, its length (call it nxi) must be the same as the dim-th dimension of fi.

fi

An array of one or more dimensions. The dim-th dimension (nxi) is the dimension to be interpolated. If missing values are present, the attribute fi@_FillValue must be set appropriately.

fiCyclic

An option to indicate whether the dim-th dimension of fi is cyclic.

This should be set to True only if you have global data, but your longitude values don't quite wrap all the way around the globe. For example, if your longitude values go from, say, -179.75 to 179.75, or 0.5 to 359.5, then you would set this to True.

xo

A one-dimensional array that specifies the X coordinates of the return array. It must be monotonically increasing or decreasing and may be unequally spaced.

foOption

Reserved for future use. It is currently not used, but set it to 0.

dim

A scalar integer indicating which dimension of fi to do the interpolation across. Dimension numbering starts at 0.

Description

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