# ncl_cprect - Man Page

Initializes the contouring of a rectangular array of data.

## Synopsis

`CALL CPRECT (ZDAT, KZDT, MZDT, NZDT, RWRK, LRWK, IWRK, LIWK) `

## C-Binding Synopsis

#include <ncarg/ncargC.h>

void c_cprect (float *zdat, int kzdt, int mzdt, int nzdt,

float *rwrk, int lrwk, int *iwrk, int liwk)

## Description

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

- KZDT
(INTEGER, input) is the first dimension of the 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.

- RWRK
(REAL array, dimensioned LRWK, input/output) is the real work array.

- LRWK
(INTEGER, input) is the length of RWRK.

- IWRK
(INTEGER array, dimensioned LIWK, input/output) is the integer work array.

- LIWK
(INTEGER, input) is the length of IWRK.

## C-Binding Description

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

- zdat(l,kzdt)
zdat is dimensioned l by kzdt, where l ≥ nzdt.

- kzdt
The second dimension of the array zdat.

- mzdt
The second dimension of the array of data in zdat. mzdt ≤ kzdt.

- nzdt
The first dimension of the array of data in zdat. nzdt ≤ l, where l is the declared first dimension of the array zdat.

## Usage

The routine CPRECT is called to initialize the process of drawing a contour plot from a rectangular array of data. The arguments define the data array, a real workspace array, and an integer workspace array. The dimensions of all the arrays are transferred to variables in COMMON, so that, in calls to other Conpack routines, those dimensions may be omitted.

CPRECT initializes the internal pointers that manage workspace use; also, it decides the appropriate ranges of X and Y coordinates for drawing contour lines and positioning labels.

If Conpack is to call SET, appropriate arguments are determined and SET is called; otherwise, GETSET is called to retrieve the arguments from the user's call to SET.

The list of label positions (if any) left over from previous calls to the package is discarded.

If contour levels are to be chosen by Conpack, 'NCL' is zeroed so that the levels will be chosen when they are needed.

The minimum and maximum values in the data array are located and it is decided whether the data are essentially constant.

Numeric-label parameters that depend on the range of values in the data array are initialized.

A scale factor may be chosen.

## Examples

Use the ncargex command to see the following relevant examples: caredg, ccpback, ccpcff, ccpcfx, ccpcica, ccpci, ccpcis, ccpcit, ccpclc, ccpcld, ccpcldm, ccpcldr, ccpcll, ccpclu, ccpdflt, ccpfil, ccpga, ccphand, ccphcf, ccphl, ccphlt, ccpila, ccpils, ccpilt, ccpklb, ccplbam, ccplbdr, ccpllb, ccpllc, ccplll, ccpllo, ccpllp, ccpllt, ccpmap, ccpmovi, ccpmpxy, ccpncls, ccpnet, ccpnof, ccpnsd, ccppc, ccppc1, ccppc2, ccppc3, ccppc4, ccppkcl, ccppole, ccprc, ccprect, ccprwc, ccprwu, ccpscam, ccpset, ccpspv, ccpt2d, ccptitle, ccpvp, ccpvs, cidsfft, colcon, cpex01, cpex02, cpex03, cpex04, cpex05, cpex06, cpex07, cpex08, cbex01, vvex01, tconpa, fcover, ffex03, ffex05, fsfsgfa.

## Access

To use CPRECT or c_cprect, 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, cpcnrc, cpdrpl, cpezct, cpgetc, cpgeti, cpgetr, cplbam, cplbdr, cpmpxy, cpmviw, cpmvrw, cppkcl, cppklb, cprset, cpscae, cpsetc, cpseti, cpsetr, cpsps1, cpsps2, ncarg_cbind

Hardcopy: NCAR Graphics Contouring and Mapping Tutorial

## Copyright

Copyright (C) 1987-2009

University Corporation for Atmospheric Research

The use of this Software is governed by a License Agreement.