(last revised 25 August 2009)
Page Index:
On startup, gmew reads commands from a configuration file. Commands in this file set all the parameters for configuring the Earthworm gmew module. In the control file, lines may begin with a valid gmew command (listed below) or with one of 2 special characters:
# marks the line as a comment (example: # This is a comment).
@ allows control files to be nested; one control file can be
accessed from another with the command "@" followed by
a string representing the path name of the next control file
(example: @model.d).
Command names must be typed in the control file exactly as shown in this document (upper/lower case matters!). Blank lines are also permitted in the control file.
Earthworm system setup: | ||
---|---|---|
MyModuleId | Required | |
RingInName | Required | |
RingOutName | Required | |
getEventsFrom | Required | |
HeartBeatInterval | Required | |
log switch | Optional | |
Memory allocation commands | ||
maxSta | Required | |
maxTrace | Required | |
Event and Trace commands | ||
traceSource | Optional | -t |
extraDelay | Optional | |
traceTimes | Optional | |
Add | Optional | |
Del | Optional | |
maxDist | Required | |
saveTrace | Optional | |
searchWindow | Optional | |
Auxiliary Data Sources | ||
respSource | Optional | |
staLoc | Required | |
velocity model | Optional | |
SCNLpar | Optional | |
Miscellaneous Commands | ||
Debug | Optional | |
wsTimeout | Optional | |
XMLDir | Optional | |
TempDir | Optional | |
MappingFile | Optional | |
watchForAlarm | Optional | |
AddSpectraResponseAt | Optional |
In the following section, all configuration file commands are listed in alphabetical order. Listed along with the command (bold-type) are its arguments (in red.) A detailed description of the command and is also given. Default values and example commands are listed after each command description.
command arg1 | function |
|
|
Add STA COMP NET LOC | Event and Trace Commands |
|
|
Default: all traces are selected from a trace source |
|
AddSpectraResponseAt period | Miscellaneous Commands |
|
|
Default: 0.3, 1.0 and 3.0 |
|
Debug D | Miscellaneous Commands |
|
|
Default: 0; no debug output |
|
Del STA COMP NET LOC | Event and Trace Commands |
|
|
Default: all traces are selected from a trace source |
|
getEventsFrom INST MOD | Earthworm Setup |
|
|
Default: none |
|
HeartBeatInterval H | Earthworm Setup |
|
|
Default: none |
|
log switch: -lS |
Earthworm Setup |
Default: 1 |
|
MappingFile map-file | Miscellaneous Commands |
Default: no mapping file if this command is not given |
|
maxSta N | Memory Allocation |
Default: none, this command is required. |
|
maxTrace M | Memory Allocation |
Default: none, this command is required |
|
MyModuleId mod_id | Earthworm setup |
Default: none |
|
respSource SOURCE [params] | Auxilliary Data Sources |
Default: none |
|
RingInName ring | Earthworm setup |
Default: none |
|
RingOutName ring | Earthworm setup |
Default: none |
|
saveTrace ST [params] DIR FORMAT | Event and Trace Commands |
Default: command is absent (no traces are saved) |
|
SCNLpar STA COMP NET LOC special-parameters | Auxilliary Data Sources |
@scnl_param_fileNote that the format of this files is identical to the one used by the localmag module. Each SCNLpar command must include the STA, COMP, NET, LOC names followed by the following seven decimal values. Use spaces between all elevent items in each SCNLpar line. All values must be present; no default values are used for an SCN if it has an SCNpar line. The seven decimal values are: Default: as described above |
|
searchWindow A B C D | Amplitude Controls |
Default: searchWindow 0.0 2.0 0.0 30.0 # Search window runs from 2 seconds |
|
staLoc LOC [params] | Auxilliary Data Sources |
Default: none; this command is required |
|
TempDir temp-dir | Miscellaneous Commands |
Default: none; this command is required if XMLDir is given |
|
tracesource SOURCE [params] | Event and Trace Commands |
Default: waveServer with list of servers read from the file $EW_PARAMS/servers |
|
extraDelay DelaySecs | Event and Trace Commands |
Default: extraDelay 0 |
|
traceTimes START END | Event and Trace Commands |
Default: traceTimes 5.0 60.0 |
|
velocity model | Auxilliary Data Sources |
@velocity_fileTypically this will be the same file as used for binder_ew. Gmew will always look for this file in the current directory, so appropriate path information must be included if the file is located elsewhere. Ask Earthworm Central for documentation of this long-used file format. Default: none |
|
|
|
watchForAlarm duration | Miscellaneous Commands |
|
|
Default: ignore ACTIVATE_MODULE messages |
|
|
|
wsTimeout M | Miscellaneous Commands |
Default: 5000 milliseconds |
|
XMLDir xml-dir | Miscellaneous Commands |
Default: XMLDir command not given; no XML file is written |
# Configuration file for gmew
# Some of these parameters can be overridden on the command-line;
# some of them only make sense on the command-line.
#
# Required Commands:
# The following five commands are always required by gmew.
# Other commands below may be required when certain options are given.
#
# Earthworm Transport commands
# RingInName: specify the name of the earthworm transport ring from
# which to read TYPE_HYP2000ARC messages for event notification.
RingInName HYPO_RING
# RingOutName: specify the name of the earthworm transport ring from
# which to write Magnitude, Heartbeat and Error messages. This may be
# the same is the RingInName if desired.
RingOutName GM_RING
# MyModId <module-id>: specify the module ID for gmew
MyModId MOD_GMEW
# HeartBeatInterval int: How often gmew should beat its heart.
HeartBeatInterval 30
# getEventsFrom INST_ID MOD_ID
# Specify the installation ID and module ID names from which to get
# hypoinverse archive messages to read event data. These names may be
# selected from earthworm.d and earthworm_global.d. No default values.
Use as many of these commands as necessary.
getEventsFrom INST_UW MOD_WILDCARD
getEventsFrom INST_MENLO MOD_WILDCARD
# maxSta number
# The number of stations to be used by gmew must be specified with
# the maxSta command. This is the number of unique SNs to be used; each
# SN combination can have any number of components. The maxSta command
# must come before any "Pri" commands.
maxSta 100
# maxDist km
# The maximum epicenter - station distance in kilometers.
# Stations lying outside this radius will not be used by gmew.
#
maxDist 600
# maxTrace nsamples
# The maximum number of trace data samples to process from one SCNL.
# This is the product of the trace length in seconds and the highest
# expected sample rate. For example, 10 minutes of data at 100 samples per
# second gives 60000 samples.
maxTrace 60000
# staLoc: station location source
# Choices: File < loc-file> - get station locations from a hyp2000-format
# file named loc-file
# EWDB - query the EW database for station locations; access info
# given below.
staLoc File /earthworm/run/params/hypoinverse/stas/uw_sta.hinv
# Regional Velocity model: must be specified as "@vel_model_file". Typically
# this will be the same file as used for binder_ew.
@uw_velocity.d
# traceSource: Where gmew will obtain trace data
# choices are: waveServer- raw traces from wave_servers;
# server-list is either a space separated list
# of ip-address:port or
# "File"
# default: waveServer with list of servers read from $EW_PARAMS/servers
traceSource waveServer 123.45.67.89:16021 123.45.67.89:16022
# Add STA COMP NET
# Del STA COMP NET
# SCNL selection is done by a selection list and a rejection list.
# The station selection command `Add' specifies the names of
# STA (station), COMP (component), and NET (network).
# The wildcard `*' may be used for any or all of STA, COMP, NET.
# COMP may be given as the first two letters of the component name,
# to select all direction desgnators are accepted for that component.
# If no Add commands are given, all SCNLs will be selected.
# The Del command is used to put SCNLs on the rejection list:
# for example: "Add * EL UW" followed by "Del LAB EL UW" to include
# all ELE and ELN components from UW except LAB.ELE.UW and LAB.ELN.UW.
# List as many Add and Del commands as desired, one to a line
Add * BH *
Add * HH *
Add * SL *
Add * EL *
Del LAB * UW
# respSource: Tells gmew where to get response information;
# Choices: EWDB - query the EW databse for pole-zero-gain responses.
# File < dirname*gt; < pz-filename-format> - find response files in the
# directory dirname. dirname can be
# a full directory name, or relative to $EW_PARAMS.
# filename-format is a string similar to printf
# format: %S, %C, %N are replaced by station,
# component and network names, respectively,
# all in upper case. Similarly %s, %c, %n work
# for lower-case station, component and network.
# The digraph %% stands for %; all other
# characters are taken literally.
# The response file format is that used by SAC.
#
# default: none; you must specify one of the above choices.
respSource File responses %S_%C_%N.pz
# traceTimes start end
# The start and end times for traces is set here.
# < start> is the number of seconds before estimated P arrival to start
# the trace.
# <end> is the number of seconds after estimated S arrival to end the trace.
# default: traceTimes 5.0 60.0 # starts trace 5 seconds before estimated P
# arrival and ends trace 60 seconds after estimated S arrival.
traceTimes 5.0 60.0
# searchWindow A B C D
# The time window for searching for peak amplitudes is set here.
# <A> is the multiple of the estimated interval P - S to start the
# search before estimated S arrival.
# <B> is the minimum number of seconds before estimated S arrival to
# start the peak search.
# <C> is the multiple of the estimated interval P - S to end the
# search after the estimated S arrival.
# <D> is the minimum number of seconds after estimated S arrival to
# start the peak search.
# default: searchWindow 0.0 2.0 0.0 30.0 # Search window runs from 2 seconds
# before to 30 seconds after the estimated S arrival, independent of
# the P - S interval.
searchWindow 0.0 2.0 0.0 30.0
#saveTrace: whether and how to save synthetic ground-motion traces
# If saveTrace command is absent, no traces will be saved.
# Choices: SAC <baseDir> <dirFormat> <filename-format> -
# save gm traces in SAC-format files.
# baseDir specifies a fixed directory name.
# dirFormat gives a formattted subdirectory name; the
# format string is that used for the "date" command applied
# to the event origin time, with the addition of `%i'
# to indicate the event ID. Be careful with this; some
# formats produce output not compatible with file names.
# filename-format gives the formatted file name using
# % to introduce one of the format specifiers "sScCnN%"
# `s' is the station name in lower case; `S' is upper case
# Likewise for component and network names; `%' stands for
# itself. All other characters are taken literally.
#
# default: None (no traces are saved.)
# XMLDir dirname
# Optional command to cause ground-motion results to be written to
# a ShakeMap XML file. This directory must already exist.
XMLDir Shake/input
# TempDir dirname
# Temporary directory for writing XML file. If XMLDir is given, TempDir must
# also be given. On Solaris (Unix), these two directories should be on
# the same filesystem. This will ensure that the XML file will be complete
# as soon as it is moved into XMLDir. This directory must already exist.
TempDir Shake/temp
# MappingFile filename
# To provide descriptive names in the shakemap XML file, a mapping file
# may optionally be given. This file contain mappings of SCNL to instrument
# type, SN to long station names, and N to agency names.
MappingFile PNSN.map
# Debug N
# There are several different debug features, listed below.
# You can give one Debug command for each feature you want to turn on,
# or you can add together the values of desired features and give
# one Debug command.
# value feature
# 1 trace and search times and P and S arrival estimates
# 2 SCNL selection tests
# 16 ws_client debugging
# 32 poles. zeros and gain values
# 64 trial frequency response functions to STDOUT
# 128 full frequency response function to STDOUT
# SCNL Parameters: normally this command will be given as "@SCNL_param_file"
# to cause the separate file "SCNL_param_file" to be processed.
# watchForAlarm S
# Recognize ACTIVATE_MODULE messages to initiate processing for a window
# S seconds long
#watchForAlarm 30
# AddSpectraResponseAt period
# Add period to the list being processed
# The first replaces the default list (0.3, 1.0, 3.0)
# This does NOT affect what gets written to the ShakeMap XML
#AddSpectraResponseAt 2.0
#AddSpectraResponseAt 2.5