From 713c3b8950a1122f73e6d51fac5777379297567a Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 9 Oct 2023 11:12:44 +0100 Subject: [PATCH] ECC-1700: Fix tests --- definitions/grib2/boot.def | 2 +- definitions/grib2/tables/32/4.0.table | 109 ------------------ tests/CMakeLists.txt | 2 +- ...ib_ecpoint_dgov-242.sh => grib_ecpoint.sh} | 13 ++- 4 files changed, 9 insertions(+), 117 deletions(-) delete mode 100644 definitions/grib2/tables/32/4.0.table rename tests/{grib_ecpoint_dgov-242.sh => grib_ecpoint.sh} (87%) diff --git a/definitions/grib2/boot.def b/definitions/grib2/boot.def index f453a714d..296dba179 100644 --- a/definitions/grib2/boot.def +++ b/definitions/grib2/boot.def @@ -11,7 +11,7 @@ # See https://community.wmo.int/activity-areas/wmo-codes/manual-codes/latest-version constant tablesVersionLatestOfficial = 31 : edition_specific; # If this is different from the official version, then it is the pre-operational version -constant tablesVersionLatest = 32 : edition_specific; +constant tablesVersionLatest = 31 : edition_specific; constant million = 1000000 : hidden; constant grib2divider = 1000000; diff --git a/definitions/grib2/tables/32/4.0.table b/definitions/grib2/tables/32/4.0.table deleted file mode 100644 index cfbb61fd1..000000000 --- a/definitions/grib2/tables/32/4.0.table +++ /dev/null @@ -1,109 +0,0 @@ -# Code table 4.0 - Product definition template number -0 0 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time -1 1 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time -2 2 Derived forecasts based on all ensemble members at a horizontal level or in a horizontal layer at a point in time -3 3 Derived forecasts based on a cluster of ensemble members over a rectangular area at a horizontal level or in a horizontal layer at a point in time -4 4 Derived forecasts based on a cluster of ensemble members over a circular area at a horizontal level or in a horizontal layer at a point in time -5 5 Probability forecasts at a horizontal level or in a horizontal layer at a point in time -6 6 Percentile forecasts at a horizontal level or in a horizontal layer at a point in time -7 7 Analysis or forecast error at a horizontal level or in a horizontal layer at a point in time -8 8 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 -9 9 Probability forecasts at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval -10 10 Percentile forecasts at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval -11 11 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval -12 12 Derived forecasts based on all ensemble members at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval -13 13 Derived forecasts based on a cluster of ensemble members over a rectangular area, at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval -14 14 Derived forecasts based on a cluster of ensemble members over a circular area, at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval -15 15 Average, accumulation, extreme values or other statistically processed values over a spatial area at a horizontal level or in a horizontal layer at a point in time -# 16-19 Reserved -20 20 Radar product -# 21-29 Reserved -30 30 Satellite product (deprecated) -31 31 Satellite product -32 32 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for simulated (synthetic) satellite data -33 33 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for simulated (synthetic) satellite data -34 34 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval for simulated (synthetic) satellite data -35 35 Satellite product with or without associated quality values -# 36-39 Reserved -40 40 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents -41 41 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents -42 42 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 atmospheric chemical constituents -43 43 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for atmospheric chemical constituents -44 44 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for aerosol -45 45 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for aerosol -46 46 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 aerosol -47 47 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for aerosol -48 48 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for optical properties of aerosol -49 49 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for optical properties of aerosol -# 50 Reserved -51 51 Categorical forecasts at a horizontal level or in a horizontal layer at a point in time -# 52 Reserved -53 53 Partitioned parameters at a horizontal level or in a horizontal layer at a point in time -54 54 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for partitioned parameters -55 55 Spatio-temporal changing tiles at a horizontal level or horizontal layer at a point in time -56 56 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for spatio-temporal changing tile parameters (deprecated) -57 57 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents based on a distribution function -58 58 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents based on a distribution function -59 59 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for spatio-temporal changing tile parameters (corrected version of template 4.56) -60 60 Individual ensemble reforecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time -61 61 Individual ensemble reforecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval -62 62 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 spatio-temporal changing tiles at a horizontal level or horizontal layer at a point in time -63 63 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for spatio-temporal changing tiles -# 64-66 Reserved -67 67 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 atmospheric chemical constituents based on a distribution function -68 68 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for atmospheric chemical constituents based on a distribution function -# 69 Reserved -70 70 Post-processing analysis or forecast at a horizontal level or in a horizontal layer at a point in time -71 71 Post-processing individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time -72 72 Post-processing 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 -73 73 Post-processing individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval -# 74-75 Reserved -76 76 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents with source or sink -77 77 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents with source or sink -78 78 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 atmospheric chemical constituents with source or sink -79 79 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for atmospheric chemical constituents with source or sink -80 80 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for optical properties of aerosol with source or sink -81 81 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for optical properties of aerosol with source or sink -82 82 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 aerosol with source or sink -83 83 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for aerosol with source or sink -84 84 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for aerosol with source or sink -85 85 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for aerosol -86 86 Quantile forecasts at a horizontal level or in a horizontal layer at a point in time -87 87 Quantile forecasts at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval -88 88 Analysis or forecast at a horizontal level or in a horizontal layer at a specified local time -89 89 Post-processed quantile forecasts at a horizontal level or in a horizontal layer at a point in time -90 90 Post-processed quantile forecasts at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval -91 91 Categorical forecasts at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval -92 92 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a specified local time -93 93 Post-processing analysis or forecast at a horizontal level or in a horizontal layer at a specified local time -94 94 Post-processing individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a specified local time -95 95 Average, accumulation, extreme values or other statiscally processed value at a horizontal level or in a horizontal layer at a specified local time -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 99 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra with explicit list of frequencies and directions -100 100 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra with explicit list of frequencies and directions -101 101 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra with frequencies and directions defined by formulae -102 102 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra with frequencies and directions defined by formulae -103 103 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for waves selected by period range -104 104 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for waves selected by period range -105 105 Anomalies, significance and other derived products from an analysis or forecast in relation to a reference period at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval -106 106 Anomalies, significance and other derived products from an individual ensemble forecast, control and perturbed in relation to a reference period at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval -107 107 Anomalies, significance and other derived products from derived forecasts based on all ensemble members in relation to a reference period at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval -108 108 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for generic optical products -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 products -110 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 -111 111 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval for generic optical products -112 112 Anomalies, significance and other derived products as probability forecasts in relation to a reference period at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval -# 113-253 Reserved -254 254 CCITT IA5 character string -# 255-999 Reserved -1000 1000 Cross-section of analysis and forecast at a point in time -1001 1001 Cross-section of averaged or otherwise statistically processed analysis or forecast over a range of time -1002 1002 Cross-section of analysis and forecast, averaged or otherwise statistically processed over latitude or longitude -# 1003-1099 Reserved -1100 1100 Hovmoller-type grid with no averaging or other statistical processing -1101 1101 Hovmoller-type grid with averaging or other statistical processing -# 1102-32767 Reserved -# 32768-65534 Reserved for local use -65535 65535 Missing diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4f691fca0..595baae99 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -95,7 +95,7 @@ if( HAVE_BUILD_TOOLS ) grib_packing_order filter_substr grib_uerra - grib_ecpoint_dgov-242 + grib_ecpoint grib_s2s grib_fire # grib_true_imagery diff --git a/tests/grib_ecpoint_dgov-242.sh b/tests/grib_ecpoint.sh similarity index 87% rename from tests/grib_ecpoint_dgov-242.sh rename to tests/grib_ecpoint.sh index 95af43d4e..6e12571cc 100755 --- a/tests/grib_ecpoint_dgov-242.sh +++ b/tests/grib_ecpoint.sh @@ -10,16 +10,15 @@ . ./include.ctest.sh -REDIRECT=/dev/null -label="grib_ecPoint_DGOV-242_test" # Change prod to bufr or grib etc +label="grib_ecPoint_test" tempGrib=temp.$label.grib sample_grib2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl # 1. bias-corrected ## we check if we can set PDTN 73 and typeOfPostProcessing to ecPoint, ecPoint versioning and MARS type -${tools_dir}/grib_set -s tablesVersion=33,productDefinitionTemplateNumber=73,backgroundProcess=1,\ +${tools_dir}/grib_set -s tablesVersion=31,productDefinitionTemplateNumber=73,backgroundProcess=1,\ setLocalDefinition=1,grib2LocalSectionNumber=1,type=gbf,class=od,stream=enfo,\ generatingProcessIdentifier=2,typeOfPostProcessing=206 $sample_grib2 $tempGrib grib_check_key_equals $tempGrib backgroundProcess,generatingProcessIdentifier,typeOfPostProcessing,type "1 2 206 gbf" @@ -27,7 +26,7 @@ rm -f $tempGrib # 2. Point values ## we check if we can set PDTN 90 and typeOfPostProcessing to ecPoint, ecPoint versioning, MARS type, quantile -${tools_dir}/grib_set -s tablesVersion=33,productDefinitionTemplateNumber=90,backgroundProcess=1,\ +${tools_dir}/grib_set -s tablesVersion=31,productDefinitionTemplateNumber=90,backgroundProcess=1,\ setLocalDefinition=1,grib2LocalSectionNumber=1,type=pfc,class=od,stream=enfo,\ totalNumberOfQuantiles=1000,quantileValue=995,\ generatingProcessIdentifier=2,typeOfPostProcessing=206 $sample_grib2 $tempGrib @@ -36,7 +35,7 @@ rm -f $tempGrib # 3. Point value metrics ## we check if we can set PDTN 90 and typeOfPostProcessing to ecPoint, ecPoint versioning, MARS type, quantile -${tools_dir}/grib_set -s tablesVersion=33,productDefinitionTemplateNumber=90,backgroundProcess=1,\ +${tools_dir}/grib_set -s tablesVersion=31,productDefinitionTemplateNumber=90,backgroundProcess=1,\ setLocalDefinition=1,grib2LocalSectionNumber=1,type=ppm,class=od,stream=enfo,\ totalNumberOfQuantiles=1000,quantileValue=995,\ generatingProcessIdentifier=2,typeOfPostProcessing=206 $sample_grib2 $tempGrib @@ -45,8 +44,10 @@ rm -f $tempGrib # 4. weather types ## we check if we can set PDTN 73 and typeOfPostProcessing to ecPoint, ecPoint versioning and MARS type -${tools_dir}/grib_set -s tablesVersion=33,productDefinitionTemplateNumber=73,backgroundProcess=1,\ +${tools_dir}/grib_set -s tablesVersion=31,productDefinitionTemplateNumber=73,backgroundProcess=1,\ setLocalDefinition=1,grib2LocalSectionNumber=1,type=gwt,class=od,stream=enfo,\ generatingProcessIdentifier=2,typeOfPostProcessing=206 $sample_grib2 $tempGrib grib_check_key_equals $tempGrib backgroundProcess,generatingProcessIdentifier,typeOfPostProcessing,type "1 2 206 gwt" + +# Clean up rm -f $tempGrib