mirror of https://github.com/ecmwf/eccodes.git
Wrong marsExpver with local section fixed, test added
This commit is contained in:
parent
92e62e540a
commit
55bf28d38e
|
@ -1,5 +1,9 @@
|
||||||
# (C) Copyright 2005- ECMWF.
|
# (C) Copyright 2005- ECMWF.
|
||||||
|
|
||||||
# Uncertainties in ensembles of regional re-analysis project (UERRA)
|
# Uncertainties in ensembles of regional re-analysis project (UERRA)
|
||||||
|
if(localUsePresent == 0){
|
||||||
constant marsExpver = 'prod';
|
constant marsExpver = 'prod';
|
||||||
|
} else {
|
||||||
|
constant marsExpver = experimentVersionNumber;
|
||||||
|
}
|
||||||
include "grib2/products_uerra.def"
|
include "grib2/products_uerra.def"
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
# (C) Copyright 2005- ECMWF.
|
# (C) Copyright 2005- ECMWF.
|
||||||
|
|
||||||
# Uncertainties in ensembles of regional re-analysis project test (UERRA)
|
# Uncertainties in ensembles of regional re-analysis project test (UERRA)
|
||||||
|
if(localUsePresent == 0){
|
||||||
constant marsExpver = 'test';
|
constant marsExpver = 'test';
|
||||||
|
} else {
|
||||||
|
constant marsExpver = experimentVersionNumber;
|
||||||
|
}
|
||||||
include "grib2/products_uerra.def"
|
include "grib2/products_uerra.def"
|
||||||
|
|
|
@ -82,6 +82,7 @@ if( HAVE_BUILD_TOOLS )
|
||||||
grib_packing_order
|
grib_packing_order
|
||||||
filter_substr
|
filter_substr
|
||||||
grib_uerra
|
grib_uerra
|
||||||
|
grib_ecc-1571
|
||||||
grib_s2s
|
grib_s2s
|
||||||
grib_fire
|
grib_fire
|
||||||
# grib_true_imagery
|
# grib_true_imagery
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
#!/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
|
||||||
|
|
||||||
|
REDIRECT=/dev/null
|
||||||
|
|
||||||
|
label="prod_ECC-1571" # Change prod to bufr or grib etc
|
||||||
|
tempGrib1=temp1.$label.grib2
|
||||||
|
tempGrib2=temp2.$label.grib2
|
||||||
|
sample_grib2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
||||||
|
|
||||||
|
# 1st we create a sample file for UERRA with centre lfpw
|
||||||
|
${tools_dir}/grib_set -s centre=lfpw,productionStatusOfProcessedData=8 ${sample_grib2} ${tempGrib1}
|
||||||
|
# Now we use the UERRA sample and add a local section to it
|
||||||
|
${tools_dir}/grib_set -s setLocalDefinition=1,grib2LocalSectionNumber=0,uerraLocalVersion=1 ${tempGrib1} ${tempGrib2}
|
||||||
|
|
||||||
|
# We should have a local section with uerraLocalVersion=1,experimentVersionNumber=0002
|
||||||
|
grib_check_key_equals ${tempGrib2} uerraLocalVersion,experimentVersionNumber "1 0002"
|
||||||
|
grib_check_key_equals ${tempGrib2} 'marsExpver,mars.expver' '0002 0002'
|
||||||
|
|
||||||
|
# set other expver
|
||||||
|
${tools_dir}/grib_set -s setLocalDefinition=1,grib2LocalSectionNumber=0,uerraLocalVersion=1,experimentVersionNumber=1234 ${tempGrib1} ${tempGrib2}
|
||||||
|
grib_check_key_equals ${tempGrib2} uerraLocalVersion,experimentVersionNumber "1 1234"
|
||||||
|
|
||||||
|
rm -f ${tempGrib1} ${tempGrib2}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue