From 5a675bcafc9127222b4b039106fa88ff6481cfa4 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 19 Oct 2023 17:50:50 +0100 Subject: [PATCH] Testing: GRIB1 stepRange --- tests/grib_step.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/grib_step.sh b/tests/grib_step.sh index 308a60170..741da1867 100755 --- a/tests/grib_step.sh +++ b/tests/grib_step.sh @@ -206,6 +206,21 @@ result=$(${tools_dir}/grib_get -w count=1 -p step -s stepUnits=D $input) result=$(${tools_dir}/grib_get -w count=1 -p step -s stepUnits=m $input) [ $result = 5760 ] +# GRIB1 stepRange and timeRangeIndicator=10 +# ----------------------------------------- +input=${data_dir}/reduced_latlon_surface.grib1 +grib_check_key_equals $input timeRangeIndicator,P1,P2 '10 0 0' +ECCODES_GRIBEX_MODE_ON=1 ${tools_dir}/grib_set -s stepRange=11-12 $input $temp +grib_check_key_equals $temp P1,P2 '0 11' + +set +e +${tools_dir}/grib_set -s stepRange=11-12 $input $temp 2>$templog +status=$? +set -e +[ $status -ne 0 ] +grep -q "Unable to set stepRange" $templog + + # Clean up rm -f $temp $templog rm -f $grib2File.p8tmp ${grib2File}.tmp x.grib