2019-10-07 13:40:52 +00:00
|
|
|
#!/bin/sh
|
2020-01-28 14:32:34 +00:00
|
|
|
# (C) Copyright 2005- ECMWF.
|
2019-10-07 13:40:52 +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
|
|
|
|
2019-10-07 13:40:52 +00:00
|
|
|
# ---------------------------------------------------------
|
|
|
|
# This is the test for the JIRA issue ECC-1000
|
|
|
|
# Nearest neighbour using grib_get/grib_ls on severa files
|
|
|
|
# ---------------------------------------------------------
|
2022-06-06 14:41:18 +00:00
|
|
|
label="grib_ecc-1000_test"
|
2019-10-07 13:40:52 +00:00
|
|
|
tempOut=temp.${label}.out
|
|
|
|
tempRef=temp.${label}.ref
|
|
|
|
|
|
|
|
input_ll=${data_dir}/regular_latlon_surface.grib1
|
|
|
|
input_gg=${data_dir}/reduced_gaussian_model_level.grib1
|
|
|
|
|
|
|
|
# Test 'grib_get' tool
|
|
|
|
# --------------------
|
|
|
|
${tools_dir}/grib_get -F%.1f -l0,0 $input_ll $input_gg > $tempOut
|
|
|
|
cat > $tempRef <<EOF
|
|
|
|
300.8 300.1 300.9 300.9
|
|
|
|
198.3 198.5 199.3 199.6
|
|
|
|
EOF
|
|
|
|
diff -w $tempRef $tempOut
|
|
|
|
rm -f $tempOut $tempRef
|
|
|
|
|
|
|
|
${tools_dir}/grib_get -F%.1f -l0,0 $input_gg $input_ll > $tempOut
|
|
|
|
cat > $tempRef <<EOF
|
|
|
|
198.3 198.5 199.3 199.6
|
|
|
|
300.8 300.1 300.9 300.9
|
|
|
|
EOF
|
|
|
|
diff -w $tempRef $tempOut
|
|
|
|
|
|
|
|
|
|
|
|
# Test grib_ls
|
|
|
|
# ---------------------
|
|
|
|
${tools_dir}/grib_ls -F%.1f -l0,0 $input_ll $input_gg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Clean up
|
|
|
|
rm -f $tempOut $tempRef
|