Skip USGS links group
USGS - science for a changing world

Woods Hole Science Center

End of USGS links group
WHSC Home Research Technology Publications Data People Basis Summaries Location Contact Us

Tutorial Introduction

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.

Matlab plot of Amazon Coast


Up: Introduction to Gridgen | Next: Boundary Construction

Skip USGS links group

Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USAGov logo U.S. Department of the Interior | U.S. Geological Survey
End of USGS links group
URL: woodshole.er.usgs.gov/operations/modeling/gridgen/tutorial_introduction.html
Page Contact Information: WHSC Webmaster
Page Last Modified: Monday, 12-Feb-2007 07:38:07 EST