mirror of https://github.com/ecmwf/eccodes.git
Testing: grib_util_set_spec packing types
This commit is contained in:
parent
1f6f592e57
commit
bc8362f985
|
@ -27,6 +27,8 @@ static int get_packing_type_code(const char* packingType)
|
|||
return GRIB_UTIL_PACKING_TYPE_GRID_SECOND_ORDER;
|
||||
else if (STR_EQUAL(packingType, "grid_ieee"))
|
||||
return GRIB_UTIL_PACKING_TYPE_IEEE;
|
||||
else if (STR_EQUAL(packingType, "grid_complex"))
|
||||
return GRIB_UTIL_PACKING_TYPE_GRID_COMPLEX;
|
||||
|
||||
Assert(!"Invalid packingType");
|
||||
return result;
|
||||
|
|
|
@ -74,6 +74,20 @@ if [ $HAVE_AEC -eq 1 ]; then
|
|||
grib_check_key_equals $outfile packingType grid_simple
|
||||
fi
|
||||
|
||||
infile=${data_dir}/sample.grib2
|
||||
$EXEC $grib_util_set_spec -p grid_ieee $infile $outfile
|
||||
grib_check_key_equals $outfile 'packingType,precision' 'grid_ieee 1'
|
||||
|
||||
infile=${data_dir}/sample.grib2
|
||||
$EXEC $grib_util_set_spec -p grid_second_order $infile $outfile
|
||||
grib_check_key_equals $outfile 'packingType' 'grid_second_order'
|
||||
|
||||
infile=${data_dir}/sample.grib2
|
||||
$EXEC $grib_util_set_spec -p grid_complex $infile $outfile
|
||||
# $tools_dir/grib_ls $outfile
|
||||
grib_check_key_equals $outfile 'packingType' 'grid_complex'
|
||||
|
||||
|
||||
# --------------------------------------------------
|
||||
# Reduced Gaussian Grid N=32 second order packing
|
||||
# --------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue