Bathymetric information is usually available in discrete form (soundings) or semi-discrete form (contours). Consequently, if values of depth are needed at arbitrary positions in a model domain, some method of fitting a surface to arbitrarily spaced depths is required. Fitting the bathymetry with smooth functions such as bicubic splines is generally unsatisfactory in areas with the tortuous coastlines and numerous islands typical of many coastal seas; subsequent interpolation of depth can sometimes yield negative water depths, particularly in narrow channels.

The technique used in the TRIGRID package for evaluating depths avoids this difficulty. It consists of constructing an irregular triangular depth grid using the same boundary nodes as are used later in the model grid. Since the boundaries of the depth and model grids coincide, and linear interpolation is used to calculate depths, positive water depths are always obtained at "wet" points.

The interior nodes used for the depth grid differ from those used later for the model grid. Either depth soundings and/or points from digitized depth contours can be used as interior nodes for the depth grid. From the nature of these points it follows that the water depth is known at every vertex of the depth grid. Since TRIGRID currently uses linear interpolation to find depths within each triangle of the depth grid, nodes chosen as the basis for a depth grid should not be far apart in regions where depth is varying rapidly.

Experience to date suggests that a depth grid with roughly the same number of triangles as the eventual model grid is often about right. When depth grid nodes are derived by sampling digitized depth contours, their spacing can be controlled very easily by making sure at the digitizing stage that more contours are included in areas where depth varies rapidly and by sampling these contours at smaller intervals.

The principal programs used for preparing a depth grid are :

**SAMPLER**- is used for interactive graphical
selection of points from boundary
and depth contour data files, in DIGIT format, for use as
depth grid nodes. It can also accept a file of depth soundings
in NODE format for use as interior nodes. Output from
SAMPLER is in NODE format.
**NODER**- is used for interactive graphical checking and editing
of the depth
nodes output by SAMPLER. Input and output are in NODE
format.
**GRIDIT**- creates a depth grid from the set of nodes output by
SAMPLER or NODER, using Renka's triangulation algorithm.
Output consists of an optional triangle list, in TRIANG
format, and a triangulated grid in NEIGH format.
**EDITOR**- is used for interactive graphical checking and editing
of the depth
grid. In particular, the Editor option CHECKNODES should be
used to check the integrity of grid boundaries; any errors
detected can be corrected using editing functions
available in the Editor. Input and output are in NEIGH
format.
**DISPLOT**- is used occasionally for producing hardcopy plots of NODE of
NEIGH format files if required at any stage of depth grid
production. The program is useful for checking the
representation of the scalar variable (usually depth)
in the depth grid by using the Contour option.