eccodes/tests/grib_multi_from_message.sh

30 lines
927 B
Bash
Raw Normal View History

2013-03-25 12:04:10 +00:00
#!/bin/sh
2020-01-28 14:32:34 +00:00
# (C) Copyright 2005- ECMWF.
2013-03-25 12:04:10 +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.
2013-03-25 14:23:07 +00:00
#
2013-03-25 12:04:10 +00:00
# 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.ctest.sh
2013-03-25 12:04:10 +00:00
2019-08-05 12:05:41 +00:00
label='grib_multi_from_message'
out1=${data_dir}/temp.$label.1.out
out2=${data_dir}/temp.$label.2.out
2013-03-25 12:04:10 +00:00
for infile in ${data_dir}/multi.grib2 ${data_dir}/reduced_gaussian_model_level.grib1
do
2019-08-05 12:05:41 +00:00
$EXEC ${test_dir}/grib_multi_from_message -m $infile > $out1
2017-02-03 14:21:24 +00:00
${tools_dir}/grib_get -p count,shortName,level $infile > $out2
2013-09-23 14:56:08 +00:00
diff $out1 $out2
2013-03-25 12:04:10 +00:00
2019-08-05 12:05:41 +00:00
$EXEC ${test_dir}/grib_multi_from_message $infile > $out1
2017-02-03 14:21:24 +00:00
${tools_dir}/grib_get -M -p count,shortName,level $infile > $out2
2013-09-23 14:56:08 +00:00
diff $out1 $out2
2013-03-25 12:04:10 +00:00
2017-11-30 17:49:46 +00:00
rm -f $out1 $out2
2013-03-25 12:04:10 +00:00
done