Geofon

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

GEOFON Training Material

Release 0.1a1

GEOFON Team

September 05, 2016


CONTENTS

1 Introduction 1

2 Preparatory homework 3
2.1 Option 1: VirtualBox installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Option 2: SeisComP3 installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Configuring the Real Time Acquisition with scconfig 7


3.1 Download stations metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Import the inventory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.3 Configure “Bindings” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.4 Save the configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.5 Start the GUIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4 Commonly used metadata formats with SC3 11


4.1 SC3 inventory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 The data model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.3 Arclink XML example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.4 SCXML example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.5 Importing metadata to SC3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.6 Things to avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.7 How to get inventory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5 Import a miniSEED file in SDS local archive 17


5.1 Download waveforms from a data center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2 Download waveforms distributed on many data centers . . . . . . . . . . . . . . . . . . . . . . . 18
5.3 Create an SDS structure for your data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

6 Exchange data and metadata with others 21


6.1 Check Arclink installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.2 Configure FDSN web services in your SC3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.3 Send requests to the web services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

7 Using fdsnws_fetch 23
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
7.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
7.3 Usage examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

8 Import data and metadata from events to SC3 25


8.1 Exercise 1 - Central Italy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
8.2 Exercise 2 - Myanmar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

9 Download of Resources 27

10 Additional reading and useful links 29

i
ii
CHAPTER

ONE

INTRODUCTION

GEOFON operates jointly with many partner institutions a global broadband seismic network with focus on Eu-
roMed and Indian Ocean regions. It consists presently of 78 high quality stations. Most data is acquired in
real-time.
GEOFON also operates a comprehensive data archive for GFZ and partner networks as well as for temporary
deployments. Most data is open for public access, also real-time data feeds, if available.
GEOFON operates a global earthquake monitoring system using data from GEOFON and partner networks. It
publishes most timely earthquake information, first automatic solutions are mostly manually revised later.

1
GEOFON Training Material

2 Chapter 1. Introduction
CHAPTER

TWO

PREPARATORY HOMEWORK

The first thing that you should have to start with the training is a version of SeisComP3 running on your ma-
chine. To do this you are presented with two options. You can use an image from a virtual machine provided by
GEOFON, which already has SeisComP3 installed on it (but not configured), or you deploy it on your computer.
Select only one of the two options presented in this chapter.

Option 1: VirtualBox installation

First, download and install VirtualBox if you do not have a native Linux on your laptop (see the chapter Download
of Resources).
Then, install the VirtualBox image with SC3 preinstalled.
1. Download the file from http://geofon.gfz-potsdam.de/jakarta-2016/SC3-Trieste.ova . The file has a size of
ca. 3.9 GB. (MD5 sum: a4ccdbf9b78b497ac8a75b10e8875a85 SC3-Trieste.ova)
2. Open the VirtualBox program
3. Go to the menu File -> Import appliance
4. Select the .ova file downloaded
At this stage you should have a machine loaded into the machine list of the VirtualBox program.
In the virtual machine that you received all the passwords for the accounts are “sysop”. So the password for
“sysop” is “sysop” and the password for “root” is “sysop”. If the system becomes slow, feel free to upgrade the
memory size or to add another disk to the VM.

Note: The keyboard layout was configured to be “English”. To change it to your preferred language: open the
Dash, type “keyboard”, open “Text entry”, add the layout you want and move it to the top.

Option 2: SeisComP3 installation

Warning: These instructions have been tested on (L)Ubuntu 16.04.

Get your native or virtual (L)Ubuntu 16.04 ready

• Start the (virtual) machine and open your home directory


• Add a new user (not mandatory, you can install under an existing user directory. Recommended to allow an
easy cleanup of the system later simply by removing the new user if needed)

3
GEOFON Training Material

sysop@ubuntu:~$ sudo adduser sysop


sysop@ubuntu:~$ sudo addgroup admin
sysop@ubuntu:~$ sudo usermod -a -G admin,adm,audio sysop

• Check the size and the architecture:


sysop@ubuntu:~$ df -h
sysop@ubuntu:~$ uname -m

Download SeisComP3 binary package, maps and documentation

• Download the SeisComp3 binary package taking into account your Linux distribution and the architecture.
– Ubuntu 16.04 (and Mint 18) 64 bit
– Ubuntu 16.04 (and Mint 18) 32 bit
– Ubuntu 14.04 (and Mint 17) 64 bit
– Ubuntu 14.04 (and Mint 17) 32 bit
• Alternatively you can download the SeisComp3 binary package from this link (here you will have to fill in
the form on the right side of the page the first time you attempt to download a file).
• Download the SeisComp3 maps
• Download the SeisComp3 documentation
• Untar the seiscomp* files (binary package, maps and documentation) you find in your home directory
sysop@ubuntu:~$ tar xzf seiscomp3-jakarta-2016.161.01-ubuntu16.04-x86_64.tar.gz
sysop@ubuntu:~$ tar xzf seiscomp3-seattle-maps.tar.gz
sysop@ubuntu:~$ tar xzf seiscomp3-jakarta-2016.062-doc.tar.gz

Download and configure the SeisComP3 License file

• Create a directory with the name “license”


sysop@ubuntu:~$ mkdir license
sysop@ubuntu:~$ cd license

• Download and save the license files to the “license” directory


sysop@ubuntu:~$ tar -xzf GFZ-license.tar.gz
sysop@ubuntu:~$ cd ~
sysop@ubuntu:~$ mkdir -p .seiscomp3/key
sysop@ubuntu:~$ cp license/* .seiscomp3/key

Install all dependencies needed and prepare the environment

• For Ubuntu 16.04 and Mint 18:


sysop@ubuntu:~$ sudo apt-get update
sysop@ubuntu:~$ sudo apt-get install libxml2 libboost-filesystem1.58.0
libboost-iostreams1.58.0 libboost-thread1.58.0 libboost-program-options1.58.0
libboost-regex1.58.0 libboost-signals1.58.0 libboost-system1.58.0 libssl1.0.0
libncurses5 libmysqlclient20 libpython2.7 python-m2crypto mysql-server
mysql-client libqtgui4 libqt4-xml

• For Ubuntu 12.04 and 14.04:

4 Chapter 2. Preparatory homework


GEOFON Training Material

sysop@ubuntu:~$ seiscomp3/bin/seiscomp install-deps base mysql-server gui

• For Mint 17:


sysop@ubuntu:~$ sudo apt-get update
sysop@ubuntu:~$ sudo apt-get install libxml2 libboost-filesystem1.54.0
libboost-iostreams1.54.0 libboost-thread1.54.0 libboost-program-options1.54.0
libboost-regex1.54.0 libboost-signals1.54.0 libboost-system1.54.0 libssl0.9.8
libncurses5 libmysqlclient18 libpython2.7 python-m2crypto mysql-server
mysql-client libqtgui4 libqt4-xml

• Print the environment variables and copy them to the .bashrc


sysop@ubuntu:~$ seiscomp3/bin/seiscomp print env
export SEISCOMP_ROOT=/home/sysop/seiscomp3
export PATH=/home/sysop/seiscomp3/bin:$PATH
export LD_LIBRARY_PATH=/home/sysop/seiscomp3/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/home/sysop/seiscomp3/lib/python:$PYTHONPATH
export MANPATH=/home/sysop/seiscomp3/share/man:$MANPATH
export LC_ALL=C
source /home/sysop/seiscomp3/share/shell-completion/seiscomp.bash

sysop@ubuntu:~$ vi .bashrc

• Reload the contents of .bashrc on your current environment


sysop@ubuntu:~$ source ~/.bashrc

The MySQL SeisComP3 configuration

• Create and add the following lines to the mysql seiscomp3.cnf file.
sysop@ubuntu:~$ sudo vi /etc/mysql/conf.d/seiscomp3.cnf
[mysqld]
innodb_buffer_pool_size = 64M
innodb_flush_log_at_trx_commit = 2

• Restart mysql.
sysop@ubuntu:~$ sudo service mysql restart
mysql stop/waiting
mysql start/running, process 5522

SeisComP3 setup and start Graphical User Interfaces (GUIs)

• Run seiscomp setup and enter your preferred IDs and password. For the other fields, you can always accept
the default values.
sysop@ubuntu:~$ seiscomp setup

• Enable at least the following modules from the command line, can be done also from the scconfig GUI
sysop@ubuntu:~$ seiscomp enable seedlink slarchive arclink scautopick scautoloc
scamp scmag scevent fdsnws

• Start the scconfig GUI


sysop@ubuntu:~$ scconfig

If the application runs without problems you have correctly installed SeisComP3. Congratulations!

2.2. Option 2: SeisComP3 installation 5


GEOFON Training Material

6 Chapter 2. Preparatory homework


CHAPTER

THREE

CONFIGURING THE REAL TIME ACQUISITION WITH SCCONFIG

Download stations metadata

Download a GE inventory.xml or dataless from WebDC3 to request GEOFON (GE) stations.


• Using the “Explore stations” tab select the GE network, all stations and BH streams

• Move to the “Submit request” tab and select Metadata (Inventory XML). Add your username and click on
the “Submit” button.

7
GEOFON Training Material

• Move to the “Download data” tab and click on [+] to see more information about the request. Click on
“Download Volume” to save the data locally. Save the file as GE_BH_inventory.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/GE-inventory.xml .

8 Chapter 3. Configuring the Real Time Acquisition with scconfig


GEOFON Training Material

Import the inventory

Start “scconfig” from a terminal select the “inventory” icon on the left side bar.

• Click on Import, select Arclink format (for inventory.xml) or any format according to what you would like
to import.
• Provide the path to your file in the “Source” field.
• Repeat the last two points you need to add additional metadata (remember to select the right format).
• Press the “Sync Keys” button.

Configure “Bindings”

Select the “Bindings” icon on the left side bar


• Create a global profile named “BH” by clicking with the right button on “global” in the top/right panel.
Double click on it and set BH as detectStream and empty location code as detecLocID information.

• If needed you may create also an “HH” global profile.


• Create a scautopick profile named “default” (no changes necessary).
• Create a seedlink profile named “geofon”. Double click on the profile add a chain source with the green
plus button on the left (no other changes necessary).

3.2. Import the inventory 9


GEOFON Training Material

• If you want to archive data, create a slarchive profile and name it “default”
(no other changes necessary).
• Drag and drop all profiles from the right side to the network icon on the left side (you may do that also at
the station level).
• Press CTRL+S

Save the configuration

• Goto the system tab and press ESC (to deselect everything)
– Click on Update configuration
– Press Seiscomp start to start acquiring data from the already configured stations.

Start the GUIs

• Open scmv to see a map view of the configured stations.


• Open scrttv to see the incoming real-time streams.
If you see colored triangles and traces incoming it means sthat have configured your system properly.
With this last step the basic setup is considered to be finished.

10 Chapter 3. Configuring the Real Time Acquisition with scconfig


CHAPTER

FOUR

COMMONLY USED METADATA FORMATS WITH SC3

In the previous chapter we have imported metadata from a data centre to configure the real-time acquisition of the
GEOFON network. Now we will introduce the different metadata formats that you can use.
Today there are three usual formats to store metadata:
* Dataless SEED
* FDSN StationXML
* SC3 inventory

SC3 inventory

Due to historical reasons, there are two (equivalent) XML representations of the SC3 inventory: Arclink XML
(which pre-dates SC3) and SC3 XML (SCXML).
When importing metadata into an SC3 system, using either of those guarantees 100% lossless conversion.

The data model

Fig. 4.1: Click on this link to open the image and be able to zoom in.

11
GEOFON Training Material

Arclink XML example

An Arclink representation of the inventory:


<inventory xmlns="http://geofon.gfz-potsdam.de/ns/Inventory/1.0/">
<network archive="GFZ" code="CX" description="IPOC Seismic Network (Integrated Plate
boundary Observatory Chile)" end="" institutions="GFZ/IPGP" netClass="p"
publicID="Network#20130513163602.210354.2" region="Northern Chile" restricted="false"
shared="true" start="1980-01-01T00:00:00.0000Z" type="VBB">
<remark/>
<station affiliation="IPOC" archive="GFZ" archiveNetworkCode="CX" code="PB06"
country="Chile" description="IPOC Station PB06, Chile" elevation="1440.0" end=""
latitude="-22.7058" longitude="-69.57188" place="PB06"
publicID="Station#20130513163602.244857.24" restricted="false" shared="true"
start="2007-03-04T00:00:00.0000Z" type="">
<remark/>
<sensorLocation code="" elevation="1440.0" end="" latitude="-22.7058"
longitude="-69.57188" publicID="SensorLocation#20130513163602.244886.25"
start="2007-03-04T00:00:00.0000Z">
<stream azimuth="0.0" clockSerialNumber="" code="LLZ"
datalogger="Datalogger#20130513163602.212591.7" dataloggerChannel="0"
dataloggerSerialNumber="1843" depth="0.0" dip="-90.0" end="" flags="GC"
format="Steim2" gain="427566.942" gainFrequency="1.0" gainUnit="M/S**2"
restricted="false" sampleRateDenominator="1" sampleRateNumerator="1"
sensor="Sensor#20130513163602.219932.14" sensorChannel="0"
sensorSerialNumber="2555" shared="true" start="2007-03-04T00:00:00.0000Z" />
</sensorLocation>
</station>
</network>
</inventory>

SCXML example

A SC3 representation of inventory:


<seiscomp xmlns="http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.7" version="0.7">
<Inventory>
<network publicID="Network#20130513163602.210354.2" code="CX">
<start>1980-01-01T00:00:00.0000Z</start>
<description>IPOC Seismic Network (Integrated Plate boundary Observatory Chile)
</description>
<institutions>GFZ/IPGP</institutions>
<region>Northern Chile</region>
<type>VBB</type>
<netClass>p</netClass>
<archive>GFZ</archive>
<restricted>false</restricted>
<shared>true</shared>
<remark/>
<station publicID="Station#20130513163602.244857.24" code="PB06"
archiveNetworkCode="CX">
<start>2007-03-04T00:00:00.0000Z</start>
<description>IPOC Station PB06, Chile</description>
<latitude>-22.7058</latitude>
<longitude>-69.57188</longitude>
<elevation>1440</elevation>
<place>PB06</place>
<country>Chile</country>
<affiliation>IPOC</affiliation>
<archive>GFZ</archive>

12 Chapter 4. Commonly used metadata formats with SC3


GEOFON Training Material

<restricted>false</restricted>
<shared>true</shared>
<remark/>
<sensorLocation publicID="SensorLocation#20130513163602.244886.25" code="">
<start>2007-03-04T00:00:00.0000Z</start>
<latitude>-22.7058</latitude>
<longitude>-69.57188</longitude>
<elevation>1440</elevation>
<stream code="LLZ" datalogger="Datalogger#20130513163602.212591.7"
sensor="Sensor#20130513163602.219932.14">
<start>2007-03-04T00:00:00.0000Z</start>
<dataloggerSerialNumber>1843</dataloggerSerialNumber>
<dataloggerChannel>0</dataloggerChannel>
<sensorSerialNumber>2555</sensorSerialNumber>
<sensorChannel>0</sensorChannel>
<sampleRateNumerator>1</sampleRateNumerator>
<sampleRateDenominator>1</sampleRateDenominator>
<depth>0</depth>
<azimuth>0</azimuth>
<dip>-90</dip>
<gain>427566.942</gain>
<gainFrequency>1</gainFrequency>
<gainUnit>M/S**2</gainUnit>
<format>Steim2</format>
<flags>GC</flags>
<restricted>false</restricted>
<shared>true</shared>
</stream>
</sensorLocation>
</station>
</network>
</Inventory>
</seiscomp>

Importing metadata to SC3

• From SEED dataless volume:


dlsv2inv -f mynetwork.seed > etc/inventory/mynetwork.xml

• From FDSN StationXML:


fdsnxml2inv -f station.xml > etc/inventory/mynetwork.xml

• From SCXML with filtering:


invextr -f --chans 'NE.STA.*' mynetwork.xml > etc/inventory/mynetwork.xml

• From Arclink-XML:
arclink2inv -f inventory.xml >etc/inventory/mynetwork.xml

Alternatively, the import function of the GUI can be used.

Things to avoid

• Requesting in dataless format from Arclink and importing with dlsv2inv (request inventory and use ar-
clink2inv instead).

4.5. Importing metadata to SC3 13


GEOFON Training Material

• Converting XML to dataless, editing with PDCC, converting dataless back to XML (use invextr or SMP
instead).

How to get inventory

We will request the inventory from all stations belonging to network GE.

Option 1: Using FDSN web services

The FDSN web services are the new standard proposed by the FDSN and are being deployed at almost every data
centre. One of them is called the Station WS and is the service to contact to get all information related to stations,
sensors, responses, etc.
To get data from the Station WS you can use any web client (browser or command line). For instance, the wget
command. The file you will receive will be in StationXML format.
$ wget "http://geofon.gfz-potsdam.de/fdsnws/station/1/query?net=GE&level=response" -O ge.xml

Option 2: Using arclink_fetch

arclink_fetch is a command-line client which allows you to send requests (e.g. data, inventory) to Arclink servers.
The inventory information you receive will *be in *Inventory XML format.
$ echo "1980,1,1,0,0,0 2030,1,1,0,0,0 GE * * *" | arclink_fetch
-u andres@gfz-potsdam.de -k inv -vvv -o ge.xml

Option 3: Using WebDC3

WebDC3 is a graphical interface which allows you not only to send requests to Arclink servers, but also to explore
available stations and query event catalogs from different data centres among other possibilities.
You can find detailed information about WebDC3 in the on-line documentation at
http://webdc3.readthedocs.io/en/latest/
• Go to http://eida.gfz-potsdam.de/webdc3 with a browser.
• Click on “Explore events” and select a date interval from 24-08-2016 to 25-08-2016 and a minimum mag-
nitude of 6.
• Shift+click on the map to select a square around Europe and then click on “Search”.
• Only one event in Central Italy should appear in the list on the right part of the page.
• Click on “Explore stations” and move the slider to select only the year 2016 and only “Public permanent
nets” on the Network type list.
• Select “by Events” on the “Stations” section to select stations based on their distance related to the selected
event.
• Select stations only to a distance from the event less than 15 degrees.
• Click on the BH entry in the list of streams and then “Search”.
• Between 600 and 700 stations should appear on the list below the event.
• Go to the third tab, named “Submit request”.
• Click on “Absolute Mode” for the “Time Window Selection” and select time window from 24-08-2016 to
25-08-2016.
• In the “Request type” section, click on “Metadata (Inventory XML)”

14 Chapter 4. Commonly used metadata formats with SC3


GEOFON Training Material

• Enter your email address and click “Review”.


• If everything looks correctly click on “Submit”.
• Go to the fourth tab, called “Download Data”.
• In the “Recent requests” block, click on your request and check its status periodically with “Refresh”
• Display the logs by clicking on the “plus (+) character.
• When it’s ready, click to download the data.

Option 4: Creating your own inventory

If you would like to create you own inventory you could try to use some tools like SMP, which is an online tool
which you can use at https://test.gempa.de/smp/ (beta version). Previously you will need to create an account at
https://seismo.gempa.de/smp/ .

4.7. How to get inventory 15


GEOFON Training Material

16 Chapter 4. Commonly used metadata formats with SC3


CHAPTER

FIVE

IMPORT A MINISEED FILE IN SDS LOCAL ARCHIVE

Download waveforms from a data center

Some methods to download data are suitable only if data are hosted only at one data centre. For the next examples,
we need to know in advance that the data has been archived at GEOFON.

FDSN Dataselect web service using GET method

You can use a browser or the “wget” command line tool to download data from HH channels of station LVC in
network GE with location code 10 on a particular time frame.
sysop@SC3-VirtualBox:~$ wget "http://geofon.gfz-potsdam.de/fdsnws/dataselect/1/query?
starttime=2015-02-22T02:30:00&endtime=2015-02-22T07:30:00&net=GE&sta=LVC&loc=10&
cha=HH*" -O GE.mseed

And with another command you can download data from HH Channels of all stations in network CX for the same
time window.
sysop@SC3-VirtualBox:~$ wget "http://geofon.gfz-potsdam.de/fdsnws/dataselect/1/query?
starttime=2015-02-22T02:30:00&endtime=2015-02-22T07:30:00&net=CX&cha=HH*"
-O CX.mseed

FDSN Dataselect web service using POST method

You can get the same data by creating a plain text file specifying the streams and time windows that you need with
the following format in every line:
NN SS LL CC STARTTIME ENDTIME
Here, NN SS LL CC are the network, station, location and channel respectively and STARTTIME and ENDTIME
are in ISO8601 format (YYYY-MM-DDTHH:MM:SS).
sysop@SC3-VirtualBox:~$ cat post-req.txt
CX * * HH* 2015-02-22T02:30:00 2015-02-22T07:30:00
GE LVC 10 HH* 2015-02-22T02:30:00 2015-02-22T07:30:00
sysop@SC3-VirtualBox:~$ wget --post-file=post-req.txt
"http://geofon.gfz-potsdam.de/fdsnws/dataselect/1/query" -O allData.mseed
--2015-05-11 11:16:12-- http://geofon.gfz-potsdam.de/fdsnws/dataselect/1/query
Auflösen des Hostnamen »geofon.gfz-potsdam.de (geofon.gfz-potsdam.de)« 139.17.3.177
Verbindungsaufbau zu geofon.gfz-potsdam.de (geofon.gfz-potsdam.de)|139.17.3.177|:80
verbunden.
HTTP-Anforderung gesendet, warte auf Antwort... 200 OK
Länge: nicht spezifiziert [application/vnd.fdsn.mseed]
In »»allData.mseed«« speichern.
[ <=>
2015-05-11 11:16:59 (1,87 MB/s) - »allData.mseed« gespeichert [91132928]

17
GEOFON Training Material

Note: A complete specification of the FDSN web services can be found at


https://www.fdsn.org/webservices/FDSN-WS-Specifications-1.1.pdf

Download waveforms distributed on many data centers

For more complex requests, where data is distributed in many data centres, you will need a client to find where
the data are hosted and perform the request to the different data centres.

Arclink_fetch

As we mentioned in the past chapters, arclink_fetch is a command line client which allows you to retrieve data
and metadata from all data centres taking part of EIDA.
You will need to specify what you want to request in a format like this:
$ cat req.txt
2015,2,22,2,30,0 2015,2,22,7,30,0 CX * HH* *
2015,2,22,2,30,0 2015,2,22,7,30,0 GE LVC HH* 10

$ cat req.txt | arclink_fetch -u yourname@domain.com -vvv -o gecx.mseed

Note: More detailed information about arclink_fetch can be found at


https://www.seiscomp3.org/wiki/doc/applications/arclink_fetch .

The WebDC3 portal

In this example, we will download one hour of waveforms from selected stations for a particular time window.
Namely, BH channels from all stations in GE and the ones with a distance of less than 15° from an event on August
24th 2016 in Italy.
• Go to http://eida.gfz-potsdam.de/webdc3 with a browser.
• Click on “Explore events” and select a date interval from 24-08-2016 to 25-08-2016 and a minimum mag-
nitude of 6.
• Shift+click on the map to select a square around Europe and then click on “Search”.
• Only one event in Central Italy should appear in the list on the right part of the page.
• Click on “Explore stations” and move the slider to select only the year 2016 and only “Public permanent
nets” on the Network type list.
• Select “by Events” on the “Stations” section to select stations based on their distance related to the selected
event.
• Select stations only to a distance from the event less than 15 degrees.
• Click on the BH entry in the list of streams and then “Search”.
• Between 600 and 700 stations should appear on the list below the event.
• Go to the third tab, named “Submit request”.
• Select “Relative Mode” to define time windows relative to the estimated P arrival.
• Enter “10” in Start time and “50” in End time to request a time window of one hour around the event.
• In the “Request type” section, click on “Waveform (Mini-SEED)”

18 Chapter 5. Import a miniSEED file in SDS local archive


GEOFON Training Material

• Enter your email address and click “Review”.


• Please note that the time window at every line will be different, as its calculation is based on the distance
from the event.
• If everything looks correctly click on “Submit”.
• Go to the fourth tab, called “Download Data”.
• In the “Recent requests” block, click on your request and check its status periodically with “Refresh”
• You can see the logs by clicking on the plus (+) character.
• When it’s ready, download the data. Please, note that there will be one link (Download Volume) for each
data centre providing data. You will need to click on all of them.

Create an SDS structure for your data

Warning: For the next two examples it is important to include the dot as a last parameter to the scart
command.

Create a directory for the archive


sysop@SC3-VirtualBox:~$ mkdir -p ~/seiscomp3/var/lib/archive
sysop@SC3-VirtualBox:~$ cd ~/seiscomp3/var/lib/archive

And archive all the files which you downloaded:


sysop@SC3-VirtualBox:~/seiscomp3/var/lib/archive$ scart -vvvv -I ~/Package-X.mseed .

Alternatively, you can do it for the file with all the preloaded data.
sysop@SC3-VirtualBox:~/seiscomp3/var/lib/archive$ scart -vvvv -I ~/Downloads/data.mseed .

Import the metadata for your stations

• Open scconfig and click on “Inventory”.


• Select “Import” and browse to the file with the inventory (~/Downloads/inventory.xml) and select the format
“arclink”.
• Click on OK, wait a couple of seconds, check that the process was successful and close the modal window.
• Go to “System” (second icon in the left column), click on “Update configuration” and restart SeisComP3
(Stop and Start buttons).

5.3. Create an SDS structure for your data 19


GEOFON Training Material

20 Chapter 5. Import a miniSEED file in SDS local archive


CHAPTER

SIX

EXCHANGE DATA AND METADATA WITH OTHERS

Check Arclink installation

Connect to your Arclink server through telnet and perform a request with the following commands:
telnet localhost 18001
hello
user you@yourdomain
request waveform
2016,8,24,2,0,0 2016,8,24,2,10,0 GE UPC BHZ .
END

You will receive a number as a response from the last command. Let’s suppose that it’s 333. Then, continue with
the following commands.
status 333

Keep asking for the status until you can see that it’s OK. Next to the status, the final size of your request will be
shown, in case you want to download it with the following command:
download 333

Configure FDSN web services in your SC3

• Open scconfig.
• Click on the “Modules” icon and go to the “global” module.
• Look for the “database” section and complete the following:
type=mysql
parameters=sysop:sysop@localhost/seiscomp3

• Press Ctrl+S to save the configuration.


• Go to the “fdsnws” module in the tree on the left. Then, go to the “global” section and the “recordstream”
subsection and complete with the following:
service=sdsarchive
source=/home/sysop/seiscomp3/var/lib/archive

• Press Ctrl+S to save the configuration.


• Click to the “System” icon, click on “Update configuration” and restart SeisComP3 (Stop and Start buttons).

21
GEOFON Training Material

Send requests to the web services

Metadata

• Open a browser and go to http://localhost:8080/fdsnws/station/1/query?level=station


Basically, what you are requesting here is a list of all the stations configured in your system using the SeisComP3
implementation of the FDSN web services.
You should see the whole GE network and the stations around the event in Italy. With this test you verify that the
inventory is apparently correct AND that you are able to share this data with others via FDSN web services, in the
same way as data centres do.

Waveforms

• You can do the same for the waveforms that you have imported.
• In the browser go to http://localhost:8080/fdsnws/dataselect/1/query?starttime=2016-08-24T02:00:00&
endtime=2016-08-24T02:10:00&net=GE
• You requested all the waveforms from the GE network from 2016-08-24T02:00:00 to 2016-08-24T02:10:00.
Now you can use clients to work with your data. For instance, scolv. Remember to switch in scolv to “combined”
(combined://localhost:18000;localhost:18001) to load the waveforms from the archive.

22 Chapter 6. Exchange data and metadata with others


CHAPTER

SEVEN

USING FDSNWS_FETCH

Introduction

fdsnws_fetch is a Python script that simplifies downloading data and metadata from FDSN web services. It
supports the following notable features:
• Routing the request to datacenters that archive respective stations/channels.
• Merging results from multiple datacenters into one MiniSEED, XML or text file.
• Authentication with username/password or a token.

Installation

fdsnws_fetch is a single script without any special dependencies. It is compatible with Python 2 (at least 2.6) and
Python 3.

Note: The following examples assume that the script can be found in PATH and execute bit added (chmod a+x
fdsnws_fetch).

Usage examples

Request 60 minutes of the "LHZ" channel of EIDA stations starting with "A" for a seismic event around 2010-
02-27 07:00 (UTC). Optionally add "-v" for verbosity. Resulting Mini-SEED data will be written to file
"data.mseed".
$ fdsnws_fetch.py -N "*" -S "A*" -L "*" -C "LHZ" \
-s "2010-02-27T07:00:00Z" -e "2010-02-27T08:00:00Z" -v -o data.mseed

StationXML metadata for the above request can be requested using the following command:
$ fdsnws_fetch.py -N "*" -S "A*" -L "*" -C "LHZ" \
-s "2010-02-27T07:00:00Z" -e "2010-02-27T08:00:00Z" \
-y station -q level=response -v -o station.xml

Multiple query parameters can be used:


$ fdsnws_fetch.py -N "*" -S "*" -L "*" -C "*" \
-s "2010-02-27T07:00:00Z" -e "2010-02-27T08:00:00Z" \
-y station -q format=text -q level=channel \
-q latitude=20 -q longitude=-150 -q maxradius=15 -v -o station.txt

Bulk requests can be made in ArcLink (-f), breq_fast (-b) or native FDSNWS POST (-p) format. Query parameters
should not be included in the request file, but specified on the command line.

23
GEOFON Training Material

$ fdsnws_fetch.py -p request.txt -y station -q level=channel -v -o station.xml

The list of all command-line options can be obtained with


$ fdsnws_fetch.py --help

24 Chapter 7. Using fdsnws_fetch


CHAPTER

EIGHT

IMPORT DATA AND METADATA FROM EVENTS TO SC3

In this chapter we will summarize some of the different topics which have been seen previously. We will 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.

Exercise 1 - Central Italy

• Download inventory from all stations from networks MN, IV and GE with BH streams operating on August
24th 2016.
$ ./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 .

• Download 90 minutes of all BH streams from networks MN, IV and GE related to the event at 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

• Import the metadata using scconfig. If there was a previous inventory version which could collide it should
be deleted.
• Archive the data by means of scart.
$ cd ~/seiscomp3/var/lib/archive
$ scart -vvvv -I ~/mnivge.mseed .

• Open scolv and configure the recordstream to read the data from your local disk (sd-
sarchive:///home/sysop/seiscomp3/var/lib/archive). Create an artificial origin with 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.

Exercise 2 - Myanmar

In the above case, the standard EIDA routing service is used. We can also specify a different routing service URL,
for example, use an extended routing service that includes IRIS DMC:

25
GEOFON Training Material

• 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 iiiciuge.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/iiiciuge.xml .

• Download 90 minutes of all BH streams from networks II, IU, IC and GE related to the event at 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

• Import the metadata using scconfig. If there was a previous inventory version which could collide it should
be deleted.
• Archive the data by means of scart.
$ cd ~/seiscomp3/var/lib/archive
$ scart -vvvv -I ~/iiiciuge.mseed .

• Open scolv and configure the recordstream to read the data from your local disk (sd-
sarchive:///home/sysop/seiscomp3/var/lib/archive). Create an artificial origin with the details of the event
from the web page at GEOFON.
$ scolv -I sdsarchive:///home/sysop/seiscomp3/var/lib/archive

26 Chapter 8. Import data and metadata from events to SC3


CHAPTER

NINE

DOWNLOAD OF RESOURCES

• VirtualBox download
– Windows
– OS X
• VirtualBox Image download
– LUbuntu 16.04 64 bit with SeisComP3 installed
• SeisComP3 binaries download 1
– Ubuntu 16.04 (and Mint 18) 64 bit
– Ubuntu 16.04 (and Mint 18) 32 bit
– Ubuntu 14.04 (and Mint 17) 64 bit
– Ubuntu 14.04 (and Mint 17) 32 bit
• SeisComP3 maps
• SeisComp3 documentation
• Data from the event in Central Italy (24.08.2016)
– Pre-assembled dataset
• Metadata
– Pre-assembled dataset

1 For other Linux distributions see the SeisComP3 download page (http://www.seiscomp3.org/downloader).

27
GEOFON Training Material

28 Chapter 9. Download of Resources


CHAPTER

TEN

ADDITIONAL READING AND USEFUL LINKS

• SeisComP3 documentation (current Jakarta release) http://www.seiscomp3.org/doc/jakarta/current/


• SeisComp3 project https://www.seiscomp3.org/
• The GEOFON program http://geofon.gfz-potsdam.de/
• The European Integrated Data Archive (EIDA) http://www.orfeus-eu.org/eida/
• GEMPA GmbH http://www.gempa.de/
• GEMPA Station Management Portal https://seismo.gempa.de/smp/login/?next=/smp/

29

You might also like