1CSA2XS(3NCARG) NCAR GRAPHICS CSA2XS(3NCARG)
2
3
4
6 CSA2XS - cubic spline approximation, expanded entry for two-dimensional
7 input, gridded output
8
10 CALL CSA2XS (NI, XI, UI, WTS, KNOTS, SMTH, DERIV, NXO, NYO, XO, YO, UO,
11 NWRK, WORK, IER)
12
14 NI (integer,input) The number of input data points. It must be
15 that NI .gt. 3 and, depending on the size of KNOTS below,
16 NI may have to be larger.
17
18 XI (real, input) An array containing the X - Y coordinates of
19 the input data points. XI is dimensioned for 2 x NI.
20 XI(1,L) is the X coordinate and XI(2,L) is the Y coordinate
21 for the input domain for L=1,NI.
22
23 UI (real, input) An array dimensioned for NI containing func‐
24 tion values at the input XI values, that is UI(L) is the
25 value of the input function at the coordinate
26 (XI(1,L),XI(2,L)) for L=1,NI.
27
28 WTS (real, input) An array dimensioned for NI containing
29 weights for the UI values at the input XI values, that is,
30 WTS(L) is a weight for the value of UI(L) for L=1,NI. If
31 you do not desire to weight the input UI values, then set
32 WTS(1) to -1. The weights in the WTS array are relative
33 and may be set to any non-negative value. When CSA2XS is
34 called, the weights are summed and the individual weights
35 are normalized so that the weight sum is unity.
36
37 KNOTS (integer, input) The number of knots to be used in con‐
38 structing the approximation spline. KNOTS is dimensioned
39 for 2 and provides the number of knots to be used in the X
40 and the Y directions. Both KNOTS(1) and KNOTS(2) must be
41 at least 4. The larger the values for KNOTS, the closer
42 the approximated curve will come to passing through the
43 input function values.
44
45 SMTH (real, input) A parameter that controls extrapolation into
46 data sparse regions. If SMTH is zero, then nothing special
47 is done in data sparse regions. A good first choice for
48 SMTH is 1.
49
50 NDERIV (integer, input) An array dimensioned for 2 that specifies,
51 for each coordinate, whether you want functional values
52 (=0), first derivative values (=1), or second derivative
53 values (=2).
54
55 NXO (integer, input) The number of X coordinate values in the
56 output grid.
57
58 NYO (integer, input) The number of Y coordinate values in the
59 output grid.
60
61 XO (real, input) An array dimensioned for NXO containing the X
62 coordinates of the output surface.
63
64 YO (real, input) An array dimensioned for NYO containing the Y
65 coordinates of the output surface.
66
67 UO (real, output) An array dimensioned for NXO x NYO contain‐
68 ing the calculated function values for the output surface.
69 UO(I,J) is the calculated functional value at (XO(I),YO(J))
70 for I=1,NXO and J=1,NYO.
71
72 NWRK (integer, input) The size of the WORK array. NWRK must be
73 at least KNOTS(1)*KNOTS(2)*(KNOTS(1)*KNOTS(2)+3).
74
75 WORK (real, input) A work array dimensioned for NWRK.
76
77 IER (integer, output) An error return value. If IER is
78 returned as 0, then no errors were detected. If IER is non-
79 zero, then refer to the man page for csagrid_errors for
80 details.
81
83 CSA2XS is called to find an approximating cubic spline for two-dimen‐
84 sional input data. CSA2XS is called if you want to weight the input
85 data values, calculate derivatives, or handle data sparse areas spe‐
86 cially. If you do not want to do any of these three things, then use
87 CSA2S.
88
90 To use CSA2XS, load the NCAR Graphics library ngmath.
91
93 csagrid, csa2s, csa2ls, csa2lxs
94
95 Complete documentation for Csagrid is available at URL
96 http://ngwww.ucar.edu/ngdoc/ng/ngmath/csagrid/csahome.html
97
99 Copyright (C) 2000
100 University Corporation for Atmospheric Research
101
102 The use of this Software is governed by a License Agreement.
103
104
105
106UNIX January 1999 CSA2XS(3NCARG)