CPCLAM(3NCARG)

πŸ’– CPCLAM πŸ’– β€” okay bestie, this is the NCAR Graphics page, manual 3NCARG πŸŽ€

no cap, this one's a whole vibe: CPCLAM adds contour lines to an area map, and it's literally one of the steps in drawing a solid-fill contour plot. slay. ✨


✨ NAME ✨

CPCLAM β€” adds contour lines to an area map. It's part of the whole process of drawing a solid-fill contour plot. πŸ¦‹


🌸 SYNOPSIS 🌸

CALL CPCLAM (ZDAT, RWRK, IWRK, IAMA)

πŸŽ€ C-BINDING SYNOPSIS πŸŽ€

#include <ncarg/ncargC.h>

void c_cpclam (float *zdat, float *rwrk, int *iwrk,
int *iama)

πŸ’… DESCRIPTION πŸ’…

ok so first thing, bestie β€” the first three arguments are arrays that were used in your last call to CPRECT, CPSPS1, or CPSPS2, and you absolutely must not have changed what's inside them since that call. fr fr, don't touch them. πŸ™ˆ

  • ZDAT β€” (REAL array, dimensioned as specified in the last call to CPRECT, CPSPS1, or CPSPS2, input) this is the data array, the moment. πŸ‘‘
  • RWRK β€” (REAL array, dimensioned as specified in the last call to CPRECT, CPSPS1, or CPSPS2, input/output) the real workspace array.
  • IWRK β€” (INTEGER array, dimensioned as specified in the last call to CPRECT, CPSPS1, or CPSPS2, input/output) the integer workspace array.
  • IAMA β€” (INTEGER array, dimensioned as specified in a call to ARINAM, in the package Areas) the array holding the area map that contour lines are gonna be added to. πŸ’–

🌈 C-BINDING DESCRIPTION 🌈

the C-binding argument descriptions are literally the same as the FORTRAN argument descriptions. same energy, different syntax. 🫢


⭐ USAGE ⭐

CPCLAM takes the contour lines generated from the data in the array ZDAT and adds them to the area map in the array IAMA, and you can call it any time after the initialization call to CPRECT, CPSPS1, or CPSPS2. but heads up β€” the area map has to have been initialized first by a call to the routine ARINAM in the utility Areas. ✨

the contour lines that get added to the area map are the ones specified by the first 'NCL' elements of the parameter arrays 'CLV', 'AIA', and 'AIB'. and if 'NCL' is zero? then CPPKCL gets called to generate those values. not me outsourcing the work 😭

now here's the part you gotta pay attention to, bestie. the contour levels defined by the first 'NCL' elements of the parameter array 'CLV' get examined. if a given contour level is associated with a non-zero value of 'AIA' and/or a non-zero value of 'AIB', then contour lines at that contour level get added to the area map. πŸ‘‘

  • if there's an associated non-zero value of 'AIA', it's used as the area identifier for the area "above" the line (where field values are greater than they are along the line); otherwise, a zero is used.
  • if there's an associated non-zero value of 'AIB', it's used as the area identifier for the area "below" the line (where field values are less than they are along the line); otherwise, a zero is used.
⚠️ okay so a given contour level may occur more than once in the internal parameter array 'CLV', but there must be at most one non-zero value of 'AIA' and at most one non-zero value of 'AIB' associated with it β€” otherwise, an error exit occurs. πŸ’€

if the parameter 'T2D' has a non-zero value, the contour lines get smoothed, using cubic splines under tension. smooth. ✨


four other types of lines get added to the area map by CPCLAM, and yes we're listing all of them:

  1. the edge of the current viewport and possibly a set of vertical lines within the viewport,
  2. the edge of the grid,
  3. the edges of special-value areas, if any, and
  4. the edges of out-of-range areas, if any.

the area identifier for the outside of the viewport is always -1. you can use elements of the parameter array 'AIA' for 'PAI' = -1, -2, and -3 to specify the area identifiers to be used for the outside of the grid, the inside of a special-value area, and the inside of an out-of-range area, respectively β€” and the default values of all three are -1's. the area identifiers for all other sides of these edges are determined from the area-identifier information given for the contour levels. πŸ’…


πŸ¦‹ the order bestie, the ORDER πŸ¦‹

lines are added to the area map in this exact order:

  • the edge of the viewport and the vertical lines within it,
  • the edges of the out-of-range areas, if any,
  • the edge of the grid,
  • the edges of the special-value areas, if any, and,
  • the contour lines, in order of increasing contour level.

the edge of the viewport may actually get added to the area map twice:

  • as part of the edge group with group identifier 'GIC', and
  • as part of the edge group with group identifier 'GIS'.

vertical lines, if any, are added with group identifier 'GIS'.

the object of the edge group with group identifier 'GIS' is to break up the areas represented by the area map into smaller pieces. whether this happens or not is under your control, by means of the internal parameters 'NVS' and 'GIS'. for more info, go look at the descriptions of those internal parameters in the conpack_params man page. iykyk 🫢

and one more thing: if, during the last call to CPRECT, CPSPS1 or CPSPS2, the data being contoured was found to be essentially constant, then no contour lines are added to the area map β€” the other lines are added, however. main character behavior from the other lines honestly. πŸ‘‘


🧚 EXAMPLES 🧚

use the ncargex command to see the following relevant examples: ccpcldm, ccpfil, ccplbam, ccpllb, ccpllc, ccplll, ccpllo, ccpllp, ccpllt, ccpllw, ccppc, ccppc1, ccppc2, ccppc3, ccppc4, ccppole, ccprc, ccpscam, ccpt2d, ccpvs, colcon, cpex01, cpex02, cpex03, cpex04, cpex05, cpex07, cpex08, vvex01, tconpa, fsfsgfa. that's a lot of examples and every single one of them is iconic. πŸ’–


πŸ’œ ACCESS πŸ’œ

to use CPCLAM or c_cpclam, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β€” preferably in that order. periodt. πŸ’…


🌸 MESSAGES 🌸

see the conpack man page for a description of all Conpack error messages and/or informational messages. if something's screaming at you, that's where the answer lives. πŸ”₯


πŸŽ€ SEE ALSO πŸŽ€

Online: conpack, cpback, cpchcf, cpchcl, cpchhl, cpchil, cpchll, cpcica, cpcldm, cpcldr, cpcltr, cpcnrc, 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 πŸ“š


Copyright (C) 1987-2009 University Corporation for Atmospheric Research

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


ok bestie that's the whole page, you ate that. this was the CPCLAM(3NCARG) page from UNIX, dated March 1993 β€” yeah she's an elder but she still serves. 🫢✨ go forth and contour, ily πŸ’–πŸŒˆ