libdatrwxx fails with EDL data
Statement of the problem
This is a follow-up of issue #21 (closed) libdatrwxx fails when reading MiniSEED-data from EarthData loggers:
RECORD #1073
===========
Exception report:
message: ERROR (reading MiniSEED record): cannot find first blockette
triggered in "mseed/mseedread_mseedrecord_readheader.cc" at line #133
by violation of condition:
"(Mrecordheader.fblock < block.bytesize())"
terminate called after throwing an instance of 'datrw::Exception'
Identification of culprit
The culprit in this case is record no. 1073 in KB.TMO57.00.HHZ.D.2011.275 More precisely the problem occurs when reading beyond record no. 1072. After extracting the respective records: > mseedtest -reader day275.rec1073.mseed
dd if=KB.TMO57.00.HHZ.D.2011.275 of=day275.rec1072.mseed ibs=4096 obs=4096 skip=1071 count=1
dd if=KB.TMO57.00.HHZ.D.2011.275 of=day275.rec1073.mseed ibs=4096 obs=4096 skip=1072 count=1
dd if=KB.TMO57.00.HHZ.D.2011.275 of=day275.rec1074.mseed ibs=4096 obs=4096 skip=1073 count=1
Tests applied to these files:
record #1073
file: day275.rec1073.mseed
using standard input block size of 512 bytes
reader mode
===========
RECORD #1
===========
last sample of previous record: 0
Fixed Data Record Header:
Control Header:
sequence no: 000001
type: D
cont:
station identifier code: TMO57
location identifier: 00
channel identifier: HHZ
network code: KB
record start time: 275 02.10.2011 04:00:00.000000
number of samples: 2932
sample rate factor: 200
sample rate multiplier: 1
activity flags: 0
i/o and clock flags: 0
data quality flags: 0
number of blockettes: 1
time correction: 0
beginning of data: 0x40
first blockette: 0x30
Data Only SEED Blockette:
Data Record Blockette Header:
blockette type: 1000
address of next blockette: 0
encoding format: Steim (1) compression (10)
word order: SPARC or 68000 (1)
data record length: 4096 bytes (12)
reserved: 0
data:
number of samples in data: 2932
last sample of previous record: 0
first sample: 2261
last sample: 1691
sampling interval: 000d 00h 00m 00.005000s
length of record: 000d 00h 00m 14.655000s
start of this record: 275 02.10.2011 04:00:00.000000
expected start of next record: 275 02.10.2011 04:00:14.660000
RECORD #2
===========
record is invalid!
record 1072
> mseedtest -reader day275.rec1072.mseed
file: day275.rec1072.mseed
using standard input block size of 512 bytes
reader mode
===========
RECORD #1
===========
VIOLATION of condition: (iframe==nframes)
* in mseed/mseedread_mseedrecord_read.cc at line 236
* message: ERROR (reading MiniSEED record): inconsistent frame count
* comment: number of frames (5) differs from expected number (63)
last sample of previous record: 1889
Fixed Data Record Header:
Control Header:
sequence no: 000127
type: D
cont:
station identifier code: TMO57
location identifier: 00
channel identifier: HHZ
network code: KB
record start time: 275 02.10.2011 03:59:58.960000
number of samples: 208
sample rate factor: 200
sample rate multiplier: 1
activity flags: 0
i/o and clock flags: 0
data quality flags: 0
number of blockettes: 1
time correction: 0
beginning of data: 0x40
first blockette: 0x30
Data Only SEED Blockette:
Data Record Blockette Header:
blockette type: 1000
address of next blockette: 0
encoding format: Steim (1) compression (10)
word order: SPARC or 68000 (1)
data record length: 4096 bytes (12)
reserved: 0
data:
number of samples in data: 208
last sample of previous record: 1889
first sample: 1969
last sample: 2310
sampling interval: 000d 00h 00m 00.005000s
length of record: 000d 00h 00m 01.035000s
start of this record: 275 02.10.2011 03:59:58.960000
expected start of next record: 275 02.10.2011 04:00:00.000000
RECORD #2
===========
Exception report:
message: ERROR (reading MiniSEED record): cannot find first blockette
triggered in "mseed/mseedread_mseedrecord_readheader.cc" at line #147
by violation of condition:
"(Mrecordheader.fblock < block.bytesize())"
terminate called after throwing an instance of 'datrw::Exception'
raw mode
Reading in raw mode does not indicate any problem.