ncl_c_cssgridd (3) - Linux Manuals
ncl_c_cssgridd: tension spline interpolation on a sphere
NAME
c_cssgridd - tension spline interpolation on a sphereFUNCTION PROTOTYPE
double *c_cssgridd(int, double [], double [], double [],
int, int, double [], double [], int *);
SYNOPSIS
double *c_cssgridd (n, rlat, rlon, f, ni, nj, plat, plon, ier)
DESCRIPTION
- n
- The number of input data points, n > 2.
- rlat
- An array containing the latitudes of the input data, expressed in degrees. The first three points must not be collinear (lie on a common great circle).
- rlon
- An array containing the longitudes of the input data, expressed in degrees.
- f
- Array containing data values. f[i] is the functional value at (rlat[i],rlon[i]) for i = 0 to n-1.
- ni
- The number of latitudes in the interpolated grid.
- nj
- The number of longitudes in the interpolated grid. ni and nj can both be 1, allowing for interpolation at a single point.
- plat
- An array containing the latitudes of the points where interpolated values are to be computed. The values in plat should be in degrees.
- plon
- An array of length nj containing the longitudes the output grid lines. The values in plon should be in degrees.
- ier
- An error return value. If *ier is returned as 0, then no errors were detected. If *ier is non-zero, then refer to the error list in cssgrid_errors for details.
USAGE
c_cssgridd is called to find an interpolating tension spline for randomly positioned data on a unit sphere. c_cssgridd is a double precision version of c_cssgrid.RETURN VALUE
c_cssgridd returns a pointer to a linear array of data that contains interpolated values at user-specified lat/lon pairs. The returned array stores its values as if they were a 2-dimensional C array with latitude being the first dimension and longitude the second dimension. That is, if out is declared as
double *out;
and we set:
out = c_cssgridd(n, rlat, rlon, f, nlat, nlon, plat, plon, &ier);
then out[i*nlon+j] is the interpolated function value at coordinate point (plat[i], plon[j]) for 0 <= i < nlat and 0 <= j < nlon. The space for out is allocated internal to c_cssgridd and is nlat * nlon doubles in size.
ACCESS
To use c_cssgridd, load the NCAR Graphics library ngmath.COPYRIGHT
Copyright (C) 2000University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
SEE ALSO
c_cssgrid, css_overview, cssgrid_errors
Complete documentation for Cssgrid is available at URL
http://ngwww.ucar.edu/ngdoc/ng/ngmath/cssgrid/csshome.html