AxiSEMLib is a python library that provides several extensions for the AxiSEM:
- Synthesize accurate seismograms/strain/stress at any point of the earth.
- Teleseismic injection interfaces between AxiSEM, SPECFEM3D and SPECFEM3D-injection
- Reciprocity validation and Instaseis-like Database.
And there are several modifications in AxiSEM
- Fix source location problem
- Dump elastic parameters in discontinuous form.
Part of the code are adapted from Instaseis, so LGPL license is applied.
-
Compilers: C++/Fortran compilers which support c++14 (tested on
GCC >=7.5
,ICC >=18.4.0
),cmake >= 3.12
, and MPI libraries. -
create a new environment with conda:
conda create -n axisem_lib python=3.8
conda activate axisem_lib
conda install numpy scipy numba pyproj tqdm
pip install pybind11-global
- Install several packages:
- parallel-hdf5 using your installed MPI libraries.
- netcdf-fortran, only serial version.
- mpi4py: You can build it by using existing mpi libraries:
MPICC=mpicc pip install mpi4py --no-binary mpi4py
- h5py-mpi using existing
parallel-hdf5
libraries:
CC="mpicc" HDF5_MPI="ON" HDF5_DIR=/path/to/parallel-hdf5 pip install --no-binary=h5py h5py
- build
AxiSEMLib
by using:
mkdir -p build; cd build;
cmake .. -DCXX=g++ -DFC=gfortran -DPYTHON_EXECUTABLE=`which python`
make -j4; make install
-
Go to directory
axisem
and change compiler options inmake_axisem.macros
. Remember to setUSE_NETCDF = true
, setNETCDF_PATH
. -
Go to
MESHER/
, set parameters includingDOMINANT_PERIOD
and number of slices ininparam_mesh
. If you want to use a smoothed version of ak135 model, you can run scripts undersmooth_model/main.py
, and set the parameters like:
BACKGROUND_MODEL external
EXT_MODEL ak135.smooth.bm
- Run mesh generation
./submit.csh
and./movemesh.csh mesh_name
. Then the mesh files will be moved toSOLVER/MESHES
as themesh_name
you set.
There are two files you should edit: inparam_basic
and inparam_advanced
.
In param_basic
you should set SEISMOGRAM_LENGTH
as you required, and you should set ATTENUATION
to false
because the current version only support isotropic elastic model. And you can set some other parameters like SIMULATION_TYPE
. If SIMULATION_TYPE
is not moment
, you should also edit inparam_source
.
In inparam_advanced
, you should set the part of several parameters as below:
# GLL points to save, starting and ending GLL point index
# (overwritten with 0 and npol for dumptype displ_only)
KERNEL_IBEG 0
KERNEL_IEND 4
KERNEL_JBEG 0
KERNEL_JEND 4
KERNEL_WAVEFIELDS true
KERNEL_DUMPTYPE displ_only
KERNEL_SPP 8/16/32 (depend on your dominant frequency)
# you should add this one
# KERNEL dump after DUMP_T0
DUMP_T0 200.
# epicenter distance
KERNEL_COLAT_MIN 25.
KERNEL_COLAT_MAX 100.
# minimal and maximal radius in km for kernel wavefields
# (only for dumptype displ_only)
KERNEL_RMIN 5000.
KERNEL_RMAX 6372.
Then you can prepare your CMTSOLUTION
and STATIONS
Run it on your cluster.
Set the variables in submit_transpose.sh
, then:
bash submit_transpose.sh