#### DESCRIPTION #######################################################
########################################################################
##   Fixes a few issues with data acquired via SOD.                   ##
##                                                                    ##
##   Current List of Fixes:                                           ##
##       *removes stream code from KCMPNM (redundant with KHOLE)      ##
##       *force KHOLE to have stream code '__' if stream is empty     ##
##       *changes SAC header value IZTYPE from IB (begin time) to IO  ##
##          (origin time) as this is the reference frame - this also  ##
##          fixes the end-time SOD bug (this is be deprecated for SOD ##
##          versions >2.2.2 but will not affect them adversely)       ##
##                                                                    ##
##   Note: Does not expect that newfiles will have naming collisions. ##
##         If there are multiple sources for files from an event then ##
##         unintended overwrites could happen.                        ##
##                                                                    ##
##   LAST EDITED: Jun. 14, 2008 at 14:40 GMT by Garrett Euler         ##
##   VERSION INFO:                                                    ##
##            2.4: removed adding kevnm (not useful), added verbose   ##
##                 output for better logging                          ##
##            2.3: existence checks and threading                     ##
##                 removed issue with SAC's file limit                ##
##            2.2: fixes bugs added in last version                   ##
##            2.1: output directory added                             ##
##            2.0: error checks, keep '__' now                        ##
##            1.1: added in SAC header fixes                          ##
##            1.0: initial version                                    ##
########################################################################

#### USAGE #############################################################
########################################################################
##  Command line input:                                               ##
##     fixsod.pl db_dir new_data_dir nproc                            ##
##                                                                    ##
##     where:                                                         ##
##        *db_dir - top-level SOD directory for this dataset          ##
##        *new_data_dir - output data directory (under 'seismograms') ##
##                        eg. data-fixsod/                            ##
##        *nproc - number of processing threads for this task         ##
########################################################################

