next up previous contents index
Next: Exercises Up: SESSION THREE Previous: SESSION THREE

Contouring gridded data sets

GMT comes with several utilities that can create gridded data sets; we will discuss two such programs later this session. First, we will assume that we already have gridded data sets. In the supplemental GMT archive there is a program that serves as a data extractor from several public domain global gridded data sets. Among these data are ETOPO5, crustal ages, gravity and geoid, and DEM for the continental US. Here, we will use grdraster  to extract a GMT-ready grid that we will next use for contouring:

grdraster 1 –-R-66/-60/30/35 –-Gbermuda.grd -–V

We first use the GMT program grdinfo  to see what's in this file:

 
grdinfo bermuda.grd

The file contains bathymetry for the Bermuda region and has depth values from -5475 to -89 meters. We want to make a contour map of this data; this is a job for grdcontour . As with previous plot commands we need to set up the map projection with -–J. Here, however, we do not have to specify the region since that is by default assumed to be the extent of the grid file. To generate any plot we will in addition need to supply information about which contours to draw. Unfortunately, grdcontour  is a complicated program with too many options. We put a positive spin on this situation by touting its flexibility. Here are the most useful options:


 
Table 3.1: The most useful options in grdcontour 
Option Purpose
-–A anot_int Annotation interval
-–C cont_int Contour interval
-–G gap Sets distance between contour annotations
-–L low/ high Only draw contours within the low to high range
-–N unit Append unit to contour annotations
-–Q cut Do not draw contours with fewer than cut points
-–S smooth Resample contours every x_inc/ smooth increment
-–T[ +| -][ gap/ length][: LH] Draw tick-marks in downhill direction for innermost closed contours
  Add tick spacing and length, and characters to plot at the center of closed contours.
-–W[ a| c] pen Set contour and annotation pens
-–Z factor[/ offset] [Subtract offset] and multiply data by factor prior to processing
 

We will first make a plain contour map using 1 km as annotation interval and 250 m as contour interval. We choose a 7-inch-wide Mercator plot and annotate the borders every 2o:

 
grdcontour bermuda.grd –-JM7i -–C250 –-A1000 –-P –-B2 | ghostview -



 
next up previous contents index
Next: Exercises Up: SESSION THREE Previous: SESSION THREE
Paul Wessel
1999-06-09