From b81ab6324abf0b023a0d18d8e867135e2a7eab6d Mon Sep 17 00:00:00 2001 From: shahramn Date: Fri, 19 Apr 2024 22:18:09 +0100 Subject: [PATCH] ECC-1806: Additional entries for stepType --- .../ecmf/stepTypeForConversion.def | 14 ++++++++++ definitions/grib1/section.1.def | 28 +++++++++---------- tests/grib_ecc-1806.sh | 17 ++++------- 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/definitions/grib1/localConcepts/ecmf/stepTypeForConversion.def b/definitions/grib1/localConcepts/ecmf/stepTypeForConversion.def index e74860061..5b0733488 100644 --- a/definitions/grib1/localConcepts/ecmf/stepTypeForConversion.def +++ b/definitions/grib1/localConcepts/ecmf/stepTypeForConversion.def @@ -198,3 +198,17 @@ "accum"={gribTablesVersionNo=162;indicatorOfParameter=112;centre=98;} # vtpha "accum"={gribTablesVersionNo=162;indicatorOfParameter=113;centre=98;} +# mvv +"avg"={gribTablesVersionNo=130;indicatorOfParameter=232;centre=98;} +# msshfl +"avg"={gribTablesVersionNo=172; indicatorOfParameter=146;centre=98;} +# mslhfl +"avg"={gribTablesVersionNo=172;indicatorOfParameter=147;centre=98;} +"avg"={gribTablesVersionNo=128;indicatorOfParameter=55;centre=98;} +"avg"={gribTablesVersionNo=128;indicatorOfParameter=56;centre=98;} +"avg"={gribTablesVersionNo=172;indicatorOfParameter=169;centre=98;} +"avg"={gribTablesVersionNo=172;indicatorOfParameter=175;centre=98;} +"avg"={gribTablesVersionNo=172;indicatorOfParameter=176;centre=98;} +"avg"={gribTablesVersionNo=172;indicatorOfParameter=177;centre=98;} +"avg"={gribTablesVersionNo=172;indicatorOfParameter=178;centre=98;} +"avg"={gribTablesVersionNo=172;indicatorOfParameter=179;centre=98;} diff --git a/definitions/grib1/section.1.def b/definitions/grib1/section.1.def index 778910695..566936ca7 100644 --- a/definitions/grib1/section.1.def +++ b/definitions/grib1/section.1.def @@ -328,18 +328,18 @@ meta md5Product md5(offsetSection1,section1Length,gridDefinition,section1Flags,d # ECC-1806 concept_nofail paramIdForConversion(zero) { - 228004 = { gribTablesVersionNo=128; indicatorOfParameter=55; centre=98; } # 55 -> 228004 - 235168 = { gribTablesVersionNo=128; indicatorOfParameter=56; centre=98; } # 56 -> 235168 - 235135 = { gribTablesVersionNo=130; indicatorOfParameter=232; centre=98; } # 130232 -> 235135 - 262104 = { gribTablesVersionNo=151; indicatorOfParameter=163; centre=98; } # 151163 -> 262104 - 262124 = { gribTablesVersionNo=151; indicatorOfParameter=145; centre=98; } # 151145 -> 262124 - 235033 = { gribTablesVersionNo=172; indicatorOfParameter=146; centre=98; } # 172146 -> 235033 - 235034 = { gribTablesVersionNo=172; indicatorOfParameter=147; centre=98; } # 172147 -> 235034 - 235035 = { gribTablesVersionNo=172; indicatorOfParameter=169; centre=98; } # 172169 -> 235035 - 235036 = { gribTablesVersionNo=172; indicatorOfParameter=175; centre=98; } # 172175 -> 235036 - 235037 = { gribTablesVersionNo=172; indicatorOfParameter=176; centre=98; } # 172176 -> 235037 - 235038 = { gribTablesVersionNo=172; indicatorOfParameter=177; centre=98; } # 172177 -> 235038 - 235039 = { gribTablesVersionNo=172; indicatorOfParameter=178; centre=98; } # 172178 -> 235039 - 235040 = { gribTablesVersionNo=172; indicatorOfParameter=179; centre=98; } # 172179 -> 235040 - 262000 = { gribTablesVersionNo=174; indicatorOfParameter=98; centre=98; } # 174098 -> 262000 + 228004 = { gribTablesVersionNo=128; indicatorOfParameter=55; centre=98; } # 55 -> 228004 + 235168 = { gribTablesVersionNo=128; indicatorOfParameter=56; centre=98; } # 56 -> 235168 + 235135 = { gribTablesVersionNo=130; indicatorOfParameter=232; centre=98; } # 130232 -> 235135 + 262104 = { gribTablesVersionNo=151; indicatorOfParameter=163; centre=98; } # 151163 -> 262104 + 262124 = { gribTablesVersionNo=151; indicatorOfParameter=145; centre=98; } # 151145 -> 262124 + 235033 = { gribTablesVersionNo=172; indicatorOfParameter=146; centre=98; } # 172146 -> 235033 + 235034 = { gribTablesVersionNo=172; indicatorOfParameter=147; centre=98; } # 172147 -> 235034 + 235035 = { gribTablesVersionNo=172; indicatorOfParameter=169; centre=98; } # 172169 -> 235035 + 235036 = { gribTablesVersionNo=172; indicatorOfParameter=175; centre=98; } # 172175 -> 235036 + 235037 = { gribTablesVersionNo=172; indicatorOfParameter=176; centre=98; } # 172176 -> 235037 + 235038 = { gribTablesVersionNo=172; indicatorOfParameter=177; centre=98; } # 172177 -> 235038 + 235039 = { gribTablesVersionNo=172; indicatorOfParameter=178; centre=98; } # 172178 -> 235039 + 235040 = { gribTablesVersionNo=172; indicatorOfParameter=179; centre=98; } # 172179 -> 235040 + 262000 = { gribTablesVersionNo=174; indicatorOfParameter=98; centre=98; } # 174098 -> 262000 } : long_type; diff --git a/tests/grib_ecc-1806.sh b/tests/grib_ecc-1806.sh index acdc49631..596158b8d 100755 --- a/tests/grib_ecc-1806.sh +++ b/tests/grib_ecc-1806.sh @@ -17,8 +17,8 @@ tempGrib1=temp.$label.1.grib tempGrib2=temp.$label.2.grib tempLog=temp.$label.log -sample_grib1=$ECCODES_SAMPLES_PATH/GRIB1.tmpl -sample_grib2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl +sampleGrib1=$ECCODES_SAMPLES_PATH/GRIB1.tmpl +sampleGrib2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl test_conversion() { @@ -26,20 +26,13 @@ test_conversion() param2=$2 # new paramId in GRIB2 short=$3 # new shortName - ${tools_dir}/grib_set -s paramId=$param1 $sample_grib1 $tempGrib1 - - set +e - ${tools_dir}/grib_set -s edition=2 $tempGrib1 $tempGrib2 2>$REDIRECT - status=$? - set -e - if [ $status -ne 0 ]; then - ${tools_dir}/grib_set -s stepType=avg,edition=2 $tempGrib1 $tempGrib2 - fi + ${tools_dir}/grib_set -s paramId=$param1 $sampleGrib1 $tempGrib1 + ${tools_dir}/grib_set -s edition=2 $tempGrib1 $tempGrib2 grib_check_key_equals $tempGrib2 paramId,shortName "$param2 $short" # Check the old paramId has been removed from GRIB2 set +e - ${tools_dir}/grib_set -s paramId=$param1 $sample_grib2 $tempGrib2 >$tempLog 2>&1 + ${tools_dir}/grib_set -s paramId=$param1 $sampleGrib2 $tempGrib2 >$tempLog 2>&1 status=$? set -e [ $status -ne 0 ]