From 404778c7c0a53a2c2b346ea7c9e31494a89898f2 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 14 Feb 2024 12:27:27 +0000 Subject: [PATCH] ECC-1364: Test --- tests/CMakeLists.txt | 1 + tests/grib_ecc-1364.sh | 52 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100755 tests/grib_ecc-1364.sh diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 71babe949..32c20a5a5 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -254,6 +254,7 @@ if( HAVE_BUILD_TOOLS ) grib_ecc-1000 grib_ecc-1001 grib_ecc-1030 + grib_ecc-1364 grib_ecc-1397 grib_ecc-1425 grib_ecc-1467 diff --git a/tests/grib_ecc-1364.sh b/tests/grib_ecc-1364.sh new file mode 100755 index 000000000..cb4555834 --- /dev/null +++ b/tests/grib_ecc-1364.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# (C) Copyright 2005- ECMWF. +# +# This software is licensed under the terms of the Apache Licence Version 2.0 +# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. +# +# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by +# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. +# + +. ./include.ctest.sh + + +# ECC-1364: GRIB: Geoiterator for Lambert Conformal in the southern hemisphere + +label="grib_ecc-1364_test" +tempGrib=temp.$label.grib +tempFilt=temp.$label.filt +tempLog=temp.$label.log +tempRef=temp.$label.ref + +sample_grib1=$ECCODES_SAMPLES_PATH/GRIB1.tmpl + +# Create a GRIB with a similar grid to the one in the JIRA issue +cat >$tempFilt< $tempLog + +${tools_dir}/grib_ls -l -11.6277,-47.9583,1 $tempGrib > $tempLog +grep -q "Grid Point chosen #1 index=1247750 " $tempLog +grep -q "index=1247750 .* distance=0.01 " $tempLog + + +# Clean up +rm -f $tempGrib $tempFilt $tempLog $tempRef