From f2f26ba5569e4750a9b1a85d1d3b93ed8041bb05 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Sat, 16 May 2020 14:21:55 +0100 Subject: [PATCH] ECC-1114: Test for Mercator --- data/grib_data_files.txt | 1 + tests/CMakeLists.txt | 1 + tests/grib_mercator.sh | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100755 tests/grib_mercator.sh diff --git a/data/grib_data_files.txt b/data/grib_data_files.txt index 43b767449..2774f12c7 100644 --- a/data/grib_data_files.txt +++ b/data/grib_data_files.txt @@ -87,3 +87,4 @@ v.grib2 msl.octa.glob.grib1 test_file.grib2 gfs.complex.mvmu.grib2 +mercator.grib2 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a6ee4dfb1..b3d03993f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -154,6 +154,7 @@ list(APPEND tests_data_reqd pseudo_budg grib_gridType grib_octahedral + grib_mercator grib_global grib_concept grib_decimalPrecision diff --git a/tests/grib_mercator.sh b/tests/grib_mercator.sh new file mode 100755 index 000000000..1fb3f44bd --- /dev/null +++ b/tests/grib_mercator.sh @@ -0,0 +1,34 @@ +#!/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.sh + +# Define a common label for all the tmp files +label="grib_mercator_test" +tempOut="temp.${label}.out" +tempFilter="temp.${label}.filt" + +input=${data_dir}/mercator.grib2 +grib_check_key_equals $input "gridType" "mercator" +${tools_dir}/grib_get_data $input > $tempOut +numlines=`wc -l $tempOut | awk '{print $1}'` +[ "$numlines" = "2465" ] # 1 + numberOfDataPoints + + +# Check other iterator-related keys +cat > $tempFilter <