1SURF1(3NCARG) NCAR GRAPHICS SURF1(3NCARG)
2
3
4
6 SURF1 - calculate values for SURF2 usage.
7
9 CALL SURF1 (M, N, X, Y, Z, IZ, ZX1, ZXM, ZY1, ZYN, ZXY11, ZXYM1, ZXY1N,
10 ZXYMN, ISLPSW, ZP, TEMP, SIGMA, IER)
11
12 This subroutine calculates certain values that are used by SURF2 in
13 order to compute an interpolatory surface passing through a rectangular
14 grid of function values. The surface computed is a tensor product of
15 splines under tension. To calculate actual interpolated values, SURF2
16 must be called.
17
19 M (integer, input) The number of grid lines in the X direc‐
20 tion. (M > 1)
21
22 N (integer, input) The number of grid lines in the Y direc‐
23 tion. (N > 1)
24
25 X (real, input) An array containing M X coordinates for grid
26 lines in the X direction. These values must be strictly
27 increasing.
28
29 Y (real, input) An array containing N Y coordinates for grid
30 lines in the Y direction. These values must be strictly
31 increasing.
32
33 Z (real, input) An array containing M x N functional values
34 at the grid points; Z(I,J) contains the functional value at
35 (X(I),Y(J)) for I=1,M and J=1,N.
36
37 IZ (integer, input) The row dimension of the matrix Z (IZ is
38 greater than or equal to M).
39
40 ZX1 (real, input) An array containing N X-partial derivatives
41 of the function along the line X(1), that is ZX1(J) is the
42 X-partial derivative at point (X(1),Y(J)) for J=1,N. This
43 parameter may be defaulted by setting ISLPSW appropriately.
44
45 ZXM (real, input) An array containing N X-partial derivatives
46 of the function along the line X(M), that is ZXM(J) is the
47 X-partial derivative at point (X(M),Y(J)) for J=1,N. This
48 parameter may be defaulted by setting ISLPSW appropriately.
49
50 ZY1 (real, input) An array containing M Y-partial derivatives
51 of the function along the line Y(1), that is ZY1(I) is the
52 Y-partial derivative at point (X(I),Y(1)) for I=1,M. This
53 parameter may be defaulted by setting ISLPSW appropriately.
54
55 ZYN (real, input) An array containing M Y-partial derivatives
56 of the function along the line Y(N), that is ZY1(I) is the
57 Y-partial derivative at point (X(I),Y(N)) for I=1,M. This
58 parameter may be defaulted by setting ISLPSW appropriately.
59
60 ZXY11 (real, input) The X-Y-partial derivative at (X(1),Y(1).
61 This parameter may be defaulted by setting ISLPSW appropri‐
62 ately.
63
64 ZXYM1 (real, input) The X-Y-partial derivative at (X(M),Y(1).
65 This parameter may be defaulted by setting ISLPSW appropri‐
66 ately.
67
68 ZXY1N (real, input) The X-Y-partial derivative at (X(1),Y(N).
69 This parameter may be defaulted by setting ISLPSW appropri‐
70 ately.
71
72 ZXYMN (real, input) The X-Y-partial derivative at (X(M),Y(N).
73 This parameter may be defaulted by setting ISLPSW appropri‐
74 ately.
75
76 ISLPSW (integer, input) A switch to indicate which boundary deriv‐
77 atives are user supplied and which should be estimated
78 internally. Where
79
80 I1 = 0 if ZX1 is user-supplied and 1 otherwise.
81 I2 = 0 if ZXM is user-supplied and 1 otherwise.
82 I3 = 0 if ZY1 is user-supplied and 1 otherwise.
83 I4 = 0 if ZYN is user-supplied and 1 otherwise.
84 I5 = 0 if ZXY11 is user-supplied and 1 otherwise.
85 I6 = 0 if ZXYM1 is user-supplied and 1 otherwise.
86 I7 = 0 if ZXY1N is user-supplied and 1 otherwise.
87 I8 = 0 if ZXYMN is user-supplied and 1 otherwise.
88
89 set ISLPSW = I1 + 2*I2 + 4*I3 +8*I4 +16*I5 +32*I6 + 64*I7 +
90 128*I8. Then, for example, if ISLPSW=0, then all derivative
91 information is user-supplied and if ISLPSW=255, then all
92 derivative information is to be internally estimated.
93
94 ZP (real, output) An array of size M x N x 3. On output this
95 contains partial derivatives of the surface at the given
96 nodes. ZP is used by SURF2.
97
98 TEMP (real, input) Scratch space.
99
100 SIGMA (real, input) Tension factor. Values near zero result in a
101 cubic spline; large values (e.g. 50) result in nearly a
102 polygonal line. A typical value is 1.
103
104 IER (integer, output) An error return value. If IER is returned
105 as 0, then no errors were detected.
106
107 = 1 if N is less than 2.
108 = 2 if X or Y values are not strictly increasing.
109
111 To use SURF1, load the NCAR Graphics library ngmath.
112
114 surf2, fitgrid_params.
115
116 Complete documentation for Fitgrid is available at URL
117 http://ngwww.ucar.edu/ngdoc/ng/ngmath/fitgrid/fithome.html
118
120 Copyright (C) 2000
121 University Corporation for Atmospheric Research
122
123 The use of this Software is governed by a License Agreement.
124
125
126
127UNIX March 1998 SURF1(3NCARG)