AxiSEMLib

AxiSEMLib is a python library that provides several extensions for the AxiSEM:

And there are several modifications in AxiSEM

Part of the code are adapted from Instaseis, so LGPL license is applied.

Download required packages

  1. Compilers: C++/Fortran compilers which support c++14 (tested on GCC >=7.5, ICC >=18.4.0), cmake >= 3.12, and MPI libraries.

  2. 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
    
  3. 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
      
  4. build AxiSEMLib by using:
    mkdir -p build; cd build;
    cmake .. -DCXX=g++ -DFC=gfortran  -DPYTHON_EXECUTABLE=`which python`
    make -j4; make install 
    

Prepare AxiSEM Mesh

Prepare AxiSEM Solver files

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 AxiSEM simulation

Run it on your cluster.

Transpose the output field.

Set the variables in submit_transpose.sh, then:

bash submit_transpose.sh 

Check examples in test/ !