Testing: fix number comparison for bufr tests

This commit is contained in:
Shahram Najm 2014-12-08 16:38:33 +00:00
parent b234950200
commit 19befd4474
3 changed files with 5 additions and 5 deletions

View File

@ -31,8 +31,8 @@ do
${tools_dir}bufr_filter bufrdc_num_ref.filter $file 2> $REDIRECT > $res_num
# Cannot use plain diff. We need to compare FLOAT NUMBERS with a tolerance
# perl number_compare.pl $ref_num $res_num >$REDIRECT 2> $REDIRECT
numdiff $ref_num $res_num >$REDIRECT 2> $REDIRECT
perl number_compare.pl $ref_num $res_num >$REDIRECT 2> $REDIRECT
#numdiff $ref_num $res_num >$REDIRECT 2> $REDIRECT
done

View File

@ -35,8 +35,8 @@ do
fi
# Cannot use plain diff. We need to compare FLOAT NUMBERS with a tolerance
#perl number_compare.pl $ref_num $res_num >$REDIRECT 2> $REDIRECT
numdiff $ref_num $res_num > $diff_num 2> $diff_num
perl number_compare.pl $ref_num $res_num > $diff_num 2> $diff_num
#numdiff $ref_num $res_num > $diff_num 2> $diff_num
if [ $? != 0 ]
then
mv $file $file.no

View File

@ -26,7 +26,7 @@ if (scalar @ARGV < 2) {
&usage;
}
# Tolerance is optional
my $tolerance = 0.0000000000001;
my $tolerance = 1e-9;
my $result = GetOptions (
"t=s" => \$tolerance
);