Skip to content

Latest commit

 

History

History
74 lines (63 loc) · 3.55 KB

README.md

File metadata and controls

74 lines (63 loc) · 3.55 KB

single station and event example

Overview

This example demonstrates the two central steps of this code:

  1. the computation of a database of Green functions for a specified region of the Earth.
  2. the computation of a kernel using the previously computed database

Configuration and Execution

  1. Go to the folder examples/global_kernels
  2. copy the file database.inf to my_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!
  1. 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.
  2. check if there were any errors. The subfolders in [mydatabase] should be full of files (be careful, typing ls will take some time)

Kernel Calculation

  1. check that there were no errors and that you can find the binaries: DSM-Kernel/bin/mpiKernelMaker.

Configuration and Execution

  1. copy the file kernel.inf to my_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).
  1. make sure that the output directory that you specified has an empty subdirectoy called log. (e.g. output/log/)
  2. submit the command mpirun -tmi -np 128 ../../bin/mpiKernelMaker < ./kernel.inf
  3. check if there were errors. If not, the output directory should contain files named: eq.Explosion.Z.Z.5471000 up to eq.Explosion.Z.Z.6371000 that 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
  1. check out and run the python script multiplekernel_write_vtk.py kernel.inf. You need the python module pyevtk for this (e.g. pip install pyevtk). The script saves a file kernel.vts in the example directory that can be opened and visualized with paraview.
    ![plot generated by simple_plot_kernels.py](images/paraview.png)