mirror of https://github.com/ecmwf/eccodes.git
Testing: Mercator error conditions
This commit is contained in:
parent
4e71ddcb06
commit
1b430aff47
|
@ -32,11 +32,30 @@ cat > $tempFilt <<EOF
|
|||
print "[distinctLongitudes]";
|
||||
EOF
|
||||
|
||||
${tools_dir}/grib_filter $tempFilt $input
|
||||
${tools_dir}/grib_filter $tempFilt $input > $tempOut
|
||||
|
||||
# Nearest function
|
||||
${tools_dir}/grib_ls -l 19,-97,1 $input > $tempOut
|
||||
grep -q "Point chosen #1 index=618" $tempOut
|
||||
|
||||
# Error conditions
|
||||
# ----------------
|
||||
input=${data_dir}/mercator.grib2
|
||||
set +e
|
||||
${tools_dir}/grib_get_data -s latitudeOfFirstGridPointInDegrees=90 $input > $tempOut 2>&1
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
grep -q "Transformation cannot be computed at the poles" $tempOut
|
||||
|
||||
input=${data_dir}/mercator.grib2
|
||||
set +e
|
||||
${tools_dir}/grib_get_data -s Ni=1 $input > $tempOut 2>&1
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
grep -q "Wrong number of points" $tempOut
|
||||
|
||||
|
||||
# Clean up
|
||||
rm -f $tempFilt $tempOut
|
||||
|
|
Loading…
Reference in New Issue