CPCLTR(3NCARG)
π CPCLTR β it's giving contour tracing, bestie π
okay so. This is CPCLTR from the NCAR Graphics crew (manual section 3NCARG), and here's the whole vibe: it traces contour lines at whatever level you want, then hands them back to you so you can do your little user-defined processing on them. It's not doing the drawing for you, it's giving you the coordinates and saying "here bestie, you handle it." π
β¨ NAME β¨
CPCLTR β Traces the contour lines at a given level and retrieves them for some sort of user-defined processing. π
β¨ SYNOPSIS β¨
CALL CPCLTR (ZDAT,RWRK,IWRK,CLVL,IJMP,IRW1,IRW2,NRWK)
β¨ C-BINDING SYNOPSIS β¨
#include <ncarg/ncargC.h>
void c_cpcltr (float *zdat, float *rwrk, int *iwrk,
float clvl, int *ijmp, int *irw1, int *irw2, int *nrwk)
πΈ DESCRIPTION πΈ
So like. The first three arguments are arrays that were used in the last call to CPRECT, CPSPS1, or CPSPS2, and the contents of those arrays must not have been changed since that call. That's the rule. Don't touch them. π
ZDATβ (REAL array, dimensioned as specified in the last call toCPRECT,CPSPS1, orCPSPS2, input) is the data array. It's the whole point, it's the main character. πRWRKβ (REAL array, dimensioned as specified in the last call toCPRECT,CPSPS1, orCPSPS2, input/output) is the real workspace array. This is where your contour coordinates are gonna land. π«IWRKβ (INTEGER array, dimensioned as specified in the last call toCPRECT,CPSPS1, orCPSPS2, input/output) is the integer workspace array.CLEVβ (REAL, input) is the desired contour level. Yes, the synopsis calls itCLVLand this description calls itCLEVβ that's just how it is, no cap, we don't make the rules. πIJMPβ (INTEGER, input/output) is initially set to zero by the user. Upon return fromCPCLTR, it will be non-zero if coordinates of a contour line segment have been placed inRWRK; it will be zero if all contour line segments at the given level have been generated. So it's basically the "are we done yet" flag. π¦IRW1β (INTEGER, <orange>output</orange>) is a pointer to the place inRWRKwhere X coordinates have been stored. They will be inRWRK(IRW1+I)forI = 1, 2, ..., NRWK.IRW2β (INTEGER, <orange>output</orange>) is a pointer to the place inRWRKwhere Y coordinates have been stored. They will be inRWRK(IRW2+I)forI = 1, 2, ..., NRWK.NRWKβ (INTEGER, <orange>output</orange>) is the number of points on the contour line segment. The points comprising the segment will be(RWRK(IRW1+I),RWRK(IRW2+I))forI = 1, 2, ... NRWK.
π¦ C-BINDING DESCRIPTION π¦
The C-binding argument descriptions are the same as the FORTRAN argument descriptions. Same energy, different syntax. β¨
π USAGE π
You can call CPCLTR at any time after the initialization call to CPRECT, CPSPS1, or CPSPS2. It's called using code like the following:
IJMP=0
101 CALL CPCLTR (ZDAT,RWRK,IWRK,CLEV,IJMP,IRW1,IRW2,NRWK)
IF (IJMP.NE.0) THEN
(PROCESS SEGMENT OF CONTOUR LINE FROM RWRK)
GO TO 101
END IF
CPCLTR is called repeatedly. Initially, IJMP is zeroed. Upon each return from CPCLTR, if the value of IJMP is non-zero, X and Y coordinates have been placed in the real workspace array RWRK and the values of IRW1, IRW2, and NRWK have been set to indicate where the coordinates were put. After the coordinates have been processed, CPCLTR is called again. If, upon return from CPCLTR, the value of IJMP is zero, all contour lines at the specified level have been processed. π
Pro tip from the group chat: if the parameter 'T2D' has a non-zero value, the contour lines are smoothed, using cubic splines under tension. Yes bestie, tension. It's giving β¨aestheticβ¨. π§
π ACCESS π
To use CPCLTR or c_cpcltr, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. 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. That's where the lore lives. π
π SEE ALSO π
Online: conpack, cpback, cpchcf, cpchcl, cpchhl, cpchil, cpchll, cpcica, cpclam, cpcldm, cpcldr, cpcnrc, cpdrpl, cpezct, cpgetc, cpgeti, cpgetr, cplbam, cplbdr, cpmpxy, cpmviw, cpmvrw, cppkcl, cppklb, cprect, cprset, cpscae, cpsetc, cpseti, cpsetr, cpsps1, cpsps2, ncarg_cbind
The whole friend group, fr fr. π«Ά
π COPYRIGHT π
Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
okay that's the whole page, no notes, you ate that. π β¨
CPCLTR(3NCARG) β UNIX β March 1993 π sending you the biggest forehead kiss, now go trace some contours bestie ππ¦πΈ
π¦ where this page comes from
- epel 9: ncl-devel 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms