mirror of https://github.com/ecmwf/eccodes.git
Testing: Tool options
This commit is contained in:
parent
64d69f1395
commit
41bb2180a9
|
@ -149,6 +149,14 @@ set -e
|
|||
# Raise the tolerance
|
||||
${tools_dir}/grib_compare -b referenceValue -A 3.2 $infile $temp1
|
||||
|
||||
# Invalid value
|
||||
set +e
|
||||
${tools_dir}/grib_compare -A badnum $infile $temp1 >$outfile 2>&1
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
grep -q "Invalid absolute error" $outfile
|
||||
|
||||
|
||||
# ----------------------------------------
|
||||
# ECC-355: -R with "all" option
|
||||
|
@ -161,6 +169,13 @@ ${tools_dir}/grib_compare -b $BLACKLIST -R referenceValue=0.03,codedValues=2 $te
|
|||
# Now try the "all" option with the highest relative diff value
|
||||
${tools_dir}/grib_compare -b $BLACKLIST -R all=2 $temp1 $temp2
|
||||
|
||||
# ----------------------------------------
|
||||
# Use -w switch
|
||||
# ----------------------------------------
|
||||
cp ${data_dir}/tigge_cf_ecmwf.grib2 $temp1
|
||||
${tools_dir}/grib_compare -w typeOfLevel=surface ${data_dir}/tigge_cf_ecmwf.grib2 $temp1
|
||||
|
||||
|
||||
# ----------------------------------------
|
||||
# ECC-651: Two-way (symmetric) comparison
|
||||
# ----------------------------------------
|
||||
|
@ -217,14 +232,14 @@ sample_g2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
|||
# --------------------------------------------
|
||||
${tools_dir}/grib_set -s scaleFactorOfFirstFixedSurface=1 $sample_g2 $temp1
|
||||
set +e
|
||||
${tools_dir}/grib_compare $sample_g2 $temp1 > $outfile
|
||||
${tools_dir}/grib_compare -v $sample_g2 $temp1 > $outfile
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
grep -q "scaleFactorOfFirstFixedSurface is set to missing in 1st field but is not missing in 2nd field" $outfile
|
||||
|
||||
set +e
|
||||
${tools_dir}/grib_compare $temp1 $sample_g2 > $outfile
|
||||
${tools_dir}/grib_compare -v $temp1 $sample_g2 > $outfile
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
@ -271,6 +286,15 @@ set -e
|
|||
[ $status -eq 1 ]
|
||||
|
||||
|
||||
echo GRIB > $temp1
|
||||
echo GRIB > $temp2
|
||||
set +e
|
||||
${tools_dir}/grib_compare $temp1 $temp2 > $outfile 2>&1
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
grep "unreadable message" $outfile
|
||||
|
||||
# Clean up
|
||||
# ---------
|
||||
rm -f $temp1 $temp2
|
||||
|
|
|
@ -394,8 +394,8 @@ ${tools_dir}/grib_filter $tempFilt $ECCODES_SAMPLES_PATH/GRIB2.tmpl > $tempOut 2
|
|||
cat $tempOut
|
||||
grep "rubbish must fail" $tempOut
|
||||
grep "garbage must fail" $tempOut
|
||||
grep "unable to get rubbish as string" $tempOut
|
||||
grep "unable to get garbage as string" $tempOut
|
||||
grep "Unable to get rubbish as string" $tempOut
|
||||
grep "Unable to get garbage as string" $tempOut
|
||||
|
||||
|
||||
# Use of "abs"
|
||||
|
|
|
@ -53,7 +53,7 @@ infile=${data_dir}/sample.grib2
|
|||
set +e
|
||||
${tools_dir}/grib_set -r -s packingType=grid_png $infile $temp > $tempErr 2>&1
|
||||
set -e
|
||||
grep -q "unable to set double array codedValues" $tempErr
|
||||
grep -q "Unable to set double array codedValues" $tempErr
|
||||
|
||||
# Nearest neighbour
|
||||
# ----------------------
|
||||
|
|
Loading…
Reference in New Issue