CPRECT(3NCARG)

πŸ’– CPRECT β€” it's giving "start the contour plot" energy ✨

okay bestie, welcome to CPRECT from the NCAR Graphics manual (section 3NCARG, iykyk). this is the glow-up moment where your rectangular data array gets initialized for contouring. no cap. πŸŽ€


🌸 NAME 🌸

CPRECT β€” initializes the contouring of a rectangular array of data. that's it, that's the whole vibe. πŸ’…


✨ 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 πŸ’œ

okay so here's the cast of characters, and every single one of them matters, no skips:

  • ZDAT β€” (REAL array, dimensioned KZDT x n, where "n" is greater than or equal to NZDT, input) this is THE array of data to be contoured. the main character, honestly. πŸ‘‘
  • KZDT β€” (INTEGER, input) the first dimension of the array ZDAT.
  • MZDT β€” (INTEGER, input) the first dimension of the array of data in ZDAT. MZDT must be less than or equal to KZDT. like, that's the rule, don't fight it. 🚫
  • NZDT β€” (INTEGER, input) 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) the real work array. she works hard, respect her. πŸ’ͺ
  • LRWK β€” (INTEGER, input) the length of RWRK.
  • IWRK β€” (INTEGER array, dimensioned LIWK, input/output) the integer work array.
  • LIWK β€” (INTEGER, input) the length of IWRK.

🌈 C-BINDING DESCRIPTION 🌈

so the C-binding argument descriptions are the same as the FORTRAN ones, with these glow-up 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.
yes the dimensions flip-flop between FORTRAN and C. it's giving chaos but it's correct chaos. 🫢

πŸ‘‘ USAGE πŸ‘‘

okay so, the tea: CPRECT is the routine you call to initialize the whole 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. all those array dimensions get transferred into variables in COMMON, so that in calls to other Conpack routines, those dimensions may be omitted. convenient? iconic? both. πŸŽ€

here's everything CPRECT does when you call her, fr fr:

  • she initializes the internal pointers that manage workspace use. also, she decides the appropriate ranges of X and Y coordinates for drawing contour lines and positioning labels. multitasking queen. πŸ’…
  • 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? discarded. bye bestie πŸ‘‹
  • 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. (constant data = the flattest vibe check ever 😭)
  • numeric-label parameters that depend on the range of values in the data array get initialized.
  • a scale factor may be chosen. ⭐

πŸ”₯ EXAMPLES πŸ”₯

use the ncargex command to see the following relevant examples, and yes, we're listing every single one, because none of them get left out on my watch:

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. order matters bestie, don't be messy. πŸ’…


πŸ“ 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 (C) 1987-2009
University Corporation for Atmospheric Research

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

and that's the whole page bestie!! 🫢 this came to you from the UNIX manual, March 1993 vintage (yes, she's a 90s baby and she ATE), filed under CPRECT(3NCARG). slay, go contour something gorgeous πŸ’–βœ¨