1c_csa3s(3NCARG)                  NCAR GRAPHICS                 c_csa3s(3NCARG)
2
3
4

NAME

6       c_csa3s  -  cubic  spline  approximation, simple entry for three-dimen‐
7       sional input, gridded output
8

FUNCTION PROTOTYPE

10       float *c_csa3s(int, float [], float [], float [], float [], int [], int, int,
11                      int, float [], float [], float [], int *);
12
13

SYNOPSIS

15       float *c_csa3s (int n, float xi[], float yi[], float zi[],
16                       float ui[], int knots[3], int nxo, int nyo,
17                       int nzo, float xo[], float yo[], float zo[],
18                       int *ier);
19
20

DESCRIPTION

22       n           (integer,input) The number of input data points. It must be
23                   that  n  is  greater  than  3 and, depending on the size of
24                   knots below, n may have to be larger.
25
26       xi          (real, input) An array dimensioned for n containing  the  X
27                   coordinate values for the input function.
28
29       yi          (real,  input)  An array dimensioned for n containing the Y
30                   coordinate values for the input function.
31
32       zi          (real, input) An array dimensioned for n containing  the  Z
33                   coordinate values for the input function.
34
35       ui          (real,  input) An array containing the functional values of
36                   the input function -- ui[k]  is  the  functional  value  at
37                   (xi[k], yi[k], zi[k]) for k=0,n-1.
38
39       knots       (integer,  input)  The  number  of knots to be used in con‐
40                   structing the approximation spline. knots[0], knots[1]  and
41                   knots[2]  must each be at least 4. The larger the value for
42                   knots, the closer the approximated curve will come to pass‐
43                   ing through the input function values.
44
45       nxo         (integer,  input)  The  number of X coordinate values to be
46                   calculated for the output surface.
47
48       nyo         (integer, input) The number of Y coordinate  values  to  be
49                   calculated for the output surface.
50
51       nzo         The  number of Z coordinate values to be calculated for the
52                   output grid.
53
54       xo          (real, input) An array dimensioned for nxo containing the X
55                   coordinates of the output grid.
56
57       yo          (real,  output) An array dimensioned for nyo containing the
58                   Y coordinates of the output grid.
59
60       zo          (real, output) An array dimensioned for nzo containing  the
61                   Z coordinates of the output grid.
62
63       ier         (pointer  to  integer,  output)  An error return value.  If
64                   *ier is returned as 0, then no  errors  were  detected.  If
65                   *ier is non-zero, then refer to the error list in the error
66                   table for details.
67

USAGE

69       c_csa3s is called to find an  approximating  cubic  spline  for  three-
70       dimensional  input  data.  If you want to weight the input data values,
71       calculate derivatives, or handle data sparse areas specially, then  you
72       will need to use c_csa3xs.
73
74       c_csa3s returns a pointer to a linear array of data that is the approx‐
75       imation spline stored in row-major order. That is, if out  is  declared
76       as
77
78         float *out;
79
80       and we set:
81
82         out = c_csa3s(n, x, y, z, u, nx, ny, nz, xo, yo, zo, &ier);
83
84       then  out[nz*ny*i  +  nz*j  + k] is the approximation function value at
85       coordinate point (xo[i], yo[j], zo[k]) for 0 <= i < nx, 0 <=  j  <  ny,
86       and 0 <= k < nz. The space for out is allocated internal to c_csa3s and
87       is nx*ny*nz floats in size.
88

ACCESS

90       To use c_csa3s, load the NCAR Graphics library ngmath.
91

SEE ALSO

93       csagrid, c_csa3xs, c_csa3ls, c_csa3lxs
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       This documentation is free software; you  can  redistribute  it  and/or
103       modify  it  under  the  terms of the GNU General Public License as pub‐
104       lished by the  Free  Software  Foundation;  either  version  2  of  the
105       License, or (at your option) any later version.
106
107       This  software  is  distributed in the hope that it will be useful, but
108       WITHOUT ANY  WARRANTY;  without  even  the  implied  warranty  of  MER‐
109       CHANTABILITY  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
110       Public License for more details.
111
112       You should have received a copy of the GNU General Public License along
113       with  this  software;  if  not,  write to the Free Software Foundation,
114       Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
115
116
117
118
119UNIX                             January 1999                  c_csa3s(3NCARG)
Impressum