How to install GMTSAR in Windows 10

In this tutorial, I will show you how to install GMTSAR in windows 10 environment. You need to activated your WSL before trying to install this software in windows 10. There are many tutorial explaning how to do that, or you can follow my tutorial here.

Here is step-by-step how to install GMTSAR in windows 10

  • You need to install several dependencies
  • For Ubuntu 16.04, used following command:
>> sudo apt-get install subversion ghostscript build-essential cmake libnetcdf-dev libgdal1-dev libfftw3-dev libpcre3-dev
  • For Ubuntu 18.04, used following command:
>> sudo apt install subversion ghostscript build-essential cmake libnetcdf-dev libfftw3-dev libpcre3-dev libgdal-dev gdal-bin

you can check your ubuntu version by typing following command:

>> lsb_release -a
  • You can start by downloading the GMT master file using following command:
>> git clone –depth 50 https://github.com/GenericMappingTools/gmt
  • Download GSHHG dan DCW files. GSHHG is an add-in file for GMT to draw coastline, river, and political boundaries, while DCW is an addin file for GMT to draw country polygons.
    Put these files into your designated folder. You will have to write the path of these files into GMT configuration file later.
  • Extract GSHHG and DCWfiles using following command
>> tar –zxvf [name_of_the_package]
  • Go to CMAKE folder, inside the GMT folder you’ve already downloaded earlier, copy and rename ConfigUserTemplate.cmake to ConfigUser.cmake
>> cp ConfigUserTemplate.cmake ConfigUser.cmake
  • Edit the ConfigUser.cmake. In my case, I use vim as the text editor
>> vim ConfigUser.cmake
  • Executed following commands consecutively,
>> cd <path to>/gmt
>> mkdir build
>> cd build
>> cmake ..

Then executed following commands

>> make
>> sudo make install
  • Type (in the terminal) following command to make sure GMT is successfully installed
>> gmt
  • We just finished installing GMT. Below is the GMTSAR installation part:
  • Download ORBITS file
  • Type this following command in the terminal
>> sudo -i
>> cd /usr/local
>> mkdir orbits
>> cd orbits
>> tar -xvf /home/hidayat/ORBITS.tar

Please note that, in my case, ORBITS file is located at /home/hidayat/. Please put correct path for your installation case.

  • Then, please type following commands
>> sudo –i
>> cd /usr/local
>> git clone –branch 5.8 https://github.com/gmtsar/gmtsar GMTSAR
  • Next, type following command
>> cd GMTSAR/
>> autoconf
>> ./configure –with-orbits-dir=/usr/local/orbits
>> make
>> make install
>> exit (to exit as super user)
  • Next, you need to add executables file to your path. Type following commands
>> cd ~
>> vim .bashrc

Note: I used vim as text editor, therefore I type vim followed by the .bashrc. please type any text editor you used in your WSL

export GMTSAR=/usr/local/GMTSAR
export PATH=$GMTSAR/bin:"$PATH"
  • To check the installation, please type following command
>> p2p_S1_TOPS.csh

If you get following result, then GMTSAR already installed in your computer

Enjoy the code. Some examples are available in this website

https://topex.ucsd.edu/gmtsar/downloads/

You can choose one of the example and try by yourself to learn how to use this code

Enjoy

Leave a comment

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image