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

NAME

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

FUNCTION PROTOTYPE

10       loat *c_csa3xs(int, float [], float [], float [], float [], float [],
11                       int [], float, int [], int, int, int, float [],
12                       float [], float [], int *);
13
14

SYNOPSIS

16       float *c_csa3xs (int n, float xi[], float yi[], float zi[],
17                       float ui[], float wts[], int knots[3], float smth,
18                       int nderiv[3], int nxo, int nyo,
19                       int nzo, float xo[], float yo[], float zo[],
20                       int *ier);
21
22

DESCRIPTION

24       n           (integer,input) The number of input data points. It must be
25                   that  n  is  greater  than  3 and, depending on the size of
26                   knots below, n may have to be larger.
27
28       xi          (real, input) An array dimensioned for n containing  the  X
29                   coordinate values for the input function.
30
31       yi          (real,  input)  An array dimensioned for n containing the Y
32                   coordinate values for the input function.
33
34       zi          (real, input) An array dimensioned for n containing  the  Z
35                   coordinate values for the input function.
36
37       ui          (real,  input) An array containing the functional values of
38                   the input function -- ui[k]  is  the  functional  value  at
39                   (xi[k], yi[k], zi[k]) for k=0,n-1.
40
41       wts         (real, input) An array containing weights for the ui values
42                   at the input values, that is, wts[l] is a  weight  for  the
43                   value  of ui[l] for l=0,n-1. If you do not desire to weight
44                   the input ui values, then set wts[0] to -1. The weights  in
45                   the  wts array are relative and may be set to any non-nega‐
46                   tive value. When c_csa3xs is called, the weights are summed
47                   and  the  individual  weights  are  normalized  so that the
48                   weight sum is unity.
49
50       knots       (integer, input) The number of knots to  be  used  in  con‐
51                   structing  the approximation spline. knots[0], knots[1] and
52                   knots[2] must each be at least 4. The larger the value  for
53                   knots, the closer the approximated curve will come to pass‐
54                   ing through the input function values.
55
56       smth        (real, input) A parameter that controls extrapolation  into
57                   data  sparse regions. If smth is zero, then nothing special
58                   is done in data sparse regions. A  good  first  choice  for
59                   smth is 1.
60
61       nderiv      (integer,  input) For each of the two coordinate direction,
62                   specifies whether you want  functional  values  (nderiv=0),
63                   first  derivative  values  (nderiv=1), or second derivative
64                   values  (nderiv=2).  For  example,   if   nderiv[0]=1   and
65                   nderiv[1]=1,  then  the second order mixed partial would be
66                   computed.
67
68       nxo         (integer, input) The number of X coordinate  values  to  be
69                   calculated for the output spline.
70
71       nyo         (integer,  input)  The  number of Y coordinate values to be
72                   calculated for the output spline.
73
74       nzo         (integer, input) The number of Z coordinate  values  to  be
75                   calculated for the output spline.
76
77       xo          (real, input) An array dimensioned for nxo containing the X
78                   coordinates of the output spline.
79
80       yo          (real, output) An array dimensioned for nyo containing  the
81                   Y coordinates of the output spline.
82
83       zo          (real,  output) An array dimensioned for nzo containing the
84                   Z coordinates of the output spline.
85
86       ier         (pointer to integer, output) An  error  return  value.   If
87                   *ier  is  returned  as  0, then no errors were detected. If
88                   *ier is non-zero, then refer to the error list in the error
89                   table for details.
90

USAGE

92       c_csa3xs  is  called  to  find an approximating cubic spline for three-
93       dimensional input data. c_csa3xs is called if you want  to  weight  the
94       input  data  values, calculate derivatives, or handle data sparse areas
95       specially. If you do not want to do any of these three things, then use
96       c_csa3s.
97
98       c_csa3xs  returns  a  pointer  to  a  linear  array of data that is the
99       approximation spline stored in row-major order.  That  is,  if  out  is
100       declared as
101         float *out;
102
103       and we set:
104
105       out = c_csa3xs(ni, xi, yi, zi, ui, wts, knots, smth, nderiv,
106                      nx, ny, nz, xo, yo, zo, &ier)
107       then  out[nz*ny*i  +  nz*j  + k] is the approximation function value at
108       coordinate point (xo[i], yo[j], zo[k]) for 0 <= i < nx, 0 <=  j  <  ny,
109       and  0  <=  k < nz. The space for out is allocated internal to c_csa3xs
110       and is nx*ny*nz floats in size.
111
112

ACCESS

114       To use c_csa3xs, load the NCAR Graphics library ngmath.
115

SEE ALSO

117       csagrid, c_csa3s, c_csa3ls, c_csa3lxs
118
119       Complete documentation for Csagrid is available at URL
120       http://ngwww.ucar.edu/ngdoc/ng/ngmath/csagrid/csahome.html
121
123       Copyright (C) 2000
124       University Corporation for Atmospheric Research
125
126       The use of this Software is governed by a License Agreement.
127
128
129
130UNIX                             January 1999                 c_csa3xs(3NCARG)
Impressum