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

NAME

6       CPSPS2 - Interpolates from an array of data on a "sparse" rectangular
7       grid which is irregularly spaced in X and Y to an array of data on a
8       "dense" rectangular grid and initializes contouring from the array on
9       the dense grid. (By a "sparse" grid is meant one whose dimensions are
10       smaller than one would like, so that contour lines constructed directly
11       on it are composed of long straight segments.) CPSPS2 may be viewed as
12       a data smoothing routine.
13

SYNOPSIS

15        CALL CPSPS2 (XSPS, YSPS, ZSPS, KSPS, MSPS, NSPS, RWRK,
16       + LRWK, IWRK, LIWK, ZDAT, LZDT)
17

C-BINDING SYNOPSIS

19       #include <ncarg/ncargC.h>
20
21       void c_cpsps2 (float *xsps, float *ysps, float *zsps,
22       int ksps, int msps, int nsps, float *rwrk, int lrwk,
23       int *iwrk, int liwk, float *zdat, int lzdt)
24

DESCRIPTION

26       XSPS        (REAL array, dimensioned MSPS) is the array of X
27                   coordinates of the irregular rectangular grid. These must
28                   be in strictly increasing numerical order.
29
30       YSPS        (REAL array, dimensioned NSPS) is the array of Y
31                   coordinates of the irregular rectangular grid. These must
32                   be in strictly increasing numerical order.
33
34       ZSPS        (REAL array, dimensioned KSPS x n, where "n" is greater
35                   than or equal to NSPS, input) is the "sparse" array of
36                   data, from which the "dense" array is to be generated.
37
38       KSPS        (INTEGER, input) is the first dimension of the array ZSPS.
39
40       MSPS        (INTEGER, input) is the first dimension of the "sparse"
41                   array of data in ZSPS. MSPS must be less than or equal to
42                   KSPS.
43
44       NSPS        (INTEGER, input) is the second dimension of the "sparse"
45                   array of data in ZSPS. NSPS must be less than or equal to
46                   the declared second dimension of the array ZSPS.
47
48       RWRK        (REAL array, dimensioned LRWK, input/output) is the real
49                   work array.
50
51       LRWK        (INTEGER, input) is the length of RWRK.
52
53       IWRK        (INTEGER array, dimensioned LIWK, input/output) is the
54                   integer work array.
55
56       LIWK        (INTEGER, input) is the length of IWRK.
57
58       ZDAT        (REAL array, dimensioned LZDT, output) is the array in
59                   which the interpolated "dense" array of data is to be
60                   returned. The dimensions of the interpolated array may be
61                   supplied by the user or determined by Conpack, depending on
62                   the value of the parameter 'ZDS'. Note that, if Conpack
63                   determines the dimensions of the "dense" array, it will
64                   attempt to use an aspect ratio which is close to that
65                   implied by the value of the ratio
66
67                        (XSPS(MSPS)-XSPS(1))/(YSPS(NSPS)-YSPS(1))
68
69       LZDT        (INTEGER, input) is the length of ZDAT.
70

C-BINDING DESCRIPTION

72       The C-binding argument descriptions are the same as the FORTRAN
73       argument descriptions, with the following exceptions:
74
75
76       zsps(l,ksps)
77                   Dimensioned l by ksps, where l ≤ nsps.
78
79       ksps        The second dimension of the array zsps.
80
81       msps        The second dimension of the sparse array of data in zsps.
82                   msps ≤ ksps.
83
84       nsps        The first dimension of the sparse array of data in zsps.
85                   nsps ≤ l, the declared first dimension of the array zsps.
86

USAGE

88       CPSPS2 performs the same functions as CPRECT, but, in addition, it
89       interpolates from a sparse array of data to a dense array of data.
90       CPSPS2 does this by using the routines SURF1 and SURF2, from the
91       package Fitpack, by Alan K. Cline, to fit bicubic splines under tension
92       to the sparse array of data and to compute the dense grid of data that
93       is returned to you.  The tension on the spline surfaces is specified by
94       the parameter 'T3D'.  By default, CPSPS2 selects the dimensions of the
95       dense array of data; if desired, you can specify these dimensions by
96       setting the parameter 'ZDS' non-zero and the parameters 'ZD1', 'ZDM',
97       and 'ZDN' to the desired values. In either case, once 'ZD1', 'ZDM', and
98       'ZDN' are set, they should not be reset by you until the contour plot
99       is complete and a different contour plot is to be drawn.
100
101       Because the routines SURF1 and SURF2 do not have a built-in special
102       value feature, if the special value parameter 'SPV' is set non-zero and
103       the sparse array contains occurrences of that value, special action
104       must be taken.  The indices of the special values in the sparse array
105       are saved in a part of the integer workspace array; the special values
106       are then replaced by values interpolated from adjacent grid points and
107       the resulting array is used to obtain the dense array; then, the
108       special values in the sparse array are restored and the corresponding
109       elements of the dense array are also given the special value.
110

EXAMPLES

112       Use the ncargex command to see the following relevant example: ccpsps2.
113

ACCESS

115       To use CPSPS2 or c_cpsps2, load the NCAR Graphics libraries ncarg,
116       ncarg_gks, and ncarg_c, preferably in that order.
117

MESSAGES

119       See the conpack man page for a description of all Conpack error
120       messages and/or informational messages.
121

SEE ALSO

123       Online: conpack, cpback, cpchcf, cpchcl, cpchhl, cpchil, cpchll,
124       cpcica, cpclam, cpcldm, cpcldr, cpcltr, cpcnrc, cpdrpl, cpezct, cpgetc,
125       cpgeti, cpgetr, cplbam, cplbdr, cpmpxy, cpmviw, cpmvrw, cppkcl, cppklb,
126       cprect, cprset, cpscae, cpsetc, cpseti, cpsetr, cpsps1, ncarg_cbind
127
128       Hardcopy: NCAR Graphics Contouring and Mapping Tutorial
129
131       Copyright (C) 1987-2007
132       University Corporation for Atmospheric Research
133
134       This documentation is free software; you can redistribute it and/or
135       modify it under the terms of the GNU General Public License as
136       published by the Free Software Foundation; either version 2 of the
137       License, or (at your option) any later version.
138
139       This software is distributed in the hope that it will be useful, but
140       WITHOUT ANY WARRANTY; without even the implied warranty of
141       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
142       General Public License for more details.
143
144       You should have received a copy of the GNU General Public License along
145       with this software; if not, write to the Free Software Foundation,
146       Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
147
148
149
150
151UNIX                              March 1993                    CPSPS2(3NCARG)
Impressum