ECC-1339: Add tests

This commit is contained in:
Shahram Najm 2022-02-04 19:05:34 +00:00
parent 3e29939e05
commit 3dd4faaa4b
1 changed files with 24 additions and 7 deletions

View File

@ -10,7 +10,9 @@
. ./include.sh
# This file does not have a bitmap
infile=${data_dir}/regular_latlon_surface.grib1
shdata=${data_dir}/spherical_model_level.grib1
suff=_ieee_test.grib1
outsimple=simple$suff
@ -97,6 +99,21 @@ stats2=`${tools_dir}/grib_get -M -F%.3f -p min,max,avg $temp`
grib_check_key_equals $temp numberOfEffectiveValues,numberOfValues,numberOfMissing '214661 214661 98701'
grib_check_key_equals $temp totalLength 899004
echo "Test ECCODES_GRIB_IEEE_PACKING on GRIB2 with bitmap..."
# ------------------------------------------------------------
infile=${data_dir}/reduced_latlon_surface.grib2
grib_check_key_equals $infile bitmapPresent 1
ECCODES_GRIB_IEEE_PACKING=32 ${tools_dir}/grib_copy -r $infile $temp
grib_check_key_equals $temp packingType grid_ieee
${tools_dir}/grib_compare -c data:n -R all=6e-8 $infile $temp
echo "Test ECCODES_GRIB_IEEE_PACKING on GRIB2 without bitmap..."
# --------------------------------------------------------------
infile=${data_dir}/regular_latlon_surface.grib2
grib_check_key_equals $infile bitmapPresent 0
ECCODES_GRIB_IEEE_PACKING=32 ${tools_dir}/grib_copy -r $infile $temp
grib_check_key_equals $temp packingType grid_ieee
${tools_dir}/grib_compare -c data:n $infile $temp
echo "Test raw packing on GRIB1 with bitmap..."