NAME
scec2db - retrieval and conversion of SCEC bulletin
SYNOPSIS
scec2db
[-v]
[-d|-w|-m]
[-f file]
[-s start_time]
[-e end_time]
-c {catread|scecdc|hypo71|hypo2000}
db_to_update
SUPPORT
Contributed code: NO BRTT support.
THIS PIECE OF SOFTWARE WAS CONTRIBUTED BY THE ANTELOPE USER COMMUNITY. BRTT DISCLAIMS ALL OWNERSHIP, LIABILITY, AND SUPPORT FOR THIS PIECE OF SOFTWARE.
FOR HELP WITH THIS PIECE OF SOFTWARE, PLEASE CONTACT THE CONTRIBUTING AUTHOR.
DESCRIPTION
When processing real-time data it is helpful to have external catalogs
against which you can associate your locations (using dbassoc_rt(1)). One
source of this external catalog for southern California is SCEC, the
Southern California Earthquake Center which runs the TriNet network. They
produce a reviewed bulletin which is available via a web search. This
script attempts to automate the retrieval of their bulletin and the update
of your local catalog. It can also be used to convert a preexisting file
from one of the supported formats to a css3.0 origin table.
Formats
SCEC distributes their catalog in seven different formats: catread, scec_dc
CNSS, Simpson Map, Hypoinverse2000, Hypo71, and Hypoinverse phase. Currently,
scec2db only supports the hypo71, hypo2000, catread and scec_dc formats.
-
catread
A basic bulletin output. Note that the magnitude field size is limited
and there is no explanation of event type (etype will be blank in origin
table). Magnitude is assumed to be ml.
Example of catread format listing:
2001 02 21 09 00 58.33 36 4.24-117 50.40 A 1.5 4.78 0 0.15 9630697
2001 02 21 11 01 05.94 33 27.87-116 27.40 A 1.1 13.63 0 0.10 9630701
2001 02 21 11 49 12.22 34 50.85-116 24.45 A 1.6 3.93 0 0.09 9630713
-
scecdc
More information than catread. Magnitudes may be of different type, etype
is specified. Information about number of data files is ignored.
2001/02/21 09:00:58.3 le 1.5 l 36.071 -117.840 4.8 A 9630697 0 117 0 0
2001/02/21 11:01:05.9 le 1.1 l 33.465 -116.457 13.6 A 9630701 0 87 0 0
2001/02/21 11:49:12.2 le 1.6 l 34.847 -116.408 3.9 A 9630713 0 76 0 0
-
CNSS
NOT SUPPORTED YET.
-
Simpson Map format
NOT SUPPORTED.
-
Hypoinverse2000
More information than you really need in unpleasantly long lines.
Example of hypo2000 format listing:
20010221090058.6336 3.48117 49.43 5.38 17160 60.12 4 0.59 0.37 7 H 40 l1.57 12.0l1.57 12.0 9630697L1.57 12.0
20010221110106.8333 29.01116 30.2112.95 10284 90.20 3 1.65 1.79 0 H 36 c1.45 5.0c1.45 5.0 9630701 1.45 5.0
20010221114912.3234 51.51116 24.46 4.25 6151 70.11
-
Hypo71
Hypo71 is more readable than, but is a subset of, the Hypoinverse format.
Multiple magnitude types are supported, etype is specified, many comments
could be translated. This is the format I tend to use for retrieval.
Example of hypo71 format listing:
20010221 0900058.63 36 3.48 117 49.43 5.38 l 1.57 17 160 6.0 0.12 0.6 0.4LAH 9630697
20010221 1101006.83 33 29.01 116 30.21 12.95 c 1.45 10 284 9.0 0.20 1.6 1.8LBH 9630701
20010221 1149012.32 34 51.51 116 24.46 4.25 l 1.94 6 151 7.0 0.11 8.2 11.1LDH 9630713
-
Hypoinverse phase format
With this format you could create arrival/assoc tables. NOT SUPPORTED YET.
OPTIONS
-
-v
Make some noise about what's going on.
-
-V
Divulge more than is necessary about what's going on.
-
-d
Retrieve one day from bulletin.
Without -s or -e specified, time window is assumed to
be 24 hours prior to "now". When -s is specified with -d,
24 hours of data will be extracted after chosen start_time.
Supplying an end_time in conjunction with -d works similarly.
-
-w
Retrieve one week from bulletin.
Without -s or -e specified, time window is assumed to
be 7 days prior to "now". When -s is specified with -w,
7 days of data will be extracted after chosen start_time.
Supplying an end_time in conjunction with -w works similarly.
-
-m
Retrieve one month (31 days) from bulletin.
Without -s or -e specified, time window is assumed to
be 31 days prior to "now". When -s is specified with -m,
31 days of data will be extracted after chosen start_time.
Supplying end_time in conjunction with -m works similarly.
-
-s start_time
Retrieve events from bulletin with times greater than this value. Format must
comply with conventions for epoch(3). You must specify -m, -w,
-d or -s start_time. If -s start_time is chosen
without -m, -w, or -d and no -e end_time is
selected, the current time will be chosen as the last possible event time to retrieve.
-
-e end_time
Retrieve events from bulletin with times less than this value. Format must
comply with conventions for epoch(3).
-
-f filename
File containing SCEC format bulletin. Use this when you have a preexisting
file to convert and do not want to use the web interface to retrieve a new
catalog.
-
-c format
Required. Specify the format of the input file name (if using -f) or
choose one of the supported formats.
-
db_to_update
Required. Name of database you will create or update. Preexisting origin
tables that have origins for the requested time period will be updated with
new lat/lon/time/ml values if there have been changes. Any new origins will
be added.
FILES
A temporary file called tmp_
format is created.
ENVIRONMENT
Must have the standard Antelope environment variables.
PARAMETER FILE
No parameter file needed.
EXAMPLE
-
Get a catalog of events for the last week.
myhost% scec2db -w -c hypo71 catalogs/cit
/B>
-
Retrieve bulletin for a month of events starting on October 11, 1999
myhost% scec2db -m -c hypo71 -s "10/11/1999" catalogs/post_HM
/B>
-
The intent of this script was to have it run on a daily basis and update
a local catalog with any origins that were added or changed in the remote catalog.
This is easy to do when you have a running real-time system. Edit the
cron listing in the rtexec.pf file (See rtexec(1)). As I do not want to
overwhelm SCEC's site with requests, I check for updates for the last week
once each day and for the last month once each week (on the 5th day == Friday).
From rtexec.pf file:
crontab &Arr{
scec2db UTC 00 03 * * * scec2db -w -c catread catalogs/cit
scec2db UTC 00 06 * * 5 scec2db -m -c catread catalogs/cit
}
SEE ALSO
rtexec(1)
dbassoc_rt(1)
epoch(3)
http://epicenter.ucsd.edu/ANZA/faq/rtcatalogs.html
BUGS AND CAVEATS
When no -m, -w, or -d are chosen, -s must be used.
If no -e end_time is selected, the current date is used as the
last event time. If this time period is greater than 60 days, the program
will fail.
The -m, -w, and -d options can be overridden by the use
of -s and -e.
If your request is too large for the scec website to handle (or if too many
people are requesting data when you are), you will receive a message
like this:
perl: str2epoch: can't interpret '/'
** repeated 2 times
perl: str2epoch: can't interpret '<'
perl: str2epoch: no timezone 'PRE'
perl: str2epoch: can't interpret ':'
** repeated 2 times
This means that the file transfer was not completed. Thus you have an
incomplete file to translate to css3.0. Try making your search cover
a shorter time range or try your search at a later time when there is
less network traffic.
AUTHOR
Jennifer Eakins
jeakins@ucsd.edu
Univ. of Calif. San Diego
5/17/2001
Antelope User Group Contributed Software