Merge pull request #81 from rdosinski/feature/true-imagery

Feature/true imagery
This commit is contained in:
shahramn 2023-03-06 16:23:27 +00:00 committed by GitHub
commit dcd135a196
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 94 additions and 1 deletions

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -83,6 +83,7 @@ if( HAVE_BUILD_TOOLS )
grib_uerra
grib_s2s
grib_fire
grib_true-imagery
grib_element
grib_suppressed
grib_2nd_order_numValues

45
tests/grib_true-imagery.sh Executable file
View File

@ -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