diff --git a/definitions/grib2/section.1.def b/definitions/grib2/section.1.def index a9bca14ce..719a9399c 100644 --- a/definitions/grib2/section.1.def +++ b/definitions/grib2/section.1.def @@ -93,6 +93,8 @@ concept stepType { "ratio" = {selectStepTemplateInterval=1; stepTypeInternal="ratio";} "stdanom" = {selectStepTemplateInterval=1; stepTypeInternal="stdanom";} "sum" = {selectStepTemplateInterval=1; stepTypeInternal="sum";} + "severity" = {selectStepTemplateInterval=1; stepTypeInternal="severity";} + "mode" = {selectStepTemplateInterval=1; stepTypeInternal="mode";} } # 0=atmospheric chemical constituents diff --git a/definitions/grib2/template.4.statistical.def b/definitions/grib2/template.4.statistical.def index 35390d536..c9307b04e 100644 --- a/definitions/grib2/template.4.statistical.def +++ b/definitions/grib2/template.4.statistical.def @@ -68,6 +68,8 @@ if (numberOfTimeRange == 1 || numberOfTimeRange == 2) { "ratio" = {typeOfStatisticalProcessing=9;} "stdanom" = {typeOfStatisticalProcessing=10;} "sum" = {typeOfStatisticalProcessing=11;} + "severity" = {typeOfStatisticalProcessing=100;} + "mode" = {typeOfStatisticalProcessing=101;} } meta startStep step_in_units(forecastTime,indicatorOfUnitOfTimeRange,stepUnits, indicatorOfUnitForTimeRange,lengthOfTimeRange) : no_copy; diff --git a/tests/grib_step.sh b/tests/grib_step.sh index 362bf9d03..1bc7e208b 100755 --- a/tests/grib_step.sh +++ b/tests/grib_step.sh @@ -62,6 +62,7 @@ diff ${data_dir}/step_grib1.log ${templog} rm -f ${templog} # GRIB-180 +# ------------ # Set PDT 4.8 where you can find the EndOfOverallTimeInterval keys grib2File=${data_dir}/reduced_latlon_surface_constant.grib2 ${tools_dir}/grib_set -sproductDefinitionTemplateNumber=8 $grib2File ${grib2File}.p8tmp @@ -81,6 +82,7 @@ hourEnd=$1; dayEnd=$2 # ECC-134 case-sensitivity +# -------------------------- grib1_sample=$ECCODES_SAMPLES_PATH/GRIB1.tmpl grib2_sample=$ECCODES_SAMPLES_PATH/GRIB2.tmpl temp=temp.step.$$.grib @@ -93,6 +95,7 @@ unit=`${tools_dir}/grib_get -p indicatorOfUnitOfTimeRange $temp` [ "$unit" = "3" ] # m is for Minute (code 0) +# ------------------------- ${tools_dir}/grib_set -s indicatorOfUnitOfTimeRange=m $grib1_sample $temp unit=`${tools_dir}/grib_get -p unitOfTimeRange $temp` [ "$unit" = "0" ] @@ -101,9 +104,18 @@ unit=`${tools_dir}/grib_get -p indicatorOfUnitOfTimeRange $temp` [ "$unit" = "0" ] # ECC-457 +# --------- input=${data_dir}/tp_ecmwf.grib stepRange=`${tools_dir}/grib_get -w count=1 -p stepRange,startStep,endStep,stepType $input` [ "$stepRange" = "12 12 12 instant" ] +# ECC-1430: stepType: 'severity' and 'mode' +# ----------------------------------------- +${tools_dir}/grib_set -s stepType=severity,paramId=260318 $grib2_sample $temp +grib_check_key_equals $temp productDefinitionTemplateNumber,typeOfStatisticalProcessing '8 100' +${tools_dir}/grib_set -s stepType=mode,paramId=260320 $grib2_sample $temp +grib_check_key_equals $temp productDefinitionTemplateNumber,typeOfStatisticalProcessing '8 101' + +# Clean up rm -f $temp rm -f $grib2File.p8tmp ${grib2File}.tmp x.grib