ECC-1564: GRIB2: Support local product definition templates for different centres

This commit is contained in:
Shahram Najm 2023-03-31 17:22:39 +01:00
parent 15639cd0eb
commit 9fb2140ccb
4 changed files with 11 additions and 1 deletions

View File

@ -51,7 +51,12 @@ if (section2Used == 1) {
}
}
transient genVertHeightCoords = 0;
template productDefinition "grib2/template.4.[productDefinitionTemplateNumber:l].def" ;
if (productDefinitionTemplateNumber >= 32768) {
template productDefinition "grib2/local/[centreForLocal]/template.4.[productDefinitionTemplateNumber:l].def";
} else {
template productDefinition "grib2/template.4.[productDefinitionTemplateNumber:l].def";
}
if (defined(marsStream) && defined(marsType)) {
template_nofail marsKeywords1 "mars/grib.[marsStream:s].[marsType:s].def";

View File

@ -119,4 +119,9 @@ $tools_dir/grib_set -s tablesVersion=26,productDefinitionTemplateNumber=85 $samp
$tools_dir/grib_compare -b productDefinitionTemplateNumber $temp1 $temp2
# ECC-1564: Support local product definition templates for different centres
$tools_dir/grib_set -s productDefinitionTemplateNumber=40033 $sample2 $temp
$tools_dir/grib_set -s productDefinitionTemplateNumber=40034 $sample2 $temp
rm -f $temp $temp1 $temp2 $tempFilt