Extension package for ASKI: use SPECFEM3D_GLOBE for solving the seismic forward problem
SPECFEM3D_GLOBE for ASKI, as well as ASKI and some of its components, documentation and examples are available under terms of the GNU General Public License (version 2 or higher) via github. Please find contact addresses there, or visit http://www.rub.de/aski in case you want to get in touch with the authors. If you encounter any problems installing or using the software, it will be helpful to open (or add to) an "issues" topic at the respective repository on gitHub (e.g. here for the ASKI main package)
The main author is Florian Schumacher, Ruhr-University Bochum, Germany.
Read the manual for information on how to set parameters correctly and how to use SPECFEM3D_GLOBE as a forward solver for ASKI.
-
You require an installation of the ASKI main package:
git clone --depth 1 --branch master https://github.com/seismology-RUB/ASKI
The directory created by the git clone command will be referred to below as
ASKI/
-
You need a functioning installation of the SPECFEM3D_GLOBE code, including modifications for usage with ASKI:
- You can either use the modified slim version of SPECFEM3D_GLOBE_V7.0.0 [2015-07-10] that comes with this package in subdirectory specfem3d_globe/
- or use your running installation of SPECFEM3D_GLOBE and extend it for usage with ASKI (see "Extend regular SPECFEM3D" below).
Also refer to the manual, sections 1.3, 1.4.
In both cases, you still must install this package (item "Installation" below).
-
You need basic experience in using the regular SPECFEM3D_GLOBE software!
You should clone the latest version of the master branch of the
gitHub repository
to the same directory where you have cloned the ASKI main package to (in the
ASKI documentation
exemplarily called /your/programs/
). That is, make sure that the git clone command
git clone --depth 1 --branch master https://github.com/seismology-RUB/SPECFEM3D_GLOBE_for_ASKI
creates the directory /your/programs/SPECFEM3D_GLOBE_for_ASKI
(also referred to
below simply as SPECFEM3D_GLOBE_for_ASKI/
) and ASKI was installed to directory
/your/programs/ASKI
(also referred to below simply as ASKI/
) .
You need to compile few more ASKI binaries:
-
in SPECFEM3D_GLOBE_for_ASKI/Makefile, set
COMPILER
appropriately, adjustFFLAGS
if required and set the variablesBLAS
,LAPACK
, just as you did for installing the ASKI main package -
Execute command
make all
from path
SPECFEM3D_GLOBE_for_ASKI/
.
After that, ASKI/bin/
should contain the new binaries.
If you have a regular SPECFEM3D_GLOBE installation which has not significantly different functionality compared with SPECFEM3D_GLOBE release version 7.0.0 [2015-07-10], you can extend it for ASKI by the following steps:
-
install SPECFEM3D_GLOBE on your system and make it run, gain experience in using it (below, the installation path is refered to as
specfem3d_globe/
) -
append content of file SPECFEM3D_GLOBE_for_ASKI/specfem3D_par_ASKI.f90 to file
specfem3d_globe/src/specfem3D/specfem3D_par.F90
-
in
specfem3d_globe/src/specfem3D/prepare_timerun.F90
in subroutineprepare_timerun
:
add the following line at the beginning of the subroutine, after theuse ...
statements:use specfem_for_ASKI_par
add the following line close to the end of the subroutine, before
synchronize_all()
is called:call prepare_timerun_ASKI()
-
in
specfem3d_globe/src/specfem3D/iterate_time.F90
in subroutineiterate_time
:
add the following line at the beginning of the subroutine, after theuse ...
statements:use specfem_for_ASKI_par
add the following line just before the
enddo
of the main time loop:call write_ASKI_output()
-
append content of file SPECFEM3D_GLOBE_for_ASKI/ASKI_external_model.f90 to file
specfem3d_globe/src/meshfem3D/meshfem3D_par.f90
-
in
specfem3d_globe/src/meshfem3D/setup_model.f90
in subroutinesetup_model
:
add the following line at the beginning of the subroutine, after theuse ...
statements:use ASKI_external_model
add the following line just before info output is written to
IMAIN
, after the 3D models are broadcasted:call broadcast_ASKI_external_model(myrank)
-
in
specfem3d_globe/src/meshfem3D/get_model.F90
insubroutine get_model
:
add the following line at the beginning of the subroutine, after theuse ...
statements:use ASKI_external_model
add the following lines just before define elastic parameters in the model (i.e. setting all arrays
rhostore
,kappavstore
,muvstore
, ...) , just after all otherget model
routines:call values_ASKI_external_model(iregion_code,xmesh,ymesh,zmesh,r, & vpv,vph,vsv,vsh,rho,Qmu,Qkappa,eta_aniso,dvp, & c11,c12,c13,c14,c15,c16,c22,c23,c24,c25, & c26,c33,c34,c35,c36,c44,c45,c46,c55,c56,c66)
-
append content of file SPECFEM3D_GLOBE_for_ASKI/parallel_ASKI.f90 to file
specfem3d_globe/src/shared/parallel.f90
-
recompile the relevant SPECFEM3D binaries by executing
make xmeshfem3D xspecfem3D
in directory
specfem3d_globe/
-
in order to produce ASKI output in SPECFEM3D simulations, copy file SPECFEM3D_GLOBE_for_ASKI/Par_file_ASKI to your respective
DATA/
path (which is e.g.specfem3d_globe/EXAMPLES/my_example/DATA/
, orspecfem3d_globe/DATA/
). This file must be adjusted for any specific simulation (just as all other parameter files), refer to the manual on how to use it.
Additionally, you may refer to the manual section 1.4 for details on extending a regular SPECFEM3D code copy for use with ASKI.