CPPKLB(3NCARG)

πŸ’– CPPKLB πŸ’– β€” it's giving "pick a label, bestie"

ok so this is a page from the NCAR GRAPHICS manual, section 3NCARG, and it's all about CPPKLB, a Fortran-callable routine that picks out a lil set of labels for your labeled contour levels. contour labels but make it ✨curated✨


🌸 NAME 🌸

CPPKLB β€” Picks a set of labels for labeled contour levels. no cap, that's literally the whole job description.


πŸŽ€ SYNOPSIS πŸŽ€

CALL CPPKLB (ZDAT, RWRK, IWRK)

that's it. three args, one call, we're so back.


πŸ¦‹ C-BINDING SYNOPSIS πŸ¦‹

for my C girlies:

#include <ncarg/ncargC.h>

void c_cppklb (float *zdat, float *rwrk, int *iwrk)

✨ DESCRIPTION ✨

ok so listen. all three arguments are arrays that were used in the last call to CPRECT, CPSPS1, or CPSPS2, and the contents must not have been changed since that call. like, do not touch them. i'm serious. that's the whole vibe check. πŸ’…

  • ZDAT β€” (REAL array, dimensioned as specified in the last call to CPRECT, CPSPS1, or CPSPS2, input) is the data array. the main character, honestly.
  • RWRK β€” (REAL array, dimensioned as specified in the last call to CPRECT, CPSPS1, or CPSPS2, input/output) is the real workspace array. it comes in with stuff and it goes out with stuff. multi-talented.
  • IWRK β€” (INTEGER array, dimensioned as specified in the last call to CPRECT, CPSPS1, or CPSPS2, input/output) is the integer workspace array. same energy, but integers.

🌈 C-BINDING DESCRIPTION 🌈

the C-binding argument descriptions are the same as the FORTRAN argument descriptions. copy-paste energy but make it official. periodt.


πŸ’œ USAGE πŸ’œ

normally, CPPKLB gets called by Conpack whenever labels for the contour levels are needed. but bestie, you can also call CPPKLB directly β€” after the initialization call to CPRECT, CPSPS1 or CPSPS2 β€” when you wanna modify the resulting parameter arrays that specify the labels. main character move, honestly.

ok so here's the tea 🍡: if the constant-field-flag 'CFF' is non-zero, that means that during the last call to CPRECT, CPSPS1, or CPSPS2, the data were found to be essentially constant β€” and in that case CPPKLB does nothing. it just sits there. no thoughts, head empty. πŸ™ˆ

otherwise (CFF is zero, we're so on), CPPKLB examines the first 'NCL' elements of the parameter array 'CLV' β€” which defines the contour levels β€” plus the associated parameter arrays, looking for levels that are supposed to be labeled ('CLU' = 2 or 3) for which no label is specified. and how do we know no label is specified? the associated element of 'LLT' is ' ' β€” that's a single blank. just one lil space. if any such levels get found, labels are generated for them. slay.

the scale factor 'SFU' may be set as a byproduct of choosing the labels. if you wanna know more, go read the description of the parameters 'SFU' (scale factor used) and 'SFS' (scale factor selector) in the conpack_params man page. iykyk.

after calling CPPKLB, your user program may examine the generated labels and change them in various ways. they're your labels now. you raised them. 🫢


πŸ“ EXAMPLES πŸ“

use the ncargex command to see the following relevant example: ccpklb.

bestie. run the example. it's right there. it's literally named ccpklb. 😭

πŸ‘‘ ACCESS πŸ‘‘

to use CPPKLB or c_cppklb, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β€” preferably in that order. in that order, ok?? the order matters, don't be chaotic about it. ⭐


πŸ’€ MESSAGES πŸ’€

see the conpack man page for a description of all Conpack error messages and/or informational messages. every single one. that's where they live.


🧚 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, 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 that's the whole page, you ate that. πŸ’…βœ¨

and that's a wrap on this NCAR GRAPHICS page, straight from the UNIX manual, dated March 1993 β€” yeah bestie, 1993, this routine is vintage and it's still serving. CPPKLB(3NCARG), out. πŸŽ€πŸ¦‹πŸ’–