Hi all,
I'm encountering errors in reading miniseed data :
from obspy.core import read
# 28MB Warning!
!wget http://geophysique.be/tmp/liege83
st = read('liege83',format='MSEED')
outputs:
339 values= unpack('%sHHBBBxHHhhBBBxlxxH' % endian, data)
/home/seisvolc/anaconda/lib/python2.7/site-packages/obspy-0.9.0-py2.7-linux-x86_64.egg/obspy/core/utcdatetime.pyc in__init__(self, *args, **kwargs)
322 kwargs['second'] = int(args[5])
323 args= args[0:5]
--> 324 dt = datetime.datetime(*args, **kwargs)
325 self._fromDateTime(dt)
326
TypeError: Required argument 'month' (pos 2) not found
Using mseed2sac on the same machine,
seisvolc@seisvolc:~/tmp/mseed2sac-2.0$ ./mseed2sac liege83
GR_GRB2__BHZ_D: Warning: Data integrity check for Steim-1 failed,
last_data=-132, xn=-127
Wrote 1728000 samples to GR.GRB4..BHZ.D.1983.312.000000-1.SAC
Wrote 1728000 samples to GR.GRA2..BHZ.D.1983.312.000000-1.SAC
Wrote 1728000 samples to GR.GRB2..BHZ.D.1983.312.000000-1.SAC
Wrote 1728000 samples to GR.GRA3..BHZ.D.1983.312.000000-1.SAC
Wrote 1728000 samples to GR.GRB3..BHZ.D.1983.312.000000-1.SAC
Wrote 1728000 samples to GR.GRC3..BHZ.D.1983.312.000000-1.SAC
Wrote 1728000 samples to GR.GRC1..BHZ.D.1983.312.000000-1.SAC
Wrote 1728000 samples to GR.GRC4..BHZ.D.1983.312.000000-1.SAC
Wrote 1728000 samples to GR.GRA1..BHZ.D.1983.312.000000-1.SAC
Wrote 1728000 samples to GR.GRC2..BHZ.D.1983.312.000000-1.SAC
Wrote 1728000 samples to GR.GRA4..BHZ.D.1983.312.000000-1.SAC
Wrote 1728000 samples to GR.GRB5..BHZ.D.1983.312.000000-1.SAC
Wrote 1728000 samples to GR.GRB1..BHZ.D.1983.312.000000-1.SAC
It seems some errors are caught by libmseed, and mseed2sac passes successfully to process the data, while obspy crashes. For what I can tell, obspy and mseed2sac, both latest versions, use the latest libmseed 2.12.
Other read error, but with different data (steim1, 4096):
from obspy.core import read
!wget http://geophysique.be/tmp/gra1_831108_0000.bhz
st = read('gra1_831108_0000.bhz',format='MSEED')
gives:
/home/seisvolc/anaconda/lib/python2.7/site-packages/obspy-0.9.0-py2.7-linux-x86_64.egg/obspy/mseed/util.pyc
in _getRecordInformation(file_object, offset, endian)
412
413 info['number_of_records'] = long(info['filesize'] //
--> 414 info['record_length'])
415 info['excess_bytes'] = long(info['filesize'] %
info['record_length'])
416
KeyError: 'record_length'
which comes from block_size to be 0 just a few lines before.
but mseed2sac gives:
seisvolc@seisvolc:~/tmp/mseed2sac-2.0$ ./mseed2sac
/mnt/30years/data/1983/gra1_831108_0000.bhz
Wrote 1300000 samples to .GRA1..BHZ.D.1983.312.000000.SAC
Wrote 11200 samples to .GRA1..BHZ.D.1983.312.180330.SAC
Wrote 3800 samples to .GRA1..BHZ.D.1983.312.181300.SAC
Wrote 412400 samples to .GRA1..BHZ.D.1983.312.181620.SAC
Which seems to indicate that the trace 1) has no network code, 2) has gaps.
Finally, none of the 2 files above are readable using SeisGram2K60 from A. Lomax.
Any idea, lead to find the error ?
Best regards from Brussels,
Thomas