Oops.. Thanks for pointing that out, that was copy and paste error caused on
my side. This is the correct version:
do file wild *SAC
setbb vert $file
r %vert
setbb station &1,KSTNM
setbb otime &1,O
evaluate to cotime %otime * (-1.0)
ch ALLT %cotime IZTYPE IO
setbb network &1,KNETWK
setbb polezero %polezerod%%station%.%network%.PZ
w %vert
enddo
Also, the SAC version I use is 101.3b
Sorry about that,
Igor
On Tue, Jan 26, 2010 at 9:06 PM, Katie Boyle <Kboyle<at>lbl.gov> wrote:
my side. This is the correct version:
do file wild *SAC
setbb vert $file
r %vert
setbb station &1,KSTNM
setbb otime &1,O
evaluate to cotime %otime * (-1.0)
ch ALLT %cotime IZTYPE IO
setbb network &1,KNETWK
setbb polezero %polezerod%%station%.%network%.PZ
w %vert
enddo
Also, the SAC version I use is 101.3b
Sorry about that,
Igor
On Tue, Jan 26, 2010 at 9:06 PM, Katie Boyle <Kboyle<at>lbl.gov> wrote:
i'm not sure if it's causing the error, but you need to separate the read
command "r %vert" from the do loop "do file wild *SAC"
right now they are on the same line...
" r %vertdo file wild *SAC"
Igor Stubailo wrote:
Dear SAC users,--
Could you please help me to find out what's wrong with my file reading
sequence?
The code snippet from sac_LHZ.test:
...
do file wild *SAC
setbb vert $file
r %vertdo file wild *SAC
setbb station &1,KSTNM
setbb otime &1,O
evaluate to cotime %otime * (-1.0)
ch ALLT %cotime IZTYPE IO
setbb network &1,KNETWK
setbb polezero %polezerod%%station%.%network%.PZ
w %vert
enddo
...
The content of the current dir:
PTRP.TO.SAC LVOF.TO.SAC MMMR.TO.SAC
The errors:
do file wild *SACThe script I run:
./tr: line 4: 26622 Segmentation fault sac <<!
m sac_LHZ.test
quit
!
cat trsac <<!
m sac_LHZ.test
quit
!
If I comment out the lines "do file.." and "enddo" and read a single file
like:
setbb vert PTRP.TO.SAC
the code continues to execute fine.
So the problem is about using wild with *SAC.
Thanks,
Igor
------------------------------------------------------------------------
_______________________________________________
sac-help mailing list
sac-help<at>iris.washington.edu
http://www.iris.washington.edu/mailman/listinfo/sac-help
Katie Boyle
Lawrence Berkeley National Laboratory
510.486.4018