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 -x
#####
# set up directory structure for an event that we get from the IRIS
#####
export MYPWD=`pwd`
#####
# test usage
#####
if [ $# -ne 15 ]
then
echo DOCWB YEAR MO DY HR MN SC MSC LAT LON DEP MAG REG NEIC FELTID STATE
echo DOCWB 2006 02 05 08 17 04 000 66.25 -143.02 18.60 5.1 CUS iuae Xiuae_06 Alaska
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}"
#####
# now run three scripts that set up everything
# DOSETUP - sets up the directory structure for the inversion
# DOQUERY - sets up the directory structure for the Query
# DOSOLUTION - runs the moment tensor solution through the grid search
#####
cd ${MYPWD}
./DOSETUP "${YEAR}" "${MO}" "${DY}" "${HR}" "${MN}" "${SEC}" "${MSEC}" "${LAT}" "${LON}" "${DEP}" "${MAG}" "${REG}" "${NEIC}" "${FELTID}" "${STATE}" "${MYPWD}"
cd ${MYPWD}
./DOQUERY "${YEAR}" "${MO}" "${DY}" "${HR}" "${MN}" "${SEC}" "${MSEC}" "${LAT}" "${LON}" "${DEP}" "${MAG}" "${REG}" "${NEIC}" "${FELTID}" "${STATE}" "${MYPWD}" > out 2>&1
cd ${MYPWD}
./DOSOLUTION "${YEAR}" "${MO}" "${DY}" "${HR}" "${MN}" "${SEC}" "${MSEC}" "${LAT}" "${LON}" "${DEP}" "${MAG}" "${REG}" "${NEIC}" "${FELTID}" "${STATE}" "${MYPWD}"
Last changed May 21, 2022