• Antelope Release 5.5 Linux 2.6.32-220.el6.x86_64 2015-04-21

 

NAME

db2sync - create a DCC-DMC Synchronization file of the data holdings in a Datascope database.

SYNOPSIS

db2sync   [-s start_time] [-e end_time] [-S subset_expression]
          [-p pf_file] [-a] [-l] [-d] [-h] [-o] [-w] [-v] dbin fileout

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

db2sync is designed to create a Synchronization file in the format constructed by the IRIS DMC from an existing Datascope database. The sync file is an ASCII text file with data holdings listed in the following format (preceded by an optional one-line header that has the form "DCC_name|modification_date"):

field|field|field|....

where the fields are network, station, location id, channel, start time, end time, max clock drift, sample rate, number of samples, channel flag (continuous or triggered data), station volume ID, DCC tape number, DMC volume number, comment, modification time - DMC, modification time - DCC.

db2sync will use the snetsta (or affiliation), schanloc and wfdisc (or optionally wftar) tables to write the rows of this text file, where each row in the sync file corresponds to one wfdisc entry. The sync file produced always includes values for network, station, channel, start time, and end time, and will include either blank values or non-blank values for all other fields based on the db2sync parameter file specifications. Also, the header line will be produced only if the '-h' option is specified.

The DMC has resources available on their website to use sync files to view Gaps/Overlaps in a data holding or to compare a data holding to the DMC's holdings of that same data. These tools can be found at http://www.iris.washington.edu/SeismiQuery/goat/abouttools.html.

OPTIONS

PARAMETER FILE

The required parameter file is used to specify which optional fields to fill with non-blank values in the output sync file. It also specifies the Data Collection Center name, which is used in the header in the -h option. The default pf file specifies '0' for all fields but DATE_LINE_MOD_DCC, and has blank values for CHANNEL_FLAG and DCC_NAME. An example db2sync parameter file is as follows:

#Pf file for db2sync

# Required Sync file fields are Network, Station, Channel,
# Time, Endtime.  They are missing from the pf file because
# all usable sync files must have those fields filled in.
# Db2sync will always fill in these fields.

#Optional Fields.

# '1' means include these values. '0' means print a blank
# value in that field

LOCATION                0
SAMPLE_RATE             0
NUMBER_OF_SAMPLES       0
DCC_TAPE_NUMBER         0
DATE_LINE_MOD_DMC       0
DATE_LINE_MOD_DCC       1

# Channel Flag has a value of 'C' for continuous data and
# 'T' for triggered, or blank for no specified value.

CHANNEL_FLAG            C

#Data Collection Center Name.  This is used in the header,
#  if a header is made.

DCC_NAME                Anza_Group

EXAMPLE


db2sync -v -s "2002001 00:00:00" -e "2003001 00:00:00"
        -S "sta=~/BZN/&&chan=~/B.*/" anza2review sync_out

Create a sync file of all the data contained in the dbin 'anza2review' for the year 2002 for station channels beginning with B of station BZN. The output file will be called sync_out. Output file should be in this format:

AZ|BZN||BHE|2003,001,00:00:00|2003,133,23:59:59|||||||||| AZ|BZN||BHE|2003,002,00:00:00|2003,134,01:19:34|||||||||| AZ|BZN||BHE|2003,002,01:19:35|2003,134,23:59:59|||||||||| AZ|BZN||BHN|2003,001,00:00:00|2003,133,23:59:59|||||||||| AZ|BZN||BHN|2003,002,00:00:00|2003,134,01:19:34||||||||||


DIAGNOSTICS


All messages are sent to
STDERR.

BUGS AND CAVEATS

Currently, values for 'max clock drift,' 'station volume,' 'DMC volume number' and 'comment' fields cannot be found in the Datascope database schemas, and so there is no option to write these values into the output sync file with this program.

This program is set to fail if the affiliation (with -a) or snetsta table does not join properly to the wfdisc (or wftar) table. If the wfdisc/wftar includes stations that are not listed in the affiliation table, the wfdisc/wftar will lose the rows that do not have affiliations. The program sees this and exits. Avoid this by making sure the affiliation table is complete or by using the -d option to force the program to continue producing the incomplete sync file. The same holds true for joining with the schanloc table (which only happens if LOCATION is set to 1 in the parameter file).

AUTHOR

Leah Ziegler, Jennifer Eakins
IGPP, Univ. of Calif. San Diego
jeakins@ucsd.edu
Antelope User Group Contributed Software
Printer icon