SURF1(3NCARG) | NCAR GRAPHICS | SURF1(3NCARG) |

# NAME¶

SURF1 - calculate values for SURF2 usage.

# SYNOPSIS¶

CALL SURF1 (M, N, X, Y, Z, IZ, ZX1, ZXM, ZY1, ZYN, ZXY11, ZXYM1, ZXY1N, ZXYMN, ISLPSW, ZP, TEMP, SIGMA, IER)

This subroutine calculates certain values that are used by SURF2 in order to compute an interpolatory surface passing through a rectangular grid of function values. The surface computed is a tensor product of splines under tension. To calculate actual interpolated values, SURF2 must be called.

# DESCRIPTION¶

- 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).
- ZX1
- (real, input) An array containing N X-partial derivatives of the function along the line X(1), that is ZX1(J) is the X-partial derivative at point (X(1),Y(J)) for J=1,N. This parameter may be defaulted by setting ISLPSW appropriately.
- ZXM
- (real, input) An array containing N X-partial derivatives of the function along the line X(M), that is ZXM(J) is the X-partial derivative at point (X(M),Y(J)) for J=1,N. This parameter may be defaulted by setting ISLPSW appropriately.
- ZY1
- (real, input) An array containing M Y-partial derivatives of the function along the line Y(1), that is ZY1(I) is the Y-partial derivative at point (X(I),Y(1)) for I=1,M. This parameter may be defaulted by setting ISLPSW appropriately.
- ZYN
- (real, input) An array containing M Y-partial derivatives of the function along the line Y(N), that is ZY1(I) is the Y-partial derivative at point (X(I),Y(N)) for I=1,M. This parameter may be defaulted by setting ISLPSW appropriately.
- ZXY11
- (real, input) The X-Y-partial derivative at (X(1),Y(1). This parameter may be defaulted by setting ISLPSW appropriately.
- ZXYM1
- (real, input) The X-Y-partial derivative at (X(M),Y(1). This parameter may be defaulted by setting ISLPSW appropriately.
- ZXY1N
- (real, input) The X-Y-partial derivative at (X(1),Y(N). This parameter may be defaulted by setting ISLPSW appropriately.
- ZXYMN
- (real, input) The X-Y-partial derivative at (X(M),Y(N). This parameter may be defaulted by setting ISLPSW appropriately.
- ISLPSW
- (integer, input) A switch to indicate which boundary derivatives are user
supplied and which should be estimated internally. Where
I1 = 0 if ZX1 is user-supplied and 1 otherwise.

I2 = 0 if ZXM is user-supplied and 1 otherwise.

I3 = 0 if ZY1 is user-supplied and 1 otherwise.

I4 = 0 if ZYN is user-supplied and 1 otherwise.

I5 = 0 if ZXY11 is user-supplied and 1 otherwise.

I6 = 0 if ZXYM1 is user-supplied and 1 otherwise.

I7 = 0 if ZXY1N is user-supplied and 1 otherwise.

I8 = 0 if ZXYMN is user-supplied and 1 otherwise.set ISLPSW = I1 + 2*I2 + 4*I3 +8*I4 +16*I5 +32*I6 + 64*I7 + 128*I8. Then, for example, if ISLPSW=0, then all derivative information is user-supplied and if ISLPSW=255, then all derivative information is to be internally estimated.

- ZP
- (real, output) An array of size M x N x 3. On output this contains partial derivatives of the surface at the given nodes. ZP is used by SURF2.
- TEMP
- (real, input) Scratch space.
- 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.
- IER
- (integer, output) An error return value. If IER is returned as 0, then no
errors were detected.
= 1 if N is less than 2.

= 2 if X or Y values are not strictly increasing.

# ACCESS¶

To use SURF1, load the NCAR Graphics library ngmath.

# SEE ALSO¶

surf2, 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.

March 1998 | UNIX |