搜档网
当前位置:搜档网 › GAMIT之-GMT安装-ubuntu

GAMIT之-GMT安装-ubuntu

ubuntu 14.04 64位环境下
参考文献:
https://www.sodocs.net/doc/433868817.html,/s/blog_563c93160100zvac.html
https://www.sodocs.net/doc/433868817.html,/blog-653020-549872.html
https://www.sodocs.net/doc/433868817.html,/blog-387-405286.html
https://www.sodocs.net/doc/433868817.html,/blog-758166-627744.html

下载NetCDF https://www.sodocs.net/doc/433868817.html,/gmt/ 或者直接:ftp://https://www.sodocs.net/doc/433868817.html,/pub/netcdf/netcdf.tar.gz
下载GMT ftp://https://www.sodocs.net/doc/433868817.html,/gmt/ 中的gmt-4.5.13-src.tar.bz2 gshhg-gmt-2.3.4.tar.gz

执行以下命令,获取环境。
sudo apt-get install dpkg-dev -y
sudo apt-get install libX11-dev -y
sudo apt-get install gfortran -y
sudo apt-get install csh -y
sudo apt-get install tcsh -y
sudo apt-get install ncftp -y
sudo apt-get install emacs -y
sudo apt-get install vim -y
sudo apt-get install filezilla -y
sudo apt-get install libghc-X11-dev -y
sudo apt-get install libxaw7-dev -y
sudo apt-get install build-essential flex cmake zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev libxt-dev --force-yes -y

设置环境变量:
1、cd
2、gedit .bashrc
3、复制以下内容到最后一行:环境变量
# for GAMIT
export PATH=$PATH:/opt/gamit/gamit/bin:/opt/gamit/kf/bin:/opt/gamit/com
export HELP_DIR=/opt/gamit/help/
# for GMT
export PATH=$PATH:/usr/local/netcdf/bin
export NETCDF=/usr/local/netcdf
export GMTHOME="/usr/local/gmt"
export PATH="$PATH:$GMTHOME/bin"
4、source .bashrc
5、echo $PAHT 如果里面已经有NETCDF和GMT的路径表示设置成功。

安装NetCDF:(安装指向,不需要预定)
1、复制到某个文件夹下
2、tar -zxvf netcdf.tar.gz
3、cd netcdf-4.3.0
4、./configure --disable-dap --disable-netcdf-4 --prefix=/usr/local/netcdf FC=gfortran
5、make
6、make check
7、make install

安装GMT
1、tar -jxvf gmt-4.5.8.tar.bz2
2、cp -r gmt-4.5.8 /usr/local/gmt
3、cd /usr/local/gmt
4、./configure --enable-netcdf=/usr/local/netcdf
5、make install

复制 gshhs到gmt目录
cp gshhg-gmt-2.3.4.tar.gz /usr/local/gmt/
cd /usr/local/gmt/
tar –xvf gshhs-2.2.0.tar.bz2

验证是否安装成功:psxy 出来一堆东西表示成功,如果仅出现无此命令则表示没有安装成功。


相关主题