ECC-1571: GRIB2: Allow new expver=0002 for class=ur and origin=lfpw

This commit is contained in:
Shahram Najm 2023-04-21 11:26:35 +01:00
parent 3a9213ab03
commit 4fdfca2cf7
2 changed files with 11 additions and 13 deletions

View File

@ -82,7 +82,6 @@ if( HAVE_BUILD_TOOLS )
grib_packing_order
filter_substr
grib_uerra
grib_ecc-1571
grib_s2s
grib_fire
# grib_true_imagery
@ -110,6 +109,7 @@ if( HAVE_BUILD_TOOLS )
grib_ecc-1319
grib_ecc-1406
grib_ecc-1560
grib_ecc-1571
bufr_ecc-1028
bufr_ecc-1195
bufr_ecc-1259

View File

@ -10,27 +10,25 @@
. ./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
label="grib_ecc-1571"
tempGribA=temp1.$label.grib2
tempGribB=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}
${tools_dir}/grib_set -s centre=lfpw,productionStatusOfProcessedData=8 ${sample_grib2} ${tempGribA}
# 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}
${tools_dir}/grib_set -s setLocalDefinition=1,grib2LocalSectionNumber=0,uerraLocalVersion=1 ${tempGribA} ${tempGribB}
# 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'
grib_check_key_equals ${tempGribB} uerraLocalVersion,experimentVersionNumber "1 0002"
grib_check_key_equals ${tempGribB} '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"
${tools_dir}/grib_set -s setLocalDefinition=1,grib2LocalSectionNumber=0,uerraLocalVersion=1,experimentVersionNumber=1234 ${tempGribA} ${tempGribB}
grib_check_key_equals ${tempGribB} uerraLocalVersion,experimentVersionNumber "1 1234"
rm -f ${tempGrib1} ${tempGrib2}
rm -f ${tempGribA} ${tempGribB}