README.md
September 11, 2017 ยท View on GitHub
single station and event example
Overview
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
Configuration and Execution
- Go to the folder
examples/global_kernels - copy the file
database.inftomy_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.infto compute the psv database. Select the number of processors that you want to use with the -np parameter (256 in this example).run_database.slurmshows 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
lswill take some time)
Kernel Calculation
- check that there were no errors and that you can find the binaries:
DSM-Kernel/bin/mpiKernelMaker.
Configuration and Execution
- copy the file
kernel.inftomy_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.5471000up toeq.Explosion.Z.Z.6371000that contain a slice of the kernel at one particular depth.
Visualization
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.
basic 3D plotting
- check out and run the python script
multiplekernel_write_vtk.py kernel.inf. You need the python modulepyevtkfor this (e.g.pip install pyevtk). The script saves a filekernel.vtsin the example directory that can be opened and visualized with paraview.