2016-11-10 18:04:54 +00:00
|
|
|
#!/bin/sh
|
2020-01-28 14:32:34 +00:00
|
|
|
# (C) Copyright 2005- ECMWF.
|
2016-11-10 18:04:54 +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
|
2016-11-10 18:04:54 +00:00
|
|
|
|
|
|
|
#Define a common label for all the tmp files
|
|
|
|
label="grib_copy_namespace_test_f"
|
|
|
|
|
|
|
|
INPUT=../../data/regular_latlon_surface.grib1
|
2017-02-03 14:21:24 +00:00
|
|
|
res=`${tools_dir}/grib_get -p Ni,Nj $INPUT`
|
2016-11-10 18:04:54 +00:00
|
|
|
[ "$res" = "16 31" ]
|
|
|
|
|
2022-12-08 15:06:58 +00:00
|
|
|
# Note: The input and output GRIB files are hardcoded in the example!
|
|
|
|
# The output is a clone of the regular lat/lon but then
|
|
|
|
# we copy the reduced lat/lon geography namespace to the output
|
|
|
|
OUTPUT=temp.$label.grib
|
2017-02-03 14:29:47 +00:00
|
|
|
${examples_dir}/eccodes_f_grib_copy_namespace
|
2016-11-10 18:04:54 +00:00
|
|
|
|
2017-02-03 14:21:24 +00:00
|
|
|
res=`${tools_dir}/grib_get -p Ni,Nj $OUTPUT`
|
2016-11-10 18:04:54 +00:00
|
|
|
[ "$res" = "MISSING 501" ]
|
|
|
|
|
|
|
|
rm -f $OUTPUT
|