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

NAME

6       CPCNRC - Draws black and white contours with a single call.  the
7       behavior of the old routine CONREC; it has the same arguments and
8       produces similar output.
9

SYNOPSIS

11        CALL CPCNRC (ZDAT, KZDT, MZDT, NZDT, FLOW, FHGH, FINC,
12       + NSET, NHGH, NDSH)
13

C-BINDING SYNOPSIS

15       #include <ncarg/ncargC.h>
16
17       void c_cpcnrc (float *zdat, int kzdt, int mzdt, int nzdt,
18       float flow, float fhgh, float finc, int nset, int nhgh,
19       int ndsh)
20

DESCRIPTION

22       ZDAT        (REAL array, dimensioned KZDT x n, where "n" is greater
23                   than or equal to NZDT, input) is the array containing the
24                   data to be contoured.
25
26       KZDT        (INTEGER, input) is the first dimension of the FORTRAN
27                   array ZDAT.
28
29       MZDT        (INTEGER, input) is the first dimension of the array of
30                   data in ZDAT. MZDT must be less than or equal to KZDT.
31
32       NZDT        (INTEGER, input) is the second dimension of the array of
33                   data in ZDAT. NZDT must be less than or equal to the
34                   declared second dimension of the array ZDAT.
35
36       FLOW        (REAL, input) is the desired lowest contour level. If FLOW
37                   is equal to or greater than FHGH, Conpack will choose the
38                   set of contour levels.
39
40       FHGH        (REAL, input) is the desired highest contour level. If FHGH
41                   is equal to or less than FLOW, Conpack will choose the set
42                   of contour levels.
43
44       FINC        (REAL, input) says how contour levels are to be chosen.
45                   There are two possibilities:
46
47                   ·   If FINC is greater than zero, it specifies the desired
48                       contour interval to be used. In this case, if FLOW is
49                       less than FHGH, the intervals used will be FLOW,
50                       FLOW+FINC, FLOW+2*FINC, ... FLOW+n*FINC, where "n" is
51                       the largest integer such that FLOW+n*FINC is less than
52                       or equal to FHGH. If FLOW is greater than or equal to
53                       FHGH, the contour levels will be those integer
54                       multiples of FINC which fall between the minimum value
55                       in ZDAT and the maximum value in ZDAT.
56
57                   ·   If FINC is less than or equal to zero, Conpack will
58                       choose the contour interval in such a way as to give at
59                       least 16 contour levels (if FINC is zero) or
60                       MAX(1,INT(-FINC)) contour levels (if FINC is less than
61                       zero) between the minimum and maximum values in ZDAT.
62                       All the contour levels will be integer multiples of the
63                       chosen interval. If FLOW is less than FHGH, no contour
64                       lines will be drawn for chosen contour levels which are
65                       outside the range (FLOW,FHGH).
66
67       NSET        (INTEGER, input) says how the contour plot is to be mapped
68                   onto the plotter frame. There are three basic
69                   possibilities:
70
71                   ·   If the value of NSET, modulo three, is zero, the
72                       "standard configuration" will be used. Conpack will be
73                       directed to call SET. The portion of the plotter frame
74                       bounded by the lines "X=.05", "X=.95", "Y=.05", and
75                       "Y=.95" (in the "fractional" or "normalized-device-
76                       coordinate" system) will be used. The shape of the plot
77                       will be determined by the values of the internal
78                       parameters 'WDL', 'WDR', 'WDB', and 'WDT'; by default,
79                       the ratio of the plot's width to its height will be
80                       MZDT/NZDT. If the ratio of the width to the height is
81                       less than 1/4 or greater than 4, the plot will be made
82                       square. CPBACK will be called to draw a perimeter.
83
84                   ·   If the value of NSET, modulo three, is equivalent to
85                       minus one, the contour plot will fill the current
86                       viewport.  Conpack will be directed to call SET. The
87                       portion of the plotter frame used will be that bounded
88                       by the lines "X=xl", "X=xr", "Y=yb", and "Y=yt", where
89                       "xl", "xr", "yl", and "yr" are obtained by means of a
90
91                            CALL GETSET (xl,xr,yl,yr,...)
92
93                       The plot will fill this entire area. CPBACK will not be
94                       called to draw a perimeter.
95
96                   ·   If the value of NSET, modulo three, is equivalent to
97                       plus one, Conpack will be directed not to call SET. It
98                       will be assumed that the user has done the appropriate
99                       call. CPBACK will not be called to draw a perimeter.
100                       Use this option when overlaying CPCNRC output on an
101                       existing background (one drawn by Ezmap, for example).
102
103                   If the value of NSET is -1, 0, or 1, CPCNRC will, prior to
104                   returning control to the caller, restore the SET call to
105                   what it was on entry (which is how CONREC works). If the
106                   value of NSET is less than -1 or greater than 1, CPCNRC
107                   will not so restore the SET call; this may be useful if
108                   other objects are to be drawn on the plot produced by
109                   CPCNRC.
110
111       NHGH        (INTEGER, input) says whether highs and lows or data points
112                   are to be labeled. There are three possibilities:
113
114                   ·   If NHGH is zero, each high is marked with an "H" and
115                       each low is marked with an "L"; the value is written as
116                       a subscript of the "H" or "L".
117
118                   ·   If NHGH is greater than zero, each data point is marked
119                       with the value at that point. No attempt is made to
120                       cull overlapping values, so using this option when
121                       there are too many data points may result in a mess.
122                       The values of the Conpack parameters 'HLA' and 'HLS'
123                       are retrieved and used to determine the angle at which
124                       the values are written and the size of the characters
125                       used. They may be used to reduce the clutter somewhat.
126
127                   ·   If NHGH is less than zero, neither of the above is
128                       done.
129
130       NDSH        (INTEGER, input) may be used to specify a 10-bit dash
131                   pattern to be used. (If ABS(NDSH) is 0, 1, or 1023, all
132                   solid lines are used.) If NDSH is greater than zero, the
133                   specified dash pattern is used for all contour lines; if
134                   NDSH is less than zero, the dash pattern is used only for
135                   negative-valued contour lines. Note: the 10-bit pattern is
136                   actually made into a 16-bit pattern by appending a copy of
137                   the high-order six bits.
138

C-BINDING DESCRIPTION

140       The C-binding argument descriptions are the same as the FORTRAN
141       argument descriptions with the following exceptions:
142
143
144       zdat        Dimensioned n by kzdt, where n is greater than or equal to
145                   nzdt.
146
147       kzdt        The second dimension of the array zdat.
148
149       mzdt        The second dimension of the array of data in zdat.  mzdt
150                   must be less than or equal to kzdt.
151
152       nzdt        The first dimension of the array of data in zdat. nzdt must
153                   be less than or equal to the declared first dimension of
154                   the array zdat.
155

USAGE

157       The appearance of the plot produced by CPCNRC may vary, depending on
158       the setting of internal parameters of Conpack.  The following should be
159       noted:
160
161       ·   By default, contour lines will be labeled using the old CONREC
162           scheme of appending the label for a line to the dash pattern for
163           the line. To use one of the new schemes, place a
164
165           CALL CPSETI ('LLP - LINE LABEL POSITIONING',n)
166
167           where n has the value 2 or 3, before the call to CPCNRC.  CPCNRC
168           retrieves the value of 'LLP' and, if the value is a 2 or a 3,
169           modifies the calls that it performs so as to properly shield labels
170           from having contour lines drawn through them.
171
172       ·   By default, high-quality characters will be used in the
173           informational label, in high/low labels, in point-value labels, and
174           in contour-line labels written when 'LLP' is 2 or 3. To use lower-
175           quality characters, place a
176
177           CALL PCSETI ('QUALITY',1)
178
179           or a
180
181           CALL PCSETI ('QUALITY',2)
182
183           prior to the call to CPCNRC.
184
185           Note that these calls are to subroutines that start with the
186           letters PC, because the routine you are calling is in the utility
187           Plotchar. (Conpack uses Plotchar to plot characters.)
188
189       ·   If the output from CPCNRC is to be overlaid on an Ezmap background
190           and longitude is a linear function of the first subscript of the
191           data array and latitude is a linear function of the second
192           subscript of the data array, you can
193
194                 Call Ezmap to draw the background.
195
196                 Set the parameter 'MAP' to 1.
197
198                 Set the parameters 'XC1', 'XCM', 'YC1', and 'YCN' to specify
199                 the longitude and latitude ranges.  Note: 'XCM' must be
200                 numerically larger than 'XC1'.  If, for example, your data
201                 run from 175 degrees east of Greenwich at the left edge to
202                 160 degrees west of Greenwich at the right edge (which is
203                 -160 degrees east), then you should set 'XC1' = 175 and 'XCM'
204                 = 200 to achieve the proper mapping.
205
206                 Call CPCNRC to draw the contour plot.
207
208       ·   To smooth the contour lines in the same way that they would have
209           been smoothed by the "smooth" or "super" versions of CONREC, insert
210
211           CALL CPSETR ('T2D - TENSION ON THE 2D SPLINES',t),
212
213           where t is the desired tension, to turn on the smoother.
214
215       ·   By default, no scale factor is used. (Because Conpack can write
216           contour line labels in scientific notation, it was considered less
217           important to use a scale factor.) If you want to use a scale
218           factor, the value of the internal parameter 'SFS' should be set
219           prior to calling CPCNRC.
220
221       ·   CPCNRC contains a real workspace array, an integer workspace array,
222           and an area map, which is used to prevent contour lines from
223           passing through labels when 'LLP' has the value 2 or 3. The lengths
224           of these arrays are 5000, 2000, and 12000, respectively. If this
225           proves insufficient, you must obtain a copy of the code for CPCNRC,
226           adjust the dimensions as required, and compile it in place of the
227           default version.
228
229       ·   Certain internal parameters are used by CPCNRC; user calls to reset
230           them prior to the call to CPCNRC will therefore have no effect.
231           These parameters are as follows:
232
233           'AIA' 'AIB' 'CIS' 'CIU' 'CLC' 'CLD' 'CLL' 'CLS' 'CLV' 'CLU' 'CMN'
234           'CMX' 'HLT' 'HIT' 'LOT' 'LLC' 'LLT' 'NCL' 'SET' 'VPB' 'VPL' 'VPR'
235           'VPS' 'VPT'
236
237       ·   Subroutines with names of the form CPCHxx (the change subroutines)
238           will be of more value when used in conjunction with CPCNRC than
239           when used in conjunction with the more basic Conpack subroutines.
240           For example, the only way to change the color of the zero contour
241           line drawn by a call to CPCNRC is to supply your own version of the
242           routine CPCHCL; there is no way, short of modifying the code of
243           CPCNRC, to use the internal parameter that controls the color of
244           the zero contour line.
245
246       ·   Like CONREC, CPCNRC does no call to FRAME. To advance the frame,
247           put a CALL FRAME after the call to CPCNRC.
248

EXAMPLES

250       Use the ncargex command to see the following relevant examples:
251       ccpcnrc, cpex09, tconpa.
252

ACCESS

254       To use CPCNRC or c_cpcnrc, load the NCAR Graphics libraries ncarg,
255       ncarg_gks, and ncarg_c, preferably in that order.
256

SEE ALSO

258       Online: conpack, cpback, cpchcf, cpchcl, cpchhl, cpchil, cpchll,
259       cpcica, cpclam, cpcldm, cpcldr, cpcltr, cpdrpl, cpezct, cpgetc, cpgeti,
260       cpgetr, cplbam, cplbdr, cpmpxy, cpmviw, cpmvrw, cppkcl, cppklb, cprect,
261       cprset, cpscae, cpsetc, cpseti, cpsetr, cpsps1, cpsps2, ncarg_cbind
262
263       Hardcopy: NCAR Graphics Contouring and Mapping Tutorial
264
266       Copyright (C) 1987-2009
267       University Corporation for Atmospheric Research
268
269       The use of this Software is governed by a License Agreement.
270
271
272
273UNIX                              March 1993                    CPCNRC(3NCARG)
Impressum