From 04608de87e287fdef88c3c078c307c2e89a4493a Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 17 Feb 2021 17:14:27 +0000 Subject: [PATCH] Testing: more tests on IEEE packed GRIBs --- tests/ieee.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/ieee.sh b/tests/ieee.sh index da2c5b050..77962d844 100755 --- a/tests/ieee.sh +++ b/tests/ieee.sh @@ -112,8 +112,21 @@ stats2=`${tools_dir}/grib_get -M -F%.3f -p min,max,avg $temp` # [ "$stats1" = "$stats2" ] -rm -f $temp +echo "Test changing precision ..." +# ---------------------------------- +infile=${data_dir}/grid_ieee.grib +grib_check_key_equals $infile 'precision,section7Length' '1 44005' +# Switch from 32bits to 64bits +${tools_dir}/grib_set -r -s precision=2 $infile $temp +grib_check_key_equals $temp 'precision,section7Length' '2 88005' +stats1=`${tools_dir}/grib_get -M -F%.3f -p skew,kurt $infile` +stats2=`${tools_dir}/grib_get -M -F%.3f -p skew,kurt $temp` +[ "$stats1" = "$stats2" ] + + + +rm -f $temp ################################## # Disabled for now. Infinite loop