1c_cssgrid(3NCARG) NCAR GRAPHICS c_cssgrid(3NCARG)
2
3
4
6 c_cssgrid - tension spline interpolation on a sphere
7
9 float *c_cssgrid(int, float [], float [], float [],
10 int, int, float [], float [], int *);
11
12
14 float *c_cssgrid (n, rlat, rlon, f, ni, nj, plat, plon, ier)
15
16
18 n The number of input data points, n > 2.
19
20 rlat An array containing the latitudes of the input data,
21 expressed in degrees. The first three points must not be
22 collinear (lie on a common great circle).
23
24 rlon An array containing the longitudes of the input data,
25 expressed in degrees.
26
27 f Array containing data values. f[i] is the functional value
28 at (rlat[i],rlon[i]) for i = 0 to n-1.
29
30 ni The number of latitudes in the interpolated grid.
31
32 nj The number of longitudes in the interpolated grid. ni and
33 nj can both be 1, allowing for interpolation at a single
34 point.
35
36 plat An array containing the latitudes of the points where
37 interpolated values are to be computed. The values in plat
38 should be in degrees.
39
40 plon An array of length nj containing the longitudes the output
41 grid lines. The values in plon should be in degrees.
42
43 ier An error return value. If *ier is returned as 0, then no
44 errors were detected. If *ier is non-zero, then refer to
45 the error list in cssgrid_errors for details.
46
48 c_cssgrid is called to find an interpolating tension spline for ran‐
49 domly positioned data on a unit sphere.
50
52 c_cssgrid returns a pointer to a linear array of data that contains
53 interpolated values at user-specified lat/lon pairs. The returned array
54 stores its values as if they were a 2-dimensional C array with latitude
55 being the first dimension and longitude the second dimension. That is,
56 if out is declared as
57
58 float *out;
59
60 and we set:
61
62 out = c_cssgrid(n, rlat, rlon, f, nlat, nlon, plat, plon, &ier);
63
64 then out[i*nlon+j] is the interpolated function value at coordinate
65 point (plat[i], plon[j]) for 0 <= i < nlat and 0 <= j < nlon. The space
66 for out is allocated internal to c_cssgrid and is nlat * nlon floats in
67 size.
68
70 To use c_cssgrid, load the NCAR Graphics library ngmath.
71
73 css_overview, cssgrid_errors
74
75 Complete documentation for Cssgrid is available at URL
76 http://ngwww.ucar.edu/ngdoc/ng/ngmath/cssgrid/csshome.html
77
79 Copyright (C) 2000
80 University Corporation for Atmospheric Research
81
82 This documentation is free software; you can redistribute it and/or
83 modify it under the terms of the GNU General Public License as pub‐
84 lished by the Free Software Foundation; either version 2 of the
85 License, or (at your option) any later version.
86
87 This software is distributed in the hope that it will be useful, but
88 WITHOUT ANY WARRANTY; without even the implied warranty of MER‐
89 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
90 Public License for more details.
91
92 You should have received a copy of the GNU General Public License along
93 with this software; if not, write to the Free Software Foundation,
94 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
95
96
97
98
99UNIX May 2000 c_cssgrid(3NCARG)