gmtsar installation for alos palsar data processing

15
1 GMTSAR INSTALLATION TUTORIAL on ubuntu 12.04 Luhur Bayuaji 20120821 (ver. 1) Suggestion, question or other inquiries related to this GMTSAR installation tutorial Please send it to [email protected] 1 For processing ALOSPALSAR data Terminal Mostly the installation process is performed on the terminal. To open the terminal, press windows sign button and type terminal then click on terminal icon. Command can be typed in the terminal and press enter to execute it. This is terminal 2

Upload: luhur-bayuaji

Post on 18-Apr-2015

1.049 views

Category:

Documents


28 download

DESCRIPTION

This is the GMTSAR installation on Ubuntu 12.04 tutorial slides. But it only working for ALOS PALSAR data. I have not added the data orbit for ENVISAT or ERS data.I hope itu will be useful for you.

TRANSCRIPT

Page 1: GMTSAR Installation for ALOS PALSAR data processing

1

GMTSARINSTALLATION TUTORIAL

on ubuntu 12.04

Luhur Bayuaji

20120821 (ver. 1)

Suggestion, question or other inquiries related to this GMTSAR installation tutorialPlease send it to [email protected]

1

For processing ALOS‐PALSAR data

Terminal

• Mostly the installation process is performed on the terminal.

• To open the terminal, press windows sign button and type terminalthen click on terminal icon.

• Command can be typed in the terminal and press enter to execute it.

This is terminal

2

Page 2: GMTSAR Installation for ALOS PALSAR data processing

2

OS bit version

The knowledge about your Operating System (OS) bit version is needed for compiling process. The process to find out this information is very simple. Type this command below in terminal

uname –m     (then hit enter)

• If the response is i686 or i386, you have a 32‐bit version of Linux.

• If the response is x86_64, you have a 64‐bit version of Linux.

3

Guidance

• Install C‐shell

• Install gfortan

• Install Google earth

• Install GMT (Generic Mapping Tools)

• Install GMTSAR

4

Page 3: GMTSAR Installation for ALOS PALSAR data processing

3

Guidance

• Install C‐shell

• Install gfortan

• Install Google earth

• Install GMT (Generic Mapping Tools)

• Install GMTSAR

5

Install C‐shellPurpose :

Ubuntu works on bash‐shell by default. GMTSAR script developed on C‐shell scripting language. C‐shell should be installed into Ubuntu to make it run.

Type the command below on the terminal then press enter to install C‐shell

sudo apt‐get install tcsh

For testing, type tcsh in the terminal, then the command prompt should change into C‐shell command prompt.

In order to go back into bash‐shell then type exit in the C‐shell command prompt

6

Page 4: GMTSAR Installation for ALOS PALSAR data processing

4

Guidance

• Install C‐shell

• Install gfortan

• Install Google earth

• Install GMT (Generic Mapping Tools)

• Install GMTSAR

7

Install gfortran

Purpose :

Gfortran is a compiler for FORTRAN language. GMT software needs it to compile the source code.

Type the command below on the terminal then press enter

sudo apt‐get install gfortran gfortran‐multilib

For testing, type gfortran in the terminal, then error no input file message will come out

8

Page 5: GMTSAR Installation for ALOS PALSAR data processing

5

Guidance

• Install C‐shell

• Install gfortan

• Install Google earth

• Install GMT (Generic Mapping Tools)

• Install GMTSAR

9

Install Google EarthPurpose :Google Earth will be used to display the GMTSAR result in KML format. It is optional, but it is recommended.

• Installation need several steps as follow• Download installation file by using command belowwget http://dl.google.com/dl/earth/client/current/google‐earth‐stable_current_i386.deb

• Install the google earth by typing command below. If error message appear during the process, just ignore it and run the next command.

sudo dpkg ‐i google‐earth‐stable_current_i386.deb• Install all dependency programs

sudo apt‐get install ‐f

For testing, type google‐earth in the terminal, then google earth program will run.

10

Page 6: GMTSAR Installation for ALOS PALSAR data processing

6

Guidance

• Install C‐shell

• Install gfortan

• Install Google earth

• Install GMT (Generic Mapping Tools)

• Install GMTSAR

11

Install GMTPurpose :

Generic Mapping Tools is the important software that required by GMTSAR. The installation need several steps including download and setting the path. We will create new directory (folder) called APPS. From now on, APPS will become installation directory for GMT, GMTSAR and other needed software .

• Create new APPS folder, using this command below

mkdir APPS

• Enter APSS folder, using this command below (do not forget to do it)

cd APPS

12

Page 7: GMTSAR Installation for ALOS PALSAR data processing

7

Install GMT 2

• Open the GMT site in the web address below 

http://gmt.soest.hawaii.edu/

• Click the download link in the left frame of the website

13

Install GMT 3

• Click on INSTALL FORM link

• Right click on the link install_gmt.sh and save into APPS folder 

14

Page 8: GMTSAR Installation for ALOS PALSAR data processing

8

Install GMT 4

• Scroll down. In part B. Support Library Setup, select Please get and install the latest netCDF 3.6.x

• Scroll down. In part 11. Complete the operation,  give a check on Delete all archives upon successful installation, then click on GET PARAMETES button

15

Install GMT 5

• Save the parameters file into APPS folder by right click on the parameters frame. For Mozilla Firefox user, below is the menu to save parameters file. The GMT4param.txt file will be created in APPS folder.

16

Page 9: GMTSAR Installation for ALOS PALSAR data processing

9

Install GMT 6

• Run the script from terminal, using the command belowsh install_gmt.sh GMT4param.txt

• After the GMT installation complete the result will be look like this. Save this information carefully or copy paste into text editor. We will need it during GMTSAR installation later on.

17

Install GMT 7• Pay attention to the following result, then we will do some set up

Add the path setting to file .bashrc (Bash shell setup file)cd ~pico .bashrc

• add these commands in the last line inside .bashrcexport NETCDFHOME=/home/gmt/APPS/netcdf‐3.6.3export PATH=/home/gmt/APPS/GMT4.5.8/bin:$PATH

• press CTRL+X then type Y (to save the changes)18

The underlined word could be different in your case.Please input the correct one, based on previous result (Install GMT 6 step)

Page 10: GMTSAR Installation for ALOS PALSAR data processing

10

Install GMT 8• Pay attention to the following result, then we will do some set up

Add the path setting to file .tcshrc (C shell setup file)cd ~pico .tcshrc

• add these commands in the last line inside .tcshrcsetenv NETCDFHOME /home/gmt/APPS/netcdf‐3.6.3set path=(/home/gmt/APPS/GMT4.5.8/bin $path)

• press CTRL+X then type Y (to save the changes)19

The underlined word could be different in your case.Please input the correct one, based on previous result (Install GMT 6 step)

Install GMT 9• Enter to C‐shell by typing command tcsh in the terminal, then test 

the path by running the grdinfo program from GMT. If it succeed, then the following output should come out. 

20

Page 11: GMTSAR Installation for ALOS PALSAR data processing

11

Guidance

• Install C‐shell

• Install gfortan

• Install Google earth

• Install GMT (Generic Mapping Tools)

• Install GMTSAR

21

Install GMTSARPurpose :

Previously we install all the program that needed for GMTSAR to run properly. From now on, GMTSAR installation tutorial will be presented.

GMTSAR will be installed inside APPS folder. Make sure these two conditions are fulfilled :

1. Go to C‐shell using tcsh command

2. Go to APPS folder by using cd APPS command (if you are in home folder)

The GMTSAR only working in C‐shell

22

Page 12: GMTSAR Installation for ALOS PALSAR data processing

12

Install GMTSAR 2

• Download GMTSAR source code using this command 

wget http://topex.ucsd.edu/gmtsar/tar/GMTSAR.tar

it will download GMTSAR.tar file inside APPS folder.

• Create GMTSAR folder inside APPS folder

mkdir GMTSAR

• Extract GMTSAR.tar (source code) into GMTSAR folder

tar xvf GMTSAR.tar ‐C GMTSAR

It will extract the GMTSAR.tar into GMTSAR folder inside APPS folder.

23

Install GMTSAR 3

• Enter to GMTSAR folder

cd GMTSAR

• Open file gmtsar_config file

pico gmtsar_config

• Modify the gmtsar_config

Modification’s instructions are available in the next page.

24

Page 13: GMTSAR Installation for ALOS PALSAR data processing

13

Install GMTSAR 4

• Please pay attention to the parameters below. You should modify to your needs.

For number 2) set the compiler switch to match the way GMT was compiled.

• If your Operating System (OS) is 64 bit, just leave it

• If your OS is 32 bit, switch the comment mark

#setenv M64 “‐m64 ‐O3”

setenv M64 “‐m32 ‐O3”

25

Install GMTSAR 5

For number 3) set the path to GMT, NETCDF, and GMTSARYou should modify all the parameter into the correct path. 

Some of the information can be taken from GMT installation process.

This is the example for this tutorial

setenv GMTHOME /home/gmt/APPS/GMT4.5.8

setenv NETCDFHOME /home/gmt/APPS/netcdf‐3.6.3

setenv GMTSARHOME /home/gmt/APPS/GMTSAR

26

Page 14: GMTSAR Installation for ALOS PALSAR data processing

14

Install GMTSAR 6

For number 5) Set the ccfft1d routine for your computer

Uncomment the A. no special fft code is available partcd $GMTSAR/lib_src

rm cfft1d.c 

ln ‐s cfft1d_codes/cfft1d_fftpack.c cfft1d.c 

cd ../.. 27

Install GMTSAR 7

For number 5) Set the ccfft1d routine for your computer

Put comment mark the B. Optional for mac using veclib part#rm ‐f $GMTSAR/lib_src/cfft1d.c

#ln ‐s $GMTSAR/lib_src/cfft1d_codes/cfft1d_veclib.c $GMTSAR/lib_src/cfft1d.c

#setenv VEC "‐framework veclib"

28

Page 15: GMTSAR Installation for ALOS PALSAR data processing

15

Install GMTSAR 8• Save the modification

press CTRL+X then type Y (to save the changes)

• Source gmtsar_config (to apply all the setting in gmtsar_config)

source gmtsar_config

• Compile the GMTSAR source code

make

• Test the result by doing command (result should be as in the image)

align.csh

esarp

29

INSTALLATION FINISHED

CONGRATULATION

You can use the GMTSAR now !!

30