From a8e38059acb140f5f9fc81072e99666453913938 Mon Sep 17 00:00:00 2001 From: Sebastien Villaume Date: Wed, 5 Oct 2022 10:47:57 +0100 Subject: [PATCH 1/2] creating new templates for wavelength based parameters --- definitions/grib2/template.4.108.def | 10 ++++++++++ definitions/grib2/template.4.109.def | 11 +++++++++++ definitions/grib2/template.4.110.def | 10 ++++++++++ definitions/grib2/template.4.111.def | 11 +++++++++++ 4 files changed, 42 insertions(+) create mode 100644 definitions/grib2/template.4.108.def create mode 100644 definitions/grib2/template.4.109.def create mode 100644 definitions/grib2/template.4.110.def create mode 100644 definitions/grib2/template.4.111.def diff --git a/definitions/grib2/template.4.108.def b/definitions/grib2/template.4.108.def new file mode 100644 index 000000000..df4ad830b --- /dev/null +++ b/definitions/grib2/template.4.108.def @@ -0,0 +1,10 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.108, Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for generic optical properties + +include "grib2/template.4.parameter.def" +include "grib2/template.4.optical.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.point_in_time.def" +include "grib2/template.4.horizontal.def" diff --git a/definitions/grib2/template.4.109.def b/definitions/grib2/template.4.109.def new file mode 100644 index 000000000..ba75dadd6 --- /dev/null +++ b/definitions/grib2/template.4.109.def @@ -0,0 +1,11 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.109, Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for generic optical properties + +include "grib2/template.4.parameter.def" +include "grib2/template.4.optical.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.point_in_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.eps.def" diff --git a/definitions/grib2/template.4.110.def b/definitions/grib2/template.4.110.def new file mode 100644 index 000000000..4a148ccb7 --- /dev/null +++ b/definitions/grib2/template.4.110.def @@ -0,0 +1,10 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.110 - Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for generic optical properties + +include "grib2/template.4.parameter.def" +include "grib2/template.4.optical.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.statistical.def" diff --git a/definitions/grib2/template.4.111.def b/definitions/grib2/template.4.111.def new file mode 100644 index 000000000..f2a63683b --- /dev/null +++ b/definitions/grib2/template.4.111.def @@ -0,0 +1,11 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.111, Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for generic optical properties + +include "grib2/template.4.parameter.def" +include "grib2/template.4.optical.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.eps.def" +include "grib2/template.4.statistical.def" From 9492b5f389cdf0d92c2da7532903685e36b0031f Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Fri, 3 Mar 2023 15:25:12 +0000 Subject: [PATCH 2/2] Small changes for true-imagery template --- definitions/grib2/tables/30/4.0.table | 7 ++++- tests/CMakeLists.txt | 1 + tests/grib_true-imagery.sh | 45 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100755 tests/grib_true-imagery.sh diff --git a/definitions/grib2/tables/30/4.0.table b/definitions/grib2/tables/30/4.0.table index 3b35b9c5c..9929cea35 100644 --- a/definitions/grib2/tables/30/4.0.table +++ b/definitions/grib2/tables/30/4.0.table @@ -80,7 +80,12 @@ 96 96 Average, accumulation, extreme values or other statistically processed values of an individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a specified local time 97 97 Average, accumulation, extreme values or other statistically processed values of post-processing analysis or forecast at a horizontal level or in a horizontal layer at a specified local time 98 98 Average, accumulation, extreme values or other statistically processed values of a post-processing individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a specified local time -# 99-253 Reserved +# 99-107 Reserved +108 108 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for generic optical properties +109 109 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for generic optical properties +110 110 Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for generic optical properties +111 111 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for generic optical properties +# 112-253 Reserved 254 254 CCITT IA5 character string # 255-999 Reserved 1000 1000 Cross-section of analysis and forecast at a point in time diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 344004292..1033446e5 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -94,6 +94,7 @@ if( HAVE_BUILD_TOOLS ) grib_uerra grib_s2s grib_fire + grib_true-imagery grib_element grib_suppressed grib_2nd_order_numValues diff --git a/tests/grib_true-imagery.sh b/tests/grib_true-imagery.sh new file mode 100755 index 000000000..834fa415e --- /dev/null +++ b/tests/grib_true-imagery.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# (C) Copyright 2005- ECMWF. +# +# This software is licensed under the terms of the Apache Licence Version 2.0 +# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. +# +# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by +# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. +# + +. ./include.ctest.sh +set -u +REDIRECT=/dev/null +label="grib_true-imagery_test" # Change prod to bufr or grib etc +temp=temp.$label +tempd=temp_dump.$label +sample_grib2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl + +latest=30 # TODO + +## PDTN 108 - Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for generic optical products +${tools_dir}/grib_set -s tablesVersion=$latest,productDefinitionTemplateNumber=108 $sample_grib2 $temp +${tools_dir}/grib_dump -O $temp > $tempd +grep -q 'Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for generic optical properties' $tempd +grib_check_key_equals $temp typeOfWavelengthInterval,scaledValueOfFirstWavelength,scaledValueOfSecondWavelength "0 0 MISSING" + +## PDTN 109 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for generic optical products +${tools_dir}/grib_set -s tablesVersion=$latest,productDefinitionTemplateNumber=109 $sample_grib2 $temp +${tools_dir}/grib_dump -O $temp > $tempd +grep -q 'Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for generic optical properties' $tempd +grib_check_key_equals $temp typeOfWavelengthInterval,scaledValueOfFirstWavelength,scaledValueOfSecondWavelength "0 0 MISSING" + +## PDTN 110 - Average, accumulation, extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for generic optical products +${tools_dir}/grib_set -s tablesVersion=$latest,productDefinitionTemplateNumber=110 $sample_grib2 $temp +${tools_dir}/grib_dump -O $temp > $tempd +grep -q 'Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for generic optical properties' $tempd +grib_check_key_equals $temp typeOfWavelengthInterval,scaledValueOfFirstWavelength,scaledValueOfSecondWavelength "0 0 MISSING" + +## PDTN 111 - Average, accumulation, extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for generic optical products +${tools_dir}/grib_set -s tablesVersion=$latest,productDefinitionTemplateNumber=111 $sample_grib2 $temp +${tools_dir}/grib_dump -O $temp > $tempd +grep -q 'Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for generic optical properties' $tempd +grib_check_key_equals $temp typeOfWavelengthInterval,scaledValueOfFirstWavelength,scaledValueOfSecondWavelength "0 0 MISSING" + +rm -f $temp $tempd