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 session using modern mode
clear Delete current history, conf, cpt, sessions, data or cache
docs Show HTML documentation of specified module or display graphics
end Terminate GMT modern mode session and produce optional graphics
figure Set attributes for the current figure
inset Manage figure inset setup and completion
subplot Manage figure subplot configuration and selection

Plotting

basemap Create a basemap plot
clip Use polygon files to define clipping paths
coast Plot (and fill) coastlines, borders, and rivers on maps
colorbar Plot gray scale or color scale on maps
contour Contour or image raw table data by triangulation
events Plot event symbols and labels for a moment in time
gmtlogo Plot the GMT logo on maps
grdcontour Contouring of 2-D gridded data sets
grdimage Produce images from 2-D gridded data sets
grdvector Plotting of 2-D gridded vector fields
grdview 3-D perspective imaging of 2-D gridded data sets
histogram Plot a histogram
image Plot Sun raster files on a map
legend Plot a legend on a map
mask Create overlay to mask out regions on maps
plot Plot symbols, polygons, and lines on maps
plot3d Plot symbols, polygons, and lines in 3-D
rose Plot sector or rose diagrams
solar Plot day-light terminators and other sunlight parameters
ternary Plot data on ternary diagrams
text Plot text strings on maps
wiggle Draw table data time-series along track on maps

Filtering

blockmean L\(_2\) (x,y,z) table data filter/decimator
blockmedian L\(_1\) (x,y,z) table data filter/decimator
blockmode Mode estimate (x,y,z) table data filter/decimator
dimfilter Directional filtering of 2-D gridded files in the space/time domain
filter1d Time domain filtering of 1-D data tables
grdfilter Filter 2-D gridded data sets in the space domain

Gridding

greenspline Interpolation with Green’s functions for splines in 1–3 D
nearneighbor Nearest-neighbor gridding scheme
sphinterpolate Spherical gridding in tension of data on a sphere
surface A continuous curvature gridding algorithm
triangulate Perform optimal Delauney triangulation and gridding

Sampling of 1-D and 2-D data

gmtsimplify Line reduction using the Douglas-Peucker algorithm
grdsample Resample a 2-D gridded data set onto a new grid
grdtrack Sample 2-D gridded data sets at specified (x,y) locations
sample1d Resampling of 1-D table data sets

Projection and map-transformation

grdproject Project gridded data sets onto a new coordinate system
mapproject Transformation of coordinate systems for table data
project Project table data onto lines or great circles

Information retrieval

gmtdefaults List the current default settings
gmtget Retrieve selected parameters in current file
gmtinfo Get information about table data files
gmtset Change selected parameters in current file
grdinfo Get information about grid files

Mathematical operations on tables or grids

gmtmath Mathematical operations on table data
makecpt Make color palette tables
spectrum1d Compute various spectral estimates from time-series
sph2grd Compute grid from spherical harmonic coefficients
sphdistance Create grid of NN or distances to nearest points on a sphere
sphtriangulate Delaunay or Voronoi construction of spherical (lon,lat) data

Convert or extract subsets of data

gmtconnect Connect segments into more complete lines or polygons
gmtconvert Convert data tables from one format to another
gmtselect Select subsets of table data based on multiple spatial criteria
gmtspatial Geospatial operations on lines and polygons
gmtvector Operations on Cartesian vectors in 2-D and 3-D
grd2kml Create KML image quadtree from single grid
grd2xyz Conversion from 2-D grid file to table data
grdblend Blend several partially over-lapping grid files onto one grid
grdconvert Converts grid files into other grid formats
grdcut Cut a sub-region from a grid file
grdpaste Paste together grid files along a common edge
splitxyz Split xyz files into several segments
xyz2grd Convert an equidistant table xyz file to a 2-D grid file

Grid operations

grd2cpt Make color palette table from a grid files
grdclip Limit the z-range in gridded data sets
grdedit Modify header information in a 2-D grid file
grdfft Perform operations on grid files in the frequency domain
grdfill Interpolate across holes in a grid
grdgradient Compute directional gradient from grid files
grdhisteq Histogram equalization for grid files
grdlandmask Create masking grid files from shoreline data base
grdmask Reset grid nodes in/outside a clip path to constants
grdmath Mathematical operations on grid files
grdvolume Calculate volumes under a surface within specified contour

Miscellaneous

gmt2kml Like plot but writes KML for use in Google Earth
gmtwhich Find full path to specified files
kml2gmt Extracts coordinates from Google Earth KML files
movie Create animation sequences and movies
psconvert Crop and convert PostScript files to raster images, EPS, and PDF

geodesy

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

GSHHG

gshhg Extract data tables from binary GSHHS 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 file 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-line map 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 on a map in 3-D
segy Plot a SEGY file on a map
segy2grd Converting SEGY data to a GMT grid

seis

coupe Plot cross-sections of focal mechanisms
meca Plot focal mechanisms on maps
polar Plot polarities on the inferior focal half-sphere on maps
sac Plot seismograms in SAC format on maps

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 image from a gravity or topography grid
hotspotter Create CVA image 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