Offline Data Playbacks

Playbacks are an important way of testing network configuration (choice of stations and streams used) and the SeisComp settings used for locating events (scautopick and scevent parameters).

Basic configuration using scconfig

For a playback, you need

  1. stations with inventory in the database
  2. station configuration via bindings
  3. recorded waveforms in an SDS archive.

If you already have the first two of these, you may skip ahead to Download waveforms from your local archive below.

Set up SeisComP with CX + GE networks

For this playback we will pick on 100 Hz (HH*) streams from stations in the GE and CX networks. Some of these stations use location code “10” for HH streams. The SC3 system needs to know which stream to work with for each station. In scconfig go to “Bindings”. Create profiles in global:

  • global/streams
  • global/streams_10

Set detecStream=HH in both. Leave detecLocid empty in the first, and set it to “10” in the second. Bind both profiles to networks CX and GE.

Next we need to configure the picker. We start with a default configuration, which is suitable for teleseismic monitoring.

Add another profile:

  • scautopick/teleseismic

No further configuration, just use the defaults. Bind the scautopick/teleseismic profile to networks CX and GE, save the configuration and update the configuration in the database (in scconfig: System -> Update configuration)

At this point you are ready to run the playback as described below.

Download waveforms from your local archive

Create a sorted MiniSEED file from data you already have in your local data archive under $HOME/seiscomp3/var/lib/archive

$HOME/seiscomp3/bin/seiscomp exec scart -dsE -t
  "2015-02-22 00:00~2015-02-22 23:59:59.999" $HOME/seiscomp3/var/lib/archive >
  sorted.mseed

The times here are the start and end times to be included in the sorted mini-SEED file, called sorted.mseed here. Note the time format has a blank space, not a ‘T’, and a tilde (‘~’) separates the start and end times.

There are helpful options to scart which allow you to restrict the networks/channels included.

You will have to remove stations which are not present in your inventory, or add them to your inventory.

For the Myanmar events:

Run playback script

The playback.sh script is available in the SC3 wiki:

Wiki page: http://www.seiscomp3.org/wiki/recipes/playbacks/offline/messaging

Direct download: http://www.seiscomp3.org/raw-attachment/wiki/recipes/playbacks/offline/messaging/playback.sh

Before running the playback script, you should (but technically don’t have to) disable database writes in scmaster. Stop the SC3 system and edit (create) the file $HOME/.seiscomp3/scmaster.cfg as follows:

plugins = ""

This tells scmaster not to load any database back ends (normally mysql) and, therefore, no database writes will take place. This has two advantages:

  • there is no bottleneck due to database I/O latency,
  • you can run the playback as many times as you like without objects colliding in the database.

Both are important considerations for an offline playback. Make sure that the script is executable (chmod +x playback.sh), and that scmaster is running (~/seiscomp3/bin/seiscomp start spread scmaster).

To run the playback, invoke the script:

$HOME/seiscomp3/bin/seiscomp exec ./playback.sh sorted.mseed out.xml

The results are written to out.xml. This should take no more than a few seconds.

To visualize the results, you need to have inventory information available, too. Dump it from your local SC3 installation using:

$HOME/seiscomp3/bin/seiscomp exec scxmldump -d mysql://sysop:sysop@localhost/seiscomp3
  --debug --inventory -o inventory.xml

Then you can invoke scolv:

$HOME/seiscomp3/bin/seiscomp exec scolv -I "sdsarchive://$HOME/arcSULU" -u ""
  --inventory-db inventory.xml  --offline --debug

And from there you select from the menu File...Open and load out.xml

Change some settings for regional monitoring

After you are done with the first playback using teleseismic parameters, you may want to change some parameters.

Before doing so, remember that for the playback we previously deactivated database writes in scmaster. If we continue with this setting, the changes in the configuration we are going to make would have no effect, because scmaster would not write them to database. Therefore, we now need to reverse that setting by commenting out this line in $HOME/.seiscomp3/scmaster.cfg:

#plugins = ""

Stop the SeisComP system and restart it for scmaster to adopt the new setting. Then continue with the configuration as follows.

We cannot show all possibilities here, but we will perform a simple configuration for a local to near-regional monitoring in northern Chile using the CX network. For regional monitoring and small earthquakes the preferred filtering is not around 1 Hz as for teleseismic monitoring, but using higher frequencies. Let’s say, frequency band 2-8 Hz (you may want to change that for your network). To do that we create a new profile scautopick/regional in which we adopt all default settings except detecFilter, which we change to

RMHP(10)>>ITAPER(10)>>BW(4,2,8)>>STALTA(1,20)

This defines a filter chain used in the picking. RMHP and ITAPER are there to properly initialize the stream. BW is a Butterworth bandpass; we choose 4th order from 2-8 Hz. STALTA is a pretty normal STA/LTA filter using an STA window of 1 s and LTA window of 20 s.

Save configuration and update configuration. Re-run playback as described. This should now have produces many more events than before, because of the improved filter settings.

Save results to SC3 database permanently - and work with them

After playing around with different settings and discovering what works best for your network, you may want to process large amounts of data. You probably want to store the (hopefully!) many events to a SC3 database for further use.

Save event informations from XML file to SC3 database:

scdb -d mysql://sysop:sysop@localhost/seiscomp3 -i out.xml

Once the events are in the database, you can use tools like scevtls, scxmldump or scbulletin.

evt=gfz2015drlk
scbulletin -d mysql://sysop:sysop@localhost/seiscomp3 -E $evt -3

Dump event from database to XML:

evt=gfz2015drlk
scxmldump -d mysql://sysop:sysop@localhost/seiscomp3 -E $evt --with-picks
  --with-amplitudes --with-focal-mechanisms --with-magnitudes --all-magnitudes
  --formatted --output $evt.xml

Convert to QuakeML:

sccnv -f -i $evt.xml -o qml1.2rt:$evt.quakeml