NAME
db2ceef - Create CEEF format file from database
SYNOPSIS
db2ceef [-d] [-s subset_expression] [-p pffile]
dbin output_file
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
This program converts and writes selected database rows from
dbin to
output_file in CEEF format.
OPTIONS
-
-d
Display CEEF formatted output to STDOUT as it is generated.
-
-s subset_expression
Only rows for which subset_expression holds true will be converted to
CEEF format. The subsetting expression should be valid expression for a view
created via a join between origin and events tables and an outer join with
netmag table. The subsetting expression should be formatted according to the
documentation for dbexpressions(5). If time-strings are used within this
expression they should be enclosed in their own quotes and formatted
according to str2epoch(3).
-
-p pffile
Use the parameter file pffile instead of the default db2ceef.pf.
PARAMETER FILE
-
auth_source &Arr
Providing a mapping from auth field to a three letter source code to
be used in the Src field of output CEEF file.
-
source_default
Provides a default Src for any unmapped auth values.
-
magtype_priorities &Arr
Provides a priority value for possible magtype values. Higher priority
magtype values will be chosen for Pref field in CEEF file over
lower priority magtype values.
EXAMPLE
-shell$ db2ceef -d -s "(lat > 50.0)&&(lon < -129.0)" /path/to/dbin /path/to/output_file
Date Time Lat Lon Depth Magnitudes Src
yyyy mm dd hhmm ss.s km mb Mn ML MS MC Mw Othr Pref Mw
******************************************************************************************************************
+ 2013 03 01 0050 47.3 52.258 -131.918 14.98 2.97 2.97 GSC
+ 2013 03 01 0242 35.3 52.843 -132.244 20.00 GSC
+ 2013 03 01 0315 43.1 52.648 -131.813 10.32 GSC
+ 2013 03 01 0646 13.2 52.925 -132.558 14.40 GSC
+ 2013 03 01 0711 01.1 52.865 -132.194 0.00 GSC
+ 2013 03 01 0712 41.9 52.678 -131.895 16.00 GSC
+ 2013 03 01 0718 26.1 53.000 -132.126 16.00 GSC
+ 2013 03 01 0736 09.2 52.830 -132.153 0.00 GSC
+ 2013 03 01 0807 08.9 52.706 -131.927 6.62 GSC
...
-shell$ db2ceef /path/to/dbin /path/to/output_file
-shell$
BUGS AND CAVEATS
The Pref field in the output CEEF format file is taken as the highest
priority magtype for the preferred solution. If the preferred solution
has not magnitude value associated, the Pref field is left empty for
all origins associated with that event.
AUTHOR
Malcolm White, Geological Survey of Canada, Sidney, B.C.
April 2013
Antelope User Group Contributed Software