John, These requests are handled by the IRIS user group. Please
refer to the
message below for contact info.
Cheers,
Peter
Please submit your question to the sac-help forum.
For details on this forum see the link at the bottom of the following
web page:
http://www.iris.edu/manuals/sac/index.htm
Cheers,
Peter
At 12:24 PM 8/24/2007, you wrote:
John Nabelek
College of Oceanic & Atmospheric Sciences
Oregon State University
104 Ocean Admin Bldg
Corvallis, OR 97331
e-mail: nabelek<at>coas.oregonstate.edu
tel: (541) 737-2757, fax: (541) 737-2064
refer to the
message below for contact info.
Cheers,
Peter
Please submit your question to the sac-help forum.
For details on this forum see the link at the bottom of the following
web page:
http://www.iris.edu/manuals/sac/index.htm
Cheers,
Peter
At 12:24 PM 8/24/2007, you wrote:
Hi Peter--
I am writing on behalf of my Nepali colleague Sudhir Rajaure. He has
written a sac macro, which appears fail due to bugs in parsing of
blackboard variables. He is running the macro on a linux box while I
have tried it on my mac with the same result.
Here are excerpts from his script illustrating the problem:
Basically sac fails whenever you try to use more than one blackboard
variable in a command or when bb variable is concatenated with other
text.
do file wild *BHZ*
setbb base ( BEFORE "BHZ" $file )
r %base%BHZ* %base%BHE* %base%BHN*
setbb c0 &1,o
setbb c1 &1,dist
evaluate to c2 ( %c1 / 1.5 ) + %c0
evaluate to c3 (%c0 - 5)
getbb
enddo
The script fails with segmentation errors at several levels.
r %base%BHZ* %base%BHE* %base%BHN* does not get correctly
concatenated resulting in a segmentation error.
I tried to work around this problem by writing a submacro that does
not require to use of multiple or concatenated blackboard variables.
do file wild *BHZ*
setbb base ( BEFORE "BHZ" $file )
macro readfiles.smac %base
setbb c0 &1,o
setbb c1 &1,dist
evaluate to c2 ( %c1 / 1.5 ) + %c0
evaluate to c3 ( %c0 - 5 )
getbb
enddo
The submacro (readfiles.smac) is simply:
r $1$BHZ* $1$BHE* $1$BHN*
This actually works and I can read the files as intended.
Now when I go to the next part of the main macro, I reach another
segmentation error at the command:
"evaluate to c2 ( %c1 / 1.5 ) + %c0"
In my testing, "evaluate to" appears to fails as soon as I you more
than one blackboard variable in it.
Peter, both Sudhir and I are not very experienced in writing sac
macros. I use sac data but usually outside of sac. Are we doing
something fundamentally wrong or is this a sac problem.
Another person on the sac message board seems to be complaining about
the same issue.
His script, which has similar structure, also fails:
do file wild *bhz
setbb base ( BEFORE "bhz" $file )
message "base is %base%"
r %base%bhz %base%bhe %base%bhn
synch
enddo
I am also attaching an example of Sudhir's data.
Cheers -John
John Nabelek
College of Oceanic & Atmospheric Sciences
Oregon State University
104 Ocean Admin Bldg
Corvallis, OR 97331
e-mail: nabelek<at>coas.oregonstate.edu
tel: (541) 737-2757, fax: (541) 737-2064