ECC-1783: Test

This commit is contained in:
shahramn 2024-03-08 12:21:39 +00:00
parent 626aee752d
commit b4aa46878c
1 changed files with 14 additions and 1 deletions

View File

@ -148,7 +148,9 @@ set -e
[ $status -ne 0 ]
grep -q "Wrong number of fields" $tempText
# Not regular grid
echo "Not a regular grid ..."
# --------------------------
input=${data_dir}/reduced_gaussian_pressure_level.grib2
set +e
${tools_dir}/grib_to_netcdf -o $tempNetcdf $input > $tempText 2>&1
@ -158,6 +160,17 @@ set -e
grep -q "not on a regular lat/lon grid or on a regular Gaussian grid" $tempText
# ECC-1783: No error message when input file has invalid fields
input=$data_dir/bad.grib
set +e
${tools_dir}/grib_to_netcdf -o $tempNetcdf $input > $tempText 2>&1
status=$?
set -e
[ $status -ne 0 ]
grep -q "Wrong message length" $tempText
# Validity time check
export GRIB_TO_NETCDF_CHECKVALIDTIME=0
${tools_dir}/grib_to_netcdf -o $tempNetcdf $tempGrib
[ -f "$tempNetcdf" ]