[SAC-HELP] get header data

Peter Goldstein peterg at llnl.gov
Mon Oct 9 18:02:14 PDT 2006


As Art suggests, saclst will hopefully provide 
the header list capabilities you need.
In the short term you can hopefully get by using listheader within a script and
redirect the output to the file you want.

Something like the following script could be invoked as
sac_lh.csh "your_filename"
Note that the blank lines are needed to get all the headers and you'll
still have to edit the results if you want a particular format or to get rid of
extraneous information and blank lines.


#!/bin/csh -xvf
# sac_lh.csh: script to list sac header listing to standard out
sac<<eof
r $argv[1]
lh inclusive on




q
eof
# end of sac_lh.csh

>Good morning,
>
>I'd like to get some information in the header but the subroutines getfhv
>doesn't seem to work for depmin, depmax and dist
>
>in a fortran code:
>
>call GETFHV ('DEPMIN', depmin, nerr)
>
>I got this error message:
>ERROR: Undefined header field value. DEPMIN
>
>but it works for:
>
>call GETNHV ('NZYEAR', nyear, nerr)
>
>is there a bug? or an other way to extract data from the header?
>
>Best regards
>
>HÈloÔse
>CETE Nice, LGIT Grenoble
>
>
>
>_______________________________________________
>sac-help mailing list
>sac-help at iris.washington.edu
>http://www.iris.washington.edu/mailman/listinfo/sac-help


-- 

Peter Goldstein, Ph.D.      (925) 423-1231 (office) 
  L-103, PO Box 808        (925) 422-5844 (fax)    
  Livermore, CA 94551      peterg at llnl.gov (email) 
  web page: http://www.llnl.gov/sac




More information about the sac-help mailing list