If you found your way to this website, you are probably familiar with a graphical user interface (GUI) on a computer. However, it is often inefficient for programmers, scientists, and other people who want to leverage the processing capabilities of a computer to use GUIs, so these people go back to the old style of using a computer: typing commands into a terminal window. If you have never heard of Unix, this tutorial is for you.
Note: I do not claim to be an expert at programming, so I may get some of the terminology wrong and my syntax may be idiosyncratic. But this tutorial should give you a decent starting point.
Skill level required: Zero experience
Tools needed: Mac or Linux computer (sorry Windows folks; your computer runs DOS, not Unix - Consider a virtual machine, dual booting, Cygwin (shudder) or a new computer...only half kidding)
(Yes, you should learn awk. No, I don't care if you already know Python.)
If you need to manipulate data files, this program with the funny name is one of the fastest and most versatile tools. Awk allows you to extract columns and rows from a file, perform a variety of mathematical operations, use programming logic, and much more. It has a lot of the same basic quantitative functions as Excel but in a small, sleek three-letter package. Learning it will make you a more efficient Unix user!
Skill level required: Beginner, but you should complete the Beginner's Guide to Unix first
Tools needed: Mac or Linux computer
In Geosciences, many of the figures we make are maps with data plotted at geographic coordinates. Some of you may be familiar with making maps in ArcGIS, which is a great tool, but sometimes you would really like to take output directly from your program and plot it with a command line program. A widely used software package for making maps is the Generic Mapping Tools (GMT). GMT is not the most intuitive tool at first glance, but once you get used to the syntax, you can make a huge variety of figures that look really sharp. If you look at the figures and plots on this website or from my publications, I made almost all of these entirely with GMT scripts.
Note: I have chosen to stop posting tutorials and scripts in GMT 4 format. These tutorials will teach GMT 5, and if you know enough to complain, you can probably figure out most of this on your own.
Note: GMT 6 has now been released. It has a "classic" mode that is identical to GMT 5 syntax. So these tutorials should continue to work for GMT 6 in classic mode. GMT 6 also has a "modern" mode that might be better for beginners and gives you some cool new options (animations, insets, etc.).
Skill level required: Intermediate (you should at a minimum complete the Beginner's Guide to Unix, later parts use awk, and it is helpful if you have some additional experience in Unix, particularly writing scripts)
Tools needed: GMT installed, preferably a Mac or Linux computer (GMT can be run on Windows, but alas I cannot help with that)
In Part 1 of learning to use GMT, you will learn basic functions and syntax. Specifically, the tutorial covers these programs:
Part 2 of learning to use GMT covers raster images and color palettes:
I have gotten several requests to add this third GMT tutorial. If you are not familiar with awk, I recommend working through that tutorial first. Part 3 of learning to use GMT covers adding text, plotting vectors, and different types of earthquake focal mechanisms: