Configuring NonLinLoc within SeiscomP3

This document will describe how-to setup NonLinLoc (NLL for short) for use in SeiscomP3 (SC3). Let's first setup the NLL software. NLL and SeismicityViewer should be downloaded from http://alomax.free.fr/nlloc/.This description sets up global localization with the iasp91 earth model. All configuration files can be downloaded from this URL https://www.dropbox.com/sh/83r8nn7abcy18l9/nmYb6gpHDv.

First NLL has to be setup for use with SC3. This is done be following these 5 steps:

  1. create directory layout in sysop's homedirectory ( /home/sysop ):

    nll
    ├── bin      -> NLL binaries (e. g. NLLoc, Grid2Time, Vel2Grid, etc.)
    ├── conf      -> config files for NLL to be used within SC3
    ├── java      -> for Seismicity Viewer
    ├── model     -> output directory for Vel2Grid
    ├── output -> output and input files from SC3, clean up regularly
    ├── scripts -> contains helper script to call Seismicity Viewer
    ├── src      -> NLL source code (can also be placed somewhere else)
    └── time      -> output directory of Grid2Time


  2. Place the NLL configuration files in nll/conf (e. g. iasp91.conf). This is only a part of a complete NLL configuration file. The missing lines will be created by SC3 on the fly. Adjust LOCSIG, change the first number of CONTROL to select output level):
    CONTROL 2 54321

    TRANS GLOBAL
    LOCSIG Kasper D. Fischer (BUG)
    LOCCOM iasp91 model

    LOCPHASEID P Pg Pn
    LOCPHASEID S Sg Sn

    LOCQUAL2ERR 0.2 0.5 1.0 2.0 99999.9
    LOCPHSTAT 9999.0 -1 9999.0 1.0 1.0
    LOCANGLES ANGLES_NO 5
    LOCELEVCORR 1 4.0 2.31
    LOCGAU 0.5 0.0
    LOCGAU2 0.01 0.05 2.0
    LOCGRID 361 181 601 -180.0 -90.0 0.0 1.0 1.0 1.0 PROB_DENSITY SAVE
    LOCMETH EDT_OT_WT_ML 1.0e6 4 50 -1 -1.7 6 -1.0 1
    LOCSEARCH OCT 96 48 6 0.05 50000 10000 4 0

  3. Create travel time tables (*.time.buf, *.time.hdr) by calling Grid2Time and Vel2Grid (or use TauP software package to calculate them (see NLL example for global processing), download the files for IASP91 using this URL https://www.dropbox.com/sh/83r8nn7abcy18l9/nmYb6gpHDv)
  4. Place the helper script sv to start Seismicity Viewer in nll/scripts/sv:
    #!/bin/sh
    FILE=/home/sysop/nll/output/$1.loc.hyp
    java -classpath /home/sysop/nll/java/SeismicityViewer50.jar:/home/sysop/nll/java/shapefile.jar net.alomax.seismicity.Seismicity $FILE
  5. Place SeismicityViewer50.jar in directory nll/java.

Now we are ready to setup NLL within SC3. Just add the following lines to global.cfg

NLLROOT = /home/sysop/nll

# Defines the output path for all native NonLinLoc input and output files.
NonLinLoc.outputPath = ${NLLROOT}/output/

# Since NLL does not support fixing the depth natively so this feature is
# emulated by settings the Z grid very tight around the depth to be fixed. This
# value sets the Z grid spacing.
NonLinLoc.fixedDepthGridSpacing = 0.5

# Define NonLinLoc profiles
NonLinLoc.profiles = iasp91
NonLinLoc.profile.iasp91.earthModelID = iasp91
NonLinLoc.profile.iasp91.tablePath = ${NLLROOT}/time/iasp91
NonLinLoc.profile.iasp91.controlFile = ${NLLROOT}/conf/iasp91.conf

and these lines to scolv.cfg (e. g. in ~/.seiscomp3 or in $SC3DIR$/etc, where $SC3DIR$ is the directory of the SC3 installation):

plugins = ${plugins},locnll

button0 = "Seismicity Viewer"
scripts.script0 = /home/sysop/nll/scripts/sv

NLL and SeismicityViewer should now be available in scolv (make sure to restart scolv).

The next step after testing NLL manually from scolv is to use NLL also for automatic relocation of events. This can be done by adding the following lines to screloc.cfg. Make sure to restart seiscomp3 to enable this.
# Defines the author name used to set creationInfo.author in data model objects.
author = @appname@@@@hostname@

# Defines a list of modules loaded at startup.
plugins = ${plugins},locnll

# Defines the locator to be used such as NonLinLoc.
reloc.locator = NonLinLoc

comments powered by Disqus