NAME
event_archive - make event archive database
SYNOPSIS
event_archive [-v] [-V] [-n] [-x] [-m mail_to]
[-p parameter_file]
[-l latency_days]
[-t tmpdb]
[-w wf_format]
[-M dbmaster]
[-I dbidserver]
[-s start_time]
[-e end_time]
dbin archive_db
DESCRIPTION
event_archive is designed to subset the events from an reviewed database,
keeping time windows which are specified by the parameter file. The
basic assumption for this program is that the input database
dbin
has been reviewed by an analyst, that the reviewed origins have
the 'reviewed' field set to
y, and that
dbin passes dbverify without
any significant problems.
event_archive only archives events which
do not already exist in
archive_db.
event_archive is designed to
work as part of a continuous real-time data acquisition system.
event_archive archives all reviewed arrival, assoc, origin, origerr,
event, netmag, and stamag, rows whether or not a corresponding waveform segment
exists. In multiple datastream systems where there might be, for example,
HH channels at 100 sps, BH channels at 40 sps, LH channels at 1 sps,
the default is to save HH channels for local events, BH channels for
regional events and teleseismic bodywaves, and LH channels for large
surface wave magnitude events. In the case where the desired waveform
segments overlap for multiple events, the overlap is removed by merging
the overlapping waveforms into one longer waveform.
The arrival channel codes are changed
from the original picked channel (such as HHZ) to the channel code
of the appropriate archived waveform (such as BHZ for teleseisms).
The event type subset can be modified as necessary in the parameter file.
OPTIONS
-
-v
verbose
-
-V
Extremely verbose. Used for debugging purposes only.
-
-n
Archive non-reviewed events. CAVEAT EMPTOR!
-
-x
Disable system resource check.
-
-m mail_to
Email address(es) for error notification, should be quoted if using multiple addresses.
-
-p parameter_file
Name of parameter file to use. $PFPATH is searched to find parameter file.
The default parameter file name is event_archive.
-
-l latency_days
Number of days to wait until an event is archived. This is very useful if you are
associating your event catalog with an external catalog such as the qed_weekly
which may be updated 7-14 days behind real time.
-
-t tmpdb
Name of temporary database to use. The default is tmp_$$ where $$ is the
process id.
-
-w wf_format
Naming format for waveform files according to trwfname(3). The default is
wf/%Y/%j/%Y%j%H.w.
-
-M dbmaster
Master database to archive with which contains site, sitechan, etc. Only used when
starting a new output archive database. Otherwise ignored.
-
-I dbidserver
dbidserver to use when
starting a new output archive database. Otherwise ignored.
-
-s start_time
Start time of events to process from dbin. The default is to process the
complete dbin database.
-
-e end_time
End time of events to process from dbin. The default is to process the
complete dbin database.
ENVIRONMENT
needs to be called from rtexec or have sourced /opt/antelope/setup.csh. Need
environment variable $PFPATH to be set.
PARAMETER FILE
event_archive parameter file elements are:
-
local_range
Maximum distance in degrees to nearest station to define local event.
Default is 3 degrees
-
max_dist_scale
Scale factor to maximum delta of arrivals to determine distance range within
which to save waveforms.
For example if the furthest station with an arrival for an event is
2.0 degrees from the epicenter, and max_dist_scale = 2.0, then the waveforms from
all stations within a 4.0 degree radius of the epicenter are archived.
Default is 1.5.
-
arrival_pref
ordered list by priority of channel codes for arrivals. First element has highest
priority.
-
event_type
associative array to set parameters for different types of event segmentation.
event types are local, regional, mbbig, mbmedium, mbsmall, msbig, mssmall.
-
event_type elements
each event type has an associative array containing:
event_set - character string which defines event subset
pre_event - number of seconds saved in waveform before
first arrival
post_event - number of seconds saved in waveform after
last arrival
channel_pref - ordered list of channels to prioritize
waveform channels. Will handle Antelope seed-loc
code channel conventions.
EXAMPLE PARAMETER FILE
local_range 3 # Maximum distance in degrees to
# nearest station to define local event
max_dist_scale 1.5 # Scale factor to maximum delta of arrivals
# to determine distance range
# within which to save waveforms
arrival_pref &Tbl{
H
E
B
S
}
event_type &Arr{
local &Arr{
event_set ($mindelta <= $local_range)
pre_event 30
post_event 60
channel_pref &Tbl{
H.*
E.*
B.*
S.*
}
}
regional &Arr{
event_set (($mindelta > $local_range) && ($mindelta < 25.))
pre_event 60
post_event 600
channel_pref &Tbl{
B.*
S.*
H.*
E.*
}
}
mbbig &Arr{
event_set ($mb >= 5.5 || ($mb >= 5.0 && $depth > 70))
pre_event 300
post_event 3600
channel_pref &Tbl{
B.*
S.*
H.*
E.*
}
}
mbmedium &Arr{
event_set ($mb >= 5.0 || $ms >= 5.0)
pre_event 300
post_event 1200
channel_pref &Tbl{
B.*
S.*
H.*
E.*
}
}
mbsmall &Arr{
event_set ($mindelta > 25.)
pre_event 300
post_event 600
channel_pref &Tbl{
B.*
S.*
H.*
E.*
}
}
msbig &Arr{
event_set ($ms >= 6.2)
pre_event 600
post_event 10800
channel_pref &Tbl{
L.*
B.*
}
}
mssmall &Arr{
event_set ($ms >= 5.5)
pre_event 600
post_event 5400
channel_pref &Tbl{
L.*
B.*
}
}
}
RETURN VALUES
0 if successful, 1 if not.
SEE ALSO
pf(3)
pfecho(1)
rtexec(1)
dbmerge(1)
trexcerpt(1)
trwfname(3)
BUGS AND CAVEATS
event_archive only archives events which have origin times
before the latest endtime in the wfdisc table. Events with
later origin times are not archived.
event_archive checks to see if files named .rtdbclean or .event_archive exist
and are locked. If either of these files are locked then event_archive does not
execute. This is to avoid potential situations which can
either corrupt the rt_db database and/or corrupt the execution of event_archive.
Other programs which can lock .rtdbclean are rtdbclean,
mk_dmc_seed,
dmc_nrtwf,
rtbackup,
event_archive.
AUTHOR
Frank Vernon
Boulder Real Time Technologies, Inc.