Hi,
I am using the LIBSAC libraries to read header values into a fortran code. I
am having trouble reading in the 'dist' header field.
The rsac call in the fortran code does not return an error, as other header
values can be read. The call to get the 'dist' header value is:
call getfhv('dist',dist,nerr)
But when running on a sac file, I get an error saying that the field is
undefined...
ERROR 1336: Undefined header field value. dist
However, when I use sac and open this same file and list the header values,
there is a defined value present for this header.
$ sac << EOF
Copyright 1995 Regents of the University of California
FILE: compR.lhn - 1
---------------------------
dist = 8.346584e+03
delta = 1.000000e+00
$
This error only seems to happen for the 'dist' field. Unless of course the
value is truly undefined and also does not appear in a sac 'lh' command.
Any insight would be much appreciated.
cheers,
Andrew Schaeffer
I am using the LIBSAC libraries to read header values into a fortran code. I
am having trouble reading in the 'dist' header field.
The rsac call in the fortran code does not return an error, as other header
values can be read. The call to get the 'dist' header value is:
call getfhv('dist',dist,nerr)
But when running on a sac file, I get an error saying that the field is
undefined...
ERROR 1336: Undefined header field value. dist
However, when I use sac and open this same file and list the header values,
there is a defined value present for this header.
$ sac << EOF
r compR.lhnSEISMIC ANALYSIS CODE [08/24/2009 (Version 101.3b)]
lh dist delta
q
EOF
Copyright 1995 Regents of the University of California
FILE: compR.lhn - 1
---------------------------
dist = 8.346584e+03
delta = 1.000000e+00
$
This error only seems to happen for the 'dist' field. Unless of course the
value is truly undefined and also does not appear in a sac 'lh' command.
Any insight would be much appreciated.
cheers,
Andrew Schaeffer
-
Andrew,
I would first suggest doing the following commands in sac.
read compR.lhn
write over
quit
When sac reads a file, it will compute location parameters and max/min/
mean values if it can. The sacio library does not do this
automatically, but it probably should.
If this does not work, then we have problems.
Brian
savage<at>uri.edu
On Mar 18, 2010, at 5:08 AM , Andrew Schaeffer wrote:
Hi,
I am using the LIBSAC libraries to read header values into a fortran
code. I am having trouble reading in the 'dist' header field.
The rsac call in the fortran code does not return an error, as other
header values can be read. The call to get the 'dist' header value is:
call getfhv('dist',dist,nerr)
But when running on a sac file, I get an error saying that the field
is undefined...
ERROR 1336: Undefined header field value. dist
However, when I use sac and open this same file and list the header
values, there is a defined value present for this header.
$ sac << EOF
r compR.lhn
SEISMIC ANALYSIS CODE [08/24/2009 (Version 101.3b)]
lh dist delta
q
EOF
Copyright 1995 Regents of the University of California
FILE: compR.lhn - 1
---------------------------
dist = 8.346584e+03
delta = 1.000000e+00
$
This error only seems to happen for the 'dist' field. Unless of
course the value is truly undefined and also does not appear in a
sac 'lh' command.
Any insight would be much appreciated.
cheers,
Andrew Schaeffer
_______________________________________________
sac-help mailing list
sac-help<at>iris.washington.edu
http://www.iris.washington.edu/mailman/listinfo/sac-help