666 字
3 分钟
安装基础地震常用软件脚本
安装基础地震常用软件脚本
sudo apt updatesudo apt upgrademkdir -p ~/miniconda3wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.shbash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3rm ~/miniconda3/miniconda.shsource ~/miniconda3/bin/activateconda init --allconda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/conda config --set show_channel_urls yespip install pip -Upip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simplepip install numpy scipy pandas matplotlib seabornpip install numpy pandas matplotlibpip install scipypip install tqdmpip install jupyterpip install matplotlibpip install sconssudo apt install python3 python-is-python3 python3-dev python-dev-is-python3 python3-pip python3-numpy libxaw7-dev freeglut3-dev libnetpbm10-dev libgd-dev libplplot-dev libcairo2-dev libjpeg-dev swig g++ gfortran libopenmpi-dev libfftw3-dev libsuitesparse-dev gitsudo apt updatesudo apt install -y build-essential gfortran libx11-dev libxt-dev libxaw7-dev xorg-dev libmotif-dev libxmu-dev libxext-dev libpng-dev libjpeg-dev libgif-dev libtiff-dev libfftw3-dev libblas-dev liblapack-dev ghostscript gvsudo apt install x11-appssudo apt install libtirpc-devsudo apt-get install imagemagick安装seismic Unix
cd ~/Software/seismic_unixtar -xvf cwp_su_all_44R28.tgzecho '# Seismic Unixexport CWPROOT=~/Software/seismic_unixexport PATH=$PATH:$CWPROOT/bin' >> ~/.bashrc~/.bashrccp ~/Software/seismic_unix/Makefile.config ~/Software/seismic_unix/src/Makefile.configcd ~/Software/seismic_unix/srcmake installmake xtinstallmake finstallmake utilsmake xminstallmake mglinstallsuplane |suximage#=======================================================================# Makefile.config for Gnu/Linux#=======================================================================#-----------------------------------------------------------------------# pick up the Make rules (Gnu make required)#-----------------------------------------------------------------------
include $(CWPROOT)/src/Rules/gnumake.rulesinclude $(CWPROOT)/src/Rules/abbrev.rulesinclude $(CWPROOT)/src/Rules/cflags.rulesinclude $(CWPROOT)/src/Rules/suffix.rulesinclude $(CWPROOT)/src/Rules/misc.rulesinclude $(CWPROOT)/src/Rules/opengl.rules
#-----------------------------------------------------------------------# CWP feature options#-----------------------------------------------------------------------## LINEHDRFLAG=SU_LINEHEADER - adds 3200 byte text & 400 byte SEG-Y# style line headers to output. CWP/SU# always reads either format unless SUXDR# has been selected.## XDRFLAG=-DSUXDR - forces all SU data to be big endian# independent of processor architecture## LARGE_FILE_FLAG - controls access to files > 2 GB on# some systems.## -DSLTSU_SEGY_H - if defined selects SLT/SU trace header# layout so both packages are compatible#-----------------------------------------------------------------------
LINEHDRFLAG =
# if the include files are under /usr/include/rpc use this for XDR# whether or not you had to install libtrpc.a# make sureXDRFLAG = -DSUXDRXDRLFLAGS =XDRIFLAGS =
# else if you had to install libtirpc and the rpc include files are under# /usr/include/tirpc/rpc or if you get an error about <types.h> not found,# and you want to use XDR, then make sure the next three lines are uncommentedXDRFLAG = -DSUXDR -DSUTIRPCXDRIFLAGS = -I/usr/include/tirpc/rpc -I/usr/include/tirpcXDRLFLAGS = -ltirpc
# else if you do not want to use XDR, uncomment the next three lines#XDRFLAG =#XDRLFLAGS =#XDRIFLAGS =
# Most systems are LITTLE_ENDIAN these daysENDIANFLAG = -DCWP_LITTLE_ENDIANLARGE_FILE_FLAG = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
CWP_FLAGS = $(LARGE_FILE_FLAG) $(ENDIANFLAG) $(XDRFLAG) $(XDRIFLAGS) $(LINEHDRFLAG)
#-----------------------------------------------------------------------# system stuff#-----------------------------------------------------------------------
SHELL = /bin/shROOT = $(CWPROOT)
LN = ln # this needs to be changed to cp for FAT32 filesystemsAR = arARFLAGS = rvRANLIB = ranlibRANFLAGS =ICHMODLINE = chmod 644 $@MCHMODLINE = chmod 755 $@
POSTLFLAGS = $(XDRLFLAGS)
#-----------------------------------------------------------------------# use both X11 path conventions#-----------------------------------------------------------------------
IX11 = /usr/X11/includeLX11 = /usr/X11/libIMOTIF = /usr/X11R6/includeLMOTIF = /usr/X11R6/lib
LD_LIBRARY_PATH += $(CWPROOT)/lib:${LX11}:${LMOTIF}
#-----------------------------------------------------------------------# Sun/Oracle compilers comment out the Gnu compiler section to use#-----------------------------------------------------------------------
CPP = cpp
CC = cc#OPTC = -g -Xc -xc99OPTC = -O -Xc -xc99#CFLAGS = -I$I $(OPTC) $(CWP_FLAGS) -D_BSD_SOURCE -D_POSIX_SOURCECFLAGS = -I$I $(OPTC) $(CWP_FLAGS) -D_DEFAULT_SOURCE -D_POSIX_SOURCE
FC = f90 -f77OPTF = -gFFLAGS =
C++FLAGS = -I$I $(OPTC) $(CWP_FLAGS)
#-----------------------------------------------------------------------# Gnu compilers by default just because they are the most common#-----------------------------------------------------------------------
CPP = cpp
#CC = clangCC = gcc#OPTC = -g -std=c99 -Wall -pedantic -Wno-long-longOPTC = -O -std=c99 -Wall -pedantic -Wno-long-long#CFLAGS = -I$I $(OPTC) $(CWP_FLAGS) -D_BSD_SOURCE -D_POSIX_SOURCECFLAGS = -I$I $(OPTC) $(CWP_FLAGS) -D_DEFAULT_SOURCE -D_POSIX_SOURCE
FC = gfortranFOPTS = -gFFLAGS = $(FOPTS) -ffixed-line-length-none
C++FLAGS = -I$I $(OPTC) $(CWP_FLAGS)安装Madagascar
sudo apt install unzipsudo apt install -y libavcodec-devcd ~/Software/madagascarunzip src-master.zipcd src-master./configure --prefix=~/Software/madagascar/src-master API=c++,fortran-90sconsmakemake installecho '# madagascarsource ~/Software/madagascar/src-master/env.sh' >>~/.bashrc~/.bashrc