GMT Installation Helper

This page helps you customize the GMT installation procedure under Unix or Unix-like operating systems capable of running a Bourne (sh) script. When submitting the completed form, you will receive a parameter file (GMTparam.txt) that you may save and use as argument to the install_gmt script. For example, assuming you save the parameter file to GMTparam.txt, you can install the GMT package with the command

sh install_gmt GMTparam.txt

Output may be redirected to a log file by appending >& install.log (if your login shell is csh or tcsh) or appending > install.log 2>&1 (if your login shell is bash or sh).

Any problems during the install will be noted in the log. Saving the log messages is of course optional.

Note: You do not have to use this form. install_gmt can still be run interactively as in previous versions. However, after a successful install it will write all the parameters to a file named by you, and this file can be used for background installs as shown above.

IMPORTANT: Move or remove old GMT*.bz2 files from the current directory before running install_gmt!


A. Basic Requirements:

1. Select default units in GMT:
SI units (cm)
US units (inch)

Note: This used to be a choice that affected the compilation of GMT. However, since version 3.3.2 this selection is a run-time selection, meaning you can reverse it at any time. The present choice is simply a convenient way to set the default units for all users of your GMT installation (see gmtdefaults man page for how to change this choice at a later time). Individual users can always override the default with gmtset MEASURE_UNIT cm|inch


2. Select default PostScript output format for GMT:
Freeform PostScript (PS)
Encapsulated PostScript (EPS)

Note: GMT-produced PostScript files will by default use the printer configuration command setpagedevice to set image area (i.e., paper size) and to select specific paper trays, including the manual tray (e.g., when making overhead transparencies). Encapsulated PostScript files (EPS) are not allowed to use this command. Some older PostScript previewers (like Sun's pageview) do not understand setpagedevice, while more up-to-date previewers like GNU ghostview does. The parameter PAPER_MEDIA is used to choose between EPS and PS output and this can be changed at run-time with the gmtset command. Thus, this radio button only affects the initial default selection. Choose EPS if you do not need to worry about paper trays. Choose the default PS if you need the extra flexibility offered. Please read the gmtdefaults man page and Appendix C for more details.


3. Select POSIX Advisory File Locking:
YES. Use file locking
NO. Do not use file locking

Note: GMT passes information about previous GMT command-line options to future GMT commands via a hidden file in the current directory (.gmtcommands). To avoid that this file is updated by more than one program at the time (e.g., when you connect two or more GMT commands with a pipe) we use POSIX advisory file locking on the file. Unfortunately, some versions of the Network File System (NFS) have not implemented file locking properly. We know this to be the case with Linux pre-2.4 kernels when mounting NFS disks from a Sun server. If this is your case, you must turn file locking OFF, and avoid using the GMT shorthands in commands that are piped together.


B. NetCDF Setup

1. Select the appropriate netCDF library option:
netCDF 3.6.x is already installed
Please get and install the latest netCDF 3.6.x
I already have the netcdf.tar.Z archive, just install it for me
Give full pathname to the netCDF directory:

Note: In either case you must fill out the directory name. If you already have netCDF then give the directory it resides in; if you need to install netCDF then give the directory you intend to install it. You can leave it blank if you have defined $NETCDFHOME to be the directory where you installed netcdf. Finally, if you have already installed netCDF as a SHARED library it is your responsibility to make sure these libraries are in default paths or explicitly have been added to LD_LIBRARY_PATH or similar environment parameters.


C. GMT Setup

1. Select the FTP site nearest you:
Pacific (SOEST, University of Hawaii [GMT Home], Honolulu, Hawaii, USA)
North America (NOAA, Lab for Satellite Altimetry, Silver Springs, Maryland, USA
North America (Incorporated Research Institutions for Seismology, Seattle, Washington, USA)
South America (IAG-USP, Dept of Geophysics, University of Sao Paulo, Brazil)
Europe (Dept of Geosciences, University of Oslo, Norway)
Europe (Goodie Domain Service, Vienna U of Technology, Austria)
Asia (ISV, Hokkaido University, Sapporo, Japan)
Australia (University of Sydney, Australia)
Africa (Tertiary Education & Research Networks, South Africa)
No FTP, archives already obtained

Note: Download times are shorter when you pick a site that is physically closer to you. If you already have downloaded the files and simply wants to use the script to reinstall, select the last option.


2. Select passive [Default] or active ftp transmission:
Passive ftp
Active ftp

Note: If you are behind a firewall you will need to use a passive ftp session. Only if you have some very old ftp client, you may have to resort to active ftp (which involves the server connecting back to the client).


3. Select the components you want (bzip2 sizes indicated):
GMT source code (1.0 Mb, the main GMT programs, REQUIRED)
GMT Shared Data (0.05 Mb, shared run-time files, REQUIRED)
GMT Documentation (24 Mb, PDF & HTML versions of Cookbook, Tutorial and Man pages, examples)
GMT Supplemental Programs (0.8 Mb, see section C.10 below for details)
GSHHS Low-resolution Coastlines (4.1 Mb, Basic-resolution (CLI) GSHHS coastlines, REQUIRED)
GSHHS High-resolution Coastlines (8.6 Mb)
GSHHS Full-resolution Coastlines (28.0 Mb)

Note: The first three are required for a simple GMT install (in order to run all the examples in the cookbook). Many users will also prefer to get the higher resolution coastline files for map making in smaller areas. Make sure you remove old GMT *.bz2 archives from the working directory before you run the script; otherwise the script may decide that it does not need to ftp new versions of those archives.


4. Select which triangulation algorithm to use:
Watson's algorithm
Shewchuk's algorithm

Note: You may want to select Shewchuk's faster triangulation routine but as it is not distributed under the GNU Public License it is not included by default. For-profit organizations should first inspect Shewchuk's license. Only Watson's algorithm is included in the GMT source code archive.


5. Select library build type:
Static Libraries
Shared (dynamic) Libraries

Note: The GMT libraries can be made static or shared. The main benefit of using shared (dynamic) libraries is significantly reduced executable sizes (50-70% savings in disk space). The GMT install procedure knows how to make shared libraries under Linux, FreeBSD, NetBSD, SunOS, Solaris, HPUX, OSF1, OSX, and IRIX. For other systems capable of generating shared libraries you must manually configure the makegmt.macros file. If you have no preferences or no idea what to do on an unlisted system, select the default static libraries.


6. Select the C compiler you want to use:

Note: The default cc should work unless you are on a system with several C compilers. E.g., you may run Solaris and have purchased Sun's compiler but have also installed GNU gcc. To ensure you get the GNU you should select gcc. If your C compiler has another name or lives in a strange directory not in your path, please select "other" and enter the value for CC below.
Custom C Compiler:


7. Select the make program you want to use:

Note: The default make should work unless you are on a system with a weird make utility. GNU make works best, and some Sys V makes have problems. If you have make problems, use GNU make (assuming it is installed): Select "other" and enter the path for make below.
Custom make program:


8. Select GMT final destination directories
Place GMT in subdirectories of:
OR
Place GMT executables in:
Place GMT libraries in:
Place GMT include files in:
Place GMT data resources in:
Place GMT man pages in:
Place GMT doc pages in:

Note: The installation will install all GMT components in several subdirectories under one root directory. By default, GMT will be installed under GMT4.4.0 in the current working directory where install_gmt is run. On most Unix systems, however, the preferred location of the root directory will be something like /usr/local or /sw, under which the installation will add bin, lib, include, share, share/man, and share/doc/gmt, respectively. To select another location for the root directory than the default (GMT4.4.0), specify it in the first box above, or enter subdirectories individually. Only specify alternative directories if you want to place the files elsewhere.

Note that the man pages will be be placed in the sub-directories man1 and man3 of the directory specified above. The man utility will find the GMT man pages if the chosen man directory is included in the users' MANPATH environmental variable. Make sure the users' search path contains the directory where you place the executables. Finally, advise users to add a browser bookmark for the file gmt/doc/html/gmt_services.html in the doc directory you chose above; that page provides links to online GMT documentation and man pages (assuming you selected the doc archive in Section C.3).


9. Select alternative GMT_SHAREDIR directory
Alternative GMT_SHAREDIR directory:

Note: At run-time GMT will look in the shared data directory (specified in section C.7) to find configuration and data files. That directory may appear with a different name to remote users if a different mount point is used or a symbolic link is set. GMT can use the environment variable $GMT_SHAREDIR to point to the right place. If users see a different location for the shared data files, specify it here. (It will be used only to remind you at the end of the installation to set the enronment variable $GMT_SHAREDIR). Leave blank to select the shared data directory of the data resources directory given in C.7 [Default].


10. Alternative coastline directories
Install all selected coastline files in $GMT_SHAREDIR/coast
Place coastline files in several directories

Note: Normally, all coastline files reside in $GMT_SHAREDIR/coast. However, if your disk resources are limited or you are sharing files via NFS or similar mounts, you may want to place the larger files in places separate from where the smaller files reside. The selections below are only used if you chose that way.

Place crude, low, and intermediate coastlines in:
Place high resolution coastlines in:
Place full resolution coastlines in:


11. Select supplemental packages to install:
DBASE: Extracting data from NGDC DEM and other grids
GSHHS: Global Self-consistent Hierarchical High-resolution Shoreline tools
IMGSRC: Extracting grids from global altimeter files (Sandwell/Smith)
MECA: Plotting special symbols in seismology and geodesy
MEX: Interface for reading/writing GMT grdfiles for Matlab or Octave
MGD77: Programs for managing and plotting MGD77 data
MGG: Programs for making, managing, and plotting *.gmt data
MISC: Manipulate PostScript, create bit-patterns, extract netCDF columns
SEGYPROGS: Plot SEGY seismic data files
SPOTTER: Plate tectonic backtracking and hotspotting
X2SYS: Track intersection (crossover) tools (REQUIRES MGG and MGD77)
X_SYSTEM: MGG-specific Track intersection (crossover) tools (REQUIRES MGG)
XGRID: X11 graphical editor for netCDF-based .grd files (REQUIRES Xlibs)

Note: The selected packages will only be installed if you also selected the supplemental tar archive above. The x2sys and x_system packages require the mgg package, the mex package requires Matlab or Octave, and xgrid requires various X11 libraries.


11. Additional information for MEX (Matlab or Octave):

Enter head of the Matlab system directory if you selected Matlab above:
Note: You can leave the path blank under OS X or if $MATLAB is defined in your environment and points to the correct directory.
Enter directory for *.m files for the GMT/Matlab-Octave interface:
Enter directory for *.mex files for the GMT/Matlab-Octave interface:
Note: You can leave these two paths blank to select the default paths for either Matlab or Octave. In any case you must have permission to create these directories (if they don't exist) and write to them. Finally, if you chose Octave then it is assumed that octave is already in your executable path, in particular that the utilities mkoctfile and octave-config can be found when configure is run.
12. Complete the operation:
Delete all archives upon successful installation
Run all example scripts (assumes doc tar archive was chosen above)

Note: Examples will only be run if you also ftp'ed the doc archive.

   

Once received, use your browser's File->Save As option to save the GMTparam.txt. file.