Woods Hole Science Center
Up: Introduction to Gridgen | Next: Boundary Construction
First, make sure that gridgen is in your matlab path. In order to
run gridgen you will need to have coastline and bathymetry .mat files on hand.
The coastline mat file must contain two column vector variables called "lon" and
"lat," with coastline segments separated by "nan" values. The coastline file is
used for two purposes. The first is simply to display on the screen so that you
can get an idea of where you might want your grid boundary to be. The second is
for masking out the land when the bathymetry gridding takes place. For the masking
to work properly, the lon and lat vectors must be constructed such that when the
first and last points of each segment are joined, the constitute a closed polygon
that will be masked. See the Coastline
Extractor web page to obtain coastline and Rich Signell's
mapstuff tools to prepare it for use with gridgen.
The bathymetry .mat file must have three column vector variables called "xbathy", "ybathy" and "zbathy" that contain the triplets of longitude, latitude and water depths in meters. These are scattered bathy soundings that will be interpolated on the model grid that gridgen constructs.
For purposes of testing, we use two files in the
test_data subdirectory, amazon_coast.mat and
amazon_bathy.mat. When you start gridgen, you will be
prompted for these files.
The Gridgen Control figure window will pop up, and will
ask you what map projection you want. Choose Mercator for now.
The map window should then pop up, showing the coastline for Brazil's
Amazon region. The black bounding box represents the extent of the
bathymetry data.

Up: Introduction to Gridgen | Next: Boundary Construction