Thread: Re: sac-help Digest, Vol 18, Issue 3

Started: 2006-12-04 00:16:27
Last activity: 2006-12-04 00:16:27
Topics: SAC Help
Eva-Maria Rumpfhuber
2006-12-04 00:16:27
Hey Januka,

I usually use a csh-script to sort data, and use sac just to extract the
header information. You can try something like this, the following script
will extract you the header information and store it in a file I called

Let me know, if it doesn't work.
Good luck, eva

# This is a script to extract header information from a
# sac file.

# Selects all seismograms sorted by events
# (you need to change print $2 to what works for you)
set event = ` ls *.sac | nawk -F. '{print $2}' | sort | uniq `

@ i = 1
@ end = $#event + 1
echo Number of events: $#event

# Loop over the events
while ( $i < $end )
echo Processing event: $event[$i]

set file_r = *"."$event[$i]".sac"
echo Input file: $file_r

# start sac and read+write header values
sac <<eof
r $file_r
setbb evid $event[$i]
setbb lat &1,evla
setbb lon &1,evlo
setbb dp &1,evdp
setbb gcdeg &1,gcarc
setbb gckm &1,dist
setbb baz1 &1,baz
setbb rayp &1,user0
getbb TO temp.file names off newline off evid baz1 rayp

cat temp.file >>rayp.list
\rm -f temp.file

@ i = $i + 1

----- Original Message -----
From: <sac-help-request<at>>
To: <sac-help<at>>
Sent: Sunday, December 03, 2006 2:00 PM
Subject: sac-help Digest, Vol 18, Issue 3

Send sac-help mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

When replying, please edit your Subject line so it is more specific
than "Re: Contents of sac-help digest..."

Today's Topics:

1. GCARC (Januka Attanayake)


Message: 1
Date: Sat, 2 Dec 2006 22:41:04 -0500
From: "Januka Attanayake" <jattanayake<at>>
To: sac-help<at>
Content-Type: text/plain; charset="iso-8859-1"

I am interested in seperating a bunch of seismograms according to
GCARC values, for example, bunch up all the seismograms that are between
100 & 120 together ... so on and so forth. Is it possible to do this in
any clues?

Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...


sac-help mailing list

End of sac-help Digest, Vol 18, Issue 3

Eva-Maria Rumpfhuber

University of Texas at El Paso / University of Oklahoma
810 Sarkeys Energy Center
100 E. Boyd Street
Norman, OK 73019-1009

phone: +1-405-325-1563
email: erumpfhuber<at>
Wheresoever you go, go with all your heart.

00:59:17 v.22510d55