2019-11-26 10:54:41 +00:00
|
|
|
#!/bin/sh
|
2020-01-28 14:32:34 +00:00
|
|
|
# (C) Copyright 2005- ECMWF.
|
2019-11-26 10:54:41 +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-11-26 10:54:41 +00:00
|
|
|
# ---------------------------------------------------------
|
|
|
|
# This is the test for the JIRA issue ECC-1030
|
|
|
|
# grib_get with the ordering option '-B'
|
|
|
|
# ---------------------------------------------------------
|
2022-06-06 14:41:18 +00:00
|
|
|
label="grib_ecc-1030_test"
|
2019-11-26 10:54:41 +00:00
|
|
|
tempRef=temp.${label}.ref
|
|
|
|
tempOut=temp.${label}.out
|
|
|
|
|
|
|
|
# Test 1
|
|
|
|
# ------
|
|
|
|
input=${data_dir}/pad.grib
|
|
|
|
${tools_dir}/grib_get -p count,level -B'level:i' $input > $tempOut
|
|
|
|
cat > $tempRef <<EOF
|
|
|
|
1 0
|
|
|
|
2 0
|
|
|
|
3 0
|
|
|
|
4 1
|
|
|
|
5 1000
|
|
|
|
6 1000
|
|
|
|
EOF
|
|
|
|
diff -w $tempRef $tempOut
|
|
|
|
|
|
|
|
# Test 2
|
|
|
|
# ------
|
|
|
|
input=${data_dir}/pad.grib
|
|
|
|
${tools_dir}/grib_get -p count,level -B'level:i desc' $input > $tempOut
|
|
|
|
cat > $tempRef <<EOF
|
|
|
|
1 1000
|
|
|
|
2 1000
|
|
|
|
3 1
|
|
|
|
4 0
|
|
|
|
5 0
|
|
|
|
6 0
|
|
|
|
EOF
|
|
|
|
diff -w $tempRef $tempOut
|
|
|
|
|
|
|
|
|
|
|
|
# Clean up
|
|
|
|
rm -f $tempRef $tempOut
|