mirror of https://github.com/ecmwf/eccodes.git
ECC-1428: GRIB2: No error message when setting invalid marsType on S2S/TIGGE/UERRA
This commit is contained in:
parent
2e14caef59
commit
5b994bbbcc
|
@ -76,6 +76,7 @@ if( HAVE_BUILD_TOOLS )
|
|||
grib_packing_order
|
||||
filter_substr
|
||||
grib_uerra
|
||||
grib_s2s
|
||||
grib_fire
|
||||
grib_element
|
||||
grib_suppressed
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/sh
|
||||
# (C) Copyright 2005- ECMWF.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
. ./include.ctest.sh
|
||||
|
||||
grib2_sample=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
||||
label=grib_s2s_test
|
||||
tempSample=tempSample.${label}.grib2
|
||||
temp1=temp1.${label}.grib2
|
||||
temp2=temp2.${label}.grib2
|
||||
|
||||
|
||||
${tools_dir}/grib_set -s tablesVersion=14,productionStatusOfProcessedData=6 \
|
||||
$grib2_sample $tempSample
|
||||
|
||||
|
||||
# GRIB-761. For Italy, subCentre 102 is ISAC-CNR
|
||||
# ----------------------------------------------
|
||||
${tools_dir}/grib_set -s centre=cnmc,subCentre=102 $tempSample $temp1
|
||||
grib_check_key_equals $temp1 mars.origin 'isac'
|
||||
|
||||
|
||||
# ECC-1428. Valid and invalid mars types
|
||||
# ---------------------------------------
|
||||
${tools_dir}/grib_set -s marsType=fc $tempSample $temp1
|
||||
${tools_dir}/grib_set -s marsType=cf $tempSample $temp1
|
||||
${tools_dir}/grib_set -s marsType=pf $tempSample $temp1
|
||||
|
||||
set +e
|
||||
${tools_dir}/grib_set -s marsType=xx $tempSample $temp1
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
|
||||
# Clean up
|
||||
rm -f $temp1 $temp2 $tempSample
|
|
@ -107,4 +107,14 @@ for file in $tigge_bad_validity; do
|
|||
grep -q "invalid validity Date/Time" $TEMP
|
||||
done
|
||||
|
||||
|
||||
# ECC-1428
|
||||
# ----------
|
||||
set +e
|
||||
${tools_dir}/grib_set -s productionStatusOfProcessedData=5,marsType=xx $sample_g2 $TEMP
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
|
||||
|
||||
rm -f $TEMP
|
||||
|
|
|
@ -63,4 +63,15 @@ test_stream_and_type()
|
|||
test_stream_and_type 'oper'
|
||||
test_stream_and_type 'test'
|
||||
|
||||
# ECC-1428
|
||||
# ----------
|
||||
${tools_dir}/grib_set -s marsType=oi $tempSample $temp1
|
||||
grib_check_key_equals $temp1 'mars.type' 'oi'
|
||||
set +e
|
||||
${tools_dir}/grib_set -s marsType=xx $tempSample $temp1
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
|
||||
# Clean up
|
||||
rm -f $temp1 $temp2 $tempSample
|
||||
|
|
Loading…
Reference in New Issue