SeisComP3

Table Of Contents

Previous topic

Graphical user interfaces

Next topic

scesv

This Page

magseval

MAGS risk evaluator

Description

magseval evaluates the impact of the current flow in a geothermal reservoire based on the current seismicity.

Workflow

magseval is configured to monitor events in a certain region and epoch. The filter consists of the following attributes to check for:

At start up it collects all events from a SeisComP3 system passing the filter. It also monitors all real-time events detected. Additionally magseval required data for the flow rates/flow volume within the monitored period of time.

The algorithm is as follows:

  1. Determination of MC (completeness magnitude) which is the maximum of the incremental magnitude distribution plot

  2. Determination of the b-value of the Gutenberg-Richter relationship with a linear least-square fit of the cummulative magnitude distribution plot

  3. Determination of the seismogenic index \Sigma

    \Sigma = N_{\geq M}^{obs} - V_I + b M

    • VI: fluid volume
    • b-value
    • N_{\geq M}: number of events with magnitude greater than M (M >= MC)
  4. Calculation of number of events of certain magnitude - Calculation for current time step

    N_{\geq M}^{theo} (t_0) = V_I(t_0) \cdot 10^{\Sigma(t_0) - b(t_0) M}

    • Calculation of the expected number of events within the next x hours if injection is continued with unchanged flow rate

      N_{\geq M}^{on}(t) = N_{\geq M}^{theo}(t_0) + \Delta V_I(t) \cdot 10^{\Sigma - b M}

    • Calculation of the expected number of events in the future if injection is stopped immediately

      N_{\geq M}^{off}(t) = N_{\geq M}^{theo}(t_0) + N_{\geq M}^{theo}(t_0)\frac{1}{p-1}\left[ 1-\left(\frac{t}{t_0}\right)^{1-p}\right]

\lim_{t\to\infty} N_{\geq M}^{off}(t) = N_{\geq M}^{theo}(t_0) \left[1+ \frac{1}{p-1}\right]

      where p is one of the configurable Omori parameters

  5. Calculation of the probability of the occurrence of one events of a certain magnitude

    • Assumption: event triggering follows a Poisson process which is homogenous

      fluid volume

    • Calculation of probability of current time step

      1 - Prob^{on,off}(0,M,t) = 1 - \exp(-N_{\geq M}^{on,off}(t))

    • Calculation of probability if injection is stopped immediately

      \lim_{t\to\infty} 1 - Prob^{off1}(0,M,t) = 1 - \exp\left\{ -N_{\geq M}^{theo}(t_0) \left[1+ \frac{1}{p-1}\right] \right\}

  6. Update warning and alert levels

    • Warning: A warning is issued if an event of a configured magnitude is predicted in the next x hours with a certain probability when the current fluid flow is not changed. The advice is to stop injection immediately.
    • Alert: An alert is issued if an event of a configured magnitude is predicted in the future with a certain probability. The assumption is that the flow is stopped immediately. An alert is already the worst case scenario.

Frontend

The GUI frontend show the current state of almost all computed values. It is devided into two sections: the plot section on the left and the summary on the right.

../_images/mainwindow.png

GUI mainwindow with 8 plots and an active alert.

Plots

There are different plots available which can be shown or hidden. If a shortcut is assigned to the plot to toggle its visibility it is printed in the upper right corner of each plot. The plots can also be toggled via menu View ‣ Plots.

The vertical dashed black line indicated the current time step called cursor.

  1. Observed magnitudes over time

    X time
    Y magnitude occured

    The red line shows the alert magnitude.

  2. Gutenberg-Richter relationship

    X magnitude bins
    Y logarithm of cummulative events

    The green line represents the least-square fit and the transparent green bar the standard error of the fit. The red line shows the critical threshold.

  3. Injected volume over time

    X time
    Y injected volume since beginning in l
  4. Injection flow over time

    X time
    Y injection flow
  5. Params over time

    X time
    Y values of b, MC and \Sigma
  6. Observed events vs. calculated events >= alert magnitude

    X time
    Y logarithm of observed number of events and the calculated number of events until cursor and logarithm of predicted number of events after cursor.

    The red line indicates the probability converted to N with N = \frac{1}{1-p}.

  7. Observed events vs. calculated events of selected magnitude

    The same as plot 6 but using the currently selected magnitude.

  8. Probability of alert magnitude

    X time
    Y logarithm of probability of calculated number of events until cursor and probability of predicted number of events after cursor.
  9. Probability of selected magnitude

    The same as plot 8 but using the currently selected magnitude.

  10. Calculated events per magnitude

    X time
    Y The calculated number of events until cursor and the number of predicted events after cursor for scenario "on".

Summary

The summary table on the right shows a traffic light which indicates the warning level in orange, the alert level in red and green otherwise.

Below the current time step (cursor) is shown.

Then an orange or red box is shown in case of a warning or alert.

The table below shows all observed magnitudes. The list of magnitudes is 0, 0.5, 1, 1.5, 2, 2.5 and 3 which is defined as an offset to the completeness magnitude MC. The columns are:

  1. magnitude
  2. observed events and calculated events greater or equal the magnitude
  3. number of events predicted within the next x hours and its probability
  4. number of events predicted in future according to the first Omori coefficent
  5. number of events predicted in future according to the second Omori coefficent
  6. button to select the current magnitude which is displayed in plot 7 and 9

Below the table the current parameters up to the cursor are printed.

Offline data

To test magseval without having a properly populated SC3 database offline files can be used. To start magseval in offline mode, --offline must be passed.

$ magseval --offline

File ‣ Open brings up the offline dialog which allows to load working data and event data.

../_images/offlinedata.png

The working data file and the event file are described in the next two subsections. As all data is defined with relative timestamps a reference time must be given.

After pushing OK the data is loaded and plotted in the main window. The active time is defined as the last time with a non zero fluid flow. This time is set as current time.

Working data

Working data is organized in a simple table with 3 columns.

Column  
1 The time (see below)
2 The flow at this time step in l/min.
3 The injected fluid volume at this time step in liter.

Event data

Event data is also organized in a simple table with 2 columns.

Column  
1 The time (see below)
2 The event magnitude.

Both working data and event data needs to be times in column 1 of their input files. Times can either be given as in seconds relative to a reference time (specified in the load dialog) or as iso times in format %FT%T.%fZ, e.g. 2015-01-01T12:00:00.123456Z. If absolute times are specified the dialog reference time has no effect and is being ignored.

Working data

In order to update the system with the current injection flow rate magseval monitors a file which is continuously checked for updates. The path to the file is configured with eval.workingData.path and the update interval is configured with eval.workingData.updateInterval. The file itself needs to be maintained by scripts outside the scope of magseval.

The file format is similar to the offline working data set but the time is here an absolute time stamp given in ISO format, e.g. 2013-01-01T12:00:00.123Z.

Column  
1 The absolute time stamp in ISO format (%FT%T.%fZ)
2 The flow rate in l/min (liter per minute)
3 The injected fluid volume in l (liter)

If a new working data record is found it is appended to the current data set and the cursor is set to the most recent time stamp.

Saving data

Processing results can be saved into a text file. File ‣ Save brings up a dialog to define the output file and the stepping. The output file looks like this:

# Timestamp  V  flow  sigma  Mc  b  Ev.calc>M  Ev.obs>M  Prob>M
20000101233614059998  20364.7  0.406875  -1.61129  -1.62  1.50666  1.50487e-05  0  1.50486e-05
20000102033856409999  26766.3  0.468193  -1.53843  -1.62  1.4123  4.48581e-05  0  4.48571e-05
20000102062410970000  31577.6  0.502354  -1.53552  -1.62  1.39794  5.888e-05  0  5.88783e-05
20000102065452129999  32508.3  0.508698  -1.40357  -1.62  1.32329  0.000137467  0  0.000137458
20000102073607480000  33779.4  0.518622  -1.49958  -1.62  1.41814  5.95107e-05  0  5.9509e-05
20000102080438990000  34673.2  0.525842  -1.45786  -1.62  1.4496  5.40845e-05  0  5.4083e-05
20000102085814799998  36386  0.53941  -1.44279  -1.62  1.45015  5.85611e-05  0  5.85593e-05
20000102092457940000  37256.2  0.546174  -1.36927  -1.62  1.38951  0.000107904  0  0.000107898

Each row is a data point of the Sigma plot (plot 5, green graph) up to the currently selected time. The time stamp in the first column is given in format YEAR,MONTH,DAY,HOUR,MINUTE,SECOND,MICROSECONDS.

The default output stepping is 1. A higher stepping would just skip subsequent datapoints and only output every s-th datapoint where s is the stepping value.

Configuration

etc/defaults/global.cfg
etc/defaults/magseval.cfg
etc/global.cfg
etc/magseval.cfg
~/.seiscomp3/global.cfg
~/.seiscomp3/magseval.cfg

magseval inherits global options.

eval.startTime

Type: date

Defines the start time of the evaluation. Events before that time are ignored. Format is "%F %T.%f".

eval.endTime

Type: date

Defines the end time of evaluation. Events after that time are ignored. Format is "%F %T.%f".

eval.minimumDepth

Type: double

Defines the event minimum depth. If not set this filter is not used.

eval.maximumDepth

Type: double

Defines the event maximum depth. If not set this filter is not used.

eval.minimumMagnitude

Type: double

Defines the event minimum magnitude. If not set this filter is not used.

eval.maximumMagnitude

Type: double

Defines the event maximum magnitude. If not set this filter is not used.

eval.regionName

Type: string

Defines the event region name. If not set this filter is not used.

eval.eventTypes

Type: list:string

Defines the event types allowed. To allow that the event type is not set, add an empty string ("") to the list.

eval.magnitudeType

Type: string

Defines to magnitude type to be considered. If not set this filter is not used.

eval.hydraulicData.path

Type: string

Defines the path to the hydraulic data file. Each line in this file starts with a timestamp followed by the flow in l/s and the volume in l. Default is @ROOTDIR@/var/lib/magseval/hydraulicdata.dat.

eval.hydraulicData.updateInterval

Type: int

The update interval of the hydraulic data file in seconds. Default is 10.

Note

eval.region.* Configures the event region. Events outside this region are ignored.

eval.region.type

Type: string

Defines the type of the region definition (either rectangle or circle) used to filter out events outside the region of interest.

eval.region.values

Type: list:double

Defines the region values depending on the type rectangle: latMin, lonMin, latMax, lonMax; circle: lat, lon, radius.

eval.thresholds.magnitude

Type: double

Defines the threshold magnitude to monitor for alert level. Default is 2.5.

eval.thresholds.magnitudeProbability

Type: double

Defines the minimum probability of an event with eval.thresholds.red.magnitude to occur. Predictions with less probability are not recognized. Default is 0.5.

eval.params.binWidthGR

Type: double

The bin width of the Gutenberg-Richter relationship. Default is 0.1.

eval.params.binWidthMc

Type: double

The bin width of the Mc computation. Default is 0.2.

eval.params.stepMc

Type: double

The stepping width of the Mc computation. Default is 0.04.

eval.params.omori_p1

Type: double

The first p value of the Omori decay. Default is 2.

eval.params.omori_p2

Type: double

The second p value of the Omori decay. Default is 8.

eval.params.minimumBNodes

Type: int

The minimum number of nodes required to compute a "stable" b value. Default is 3.

eval.params.timeAhead

Type: int

Number of hours in future to predict data for. Default is 24.

Command-line

Generic

-h, --help

show help message.

-V, --version

show version information

--config-file arg

Use alternative configuration file. When this option is used the loading of all stages is disabled. Only the given configuration file is parsed and used. To use another name for the configuration create a symbolic link of the application or copy it, eg scautopick -> scautopick2.

--plugins arg

Load given plugins.

-D, --daemon

Run as daemon. This means the application will fork itself and doesn't need to be started with &.

--auto-shutdown arg

Enable/disable self-shutdown because a master module shutdown. This only works when messaging is enabled and the master module sends a shutdown message (enabled with --start-stop-msg for the master module).

--shutdown-master-module arg

Sets the name of the master-module used for auto-shutdown. This is the application name of the module actually started. If symlinks are used then it is the name of the symlinked application.

--shutdown-master-username arg

Sets the name of the master-username of the messaging used for auto-shutdown. If "shutdown-master-module" is given as well this parameter is ignored.

Verbosity

--verbosity arg

Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug

-v, --v

Increase verbosity level (may be repeated, eg. -vv)

-q, --quiet

Quiet mode: no logging output

--component arg

Limits the logging to a certain component. This option can be given more than once.

-s, --syslog

Use syslog logging back end. The output usually goes to /var/lib/messages.

-l, --lockfile arg

Path to lock file.

--console arg

Send log output to stdout.

--debug

Debug mode: --verbosity=4 --console=1

--log-file arg

Use alternative log file.

Messaging

-u, --user arg

Overrides configuration parameter connection.username.

-H, --host arg

Overrides configuration parameter connection.server.

-t, --timeout arg

Overrides configuration parameter connection.timeout.

-g, --primary-group arg

Overrides configuration parameter connection.primaryGroup.

-S, --subscribe-group arg

A group to subscribe to. This option can be given more than once.

--encoding arg

Overrides configuration parameter connection.encoding.

--start-stop-msg arg

Sets sending of a start- and a stop message.

Database

--db-driver-list

List all supported database drivers.

-d, --database arg

The database connection string, format: service://user:pwd@host/database. "service" is the name of the database driver which can be queried with "--db-driver-list".

--config-module arg

The configmodule to use.

--inventory-db arg

Load the inventory from the given database or file, format: [service://]location

--db-disable

Do not use the database at all

Options

--offline

Work in offline mode without messaging and database. Allows to load offline event records.