mirror of https://github.com/ecmwf/eccodes.git
ECC-1407: grib_util_set_spec
This commit is contained in:
parent
4af92cba83
commit
18339324ed
|
@ -1477,8 +1477,17 @@ grib_handle* grib_util_set_spec2(grib_handle* h,
|
|||
switch (packing_spec->accuracy) {
|
||||
case GRIB_UTIL_ACCURACY_SAME_BITS_PER_VALUES_AS_INPUT: {
|
||||
long bitsPerValue = 0;
|
||||
if ((packing_spec->packing_type == GRIB_UTIL_PACKING_TYPE_GRID_SIMPLE ||
|
||||
packing_spec->packing_type == GRIB_UTIL_PACKING_TYPE_CCSDS) &&
|
||||
strcmp(input_packing_type, "grid_ieee")==0)
|
||||
{
|
||||
SET_LONG_VALUE("bitsPerValue", 32);
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert(grib_get_long(h, "bitsPerValue", &bitsPerValue) == 0);
|
||||
SET_LONG_VALUE("bitsPerValue", bitsPerValue);
|
||||
}
|
||||
} break;
|
||||
|
||||
case GRIB_UTIL_ACCURACY_USE_PROVIDED_BITS_PER_VALUES:
|
||||
|
|
Loading…
Reference in New Issue