From c442ffcd7aeedf28ebbc1079e117664be0736b75 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 14 Jun 2021 17:29:47 +0100 Subject: [PATCH] Testing: add test for accessor g1number_of_coded_values_sh_simple --- tests/grib_change_packing.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/grib_change_packing.sh b/tests/grib_change_packing.sh index ed45eccfd..246a63bbf 100755 --- a/tests/grib_change_packing.sh +++ b/tests/grib_change_packing.sh @@ -61,6 +61,7 @@ test_packing() { # ------------ input=${data_dir}/spherical_model_level.grib2 output=`${tools_dir}/grib_set -r -s packingType=spectral_simple $input $temp 2>&1` +grib_check_key_equals $temp packingType 'spectral_simple' # Check no error was posted i.e. output string is empty [ -z "$output" ] res1=`${tools_dir}/grib_get '-F%.1f' -p avg,enorm $input` @@ -84,4 +85,13 @@ stats2=`${tools_dir}/grib_get -F%.2f -p skew,kurt $temp` test_packing $grib1 $packing1 test_packing $grib2 $packing2 + +# spectral_simple for GRIB1 +# ------------------------- +input=${data_dir}/spherical_model_level.grib1 +${tools_dir}/grib_set -r -s packingType=spectral_simple $input $temp +grib_check_key_equals $temp packingType 'spectral_simple' +${tools_dir}/grib_ls -p numberOfCodedValues $temp + + rm -f $temp