Testing: invalid grid input

This commit is contained in:
Shahram Najm 2023-10-30 16:35:13 +00:00
parent 5463da29a4
commit 6e4caaa0b1
2 changed files with 12 additions and 0 deletions

View File

@ -23,6 +23,8 @@ int main(int argc, char* argv[])
assert (argc == 3);
printf("%ld\n", codes_get_api_version());
in = fopen(argv[1], "rb");
assert(in);

View File

@ -148,6 +148,16 @@ set -e
[ $status -ne 0 ]
grep -q "Wrong number of fields" $tempText
# Not regular grid
input=${data_dir}/reduced_gaussian_pressure_level.grib2
set +e
${tools_dir}/grib_to_netcdf -o $tempNetcdf $input > $tempText 2>&1
status=$?
set -e
[ $status -ne 0 ]
grep -q "not on a regular lat/lon grid or on a regular Gaussian grid" $tempText
export GRIB_TO_NETCDF_CHECKVALIDTIME=0
${tools_dir}/grib_to_netcdf -o $tempNetcdf $tempGrib
[ -f "$tempNetcdf" ]