From db625aaa24d973ff943e266775061c4e57761d12 Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Tue, 22 Aug 2023 12:08:50 +0000 Subject: [PATCH 01/13] time property mars keys / concept added --- definitions/grib2/section.4.def | 72 +++++++++++++++++++++++++++++++++ definitions/grib2/timeprop.def | 29 +++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 definitions/grib2/timeprop.def diff --git a/definitions/grib2/section.4.def b/definitions/grib2/section.4.def index b62a15329..598690298 100644 --- a/definitions/grib2/section.4.def +++ b/definitions/grib2/section.4.def @@ -102,3 +102,75 @@ else { } meta md5Section4 md5(offsetSection4,section4Length); + +if (stepType is "instant") { + constant timepropstring = "inst" : no_copy; +} else { + template timeprop "grib2/timeprop.def"; + if(numberOfTimeRange == 1){ + constant tloop = typeOfStatisticalProcessing : no_copy ; + constant iloop = indicatorOfUnitForTimeRange : no_copy ; + constant lloop = lengthOfTimeRange : no_copy ; + constant timepropstring = timeprop : no_copy; + } + + if(numberOfTimeRange == 2){ + meta tloop element(typeOfStatisticalProcessing, 0); + meta iloop element(indicatorOfUnitForTimeRange, 0); + meta lloop element(lengthOfTimeRange, 0); + constant timeprop0 = timeprop : no_copy; + # + meta tloop element(typeOfStatisticalProcessing, 1); + meta iloop element(indicatorOfUnitForTimeRange, 1); + meta lloop element(lengthOfTimeRange, 1); + constant timeprop1 = timeprop : no_copy; + + meta timepropstring sprintf("%s_%s",timeprop0,timeprop1); + } + + if(numberOfTimeRange == 3){ + meta tloop element(typeOfStatisticalProcessing, 0); + meta iloop element(indicatorOfUnitForTimeRange, 0); + meta lloop element(lengthOfTimeRange, 0); + constant timeprop0 = timeprop : no_copy; + # + meta tloop element(typeOfStatisticalProcessing, 1); + meta iloop element(indicatorOfUnitForTimeRange, 1); + meta lloop element(lengthOfTimeRange, 1); + constant timeprop1 = timeprop : no_copy; + # + meta tloop element(typeOfStatisticalProcessing, 2); + meta iloop element(indicatorOfUnitForTimeRange, 2); + meta lloop element(lengthOfTimeRange, 2); + constant timeprop2 = timeprop : no_copy; + + meta timepropstring sprintf("%s_%s_%s",timeprop0,timeprop1,timeprop2); + } + + if(numberOfTimeRange == 4){ + meta tloop element(typeOfStatisticalProcessing, 0); + meta iloop element(indicatorOfUnitForTimeRange, 0); + meta lloop element(lengthOfTimeRange, 0); + constant timeprop0 = timeprop : no_copy; + # + meta tloop element(typeOfStatisticalProcessing, 1); + meta iloop element(indicatorOfUnitForTimeRange, 1); + meta lloop element(lengthOfTimeRange, 1); + constant timeprop1 = timeprop : no_copy; + # + meta tloop element(typeOfStatisticalProcessing, 2); + meta iloop element(indicatorOfUnitForTimeRange, 2); + meta lloop element(lengthOfTimeRange, 2); + constant timeprop2 = timeprop : no_copy; + + meta tloop element(typeOfStatisticalProcessing, 3); + meta iloop element(indicatorOfUnitForTimeRange, 3); + meta lloop element(lengthOfTimeRange, 3); + constant timeprop3 = timeprop : no_copy; + + meta timepropstring sprintf("%s_%s_%s_%s",timeprop0,timeprop1,timeprop2,timeprop3); + } + +} + +alias mars.timeprop = timepropstring ; diff --git a/definitions/grib2/timeprop.def b/definitions/grib2/timeprop.def new file mode 100644 index 000000000..c18083707 --- /dev/null +++ b/definitions/grib2/timeprop.def @@ -0,0 +1,29 @@ +concept timeprop { + "inst" = {stepType="instant";} + "avgd" = {tloop = 0; iloop=1; lloop = 24;} + "avgw" = {tloop = 0; iloop=1; lloop = 168;} + "avgm" = {tloop = 0; iloop=1; lloop = 672;} + "avgm" = {tloop = 0; iloop=1; lloop = 696;} + "avgm" = {tloop = 0; iloop=1; lloop = 720;} + "avgm" = {tloop = 0; iloop=1; lloop = 744;} + "maxd" = {tloop = 2; iloop=1; lloop = 24;} + "maxw" = {tloop = 2; iloop=1; lloop = 168;} + "maxm" = {tloop = 2; iloop=1; lloop = 672;} + "maxm" = {tloop = 2; iloop=1; lloop = 696;} + "maxm" = {tloop = 2; iloop=1; lloop = 720;} + "maxm" = {tloop = 2; iloop=1; lloop = 744;} + "mind" = {tloop = 3; iloop=1; lloop = 24;} + "minw" = {tloop = 3; iloop=1; lloop = 168;} + "minm" = {tloop = 3; iloop=1; lloop = 672;} + "minm" = {tloop = 3; iloop=1; lloop = 696;} + "minm" = {tloop = 3; iloop=1; lloop = 720;} + "minm" = {tloop = 3; iloop=1; lloop = 744;} + "avg" = {tloop = 0;} + "accum" = {tloop = 1;} + "max" = {tloop = 2;} + "min" = {tloop = 3;} + "1h" = {iloop=1; lloop = 1;} + "3h" = {iloop=1; lloop = 3;} + "6h" = {iloop=1; lloop = 6;} + "12h" = {iloop=1; lloop = 12;} +} From 8ada6854810960cfb0aa5e9efb647ddc764f5100 Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Tue, 22 Aug 2023 13:42:01 +0000 Subject: [PATCH 02/13] comments to timeprop --- definitions/grib2/timeprop.def | 3 +++ 1 file changed, 3 insertions(+) diff --git a/definitions/grib2/timeprop.def b/definitions/grib2/timeprop.def index c18083707..bf7e5043d 100644 --- a/definitions/grib2/timeprop.def +++ b/definitions/grib2/timeprop.def @@ -1,4 +1,7 @@ concept timeprop { +# tloop = typeOfStatisticalProcessing +# iloop = indicatorOfUnitForTimeRange +# lloop = lengthOfTimeRange "inst" = {stepType="instant";} "avgd" = {tloop = 0; iloop=1; lloop = 24;} "avgw" = {tloop = 0; iloop=1; lloop = 168;} From 4040188bc29cd5a0a83418ca86ac98cdfc0bb1cc Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Tue, 22 Aug 2023 15:10:15 +0000 Subject: [PATCH 03/13] moved mars.timeprop into pt in time and stat templates --- definitions/grib2/section.4.def | 72 ------------------- .../grib2/template.4.point_in_time.def | 2 + definitions/grib2/template.4.statistical.def | 67 +++++++++++++++++ 3 files changed, 69 insertions(+), 72 deletions(-) diff --git a/definitions/grib2/section.4.def b/definitions/grib2/section.4.def index 598690298..b62a15329 100644 --- a/definitions/grib2/section.4.def +++ b/definitions/grib2/section.4.def @@ -102,75 +102,3 @@ else { } meta md5Section4 md5(offsetSection4,section4Length); - -if (stepType is "instant") { - constant timepropstring = "inst" : no_copy; -} else { - template timeprop "grib2/timeprop.def"; - if(numberOfTimeRange == 1){ - constant tloop = typeOfStatisticalProcessing : no_copy ; - constant iloop = indicatorOfUnitForTimeRange : no_copy ; - constant lloop = lengthOfTimeRange : no_copy ; - constant timepropstring = timeprop : no_copy; - } - - if(numberOfTimeRange == 2){ - meta tloop element(typeOfStatisticalProcessing, 0); - meta iloop element(indicatorOfUnitForTimeRange, 0); - meta lloop element(lengthOfTimeRange, 0); - constant timeprop0 = timeprop : no_copy; - # - meta tloop element(typeOfStatisticalProcessing, 1); - meta iloop element(indicatorOfUnitForTimeRange, 1); - meta lloop element(lengthOfTimeRange, 1); - constant timeprop1 = timeprop : no_copy; - - meta timepropstring sprintf("%s_%s",timeprop0,timeprop1); - } - - if(numberOfTimeRange == 3){ - meta tloop element(typeOfStatisticalProcessing, 0); - meta iloop element(indicatorOfUnitForTimeRange, 0); - meta lloop element(lengthOfTimeRange, 0); - constant timeprop0 = timeprop : no_copy; - # - meta tloop element(typeOfStatisticalProcessing, 1); - meta iloop element(indicatorOfUnitForTimeRange, 1); - meta lloop element(lengthOfTimeRange, 1); - constant timeprop1 = timeprop : no_copy; - # - meta tloop element(typeOfStatisticalProcessing, 2); - meta iloop element(indicatorOfUnitForTimeRange, 2); - meta lloop element(lengthOfTimeRange, 2); - constant timeprop2 = timeprop : no_copy; - - meta timepropstring sprintf("%s_%s_%s",timeprop0,timeprop1,timeprop2); - } - - if(numberOfTimeRange == 4){ - meta tloop element(typeOfStatisticalProcessing, 0); - meta iloop element(indicatorOfUnitForTimeRange, 0); - meta lloop element(lengthOfTimeRange, 0); - constant timeprop0 = timeprop : no_copy; - # - meta tloop element(typeOfStatisticalProcessing, 1); - meta iloop element(indicatorOfUnitForTimeRange, 1); - meta lloop element(lengthOfTimeRange, 1); - constant timeprop1 = timeprop : no_copy; - # - meta tloop element(typeOfStatisticalProcessing, 2); - meta iloop element(indicatorOfUnitForTimeRange, 2); - meta lloop element(lengthOfTimeRange, 2); - constant timeprop2 = timeprop : no_copy; - - meta tloop element(typeOfStatisticalProcessing, 3); - meta iloop element(indicatorOfUnitForTimeRange, 3); - meta lloop element(lengthOfTimeRange, 3); - constant timeprop3 = timeprop : no_copy; - - meta timepropstring sprintf("%s_%s_%s_%s",timeprop0,timeprop1,timeprop2,timeprop3); - } - -} - -alias mars.timeprop = timepropstring ; diff --git a/definitions/grib2/template.4.point_in_time.def b/definitions/grib2/template.4.point_in_time.def index 98885540a..8efd5453f 100644 --- a/definitions/grib2/template.4.point_in_time.def +++ b/definitions/grib2/template.4.point_in_time.def @@ -30,3 +30,5 @@ meta time.validityDate validity_date(dataDate,dataTime,step,stepUnits) : no_copy meta time.validityTime validity_time(dataDate,dataTime,step,stepUnits) : no_copy; meta validityDateTime julian_date(validityDate, validityTime) : no_copy; +constant timepropstring = "inst" : no_copy ; +alias mars.timeprop = timepropstring ; \ No newline at end of file diff --git a/definitions/grib2/template.4.statistical.def b/definitions/grib2/template.4.statistical.def index dfc0e7203..98dfb235f 100644 --- a/definitions/grib2/template.4.statistical.def +++ b/definitions/grib2/template.4.statistical.def @@ -125,3 +125,70 @@ meta time.validityDate validity_date(date,dataTime,step,stepUnits,yearOfEndOfOve meta time.validityTime validity_time(date,dataTime,step,stepUnits,hourOfEndOfOverallTimeInterval, minuteOfEndOfOverallTimeInterval) : no_copy; meta validityDateTime julian_date(validityDate, validityTime) : no_copy; + +template timeprop "grib2/timeprop.def"; +if(numberOfTimeRange == 1){ +constant tloop = typeOfStatisticalProcessing : no_copy ; +constant iloop = indicatorOfUnitForTimeRange : no_copy ; +constant lloop = lengthOfTimeRange : no_copy ; +constant timepropstring = timeprop : no_copy; +} + +if(numberOfTimeRange == 2){ +meta tloop element(typeOfStatisticalProcessing, 0); +meta iloop element(indicatorOfUnitForTimeRange, 0); +meta lloop element(lengthOfTimeRange, 0); +constant timeprop0 = timeprop : no_copy; +# +meta tloop element(typeOfStatisticalProcessing, 1); +meta iloop element(indicatorOfUnitForTimeRange, 1); +meta lloop element(lengthOfTimeRange, 1); +constant timeprop1 = timeprop : no_copy; + +meta timepropstring sprintf("%s_%s",timeprop0,timeprop1); +} + +if(numberOfTimeRange == 3){ +meta tloop element(typeOfStatisticalProcessing, 0); +meta iloop element(indicatorOfUnitForTimeRange, 0); +meta lloop element(lengthOfTimeRange, 0); +constant timeprop0 = timeprop : no_copy; +# +meta tloop element(typeOfStatisticalProcessing, 1); +meta iloop element(indicatorOfUnitForTimeRange, 1); +meta lloop element(lengthOfTimeRange, 1); +constant timeprop1 = timeprop : no_copy; +# +meta tloop element(typeOfStatisticalProcessing, 2); +meta iloop element(indicatorOfUnitForTimeRange, 2); +meta lloop element(lengthOfTimeRange, 2); +constant timeprop2 = timeprop : no_copy; + +meta timepropstring sprintf("%s_%s_%s",timeprop0,timeprop1,timeprop2); +} + +if(numberOfTimeRange == 4){ +meta tloop element(typeOfStatisticalProcessing, 0); +meta iloop element(indicatorOfUnitForTimeRange, 0); +meta lloop element(lengthOfTimeRange, 0); +constant timeprop0 = timeprop : no_copy; +# +meta tloop element(typeOfStatisticalProcessing, 1); +meta iloop element(indicatorOfUnitForTimeRange, 1); +meta lloop element(lengthOfTimeRange, 1); +constant timeprop1 = timeprop : no_copy; +# +meta tloop element(typeOfStatisticalProcessing, 2); +meta iloop element(indicatorOfUnitForTimeRange, 2); +meta lloop element(lengthOfTimeRange, 2); +constant timeprop2 = timeprop : no_copy; + +meta tloop element(typeOfStatisticalProcessing, 3); +meta iloop element(indicatorOfUnitForTimeRange, 3); +meta lloop element(lengthOfTimeRange, 3); +constant timeprop3 = timeprop : no_copy; + +meta timepropstring sprintf("%s_%s_%s_%s",timeprop0,timeprop1,timeprop2,timeprop3); +} + +alias mars.timeprop = timepropstring ; From 34759a87d1b50795ee4692660aed46a79540deec Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Wed, 23 Aug 2023 07:57:16 +0000 Subject: [PATCH 04/13] additional stat types added, timeprop concept extended --- definitions/grib2/template.4.referenceperiod.def | 11 +++++++++++ definitions/grib2/template.4.statistical.def | 8 ++++---- definitions/grib2/timeprop.def | 12 ++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/definitions/grib2/template.4.referenceperiod.def b/definitions/grib2/template.4.referenceperiod.def index 90c05351f..c2aec6ad1 100644 --- a/definitions/grib2/template.4.referenceperiod.def +++ b/definitions/grib2/template.4.referenceperiod.def @@ -47,3 +47,14 @@ referencePeriodList list(numberOfReferencePeriodTimeRanges) # Length of reference period, in units defined by the previous octet [referencePeriodIndicatorOfUnitForTimeIncrement] unsigned[4] lengthOfTimeRangeForReferencePeriod=0 ; } + +concept timeprop { + "anom" = {typeOfRelationToReferenceDataset = 0;} + "sign" = {typeOfRelationToReferenceDataset = 2;} + "efi_sot" = {typeOfRelationToReferenceDataset = 20;} + "efi_sot" = {typeOfRelationToReferenceDataset = 21;} +} + +constant timepropstring = timeprop ; + +alias mars.timeprop = timepropstring ; diff --git a/definitions/grib2/template.4.statistical.def b/definitions/grib2/template.4.statistical.def index 98dfb235f..9d054441f 100644 --- a/definitions/grib2/template.4.statistical.def +++ b/definitions/grib2/template.4.statistical.def @@ -127,14 +127,14 @@ meta time.validityTime validity_time(date,dataTime,step,stepUnits,hourOfEndOfOve meta validityDateTime julian_date(validityDate, validityTime) : no_copy; template timeprop "grib2/timeprop.def"; -if(numberOfTimeRange == 1){ +if(numberOfTimeRange == 1 and productDefinitionTemplateNumber != 105 and productDefinitionTemplateNumber != 106 and productDefinitionTemplateNumber != 107 and productDefinitionTemplateNumber != 112){ constant tloop = typeOfStatisticalProcessing : no_copy ; constant iloop = indicatorOfUnitForTimeRange : no_copy ; constant lloop = lengthOfTimeRange : no_copy ; constant timepropstring = timeprop : no_copy; } -if(numberOfTimeRange == 2){ +if(numberOfTimeRange == 2 and productDefinitionTemplateNumber != 105 and productDefinitionTemplateNumber != 106 and productDefinitionTemplateNumber != 107 and productDefinitionTemplateNumber != 112){ meta tloop element(typeOfStatisticalProcessing, 0); meta iloop element(indicatorOfUnitForTimeRange, 0); meta lloop element(lengthOfTimeRange, 0); @@ -148,7 +148,7 @@ constant timeprop1 = timeprop : no_copy; meta timepropstring sprintf("%s_%s",timeprop0,timeprop1); } -if(numberOfTimeRange == 3){ +if(numberOfTimeRange == 3 and productDefinitionTemplateNumber != 105 and productDefinitionTemplateNumber != 106 and productDefinitionTemplateNumber != 107 and productDefinitionTemplateNumber != 112){ meta tloop element(typeOfStatisticalProcessing, 0); meta iloop element(indicatorOfUnitForTimeRange, 0); meta lloop element(lengthOfTimeRange, 0); @@ -167,7 +167,7 @@ constant timeprop2 = timeprop : no_copy; meta timepropstring sprintf("%s_%s_%s",timeprop0,timeprop1,timeprop2); } -if(numberOfTimeRange == 4){ +if(numberOfTimeRange == 4 and productDefinitionTemplateNumber != 105 and productDefinitionTemplateNumber != 106 and productDefinitionTemplateNumber != 107 and productDefinitionTemplateNumber != 112){ meta tloop element(typeOfStatisticalProcessing, 0); meta iloop element(indicatorOfUnitForTimeRange, 0); meta lloop element(lengthOfTimeRange, 0); diff --git a/definitions/grib2/timeprop.def b/definitions/grib2/timeprop.def index bf7e5043d..b42b9fa41 100644 --- a/definitions/grib2/timeprop.def +++ b/definitions/grib2/timeprop.def @@ -4,29 +4,41 @@ concept timeprop { # lloop = lengthOfTimeRange "inst" = {stepType="instant";} "avgd" = {tloop = 0; iloop=1; lloop = 24;} + "avgd" = {tloop = 0; iloop=2; lloop = 1;} "avgw" = {tloop = 0; iloop=1; lloop = 168;} "avgm" = {tloop = 0; iloop=1; lloop = 672;} "avgm" = {tloop = 0; iloop=1; lloop = 696;} "avgm" = {tloop = 0; iloop=1; lloop = 720;} "avgm" = {tloop = 0; iloop=1; lloop = 744;} + "avgm" = {tloop = 0; iloop=3; lloop = 1;} "maxd" = {tloop = 2; iloop=1; lloop = 24;} + "maxd" = {tloop = 2; iloop=2; lloop = 1;} "maxw" = {tloop = 2; iloop=1; lloop = 168;} "maxm" = {tloop = 2; iloop=1; lloop = 672;} "maxm" = {tloop = 2; iloop=1; lloop = 696;} "maxm" = {tloop = 2; iloop=1; lloop = 720;} "maxm" = {tloop = 2; iloop=1; lloop = 744;} + "maxm" = {tloop = 2; iloop=3; lloop = 1;} "mind" = {tloop = 3; iloop=1; lloop = 24;} + "mind" = {tloop = 3; iloop=2; lloop = 1;} "minw" = {tloop = 3; iloop=1; lloop = 168;} "minm" = {tloop = 3; iloop=1; lloop = 672;} "minm" = {tloop = 3; iloop=1; lloop = 696;} "minm" = {tloop = 3; iloop=1; lloop = 720;} "minm" = {tloop = 3; iloop=1; lloop = 744;} + "minm" = {tloop = 3; iloop=3; lloop = 1;} "avg" = {tloop = 0;} "accum" = {tloop = 1;} "max" = {tloop = 2;} "min" = {tloop = 3;} + "stdanom" = {tloop = 10;} + "sev" = {tloop = 100;} + "mode" = {tloop = 101;} "1h" = {iloop=1; lloop = 1;} "3h" = {iloop=1; lloop = 3;} + "3h" = {iloop=10; lloop = 1;} "6h" = {iloop=1; lloop = 6;} + "6h" = {iloop=11; lloop = 1;} "12h" = {iloop=1; lloop = 12;} + "12h" = {iloop=12; lloop = 1;} } From 84c3d5e1e820719910731a94e214735c774cbf9e Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Wed, 23 Aug 2023 09:57:55 +0000 Subject: [PATCH 05/13] accum modification for data integrated from start of the fcst --- definitions/grib2/timeprop.def | 1 + 1 file changed, 1 insertion(+) diff --git a/definitions/grib2/timeprop.def b/definitions/grib2/timeprop.def index b42b9fa41..5d2c47a20 100644 --- a/definitions/grib2/timeprop.def +++ b/definitions/grib2/timeprop.def @@ -29,6 +29,7 @@ concept timeprop { "minm" = {tloop = 3; iloop=3; lloop = 1;} "avg" = {tloop = 0;} "accum" = {tloop = 1;} + "accum" = {tloop = 1; numberOfTimeRange = 1 ;} "max" = {tloop = 2;} "min" = {tloop = 3;} "stdanom" = {tloop = 10;} From 01170c186a12f4f33905d647f3640112cdd87be1 Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Wed, 23 Aug 2023 10:29:04 +0000 Subject: [PATCH 06/13] extended timeprop concept --- definitions/grib2/timeprop.def | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/definitions/grib2/timeprop.def b/definitions/grib2/timeprop.def index 5d2c47a20..6beaedf6b 100644 --- a/definitions/grib2/timeprop.def +++ b/definitions/grib2/timeprop.def @@ -3,6 +3,7 @@ concept timeprop { # iloop = indicatorOfUnitForTimeRange # lloop = lengthOfTimeRange "inst" = {stepType="instant";} + "avg" = {tloop = 0; iloop=1; numberOfTimeRange = 1;} "avgd" = {tloop = 0; iloop=1; lloop = 24;} "avgd" = {tloop = 0; iloop=2; lloop = 1;} "avgw" = {tloop = 0; iloop=1; lloop = 168;} @@ -11,6 +12,7 @@ concept timeprop { "avgm" = {tloop = 0; iloop=1; lloop = 720;} "avgm" = {tloop = 0; iloop=1; lloop = 744;} "avgm" = {tloop = 0; iloop=3; lloop = 1;} + "max" = {tloop = 2; iloop=1; numberOfTimeRange = 1;} "maxd" = {tloop = 2; iloop=1; lloop = 24;} "maxd" = {tloop = 2; iloop=2; lloop = 1;} "maxw" = {tloop = 2; iloop=1; lloop = 168;} @@ -19,6 +21,7 @@ concept timeprop { "maxm" = {tloop = 2; iloop=1; lloop = 720;} "maxm" = {tloop = 2; iloop=1; lloop = 744;} "maxm" = {tloop = 2; iloop=3; lloop = 1;} + "min" = {tloop = 3; iloop=1; numberOfTimeRange = 1;} "mind" = {tloop = 3; iloop=1; lloop = 24;} "mind" = {tloop = 3; iloop=2; lloop = 1;} "minw" = {tloop = 3; iloop=1; lloop = 168;} @@ -29,7 +32,33 @@ concept timeprop { "minm" = {tloop = 3; iloop=3; lloop = 1;} "avg" = {tloop = 0;} "accum" = {tloop = 1;} - "accum" = {tloop = 1; numberOfTimeRange = 1 ;} + "accum" = {tloop = 1; numberOfTimeRange = 1;} + "accum" = {tloop = 1; iloop=1; lloop = 24; numberOfTimeRange = 1;} + "accum" = {tloop = 1; iloop=2; lloop = 1; numberOfTimeRange = 1;} + "accumd" = {tloop = 1; iloop=1; lloop = 24; numberOfTimeRange = 2;} + "accumd" = {tloop = 1; iloop=2; lloop = 1; numberOfTimeRange = 2;} + "accumd" = {tloop = 1; iloop=1; lloop = 24; numberOfTimeRange = 3;} + "accumd" = {tloop = 1; iloop=2; lloop = 1; numberOfTimeRange = 3;} + "accumd" = {tloop = 1; iloop=1; lloop = 24; numberOfTimeRange = 4;} + "accumd" = {tloop = 1; iloop=2; lloop = 1; numberOfTimeRange = 4;} + "accumw" = {tloop = 1; iloop=1; lloop = 168; numberOfTimeRange = 2;} + "accumw" = {tloop = 1; iloop=1; lloop = 168; numberOfTimeRange = 3;} + "accumw" = {tloop = 1; iloop=1; lloop = 168; numberOfTimeRange = 4;} + "accumm" = {tloop = 1; iloop=3; lloop = 1; numberOfTimeRange = 2;} + "accumm" = {tloop = 1; iloop=1; lloop = 672; numberOfTimeRange = 2;} + "accumm" = {tloop = 1; iloop=1; lloop = 696; numberOfTimeRange = 2;} + "accumm" = {tloop = 1; iloop=1; lloop = 720; numberOfTimeRange = 2;} + "accumm" = {tloop = 1; iloop=1; lloop = 744; numberOfTimeRange = 2;} + "accumm" = {tloop = 1; iloop=3; lloop = 1; numberOfTimeRange = 3;} + "accumm" = {tloop = 1; iloop=1; lloop = 672; numberOfTimeRange = 3;} + "accumm" = {tloop = 1; iloop=1; lloop = 696; numberOfTimeRange = 3;} + "accumm" = {tloop = 1; iloop=1; lloop = 720; numberOfTimeRange = 3;} + "accumm" = {tloop = 1; iloop=1; lloop = 744; numberOfTimeRange = 3;} + "accumm" = {tloop = 1; iloop=3; lloop = 1; numberOfTimeRange = 4;} + "accumm" = {tloop = 1; iloop=1; lloop = 672; numberOfTimeRange = 4;} + "accumm" = {tloop = 1; iloop=1; lloop = 696; numberOfTimeRange = 4;} + "accumm" = {tloop = 1; iloop=1; lloop = 720; numberOfTimeRange = 4;} + "accumm" = {tloop = 1; iloop=1; lloop = 744; numberOfTimeRange = 4;} "max" = {tloop = 2;} "min" = {tloop = 3;} "stdanom" = {tloop = 10;} From 60cff37b607ed1f969f3af16d4e99c84545e046c Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Wed, 23 Aug 2023 11:52:21 +0000 Subject: [PATCH 07/13] timeprop concept extended --- definitions/grib2/timeprop.def | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/definitions/grib2/timeprop.def b/definitions/grib2/timeprop.def index 6beaedf6b..6d446df96 100644 --- a/definitions/grib2/timeprop.def +++ b/definitions/grib2/timeprop.def @@ -4,6 +4,8 @@ concept timeprop { # lloop = lengthOfTimeRange "inst" = {stepType="instant";} "avg" = {tloop = 0; iloop=1; numberOfTimeRange = 1;} + "avg" = {tloop = 0; iloop=2; numberOfTimeRange = 1;} + "avg" = {tloop = 0; iloop=3; numberOfTimeRange = 1;} "avgd" = {tloop = 0; iloop=1; lloop = 24;} "avgd" = {tloop = 0; iloop=2; lloop = 1;} "avgw" = {tloop = 0; iloop=1; lloop = 168;} @@ -13,6 +15,8 @@ concept timeprop { "avgm" = {tloop = 0; iloop=1; lloop = 744;} "avgm" = {tloop = 0; iloop=3; lloop = 1;} "max" = {tloop = 2; iloop=1; numberOfTimeRange = 1;} + "max" = {tloop = 2; iloop=2; numberOfTimeRange = 1;} + "max" = {tloop = 2; iloop=3; numberOfTimeRange = 1;} "maxd" = {tloop = 2; iloop=1; lloop = 24;} "maxd" = {tloop = 2; iloop=2; lloop = 1;} "maxw" = {tloop = 2; iloop=1; lloop = 168;} @@ -22,6 +26,8 @@ concept timeprop { "maxm" = {tloop = 2; iloop=1; lloop = 744;} "maxm" = {tloop = 2; iloop=3; lloop = 1;} "min" = {tloop = 3; iloop=1; numberOfTimeRange = 1;} + "min" = {tloop = 3; iloop=2; numberOfTimeRange = 1;} + "min" = {tloop = 3; iloop=3; numberOfTimeRange = 1;} "mind" = {tloop = 3; iloop=1; lloop = 24;} "mind" = {tloop = 3; iloop=2; lloop = 1;} "minw" = {tloop = 3; iloop=1; lloop = 168;} @@ -33,6 +39,9 @@ concept timeprop { "avg" = {tloop = 0;} "accum" = {tloop = 1;} "accum" = {tloop = 1; numberOfTimeRange = 1;} + "accum" = {tloop = 1; iloop=1; numberOfTimeRange = 1;} + "accum" = {tloop = 1; iloop=2; numberOfTimeRange = 1;} + "accum" = {tloop = 1; iloop=3; numberOfTimeRange = 1;} "accum" = {tloop = 1; iloop=1; lloop = 24; numberOfTimeRange = 1;} "accum" = {tloop = 1; iloop=2; lloop = 1; numberOfTimeRange = 1;} "accumd" = {tloop = 1; iloop=1; lloop = 24; numberOfTimeRange = 2;} From 38410c58c15b3152ecf672affda6504234232235 Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Wed, 23 Aug 2023 13:02:16 +0000 Subject: [PATCH 08/13] more entries in timeprop.def --- definitions/grib2/timeprop.def | 86 ++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/definitions/grib2/timeprop.def b/definitions/grib2/timeprop.def index 6d446df96..80607236e 100644 --- a/definitions/grib2/timeprop.def +++ b/definitions/grib2/timeprop.def @@ -73,11 +73,97 @@ concept timeprop { "stdanom" = {tloop = 10;} "sev" = {tloop = 100;} "mode" = {tloop = 101;} + "sev" = {tloop = 100; iloop=1;} + "mode" = {tloop = 101; iloop=1;} + "mean1h" = {tloop = 0; iloop=1; lloop = 1; numberOfTimeRange = 2;} + "accum1h" = {tloop = 1; iloop=1; lloop = 1; numberOfTimeRange = 2;} + "max1h" = {tloop = 2; iloop=1; lloop = 1; numberOfTimeRange = 2;} + "min1h" = {tloop = 3; iloop=1; lloop = 1; numberOfTimeRange = 2;} + "mean1h" = {tloop = 0; iloop=1; lloop = 1; numberOfTimeRange = 3;} + "accum1h" = {tloop = 1; iloop=1; lloop = 1; numberOfTimeRange = 3;} + "max1h" = {tloop = 2; iloop=1; lloop = 1; numberOfTimeRange = 3;} + "min1h" = {tloop = 3; iloop=1; lloop = 1; numberOfTimeRange = 3;} + "mean1h" = {tloop = 0; iloop=1; lloop = 1; numberOfTimeRange = 4;} + "accum1h" = {tloop = 1; iloop=1; lloop = 1; numberOfTimeRange = 4;} + "max1h" = {tloop = 2; iloop=1; lloop = 1; numberOfTimeRange = 4;} + "min1h" = {tloop = 3; iloop=1; lloop = 1; numberOfTimeRange = 4;} "1h" = {iloop=1; lloop = 1;} + "mean3h" = {tloop = 0; iloop=1; lloop = 3; numberOfTimeRange = 2;} + "accum3h" = {tloop = 1; iloop=1; lloop = 3; numberOfTimeRange = 2;} + "max3h" = {tloop = 2; iloop=1; lloop = 3; numberOfTimeRange = 2;} + "min3h" = {tloop = 3; iloop=1; lloop = 3; numberOfTimeRange = 2;} + "mean3h" = {tloop = 0; iloop=1; lloop = 3; numberOfTimeRange = 3;} + "accum3h" = {tloop = 1; iloop=1; lloop = 3; numberOfTimeRange = 3;} + "max3h" = {tloop = 2; iloop=1; lloop = 3; numberOfTimeRange = 3;} + "min3h" = {tloop = 3; iloop=1; lloop = 3; numberOfTimeRange = 3;} + "mean3h" = {tloop = 0; iloop=1; lloop = 3; numberOfTimeRange = 4;} + "accum3h" = {tloop = 1; iloop=1; lloop = 3; numberOfTimeRange = 4;} + "max3h" = {tloop = 2; iloop=1; lloop = 3; numberOfTimeRange = 4;} + "min3h" = {tloop = 3; iloop=1; lloop = 3; numberOfTimeRange = 4;} + "mean3h" = {tloop = 0; iloop=10; lloop = 1; numberOfTimeRange = 2;} + "accum3h" = {tloop = 1; iloop=10; lloop = 1; numberOfTimeRange = 2;} + "max3h" = {tloop = 2; iloop=10; lloop = 1; numberOfTimeRange = 2;} + "min3h" = {tloop = 3; iloop=10; lloop = 1; numberOfTimeRange = 2;} + "mean3h" = {tloop = 0; iloop=10; lloop = 1; numberOfTimeRange = 3;} + "accum3h" = {tloop = 1; iloop=10; lloop = 1; numberOfTimeRange = 3;} + "max3h" = {tloop = 2; iloop=10; lloop = 1; numberOfTimeRange = 3;} + "min3h" = {tloop = 3; iloop=10; lloop = 1; numberOfTimeRange = 3;} + "mean3h" = {tloop = 0; iloop=10; lloop = 1; numberOfTimeRange = 4;} + "accum3h" = {tloop = 1; iloop=10; lloop = 1; numberOfTimeRange = 4;} + "max3h" = {tloop = 2; iloop=10; lloop = 1; numberOfTimeRange = 4;} + "min3h" = {tloop = 3; iloop=10; lloop = 1; numberOfTimeRange = 4;} "3h" = {iloop=1; lloop = 3;} "3h" = {iloop=10; lloop = 1;} + "mean6h" = {tloop = 0; iloop=1; lloop = 6; numberOfTimeRange = 2;} + "accum6h" = {tloop = 1; iloop=1; lloop = 6; numberOfTimeRange = 2;} + "max6h" = {tloop = 2; iloop=1; lloop = 6; numberOfTimeRange = 2;} + "min6h" = {tloop = 3; iloop=1; lloop = 6; numberOfTimeRange = 2;} + "mean6h" = {tloop = 0; iloop=1; lloop = 6; numberOfTimeRange = 3;} + "accum6h" = {tloop = 1; iloop=1; lloop = 6; numberOfTimeRange = 3;} + "max6h" = {tloop = 2; iloop=1; lloop = 6; numberOfTimeRange = 3;} + "min6h" = {tloop = 3; iloop=1; lloop = 6; numberOfTimeRange = 3;} + "mean6h" = {tloop = 0; iloop=1; lloop = 6; numberOfTimeRange = 4;} + "accum6h" = {tloop = 1; iloop=1; lloop = 6; numberOfTimeRange = 4;} + "max6h" = {tloop = 2; iloop=1; lloop = 6; numberOfTimeRange = 4;} + "min6h" = {tloop = 3; iloop=1; lloop = 6; numberOfTimeRange = 4;} + "mean6h" = {tloop = 0; iloop=11; lloop = 1; numberOfTimeRange = 2;} + "accum6h" = {tloop = 1; iloop=11; lloop = 1; numberOfTimeRange = 2;} + "max6h" = {tloop = 2; iloop=11; lloop = 1; numberOfTimeRange = 2;} + "min6h" = {tloop = 3; iloop=11; lloop = 1; numberOfTimeRange = 2;} + "mean6h" = {tloop = 0; iloop=11; lloop = 1; numberOfTimeRange = 3;} + "accum6h" = {tloop = 1; iloop=11; lloop = 1; numberOfTimeRange = 3;} + "max6h" = {tloop = 2; iloop=11; lloop = 1; numberOfTimeRange = 3;} + "min6h" = {tloop = 3; iloop=11; lloop = 1; numberOfTimeRange = 3;} + "mean6h" = {tloop = 0; iloop=11; lloop = 1; numberOfTimeRange = 4;} + "accum6h" = {tloop = 1; iloop=11; lloop = 1; numberOfTimeRange = 4;} + "max6h" = {tloop = 2; iloop=11; lloop = 1; numberOfTimeRange = 4;} + "min6h" = {tloop = 3; iloop=11; lloop = 1; numberOfTimeRange = 4;} "6h" = {iloop=1; lloop = 6;} "6h" = {iloop=11; lloop = 1;} + "mean12h" = {tloop = 0; iloop=1; lloop = 12; numberOfTimeRange = 2;} + "accum12h" = {tloop = 1; iloop=1; lloop = 12; numberOfTimeRange = 2;} + "max12h" = {tloop = 2; iloop=1; lloop = 12; numberOfTimeRange = 2;} + "min12h" = {tloop = 3; iloop=1; lloop = 12; numberOfTimeRange = 2;} + "mean12h" = {tloop = 0; iloop=1; lloop = 12; numberOfTimeRange = 3;} + "accum12h" = {tloop = 1; iloop=1; lloop = 12; numberOfTimeRange = 3;} + "max12h" = {tloop = 2; iloop=1; lloop = 12; numberOfTimeRange = 3;} + "min12h" = {tloop = 3; iloop=1; lloop = 12; numberOfTimeRange = 3;} + "mean12h" = {tloop = 0; iloop=1; lloop = 12; numberOfTimeRange = 4;} + "accum12h" = {tloop = 1; iloop=1; lloop = 12; numberOfTimeRange = 4;} + "max12h" = {tloop = 2; iloop=1; lloop = 12; numberOfTimeRange = 4;} + "min12h" = {tloop = 3; iloop=1; lloop = 12; numberOfTimeRange = 4;} + "mean12h" = {tloop = 0; iloop=12; lloop = 1; numberOfTimeRange = 2;} + "accum12h" = {tloop = 1; iloop=12; lloop = 1; numberOfTimeRange = 2;} + "max12h" = {tloop = 2; iloop=12; lloop = 1; numberOfTimeRange = 2;} + "min12h" = {tloop = 3; iloop=12; lloop = 1; numberOfTimeRange = 2;} + "mean12h" = {tloop = 0; iloop=12; lloop = 1; numberOfTimeRange = 3;} + "accum12h" = {tloop = 1; iloop=12; lloop = 1; numberOfTimeRange = 3;} + "max12h" = {tloop = 2; iloop=12; lloop = 1; numberOfTimeRange = 3;} + "min12h" = {tloop = 3; iloop=12; lloop = 1; numberOfTimeRange = 3;} + "mean12h" = {tloop = 0; iloop=12; lloop = 1; numberOfTimeRange = 4;} + "accum12h" = {tloop = 1; iloop=12; lloop = 1; numberOfTimeRange = 4;} + "max12h" = {tloop = 2; iloop=12; lloop = 1; numberOfTimeRange = 4;} + "min12h" = {tloop = 3; iloop=12; lloop = 1; numberOfTimeRange = 4;} "12h" = {iloop=1; lloop = 12;} "12h" = {iloop=12; lloop = 1;} } From db351fb5e38dc073710e1444308bcd1befbb8bf8 Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Tue, 29 Aug 2023 12:19:57 +0000 Subject: [PATCH 09/13] synoptic means added --- definitions/grib2/timeprop.def | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/definitions/grib2/timeprop.def b/definitions/grib2/timeprop.def index 80607236e..b694f9415 100644 --- a/definitions/grib2/timeprop.def +++ b/definitions/grib2/timeprop.def @@ -14,6 +14,18 @@ concept timeprop { "avgm" = {tloop = 0; iloop=1; lloop = 720;} "avgm" = {tloop = 0; iloop=1; lloop = 744;} "avgm" = {tloop = 0; iloop=3; lloop = 1;} + # synoptic means + # we can use indicatorOfUnitForTimeIncrement and timeIncrement directly as it is a simple integer, not a list + # numberOfTimeRange = 1 + "avgs" = {tloop = 0; iloop=1; lloop = 672; indicatorOfUnitForTimeIncrement = 1; timeIncrement = 24; numberOfTimeRange = 1;} + "avgs" = {tloop = 0; iloop=1; lloop = 696; indicatorOfUnitForTimeIncrement = 1; timeIncrement = 24; numberOfTimeRange = 1;} + "avgs" = {tloop = 0; iloop=1; lloop = 720; indicatorOfUnitForTimeIncrement = 1; timeIncrement = 24; numberOfTimeRange = 1;} + "avgs" = {tloop = 0; iloop=1; lloop = 744; indicatorOfUnitForTimeIncrement = 1; timeIncrement = 24; numberOfTimeRange = 1;} + "avgs" = {tloop = 0; iloop=1; lloop = 672; indicatorOfUnitForTimeIncrement = 2; timeIncrement = 1; numberOfTimeRange = 1;} + "avgs" = {tloop = 0; iloop=1; lloop = 696; indicatorOfUnitForTimeIncrement = 2; timeIncrement = 1; numberOfTimeRange = 1;} + "avgs" = {tloop = 0; iloop=1; lloop = 720; indicatorOfUnitForTimeIncrement = 2; timeIncrement = 1; numberOfTimeRange = 1;} + "avgs" = {tloop = 0; iloop=1; lloop = 744; indicatorOfUnitForTimeIncrement = 2; timeIncrement = 1; numberOfTimeRange = 1;} + # "max" = {tloop = 2; iloop=1; numberOfTimeRange = 1;} "max" = {tloop = 2; iloop=2; numberOfTimeRange = 1;} "max" = {tloop = 2; iloop=3; numberOfTimeRange = 1;} From 29bcf5ba3765af9a1c57cedda083d4711385bc53 Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Tue, 29 Aug 2023 13:57:23 +0000 Subject: [PATCH 10/13] local timeprop for CARRA/CERRA --- definitions/grib2/localConcepts/uerra/timeprop.def | 6 ++++++ definitions/grib2/template.4.statistical.def | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 definitions/grib2/localConcepts/uerra/timeprop.def diff --git a/definitions/grib2/localConcepts/uerra/timeprop.def b/definitions/grib2/localConcepts/uerra/timeprop.def new file mode 100644 index 000000000..293ffd45a --- /dev/null +++ b/definitions/grib2/localConcepts/uerra/timeprop.def @@ -0,0 +1,6 @@ +concept timeprop { +# tloop = typeOfStatisticalProcessing +# iloop = indicatorOfUnitForTimeRange +# lloop = lengthOfTimeRange + "avgd" = {tloop = 0; iloop=1; lloop = 21; numberOfTimeRange = 1; indicatorOfUnitForTimeIncrement = 1; typeOfTimeIncrement = 1; timeIncrement = 3;} +} diff --git a/definitions/grib2/template.4.statistical.def b/definitions/grib2/template.4.statistical.def index 9d054441f..d600e75dd 100644 --- a/definitions/grib2/template.4.statistical.def +++ b/definitions/grib2/template.4.statistical.def @@ -127,6 +127,13 @@ meta time.validityTime validity_time(date,dataTime,step,stepUnits,hourOfEndOfOve meta validityDateTime julian_date(validityDate, validityTime) : no_copy; template timeprop "grib2/timeprop.def"; + +# crra = Copernicus Regional ReAnalysis +if (productionStatusOfProcessedData== 10 || productionStatusOfProcessedData == 11){ + template timeprop "grib2/localConcepts/uerra/timeprop.def"; +} + + if(numberOfTimeRange == 1 and productDefinitionTemplateNumber != 105 and productDefinitionTemplateNumber != 106 and productDefinitionTemplateNumber != 107 and productDefinitionTemplateNumber != 112){ constant tloop = typeOfStatisticalProcessing : no_copy ; constant iloop = indicatorOfUnitForTimeRange : no_copy ; From 340f846c4e2dc59345692a575c5b9ab69db2de86 Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Tue, 29 Aug 2023 15:03:43 +0000 Subject: [PATCH 11/13] timeprop concept extended for CARRA/CERRA --- .../grib2/localConcepts/uerra/timeprop.def | 31 +++++ definitions/grib2/template.4.statistical.def | 129 +++++++++++------- 2 files changed, 111 insertions(+), 49 deletions(-) diff --git a/definitions/grib2/localConcepts/uerra/timeprop.def b/definitions/grib2/localConcepts/uerra/timeprop.def index 293ffd45a..877e9bdfa 100644 --- a/definitions/grib2/localConcepts/uerra/timeprop.def +++ b/definitions/grib2/localConcepts/uerra/timeprop.def @@ -2,5 +2,36 @@ concept timeprop { # tloop = typeOfStatisticalProcessing # iloop = indicatorOfUnitForTimeRange # lloop = lengthOfTimeRange +# iloopti = indicatorOfUnitForTimeIncrement +# tloopti = typeOfTimeIncrement +# lloopti = timeIncrement "avgd" = {tloop = 0; iloop=1; lloop = 21; numberOfTimeRange = 1; indicatorOfUnitForTimeIncrement = 1; typeOfTimeIncrement = 1; timeIncrement = 3;} + "avgm" = {tloop = 0; iloop=1; lloop = 741; numberOfTimeRange = 2; iloopti = 1; tloopti= 1; lloopti = 3;} + "minm" = {tloop = 3; iloop=1; lloop = 741; numberOfTimeRange = 2; iloopti = 1; tloopti= 1; lloopti = 3;} + "maxm" = {tloop = 2; iloop=1; lloop = 741; numberOfTimeRange = 2; iloopti = 1; tloopti = 1; lloopti = 3;} + "avgm" = {tloop = 0; iloop=1; lloop = 648; numberOfTimeRange = 3; iloopti = 1; tloopti = 1; lloopti = 24;} + "minm" = {tloop = 3; iloop=1; lloop = 648; numberOfTimeRange = 3; iloopti = 1; tloopti = 1; lloopti = 24;} + "maxm" = {tloop = 2; iloop=1; lloop = 648; numberOfTimeRange = 3; iloopti = 1; tloopti = 1; lloopti = 24;} + "avgm" = {tloop = 0; iloop=1; lloop = 720; numberOfTimeRange = 3; iloopti = 1; tloopti = 1; lloopti = 24;} + "minm" = {tloop = 3; iloop=1; lloop = 720; numberOfTimeRange = 3; iloopti = 1; tloopti = 1; lloopti = 24;} + "maxm" = {tloop = 2; iloop=1; lloop = 720; numberOfTimeRange = 3; iloopti = 1; tloopti = 1; lloopti = 24;} + "avgm3h" = {tloop = 0; iloop=1; lloop = 741; numberOfTimeRange = 1; indicatorOfUnitForTimeIncrement = 1; typeOfTimeIncrement = 1; timeIncrement = 3;} + "accumd" = {tloop = 1; iloop=1; lloop = 24; numberOfTimeRange = 2;} + "accumd" = {tloop = 1; iloop=1; lloop = 24; numberOfTimeRange = 3;} + "accum12h" = {tloop = 1; iloop=1; lloop = 12; numberOfTimeRange = 2;} + "accum12h" = {tloop = 1; iloop=1; lloop = 12; numberOfTimeRange = 3;} + "mind" = {tloop = 3; iloop=1; lloop = 21; iloopti = 1; tloopti = 1; lloopti = 3;} + "maxd" = {tloop = 2; iloop=1; lloop = 21; iloopti = 1; tloopti = 1; lloopti = 3;} + "avg3h" = {tloop = 0; iloop=1; lloop = 3; numberOfTimeRange = 2;} + "accum3h" = {tloop = 1; iloop=1; lloop = 3; numberOfTimeRange = 2;} + "max3h" = {tloop = 2; iloop=1; lloop = 3; numberOfTimeRange = 2;} + "min3h" = {tloop = 3; iloop=1; lloop = 3; numberOfTimeRange = 2;} + "avg3h" = {tloop = 0; iloop=1; lloop = 3; numberOfTimeRange = 3;} + "accum3h" = {tloop = 1; iloop=1; lloop = 3; numberOfTimeRange = 3;} + "max3h" = {tloop = 2; iloop=1; lloop = 3; numberOfTimeRange = 3;} + "min3h" = {tloop = 3; iloop=1; lloop = 3; numberOfTimeRange = 3;} + "avg" = {tloop = 0;} + "accum" = {tloop = 1;} + "max" = {tloop = 2;} + "min" = {tloop = 3;} } diff --git a/definitions/grib2/template.4.statistical.def b/definitions/grib2/template.4.statistical.def index d600e75dd..b1e1ba045 100644 --- a/definitions/grib2/template.4.statistical.def +++ b/definitions/grib2/template.4.statistical.def @@ -128,74 +128,105 @@ meta validityDateTime julian_date(validityDate, validityTime) : no_copy; template timeprop "grib2/timeprop.def"; -# crra = Copernicus Regional ReAnalysis if (productionStatusOfProcessedData== 10 || productionStatusOfProcessedData == 11){ template timeprop "grib2/localConcepts/uerra/timeprop.def"; } if(numberOfTimeRange == 1 and productDefinitionTemplateNumber != 105 and productDefinitionTemplateNumber != 106 and productDefinitionTemplateNumber != 107 and productDefinitionTemplateNumber != 112){ -constant tloop = typeOfStatisticalProcessing : no_copy ; -constant iloop = indicatorOfUnitForTimeRange : no_copy ; -constant lloop = lengthOfTimeRange : no_copy ; -constant timepropstring = timeprop : no_copy; + constant tloop = typeOfStatisticalProcessing : no_copy ; + constant iloop = indicatorOfUnitForTimeRange : no_copy ; + constant lloop = lengthOfTimeRange : no_copy ; + + constant iloopti = indicatorOfUnitForTimeIncrement; + constant tloopti = typeOfTimeIncrement; + constant lloopti = timeIncrement; + + constant timepropstring = timeprop : no_copy; } if(numberOfTimeRange == 2 and productDefinitionTemplateNumber != 105 and productDefinitionTemplateNumber != 106 and productDefinitionTemplateNumber != 107 and productDefinitionTemplateNumber != 112){ -meta tloop element(typeOfStatisticalProcessing, 0); -meta iloop element(indicatorOfUnitForTimeRange, 0); -meta lloop element(lengthOfTimeRange, 0); -constant timeprop0 = timeprop : no_copy; + meta tloop element(typeOfStatisticalProcessing, 0); + meta iloop element(indicatorOfUnitForTimeRange, 0); + meta lloop element(lengthOfTimeRange, 0); + meta iloopti element(indicatorOfUnitForTimeIncrement, 0); + meta tloopti element(typeOfTimeIncrement, 0); + meta lloopti element(timeIncrement, 0); + constant timeprop0 = timeprop : no_copy; # -meta tloop element(typeOfStatisticalProcessing, 1); -meta iloop element(indicatorOfUnitForTimeRange, 1); -meta lloop element(lengthOfTimeRange, 1); -constant timeprop1 = timeprop : no_copy; - -meta timepropstring sprintf("%s_%s",timeprop0,timeprop1); + meta tloop element(typeOfStatisticalProcessing, 1); + meta iloop element(indicatorOfUnitForTimeRange, 1); + meta lloop element(lengthOfTimeRange, 1); + meta iloopti element(indicatorOfUnitForTimeIncrement, 1); + meta tloopti element(typeOfTimeIncrement, 1); + meta lloopti element(timeIncrement, 1); + constant timeprop1 = timeprop : no_copy; + + meta timepropstring sprintf("%s_%s",timeprop0,timeprop1); } if(numberOfTimeRange == 3 and productDefinitionTemplateNumber != 105 and productDefinitionTemplateNumber != 106 and productDefinitionTemplateNumber != 107 and productDefinitionTemplateNumber != 112){ -meta tloop element(typeOfStatisticalProcessing, 0); -meta iloop element(indicatorOfUnitForTimeRange, 0); -meta lloop element(lengthOfTimeRange, 0); -constant timeprop0 = timeprop : no_copy; -# -meta tloop element(typeOfStatisticalProcessing, 1); -meta iloop element(indicatorOfUnitForTimeRange, 1); -meta lloop element(lengthOfTimeRange, 1); -constant timeprop1 = timeprop : no_copy; + meta tloop element(typeOfStatisticalProcessing, 0); + meta iloop element(indicatorOfUnitForTimeRange, 0); + meta lloop element(lengthOfTimeRange, 0); + meta iloopti element(indicatorOfUnitForTimeIncrement, 0); + meta tloopti element(typeOfTimeIncrement, 0); + meta lloopti element(timeIncrement, 0); + constant timeprop0 = timeprop : no_copy; # -meta tloop element(typeOfStatisticalProcessing, 2); -meta iloop element(indicatorOfUnitForTimeRange, 2); -meta lloop element(lengthOfTimeRange, 2); -constant timeprop2 = timeprop : no_copy; - -meta timepropstring sprintf("%s_%s_%s",timeprop0,timeprop1,timeprop2); + meta tloop element(typeOfStatisticalProcessing, 1); + meta iloop element(indicatorOfUnitForTimeRange, 1); + meta lloop element(lengthOfTimeRange, 1); + meta iloopti element(indicatorOfUnitForTimeIncrement, 1); + meta tloopti element(typeOfTimeIncrement, 1); + meta lloopti element(timeIncrement, 1); + constant timeprop1 = timeprop : no_copy; + # + meta tloop element(typeOfStatisticalProcessing, 2); + meta iloop element(indicatorOfUnitForTimeRange, 2); + meta lloop element(lengthOfTimeRange, 2); + meta iloopti element(indicatorOfUnitForTimeIncrement, 2); + meta tloopti element(typeOfTimeIncrement, 2); + meta lloopti element(timeIncrement, 2); + constant timeprop2 = timeprop : no_copy; + + meta timepropstring sprintf("%s_%s_%s",timeprop0,timeprop1,timeprop2); } if(numberOfTimeRange == 4 and productDefinitionTemplateNumber != 105 and productDefinitionTemplateNumber != 106 and productDefinitionTemplateNumber != 107 and productDefinitionTemplateNumber != 112){ -meta tloop element(typeOfStatisticalProcessing, 0); -meta iloop element(indicatorOfUnitForTimeRange, 0); -meta lloop element(lengthOfTimeRange, 0); -constant timeprop0 = timeprop : no_copy; + meta tloop element(typeOfStatisticalProcessing, 0); + meta iloop element(indicatorOfUnitForTimeRange, 0); + meta lloop element(lengthOfTimeRange, 0); + meta iloopti element(indicatorOfUnitForTimeIncrement, 0); + meta tloopti element(typeOfTimeIncrement, 0); + meta lloopti element(timeIncrement, 0); + constant timeprop0 = timeprop : no_copy; # -meta tloop element(typeOfStatisticalProcessing, 1); -meta iloop element(indicatorOfUnitForTimeRange, 1); -meta lloop element(lengthOfTimeRange, 1); -constant timeprop1 = timeprop : no_copy; + meta tloop element(typeOfStatisticalProcessing, 1); + meta iloop element(indicatorOfUnitForTimeRange, 1); + meta lloop element(lengthOfTimeRange, 1); + meta iloopti element(indicatorOfUnitForTimeIncrement, 1); + meta tloopti element(typeOfTimeIncrement, 1); + meta lloopti element(timeIncrement, 1); + constant timeprop1 = timeprop : no_copy; # -meta tloop element(typeOfStatisticalProcessing, 2); -meta iloop element(indicatorOfUnitForTimeRange, 2); -meta lloop element(lengthOfTimeRange, 2); -constant timeprop2 = timeprop : no_copy; - -meta tloop element(typeOfStatisticalProcessing, 3); -meta iloop element(indicatorOfUnitForTimeRange, 3); -meta lloop element(lengthOfTimeRange, 3); -constant timeprop3 = timeprop : no_copy; - -meta timepropstring sprintf("%s_%s_%s_%s",timeprop0,timeprop1,timeprop2,timeprop3); + meta tloop element(typeOfStatisticalProcessing, 2); + meta iloop element(indicatorOfUnitForTimeRange, 2); + meta lloop element(lengthOfTimeRange, 2); + meta iloopti element(indicatorOfUnitForTimeIncrement, 2); + meta tloopti element(typeOfTimeIncrement, 2); + meta lloopti element(timeIncrement, 2); + constant timeprop2 = timeprop : no_copy; + + meta tloop element(typeOfStatisticalProcessing, 3); + meta iloop element(indicatorOfUnitForTimeRange, 3); + meta lloop element(lengthOfTimeRange, 3); + meta iloopti element(indicatorOfUnitForTimeIncrement, 3); + meta tloopti element(typeOfTimeIncrement, 3); + meta lloopti element(timeIncrement, 3); + constant timeprop3 = timeprop : no_copy; + + meta timepropstring sprintf("%s_%s_%s_%s",timeprop0,timeprop1,timeprop2,timeprop3); } alias mars.timeprop = timepropstring ; From 7c058b1b8cffe800fb4753051349dbe357b80f38 Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Fri, 1 Sep 2023 12:31:18 +0000 Subject: [PATCH 12/13] read timeprop concept in section.4.def --- definitions/grib2/section.4.def | 8 ++++++++ definitions/grib2/template.4.referenceperiod.def | 7 ------- definitions/grib2/template.4.statistical.def | 7 ------- definitions/grib2/timeprop.def | 4 ++++ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/definitions/grib2/section.4.def b/definitions/grib2/section.4.def index b62a15329..69e6cb5de 100644 --- a/definitions/grib2/section.4.def +++ b/definitions/grib2/section.4.def @@ -1,3 +1,4 @@ + # (C) Copyright 2005- ECMWF. transient timeRangeIndicator=0 : no_copy,hidden; @@ -39,6 +40,13 @@ concept datasetForLocal(unknown) { "unknown" = { dummy=1; } } +# timeprop key +if (productionStatusOfProcessedData== 10 || productionStatusOfProcessedData == 11){ + template timeprop "grib2/localConcepts/uerra/timeprop.def"; +} else { + template timeprop "grib2/timeprop.def"; +} + if (!(datasetForLocal is "unknown")) { constant conceptsDir2 = "grib2/localConcepts/[datasetForLocal]": hidden; constant conceptsDir1 = "grib2": hidden; diff --git a/definitions/grib2/template.4.referenceperiod.def b/definitions/grib2/template.4.referenceperiod.def index c2aec6ad1..a050f6686 100644 --- a/definitions/grib2/template.4.referenceperiod.def +++ b/definitions/grib2/template.4.referenceperiod.def @@ -48,13 +48,6 @@ referencePeriodList list(numberOfReferencePeriodTimeRanges) unsigned[4] lengthOfTimeRangeForReferencePeriod=0 ; } -concept timeprop { - "anom" = {typeOfRelationToReferenceDataset = 0;} - "sign" = {typeOfRelationToReferenceDataset = 2;} - "efi_sot" = {typeOfRelationToReferenceDataset = 20;} - "efi_sot" = {typeOfRelationToReferenceDataset = 21;} -} - constant timepropstring = timeprop ; alias mars.timeprop = timepropstring ; diff --git a/definitions/grib2/template.4.statistical.def b/definitions/grib2/template.4.statistical.def index b1e1ba045..37e3930a3 100644 --- a/definitions/grib2/template.4.statistical.def +++ b/definitions/grib2/template.4.statistical.def @@ -126,13 +126,6 @@ meta time.validityTime validity_time(date,dataTime,step,stepUnits,hourOfEndOfOve minuteOfEndOfOverallTimeInterval) : no_copy; meta validityDateTime julian_date(validityDate, validityTime) : no_copy; -template timeprop "grib2/timeprop.def"; - -if (productionStatusOfProcessedData== 10 || productionStatusOfProcessedData == 11){ - template timeprop "grib2/localConcepts/uerra/timeprop.def"; -} - - if(numberOfTimeRange == 1 and productDefinitionTemplateNumber != 105 and productDefinitionTemplateNumber != 106 and productDefinitionTemplateNumber != 107 and productDefinitionTemplateNumber != 112){ constant tloop = typeOfStatisticalProcessing : no_copy ; constant iloop = indicatorOfUnitForTimeRange : no_copy ; diff --git a/definitions/grib2/timeprop.def b/definitions/grib2/timeprop.def index b694f9415..6d33aee30 100644 --- a/definitions/grib2/timeprop.def +++ b/definitions/grib2/timeprop.def @@ -178,4 +178,8 @@ concept timeprop { "min12h" = {tloop = 3; iloop=12; lloop = 1; numberOfTimeRange = 4;} "12h" = {iloop=1; lloop = 12;} "12h" = {iloop=12; lloop = 1;} + "anom" = {typeOfRelationToReferenceDataset = 0;} + "sign" = {typeOfRelationToReferenceDataset = 2;} + "efi_sot" = {typeOfRelationToReferenceDataset = 20;} + "efi_sot" = {typeOfRelationToReferenceDataset = 21;} } From 5615ad96ffde0dc4c2ac06bbf8fbca85e8e30033 Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Mon, 4 Sep 2023 14:51:57 +0000 Subject: [PATCH 13/13] unified avg / mean --- definitions/grib2/timeprop.def | 42 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/definitions/grib2/timeprop.def b/definitions/grib2/timeprop.def index 6d33aee30..a20180671 100644 --- a/definitions/grib2/timeprop.def +++ b/definitions/grib2/timeprop.def @@ -87,92 +87,92 @@ concept timeprop { "mode" = {tloop = 101;} "sev" = {tloop = 100; iloop=1;} "mode" = {tloop = 101; iloop=1;} - "mean1h" = {tloop = 0; iloop=1; lloop = 1; numberOfTimeRange = 2;} + "avg1h" = {tloop = 0; iloop=1; lloop = 1; numberOfTimeRange = 2;} "accum1h" = {tloop = 1; iloop=1; lloop = 1; numberOfTimeRange = 2;} "max1h" = {tloop = 2; iloop=1; lloop = 1; numberOfTimeRange = 2;} "min1h" = {tloop = 3; iloop=1; lloop = 1; numberOfTimeRange = 2;} - "mean1h" = {tloop = 0; iloop=1; lloop = 1; numberOfTimeRange = 3;} + "avg1h" = {tloop = 0; iloop=1; lloop = 1; numberOfTimeRange = 3;} "accum1h" = {tloop = 1; iloop=1; lloop = 1; numberOfTimeRange = 3;} "max1h" = {tloop = 2; iloop=1; lloop = 1; numberOfTimeRange = 3;} "min1h" = {tloop = 3; iloop=1; lloop = 1; numberOfTimeRange = 3;} - "mean1h" = {tloop = 0; iloop=1; lloop = 1; numberOfTimeRange = 4;} + "avg1h" = {tloop = 0; iloop=1; lloop = 1; numberOfTimeRange = 4;} "accum1h" = {tloop = 1; iloop=1; lloop = 1; numberOfTimeRange = 4;} "max1h" = {tloop = 2; iloop=1; lloop = 1; numberOfTimeRange = 4;} "min1h" = {tloop = 3; iloop=1; lloop = 1; numberOfTimeRange = 4;} "1h" = {iloop=1; lloop = 1;} - "mean3h" = {tloop = 0; iloop=1; lloop = 3; numberOfTimeRange = 2;} + "avg3h" = {tloop = 0; iloop=1; lloop = 3; numberOfTimeRange = 2;} "accum3h" = {tloop = 1; iloop=1; lloop = 3; numberOfTimeRange = 2;} "max3h" = {tloop = 2; iloop=1; lloop = 3; numberOfTimeRange = 2;} "min3h" = {tloop = 3; iloop=1; lloop = 3; numberOfTimeRange = 2;} - "mean3h" = {tloop = 0; iloop=1; lloop = 3; numberOfTimeRange = 3;} + "avg3h" = {tloop = 0; iloop=1; lloop = 3; numberOfTimeRange = 3;} "accum3h" = {tloop = 1; iloop=1; lloop = 3; numberOfTimeRange = 3;} "max3h" = {tloop = 2; iloop=1; lloop = 3; numberOfTimeRange = 3;} "min3h" = {tloop = 3; iloop=1; lloop = 3; numberOfTimeRange = 3;} - "mean3h" = {tloop = 0; iloop=1; lloop = 3; numberOfTimeRange = 4;} + "avg3h" = {tloop = 0; iloop=1; lloop = 3; numberOfTimeRange = 4;} "accum3h" = {tloop = 1; iloop=1; lloop = 3; numberOfTimeRange = 4;} "max3h" = {tloop = 2; iloop=1; lloop = 3; numberOfTimeRange = 4;} "min3h" = {tloop = 3; iloop=1; lloop = 3; numberOfTimeRange = 4;} - "mean3h" = {tloop = 0; iloop=10; lloop = 1; numberOfTimeRange = 2;} + "avg3h" = {tloop = 0; iloop=10; lloop = 1; numberOfTimeRange = 2;} "accum3h" = {tloop = 1; iloop=10; lloop = 1; numberOfTimeRange = 2;} "max3h" = {tloop = 2; iloop=10; lloop = 1; numberOfTimeRange = 2;} "min3h" = {tloop = 3; iloop=10; lloop = 1; numberOfTimeRange = 2;} - "mean3h" = {tloop = 0; iloop=10; lloop = 1; numberOfTimeRange = 3;} + "avg3h" = {tloop = 0; iloop=10; lloop = 1; numberOfTimeRange = 3;} "accum3h" = {tloop = 1; iloop=10; lloop = 1; numberOfTimeRange = 3;} "max3h" = {tloop = 2; iloop=10; lloop = 1; numberOfTimeRange = 3;} "min3h" = {tloop = 3; iloop=10; lloop = 1; numberOfTimeRange = 3;} - "mean3h" = {tloop = 0; iloop=10; lloop = 1; numberOfTimeRange = 4;} + "avg3h" = {tloop = 0; iloop=10; lloop = 1; numberOfTimeRange = 4;} "accum3h" = {tloop = 1; iloop=10; lloop = 1; numberOfTimeRange = 4;} "max3h" = {tloop = 2; iloop=10; lloop = 1; numberOfTimeRange = 4;} "min3h" = {tloop = 3; iloop=10; lloop = 1; numberOfTimeRange = 4;} "3h" = {iloop=1; lloop = 3;} "3h" = {iloop=10; lloop = 1;} - "mean6h" = {tloop = 0; iloop=1; lloop = 6; numberOfTimeRange = 2;} + "avg6h" = {tloop = 0; iloop=1; lloop = 6; numberOfTimeRange = 2;} "accum6h" = {tloop = 1; iloop=1; lloop = 6; numberOfTimeRange = 2;} "max6h" = {tloop = 2; iloop=1; lloop = 6; numberOfTimeRange = 2;} "min6h" = {tloop = 3; iloop=1; lloop = 6; numberOfTimeRange = 2;} - "mean6h" = {tloop = 0; iloop=1; lloop = 6; numberOfTimeRange = 3;} + "avg6h" = {tloop = 0; iloop=1; lloop = 6; numberOfTimeRange = 3;} "accum6h" = {tloop = 1; iloop=1; lloop = 6; numberOfTimeRange = 3;} "max6h" = {tloop = 2; iloop=1; lloop = 6; numberOfTimeRange = 3;} "min6h" = {tloop = 3; iloop=1; lloop = 6; numberOfTimeRange = 3;} - "mean6h" = {tloop = 0; iloop=1; lloop = 6; numberOfTimeRange = 4;} + "avg6h" = {tloop = 0; iloop=1; lloop = 6; numberOfTimeRange = 4;} "accum6h" = {tloop = 1; iloop=1; lloop = 6; numberOfTimeRange = 4;} "max6h" = {tloop = 2; iloop=1; lloop = 6; numberOfTimeRange = 4;} "min6h" = {tloop = 3; iloop=1; lloop = 6; numberOfTimeRange = 4;} - "mean6h" = {tloop = 0; iloop=11; lloop = 1; numberOfTimeRange = 2;} + "avg6h" = {tloop = 0; iloop=11; lloop = 1; numberOfTimeRange = 2;} "accum6h" = {tloop = 1; iloop=11; lloop = 1; numberOfTimeRange = 2;} "max6h" = {tloop = 2; iloop=11; lloop = 1; numberOfTimeRange = 2;} "min6h" = {tloop = 3; iloop=11; lloop = 1; numberOfTimeRange = 2;} - "mean6h" = {tloop = 0; iloop=11; lloop = 1; numberOfTimeRange = 3;} + "avg6h" = {tloop = 0; iloop=11; lloop = 1; numberOfTimeRange = 3;} "accum6h" = {tloop = 1; iloop=11; lloop = 1; numberOfTimeRange = 3;} "max6h" = {tloop = 2; iloop=11; lloop = 1; numberOfTimeRange = 3;} "min6h" = {tloop = 3; iloop=11; lloop = 1; numberOfTimeRange = 3;} - "mean6h" = {tloop = 0; iloop=11; lloop = 1; numberOfTimeRange = 4;} + "avg6h" = {tloop = 0; iloop=11; lloop = 1; numberOfTimeRange = 4;} "accum6h" = {tloop = 1; iloop=11; lloop = 1; numberOfTimeRange = 4;} "max6h" = {tloop = 2; iloop=11; lloop = 1; numberOfTimeRange = 4;} "min6h" = {tloop = 3; iloop=11; lloop = 1; numberOfTimeRange = 4;} "6h" = {iloop=1; lloop = 6;} "6h" = {iloop=11; lloop = 1;} - "mean12h" = {tloop = 0; iloop=1; lloop = 12; numberOfTimeRange = 2;} + "avg12h" = {tloop = 0; iloop=1; lloop = 12; numberOfTimeRange = 2;} "accum12h" = {tloop = 1; iloop=1; lloop = 12; numberOfTimeRange = 2;} "max12h" = {tloop = 2; iloop=1; lloop = 12; numberOfTimeRange = 2;} "min12h" = {tloop = 3; iloop=1; lloop = 12; numberOfTimeRange = 2;} - "mean12h" = {tloop = 0; iloop=1; lloop = 12; numberOfTimeRange = 3;} + "avg12h" = {tloop = 0; iloop=1; lloop = 12; numberOfTimeRange = 3;} "accum12h" = {tloop = 1; iloop=1; lloop = 12; numberOfTimeRange = 3;} "max12h" = {tloop = 2; iloop=1; lloop = 12; numberOfTimeRange = 3;} "min12h" = {tloop = 3; iloop=1; lloop = 12; numberOfTimeRange = 3;} - "mean12h" = {tloop = 0; iloop=1; lloop = 12; numberOfTimeRange = 4;} + "avg12h" = {tloop = 0; iloop=1; lloop = 12; numberOfTimeRange = 4;} "accum12h" = {tloop = 1; iloop=1; lloop = 12; numberOfTimeRange = 4;} "max12h" = {tloop = 2; iloop=1; lloop = 12; numberOfTimeRange = 4;} "min12h" = {tloop = 3; iloop=1; lloop = 12; numberOfTimeRange = 4;} - "mean12h" = {tloop = 0; iloop=12; lloop = 1; numberOfTimeRange = 2;} + "avg12h" = {tloop = 0; iloop=12; lloop = 1; numberOfTimeRange = 2;} "accum12h" = {tloop = 1; iloop=12; lloop = 1; numberOfTimeRange = 2;} "max12h" = {tloop = 2; iloop=12; lloop = 1; numberOfTimeRange = 2;} "min12h" = {tloop = 3; iloop=12; lloop = 1; numberOfTimeRange = 2;} - "mean12h" = {tloop = 0; iloop=12; lloop = 1; numberOfTimeRange = 3;} + "avg12h" = {tloop = 0; iloop=12; lloop = 1; numberOfTimeRange = 3;} "accum12h" = {tloop = 1; iloop=12; lloop = 1; numberOfTimeRange = 3;} "max12h" = {tloop = 2; iloop=12; lloop = 1; numberOfTimeRange = 3;} "min12h" = {tloop = 3; iloop=12; lloop = 1; numberOfTimeRange = 3;} - "mean12h" = {tloop = 0; iloop=12; lloop = 1; numberOfTimeRange = 4;} + "avg12h" = {tloop = 0; iloop=12; lloop = 1; numberOfTimeRange = 4;} "accum12h" = {tloop = 1; iloop=12; lloop = 1; numberOfTimeRange = 4;} "max12h" = {tloop = 2; iloop=12; lloop = 1; numberOfTimeRange = 4;} "min12h" = {tloop = 3; iloop=12; lloop = 1; numberOfTimeRange = 4;}