CSVOROD(3NCARG)

πŸ’– CSVOROD β€” it's giving Voronoi-on-a-sphere, bestie πŸ’–

NCAR GRAPHICS · the Fortran-callable one · yes she's from the Cssgrid fam 🫢


✨ NAME ✨

CSVOROD β€” calculate Voronoi polygons for data on a sphere. no cap, that's literally the whole job description πŸ’…


🌸 SYNOPSIS 🌸

CALL CSVOROD (NPTS, RLATI, RLONI, NI, NF, IWK, RWK,
             NC, RLATO, RLONO, RC,
             NCA, NUMV, NV, IER)

πŸŽ€ DESCRIPTION πŸŽ€

okay so here's the whole cast of characters, one by one, and yes you need to know all of them 🧚

  • NPTS β€” (integer, input) the number of input data points. and it has to be NPTS > 3, so don't come in here with three points and expect a polygon, bestie 😭
  • RLATI β€” (double precision, input) array holding the latitudes of the input data, in degrees. ⚠️ heads up: the first three points must not be collinear β€” meaning they cannot all lie on a common great circle. if they do, that's a you problem, not a CSVOROD problem.
  • RLONI β€” (double precision, input) array holding the longitudes of the input data, in degrees. the matching half of the glow-up duo ✨
  • NI β€” (integer, input) the index of the input coordinate you want the Voronoi polygon for. range check: 1 .LE. NI .LE. NPTS. pick your main character wisely πŸ‘‘
  • NF β€” (integer, input) the flag that says whether this is the first call to CSVOROD for this dataset or not (1=yes, 0=no). and listen β€” calls after the first one for a given dataset are much faster than the first call. that's the tea. set it right and you get speed; set it wrong and, well. πŸ™ˆ
  • IWK β€” (integer, input) integer work space, dimensioned for 27*NPTS. that's not a typo, that's 27*NPTS. it's hungry, feed it πŸ“
  • RWK β€” (double precision, input) a work space dimensioned for 9*NPTS. note that RWK must be typed DOUBLE PRECISION. like, actually. don't try to sneak a single-precision array in here, it will not slay πŸ’€
  • NC β€” (integer, input) the maximum size of the output arrays RLATO, RLONO, and RC. and NC should be 2*NPTS. just do it, trust.
  • RLATO β€” (double precision, output) the latitudes for the vertices of the Voronoi polygons. these are circumcenters of circles passing through the Delaunay triangles. and if a coordinate is a boundary point, then the circle may pass through certain "pseudo points" that have been added to the original dataset in order to complete the Voronoi polygon. yes, pseudo points. they're doing side quests to finish the polygon πŸ¦‹
  • RLONO β€” (double precision, output) the longitudes for the vertices of the Voronoi polygons. the other coordinate of the same little vertex squad πŸ’œ
  • RC β€” (double precision, output) array containing circumradii (arc lengths in degrees of the angle between a circumcenter and its associated triangle vertices). that's the vibe. radius-adjacent. iconic ⭐
  • NCA β€” (integer, output) the actual number of circumcenters returned in RLATO and RLONO. and ngl, this number may be larger than NPTS if the input dataset has boundary points β€” because, again, certain "pseudo points" may have been added to the original dataset in order to complete the Voronoi polygon set. those little extras are doing unpaid labor πŸ’…
  • NUMV β€” (integer, output) the number of vertices in the Voronoi polygon enclosing the coordinate (RLATI(NI),RLONI(NI)). the headcount. the guest list 🌈
  • NV β€” (integer, output) an array (dimensioned for NPTS) containing NUMV indices for the Voronoi polygon enclosing the coordinate (RLATI(NI),RLONI(NI)). the indices returned in this array refer to the coordinates returned in RLATO, RLONO, and RC. for example, if the integer "J" is an element of the NV array, then (RLATO(J),RLONO(J)) is a vertex of the Voronoi polygon enclosing (RLATI(NI),RLONI(NI)). and β€” very important β€” the indices in NV list out the vertices of the Voronoi polygon in counter-clockwise order. counter-clockwise. that's the direction, bestie, don't fight it πŸ”₯
  • IER β€” (integer, output) an error return value. if IER comes back as 0, then no errors were detected β€” she ate and left no crumbs ✨. if IER is non-zero, then refer to the man page for cssgrid_errors for details. that's where the receipts live 🧾

πŸ’« USAGE πŸ’«

call CSVOROD if you want to determine the Voronoi polygons for data randomly positioned on a sphere. each call to CSVOROD calculates the vertices for the Voronoi polygon surrounding a specified input point. one point per call, one polygon per point. very "one at a time, deliberately" of her 🫢

also: CSVOROD is a double precision version of CSVORO. so if you ever meet CSVORO, you know the lore 🌸


πŸ”‘ ACCESS πŸ”‘

to use CSVOROD, load the NCAR Graphics library ngmath. that's it. that's the access. go off πŸ’…


πŸ‘€ SEE ALSO πŸ‘€

  • css_overview
  • csstrid
  • cssgridd

complete documentation for Cssgrid is available at URL http://ngwww.ucar.edu/ngdoc/ng/ngmath/cssgrid/csshome.html β€” go read it, iykyk πŸ“š


Copyright (C) 2000
University Corporation for Atmospheric Research

The use of this Software is governed by a License Agreement.
fr fr, that's real β€” use of this Software is governed by a License Agreement. don't skip the paperwork bestie, it's giving legally binding πŸ“œ

and that's the whole page!! this was CSVOROD(3NCARG) from the NCAR GRAPHICS manual, in its UNIX flavor, dated May 2000 πŸŽ€

mwah πŸ’‹ take care of your work spaces, set your NF correctly, and may all your IERs be zero πŸ’–βœ¨πŸ¦‹