From b116f9f5df232cfef373a775c52860897772f510 Mon Sep 17 00:00:00 2001 From: Richard Mladek Date: Tue, 21 Nov 2023 09:30:37 +0000 Subject: [PATCH 1/3] carra daily/monthly products SD-63148 --- definitions/grib2/products_crra.def | 55 +++++++++++++++++++++++++++-- definitions/mars/stream.table | 1 + 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/definitions/grib2/products_crra.def b/definitions/grib2/products_crra.def index 003a282f0..fe9314d44 100644 --- a/definitions/grib2/products_crra.def +++ b/definitions/grib2/products_crra.def @@ -75,24 +75,73 @@ concept marsType(unknown) { } } +# get the values from the 1st most outer loop which matter! +# aarays should be implemented in ecCodes as for bufr i.e. lloop[0] => #0#lengthOfTimeRange +meta lloop element(lengthOfTimeRange, 0); +meta tloop element(typeOfStatisticalProcessing, 0); +meta tloopti element(typeOfTimeIncrement, 0); + # See GRIB-205 re no_copy # Cannot use typeOfProcessedData for stream. See GRIB-911 concept marsStream(unknown) { oper = { - productDefinitionTemplateNumber = 8; + productDefinitionTemplateNumber = 0; } oper = { - productDefinitionTemplateNumber = 0; + productDefinitionTemplateNumber = 8; } - enda = { productDefinitionTemplateNumber = 11; } enda = { productDefinitionTemplateNumber = 1; } + moda = { + productDefinitionTemplateNumber = 8; + tloopti = 1; + } + # avgd, mind, maxd + dame = { + productDefinitionTemplateNumber = 8; + tloopti = 1; + lloop = 21; + } + # accumd + dame = { + productDefinitionTemplateNumber = 8; + tloopti = 1; + lloop = 24; + } } : no_copy; alias mars.stream = marsStream; alias mars.type = marsType; + +if (marsStream is "moda") { + + meta verificationDate g1verificationdate(dataDate, dataTime, lloop) : read_only; + meta monthlyVerificationDate g1monthlydate(verificationDate) : dump,no_copy; + alias mars.date = monthlyVerificationDate; + + unalias mars.time; + unalias mars.step; +} + +if (marsStream is "dame") { + + if (!(tloop == 3 || tloop == 2)) { + # not mind or maxd + alias mars.date = validityDate; + } + + if (lloop == 24) { + # accumd + meta verificationDate g1verificationdate(dataDate, dataTime, lloop) : read_only; + alias mars.date = verificationDate; + + } + + unalias mars.time; + unalias mars.step; +} diff --git a/definitions/mars/stream.table b/definitions/mars/stream.table index 446d5e6b0..d41e21eee 100644 --- a/definitions/mars/stream.table +++ b/definitions/mars/stream.table @@ -71,6 +71,7 @@ 1097 smma Seasonal monthly means anomalies 1098 clte Climate run output 1099 clmn Climate run monthly means output +1100 dame Daily means 1110 seap Sensitive area prediction 1120 eefh Extended ensemble forecast hindcast 1121 eehs Extended ensemble forecast hindcast statistics From 22f685520307679c47ba1e2885eb2b736e31e856 Mon Sep 17 00:00:00 2001 From: Richard Mladek Date: Tue, 21 Nov 2023 16:28:42 +0000 Subject: [PATCH 2/3] param names beautification --- definitions/grib2/products_crra.def | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/definitions/grib2/products_crra.def b/definitions/grib2/products_crra.def index fe9314d44..5cea9a770 100644 --- a/definitions/grib2/products_crra.def +++ b/definitions/grib2/products_crra.def @@ -76,10 +76,10 @@ concept marsType(unknown) { } # get the values from the 1st most outer loop which matter! -# aarays should be implemented in ecCodes as for bufr i.e. lloop[0] => #0#lengthOfTimeRange -meta lloop element(lengthOfTimeRange, 0); -meta tloop element(typeOfStatisticalProcessing, 0); -meta tloopti element(typeOfTimeIncrement, 0); +# aarays should be implemented in ecCodes as for bufr i.e. outerLoopLengthOfTimeRange[0] => #0#lengthOfTimeRange +meta outerLoopLengthOfTimeRange element(lengthOfTimeRange, 0); +meta outerLoopTypeOfStatisticalProcessing element(typeOfStatisticalProcessing, 0); +meta outerLoopTypeOfTimeIncrement element(typeOfTimeIncrement, 0); # See GRIB-205 re no_copy # Cannot use typeOfProcessedData for stream. See GRIB-911 @@ -99,19 +99,19 @@ concept marsStream(unknown) { } moda = { productDefinitionTemplateNumber = 8; - tloopti = 1; + outerLoopTypeOfTimeIncrement = 1; } # avgd, mind, maxd dame = { productDefinitionTemplateNumber = 8; - tloopti = 1; - lloop = 21; + outerLoopTypeOfTimeIncrement = 1; + outerLoopLengthOfTimeRange = 21; } # accumd dame = { productDefinitionTemplateNumber = 8; - tloopti = 1; - lloop = 24; + outerLoopTypeOfTimeIncrement = 1; + outerLoopLengthOfTimeRange = 24; } } : no_copy; @@ -120,7 +120,7 @@ alias mars.type = marsType; if (marsStream is "moda") { - meta verificationDate g1verificationdate(dataDate, dataTime, lloop) : read_only; + meta verificationDate g1verificationdate(dataDate, dataTime, outerLoopLengthOfTimeRange) : read_only; meta monthlyVerificationDate g1monthlydate(verificationDate) : dump,no_copy; alias mars.date = monthlyVerificationDate; @@ -130,14 +130,14 @@ if (marsStream is "moda") { if (marsStream is "dame") { - if (!(tloop == 3 || tloop == 2)) { + if (!(outerLoopTypeOfStatisticalProcessing == 3 || outerLoopTypeOfStatisticalProcessing == 2)) { # not mind or maxd alias mars.date = validityDate; } - if (lloop == 24) { + if (outerLoopLengthOfTimeRange == 24) { # accumd - meta verificationDate g1verificationdate(dataDate, dataTime, lloop) : read_only; + meta verificationDate g1verificationdate(dataDate, dataTime, outerLoopLengthOfTimeRange) : read_only; alias mars.date = verificationDate; } From c17d32fa60adc2ae04201f5c8a8fb8d058825944 Mon Sep 17 00:00:00 2001 From: Richard Mladek Date: Tue, 21 Nov 2023 17:17:50 +0000 Subject: [PATCH 3/3] changing streams for class=rr to read only --- definitions/grib2/products_crra.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/definitions/grib2/products_crra.def b/definitions/grib2/products_crra.def index 5cea9a770..a0c531921 100644 --- a/definitions/grib2/products_crra.def +++ b/definitions/grib2/products_crra.def @@ -113,7 +113,7 @@ concept marsStream(unknown) { outerLoopTypeOfTimeIncrement = 1; outerLoopLengthOfTimeRange = 24; } -} : no_copy; +} : no_copy,read_only; alias mars.stream = marsStream; alias mars.type = marsType; @@ -121,7 +121,7 @@ alias mars.type = marsType; if (marsStream is "moda") { meta verificationDate g1verificationdate(dataDate, dataTime, outerLoopLengthOfTimeRange) : read_only; - meta monthlyVerificationDate g1monthlydate(verificationDate) : dump,no_copy; + meta monthlyVerificationDate g1monthlydate(verificationDate) : no_copy; alias mars.date = monthlyVerificationDate; unalias mars.time;