.. _VS:

====================
Virtual Seismologist
====================

Part of the :ref:`EEW<EEW>` package.

The `Virtual Seismologist`_ in SeisComP (VS(SC)) provides near instantaneous
estimates of earthquake magnitude as soon as SeisComP origins are available.
With a well-configured SeisComP system running on a dense network, magnitudes
for local events can be available within 4-20 s of origin time (Massin et al.,
2021). VS(SC) can be a key component of an earthquake early warning system, and
can be used to provide rapid earthquake notifications. With the capability to
estimate magnitude (given a location estimate) with 1-second (originally 3s) of
P-wave information at a single station, VS(SC) magnitude estimates are tens of
seconds faster than conventional Ml calculations, which require waiting for the
peak S-wave amplitudes. The VS magnitude estimation relationships consist of 1)
a relationship between observed ground motion ratios (between vertical
acceleration and vertical displacement) and magnitude, and 2) envelope
attenuation relationships describing how various channels of envelope
amplitudes vary as a function of magnitude and distance. These relationships
were derived from a Southern California dataset with events in the magnitude
range 2.5 <= M <= 7.6 and the Next Generation Attenuation (NGA) strong motion
dataset. Once a SeisComP location estimate is available, VS magnitude estimates
can be computed with as little as 1 second of envelope data at a single
station (i.e., 1 second after trigger time at a single station). Typically,
usable envelope data is available at numerous stations by the time the first
SeisComP origin is available. The VS magnitude estimates are then updated every
second for 30 seconds (configurable). The SeisComP implementation allows for use
of broadband high-gain seismometers (with clipping value selected) as well as
strong motion data. For co-located stations, VS magnitudes are calculated using
the strong motion channels if the broadband channels saturate.
VS magnitudes in SeisComP are called MVS.


Development
-----------

The Virtual Seismologist method is a Bayesian approach to earthquake early
warning (EEW) that estimates earthquake magnitude, location, and the
distribution of peak ground shaking using observed picks and ground motion
amplitudes, predefined prior information, and envelope attenuation
relationships (Cua, 2005; Cua and Heaton, 2007; Cua et al., 2009). The
application of Bayes' theorem in EEW (Cua, 2005) states that the most probable
source estimate at any given time is a combination of contributions from prior
information (candidate priors include network topology or station health status,
regional hazard maps, earthquake forecasts, and the Gutenberg-Richter
magnitude-frequency relationship) and constraints from the available
real-time ground motion and arrival observations. VS is envisioned as an
intelligent, automated system capable of mimicking how human seismologists can
make quick, relatively accurate “back-of-the-envelope” interpretations of
real-time (and at times, incomplete) earthquake information, using a mix of
experience, background information, and real-time data. The formulation of the
VS Bayesian methodology, including the development of the underlying
relationships describing the dependence of various channels of ground motion
envelopes on magnitude and distance, and how these pieces come together in EEW
source estimation, was the result of the PhD research of Dr. Georgia Cua with
Prof. Thomas Heaton at Caltech, from 1998 through 2004.

The first real-time VS prototype system was developed by Georgia Cua and Michael
Fischer at ETH Zurich from 2006-2012. For this and all subsequent
implementations, prior information is not included. This first prototype used
location estimates generated by the Earthworm Binder module (Dietz, 2002) as
inputs to the VS magnitude estimation. This architecture underwent continuous
real-time testing in California (since 2008-2018) and Switzerland
(since 2010-2014). In California, VS was one of the three EEW algorithms that
made up the original version of the `CISN ShakeAlert EEW system`_. Since 2018 it
was retired from ShakeAlert. In 2012/13, with funding from the EU projects NERA
("Network of European Research Infrastructures for Earthquake Risk Assessment
and Mitigation") and REAKT ("Strategies and Tools for Real-Time EArthquake RisK
ReducTion"), VS was integrated into SeisComP by the Seismic Network group at the
SED in ETH Zurich and gempa GmbH. Both real-time VS implementations (Binder- and
SeisComP-based) focus on real-time processing of available pick and envelope
data. Although the codes were effectively re-written, the basic architecture
used in the original Earthworm-based implementation is used in SeisComP. In the
first SeisComP implementation, VS-specific pre-processing (`scenvelope`) and
post-processing (`scvsmaglog`) modules were included, alongside the VS magnitude
module (`scvsmag`). Currently, `scenvelope` and `scvsmaglog` are replaced by
generic EEW pre/post-processing modules.

VS and SeisComP
---------------

The SeisComP location module of choice (`scautoloc` or `scanloc` if available)
provides location estimates to the `scevent` module that defines events and
preferred origins. The generic EEW pre-processing module `sceewenv` provides
continuously updated envelope amplitudes. Once a SeisComP origin is available,
`scvsmag` uses the envelope amplitudes from all stations used in the preferred
origin to provide VS magnitudes (MVS):

- :ref:`sceewenv`
- :ref:`scvsmag`

MVS is calculated and updated (with updates attached to the preferred origin)
each second for 30 seconds (unless configured differently) after its first
invocation with a new SeisComP event.

An additional generic EEW module, :ref:`sceewlog`, creates log output and mails
solutions once a new event is fully processed. It also provides an interface to
send alerts in real-time using ActiveMQ. The `Earthquake Early Warning Display`_
(Cauzzi et al., 2016), an open-source java application, can receive and display
EEW messages broadcast via ActiveMQ.


Configuring and optimizing VS(SC) for EEW
-----------------------------------------

The performance of VS(SC) is strongly dependent on: 1) the quality and
density of the seismic network; 2) the configuration of the general SeisComP
system. scautoloc requires between 4-6 triggers to create an origin. scanloc
uses at least 4 stations. Given the network geometry, maps of when VS estimates
would be first available (indicative of the size of the blind zone as a function
of earthquake location relative to stations) can be generated for regions where
EEW is of interest. VS(SC) can be used with either scautoloc or scanloc, neither
of which were directly built for EEW, although experience and observations
indicates processing delays are minimal (Behr et al., 2014, Massin et al.,
2021). VS magnitudes (MVS) can be expected within 1-2 seconds after a SeisComP
origin is available. In the densest part of the Swiss network, first SeisComP
origins are available within 4-7 seconds after origin time; MVS is typically
 available within a second.

The VS magnitude estimation relationships in Cua (2005) were derived from a
dataset consisting of Southern California waveforms and the NGA strong motion
dataset. In theory, customizing VS to a specific region requires deriving a set
of envelope attenuation relationships (168 coefficients) and relationships
between ground motion ratios and magnitude (6 coefficients) from a regional
dataset. In practice, the VS magnitude estimation relationships derived from
Southern California have been shown to work reasonably well in Northern
California, Switzerland (Behr et al., 2012), Iceland, Turkey, and Romania (Behr
et al., 2015). More recent works indicate similar performance across Central
America (e.g., Porras et al., 2021). The envelope and ground motion ratio
coefficients from Cua (2005) are hard-coded in scvsmag, and should not be
modified without a full understanding of the VS methodology and potential
consequences of the modifications.

Although `scautoloc` can produce origins at any depth, the VS magnitude
estimation relationships assume a depth of 3 km. For this reason, it is expected
that MVS will systematically underestimate magnitudes for deep earthquakes. It
may be most practical to simply add empirically derived offsets to MVS for
deeper events, or for particular regions.

Read the documentation of :ref:`sceewenv`, :ref:`scvsmag` and :ref:`sceewlog`
for their configurations.

Understanding VS output
-----------------------

The VS system currently being offered is a test version. SED-ETHZ assumes no
liability for its use. 


False alarms, missed events, solution quality
---------------------------------------------

The rate of false alarms and missed events is determined by the output of the
normal SeisComP origin chain (:ref:`scautopick`, :ref:`scautoloc`), and will
be similar to the performance of the automatic setup for typical network
operations (i.e. if you do not trust your automatic origins for the network, you
will not trust them for VS either). Solution quality is independently estimated
by VS, combining information on location quality and station quality. See
:ref:`scvsmag` on how the VS specific solution quality is computed.


EEW License
-----------

The SeisComP EEW modules are free and open source. They are distributed
under the GNU Affero General Public License (Free Software Foundation, version 3
or later). For licence information on ETHZ-SED SeisComP EEW modules released
before SeisComP v4.0.0 see the Timeline in :ref:`EEW<EEW>`.

References
----------

Dietz, L., 2002: Notes on configuring BINDER_EW: Earthworm's phase associator, http://folkworm.ceri.memphis.edu/ew-doc/ovr/binder_setup.html (last accessed
    June 2013)

Cua, G., 2005: Creating the Virtual Seismologist: developments in ground motion
     characterization and seismic early warning. PhD thesis, California
     Institute of Technology, Pasadena, California.

Cua, G., and T. Heaton, 2007: The Virtual Seismologist (VS) method: a Bayesian
     approach to earthquake early warning, in Seismic early warning, editors: P.
     Gasparini, G. Manfredi, J. Zschau, Springer Heidelberg, 85-132.

Cua, G., M. Fischer, T. Heaton, S. Wiemer, 2009: Real-time performance of the
     Virtual Seismologist earthquake early warning algorithm in southern
     California, Seismological Research Letters, September/October 2009; 80:
     740 - 747.

Behr, Y., Cua, G., Clinton, J., Heaton, T., 2012: Evaluation of Real-Time
     Performance of the Virtual Seismologist Earthquake Early Warning Algorithm
     in Switzerland and California. Abstract 1481084 presented at 2012 Fall
     Meeting, AGU, San Francisco, Calif., 3-7 Dec.
     
Behr, Y. D., Cauzzi, C., Clinton, J. F., Jonsdottir, K., Comoglu, M.,
     Erlendsson, P., et al. (2015) Exploring the Readiness for Earthquake Early
     Warning at Seismic Networks Across Europe. Seismological Research Letters,
     86(2B), 738–739. http://doi.org/10.1785/0220150017

Behr, Y., J. F. Clinton, C. Cauzzi, E. Hauksson, K. Jónsdóttir, C. G. Marius, A.
     Pinar, J. Salichon, and E. Sokos (2016) The Virtual Seismologist in
     SeisComP: A New Implementation Strategy for Earthquake Early Warning
     Algorithms, Seismological Research Letters, March/March 2016, v. 87, p.
     363-373, doi:10.1785/0220150235

Behr, Y., J. Clinton, P. Kästli, C. Cauzzi, R. Racine,  M‐A. Meier (2015)
     Anatomy of an Earthquake Early Warning (EEW) Alert: Predicting Time Delays
     for an End‐to‐End EEW System, Seismological Research Letters, May/June
     2015, v. 86, p. 830-840, doi:10.1785/0220140179

Cauzzi, C., Behr, Y. D., Clinton, J., Kastli, P., Elia, L., & Zollo, A. (2016)
     An Open-Source Earthquake Early Warning Display. Seismological Research
     Letters, 87(3), 737–742, doi:10.1785/0220150284

Massin, F., J. F. Clinton, M. Boese (2021) Status of Earthquake Early Warning in
     Switzerland, Frontiers in Earth Science,  9:707654. 
     doi:10.3389/feart.2021.707654
          
Porras Loría, J.L., Massin, F., Arroyo-Solórzano, M., Arroyo, I., Linkimer, L.,
     Böse, M., and Clinton, J., (2021) Preliminary Results of an Earthquake
     Early Warning System in Costa Rica, Frontiers in Earth Science, submitted

.. target-notes::

.. _`Virtual Seismologist` : http://www.seismo.ethz.ch/en/knowledge/earthquake-data-and-analysis-tools/EEW/finite-fault-rupture-detector-finder/
.. _`CISN ShakeAlert EEW system` : http://www.cisn.org/eew/
.. _`Earthquake Early Warning Display` : https://github.com/SED-EEW/EEWD


.. figure:: ../base/media/VS@200x.png
     :width: 50%
     :align: center