Thread: Re: sacio.a data size

Started: 2007-08-02 16:26:55
Last activity: 2007-08-02 20:40:32
Topics: SAC Help
John D. West
2007-08-02 16:26:55
That's great, Phillip! I thought about doing it either way and wasn't
sure which was easier. I appreciate your help and the sample programs.

-- John


Philip Crotwell wrote:
Instead of using sacio.a, you might want to just use a simple struct
to get the header and read it yourself. By reading the just the
header, you get npts and then can do memory allocation yourself.
Attached are a .h file that matches the sac header and a simple C
program to read and write it. It might be easier than using sacio.a.



  • Arthur Snoke
    2007-08-02 20:40:32
    I cam in late on this discussion, but I want to point out that there is a
    program that comes with version 101.0, saclst, that is self-contained and
    give header variables in many useful outputs.

    [snoke@equake /usr/local/sac/bin]> saclst help
    Usage: saclst header_values f file_lists
    ex. saclst delta npts kstnm f sacfile1 sacfile2
    All Values are case insensitive, except F
    If header_values = default - All Defined Values, 2 Columns
    If header_values = default1 - All Defined Values, 1 Column
    If header_values = all - All Values
    If header_values = Full - All Values Formatted (capital F)
    Available SAC Header Values
    Time-series Values
    b e o a F ko ka kf
    npts delta depmin depmax depmen scale nvhdr
    Station and Event Values
    kstnm stlo stla stel stdp
    kevnm evlo evla evel evdp
    dist az baz gcarc khole
    kcmpnm knetwk kdatrd kinst cmpaz cmpinc
    iftype idep iztype iinst istreg ievreg ievtyp iqual isynth
    Timing Values
    kzdate kztime odelta
    nzyear nzjday nzmonth nzday nzhour nzmin nzsec nzmsec
    Picks, Response, and User Values
    t0 t1 t2 t3 t4 t5 t6 t7 t8 t9
    kt0 kt1 kt2 kt3 kt4 kt5 kt6 kt7 kt8 kt9
    resp0 resp1 resp2 resp3 resp4 resp5 resp6 resp7 resp8 resp9
    user0 user1 user2 user3 user4 user5 user6 user7 user8 user9
    kuser0 kuser1 kuser2
    [snoke@equake /usr/local/sac/bin]>



05:33:11 v.22510d55