This example demonstrates the two central steps of this code:
- the computation of a database of Green functions for a specified region of the Earth.
- the computation of a kernel using the previously computed database
- Go to the folder
examples/global_kernels
- copy the file
database.inf
tomy_database.inf
. In this file:
- adjust the paths (first path in the file with the path of your DSM-Kernel installation)
- adjust the output directory path (second), where the database is stored. The database needs some disk space. Make sure to have ~2-3 Gb free.
- you can adjust the remaining parameters that control e.g. frequency range, domain size and sampling of the database. In particular chose the source depth for which you want to compute the database!
- submit the command
mpirun -np 256 ../../bin/mpiSGTpsv < ./database.inf
to compute the psv database. Select the number of processors that you want to use with the -np parameter (256 in this example).run_database.slurm
shows an example script that submits this process to the IPGP cluster malbec. - check if there were any errors. The subfolders in [mydatabase] should
be full of files (be careful, typing
ls
will take some time)
- check that there were no errors and that you can find the binaries:
DSM-Kernel/bin/mpiKernelMaker
.
- copy the file
kernel.inf
tomy_kernel.inf
. In this file:
- adjust the directory
[xy]
to point to your DSM-Kernels installation - check out the other parameters that are used to control the source, filters
and other parameters. The time window controls for which phase you compute
the sensitivity kernel. The time window, source depth and source-station distance
have to correspond or be within the ranges specified
in the database configuration file (
database.inf
).
- make sure that the output directory that you specified has an empty subdirectoy
called
log
. (e.g. output/log/) - submit the command
mpirun -tmi -np 128 ../../bin/mpiKernelMaker < ./kernel.inf
- check if there were errors. If not, the output directory should contain
files named:
eq.Explosion.Z.Z.5471000
up toeq.Explosion.Z.Z.6371000
that contain a slice of the kernel at one particular depth.
This program provides several visualisation tools. the basic visualisation
tools are useful to examine the datastructure of the output files and how
they can be read. Note that python3.5
with numpy
and matplotlib
is required
to run these scripts. For more advanced plotting, you can convert the kernels
to vtk files to view and plot them e.g. with paraview
or mayaview
.
- check out and run the python script
multiplekernel_write_vtk.py kernel.inf
. You need the python modulepyevtk
for this (e.g.pip install pyevtk
). The script saves a filekernel.vts
in the example directory that can be opened and visualized with paraview.