# ncl_csvorod man page

CSVOROD — calculate Voronoi polygons for data on a sphere.

## Synopsis

CALL CSVOROD (NPTS, RLATI, RLONI, NI, NF, IWK, RWK,

NC, RLATO, RLONO, RC,

NCA, NUMV, NV, IER)

## Description

- NPTS
- (integer,input) The number of input data points (NPTS > 3).
- RLATI
- (double precision, input) An array containing the latitudes of the input data, expressed in degrees. The first three points must not be collinear (lie on a common great circle).
- RLONI
- (double precision, input) An array containing the longitudes of the input data, expressed in degrees.
- NI
- (integer, input) The index of the input coordinate for which you want to determine the Voronoi polygon (1 .LE. NI .LE. NPTS).
- NF
- (integer, input) Flag indicating if this is the first call to CSVOROD to retrieve Voronoi polygons for this dataset (1=yes, 0=no). Calls subsequent to the first call for a given dataset are much faster than the first call.
- IWK
- (integer, input) Integer work space dimensioned for 27*NPTS.
- RWK
- (double precision, input) A work space dimensioned for 9*NPTS. Note that RWK must be typed DOUBLE PRECISION.
- NC
- (integer, input) The maximum size of the output arrays RLATO, RLONO, and RC. NC should be 2*NPTS.
- RLATO
- (double precision, output) The latitudes for the vertices of the Voronoi polygons. These are circumcenters of circles passing through the Delaunay triangles. 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.
- RLONO
- (double precision, output) The longitudes for the vertices of the Voronoi polygons.
- RC
- (double precision, output) Array containing circumradii (arc lengths in degrees of the angle between a circumcenter and its associated triangle vertices).
- NCA
- (integer, output) The actual number of circumcenters returned in RLATO and RLONO. This number may be larger than NPTS if the input dataset has boundary points since certain "pseudo points" may have been added to the original dataset in order to complete the Voronoi polygon set.
- NUMV
- (integer, output) The number of vertices in the Voronoi polygon enclosing the coordinate (RLATI(NI),RLONI(NI)).
- 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)). The indices in NV list out the vertices of the Voronoi polygon in counter-clockwise order.
- IER
- (integer, output) An error return value. If IER is returned as 0, then no errors were detected. If IER is non-zero, then refer to the man page for cssgrid_errors for details.

## Usage

CSVOROD is called 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. CSVOROD is a double precision version of CSVORO.

## Access

To use CSVOROD, load the NCAR Graphics library ngmath.

## See Also

css_overview, csstrid, cssgridd.

Complete documentation for Cssgrid is available at URL

http://ngwww.ucar.edu/ngdoc/ng/ngmath/c…

## Copyright

Copyright (C) 2000

University Corporation for Atmospheric Research

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

## Info

NCAR GRAPHICS May 2000