[SAC-HELP] SAC interact with csh

Ching-Wen Chen civyfei at gmail.com
Tue Oct 21 13:14:23 PDT 2008


Dear All,

I am writing an instrument response correction script. I set stations' name
and event seperately. It works for "read" in SAC, but not for trans
polezero.  Any suggestion on this one?  Thank your for your time and effort.

--

set STA = "GAC"
set EVENT = "200411150906"
set YYYY =  "2004"
set DISN = `cat stadis | grep $STA | awk '{ print $4 }'`
set STANUM = `cat stadis | grep $STA | awk '{ print $2}'`
/bin/cp 20*.$STA..BHZ.D.SAC D$DISN.$STANUM.$STA.Z
if (-e D$DISN.$STANUM.$STA.Z ) then
sac2000 << !

### read  works####
r  D$DISN.$STANUM.$STA.Z
rmean
taper
p1
########## This doesn't work due to $YYYY and $EVENT
trans from polezero s
/data/cchen/Ontario_CN/CNSN_sac/$YYYY\_sac/$EVENT/Resp_files/$STA\_BHZ to
polezero s
/data/cchen/Ontario_CN/CNSN_sac/generic_resp_files/SAC_PZs_resp03.HHZ
##########

w over
!
endif

-----


Chingwen Chen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.iris.washington.edu/pipermail/sac-help/attachments/20081021/094c49f2/attachment.html>


More information about the sac-help mailing list