ncl_cpcnrc man page

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

Synopsis

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

C-Binding Synopsis

#include <ncarg/ncargC.h>

void c_cpcnrc (float *zdat, int kzdt, int mzdt, int nzdt,
float flow, float fhgh, float finc, int nset, int nhgh,
int ndsh)

Description

ZDAT

(REAL array, dimensioned KZDT x n, where "n" is  greater than or equal to NZDT, input) is the array  containing the data to be contoured.

KZDT

(INTEGER, input) is the first dimension of the FORTRAN  array ZDAT.

MZDT

(INTEGER, input) is the first dimension of the array  of data in ZDAT. MZDT must be less than or equal to KZDT.

NZDT

(INTEGER, input) is the second dimension of the array  of data in ZDAT. NZDT must be less than or equal to the  declared second dimension of the array ZDAT.

FLOW

(REAL, input) is the desired lowest contour level. If  FLOW is equal to or greater than FHGH, Conpack will choose  the set of contour levels.

FHGH

(REAL, input) is the desired highest contour level. If  FHGH is equal to or less than FLOW, Conpack will choose the  set of contour levels.

FINC

(REAL, input) says how contour levels are to be  chosen. There are two possibilities:

  • If FINC is greater than zero, it specifies the desired  contour interval to be used. In this case, if FLOW is less  than FHGH, the intervals used will be FLOW, FLOW+FINC,  FLOW+2*FINC, ... FLOW+n*FINC, where "n" is the largest  integer such that FLOW+n*FINC is less than or equal to  FHGH. If FLOW is greater than or equal to FHGH, the contour  levels will be those integer multiples of FINC which fall  between the minimum value in ZDAT and the maximum value in  ZDAT.
  • If FINC is less than or equal to zero, Conpack will choose  the contour interval in such a way as to give at least 16  contour levels (if FINC is zero) or MAX(1,INT(-FINC))  contour levels (if FINC is less than zero) between the  minimum and maximum values in ZDAT. All the contour levels  will be integer multiples of the chosen interval. If FLOW  is less than FHGH, no contour lines will be drawn for  chosen contour levels which are outside the range  (FLOW,FHGH).
NSET

(INTEGER, input) says how the contour plot is to be  mapped onto the plotter frame. There are three basic  possibilities:

  • If the value of NSET, modulo three, is zero, the "standard  configuration" will be used. Conpack will be directed to  call SET. The portion of the plotter frame bounded by the  lines "X=.05", "X=.95", "Y=.05", and "Y=.95" (in the  "fractional" or "normalized-device-coordinate" system) will  be used. The shape of the plot will be determined by the  values of the internal parameters 'WDL', 'WDR', 'WDB', and  'WDT'; by default, the ratio of the plot's width to its  height will be MZDT/NZDT. If the ratio of the width to the  height is less than 1/4 or greater than 4, the plot will be  made square. CPBACK will be called to draw a perimeter.
  • If the value of NSET, modulo three, is equivalent to minus  one, the contour plot will fill the current viewport.  Conpack will be directed to call SET. The portion of the  plotter frame used will be that bounded by the lines  "X=xl", "X=xr", "Y=yb", and "Y=yt", where "xl", "xr", "yl",  and "yr" are obtained by means of a

    	CALL GETSET (xl,xr,yl,yr,...)

    The plot will fill this entire area. CPBACK will not be  called to draw a perimeter.

  • If the value of NSET, modulo three, is equivalent to plus  one, Conpack will be directed not to call SET. It will be  assumed that the user has done the appropriate call. CPBACK  will not be called to draw a perimeter. Use this option  when overlaying CPCNRC output on an existing background  (one drawn by Ezmap, for example).

If the value of NSET is -1, 0, or 1, CPCNRC will, prior to  returning control to the caller, restore the SET call to  what it was on entry (which is how CONREC works). If the  value of NSET is less than -1 or greater than 1, CPCNRC  will not so restore the SET call; this may be useful if  other objects are to be drawn on the plot produced by  CPCNRC.

NHGH

(INTEGER, input) says whether highs and lows or data  points are to be labeled. There are three possibilities:

  • If NHGH is zero, each high is marked with an "H" and each  low is marked with an "L"; the value is written as a  subscript of the "H" or "L".
  • If NHGH is greater than zero, each data point is marked  with the value at that point. No attempt is made to cull  overlapping values, so using this option when there are too  many data points may result in a mess. The values of the  Conpack parameters 'HLA' and 'HLS' are retrieved and used  to determine the angle at which the values are written and  the size of the characters used. They may be used to reduce  the clutter somewhat.
  • If NHGH is less than zero, neither of the above is done.
NDSH

(INTEGER, input) may be used to specify a 10-bit dash  pattern to be used. (If ABS(NDSH) is 0, 1, or 1023, all  solid lines are used.) If NDSH is greater than zero, the  specified dash pattern is used for all contour lines; if  NDSH is less than zero, the dash pattern is used only for  negative-valued contour lines. Note: the 10-bit pattern is  actually made into a 16-bit pattern by appending a copy of the high-order six bits.

C-Binding Description

The C-binding argument descriptions are the same as the FORTRAN  argument descriptions with the following exceptions:

zdat

Dimensioned n by kzdt, where n is greater than or equal to nzdt.

kzdt

The second dimension of the array zdat.

mzdt

The second dimension of the array of data in zdat.  mzdt must be less than or equal to kzdt.

nzdt

The first dimension of the array of data in zdat. nzdt must be less than or equal to the declared first dimension of the array zdat.

Usage

The appearance of the plot produced by CPCNRC may vary, depending on the setting of internal parameters of Conpack. The following should be noted:

Examples

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

Access

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

See Also

Online: conpack, cpback, cpchcf, cpchcl, cpchhl, cpchil, cpchll, cpcica, cpclam, cpcldm, cpcldr, cpcltr, cpdrpl, cpezct, cpgetc, cpgeti, cpgetr, cplbam, cplbdr, cpmpxy, cpmviw, cpmvrw, cppkcl, cppklb, cprect, cprset, cpscae, cpsetc, cpseti, cpsetr, cpsps1, cpsps2, ncarg_cbind

Hardcopy: NCAR Graphics Contouring and Mapping Tutorial

Info

March 1993 UNIX NCAR GRAPHICS