2014-09-01 12:20:22 +00:00
|
|
|
#!/bin/sh
|
2015-01-05 15:45:46 +00:00
|
|
|
# Copyright 2005-2015 ECMWF.
|
2014-09-01 12:20:22 +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.
|
|
|
|
#
|
|
|
|
|
2014-11-04 15:08:57 +00:00
|
|
|
set -e
|
2014-09-01 12:20:22 +00:00
|
|
|
. ./include.sh
|
|
|
|
|
|
|
|
REDIRECT=/dev/null
|
|
|
|
|
|
|
|
cat > bufrdc_desc_ref.filter<<EOF
|
|
|
|
print "[bufrdcExpandedDescriptors!1''%06d]";
|
|
|
|
EOF
|
|
|
|
|
|
|
|
for file in ${data_dir}/bufr/*.bufr
|
|
|
|
do
|
|
|
|
REDIRECT=/dev/null
|
|
|
|
|
|
|
|
# Test descriptors: compare output of filter (res) with reference file (ref)
|
|
|
|
res_desc=$file.desc.test
|
|
|
|
ref_desc=$file.desc.ref
|
2014-11-04 16:10:25 +00:00
|
|
|
[ -f "$ref_desc" ]
|
2014-09-01 12:20:22 +00:00
|
|
|
diff_desc=$file.desc.diff
|
|
|
|
|
|
|
|
rm -f $res_desc
|
|
|
|
|
|
|
|
${tools_dir}bufr_filter bufrdc_desc_ref.filter $file 2> $REDIRECT > $res_desc
|
|
|
|
|
|
|
|
diff $ref_desc $res_desc > $diff_desc 2> $diff_desc
|
|
|
|
|
|
|
|
rm -f $res_desc $diff_desc
|
|
|
|
done
|
|
|
|
|
|
|
|
rm -f bufrdc_desc_ref.filter
|