# obspy.clients.arclink - ArcLink/WebDC request client for ObsPy

ArcLink is a distributed data request protocol usable to access archived waveform data in the MiniSEED or SEED format and associated meta information as Dataless SEED files. It has been originally founded within the German WebDC initiative of GEOFON (Geoforschungsnetz) and BGR (Bundesanstalt für Geowissenschaften und Rohstoffe). ArcLink has been designed as a “straight consequent continuation” of the NetDC concept originally developed by the IRIS DMC. Instead of requiring waveform data via E-mail or FTP requests, ArcLink offers a direct TCP/IP communication approach. A prototypic web-based request tool is available via the WebDC homepage at http://www.webdc.eu.

Recent development efforts within the NERIES (Network of Excellence of Research and Infrastructures for European Seismology) project focuses on extending the ArcLink network to all major seismic data centers within Europe in order to create an European Integrated Data Center (EIDAC). Currently (September 2009) there are four European data centers contributing to this network: ORFEUS, GFZ (GeoForschungsZentrum), INGV (Istituto Nazionale di Geofisica e Vulcanologia), and IPGP (Institut de Physique du Globe de Paris).

copyright: | The ObsPy Development Team (devs@obspy.org)
license: | GNU Lesser General Public License, Version 3 (https://www.gnu.org/copyleft/lesser.html)

## Basic Usage

Note

The default client needs to open port 18002 to the host webdc.eu via TCP/IP in order to download the requested data. Please make sure that no firewall is blocking access to this server/port combination.

Note

The `user` keyword in the following examples is used for identification with the ArcLink server as well as for usage statistics within the data center, so please provide a meaningful user id such as an email address.

1. `get_waveforms()`: The following example illustrates how to request and plot 18 seconds of all three single band channels (`"EH*"`) of station Jochberg/Hochstaufen (`"RJOB"`) of the Bavarian network (`"BW"`) for an seismic event around 2009-08-20 04:03:12 (UTC).

       >>> from obspy import UTCDateTime
       >>> from obspy.clients.arclink.client import Client
       >>> client = Client(user='test@obspy.org')
       >>> t = UTCDateTime("2009-08-20 04:03:12")
       >>> st = client.get_waveforms("BW", "RJOB", "", "EH*", t - 3, t + 15)
       >>> st.plot()

   Waveform data fetched from an ArcLink node is converted into an ObsPy `Stream` object. The seismogram is truncated by the ObsPy client to the actual requested time span, as ArcLink internally cuts SEED files for performance reasons on record base in order to avoid uncompressing the waveform data. The output of the script above is shown in the next picture.

   (Source code, png, hires.png)

2. `get_paz()`: Requests poles, zeros, gain and sensitivity of a single channel at a given time.

       >>> from obspy import UTCDateTime
       >>> from obspy.clients.arclink.client import Client
       >>> client = Client(user='test@obspy.org')
       >>> dt = UTCDateTime(2009, 1, 1)
       >>> paz = client.get_paz('BW', 'MANZ', '', 'EHZ', dt)
       >>> paz
       AttribDict({'poles': [(-0.037004+0.037016j), (-0.037004-0.037016j),
                             (-251.33+0j), (-131.04-467.29j), (-131.04+467.29j)],
                   'sensitivity': 2516778600.0,
                   'zeros': [0j, 0j],
                   'name': 'LMU:STS-2/N/g=1500',
                   'gain': 60077000.0})

3. `save_response()`: Writes response information into a file.

       >>> from obspy import UTCDateTime
       >>> from obspy.clients.arclink.client import Client
       >>> client = Client(user='test@obspy.org')
       >>> t = UTCDateTime(2009, 1, 1)
       >>> client.save_response('BW.MANZ..EHZ.dataless', 'BW', 'MANZ', '', '*',
       ...                     t, t + 1, format="SEED")

4. `save_waveforms()`: Writes the requested waveform unmodified into your local file system. Here we request a Full SEED volume.

       >>> from obspy import UTCDateTime
       >>> from obspy.clients.arclink.client import Client
       >>> client = Client(user='test@obspy.org')
       >>> t = UTCDateTime(2009, 1, 1, 12, 0)
       >>> client.save_waveforms('BW.MANZ..EHZ.seed', 'BW', 'MANZ', '', '*',
       ...                     t, t + 20, format='FSEED')

5. `get_inventory()`: Request inventory data.

       >>> from obspy import UTCDateTime
       >>> from obspy.clients.arclink.client import Client
       >>> client = Client(user='test@obspy.org')
       >>> inv = client.get_inventory('BW', 'M*', '*', 'EHZ', restricted=False,
       ...                           permanent=True, min_longitude=12,
       ...                           max_longitude=12.2)
       >>> inv.keys()
       ['BW.MROB', 'BW.MANZ..EHZ', 'BW', 'BW.MANZ', 'BW.MROB..EHZ']
       >>> inv['BW']
       AttribDict({'description': 'BayernNetz', 'region': 'Germany', ...
       >>> inv['BW.MROB']
       AttribDict({'code': 'MROB', 'description': 'Rosenbuehl, Bavaria', ...

## Further Resources

- ArcLink protocol specifications:
  - https://www.seiscomp3.org/wiki/doc/applications/arclink
  - http://geofon.gfz-potsdam.de/_sc3_neries_/arclink.pdf
  - https://raw.github.com/obspy/obspy/master/obspy/clients/arclink/docs/protocol.txt
- Short introduction to the ArcLink protocol
- Latest ArcLink server
- SeismoLink: a SOAP Web service on top of the ArcLink network

## Classes & Functions

`client.Client` | The ArcLink/WebDC client.

## Modules

`client` | ArcLink/WebDC client for ObsPy.

### Thank you!

We would like to thank our contributors, whose efforts make this software what it is. These people have helped by writing code and documentation, and by testing. They have created and maintained this product, its associated libraries and applications, our build tools and our web sites.

#### Contributors

- Ackerley, Nick
- Allgeyer, Sebastien
- Ammon, Charles J.
- Antunes, Emanuel
- Arnarsson, Ólafur St.
- Bank, Markus
- Barsch, Robert
- Behr, Yannik
- Bernardi, Fabrizio
- Bernauer, Felix
- Bes de Berc, Maxime
- Beyreuther, Moritz
- Boltz, Shawn
- Bonaimé, Sébastien
- Carothers, Lloyd
- Chamberlain, Calum
- Chambers, Derrick
- Chen, Zhao
- Clark, Adam
- Danecek, Peter
- Egdorf, Sven
- Engels, Fabian
- Ermert, Laura
- Eulenfeld, Tom

- Fabbri, Tommaso
- Falco, Nicholas
- Fee, Jeremy
- Grellier, Clément
- Grunberg, Marc
- Hammer, Conny
- Heimann, Sebastian
- Heiniger, Lukas
- Hope, Gaute
- Igel, Heiner
- Inza, Adolfo
- Isken, Marius
- Ketchum, David
- Koymans, Mathijs
- Kremers, Simon
- Kress, Victor
- Krieger, Lars
- Krischer, Lion
- Kula, Damian
- Käufl, Paul
- Köhler, Andreas
- Lecocq, Thomas
- Leeman, John
- Legovini, Paride

- Lesage, Philippe
- Li, Yulin
- Lomax, Anthony
- Lopes, Rui L.
- MacCarthy, Jonathan
- Maggi, Alessia
- Martin, Henri
- Medlin, Andrew
- Megies, Tobias
- Meschede, Matthias
- Michelini, Alberto
- Miller, Nathaniel C.
- Morgenstern, Bernhard
- Nof, Ran Novitsky
- Panning, Mark P.
- Parker, Tom
- Pestourie, Romain
- Rapagnani, Giovanni
- Reyes, Celso
- Ringler, Adam
- Rothenhäusler, Nicolas
- Russo, Emiliano
- Sales de Andrade, Elliott

- Satriano, Claudio
- Saul, Joachim
- Scheingraber, Chris
- Schneider, Simon
- Sippl, Christian
- Snoke, Arthur
- Stange, Stefan
- Stähler, Simon C.
- Sullivan, Benjamin
- Tian, Dongdong
- Trabant, Chad
- Trani, Luca
- Uieda, Leonardo
- Walker, Andrew
- Walther, Marcus
- Wassermann, Joachim
- Williams, Mark C.
- Winkelman, Andrew
- Zaccarelli, Riccardo
- Zad, Seyed Kasra Hosseini
- Zhu, Lijun
- van Driel, Martin
- van Wijk, Kasper

#### Funds

ObsPy was partially funded by the

- German Science Foundation (DFG) via grant DFG IG 16/9-1
- German Ministry for Education and Research (BMBF), GEOTECHNOLOGIEN grant 03G0646H.
- NERA project (Network of European Research Infrastructures for Earthquake Risk Assessment and Mitigation) under the European Community's Seventh Framework Programme (FP7/2007-2013) grant agreement n° 262330
- Leibniz Institute for Applied Geophysics (LIAG)
- VERCE EU-FP7 project (no. 283543)