### you must replace this file name with local SAC file name
infile='VLI.BHZ.SAC'
ZZ = ZGET.sac(infile)
dt = ZZ$dubs[ which(ZZ$dubnames=='delta') ]
yr = ZZ$mints[which(ZZ$mintnames=="nzyear")]
jd= ZZ$mints[which(ZZ$mintnames=="nzjday")]
hr= ZZ$mints[which(ZZ$mintnames=="nzhour")]
mi= ZZ$mints[which(ZZ$mintnames=="nzmin")]
sec= ZZ$mints[which(ZZ$mintnames=="nzsec")]
msec=ZZ$mints[which(ZZ$mintnames=="nzmsec")]
sec = sec+msec/1000
DATTIM=list(yr=yr, jd=jd, hr=hr, mi=mi, sec=sec)
### the SAC file does not have the correct names, so we read from the
### input file names
sta = substr(infile, 1,3)
comp = substr(infile, 7,7)
Run the code above in your browser using DataLab