Cssgrid Examples


Overview

This module contains source codes for Cssgrid examples.

The following list summarizes the examples:

The plotting subroutines used by the Fortran and C examples use NCAR Graphics.

If you are not using NCAR Graphics and want to draw the plots, you will have to substitute appropriate calls from the graphics package you are using.

Creating your own executable

If you have access to NCAR Graphics, you can create executables for all of the Fortran and C examples by using the ncargex utility, which is documented with a man page. The three Fortran examples are known by ncargex as cssex01, cssex02, and cssex03 and the C examples are know as c_cssex01, c_cssex02, and c_cssex03.

If you are using NCAR Graphics and the C interface to Cssgrid and you are compiling using ncargcc, then function prototypes for all Cssgrid C functions are contained in a C header file. This can be accessed by inserting the line:

#include <ncarg/ngmath.h>
into your code.

If you are using NCAR Graphics, you can run all of the NCL examples for Cssgrid using the ng4ex utility. The NCL examples utilize GSUN functions. The NCL equivalent to cssex01 is ng4ex example nm20n.ncl and the equivalent to cssex02 is nm21n.ncl.

Example 1 -- Delaunay triangulation and Voronoi polygons.

Example 2 -- contouring random data on a sphere.

Example 3 -- comparison with Natgrid package.


home | contents | defs | procedures | examples | errors