GG710 Selected Topics in Geology & Geophysics:

GMT - The Generic Mapping Tools

--------------------------

2 credits
Tuesdays OR Thursdays, 2:00-4:00 Spring-97, Room HIG 405
First Meeting Thursday, January 16, 1997, in HIG 208
Instructor: Paul Wessel
Office: HIG 365, ext. 64778

SOEST


GMT is a set of public-domain computer programs widely used for analysis, processing, and display of scientific data. GMT is used by scientists in a variety of disciplines and on all continents. Being "generic", the programs are not tied to any particular data set or field, but can be (and is) used by geoscientists as well as medical researchers, engineers, social scientists, biologists, government agencies, and others. GMT has been installed on computers ranging from laptops to supercomputers, all running some flavor of UNIX. The latest version 3.0 was announced this fall in EOS (Wessel, P., and W. H. F. Smith, 1995, New Version of the Generic Mapping Tools Released)

This course will discuss the GMT environment and the use of GMT in processing, analysis, and display of scientific data. We will review many frequently asked questions about GMT, portability and installation issues, file formats, and learn to unleash the power of UNIX-GMT scripting. Specifically, we will discuss

The students will learn to solve data analysis problems, ranging from the common-place to unique, using GMT and UNIX tools, and automate many repetitive tasks with GMT scripts. As the course progresses we will demonstrate basic, intermediate, and advanced use of GMT in map-making and analysis. Possible examples may include:

This course/seminar is open to all students. Interested staff and faculty are welcome to sit in on some or all sessions. There are no prerequisites or exams; grades will be assigned based on participation and three homework assignments tailored to each student's thesis project (if applicable). The form of the seminar will depend on enrollment and computer availability, as well as specific requests from potential participants.


Required text: The Generic Mapping Tools Version 3 Technical Reference and Cookbook by P. Wessel and W. H. F. Smith (Place order with Janet), X64774


Online access to course material

Most lectures will involve Unix or GMT scrips and data files. All keyboard commands issued during a demonstration will be saved in a lecture log (e.g., lec_4.log); there may also be PostScript files of handouts and other material. You can access all that stuff below; it will be added as the semester progresses.

Organization

Session # 1 (Jan, 16, 1997)

Session # 2 (Jan, 21 & 23, 1997)

Session # 3 (Jan, 28 & 30, 1997)

Session # 4 (Feb, 4 & 6, 1997)

Session # 5 (Feb, 11 & 13, 1997)

Session # 6 (Feb, 18 & 20, 1997)

Session # 7 (Feb, 25 & 27, 1997)

Session # 8 (Mar, 4 & 6, 1997)

Session # 9 (Mar, 11 & 13, 1997)

There were no files to copy for this session, we discussed GMT 'training wheels' and wrote a script that checked for data consistancy.

Session # 10 (Mar, 18 & 20, 1997)

We also discussed the scope of Project 2 which is due April 8 or 10. This project consists of making a cshell script called gridmaker that will assist the novice GMT user in gridding ASCII data tables. When run, the script should explain to the user what it does and request the necessary information before making a final call to the gridding program surface. In particular it should have the following features:

  1. Can read 1 or more xyz ASCII tables of geographic or Cartesian data
  2. Automatically adjust the grid aspect ratio for geographic data (use awk)
  3. Provide reasonable default values for -R and -I (use awk)
  4. Offer choice of spatial preprocessing (mean or medians)
  5. Ask for output filename
  6. Deal with data records (# in 1st col) and multiple segment records (> in 1st col) (use egrep)
  7. Be clever about picking -R -I to ensure rapid calculation (hint: use surface -Q)

The script should also contain comments identifying the purpose of the program, its author, date, version, and assumptions of the environment.

Session # 11 (April, 1 & 3, 1997)

We spent the day looking at various ways to use grid mask in preparing contour and image plots, as well as using PostScript clipping and masking directly.

Session # 12 (April, 8 & 1, 1997)

This session focused on doing 3-D view plots with grdview as well as generating our own custom symbols for plotting in psxy.

Session # 13 (April, 15 & 17, 1997)

We examined automatic map generation using parameter files instead of interactive dialog. You can try to mail a parameter file to gmtslave@aa; you should get a postscript plot back. Basically, mail to gmtslave is piped throuh the script imageservice.

Session # 14 (April, 22 & 24, 1997)

We looked at how to make your own pattern using the IconEditor on the Sun, and then we covered the basic principles of animation using GMT still images translated to tiff files. As an example, try

~pwessel/bin/animate ~wessel/gg710-02/images/cglobe_??0.tiff

We also defined the third and final project which is about animation. The project is due May 16. The project should be a script that does the following:

  1. Read or make one or several gridfiles for animation
  2. Loop over these files or loop over view angle or any other proxy for change
  3. For each step, make a PostScript file and convert it to a tiff file
  4. clean up and start up animate

Session # 15 (April, 29 & May 1, 1997)


[ UH Geology & Geophysics Academics]