# linint2_Wrap

Interpolates from a rectilinear grid to another rectilinear grid using bilinear interpolation, and retains metadata.

## Prototype

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" ; This library isautomatically loaded; from NCL V6.2.0 onward. ; No need for user to explicitly load. function linint2_Wrap ( xi : numeric, yi : numeric, fi : numeric, fiCyclicX [1] : logical, xo [*] : numeric, yo [*] : numeric, foOption [1] : integer ) return_val : float or double

## Arguments

*xi*

An array that specifies the X coordinates of the *fi*
array. Most frequently, this is a 1D monotonically increasing array
that may be unequally spaced. In some cases, *xi* can be a
multi-dimensional array (see next paragraph). The rightmost dimension
(call it *nxi*) must have at least two elements, and is the
last (fastest varying) dimension of *fi*.

If *xi* is a multi-dimensional array, then each *nxi*
subsection of *xi* must be monotonically increasing, but may be
unequally spaced. All but its rightmost dimension must be the same
size as all but *fi*'s rightmost two dimensions.

For geo-referenced data, *xi* is generally the longitude array.

*yi*

An array that specifies the Y coordinates of the *fi*
array. Most frequently, this is a 1D monotonically increasing array
that may be unequally spaced. In some cases, *yi* can be a
multi-dimensional array (see next paragraph). The rightmost dimension
(call it *nyi*) must have at least two elements, and is the
second-to-last dimension of *fi*.

If *yi* is a multi-dimensional array, then each *nyi*
subsection of *yi* must be monotonically increasing, but may be
unequally spaced. All but its rightmost dimension must be the same
size as all but *fi*'s rightmost two dimensions.

For geo-referenced data, *yi* is generally the latitude array.

*fi*

An array of two or more dimensions. The two rightmost dimensions must
of size *nyi* x *nxi*, and are the dimensions used in the
interpolation. If missing values are present, the attribute
*fi*@_FillValue must be
set appropriately.

*fiCyclicX*

An option to indicate whether the rightmost 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, but may be unequally spaced.

For geo-referenced data, *xo* is generally the longitude array.

*yo*

A one-dimensional array that specifies the Y coordinates of the return array. It must be monotonically increasing, but may be unequally spaced.

For geo-referenced data, *yo* is generally the latitude array.

*foOption*

Reserved for future use. Currently not used, but set it to 0.

## Description

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