mirror of https://github.com/ecmwf/eccodes.git
Testing: invalid grid input
This commit is contained in:
parent
5463da29a4
commit
6e4caaa0b1
|
@ -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);
|
||||
|
||||
|
|
|
@ -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" ]
|
||||
|
|
Loading…
Reference in New Issue