1c_dsgrid2d(3NCARG) NCAR GRAPHICS c_dsgrid2d(3NCARG)
2
3
4
6 c_dsgrid2d - primary double precision C entry for 2D gridding
7
9 double *c_dsgrid2d(int, double [], double [], double [],
10 int, int, double [], double [], int *);
11
12
14 double *c_dsgrid2d(int n, double x[], double y[], double z[],
15 int nx, int ny, double xo[], double yo[], int *ier)
16
18 n The number of input data points.
19
20 x An array containing the X coordinates of the input data
21 points.
22
23 y An array containing the Y coordinates of the input data
24 points.
25
26 z An array of size n containing the functional values of the
27 input data points. That is, z[m] is the value of the input
28 function at coordinate (x[m],y[m]), for 0 <= m < n.
29
30 nx The number of X values in the output grid.
31
32 ny The number of Y values in the output grid.
33
34 xo An array of size nx containing the X coordinates of the
35 output data grid. The values in xo must be increasing, but
36 need not be equally spaced.
37
38 yo An array of size ny containing the Y coordinates of the
39 output data grid. The values in yo must be increasing, but
40 need not be equally spaced.
41
42 ier An error return value. If *ier is returned as 0, then no
43 errors were detected. If *ier is non-zero, then refer to
44 the man page for dsgrid_errors.
45
47 c_dsgrid2d returns a pointer to a linear array of data that is the
48 interpolated grid stored in row-major order. That is, if out is
49 declared as
50
51 double *out;
52
53 and we set:
54
55 out = c_dsgrid2d(n, x, y, z, nx, ny, xo, yo, ier);
56
57 then out[i*ny+j] is the interpolated function value at coordinate point
58 (xo[i],yo[j]) for 0 <= i < nx and 0 <= j < ny. The space for out is
59 allocated internal to c_dsgrid2d and is nx*ny doubles in size.
60
62 To use c_dsgrid2d, load the NCAR Graphics library ngmath.
63
65 dsgrid, dsgrid_params, c_dsseti, c_dsgeti, c_dssetrd, c_dsgetrd,
66 c_dssetc, c_dsgetc.
67
68 Complete documentation for Dsgrid is available at URL
69 http://ngwww.ucar.edu/ngdoc/ng/ngmath/dsgrid/dshome.html
70
72 Copyright (C) 2000
73 University Corporation for Atmospheric Research
74
75 This documentation is free software; you can redistribute it and/or
76 modify it under the terms of the GNU General Public License as pub‐
77 lished by the Free Software Foundation; either version 2 of the
78 License, or (at your option) any later version.
79
80 This software is distributed in the hope that it will be useful, but
81 WITHOUT ANY WARRANTY; without even the implied warranty of MER‐
82 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
83 Public License for more details.
84
85 You should have received a copy of the GNU General Public License along
86 with this software; if not, write to the Free Software Foundation,
87 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
88
89
90
91
92UNIX September 1997-1998 c_dsgrid2d(3NCARG)