mirror of https://github.com/ecmwf/eccodes.git
ECC-1491: Pseudo GRIB: The offset and count keys are incorrect
This commit is contained in:
parent
fe1f32d9bc
commit
b1337d386a
|
@ -437,6 +437,8 @@ static int read_PSEUDO(reader* r, const char* type)
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
r->offset = r->tell(r->read_data) - 4;
|
||||||
|
|
||||||
for (j = 0; j < 3; j++) {
|
for (j = 0; j < 3; j++) {
|
||||||
if (r->read(r->read_data, &tmp[i], 1, &err) != 1 || err)
|
if (r->read(r->read_data, &tmp[i], 1, &err) != 1 || err)
|
||||||
return err;
|
return err;
|
||||||
|
|
|
@ -47,5 +47,14 @@ ${tools_dir}/grib_ls -jm $tempOut
|
||||||
ms=`${tools_dir}/grib_get -p mars.step $tempOut`
|
ms=`${tools_dir}/grib_get -p mars.step $tempOut`
|
||||||
[ "$ms" = "19" ]
|
[ "$ms" = "19" ]
|
||||||
|
|
||||||
|
# ECC-1491
|
||||||
|
cat ${data_dir}/budg ${data_dir}/budg > $tempBud
|
||||||
|
${tools_dir}/grib_get -p count,offset $tempBud > $tempOut
|
||||||
|
cat > $tempRef << EOF
|
||||||
|
1 0
|
||||||
|
2 6000
|
||||||
|
EOF
|
||||||
|
diff $tempRef $tempOut
|
||||||
|
|
||||||
|
|
||||||
rm -f $tempRef $tempOut $tempBud
|
rm -f $tempRef $tempOut $tempBud
|
||||||
|
|
Loading…
Reference in New Issue