Thread: Re: SAC Issue

Started: 2009-11-04 01:40:52
Last activity: 2009-11-04 01:40:52
Topics: SAC Help
Chad Trabant
2009-11-04 01:40:52

Hi Stuart,

SAC is now a community developed and supported program, the best place
to find help is the sac-help mailing list (CC'd), list info is here: http://www.iris.washington.edu/mailman/listinfo/sac-help
.

What you describe smells like an endian issue, search through the
email archive I found this message:
http://www.iris.washington.edu/pipermail/sac-help/2009-January/000484.html

Using sac 101.2 I was able to successfully read back data written on
my little-endian Mac by changing the sample type ("datatype") in
the .wfdisc table-file from 't4' (big-endian) to 'f4' (little-
endian). So there is a bug in 101.2 regarding the correct sample type
designation, my guess is that it always writes host-endian floats and
always writes 't4' as the datatype which is causing problems on little-
endian machines.

Unfortunately the current release of SAC, 101.3b, seems to have
another bug in that it wouldn't even read the input css:

SEISMIC ANALYSIS CODE [08/25/2009 (Version 101.3b)]
Copyright 1995 Regents of the University of California

SAC> fg seismograph
SAC> writecss lala
-99999.00 truncated to (-99999.) in order to fit format requirements.
-99999.00 truncated to (-99999.) in order to fit format requirements.
-99999.00 truncated to (-99999.) in order to fit format requirements.
SAC> readcss lala.wfdisc
No wfdisc file(s) found in the specified directory
ERROR 1301: No data files read in.

Hopefully someone on this list will have time to look into that.

regards,
Chad


From: Stuart Weinstein <stuart<at>ptwc.noaa.gov>
Date: November 2, 2009 2:40:23 PM HST
To: Rhett Butler <rhett<at>iris.edu>
Subject: SAC Issue

Rhett,

Can you forward this email to someone at IRIS who can help us
understand and perhaps solve
the issue?

We are using SAC version 101.2, which was emailed to myself and
Chip by IRIS a few months
back. This is the LINUX version. We have discovered some odd
behavior.

CSS files written by writecss under SAC are not readable by
readcss. Oddly enough,
css files written on our SUNS (Big Endian) are readable by readcss
on LINUX (little Endian)!

Is there a switch or something that we are missing? The css files
written by SAC V101.2
for LINUX are not understandable by SAC on LINUX. We have confirmed
this behavior
numerous times by reading a SAC file, and writing it in CSS format
and the trying to read
it with readcss. We get nonsense. This procedure always works on
Solaris, but never on LINUX.

Thanks,

Stuart




04:59:43 v.22510d55