Import data and metadata from events to SC3

This chapter brings together some of the different topics which have been seen previously. We start with information about an event and will go through the whole process until you can use the SeisComP3 GUIs to work on the traces.

Before starting on a particular event, you should delete your current inventory and bindings. (You may back them up first, by copying seiscomp3/etc/inventory and seiscomp3/etc/key .)

cd ~/seiscomp3/etc
rm inventory/*.xml
seiscomp update-config

The last line is needed to ensure inventory objects are removed from the SC3 database.

Exercise 1 - Central Italy

In the morning of August 24th 2016 there was a large earthquake in central Italy.

  1. Download inventory from all stations with BH streams from networks MN, IV and GE (which had stations in the area) operating on this day. The -y station -q level=response options are used to request inventory which can be imported into SC3.

    $ ./fdsnws_fetch.py -N "MN,IV,GE" -C "BH*" -y station -q level=response \
     -s "2016-08-24T01:30:00Z" -e "2016-08-24T03:00:00Z" -v -o mnivge.xml
    

    Note

    In case of a slow connection or large processing time, the dataset can be downloaded from http://geofon.gfz-potsdam.de/jakarta-2016/mnivge.xml .

  2. Download 90 minutes of all BH streams from networks MN, IV and GE related to the event in central Italy on August 24th 2016 (http://geofon.gfz-potsdam.de/eqinfo/event.php?id=gfz2016qphx).

    $ ./fdsnws_fetch.py -N "MN,IV,GE" -C "BH*" -s "2016-08-24T01:30:00Z" \
    -e "2016-08-24T03:00:00Z" -v -o mnivge.mseed
    
  3. Archive the data by means of scart.

    $ cd ~/seiscomp3/var/lib/archive
    $ scart -vvvv -I ~/mnivge.mseed .
    
  4. Open scolv and configure the recordstream to read the data from your local disk (sdsarchive:///home/sysop/seiscomp3/var/lib/archive). Create an artificial origin using the details of the event from the web page at GEOFON:

    $ scolv -I sdsarchive:///home/sysop/seiscomp3/var/lib/archive
    

Warning

Recordstream at scolv can be configured with arclink or sdsarchive. With arclink, scolv contacts an Arclink server—either your own local one, or at a remote site. With sdsarchive, scolv looks for data in a specially structured local directory (an “SDS archive”) which contains data in a separate file for each day and stream.

Exercise 2 - Myanmar

We now consider another large event later on the same day, in Myanmar. In the above case, the standard EIDA routing service was used. We can also specify a different routing service, for example, one providing an extended routing service that includes the IRIS DMC, by changing the URL with the ‘-u’ option:

  1. Download inventory from all stations from networks II, IU, IC and GE with BH streams operating on August 24th 2016.:

    $ ./fdsnws_fetch.py -u "http://rz-vm258.gfz-potsdam.de/eidaws/routing/1/" \
      -N "II,IC,IU,GE" -C "BH*" -L "00,--" -y station -q level=response \
      -s "2016-08-24T10:30:00Z" -e "2016-08-24T12:00:00Z" -v -o event-20160824.xml
    getting routes from http://rz-vm258.gfz-potsdam.de/eidaws/routing/1/query?n...
    getting data from http://services.iris.edu/fdsnws/station/1/query
    getting data from http://geofon.gfz-potsdam.de/fdsnws/station/1/query
    got 3792016 bytes (application/xml) from http://geofon.gfz-potsdam.de/fdsnw...
    got 4919911 bytes (application/xml) from http://services.iris.edu/fdsnws/st...
    got 7028476 bytes (application/xml) from http://services.iris.edu/fdsnws/s...
    

    Observe that inventory is requested from several data centres, each of which have some part of the requested metadata.

    Note

    In case of a slow connection or large processing time, the dataset can be downloaded from http://geofon.gfz-potsdam.de/training/resources/event-20160824.xml (5.4MB) or http://geofon.gfz-potsdam.de/jakarta-2016/iiiciuge.xml

  2. Download 90 minutes of all BH streams from the same networks from around the time of the event (10:34Z) in Myanmar on August 24th 2016 (http://geofon.gfz-potsdam.de/eqinfo/event.php?id=gfz2016qpzr).

    $ ./fdsnws_fetch.py -u "http://rz-vm258.gfz-potsdam.de/eidaws/routing/1/" \
      -N "II,IC,IU,GE" -C "BH*" -L "00,--" -s "2016-08-24T10:30:00Z" \
      -e "2016-08-24T12:00:00Z" -v -o iiiciuge.mseed
    getting routes from http://rz-vm258.gfz-potsdam.de/eidaws/routing/1/query?...
    getting data from http://services.iris.edu/fdsnws/station/1/query
    getting data from http://geofon.gfz-potsdam.de/fdsnws/station/1/query
    got 22908928 bytes (application/vnd.fdsn.mseed) from http://geofon.gfz-pot...
    got 68535808 bytes (application/vnd.fdsn.mseed) from http://services.iris....
    
  3. Import the metadata using scconfig. Clean your inventory first, as above.

    Then convert the new inventory from FDSN Station XML and import it. This may be done in the GUI using Import on the Inventory tab. You may instead load inventory manually by using import_inv and scinv directly:

    $ ~/seiscomp3/bin/seiscomp exec import_inv help formats
    sc3
    dlsv
    key
    arclink
    nettab
    fdsnxml
    tab
    

    In the present case, we need to specify that our inventory format is fdsnxml:

    $ ~/seiscomp3/bin/seiscomp exec import_inv fdsnxml \
         event-20160413.xml new.xml
    $ mv new.xml ~/seiscomp3/etc/inventory/
    $ ~/seiscomp3/bin/seiscomp exec scinv sync
    WARNING: /home/sysop/seiscomp3/etc/inventory/README ignored: wrong extension
    Parsing /home/sysop/seiscomp3/etc/inventory/new.xml ... done
    Merging inventory ... done
    Synchronising inventory ... done
    Removing remaining objects ... done
    3367 notifiers available
    
    Sending notifiers: 2%
    Sending notifiers: 5%
    [..]
    Sending notifiers: 100%
    Added 151 new key file(s) and no old key file removed
    Sending notifiers: 11%
    

    This reads all inventory files found in ~/seiscomp3/etc/inventory and replaces what is in the database. The warning message may be ignored, or just delete the README file.

  4. Add the data to your own archive by means of scart.

    $ cd ~/seiscomp3/var/lib/archive
    $ scart -vvvv -I ~/iiiciuge.mseed .
    Archive: ./
    Mode: IMPORT
    12:37:34 [debug/RecordStream] trying to open stream file://event-20160413.seed
    GE.APE..BHE 2016-04-13T13:49:58.695Z 2016/GE/APE/BHE.D/GE.APE..BHE.D.2016.104
    GE.APE..BHE 2016-04-13T13:50:25.995Z 2016/GE/APE/BHE.D/GE.APE..BHE.D.2016.104
    [..]
    12:37:42 [info/RecordInput] End of stream detected
    

    Note the final dot as parameter to the scart command, to create the archive in the current directory.

    This may take a few minutes when there are many streams to process. Afterwards you will see that data files have been added in your SC3 archive directory. e.g. ~/seiscomp3/var/lib/archive/2016:

    ls 2016/*/*/*.D/*HZ.D.2016.237 | head
    

    (Note that 24 August is the 237th day of 2016.)

    Take care to only run scart once with a given set of streams. The second time you run it, waveforms will be added to the end of those already existing in your SDS. This may be confusing.

  5. Open scolv and configure the recordstream to read the data from your local disk (sdsarchive:///home/sysop/seiscomp3/var/lib/archive). Create an artificial origin with the details of the event from the web page at GEOFON [1] .

    $ seiscomp check spread scmaster
    $ scolv -I sdsarchive:///home/sysop/seiscomp3/var/lib/archive
    

    Right click on the map in the Location tab to create an origin. Then open the picker. Add all stations up to 60 degrees. You should see traces from many, but not all, stations. (Not all stations will have been operating at the time of the event.)

Other Myanmar events

It is handy to set a few shell variables, and adjust the values of ‘${start}’ and ‘${end}’ below as required. If you are using bash:

.. code-block:: bash
$ serviceurl=”http://rz-vm258.gfz-potsdam.de/eidaws/routing/1/” $ start=”2016-04-13T13:50:00Z” $ end=”2016-04-13T14:50:00”
  • Repeat the above for the 2016-04-13 13:55 M6.9 Myanmar-India Border Region event, GFZ event id gfz2016hhgj [2]

    Use with networks MY, RM, TM, IU, II, GE, 60 minutes, starting at 2016-04-13T13:50:00Z.

  • Now add the IC (New China Digital Seismograph Network) network, which provides delayed data.

    • scart will add this data [4.5MB] as before:

      ./fdsnws_fetch.py -u "${serviceurl}" \
        -N IC -C "BH*" \
        -s "${start}" -e "${end}" -v -o event-20160413_IC.seed
      scart -v -I event-20160413_IC.seed
      
    • adding inventory is easy with scconfig. But if you do this manually, use the merge option to scinv, not sync.

  • There is no MM data (Myanmar National Seismic Network) for 2016-04-13, but there is data for the more recent event. These have stream code HHE, HHN, HHZ. So now add the MM data for 2016-08-24. [32MB]:

    ./fdsnws_fetch.py -u "${serviceurl}" -N MM -C "HH*" \
        -s "${start}" -e "${end}" -v -o event-20160824_MM.seed
    seiscomp exec scart -v -I event-20160824_MM.seed
    

    You can also get IN (National Seismic Network of India) HH streams the same way. [resources/event-20160824_MMIN.seed, 43MB;

    resources/event-20160824_MYRMTM.seed, 23MB.]

  • Repeat the above with networks MY, RM, TM, IC, IU, II, GE, for the event on 3 January 2016. [3]

  • Repeat the above for the event on 11 November 2012. [4]

[1]GFZ event gfz2016qpzr at 2016-08-24 10:34:55.4 UTC; lat: 20.92°N lon: 94.64°E ; depth: 91 km
[2]GFZ event gfz2016hhgj at 2016-04-13 13:55:17.8 UTC; epicenter: 94.83°E 23.08°N; depth: 136 km.
[3]GFZ event gfz2016afks at 2016-01-03 23:05:20.0 UTC; magnitude: 6.7 (Mw); epicenter: 93.58°E 24.78°N; depth: 37 km
[4]GFZ event gfz2012wdpw at 2012-11-11 01:12:40.0 UTC; magnitude: 6.8 (Mw); epicenter: 95.87°E 22.92°N; depth: 15 km