# ncl_surf2 man page

SURF2 — 2D interpolation for gridded data

## Synopsis

`FUNCTION SURF2 (XX, YY, M, N, X, Y, Z, IZ, ZP, SIGMA) `

This function interpolates a surface value at a specified coordinate using bi-splines under tension. SURF1 must be called before invoking SURF2. The desired interpolated value is returned as the value of the function.

## Description

- XX
(real, input) Contains the X coordinate of a point to be mapped onto the interpolated surface.

- YY
(real, input) Contains the Y coordinate of a point to be mapped onto the interpolated surface.

- M
(integer, input) The number of grid lines in the X direction. (M > 1)

- N
(integer, input) The number of grid lines in the Y direction. (N > 1)

- X
(real, input) An array containing M X coordinates for grid lines in the X direction. These values must be strictly increasing.

- Y
(real, input) An array containing N Y coordinates for grid lines in the Y direction. These values must be strictly increasing.

- Z
(real, input) An array containing M x N functional values at the grid points; Z(I,J) contains the functional value at (X(I),Y(J)) for I=1,M and J=1,N.

- IZ
(integer, input) The row dimension of the matrix Z (IZ is greater than or equal to M).

- ZP
(real, input) An array of size M x N x 3.

- SIGMA
(real, input) Tension factor. Values near zero result in a cubic spline; large values (e.g. 50) result in nearly a polygonal line. A typical value is 1.

## Return Value

SURF2 returns the interpolated value at the specified point T.

## Access

To use SURF2, load the NCAR Graphics library ngmath.

## See Also

surf1, fitgrid_params.

Complete documentation for Fitgrid is available at URL

http://ngwww.ucar.edu/ngdoc/ng/ngmath/fitgrid/fithome.html

## Copyright

Copyright (C) 2000

University Corporation for Atmospheric Research

The use of this Software is governed by a License Agreement.