Skip to content
Xiaohua(Eric) Xu edited this page Aug 1, 2019 · 2 revisions

Installation of GMT and GMTSAR with Homebrew

  1. Download and install orbit files in /usr/local/orbits:
http://topex.ucsd.edu/gmtsar/tar/ORBITS.tar
sudo -i
cd /usr/local
mkdir orbits
cd orbits
tar -xvf ~/Downloads/ORBITS.tar # (need full path to ORBITS.tar)
  1. Install stable version 5.7 with Homebrew
xcode-select --install
brew tap dsandwell/homebrew-insar
brew install gmtsar  

Installation of GMT v5 and GMTSAR v5.7 with Macports

  1. Install stable version 5.7 with Macports (make sure XCODE is installed)
sudo port install gmtsar

Installation of GMT and GMTSAR with package managers and github or subversion control

  1. Install GMT first with all optional libraries (GDAL and PCRE, plus FFTW3 and LAPACK for Linux).
  • Linux: Depending on your OS version a GMT package may exist (see below).

  • OS X (Macports):

sudo port install gdal +curl +geos +hdf5 +netcdf +tiff
sudo port install gmt5
sudo port install autoconf
  • OS X (Fink):
sudo fink install libtiff5
sudo fink install szip
sudo fink install gmt5
  1. Install extra libraries. Note that depending on your OS version the actual version numbers in some of the packages below may differ):
  • Ubuntu 14.04 LTS:
sudo apt-get install csh subversion autoconf libtiff5-dev libhdf5-dev
sudo apt-get install liblapack-dev
sudo apt-get install gfortran
sudo apt-get install g++
Install GMT from source since no GMT version >= 5 in 14.04.
  • Ubuntu 16.06 LTS:
sudo apt-get install csh subversion autoconf libtiff5-dev libhdf5-dev
sudo apt-get install liblapack-dev
sudo apt-get install gfortran
sudo apt-get install g++
sudo apt-get install libgmt-dev
sudo apt-get install gmt gmt-dcw gmt-gshhg
sudo apt-get install gmt
  • CentOS 7:
sudo yum install svn autoconf gcc-c++ libtiff-devel libhdf5-devel
sudo yum install gmt
  • Fedora 23:
sudo yum install csh subversion autoconf  gcc-c++libtiff-devel hdf5-devel
(need fftw-developer for faster execution.)
sudo yum install gmt
  1. Download and install orbit files and place in suitable directory (e.g., /usr/local/orbits):
http://topex.ucsd.edu/gmtsar/tar/ORBITS.tar
sudo -i
cd /usr/local
mkdir orbits
cd orbits
tar -xvf ~/Downloads/ORBITS.tar # (need full path to ORBITS.tar)
  1. Download GMTSAR branch 5.7 via github or subversion in a suitable directory:
sudo -i
cd /usr/local
git clone --branch 5.7 https://github.com/gmtsar/gmtsar.git GMTSAR
OR
svn checkout svn://gmtserver.soest.hawaii.edu/GMTSAR/branches/5.7 GMTSAR
  1. Make and install GMTSAR (change the orbits directory if different):
cd GMTSAR
autoconf
./configure --with-orbits-dir=/usr/local/orbits
make
make install

  1. Add the executables to your path (for csh or tcsh):
cd ~
#
#   edit your .tcshrc file and add the following lines
#
        setenv GMTSAR /usr/local/GMTSAR
        setenv PATH $GMTSAR/bin:"$PATH"

or

cd ~
#  edit your .bashrc file and add the following lines
        export GMTSAR=/usr/local/GMTSAR
        export PATH=$GMTSAR/bin:"$PATH"
Clone this wiki locally
You can’t perform that action at this time.