GMT Modules

Note

Looking for the classic mode modules like psxy and pscoast? See the equivalent page for classic mode.

This is a list of all GMT core and supplemental modules and their uses, as well as some utility scripts. All modules are requested via a call to the gmt program.

Program

Session management

begin Initiate a new GMT modern mode session
clear Delete current default settings, or the cache, data or sessions directories
docs Show HTML documentation of specified module
end Terminate GMT modern mode session and produce optional graphics
figure Set attributes for the current modern mode session figure
inset Manage figure inset setup and completion
subplot Manage modern mode figure subplot configuration and selection

Plotting

basemap Plot base maps and frames
clip Initialize or terminate polygonal clip paths
coast Plot continents, countries, shorelines, rivers, and borders
colorbar Plot gray scale or color scale bar
contour Contour table data by direct triangulation
events Plot event symbols and labels for a moment in time
gmtlogo Plot the GMT logo
grdcontour Make contour map using a grid
grdimage Project and plot grids or images
grdvector Plot vector field from two component grids
grdview Create 3-D perspective image or surface mesh from a grid
histogram Calculate and plot histograms
image Plot raster or EPS images
legend Plot a legend
mask Clip or mask map areas with no data table coverage
plot Plot lines, polygons, and symbols in 2-D
plot3d Plot lines, polygons, and symbols in 3-D
rose Plot a polar histogram (rose, sector, windrose diagrams)
solar Plot day-light terminators and other sunlight parameters
ternary Plot data on ternary diagrams
text Plot or typeset text
wiggle Plot z = f(x,y) anomalies along tracks

Filtering

blockmean Block average (x,y,z) data tables by mean estimation
blockmedian Block average (x,y,z) data tables by median estimation
blockmode Block average (x,y,z) data tables by mode estimation
dimfilter Directional filtering of grids in the space domain
filter1d Time domain filtering of 1-D data tables
grdfilter Filter a grid in the space (or time) domain

Gridding

greenspline Interpolate using Green’s functions for splines in 1-3 dimensions
nearneighbor Grid table data using a “Nearest neighbor” algorithm
sphinterpolate Spherical gridding in tension of data on a sphere
surface Grid table data using adjustable tension continuous curvature splines
triangulate Delaunay triangulation or Voronoi partitioning and gridding of Cartesian data

Sampling of 1-D and 2-D data

gmtsimplify Line reduction using the Douglas-Peucker algorithm
grdsample Resample a grid onto a new lattice
grdtrack Sample grids at specified (x,y) locations
sample1d Resample 1-D table data using splines

Projection and map-transformation

grdproject Forward and inverse map transformation of grids
mapproject Forward and inverse map transformations, datum conversions and geodesy
project Project data onto lines or great circles, or generate tracks

Information retrieval

gmtdefaults List current GMT default settings
gmtget Get individual GMT default settings
gmtinfo Get information about data tables
gmtset Change individual GMT default settings
grdinfo Extract information from grids

Mathematical operations on tables or grids

gmtmath Reverse Polish Notation (RPN) calculator for data tables
makecpt Make GMT color palette tables
spectrum1d Compute auto- [and cross-] spectra from one [or two] time series
sph2grd Compute grid from spherical harmonic coefficients
sphdistance Create Voronoi distance, node, or natural nearest-neighbor grid on a sphere
sphtriangulate Delaunay or Voronoi construction of spherical data

Convert or extract subsets of data

gmtconnect Connect individual lines whose end points match within tolerance
gmtconvert Convert, paste, or extract columns from data tables
gmtselect Select data table subsets based on multiple spatial criteria
gmtspatial Geospatial operations on points, lines and polygons
gmtvector Operations on Cartesian vectors in 2-D and 3-D
grd2kml Create KML image quadtree from single grid
grd2xyz Convert grid to data table
grdblend Blend several partially overlapping grids into one larger grid
grdconvert Convert between different grid formats
grdcut Extract subregion from a grid
grdpaste Join two grids along their common edge
splitxyz Split xyz[dh] data tables into individual segments
xyz2grd Convert data table to a grid

Grid operations

grd2cpt Make linear or histogram-equalized color palette table from grid
grdclip Clip the range of grid values
grdedit Modify header or content of a grid
grdfft Mathematical operations on grids in the spectral domain
grdfill Interpolate across holes in a grid
grdgradient Compute directional gradients from a grid
grdhisteq Perform histogram equalization for a grid
grdlandmask Create a “wet-dry” mask grid from shoreline data base
grdmask Create mask grid from polygons or point coverage
grdmath Reverse Polish Notation (RPN) calculator for grids (element by element)
grdvolume Calculate grid volume and area constrained by a contour

Miscellaneous

gmt2kml Convert GMT data table to Google Earth KML file
gmtwhich Find full path to specified files
kml2gmt Extract GMT table data from Google Earth KML files
movie Create animation sequences and movies
psconvert Convert [E]PS file(s) to other formats using Ghostscript

geodesy

earthtide Compute grids or time-series of solid Earth tides
gpsgridder Interpolate GPS strains using Green’s functions for elastic deformation
velo Plot velocity vectors, crosses, and wedges

GSHHG

gshhg Extract data tables from binary GSHHG or WDBII data files

IMG

img2grd Extract a subset from an img file in Mercator or Geographic format

MGD77

mgd77convert Convert MGD77 data to other formats
mgd77header Create MGD77 headers from A77 files
mgd77info Extract information about MGD77 files
mgd77list Extract data from MGD77 files
mgd77magref Evaluate the IGRF or CM4 magnetic field models
mgd77manage Manage the content of MGD77+ files
mgd77path Return paths to MGD77 cruises and directories
mgd77sniffer Along-track quality control of MGD77 cruises
mgd77track Plot track-lines of MGD77 cruises

potential

gmtflexure Compute flexural deformation of 2-D loads, forces, and bending moments
gmtgravmag3d Compute the gravity/magnetic anomaly of a 3-D body by the method of Okabe
gravfft Spectral calculations of gravity, isostasy, admittance, and coherence for grids
grdflexure Compute flexural deformation of 3-D surfaces for various rheologies
grdgravmag3d Computes the gravity effect of one (or two) grids by the method of Okabe
grdredpol Compute the Continuous Reduction To the Pole, AKA differential RTP
grdseamount Create synthetic seamounts (Gaussian, parabolic, cone or disc, circular or elliptical)
talwani2d Compute geopotential anomalies over 2-D bodies by the method of Talwani
talwani3d Compute geopotential anomalies over 3-D bodies by the method of Talwani

SEGY

segyz Plot a SEGY file in 3-D
segy Plot a SEGY file in 2-D
segy2grd Converting SEGY data to a grid

seis

coupe Plot cross-sections of focal mechanisms
meca Plot focal mechanisms
polar Plot polarities on the lower hemisphere of the focal sphere
sac Plot seismograms in SAC format

spotter

backtracker Generate forward and backward flowlines and hotspot tracks
gmtpmodeler Evaluate a plate motion model at given locations
grdpmodeler Evaluate a plate motion model on a geographic grid
grdrotater Finite rotation reconstruction of geographic grid
grdspotter Create CVA grid from a gravity or topography grid
hotspotter Create CVA grid from seamount locations
originater Associate seamounts with nearest hotspot point sources
polespotter Find stage poles given fracture zones and abyssal hills
rotconverter Manipulate total reconstruction and stage rotations
rotsmoother Get mean rotations and covariance matrices from set of finite rotations

x2sys

x2sys_binlist Create bin index listing from track data files
x2sys_cross Calculate crossovers between track data files
x2sys_datalist Extract content of track data files
x2sys_get Get track listing from track index database
x2sys_init Initialize a new x2sys track database
x2sys_list Extract subset from crossover data base
x2sys_merge Merge an updated COEs table (smaller) into the main table (bigger)
x2sys_put Update track index database from track bin file
x2sys_report Report statistics from crossover data base
x2sys_solve Determine least-squares systematic correction from crossovers