mirror of https://github.com/ecmwf/eccodes.git
Testing: GRIB2 product def templates
This commit is contained in:
parent
760cc84d80
commit
13982e7dbd
|
@ -35,8 +35,7 @@ done
|
|||
|
||||
# Template 4.86
|
||||
# -------------
|
||||
# TODO: Add tablesVersion later...
|
||||
$tools_dir/grib_set -s productDefinitionTemplateNumber=86,totalNumberOfQuantiles=2 $sample2 $temp
|
||||
$tools_dir/grib_set -s tablesVersion=31,productDefinitionTemplateNumber=86,totalNumberOfQuantiles=2 $sample2 $temp
|
||||
grib_check_key_equals $temp totalNumberOfQuantiles,quantileValue '2 0'
|
||||
|
||||
|
||||
|
@ -148,6 +147,33 @@ grib_check_key_equals $temp perturbationNumber,typeOfStatisticalProcessing '2000
|
|||
$tools_dir/grib_dump -O -p section_4 $temp > $tempText
|
||||
grep -q "Individual member for large ensemble forecast.*continuous or non-continuous interval" $tempText
|
||||
|
||||
# stepType & PDTNs
|
||||
# --------------------
|
||||
test_PDTN_conversions()
|
||||
{
|
||||
# Arguments
|
||||
# $1 = product def template for instantaneous
|
||||
# $2 = product def template for interval-based
|
||||
pdtn_instant=$1
|
||||
pdtn_interval=$2
|
||||
$tools_dir/grib_set -s productDefinitionTemplateNumber=$pdtn_instant,stepType=accum $sample2 $temp
|
||||
grib_check_key_equals $temp productDefinitionTemplateNumber $pdtn_interval
|
||||
$tools_dir/grib_set -s stepType=instant $temp $temp1
|
||||
grib_check_key_equals $temp1 productDefinitionTemplateNumber $pdtn_instant
|
||||
}
|
||||
|
||||
test_PDTN_conversions 2 12
|
||||
test_PDTN_conversions 3 13
|
||||
test_PDTN_conversions 4 14
|
||||
test_PDTN_conversions 5 9
|
||||
test_PDTN_conversions 6 10
|
||||
test_PDTN_conversions 40 42
|
||||
test_PDTN_conversions 41 43
|
||||
# test_PDTN_conversions 45 85 # TODO
|
||||
test_PDTN_conversions 57 67
|
||||
test_PDTN_conversions 58 68
|
||||
test_PDTN_conversions 71 73
|
||||
|
||||
|
||||
# Clean up
|
||||
rm -f $temp $temp1 $temp2 $tempFilt $tempText
|
||||
|
|
Loading…
Reference in New Issue