Thread: getfhv - t0 marker

Started: 2011-04-24 19:10:37
Last activity: 2011-04-24 22:29:34
Topics: SAC Help
Kayla Kroll
2011-04-24 19:10:37
Hello,

I would like to get the 't0' header information from a large number of
events. The fortran code (f77) below works perfectly when I replace the 't0'
in the getfhv call by 'a', however when written as shown, I get the
following error:

* ERROR: Undefined header field value. t0*

call rsac1(fn2,array,nlen,beg,del,max,nerr)
if (nerr.gt.0) then
print*, nerr
go to 8888
endif
call getfhv('t0',t0,nerr)
if(t0.lt.0) then
go to 9999
endif


I have also tried replacing 't0' with 't1' as it is in the manual, but that
produces the same error.

The data does exist in the headers:

[aten:EventWaveforms/0406_0614/10145282] kakroll% sac
SEISMIC ANALYSIS CODE [02/05/2008 (Version 101.1)]
Copyright 1995 Regents of the University of California

SAC> r *ZY*EHN*sac
10145282.ZY.COON.EHN.sac 10145282.ZY.MLDN.EHN.sac 10145282.ZY.OCCM.EHN.sac
10145282.ZY.OYSB.EHN.sac 10145282.ZY.PNTO.EHN.sac 10145282.ZY.SHCM.EHN.sac
10145282.ZY.USG.EHN.sac 10145282.ZY.WAGN.EHN.sac
SAC> lh t0


FILE: 10145282.ZY.COON.EHN.sac - 1
------------------------------

t0 = 5.096052e+00

FILE: 10145282.ZY.MLDN.EHN.sac - 2
------------------------------

t0 = 3.196018e+00

FILE: 10145282.ZY.OCCM.EHN.sac - 3
------------------------------

t0 = 3.546471e+00


Any help would be appreciated.

Thank you,
Kayla Kroll
UC Riverside

  • Arthur Snoke
    2011-04-24 22:29:34
    I have not looked aat the code, but I have looked at the discussion about
    header variables in the manual, and I think your problem is that the
    origin time is not an explicit header variable. In fact, it says that you
    can introduce ten different times t0-t9.

    One way that might work for you is to use ch to define t0 to be the
    origin time and then work with the t0 you have defined.

    On Sun, 24 Apr 2011, Kayla Kroll wrote:

    Hello,

    I would like to get the 't0' header information from a large number of
    events. The fortran code (f77) below works perfectly when I replace the 't0'
    in the getfhv call by 'a', however when written as shown, I get the
    following error:

    ERROR: Undefined header field value. t0

    call rsac1(fn2,array,nlen,beg,del,max,nerr)
    if (nerr.gt.0) then
    print*, nerr
    go to 8888
    endif
    call getfhv('t0',t0,nerr)
    if(t0.lt.0) then
    go to 9999
    endif


    I have also tried replacing 't0' with 't1' as it is in the manual, but that
    produces the same error.

    The data does exist in the headers:

    [aten:EventWaveforms/0406_0614/10145282] kakroll% sac
    SEISMIC ANALYSIS CODE [02/05/2008 (Version 101.1)]
    Copyright 1995 Regents of the University of California

    SAC> r *ZY*EHN*sac
    10145282.ZY.COON.EHN.sac 10145282.ZY.MLDN.EHN.sac 10145282.ZY.OCCM.EHN.sac
    10145282.ZY.OYSB.EHN.sac 10145282.ZY.PNTO.EHN.sac 10145282.ZY.SHCM.EHN.sac
    10145282.ZY.USG.EHN.sac 10145282.ZY.WAGN.EHN.sac
    SAC> lh t0


    FILE: 10145282.ZY.COON.EHN.sac - 1
    ------------------------------

    t0 = 5.096052e+00

    FILE: 10145282.ZY.MLDN.EHN.sac - 2
    ------------------------------

    t0 = 3.196018e+00

    FILE: 10145282.ZY.OCCM.EHN.sac - 3
    ------------------------------

    t0 = 3.546471e+00


    Any help would be appreciated.

    Thank you,
    Kayla Kroll
    UC Riverside


05:17:56 v.ad6b513c