From 0d2cbe7b065ffe0b180ed798c90114e56f5903ff Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Wed, 24 Jul 2024 12:46:20 +0000 Subject: [PATCH 1/3] Initial commit with basic timeproc concept --- definitions/grib2/section.4.def | 5 ++++- definitions/grib2/timeproc.def | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 definitions/grib2/timeproc.def diff --git a/definitions/grib2/section.4.def b/definitions/grib2/section.4.def index edb34d9b7..9dccd8b59 100644 --- a/definitions/grib2/section.4.def +++ b/definitions/grib2/section.4.def @@ -51,7 +51,7 @@ concept datasetForLocal(unknown) { "unknown" = { dummy=1; } } -if (datasetForLocal isnot "unknown") { +if (!(datasetForLocal is "unknown")) { constant conceptsDir2 = "grib2/localConcepts/[datasetForLocal]": hidden; constant conceptsDir1 = "grib2": hidden; } @@ -116,4 +116,7 @@ else { } } +template timeproc "grib2/timeproc.def"; +alias mars.timeproc = timeproc ; + meta md5Section4 md5(offsetSection4,section4Length); diff --git a/definitions/grib2/timeproc.def b/definitions/grib2/timeproc.def new file mode 100644 index 000000000..3fdd4d159 --- /dev/null +++ b/definitions/grib2/timeproc.def @@ -0,0 +1,17 @@ +concept timeproc { + "point-in-time" = {stepType="instant";} + "point-in-time" = {stream="mnth"; numberOfTimeRange=1;} + "point-in-time" = {stream="mmsa"; numberOfTimeRange=1;} + "point-in-time" = {stream="msmm"; numberOfTimeRange=1;} + # we need to do this dataset dependent, in some datasets we might have + # hourly rolling accumulations and we don't want to have the first in a different bucket + "since-start" = {typeOfStatisticalProcessing=1; forecastTime=0;} + "1h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 1;} + "3h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 3;} + "6h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 6;} + "12h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 12;} + "18h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 18;} + "24h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 24;} + "week" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 168;} + "month" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 744;} +} From d2ddcbe3e1825a4622c551c10a6cf59521d9defe Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Wed, 24 Jul 2024 12:55:21 +0000 Subject: [PATCH 2/3] Extension of the timeproc concept --- definitions/grib2/timeproc.def | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/definitions/grib2/timeproc.def b/definitions/grib2/timeproc.def index 3fdd4d159..8a367c8c7 100644 --- a/definitions/grib2/timeproc.def +++ b/definitions/grib2/timeproc.def @@ -8,10 +8,18 @@ concept timeproc { "since-start" = {typeOfStatisticalProcessing=1; forecastTime=0;} "1h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 1;} "3h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 3;} + "3h" = {indicatorOfUnitOfTimeRange=10; lengthOfTimeRange = 1;} "6h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 6;} + "6h" = {indicatorOfUnitOfTimeRange=11; lengthOfTimeRange = 1;} "12h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 12;} + "12h" = {indicatorOfUnitOfTimeRange=12; lengthOfTimeRange = 1;} "18h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 18;} "24h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 24;} - "week" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 168;} + "24h" = {indicatorOfUnitOfTimeRange=2; lengthOfTimeRange = 1;} + "7 days" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 168;} + "month" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 672;} + "month" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 696;} + "month" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 720;} "month" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 744;} + "month" = {indicatorOfUnitOfTimeRange=3; lengthOfTimeRange = 1;} } From fc49056a083ebc2621448372e5580d8954edfffc Mon Sep 17 00:00:00 2001 From: Robert Osinski Date: Wed, 24 Jul 2024 13:34:45 +0000 Subject: [PATCH 3/3] further extension of the timeproc concept --- definitions/grib2/timeproc.def | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/definitions/grib2/timeproc.def b/definitions/grib2/timeproc.def index 8a367c8c7..f84460cbf 100644 --- a/definitions/grib2/timeproc.def +++ b/definitions/grib2/timeproc.def @@ -1,11 +1,26 @@ concept timeproc { + # either instantaneous data or processing is specified by mars stream "point-in-time" = {stepType="instant";} "point-in-time" = {stream="mnth"; numberOfTimeRange=1;} "point-in-time" = {stream="mmsa"; numberOfTimeRange=1;} "point-in-time" = {stream="msmm"; numberOfTimeRange=1;} + # + ### Accumulations ### # we need to do this dataset dependent, in some datasets we might have # hourly rolling accumulations and we don't want to have the first in a different bucket - "since-start" = {typeOfStatisticalProcessing=1; forecastTime=0;} + ## since start accumulation must have forecastTime=0 + # hourly + "since-start" = {typeOfStatisticalProcessing=1; forecastTime=0; indicatorOfUnitOfTimeRange=1;} + # 24 hourly time unit + "since-start" = {typeOfStatisticalProcessing=1; forecastTime=0; indicatorOfUnitOfTimeRange=2;} + ## 1h rolling accumulation + "1h" = {typeOfStatisticalProcessing=1; indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 1; class=d1;} + ## 24h rolling accumulation + "24h" = {typeOfStatisticalProcessing=1; indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 24; class=d1;} + "24h" = {typeOfStatisticalProcessing=1; indicatorOfUnitOfTimeRange=2; lengthOfTimeRange = 1; class=d1;} + ### end Accumulations ### + # + ### mean/min/max/stdev ### "1h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 1;} "3h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 3;} "3h" = {indicatorOfUnitOfTimeRange=10; lengthOfTimeRange = 1;} @@ -17,9 +32,15 @@ concept timeproc { "24h" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 24;} "24h" = {indicatorOfUnitOfTimeRange=2; lengthOfTimeRange = 1;} "7 days" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 168;} + # 28 days "month" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 672;} + # 29 days "month" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 696;} + # 30 days "month" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 720;} + # 31 days "month" = {indicatorOfUnitOfTimeRange=1; lengthOfTimeRange = 744;} + # time unit month "month" = {indicatorOfUnitOfTimeRange=3; lengthOfTimeRange = 1;} + ### end mean/min/max/stdev ### }