2019-02-20 12:55:17 +00:00
|
|
|
#!/bin/sh
|
2019-04-15 13:44:45 +00:00
|
|
|
# Copyright 2005-2019 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.
|
|
|
|
#
|
|
|
|
|
|
|
|
. ./include.sh
|
|
|
|
set -u
|
|
|
|
# ---------------------------------------------------------
|
|
|
|
# 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
|
|
|
# ---------------------------------------------------------
|
|
|
|
label="grib_ecc-600-test"
|
|
|
|
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
|