sc2seisan

sc2seisan: A tool to export Seiscomp3 events into SEISAN S-files

Description

Working flow diagram

Schematic seisan2sc and sc2seisan.

seisan2sc and sc2seisan flow diagram.

sc2seisan can be executes in two modes:

  1. Real-time Mode for creating SEISAN S-files from SeisComP3 database; and
  2. Batch-import Mode for exporting legacy SEISAN S-Files from the SeisComp3 database.

In both modes, S-files are created from SC3XML.

sc2seisan will add the arc line to the sfile, so seisan can read the waveform from the SDS structure. If an sfile exist already with the origin information, sc2seisan will update it, unless the author is different. You can, therefore, update S-files more than once without worrying about corrupting sfiles or deleting manual solutions.

Mode 1: Real-time Mode

To run as a real-time process:

  1. Configure sc2seisan at scconfig (Modules >> OSOP >> sc2seisan), save and exit (you do not need to run "Update configuration" from the GUI nor "seiscomp update-config" from the command line when you make changes to the configuration)

  2. Enable and start sc2seisan:

    $ seiscomp enable sc2seisan
    $ seiscomp start sc2seisan
    
  3. Check it is alive and well:

    $ seiscomp status sc2seisan
    

Mode 2: Batch-import mode

To run in batch import mode:

  1. Configure sc2seisan at scconfig (Modules >> OSOP >> sc2seisan), save and exit (you do not need to run "Update configuration" from the GUI nor "seiscomp update-config" from the command line when you make changes to the configuration)

  2. Execute sc2seisan from the command line:

    $ sc2seisan --convert [path of the SC3XML/event.xml]

This will convert the xml Seiscomp3 file into a S-file, and exit.

Implementation

Network and location codes:

In SEISAN the network and location codes are not used at all. Only station codes are used. So there cannot be stations, for instance, with the same station code even if they are from different networks (Or there can be, but it would give an error when it searches for the Station0.HYP coordinates).

If there are some stations with similar station name, but different location code, an error message will appear at the log file

[WARN ] Rejecting duplicate station CM.BRR..HHN

The sfile will have, as the id event, the event's origin date.

ML Magnitude

Usually in Seiscomp3 the magnitude preferred is the M, which is a mean of all the magnitudes Seiscomp3 could calculate. This magnitude is exported as ML to SEISAN by sc2seisan.

Logging

All logs are written to ~/.seiscomp3/log/sc2seisan.log

Technical Support

If you have any questions, feel free to email us at support@osop.com.pa.

Configuration

Note

sc2seisan is a standalone module and does not inherit global options.

etc/defaults/sc2seisan.cfg
etc/sc2seisan.cfg
~/.seiscomp3/sc2seisan.cfg
filter.maxDistance

Type: float

Stations within this radial distance from the epicenter are written to the S-file unless they are declared at stations.blackList. If not defined, defaults to unlimited radial distance from epicenter. Units: Kilometers

filter.minPhases

Type: integer

Origins with at least this many number of phases will be accepted. If not defined, defaults to any number of phases.

filter.agencies

Type: string

Comma separated list of agencies from which origins are accepted. Case sensitive. If not defined, accepts events with any agencyID.

filter.authors

Type: string

Comma separated list of authors from whom origins are accepted. Case sensitive. If not defined, accepts events with any author.

filter.minLat

Type: float

minimum latitude (deg)

filter.maxLat

Type: float

maximum latitude (deg)

filter.minLon

Type: float

minimum longitude (deg)

filter.maxLon

Type: float

maximum longitude (deg)

filter.magnitudes_order

Type: list:string

Magnitudes code order: the sfile can only support maximum 3 magnitudes on its first line. The coding for the magnitudes is ML=L, mb=b, Ms=s, Mw=w, Mc=C, MLv=v, MLr=r, MLh=h, Mwp=p, mB=B, MS=S, MbLg=G, M=M, Mw(Mwp)=P, Mw(mB)=W. Default is L, b, s, w, c, v, r, h, p, B, S, G, M, P, W.

sfile.author

Type: string

Author of the event to be used in the S-file.

sfile.agency

Type: string

Agency to be used in the S-file. No more than 3 characters.

sfile.location

Type: string

Location model indicator; single character. One of L = local, R = regional, D = distant

sfile.outdir

Type: string

Directory where S-files are saved.

Note

timewindow.* Type 6 ARC line parameters

timewindow.pretime

Type: integer

Time before event, seconds

timewindow.posttime

Type: integer

Time after event, seconds

streams.whiteList

Type: string

Comma separated list. Wildcards allowed as * or ?. Entries must have format: NET.STA.LOC.CHA. Can be empty.

streams.blackList

Type: string

Comma separated list. Wildcards allowed as * or ?. Entries must have format: NET.STA.LOC.CHA. Can be empty.

logging.level

Type: integer

Logging level (1=ERROR, 2=WARNING, 3=INFO, 4=DEBUG).

license.directory

Type: string

Directory which contains sc2seisan-license.txt and sc2seisan-license.key

database.host

Type: string

database host

database.user

Type: string

database user

database.pass

Type: string

database password

database.name

Type: string

database name