2014-02-13 16:51:47 +00:00
|
|
|
#!/bin/sh
|
2020-01-28 14:32:34 +00:00
|
|
|
# (C) Copyright 2005- ECMWF.
|
2014-02-13 16:51:47 +00:00
|
|
|
#
|
|
|
|
# This software is licensed under the terms of the Apache Licence Version 2.0
|
|
|
|
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
#
|
|
|
|
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
|
|
|
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
|
|
|
|
2022-04-04 12:35:10 +00:00
|
|
|
. ./include.ctest.sh
|
2014-02-13 16:51:47 +00:00
|
|
|
|
2022-01-20 14:39:18 +00:00
|
|
|
tempGrib="out_surface_level.grib2"
|
|
|
|
|
|
|
|
# Input and output GRIB files are hard coded in the example
|
2020-10-20 16:32:02 +00:00
|
|
|
${examples_dir}/c_grib_set_missing
|
2022-01-20 14:39:18 +00:00
|
|
|
|
|
|
|
# Check the keys have been set to MISSING
|
2023-02-27 10:32:58 +00:00
|
|
|
if [ -f "${tools_dir}/grib_get" ]; then
|
|
|
|
sf=`${tools_dir}/grib_get -p scaleFactorOfFirstFixedSurface $tempGrib`
|
|
|
|
[ "$sf" = "MISSING" ]
|
|
|
|
sf=`${tools_dir}/grib_get -p scaledValueOfFirstFixedSurface $tempGrib`
|
|
|
|
[ "$sf" = "MISSING" ]
|
2023-12-09 17:13:02 +00:00
|
|
|
|
|
|
|
# Code Table key being set to missing
|
|
|
|
sf=`${tools_dir}/grib_get -p typeOfFirstFixedSurface:i, $tempGrib`
|
|
|
|
[ "$sf" = "255" ]
|
2023-02-27 10:32:58 +00:00
|
|
|
fi
|
2022-01-20 14:39:18 +00:00
|
|
|
|
|
|
|
rm -f $tempGrib
|