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, dimensionedKZDTx n, where "n" is greater than or equal toNZDT, input) this is THE array of data to be contoured. the main character, honestly. πKZDTβ (INTEGER, input) the first dimension of the arrayZDAT.MZDTβ (INTEGER, input) the first dimension of the array of data inZDAT.MZDTmust be less than or equal toKZDT. like, that's the rule, don't fight it. π«NZDTβ (INTEGER, input) the second dimension of the array of data inZDAT.NZDTmust be less than or equal to the declared second dimension of the arrayZDAT.RWRKβ (REAL array, dimensionedLRWK, input/output) the real work array. she works hard, respect her. πͺLRWKβ (INTEGER, input) the length ofRWRK.IWRKβ (INTEGER array, dimensionedLIWK, input/output) the integer work array.LIWKβ (INTEGER, input) the length ofIWRK.
π C-BINDING DESCRIPTION π
so the C-binding argument descriptions are the same as the FORTRAN ones, with these glow-up exceptions:
zdat(l,kzdt)βzdatis dimensioned l bykzdt, where l β₯nzdt. β¨kzdtβ the second dimension of the arrayzdat.mzdtβ the second dimension of the array of data inzdat.mzdtβ€kzdt.nzdtβ the first dimension of the array of data inzdat.nzdtβ€ l, where l is the declared first dimension of the arrayzdat.
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 andSETis called; otherwise,GETSETis called to retrieve the arguments from the user's call toSET. - 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 π
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 πβ¨
π¦ where this page comes from
- debian bookworm: libncarg-dev 6.6.2.dfsg.1-1
- debian trixie: libncarg-dev 6.6.2.dfsg.1-10+b2
- ubuntu jammy: libncarg-dev 6.6.2-10build2
- ubuntu questing: libncarg-dev 6.6.2.dfsg.1-10build2
- ubuntu resolute: libncarg-dev 6.6.2.dfsg.1-12
- ubuntu stonking: libncarg-dev 6.6.2.dfsg.1-12build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms