Introduction

Discussion of script

The script is given below. It is will commented. The only difference between this version and that for GMT Versions 5 and up is that DOSOLUTION is replaced by DOSOLUTION5.

#!/bin/bash
#####
#	set up directory structure for an event that we get from the IRIS
#####


#####
#	test usage
#####

if [ $# -ne 16 ]
then
echo DOSOLUTION YEAR MO DY HR MN SC MSC  LAT    LON    DEP  MAG REG NEIC FELTID STATE MYPWD
echo DOSOLUTION 2006 02 05 08 17 04 000 66.25 -143.02 18.60 5.1 CUS iuae Xiuae_06 Alaska /backup/rbh/MOMENT_TENSOR/MECH.NA
	echo $*
	exit 0
fi


#####
#	define internal variables: the quotes are required since some fields can have 
#       blank spacing within"
#####
YEAR="${1}"
MO="${2}"
DY="${3}"
HR="${4}"
MN="${5}"
SEC="${6}"
MSEC="${7}"
LAT="${8}"
LON="${9}"
DEP="${10}"
MAG="${11}"
REG="${12}"
NEIC="${13}"
FELTID="${14}"
STATE="${15}"
MYPWD="${16}"

cd ${MYPWD}
#####
#       now define the directory name
#####
DIR=${YEAR}${MO}${DY}${HR}${MN}${SEC}


#####
#	Waveform inversion
#####
cd ${MYPWD}/${DIR}/GRD.REG
DOGRD
DODELAY
DOPLTSAC
DOCLEANUP

#####
#	in the future do the documentation here
#####
cd ${MYPWD}/${DIR}/HTML.REG
DOHTML

Last changed May 21, 2022