2019-02-20 12:55:17 +00:00
|
|
|
#!/bin/sh
|
2020-01-28 14:32:34 +00:00
|
|
|
# (C) Copyright 2005- ECMWF.
|
2019-02-20 12:55:17 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
2022-04-03 22:02:48 +00:00
|
|
|
. ./include.ctest.sh
|
2022-06-06 14:41:18 +00:00
|
|
|
|
2024-07-12 08:51:12 +00:00
|
|
|
if [ $HAVE_GEOGRAPHY -eq 0 ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2019-02-20 12:55:17 +00:00
|
|
|
# ---------------------------------------------------------
|
|
|
|
# This is the test for the JIRA issue ECC-600.
|
2019-02-20 13:29:11 +00:00
|
|
|
# Nearest neighbour for rotated lat/lon grids.
|
2019-02-20 12:55:17 +00:00
|
|
|
# ---------------------------------------------------------
|
2022-06-06 14:41:18 +00:00
|
|
|
label="grib_ecc-600_test"
|
2019-02-20 12:55:17 +00:00
|
|
|
tempOut=temp.${label}.out
|
|
|
|
tempGrib=temp.${label}.grib
|
|
|
|
|
2019-02-20 13:29:11 +00:00
|
|
|
input=${data_dir}/tigge/tiggelam_cnmc_sfc.grib
|
2019-02-20 12:55:17 +00:00
|
|
|
${tools_dir}/grib_copy -w count=4 $input $tempGrib
|
|
|
|
|
2019-02-20 13:29:11 +00:00
|
|
|
${tools_dir}/grib_ls -l 40,0,1 $tempGrib > $tempOut
|
2019-02-20 12:55:17 +00:00
|
|
|
grep -q "Grid Point chosen #3 index=54294 latitude=39.98 longitude=0.00 distance=2.03 (Km)" $tempOut
|
|
|
|
|
|
|
|
${tools_dir}/grib_ls -l 50,-10,1 $tempGrib > $tempOut
|
|
|
|
grep -q "Grid Point chosen #3 index=145684 latitude=49.99 longitude=-9.97 distance=2.57 (Km)" $tempOut
|
|
|
|
|
|
|
|
|
|
|
|
# Clean up
|
|
|
|
rm -f $tempOut $tempGrib
|