From debc4b674adb1460c20599b91ae044085da41bee Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Thu, 10 Aug 2023 16:25:52 +0000 Subject: [PATCH 01/39] Added necessary local definition files to support new keys for Destination Earth layout. --- definitions/grib2/destineLocalVersion.table | 1 + definitions/grib2/destine_dataset.table | 3 + definitions/grib2/destine_model.table | 5 ++ definitions/grib2/local.destine.1.def | 10 +++ definitions/grib2/products_12.def | 7 +++ definitions/grib2/products_13.def | 7 +++ definitions/grib2/products_destine.def | 69 +++++++++++++++++++++ 7 files changed, 102 insertions(+) create mode 100644 definitions/grib2/destineLocalVersion.table create mode 100644 definitions/grib2/destine_dataset.table create mode 100644 definitions/grib2/destine_model.table create mode 100644 definitions/grib2/local.destine.1.def create mode 100644 definitions/grib2/products_12.def create mode 100644 definitions/grib2/products_13.def create mode 100644 definitions/grib2/products_destine.def diff --git a/definitions/grib2/destineLocalVersion.table b/definitions/grib2/destineLocalVersion.table new file mode 100644 index 000000000..5d488d2ae --- /dev/null +++ b/definitions/grib2/destineLocalVersion.table @@ -0,0 +1 @@ +1 1 MARS labeling diff --git a/definitions/grib2/destine_dataset.table b/definitions/grib2/destine_dataset.table new file mode 100644 index 000000000..851663dab --- /dev/null +++ b/definitions/grib2/destine_dataset.table @@ -0,0 +1,3 @@ +0 unknown unknown +1 climate-dt Climate change adaptation digital twin +2 extremes-dt Weather and geophysical extremes digital twin \ No newline at end of file diff --git a/definitions/grib2/destine_model.table b/definitions/grib2/destine_model.table new file mode 100644 index 000000000..4056c13f3 --- /dev/null +++ b/definitions/grib2/destine_model.table @@ -0,0 +1,5 @@ +0 unknown unknown +1 IFS-NEMO IFS with NEMO ocean model +2 IFS-FESOM IFS with FESOM ocean model +3 ICON ICON with no ocean model +4 ICON-FESOM ICON with FESOM ocean model \ No newline at end of file diff --git a/definitions/grib2/local.destine.1.def b/definitions/grib2/local.destine.1.def new file mode 100644 index 000000000..3b4f24795 --- /dev/null +++ b/definitions/grib2/local.destine.1.def @@ -0,0 +1,10 @@ +# DestinE MARS keywords + +ksec1expver[4] experimentVersionNumber = "zzzz" : dump; +alias marsExpver = experimentVersionNumber ; + +codetable[2] dataset "grib2/destine_dataset.table" : dump; +alias mars.dataset = dataset; + +codetable[2] model "grib2/destine_model.table" : dump; +alias mars.model = model; \ No newline at end of file diff --git a/definitions/grib2/products_12.def b/definitions/grib2/products_12.def new file mode 100644 index 000000000..569b90b65 --- /dev/null +++ b/definitions/grib2/products_12.def @@ -0,0 +1,7 @@ +# (C) Copyright 2005- ECMWF. + +# Destination Earth (DestinE) + +constant marsClass = 'd1'; + +include "grib2/products_destine.def" \ No newline at end of file diff --git a/definitions/grib2/products_13.def b/definitions/grib2/products_13.def new file mode 100644 index 000000000..eaca76a20 --- /dev/null +++ b/definitions/grib2/products_13.def @@ -0,0 +1,7 @@ +# (C) Copyright 2005- ECMWF. + +# Destination Earth (DestinE) + +constant marsClass = 'd2'; + +include "grib2/products_destine.def" \ No newline at end of file diff --git a/definitions/grib2/products_destine.def b/definitions/grib2/products_destine.def new file mode 100644 index 000000000..bba7f3bc1 --- /dev/null +++ b/definitions/grib2/products_destine.def @@ -0,0 +1,69 @@ +# (C) Copyright 2005- ECMWF. + +alias mars.expver = experimentVersionNumber; +alias parameter.paramId=paramId; +alias parameter.shortName=shortName; +alias parameter.units=units; +alias parameter.name=name; + +alias mars.class = marsClass; +alias mars.param = paramId; +alias mars.origin = centre; + +# Special UERRA rule for level type 103 'Specified height level above ground (m)' +if(typeOfFirstFixedSurface == 103) { + # only the parameters above 10m + if (level > 10) { + constant heightLevelName = 'hl'; + alias mars.levtype = heightLevelName; + # levelist was unaliased in template.4.horizontal.def so we must have it back + alias mars.levelist = level; + } +} + +concept marsType(unknown) { + + fc = { + typeOfProcessedData = 1; + } + "9" = { + typeOfProcessedData = 1; + } + + an = { + typeOfProcessedData = 0; + } + "2" = { + typeOfProcessedData = 0; + } + +} + +alias mars.type = marsType; + +concept marsStream(unknown) { + + oper = { + productDefinitionTemplateNumber = 8; + } + oper = { + productDefinitionTemplateNumber = 0; + } + + enda = { + productDefinitionTemplateNumber = 11; + } + enda = { + productDefinitionTemplateNumber = 1; + } +} : no_copy; + +alias mars.stream = marsStream; + +if (stepType is "avg" || stepType is "accum") { + alias mars.step = stepRange; +} +else { + alias mars.step = step; +} + From d18cc08955edc19c49a440eb1f31841033b20c16 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Thu, 10 Aug 2023 16:26:50 +0000 Subject: [PATCH 02/39] Added definitions of d1 and d2, destine and destine test where they are required. --- definitions/grib2/section.2.def | 6 ++++++ definitions/grib2/section.4.def | 2 ++ definitions/grib2/tables/31/1.3.table | 4 +++- definitions/mars/class.table | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/definitions/grib2/section.2.def b/definitions/grib2/section.2.def index f7da1537a..f6081b10b 100644 --- a/definitions/grib2/section.2.def +++ b/definitions/grib2/section.2.def @@ -34,6 +34,12 @@ if ( addEmptySection2 == 0 ) { template crraSection "grib2/local.crra.[crraLocalVersion:l].def"; } + if(productionStatusOfProcessedData == 12 || productionStatusOfProcessedData == 13) { + # destine = Destination Earth + codetable[2] destineLocalVersion 'grib2/destineLocalVersion.table' = 1 : dump; + template destineSection "grib2/local.destine.[destineLocalVersion:l].def"; + } + codetable[2] grib2LocalSectionNumber 'grib2/grib2LocalSectionNumber.[centreForLocal:l].table' = 1 : dump; if (grib2LocalSectionNumber!=0) { diff --git a/definitions/grib2/section.4.def b/definitions/grib2/section.4.def index b62a15329..70f321f19 100644 --- a/definitions/grib2/section.4.def +++ b/definitions/grib2/section.4.def @@ -36,6 +36,8 @@ concept datasetForLocal(unknown) { "uerra" = {productionStatusOfProcessedData=9;} # UERRA "uerra" = {productionStatusOfProcessedData=10;} # CARRA/CERRA "uerra" = {productionStatusOfProcessedData=11;} # CARRA/CERRA + "destine" = {productionStatusOfProcessedData=12;} # DestinE + "destine" = {productionStatusOfProcessedData=13;} # DestinE "unknown" = { dummy=1; } } diff --git a/definitions/grib2/tables/31/1.3.table b/definitions/grib2/tables/31/1.3.table index 5e2e59087..26005a4d0 100644 --- a/definitions/grib2/tables/31/1.3.table +++ b/definitions/grib2/tables/31/1.3.table @@ -11,6 +11,8 @@ 9 9 Uncertainties in Ensembles of Regional ReAnalyses project test (UERRA) 10 10 Copernicus regional reanalysis (CARRA/CERRA) 11 11 Copernicus regional reanalysis test (CARRA/CERRA) -# 12-191 Reserved +12 12 Destination Earth (DestinE) +13 13 Destination Earth test (DestinE) +# 14-191 Reserved # 192-254 Reserved for local use 255 255 Missing diff --git a/definitions/mars/class.table b/definitions/mars/class.table index 6e8a0aa27..303adda1e 100644 --- a/definitions/mars/class.table +++ b/definitions/mars/class.table @@ -45,6 +45,7 @@ 44 gg Greenhouse Gases 45 ml Machine learning 46 d1 Destination Earth +47 d2 Destination Earth Test 99 te Test 100 at Austria 101 be Belgium From a25977ab0e709eec2041240cdf5bf593fae072ca Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Fri, 1 Sep 2023 10:26:49 +0000 Subject: [PATCH 03/39] Work to add additional concepts for DE layout --- definitions/common/c-12.98.table | 7 +++++++ definitions/grib2/destine_datasetVersion.table | 3 +++ definitions/grib2/destine_model.table | 9 +++++---- definitions/grib2/local.destine.1.def | 11 ++--------- definitions/grib2/local.destine.2.def | 4 ++++ definitions/grib2/local.destine.3.def | 3 +++ definitions/grib2/local.destine.base.def | 10 ++++++++++ definitions/grib2/local.destine.cmip.def | 4 ++++ .../localConcepts/destine/destineOriginConcept.def | 7 +++++++ .../destine/gridSpecificationConcept.def | 2 ++ .../localConcepts/destine/modelVersionConcept.def | 2 ++ definitions/grib2/section.1.def | 2 +- definitions/grib2/section.4.def | 2 +- definitions/grib2/section.6.hook.12.def | 13 +++++++++++++ definitions/grib2/sections.def | 2 ++ 15 files changed, 66 insertions(+), 15 deletions(-) create mode 100644 definitions/common/c-12.98.table create mode 100644 definitions/grib2/destine_datasetVersion.table create mode 100644 definitions/grib2/local.destine.2.def create mode 100644 definitions/grib2/local.destine.3.def create mode 100644 definitions/grib2/local.destine.base.def create mode 100644 definitions/grib2/local.destine.cmip.def create mode 100644 definitions/grib2/localConcepts/destine/destineOriginConcept.def create mode 100644 definitions/grib2/localConcepts/destine/gridSpecificationConcept.def create mode 100644 definitions/grib2/localConcepts/destine/modelVersionConcept.def create mode 100644 definitions/grib2/section.6.hook.12.def diff --git a/definitions/common/c-12.98.table b/definitions/common/c-12.98.table new file mode 100644 index 000000000..74883d603 --- /dev/null +++ b/definitions/common/c-12.98.table @@ -0,0 +1,7 @@ +# COMMON CODE TABLE C-12: Subcentres for originating/generating centre ECMF (98) (GRIB2, BUFR4) +78 edzw Offenbach (RSMC) +84 lfpw French Weather Service - Toulouse +1000 bsc Barcelona Supercomputing Centre (BSC) +1001 csc CSC – IT Center for Science LTD. +1002 dkrz German Climate Computation Center (DKRZ) +65535 65535 Missing \ No newline at end of file diff --git a/definitions/grib2/destine_datasetVersion.table b/definitions/grib2/destine_datasetVersion.table new file mode 100644 index 000000000..ecdb27737 --- /dev/null +++ b/definitions/grib2/destine_datasetVersion.table @@ -0,0 +1,3 @@ +0 unknown unknown +1 v20230701 v20230701 +2 v20230801 v20230801 \ No newline at end of file diff --git a/definitions/grib2/destine_model.table b/definitions/grib2/destine_model.table index 4056c13f3..5ba91003a 100644 --- a/definitions/grib2/destine_model.table +++ b/definitions/grib2/destine_model.table @@ -1,5 +1,6 @@ 0 unknown unknown -1 IFS-NEMO IFS with NEMO ocean model -2 IFS-FESOM IFS with FESOM ocean model -3 ICON ICON with no ocean model -4 ICON-FESOM ICON with FESOM ocean model \ No newline at end of file +1 IFS IFS with no ocean model +2 IFS-NEMO IFS with NEMO ocean model +3 IFS-FESOM IFS with FESOM ocean model +4 ICON ICON with no ocean model +5 ICON-FESOM ICON with FESOM ocean model \ No newline at end of file diff --git a/definitions/grib2/local.destine.1.def b/definitions/grib2/local.destine.1.def index 3b4f24795..c3cddfa13 100644 --- a/definitions/grib2/local.destine.1.def +++ b/definitions/grib2/local.destine.1.def @@ -1,10 +1,3 @@ -# DestinE MARS keywords +# DestinE MARS base keywords -ksec1expver[4] experimentVersionNumber = "zzzz" : dump; -alias marsExpver = experimentVersionNumber ; - -codetable[2] dataset "grib2/destine_dataset.table" : dump; -alias mars.dataset = dataset; - -codetable[2] model "grib2/destine_model.table" : dump; -alias mars.model = model; \ No newline at end of file +include "grib2/local.destine.base.def"; \ No newline at end of file diff --git a/definitions/grib2/local.destine.2.def b/definitions/grib2/local.destine.2.def new file mode 100644 index 000000000..aafa52d2b --- /dev/null +++ b/definitions/grib2/local.destine.2.def @@ -0,0 +1,4 @@ +# DestinE MARS ClimateDT keywords + +include "grib2/local.destine.base.def"; +include "grib2/local.destine.cmip.def"; \ No newline at end of file diff --git a/definitions/grib2/local.destine.3.def b/definitions/grib2/local.destine.3.def new file mode 100644 index 000000000..cb0443fdf --- /dev/null +++ b/definitions/grib2/local.destine.3.def @@ -0,0 +1,3 @@ +# DestinE MARS ExtremesDT keywords + +include "grib2/local.destine.base.def"; \ No newline at end of file diff --git a/definitions/grib2/local.destine.base.def b/definitions/grib2/local.destine.base.def new file mode 100644 index 000000000..6cbf8807c --- /dev/null +++ b/definitions/grib2/local.destine.base.def @@ -0,0 +1,10 @@ +# DestinE MARS base keywords + +ksec1expver[4] experimentVersionNumber = "zzzz" : dump; +alias marsExpver = experimentVersionNumber ; + +codetable[2] dataset "grib2/destine_dataset.table" : dump; +alias mars.dataset = dataset; + +codetable[2] model "grib2/destine_model.table" : dump; +alias mars.model = model; \ No newline at end of file diff --git a/definitions/grib2/local.destine.cmip.def b/definitions/grib2/local.destine.cmip.def new file mode 100644 index 000000000..fdf1d9342 --- /dev/null +++ b/definitions/grib2/local.destine.cmip.def @@ -0,0 +1,4 @@ +# DestinE MARS CMIP keywords + +codetable[2] datasetVersion "grib2/destine_datasetVersion.table" : dump; +alias mars.datasetVersion = datasetVersion; \ No newline at end of file diff --git a/definitions/grib2/localConcepts/destine/destineOriginConcept.def b/definitions/grib2/localConcepts/destine/destineOriginConcept.def new file mode 100644 index 000000000..1da6716b5 --- /dev/null +++ b/definitions/grib2/localConcepts/destine/destineOriginConcept.def @@ -0,0 +1,7 @@ +# Concept destineOrigin +'DWD' = {centre=98;subCentre=78} +'MeteoFrance' = {centre=98;subCentre=84;} +'BSC' = {centre=98;subCentre=1000;} +'CSC' = {centre=98;subCentre=1001;} +'DKRZ' = {centre=98;subCentre=1002;} + diff --git a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def new file mode 100644 index 000000000..8f87a1401 --- /dev/null +++ b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def @@ -0,0 +1,2 @@ +# Concept gridSpecification +'O1280' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=255;} \ No newline at end of file diff --git a/definitions/grib2/localConcepts/destine/modelVersionConcept.def b/definitions/grib2/localConcepts/destine/modelVersionConcept.def new file mode 100644 index 000000000..6b307d07f --- /dev/null +++ b/definitions/grib2/localConcepts/destine/modelVersionConcept.def @@ -0,0 +1,2 @@ +# Concept modelVersion +# '48r1' = {backgroundProcess = 255, generatingProcessIdentifier = ...} # TODO: Need to work out proper mapping and make those keys local \ No newline at end of file diff --git a/definitions/grib2/section.1.def b/definitions/grib2/section.1.def index 719a9399c..2fcac3a74 100644 --- a/definitions/grib2/section.1.def +++ b/definitions/grib2/section.1.def @@ -14,7 +14,7 @@ alias parameter.centre=centre; alias ls.centre=centre; alias originatingCentre=centre; -unsigned[2] subCentre : dump; +codetable[2] subCentre "common/c-12.[centre].def" : dump; _if (subCentre==98 ) { alias centreForLocal=subCentre; diff --git a/definitions/grib2/section.4.def b/definitions/grib2/section.4.def index 70f321f19..e78f8109c 100644 --- a/definitions/grib2/section.4.def +++ b/definitions/grib2/section.4.def @@ -37,7 +37,7 @@ concept datasetForLocal(unknown) { "uerra" = {productionStatusOfProcessedData=10;} # CARRA/CERRA "uerra" = {productionStatusOfProcessedData=11;} # CARRA/CERRA "destine" = {productionStatusOfProcessedData=12;} # DestinE - "destine" = {productionStatusOfProcessedData=13;} # DestinE + "destine" = {productionStatusOfProcessedData=13;} # DestinE Test "unknown" = { dummy=1; } } diff --git a/definitions/grib2/section.6.hook.12.def b/definitions/grib2/section.6.hook.12.def new file mode 100644 index 000000000..8afcbdc33 --- /dev/null +++ b/definitions/grib2/section.6.hook.12.def @@ -0,0 +1,13 @@ +# (C) Copyright 2005- ECMWF. +# Hooks after section 6 + + +# conceptsDir2 --> datasetForLocal +concept gridSpecification("unknown", "gridXYZConcept.def",conceptsDir2,conceptsDir1): no_copy; +alias mars.gridSpecification = gridSpecification + +concept destineOrigin("unknown", "destineOriginConcept.def",conceptsDir2,conceptsDir1): no_copy; +alias mars.origin = destineOrigin + +concept modelVersion("unknown", "modelVersionConcept.def",conceptsDir2,conceptsDir1): no_copy; +alias mars.modelVersion = modelVersion \ No newline at end of file diff --git a/definitions/grib2/sections.def b/definitions/grib2/sections.def index ed998ca61..61aff3f29 100644 --- a/definitions/grib2/sections.def +++ b/definitions/grib2/sections.def @@ -59,6 +59,8 @@ if (!headersOnly) { lookup[1] sectionNumber(4) ; + template_nofail hook_after_section_6 "grib2/section.6.hook.[productionStatusOfProcessedData].def"; + if (sectionNumber == 7 or new() ) { position sectionPosition; template section_7 "grib2/section.7.def"; From a7b9fc186a530e0ddd141c47a2143c875530b00b Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Fri, 1 Sep 2023 10:29:52 +0000 Subject: [PATCH 04/39] Missed file --- .../grib2/localConcepts/destine/gridSpecificationConcept.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def index 8f87a1401..e267bcb7a 100644 --- a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def +++ b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def @@ -1,2 +1,2 @@ # Concept gridSpecification -'O1280' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=255;} \ No newline at end of file +'O1280' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=255;} \ No newline at end of file From 0afe8de30ad792d019e12fc20f6fee183e8f752f Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Mon, 4 Sep 2023 12:36:06 +0000 Subject: [PATCH 05/39] Changed to using dataset specific def file; Commented out change to sections.def for now while debugging. --- definitions/grib2/local.destine.1.def | 10 ++++++++-- definitions/grib2/local.destine.2.def | 4 ---- definitions/grib2/local.destine.3.def | 3 --- definitions/grib2/local.destine.climate-dt.def | 4 ++++ definitions/grib2/local.destine.cmip.def | 4 ---- definitions/grib2/sections.def | 2 +- 6 files changed, 13 insertions(+), 14 deletions(-) delete mode 100644 definitions/grib2/local.destine.2.def delete mode 100644 definitions/grib2/local.destine.3.def create mode 100644 definitions/grib2/local.destine.climate-dt.def delete mode 100644 definitions/grib2/local.destine.cmip.def diff --git a/definitions/grib2/local.destine.1.def b/definitions/grib2/local.destine.1.def index c3cddfa13..c159156e7 100644 --- a/definitions/grib2/local.destine.1.def +++ b/definitions/grib2/local.destine.1.def @@ -1,3 +1,9 @@ -# DestinE MARS base keywords +# DestinE MARS layout -include "grib2/local.destine.base.def"; \ No newline at end of file +include "grib2/local.destine.base.def" + +# <-- this adds mars.dataset keyword + +# Keywords based on dataset + +# include "grib2/local.destine.[dataset:s].def": no_fail \ No newline at end of file diff --git a/definitions/grib2/local.destine.2.def b/definitions/grib2/local.destine.2.def deleted file mode 100644 index aafa52d2b..000000000 --- a/definitions/grib2/local.destine.2.def +++ /dev/null @@ -1,4 +0,0 @@ -# DestinE MARS ClimateDT keywords - -include "grib2/local.destine.base.def"; -include "grib2/local.destine.cmip.def"; \ No newline at end of file diff --git a/definitions/grib2/local.destine.3.def b/definitions/grib2/local.destine.3.def deleted file mode 100644 index cb0443fdf..000000000 --- a/definitions/grib2/local.destine.3.def +++ /dev/null @@ -1,3 +0,0 @@ -# DestinE MARS ExtremesDT keywords - -include "grib2/local.destine.base.def"; \ No newline at end of file diff --git a/definitions/grib2/local.destine.climate-dt.def b/definitions/grib2/local.destine.climate-dt.def new file mode 100644 index 000000000..997d81f74 --- /dev/null +++ b/definitions/grib2/local.destine.climate-dt.def @@ -0,0 +1,4 @@ +# DestinE MARS ClimateDT keywords + +codetable[2] datasetVersion "grib2/destine_datasetVersion.table" : dump; +alias mars.datasetVersion = datasetVersion; \ No newline at end of file diff --git a/definitions/grib2/local.destine.cmip.def b/definitions/grib2/local.destine.cmip.def deleted file mode 100644 index fdf1d9342..000000000 --- a/definitions/grib2/local.destine.cmip.def +++ /dev/null @@ -1,4 +0,0 @@ -# DestinE MARS CMIP keywords - -codetable[2] datasetVersion "grib2/destine_datasetVersion.table" : dump; -alias mars.datasetVersion = datasetVersion; \ No newline at end of file diff --git a/definitions/grib2/sections.def b/definitions/grib2/sections.def index 61aff3f29..194255f40 100644 --- a/definitions/grib2/sections.def +++ b/definitions/grib2/sections.def @@ -59,7 +59,7 @@ if (!headersOnly) { lookup[1] sectionNumber(4) ; - template_nofail hook_after_section_6 "grib2/section.6.hook.[productionStatusOfProcessedData].def"; + # template_nofail hook_after_section_6 "grib2/section.6.hook.[productionStatusOfProcessedData].def"; if (sectionNumber == 7 or new() ) { position sectionPosition; From 2f7c58a626d307cf1ef3155c32abaa3e4f20bd98 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Wed, 13 Sep 2023 14:05:05 +0000 Subject: [PATCH 06/39] Clean up and fixing bugs --- definitions/grib2/local.destine.1.def | 8 +++----- definitions/grib2/local.destine.base.def | 3 --- .../grib2/localConcepts/destine/modelVersionConcept.def | 3 ++- definitions/grib2/section.1.def | 3 ++- definitions/grib2/section.6.hook.12.def | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/definitions/grib2/local.destine.1.def b/definitions/grib2/local.destine.1.def index c159156e7..fc336b33a 100644 --- a/definitions/grib2/local.destine.1.def +++ b/definitions/grib2/local.destine.1.def @@ -1,9 +1,7 @@ # DestinE MARS layout -include "grib2/local.destine.base.def" - -# <-- this adds mars.dataset keyword +# Base keywords for all datasets +include "grib2/local.destine.base.def"; # Keywords based on dataset - -# include "grib2/local.destine.[dataset:s].def": no_fail \ No newline at end of file +template datasetTemplate "grib2/local.destine.[dataset:s].def"; diff --git a/definitions/grib2/local.destine.base.def b/definitions/grib2/local.destine.base.def index 6cbf8807c..185524c33 100644 --- a/definitions/grib2/local.destine.base.def +++ b/definitions/grib2/local.destine.base.def @@ -1,8 +1,5 @@ # DestinE MARS base keywords -ksec1expver[4] experimentVersionNumber = "zzzz" : dump; -alias marsExpver = experimentVersionNumber ; - codetable[2] dataset "grib2/destine_dataset.table" : dump; alias mars.dataset = dataset; diff --git a/definitions/grib2/localConcepts/destine/modelVersionConcept.def b/definitions/grib2/localConcepts/destine/modelVersionConcept.def index 6b307d07f..098deaa56 100644 --- a/definitions/grib2/localConcepts/destine/modelVersionConcept.def +++ b/definitions/grib2/localConcepts/destine/modelVersionConcept.def @@ -1,2 +1,3 @@ # Concept modelVersion -# '48r1' = {backgroundProcess = 255, generatingProcessIdentifier = ...} # TODO: Need to work out proper mapping and make those keys local \ No newline at end of file +# TODO: Need to work out proper mapping and make those keys local +'48r1' = {backgroundProcess = 255, generatingProcessIdentifier = 255} \ No newline at end of file diff --git a/definitions/grib2/section.1.def b/definitions/grib2/section.1.def index 2fcac3a74..c6c6c16b5 100644 --- a/definitions/grib2/section.1.def +++ b/definitions/grib2/section.1.def @@ -14,7 +14,8 @@ alias parameter.centre=centre; alias ls.centre=centre; alias originatingCentre=centre; -codetable[2] subCentre "common/c-12.[centre].def" : dump; +# codetable[2] subCentre "common/c-12.[centre].def" : dump; +unsigned[2] subCentre : dump; _if (subCentre==98 ) { alias centreForLocal=subCentre; diff --git a/definitions/grib2/section.6.hook.12.def b/definitions/grib2/section.6.hook.12.def index 8afcbdc33..93d8a8a6f 100644 --- a/definitions/grib2/section.6.hook.12.def +++ b/definitions/grib2/section.6.hook.12.def @@ -1,5 +1,5 @@ # (C) Copyright 2005- ECMWF. -# Hooks after section 6 +# Hooks after section 6 for DestinE (productionStatusOfProcessedData=12) # conceptsDir2 --> datasetForLocal From e8180539ec6292b0140c292566a0901bf11bcde2 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Wed, 13 Sep 2023 16:34:18 +0000 Subject: [PATCH 07/39] Bugs fixed! Added full functionality for ClimateDT --- definitions/grib2/destine_CMIPActivity.table | 4 ++++ definitions/grib2/destine_CMIPExperiment.table | 9 +++++++++ definitions/grib2/destine_CMIPGridLabel.table | 3 +++ definitions/grib2/destine_model.table | 3 ++- definitions/grib2/local.destine.1.def | 2 +- definitions/grib2/local.destine.climate-dt.def | 11 ++++++++++- .../localConcepts/destine/destineOriginConcept.def | 10 +++++----- .../localConcepts/destine/modelVersionConcept.def | 2 +- definitions/grib2/products_destine.def | 4 +++- definitions/grib2/section.6.hook.12.def | 12 +++++------- definitions/grib2/sections.def | 2 +- 11 files changed, 44 insertions(+), 18 deletions(-) create mode 100644 definitions/grib2/destine_CMIPActivity.table create mode 100644 definitions/grib2/destine_CMIPExperiment.table create mode 100644 definitions/grib2/destine_CMIPGridLabel.table diff --git a/definitions/grib2/destine_CMIPActivity.table b/definitions/grib2/destine_CMIPActivity.table new file mode 100644 index 000000000..cfa3ac747 --- /dev/null +++ b/definitions/grib2/destine_CMIPActivity.table @@ -0,0 +1,4 @@ +0 unknown unknown +1 CMIP5 CMIP5 +2 CMIP6 CMIP6 +3 ScenarioMIP ScenarioMIP \ No newline at end of file diff --git a/definitions/grib2/destine_CMIPExperiment.table b/definitions/grib2/destine_CMIPExperiment.table new file mode 100644 index 000000000..1744f97bb --- /dev/null +++ b/definitions/grib2/destine_CMIPExperiment.table @@ -0,0 +1,9 @@ +0 unknown unknown +1 hist Historical +2 RCP2.6 RCP 2.6 +3 RCP4.5 RCP 4.5 +4 RCP8.5 RCP 8.5 +5 SSP1-2.6 SSP1-2.6 +6 SSP2-4.5 SSP2-4.5 +7 SSP3-7.0 SSP3-7.0 +8 SSP5-8.5 SSP5-8.5 \ No newline at end of file diff --git a/definitions/grib2/destine_CMIPGridLabel.table b/definitions/grib2/destine_CMIPGridLabel.table new file mode 100644 index 000000000..b3e9b279b --- /dev/null +++ b/definitions/grib2/destine_CMIPGridLabel.table @@ -0,0 +1,3 @@ +0 unknown unknown +1 gn Native grid +2 gr Regridded \ No newline at end of file diff --git a/definitions/grib2/destine_model.table b/definitions/grib2/destine_model.table index 5ba91003a..b1ec128de 100644 --- a/definitions/grib2/destine_model.table +++ b/definitions/grib2/destine_model.table @@ -3,4 +3,5 @@ 2 IFS-NEMO IFS with NEMO ocean model 3 IFS-FESOM IFS with FESOM ocean model 4 ICON ICON with no ocean model -5 ICON-FESOM ICON with FESOM ocean model \ No newline at end of file +5 ICON-NEMO IFS with NEMO ocean model +6 ICON-FESOM ICON with FESOM ocean model \ No newline at end of file diff --git a/definitions/grib2/local.destine.1.def b/definitions/grib2/local.destine.1.def index fc336b33a..db1f2f389 100644 --- a/definitions/grib2/local.destine.1.def +++ b/definitions/grib2/local.destine.1.def @@ -4,4 +4,4 @@ include "grib2/local.destine.base.def"; # Keywords based on dataset -template datasetTemplate "grib2/local.destine.[dataset:s].def"; +template_nofail datasetTemplate "grib2/local.destine.[dataset:s].def"; diff --git a/definitions/grib2/local.destine.climate-dt.def b/definitions/grib2/local.destine.climate-dt.def index 997d81f74..584d2f7ae 100644 --- a/definitions/grib2/local.destine.climate-dt.def +++ b/definitions/grib2/local.destine.climate-dt.def @@ -1,4 +1,13 @@ # DestinE MARS ClimateDT keywords codetable[2] datasetVersion "grib2/destine_datasetVersion.table" : dump; -alias mars.datasetVersion = datasetVersion; \ No newline at end of file +alias mars.datasetVersion = datasetVersion; + +codetable[2] CMIPActivity "grib2/destine_CMIPActivity.table" : dump; +alias mars.CMIPActivity = CMIPActivity; + +codetable[2] CMIPExperiment "grib2/destine_CMIPExperiment.table" : dump; +alias mars.CMIPExperiment = CMIPExperiment; + +codetable[2] CMIPGridLabel "grib2/destine_CMIPGridLabel.table" : dump; +alias mars.CMIPGridLabel = CMIPGridLabel; \ No newline at end of file diff --git a/definitions/grib2/localConcepts/destine/destineOriginConcept.def b/definitions/grib2/localConcepts/destine/destineOriginConcept.def index 1da6716b5..a013ee42f 100644 --- a/definitions/grib2/localConcepts/destine/destineOriginConcept.def +++ b/definitions/grib2/localConcepts/destine/destineOriginConcept.def @@ -1,7 +1,7 @@ # Concept destineOrigin -'DWD' = {centre=98;subCentre=78} -'MeteoFrance' = {centre=98;subCentre=84;} -'BSC' = {centre=98;subCentre=1000;} -'CSC' = {centre=98;subCentre=1001;} -'DKRZ' = {centre=98;subCentre=1002;} +"DWD" = { centre=98; subCentre=78; } +"MeteoFrance" = { centre=98; subCentre=84; } +"BSC" = { centre=98; subCentre=1000; } +"CSC" = { centre=98; subCentre=1001; } +"DKRZ" = { centre=98; subCentre=1002; } diff --git a/definitions/grib2/localConcepts/destine/modelVersionConcept.def b/definitions/grib2/localConcepts/destine/modelVersionConcept.def index 098deaa56..f55271cbd 100644 --- a/definitions/grib2/localConcepts/destine/modelVersionConcept.def +++ b/definitions/grib2/localConcepts/destine/modelVersionConcept.def @@ -1,3 +1,3 @@ # Concept modelVersion # TODO: Need to work out proper mapping and make those keys local -'48r1' = {backgroundProcess = 255, generatingProcessIdentifier = 255} \ No newline at end of file +"48r1" = { backgroundProcess = 255; generatingProcessIdentifier = 154; } \ No newline at end of file diff --git a/definitions/grib2/products_destine.def b/definitions/grib2/products_destine.def index bba7f3bc1..3a7cdd39c 100644 --- a/definitions/grib2/products_destine.def +++ b/definitions/grib2/products_destine.def @@ -10,7 +10,7 @@ alias mars.class = marsClass; alias mars.param = paramId; alias mars.origin = centre; -# Special UERRA rule for level type 103 'Specified height level above ground (m)' +# Special rule for level type 103 'Specified height level above ground (m)' if(typeOfFirstFixedSurface == 103) { # only the parameters above 10m if (level > 10) { @@ -21,6 +21,8 @@ if(typeOfFirstFixedSurface == 103) { } } +# Define marsType based on type of processed data + concept marsType(unknown) { fc = { diff --git a/definitions/grib2/section.6.hook.12.def b/definitions/grib2/section.6.hook.12.def index 93d8a8a6f..6e654b85d 100644 --- a/definitions/grib2/section.6.hook.12.def +++ b/definitions/grib2/section.6.hook.12.def @@ -1,13 +1,11 @@ # (C) Copyright 2005- ECMWF. # Hooks after section 6 for DestinE (productionStatusOfProcessedData=12) - # conceptsDir2 --> datasetForLocal -concept gridSpecification("unknown", "gridXYZConcept.def",conceptsDir2,conceptsDir1): no_copy; -alias mars.gridSpecification = gridSpecification +concept gridSpecification(unknown, "gridSpecificationConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; -concept destineOrigin("unknown", "destineOriginConcept.def",conceptsDir2,conceptsDir1): no_copy; -alias mars.origin = destineOrigin +concept destineOrigin (unknown, "destineOriginConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; +alias mars.origin = destineOrigin; + +concept modelVersion (unknown, "modelVersionConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; -concept modelVersion("unknown", "modelVersionConcept.def",conceptsDir2,conceptsDir1): no_copy; -alias mars.modelVersion = modelVersion \ No newline at end of file diff --git a/definitions/grib2/sections.def b/definitions/grib2/sections.def index 194255f40..61aff3f29 100644 --- a/definitions/grib2/sections.def +++ b/definitions/grib2/sections.def @@ -59,7 +59,7 @@ if (!headersOnly) { lookup[1] sectionNumber(4) ; - # template_nofail hook_after_section_6 "grib2/section.6.hook.[productionStatusOfProcessedData].def"; + template_nofail hook_after_section_6 "grib2/section.6.hook.[productionStatusOfProcessedData].def"; if (sectionNumber == 7 or new() ) { position sectionPosition; From 033a60d1efe636dbd6310805b1f33a48fee6b948 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Thu, 14 Sep 2023 16:08:34 +0000 Subject: [PATCH 08/39] New table entries and definition for ODEDT --- definitions/grib2/destine_dataset.table | 4 +++- definitions/grib2/destine_zoomRegion.table | 4 ++++ definitions/grib2/local.destine.on-demand-extremes-dt.def | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 definitions/grib2/destine_zoomRegion.table create mode 100644 definitions/grib2/local.destine.on-demand-extremes-dt.def diff --git a/definitions/grib2/destine_dataset.table b/definitions/grib2/destine_dataset.table index 851663dab..1b56cd8c8 100644 --- a/definitions/grib2/destine_dataset.table +++ b/definitions/grib2/destine_dataset.table @@ -1,3 +1,5 @@ 0 unknown unknown 1 climate-dt Climate change adaptation digital twin -2 extremes-dt Weather and geophysical extremes digital twin \ No newline at end of file +2 extremes-dt Weather and geophysical extremes digital twin +3 on-demand-climate-dt On-demand climate change adaptation digital twin +4 on-demand-extremes-dt On-demand weather and geophysical extremes digital twin \ No newline at end of file diff --git a/definitions/grib2/destine_zoomRegion.table b/definitions/grib2/destine_zoomRegion.table new file mode 100644 index 000000000..bb21d5600 --- /dev/null +++ b/definitions/grib2/destine_zoomRegion.table @@ -0,0 +1,4 @@ +0 unknown unknown +1 e Europe +2 uk United Kingdom +3 fr France \ No newline at end of file diff --git a/definitions/grib2/local.destine.on-demand-extremes-dt.def b/definitions/grib2/local.destine.on-demand-extremes-dt.def new file mode 100644 index 000000000..5117df354 --- /dev/null +++ b/definitions/grib2/local.destine.on-demand-extremes-dt.def @@ -0,0 +1,4 @@ +# DestinE MARS ClimateDT keywords + +codetable[2] zoomRegion "grib2/destine_zoomRegion.table" : dump; +alias mars.zoomRegion = zoomRegion; \ No newline at end of file From df615ca8e00d857b31ba3d378574c9907db9d249 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Fri, 15 Sep 2023 09:25:08 +0000 Subject: [PATCH 09/39] Added some grids to the gridSpecification --- .../grib2/localConcepts/destine/gridSpecificationConcept.def | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def index e267bcb7a..f983d219c 100644 --- a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def +++ b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def @@ -1,2 +1,4 @@ # Concept gridSpecification -'O1280' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=255;} \ No newline at end of file +'CARRA-East' = {numberOfDataPoints = 780321; gridDefinitionTemplateNumber=30; Nx=789; Ny=989;} +'O1280' = {numberOfDataPoints=6599680; gridDefinitionTemplateNumber=40; Nj=2560;} +'O8000' = {numberOfDataPoints=256288000; gridDefinitionTemplateNumber=40; Nj=16000;} \ No newline at end of file From e8f1a3f0807c4886be961f37a3fe8a58c3144f65 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Tue, 19 Sep 2023 14:49:48 +0000 Subject: [PATCH 10/39] Make grid_spec read_only; Remove origin from mars namespace; Remove CARRA-EAST grid_spec --- .../localConcepts/destine/gridSpecificationConcept.def | 8 +++++++- definitions/grib2/section.6.hook.12.def | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def index f983d219c..67f61c217 100644 --- a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def +++ b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def @@ -1,4 +1,10 @@ # Concept gridSpecification -'CARRA-East' = {numberOfDataPoints = 780321; gridDefinitionTemplateNumber=30; Nx=789; Ny=989;} +'H16' = {numberOfDataPoints=3072; gridDefinitionTemplateNumber=150;} +'H32' = {numberOfDataPoints=12288; gridDefinitionTemplateNumber=150;} +'H64' = {numberOfDataPoints=49152; gridDefinitionTemplateNumber=150;} +'H128' = {numberOfDataPoints=196608; gridDefinitionTemplateNumber=150;} +'H256' = {numberOfDataPoints=786432; gridDefinitionTemplateNumber=150;} +'H512 = {numberOfDataPoints=3145728; gridDefinitionTemplateNumber=150;} +'H1024' = {numberOfDataPoints=12582912; gridDefinitionTemplateNumber=150;} 'O1280' = {numberOfDataPoints=6599680; gridDefinitionTemplateNumber=40; Nj=2560;} 'O8000' = {numberOfDataPoints=256288000; gridDefinitionTemplateNumber=40; Nj=16000;} \ No newline at end of file diff --git a/definitions/grib2/section.6.hook.12.def b/definitions/grib2/section.6.hook.12.def index 6e654b85d..be89c2e5a 100644 --- a/definitions/grib2/section.6.hook.12.def +++ b/definitions/grib2/section.6.hook.12.def @@ -2,10 +2,9 @@ # Hooks after section 6 for DestinE (productionStatusOfProcessedData=12) # conceptsDir2 --> datasetForLocal -concept gridSpecification(unknown, "gridSpecificationConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; +concept gridSpecification(unknown, "gridSpecificationConcept.def",conceptsDir2,conceptsDir1): no_copy, read_only, dump; concept destineOrigin (unknown, "destineOriginConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; -alias mars.origin = destineOrigin; concept modelVersion (unknown, "modelVersionConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; From 6c693fbbd4b36620529308ad9349195d8af8dce1 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Thu, 21 Sep 2023 10:15:07 +0000 Subject: [PATCH 11/39] Remove reference to d2; This is not necessary at this stage --- definitions/grib2/products_13.def | 7 ------- definitions/mars/class.table | 1 - 2 files changed, 8 deletions(-) delete mode 100644 definitions/grib2/products_13.def diff --git a/definitions/grib2/products_13.def b/definitions/grib2/products_13.def deleted file mode 100644 index eaca76a20..000000000 --- a/definitions/grib2/products_13.def +++ /dev/null @@ -1,7 +0,0 @@ -# (C) Copyright 2005- ECMWF. - -# Destination Earth (DestinE) - -constant marsClass = 'd2'; - -include "grib2/products_destine.def" \ No newline at end of file diff --git a/definitions/mars/class.table b/definitions/mars/class.table index 9dda395f3..55b321573 100644 --- a/definitions/mars/class.table +++ b/definitions/mars/class.table @@ -46,7 +46,6 @@ 45 ml Machine learning 46 d1 Destination Earth 47 o6 ECMWF Ocean ReAnalysis version 6 (EORA6) -48 d2 Destination Earth Test 99 te Test 100 at Austria 101 be Belgium From f11d3057ce5240bba6035d48f221bdb17687c2c7 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Thu, 21 Sep 2023 10:37:07 +0000 Subject: [PATCH 12/39] Preparation for develop; Removing concepts which we don't need for ClimateDT; Modified tables based on feedback from ClimateDT modellers --- definitions/grib2/destine_CMIPActivity.table | 5 ++--- definitions/grib2/destine_CMIPExperiment.table | 13 ++++++------- definitions/grib2/destine_CMIPGridLabel.table | 3 --- definitions/grib2/destine_zoomRegion.table | 4 ---- definitions/grib2/local.destine.climate-dt.def | 4 ++-- .../grib2/local.destine.on-demand-extremes-dt.def | 4 ---- .../localConcepts/destine/modelVersionConcept.def | 3 --- definitions/grib2/section.6.hook.12.def | 3 --- 8 files changed, 10 insertions(+), 29 deletions(-) delete mode 100644 definitions/grib2/destine_CMIPGridLabel.table delete mode 100644 definitions/grib2/destine_zoomRegion.table delete mode 100644 definitions/grib2/local.destine.on-demand-extremes-dt.def delete mode 100644 definitions/grib2/localConcepts/destine/modelVersionConcept.def diff --git a/definitions/grib2/destine_CMIPActivity.table b/definitions/grib2/destine_CMIPActivity.table index cfa3ac747..49044d18b 100644 --- a/definitions/grib2/destine_CMIPActivity.table +++ b/definitions/grib2/destine_CMIPActivity.table @@ -1,4 +1,3 @@ 0 unknown unknown -1 CMIP5 CMIP5 -2 CMIP6 CMIP6 -3 ScenarioMIP ScenarioMIP \ No newline at end of file +1 CMIP6 CMIP6 +2 ScenarioMIP ScenarioMIP \ No newline at end of file diff --git a/definitions/grib2/destine_CMIPExperiment.table b/definitions/grib2/destine_CMIPExperiment.table index 1744f97bb..b8a21094b 100644 --- a/definitions/grib2/destine_CMIPExperiment.table +++ b/definitions/grib2/destine_CMIPExperiment.table @@ -1,9 +1,8 @@ 0 unknown unknown 1 hist Historical -2 RCP2.6 RCP 2.6 -3 RCP4.5 RCP 4.5 -4 RCP8.5 RCP 8.5 -5 SSP1-2.6 SSP1-2.6 -6 SSP2-4.5 SSP2-4.5 -7 SSP3-7.0 SSP3-7.0 -8 SSP5-8.5 SSP5-8.5 \ No newline at end of file +2 amip AMIP +3 SSP1-1.9 SSP1-1.9 +4 SSP1-2.6 SSP1-2.6 +5 SSP2-4.5 SSP2-4.5 +6 SSP3-7.0 SSP3-7.0 +7 SSP5-8.5 SSP5-8.5 \ No newline at end of file diff --git a/definitions/grib2/destine_CMIPGridLabel.table b/definitions/grib2/destine_CMIPGridLabel.table deleted file mode 100644 index b3e9b279b..000000000 --- a/definitions/grib2/destine_CMIPGridLabel.table +++ /dev/null @@ -1,3 +0,0 @@ -0 unknown unknown -1 gn Native grid -2 gr Regridded \ No newline at end of file diff --git a/definitions/grib2/destine_zoomRegion.table b/definitions/grib2/destine_zoomRegion.table deleted file mode 100644 index bb21d5600..000000000 --- a/definitions/grib2/destine_zoomRegion.table +++ /dev/null @@ -1,4 +0,0 @@ -0 unknown unknown -1 e Europe -2 uk United Kingdom -3 fr France \ No newline at end of file diff --git a/definitions/grib2/local.destine.climate-dt.def b/definitions/grib2/local.destine.climate-dt.def index 584d2f7ae..8a89017f7 100644 --- a/definitions/grib2/local.destine.climate-dt.def +++ b/definitions/grib2/local.destine.climate-dt.def @@ -9,5 +9,5 @@ alias mars.CMIPActivity = CMIPActivity; codetable[2] CMIPExperiment "grib2/destine_CMIPExperiment.table" : dump; alias mars.CMIPExperiment = CMIPExperiment; -codetable[2] CMIPGridLabel "grib2/destine_CMIPGridLabel.table" : dump; -alias mars.CMIPGridLabel = CMIPGridLabel; \ No newline at end of file +codetable[2] model "grib2/destine_model.table" : dump; +alias mars.model = model; \ No newline at end of file diff --git a/definitions/grib2/local.destine.on-demand-extremes-dt.def b/definitions/grib2/local.destine.on-demand-extremes-dt.def deleted file mode 100644 index 5117df354..000000000 --- a/definitions/grib2/local.destine.on-demand-extremes-dt.def +++ /dev/null @@ -1,4 +0,0 @@ -# DestinE MARS ClimateDT keywords - -codetable[2] zoomRegion "grib2/destine_zoomRegion.table" : dump; -alias mars.zoomRegion = zoomRegion; \ No newline at end of file diff --git a/definitions/grib2/localConcepts/destine/modelVersionConcept.def b/definitions/grib2/localConcepts/destine/modelVersionConcept.def deleted file mode 100644 index f55271cbd..000000000 --- a/definitions/grib2/localConcepts/destine/modelVersionConcept.def +++ /dev/null @@ -1,3 +0,0 @@ -# Concept modelVersion -# TODO: Need to work out proper mapping and make those keys local -"48r1" = { backgroundProcess = 255; generatingProcessIdentifier = 154; } \ No newline at end of file diff --git a/definitions/grib2/section.6.hook.12.def b/definitions/grib2/section.6.hook.12.def index be89c2e5a..2dd6f0a53 100644 --- a/definitions/grib2/section.6.hook.12.def +++ b/definitions/grib2/section.6.hook.12.def @@ -5,6 +5,3 @@ concept gridSpecification(unknown, "gridSpecificationConcept.def",conceptsDir2,conceptsDir1): no_copy, read_only, dump; concept destineOrigin (unknown, "destineOriginConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; - -concept modelVersion (unknown, "modelVersionConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; - From 172f1ed4e20383c72f38c455edaeffb7dad8ca85 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Thu, 21 Sep 2023 10:43:08 +0000 Subject: [PATCH 13/39] Moved model to climateDT only; Fixed typo; Removed reference to subCentre table for now which is in progress --- definitions/common/c-12.98.table | 7 ------- definitions/grib2/destine_model.table | 2 +- definitions/grib2/local.destine.base.def | 5 +---- definitions/grib2/section.1.def | 1 - 4 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 definitions/common/c-12.98.table diff --git a/definitions/common/c-12.98.table b/definitions/common/c-12.98.table deleted file mode 100644 index 74883d603..000000000 --- a/definitions/common/c-12.98.table +++ /dev/null @@ -1,7 +0,0 @@ -# COMMON CODE TABLE C-12: Subcentres for originating/generating centre ECMF (98) (GRIB2, BUFR4) -78 edzw Offenbach (RSMC) -84 lfpw French Weather Service - Toulouse -1000 bsc Barcelona Supercomputing Centre (BSC) -1001 csc CSC – IT Center for Science LTD. -1002 dkrz German Climate Computation Center (DKRZ) -65535 65535 Missing \ No newline at end of file diff --git a/definitions/grib2/destine_model.table b/definitions/grib2/destine_model.table index b1ec128de..1f0a7e01d 100644 --- a/definitions/grib2/destine_model.table +++ b/definitions/grib2/destine_model.table @@ -3,5 +3,5 @@ 2 IFS-NEMO IFS with NEMO ocean model 3 IFS-FESOM IFS with FESOM ocean model 4 ICON ICON with no ocean model -5 ICON-NEMO IFS with NEMO ocean model +5 ICON-NEMO ICON with NEMO ocean model 6 ICON-FESOM ICON with FESOM ocean model \ No newline at end of file diff --git a/definitions/grib2/local.destine.base.def b/definitions/grib2/local.destine.base.def index 185524c33..9a87b6b9a 100644 --- a/definitions/grib2/local.destine.base.def +++ b/definitions/grib2/local.destine.base.def @@ -1,7 +1,4 @@ # DestinE MARS base keywords codetable[2] dataset "grib2/destine_dataset.table" : dump; -alias mars.dataset = dataset; - -codetable[2] model "grib2/destine_model.table" : dump; -alias mars.model = model; \ No newline at end of file +alias mars.dataset = dataset; \ No newline at end of file diff --git a/definitions/grib2/section.1.def b/definitions/grib2/section.1.def index c6c6c16b5..719a9399c 100644 --- a/definitions/grib2/section.1.def +++ b/definitions/grib2/section.1.def @@ -14,7 +14,6 @@ alias parameter.centre=centre; alias ls.centre=centre; alias originatingCentre=centre; -# codetable[2] subCentre "common/c-12.[centre].def" : dump; unsigned[2] subCentre : dump; _if (subCentre==98 ) { From d145099ee828a3d72baab425ceada64a1e42c7d0 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Thu, 21 Sep 2023 11:15:04 +0000 Subject: [PATCH 14/39] ECC-1691: Commit to link branch to JIRA ticket --- definitions/grib2/products_destine.def | 1 - 1 file changed, 1 deletion(-) diff --git a/definitions/grib2/products_destine.def b/definitions/grib2/products_destine.def index 3a7cdd39c..c165e20a5 100644 --- a/definitions/grib2/products_destine.def +++ b/definitions/grib2/products_destine.def @@ -68,4 +68,3 @@ if (stepType is "avg" || stepType is "accum") { else { alias mars.step = step; } - From c3b9767c6a262e7d33b769331eb21db08ce056c3 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Thu, 21 Sep 2023 13:03:08 +0000 Subject: [PATCH 15/39] Missed quotation --- .../grib2/localConcepts/destine/gridSpecificationConcept.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def index 67f61c217..a1532afa3 100644 --- a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def +++ b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def @@ -4,7 +4,7 @@ 'H64' = {numberOfDataPoints=49152; gridDefinitionTemplateNumber=150;} 'H128' = {numberOfDataPoints=196608; gridDefinitionTemplateNumber=150;} 'H256' = {numberOfDataPoints=786432; gridDefinitionTemplateNumber=150;} -'H512 = {numberOfDataPoints=3145728; gridDefinitionTemplateNumber=150;} +'H512' = {numberOfDataPoints=3145728; gridDefinitionTemplateNumber=150;} 'H1024' = {numberOfDataPoints=12582912; gridDefinitionTemplateNumber=150;} 'O1280' = {numberOfDataPoints=6599680; gridDefinitionTemplateNumber=40; Nj=2560;} 'O8000' = {numberOfDataPoints=256288000; gridDefinitionTemplateNumber=40; Nj=16000;} \ No newline at end of file From 4df1188152cc468fdd3a67385fc6883bcb63fabb Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Mon, 25 Sep 2023 14:49:20 +0000 Subject: [PATCH 16/39] Reworking to accommodate PR comment; Also making a few other tweaks to bring closer to final form --- ...ctivity.table => destine_datasetActivity.table} | 0 ...iment.table => destine_datasetExperiment.table} | 0 definitions/grib2/local.destine.climate-dt.def | 8 ++++---- .../destine/gridSpecificationConcept.def | 14 +++++++------- ....12.def => post_meta_data.hook.products_12.def} | 10 +++++++++- definitions/grib2/sections.def | 4 ++-- 6 files changed, 22 insertions(+), 14 deletions(-) rename definitions/grib2/{destine_CMIPActivity.table => destine_datasetActivity.table} (100%) rename definitions/grib2/{destine_CMIPExperiment.table => destine_datasetExperiment.table} (100%) rename definitions/grib2/{section.6.hook.12.def => post_meta_data.hook.products_12.def} (60%) diff --git a/definitions/grib2/destine_CMIPActivity.table b/definitions/grib2/destine_datasetActivity.table similarity index 100% rename from definitions/grib2/destine_CMIPActivity.table rename to definitions/grib2/destine_datasetActivity.table diff --git a/definitions/grib2/destine_CMIPExperiment.table b/definitions/grib2/destine_datasetExperiment.table similarity index 100% rename from definitions/grib2/destine_CMIPExperiment.table rename to definitions/grib2/destine_datasetExperiment.table diff --git a/definitions/grib2/local.destine.climate-dt.def b/definitions/grib2/local.destine.climate-dt.def index 8a89017f7..596d7a9d5 100644 --- a/definitions/grib2/local.destine.climate-dt.def +++ b/definitions/grib2/local.destine.climate-dt.def @@ -3,11 +3,11 @@ codetable[2] datasetVersion "grib2/destine_datasetVersion.table" : dump; alias mars.datasetVersion = datasetVersion; -codetable[2] CMIPActivity "grib2/destine_CMIPActivity.table" : dump; -alias mars.CMIPActivity = CMIPActivity; +codetable[2] datasetActivity "grib2/destine_datasetActivity.table" : dump; +alias mars.datasetActivity = datasetActivity; -codetable[2] CMIPExperiment "grib2/destine_CMIPExperiment.table" : dump; -alias mars.CMIPExperiment = CMIPExperiment; +codetable[2] datasetExperiment "grib2/destine_datasetExperiment.table" : dump; +alias mars.datasetExperiment = datasetExperiment; codetable[2] model "grib2/destine_model.table" : dump; alias mars.model = model; \ No newline at end of file diff --git a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def index a1532afa3..28c7a5c47 100644 --- a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def +++ b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def @@ -1,10 +1,10 @@ # Concept gridSpecification -'H16' = {numberOfDataPoints=3072; gridDefinitionTemplateNumber=150;} -'H32' = {numberOfDataPoints=12288; gridDefinitionTemplateNumber=150;} -'H64' = {numberOfDataPoints=49152; gridDefinitionTemplateNumber=150;} -'H128' = {numberOfDataPoints=196608; gridDefinitionTemplateNumber=150;} -'H256' = {numberOfDataPoints=786432; gridDefinitionTemplateNumber=150;} -'H512' = {numberOfDataPoints=3145728; gridDefinitionTemplateNumber=150;} -'H1024' = {numberOfDataPoints=12582912; gridDefinitionTemplateNumber=150;} +'H16' = {numberOfDataPoints=3072; gridDefinitionTemplateNumber=150; Nside=16;} +'H32' = {numberOfDataPoints=12288; gridDefinitionTemplateNumber=150; Nside=32;} +'H64' = {numberOfDataPoints=49152; gridDefinitionTemplateNumber=150; Nside=64;} +'H128' = {numberOfDataPoints=196608; gridDefinitionTemplateNumber=150; Nside=128;} +'H256' = {numberOfDataPoints=786432; gridDefinitionTemplateNumber=150; Nside=256;} +'H512' = {numberOfDataPoints=3145728; gridDefinitionTemplateNumber=150; Nside=512;} +'H1024' = {numberOfDataPoints=12582912; gridDefinitionTemplateNumber=150; Nside=1024;} 'O1280' = {numberOfDataPoints=6599680; gridDefinitionTemplateNumber=40; Nj=2560;} 'O8000' = {numberOfDataPoints=256288000; gridDefinitionTemplateNumber=40; Nj=16000;} \ No newline at end of file diff --git a/definitions/grib2/section.6.hook.12.def b/definitions/grib2/post_meta_data.hook.products_12.def similarity index 60% rename from definitions/grib2/section.6.hook.12.def rename to definitions/grib2/post_meta_data.hook.products_12.def index 2dd6f0a53..d476197b3 100644 --- a/definitions/grib2/section.6.hook.12.def +++ b/definitions/grib2/post_meta_data.hook.products_12.def @@ -1,7 +1,15 @@ # (C) Copyright 2005- ECMWF. -# Hooks after section 6 for DestinE (productionStatusOfProcessedData=12) +# Hooks post meta-data for DestinE (productionStatusOfProcessedData=12) # conceptsDir2 --> datasetForLocal concept gridSpecification(unknown, "gridSpecificationConcept.def",conceptsDir2,conceptsDir1): no_copy, read_only, dump; concept destineOrigin (unknown, "destineOriginConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; + +if(dataset is "climate-dt") { + +alias mars.date = validityDate; +alias mars.time = validityTime; +unalias mars.step; + +} \ No newline at end of file diff --git a/definitions/grib2/sections.def b/definitions/grib2/sections.def index 61aff3f29..19f6b61db 100644 --- a/definitions/grib2/sections.def +++ b/definitions/grib2/sections.def @@ -44,6 +44,8 @@ meta md5Headers md5(startOfHeaders,lengthOfHeaders); lookup[1] sectionNumber(4) ; +template_nofail hook_post_meta_data "grib2/post_meta_data.hook.products_[productionStatusOfProcessedData].def"; + if (!headersOnly) { if (sectionNumber == 5 or new() ) { position sectionPosition; @@ -59,8 +61,6 @@ if (!headersOnly) { lookup[1] sectionNumber(4) ; - template_nofail hook_after_section_6 "grib2/section.6.hook.[productionStatusOfProcessedData].def"; - if (sectionNumber == 7 or new() ) { position sectionPosition; template section_7 "grib2/section.7.def"; From 98659cc99a3d7dc87ba35329d70b22af249c7864 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 27 Sep 2023 10:58:47 +0100 Subject: [PATCH 17/39] ECC-1691: Tests --- .../grib2/post_meta_data.hook.products_12.def | 10 +-- tests/CMakeLists.txt | 1 + tests/grib_ecc-1691.sh | 76 +++++++++++++++++++ 3 files changed, 81 insertions(+), 6 deletions(-) create mode 100755 tests/grib_ecc-1691.sh diff --git a/definitions/grib2/post_meta_data.hook.products_12.def b/definitions/grib2/post_meta_data.hook.products_12.def index d476197b3..c24b78c94 100644 --- a/definitions/grib2/post_meta_data.hook.products_12.def +++ b/definitions/grib2/post_meta_data.hook.products_12.def @@ -7,9 +7,7 @@ concept gridSpecification(unknown, "gridSpecificationConcept.def",conceptsDir2,c concept destineOrigin (unknown, "destineOriginConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; if(dataset is "climate-dt") { - -alias mars.date = validityDate; -alias mars.time = validityTime; -unalias mars.step; - -} \ No newline at end of file + alias mars.date = validityDate; + alias mars.time = validityTime; + unalias mars.step; +} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ad9f7c408..165a3bc5f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -126,6 +126,7 @@ if( HAVE_BUILD_TOOLS ) grib_ecc-1560 grib_ecc-1571 grib_ecc-1654 + grib_ecc-1691 bufr_ecc-1028 bufr_ecc-1195 bufr_ecc-1259 diff --git a/tests/grib_ecc-1691.sh b/tests/grib_ecc-1691.sh new file mode 100755 index 000000000..a00d417aa --- /dev/null +++ b/tests/grib_ecc-1691.sh @@ -0,0 +1,76 @@ +#!/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 + +REDIRECT=/dev/null + +# ECC-1691: Destination Earth ClimateDT metadata support + +label="grib_ecc-1691_test" +temp_grib_a=temp.$label.a.grib +temp_grib_b=temp.$label.b.grib +destine_sample=temp.$label.destine.grib +sample_grib2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl + +tablesVersionLatest=$( ${tools_dir}/grib_get -p tablesVersionLatest ${sample_grib2} ) + +# Setup Destine pseudo-centre GRIB message +# First latest tables version and add local section with MARS labeling +${tools_dir}/grib_set -s tablesVersion=${tablesVersionLatest},setLocalDefinition=1,grib2LocalSectionNumber=1 ${sample_grib2} ${temp_grib_a} + +# Then change to processed data = 12 --> DestinE +${tools_dir}/grib_set -s productionStatusOfProcessedData=12 ${temp_grib_a} ${destine_sample} + +# Check DestinE base related keys are present and correct +grib_check_key_exists ${destine_sample} destineLocalVersion,dataset,marsClass,marsType,marsStream,experimentVersionNumber +grib_check_key_equals ${destine_sample} "marsClass,dataset,destineLocalVersion" "d1 0 1" + +# Check setting dataset to climate-dt (1). Check keys are present and equal defaults +${tools_dir}/grib_set -s dataset=1 ${destine_sample} ${temp_grib_a} + +grib_check_key_exists ${temp_grib_a} dataset,datasetVersion,datasetActivity,datasetExperiment,model +grib_check_key_equals ${temp_grib_a} "dataset,datasetVersion,datasetActivity,datasetExperiment,model" "1 0 0 0 0" + +# Check an example where a few additional things are set in climate-dt +${tools_dir}/grib_set -s dataset=1,datasetVersion=2,datasetActivity=1,datasetExperiment=1,model=2 ${destine_sample} ${temp_grib_a} + +grib_check_key_equals ${temp_grib_a} "dataset,datasetVersion,datasetActivity,datasetExperiment,model" "1 2 1 1 2" +grib_check_key_equals ${temp_grib_a} "dataset:s,datasetVersion:s,datasetActivity:s,datasetExperiment:s,model:s" "climate-dt v20230801 CMIP6 hist IFS-NEMO" + +# Check mars.date and mars.time are equal to validityDate and validityTime, and that mars.step has been unaliased +result1=$( ${tools_dir}/grib_get -p mars.date,mars.time $temp_grib_a ) +result2=$( ${tools_dir}/grib_get -p validityDate,validityTime $temp_grib_a ) +[ "$result1" = "$result2" ] + +# TODO: mars.step should be unaliased! this test is broken +# [ $( ${tools_dir}/grib_get -f -p mars.step ${temp_grib_a} ) = "not_found" ] + +# Check setting dataset to extremes-dt (2). This time we will check string also +${tools_dir}/grib_set -s dataset=2 ${destine_sample} ${temp_grib_a} + +grib_check_key_equals ${temp_grib_a} "dataset,dataset:s" "2 extremes-dt" + +# Check concepts. First check default value and then example of mapping +grib_check_key_exists ${destine_sample} destineOrigin,gridSpecification +grib_check_key_equals ${destine_sample} "destineOrigin,gridSpecification" "unknown unknown" + +# Below mapping is for MeteoFrance +${tools_dir}/grib_set -s centre=98,subCentre=84 ${destine_sample} ${temp_grib_a} + +grib_check_key_equals ${temp_grib_a} "destineOrigin" "MeteoFrance" + +# Below mapping is for H1024 +${tools_dir}/grib_set -s numberOfDataPoints=12582912,gridDefinitionTemplateNumber=150,Nside=1024 ${destine_sample} ${temp_grib_a} + +grib_check_key_equals ${temp_grib_a} "gridSpecification" "H1024" + +# Clean up +rm -f $temp_grib_a $temp_grib_b $destine_sample From 6554d0b193d3e1bbc584bac46f2454d8ccfe7f57 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 27 Sep 2023 10:41:34 +0000 Subject: [PATCH 18/39] ECC-1691: Fix test re mars.step --- .../grib2/post_meta_data.hook.products_12.def | 1 + tests/grib_ecc-1691.sh | 42 +++++++++---------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/definitions/grib2/post_meta_data.hook.products_12.def b/definitions/grib2/post_meta_data.hook.products_12.def index c24b78c94..b7ad96a12 100644 --- a/definitions/grib2/post_meta_data.hook.products_12.def +++ b/definitions/grib2/post_meta_data.hook.products_12.def @@ -7,6 +7,7 @@ concept gridSpecification(unknown, "gridSpecificationConcept.def",conceptsDir2,c concept destineOrigin (unknown, "destineOriginConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; if(dataset is "climate-dt") { + unalias mars.step; alias mars.date = validityDate; alias mars.time = validityTime; unalias mars.step; diff --git a/tests/grib_ecc-1691.sh b/tests/grib_ecc-1691.sh index a00d417aa..6d76a90b0 100755 --- a/tests/grib_ecc-1691.sh +++ b/tests/grib_ecc-1691.sh @@ -20,57 +20,57 @@ temp_grib_b=temp.$label.b.grib destine_sample=temp.$label.destine.grib sample_grib2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl -tablesVersionLatest=$( ${tools_dir}/grib_get -p tablesVersionLatest ${sample_grib2} ) +tablesVersionLatest=$( ${tools_dir}/grib_get -p tablesVersionLatest $sample_grib2 ) # Setup Destine pseudo-centre GRIB message # First latest tables version and add local section with MARS labeling -${tools_dir}/grib_set -s tablesVersion=${tablesVersionLatest},setLocalDefinition=1,grib2LocalSectionNumber=1 ${sample_grib2} ${temp_grib_a} +${tools_dir}/grib_set -s tablesVersion=$tablesVersionLatest,setLocalDefinition=1,grib2LocalSectionNumber=1 $sample_grib2 $temp_grib_a # Then change to processed data = 12 --> DestinE -${tools_dir}/grib_set -s productionStatusOfProcessedData=12 ${temp_grib_a} ${destine_sample} +${tools_dir}/grib_set -s productionStatusOfProcessedData=12 $temp_grib_a $destine_sample # Check DestinE base related keys are present and correct -grib_check_key_exists ${destine_sample} destineLocalVersion,dataset,marsClass,marsType,marsStream,experimentVersionNumber -grib_check_key_equals ${destine_sample} "marsClass,dataset,destineLocalVersion" "d1 0 1" +grib_check_key_exists $destine_sample destineLocalVersion,dataset,marsClass,marsType,marsStream,experimentVersionNumber +grib_check_key_equals $destine_sample "marsClass,dataset,destineLocalVersion" "d1 0 1" # Check setting dataset to climate-dt (1). Check keys are present and equal defaults -${tools_dir}/grib_set -s dataset=1 ${destine_sample} ${temp_grib_a} +${tools_dir}/grib_set -s dataset=1 $destine_sample $temp_grib_a -grib_check_key_exists ${temp_grib_a} dataset,datasetVersion,datasetActivity,datasetExperiment,model -grib_check_key_equals ${temp_grib_a} "dataset,datasetVersion,datasetActivity,datasetExperiment,model" "1 0 0 0 0" +grib_check_key_exists $temp_grib_a dataset,datasetVersion,datasetActivity,datasetExperiment,model +grib_check_key_equals $temp_grib_a "dataset,datasetVersion,datasetActivity,datasetExperiment,model" "1 0 0 0 0" # Check an example where a few additional things are set in climate-dt -${tools_dir}/grib_set -s dataset=1,datasetVersion=2,datasetActivity=1,datasetExperiment=1,model=2 ${destine_sample} ${temp_grib_a} +${tools_dir}/grib_set -s dataset=1,datasetVersion=2,datasetActivity=1,datasetExperiment=1,model=2 $destine_sample $temp_grib_a -grib_check_key_equals ${temp_grib_a} "dataset,datasetVersion,datasetActivity,datasetExperiment,model" "1 2 1 1 2" -grib_check_key_equals ${temp_grib_a} "dataset:s,datasetVersion:s,datasetActivity:s,datasetExperiment:s,model:s" "climate-dt v20230801 CMIP6 hist IFS-NEMO" +grib_check_key_equals $temp_grib_a "dataset,datasetVersion,datasetActivity,datasetExperiment,model" "1 2 1 1 2" +grib_check_key_equals $temp_grib_a "dataset:s,datasetVersion:s,datasetActivity:s,datasetExperiment:s,model:s" "climate-dt v20230801 CMIP6 hist IFS-NEMO" # Check mars.date and mars.time are equal to validityDate and validityTime, and that mars.step has been unaliased result1=$( ${tools_dir}/grib_get -p mars.date,mars.time $temp_grib_a ) result2=$( ${tools_dir}/grib_get -p validityDate,validityTime $temp_grib_a ) [ "$result1" = "$result2" ] -# TODO: mars.step should be unaliased! this test is broken -# [ $( ${tools_dir}/grib_get -f -p mars.step ${temp_grib_a} ) = "not_found" ] +${tools_dir}/grib_ls -jm $temp_grib_a +[ $( ${tools_dir}/grib_get -f -p mars.step $temp_grib_a ) = "not_found" ] # Check setting dataset to extremes-dt (2). This time we will check string also -${tools_dir}/grib_set -s dataset=2 ${destine_sample} ${temp_grib_a} +${tools_dir}/grib_set -s dataset=2 $destine_sample $temp_grib_a -grib_check_key_equals ${temp_grib_a} "dataset,dataset:s" "2 extremes-dt" +grib_check_key_equals $temp_grib_a "dataset,dataset:s" "2 extremes-dt" # Check concepts. First check default value and then example of mapping -grib_check_key_exists ${destine_sample} destineOrigin,gridSpecification -grib_check_key_equals ${destine_sample} "destineOrigin,gridSpecification" "unknown unknown" +grib_check_key_exists $destine_sample destineOrigin,gridSpecification +grib_check_key_equals $destine_sample "destineOrigin,gridSpecification" "unknown unknown" # Below mapping is for MeteoFrance -${tools_dir}/grib_set -s centre=98,subCentre=84 ${destine_sample} ${temp_grib_a} +${tools_dir}/grib_set -s centre=98,subCentre=84 $destine_sample $temp_grib_a -grib_check_key_equals ${temp_grib_a} "destineOrigin" "MeteoFrance" +grib_check_key_equals $temp_grib_a "destineOrigin" "MeteoFrance" # Below mapping is for H1024 -${tools_dir}/grib_set -s numberOfDataPoints=12582912,gridDefinitionTemplateNumber=150,Nside=1024 ${destine_sample} ${temp_grib_a} +${tools_dir}/grib_set -s numberOfDataPoints=12582912,gridDefinitionTemplateNumber=150,Nside=1024 $destine_sample $temp_grib_a -grib_check_key_equals ${temp_grib_a} "gridSpecification" "H1024" +grib_check_key_equals $temp_grib_a "gridSpecification" "H1024" # Clean up rm -f $temp_grib_a $temp_grib_b $destine_sample From 8f84ece03c94331f0ecc67e5ee6ce5a279621cf7 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 27 Sep 2023 18:10:33 +0100 Subject: [PATCH 19/39] ECC-1691: Additional modifications from Matthew --- definitions/grib2/destine_dataset.table | 3 ++- definitions/grib2/destine_datasetActivity.table | 5 +++-- .../grib2/destine_datasetExperiment.table | 13 +++++++------ definitions/grib2/destine_datasetVersion.table | 17 +++++++++++++++-- definitions/grib2/destine_model.table | 3 ++- .../destine/destineOriginConcept.def | 4 +++- .../grib2/post_meta_data.hook.products_12.def | 6 ------ definitions/grib2/products_destine.def | 11 ++++++----- tests/grib_ecc-1691.sh | 2 +- 9 files changed, 39 insertions(+), 25 deletions(-) diff --git a/definitions/grib2/destine_dataset.table b/definitions/grib2/destine_dataset.table index 1b56cd8c8..58b82fc41 100644 --- a/definitions/grib2/destine_dataset.table +++ b/definitions/grib2/destine_dataset.table @@ -2,4 +2,5 @@ 1 climate-dt Climate change adaptation digital twin 2 extremes-dt Weather and geophysical extremes digital twin 3 on-demand-climate-dt On-demand climate change adaptation digital twin -4 on-demand-extremes-dt On-demand weather and geophysical extremes digital twin \ No newline at end of file +4 on-demand-extremes-dt On-demand weather and geophysical extremes digital twin +65535 65535 Missing diff --git a/definitions/grib2/destine_datasetActivity.table b/definitions/grib2/destine_datasetActivity.table index 49044d18b..852b275df 100644 --- a/definitions/grib2/destine_datasetActivity.table +++ b/definitions/grib2/destine_datasetActivity.table @@ -1,3 +1,4 @@ 0 unknown unknown -1 CMIP6 CMIP6 -2 ScenarioMIP ScenarioMIP \ No newline at end of file +1 CMIP6 Coupled Model Intercomparison Project Phase 6 +2 ScenarioMIP Scenario Model Intercomparison Project +65535 65535 Missing diff --git a/definitions/grib2/destine_datasetExperiment.table b/definitions/grib2/destine_datasetExperiment.table index b8a21094b..1429f71ac 100644 --- a/definitions/grib2/destine_datasetExperiment.table +++ b/definitions/grib2/destine_datasetExperiment.table @@ -1,8 +1,9 @@ 0 unknown unknown 1 hist Historical -2 amip AMIP -3 SSP1-1.9 SSP1-1.9 -4 SSP1-2.6 SSP1-2.6 -5 SSP2-4.5 SSP2-4.5 -6 SSP3-7.0 SSP3-7.0 -7 SSP5-8.5 SSP5-8.5 \ No newline at end of file +2 amip Atmospheric Model Intercomparison Project +3 SSP1-1.9 Shared Socio-economic Pathways 1-1.9 +4 SSP1-2.6 Shared Socio-economic Pathways 1-2.6 +5 SSP2-4.5 Shared Socio-economic Pathways 2-4.5 +6 SSP3-7.0 Shared Socio-economic Pathways 3-7.0 +7 SSP5-8.5 Shared Socio-economic Pathways 5-8.5 +65535 65535 Missing diff --git a/definitions/grib2/destine_datasetVersion.table b/definitions/grib2/destine_datasetVersion.table index ecdb27737..0b2efc64e 100644 --- a/definitions/grib2/destine_datasetVersion.table +++ b/definitions/grib2/destine_datasetVersion.table @@ -1,3 +1,16 @@ 0 unknown unknown -1 v20230701 v20230701 -2 v20230801 v20230801 \ No newline at end of file +1 v20231001 v20231001 +2 v20231015 v20231015 +3 v20231101 v20231101 +4 v20231115 v20231115 +5 v20231201 v20231201 +6 v20231215 v20231215 +7 v20240101 v20240101 +8 v20240115 v20240115 +9 v20240201 v20240201 +10 v20240215 v20240215 +11 v20240301 v20240301 +12 v20240315 v20240315 +13 v20240401 v20240401 +14 v20240415 v20240415 +65535 65535 Missing diff --git a/definitions/grib2/destine_model.table b/definitions/grib2/destine_model.table index 1f0a7e01d..e0662ac43 100644 --- a/definitions/grib2/destine_model.table +++ b/definitions/grib2/destine_model.table @@ -4,4 +4,5 @@ 3 IFS-FESOM IFS with FESOM ocean model 4 ICON ICON with no ocean model 5 ICON-NEMO ICON with NEMO ocean model -6 ICON-FESOM ICON with FESOM ocean model \ No newline at end of file +6 ICON-FESOM ICON with FESOM ocean model +65535 65535 Missing diff --git a/definitions/grib2/localConcepts/destine/destineOriginConcept.def b/definitions/grib2/localConcepts/destine/destineOriginConcept.def index a013ee42f..9869ef9d0 100644 --- a/definitions/grib2/localConcepts/destine/destineOriginConcept.def +++ b/definitions/grib2/localConcepts/destine/destineOriginConcept.def @@ -1,7 +1,9 @@ # Concept destineOrigin "DWD" = { centre=98; subCentre=78; } "MeteoFrance" = { centre=98; subCentre=84; } +"MPI-M" = { centre=98; subCentre=252; } +"AWI" = { centre=98; subCentre=253; } "BSC" = { centre=98; subCentre=1000; } "CSC" = { centre=98; subCentre=1001; } "DKRZ" = { centre=98; subCentre=1002; } - +"Climate DT consortium (CSC,BSC,AWI,MPI-M)" = { centre=98; subCentre=1003; } diff --git a/definitions/grib2/post_meta_data.hook.products_12.def b/definitions/grib2/post_meta_data.hook.products_12.def index b7ad96a12..17a4c2001 100644 --- a/definitions/grib2/post_meta_data.hook.products_12.def +++ b/definitions/grib2/post_meta_data.hook.products_12.def @@ -6,9 +6,3 @@ concept gridSpecification(unknown, "gridSpecificationConcept.def",conceptsDir2,c concept destineOrigin (unknown, "destineOriginConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; -if(dataset is "climate-dt") { - unalias mars.step; - alias mars.date = validityDate; - alias mars.time = validityTime; - unalias mars.step; -} diff --git a/definitions/grib2/products_destine.def b/definitions/grib2/products_destine.def index c165e20a5..4a02a6e76 100644 --- a/definitions/grib2/products_destine.def +++ b/definitions/grib2/products_destine.def @@ -62,9 +62,10 @@ concept marsStream(unknown) { alias mars.stream = marsStream; -if (stepType is "avg" || stepType is "accum") { - alias mars.step = stepRange; -} -else { - alias mars.step = step; +if(dataset is "climate-dt") { + +alias mars.date = validityDate; +alias mars.time = validityTime; +unalias mars.step; + } diff --git a/tests/grib_ecc-1691.sh b/tests/grib_ecc-1691.sh index 6d76a90b0..679732587 100755 --- a/tests/grib_ecc-1691.sh +++ b/tests/grib_ecc-1691.sh @@ -43,7 +43,7 @@ grib_check_key_equals $temp_grib_a "dataset,datasetVersion,datasetActivity,datas ${tools_dir}/grib_set -s dataset=1,datasetVersion=2,datasetActivity=1,datasetExperiment=1,model=2 $destine_sample $temp_grib_a grib_check_key_equals $temp_grib_a "dataset,datasetVersion,datasetActivity,datasetExperiment,model" "1 2 1 1 2" -grib_check_key_equals $temp_grib_a "dataset:s,datasetVersion:s,datasetActivity:s,datasetExperiment:s,model:s" "climate-dt v20230801 CMIP6 hist IFS-NEMO" +grib_check_key_equals $temp_grib_a "dataset:s,datasetVersion:s,datasetActivity:s,datasetExperiment:s,model:s" "climate-dt v20231015 CMIP6 hist IFS-NEMO" # Check mars.date and mars.time are equal to validityDate and validityTime, and that mars.step has been unaliased result1=$( ${tools_dir}/grib_get -p mars.date,mars.time $temp_grib_a ) From fd7ea997cd6d84b9baeb0e8b89034906363e9472 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 28 Sep 2023 16:29:24 +0100 Subject: [PATCH 20/39] ECC-1691: Formatting --- definitions/grib2/products_destine.def | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/definitions/grib2/products_destine.def b/definitions/grib2/products_destine.def index 4a02a6e76..3744612d4 100644 --- a/definitions/grib2/products_destine.def +++ b/definitions/grib2/products_destine.def @@ -22,7 +22,6 @@ if(typeOfFirstFixedSurface == 103) { } # Define marsType based on type of processed data - concept marsType(unknown) { fc = { @@ -38,7 +37,6 @@ concept marsType(unknown) { "2" = { typeOfProcessedData = 0; } - } alias mars.type = marsType; @@ -62,10 +60,8 @@ concept marsStream(unknown) { alias mars.stream = marsStream; -if(dataset is "climate-dt") { - -alias mars.date = validityDate; -alias mars.time = validityTime; -unalias mars.step; - +if (dataset is "climate-dt") { + alias mars.date = validityDate; + alias mars.time = validityTime; + unalias mars.step; } From 3f437f75a951e7441c6afa45ae93f8f79e986e02 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 29 Sep 2023 17:10:53 +0100 Subject: [PATCH 21/39] ECC-1691: Updates from Matt --- ...tActivity.table => destine_activity.table} | 0 .../grib2/destine_datasetVersion.table | 16 --------------- ...eriment.table => destine_experiment.table} | 0 definitions/grib2/destine_resolution.table | 4 ++++ .../grib2/local.destine.climate-dt.def | 20 ++++++++++++------- .../destine/destineOriginConcept.def | 2 +- .../destine/gridSpecificationConcept.def | 5 ++++- definitions/grib2/products_12.def | 4 +--- tests/grib_ecc-1691.sh | 12 +++++------ 9 files changed, 29 insertions(+), 34 deletions(-) rename definitions/grib2/{destine_datasetActivity.table => destine_activity.table} (100%) delete mode 100644 definitions/grib2/destine_datasetVersion.table rename definitions/grib2/{destine_datasetExperiment.table => destine_experiment.table} (100%) create mode 100644 definitions/grib2/destine_resolution.table diff --git a/definitions/grib2/destine_datasetActivity.table b/definitions/grib2/destine_activity.table similarity index 100% rename from definitions/grib2/destine_datasetActivity.table rename to definitions/grib2/destine_activity.table diff --git a/definitions/grib2/destine_datasetVersion.table b/definitions/grib2/destine_datasetVersion.table deleted file mode 100644 index 0b2efc64e..000000000 --- a/definitions/grib2/destine_datasetVersion.table +++ /dev/null @@ -1,16 +0,0 @@ -0 unknown unknown -1 v20231001 v20231001 -2 v20231015 v20231015 -3 v20231101 v20231101 -4 v20231115 v20231115 -5 v20231201 v20231201 -6 v20231215 v20231215 -7 v20240101 v20240101 -8 v20240115 v20240115 -9 v20240201 v20240201 -10 v20240215 v20240215 -11 v20240301 v20240301 -12 v20240315 v20240315 -13 v20240401 v20240401 -14 v20240415 v20240415 -65535 65535 Missing diff --git a/definitions/grib2/destine_datasetExperiment.table b/definitions/grib2/destine_experiment.table similarity index 100% rename from definitions/grib2/destine_datasetExperiment.table rename to definitions/grib2/destine_experiment.table diff --git a/definitions/grib2/destine_resolution.table b/definitions/grib2/destine_resolution.table new file mode 100644 index 000000000..cf3263497 --- /dev/null +++ b/definitions/grib2/destine_resolution.table @@ -0,0 +1,4 @@ +0 unknown unknown +1 standard Standard resolution model output with guaranteed availability +2 highres High resolution model output with limited availability +65535 65535 Missing \ No newline at end of file diff --git a/definitions/grib2/local.destine.climate-dt.def b/definitions/grib2/local.destine.climate-dt.def index 596d7a9d5..e1266ce6e 100644 --- a/definitions/grib2/local.destine.climate-dt.def +++ b/definitions/grib2/local.destine.climate-dt.def @@ -1,13 +1,19 @@ # DestinE MARS ClimateDT keywords -codetable[2] datasetVersion "grib2/destine_datasetVersion.table" : dump; -alias mars.datasetVersion = datasetVersion; +codetable[2] activity "grib2/destine_activity.table" : dump; +alias mars.activity = activity; -codetable[2] datasetActivity "grib2/destine_datasetActivity.table" : dump; -alias mars.datasetActivity = datasetActivity; +codetable[2] experiment "grib2/destine_experiment.table" : dump; +alias mars.study = experiment; -codetable[2] datasetExperiment "grib2/destine_datasetExperiment.table" : dump; -alias mars.datasetExperiment = datasetExperiment; +unsigned[1] generation = 255 : dump; +alias mars.generation = generation; codetable[2] model "grib2/destine_model.table" : dump; -alias mars.model = model; \ No newline at end of file +alias mars.model = model; + +unsigned[1] realisation = 255 : dump; +alias mars.realisation = realisation; + +codetable[2] resolution "grib2/destine_resolution.table" : dump; +alias mars.resolution = resolution; diff --git a/definitions/grib2/localConcepts/destine/destineOriginConcept.def b/definitions/grib2/localConcepts/destine/destineOriginConcept.def index 9869ef9d0..041905d77 100644 --- a/definitions/grib2/localConcepts/destine/destineOriginConcept.def +++ b/definitions/grib2/localConcepts/destine/destineOriginConcept.def @@ -6,4 +6,4 @@ "BSC" = { centre=98; subCentre=1000; } "CSC" = { centre=98; subCentre=1001; } "DKRZ" = { centre=98; subCentre=1002; } -"Climate DT consortium (CSC,BSC,AWI,MPI-M)" = { centre=98; subCentre=1003; } +"Climate DT consortium (CSC,AWI,BSC,MPI-M)" = { centre=98; subCentre=1003; } diff --git a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def index 28c7a5c47..1ae35446d 100644 --- a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def +++ b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def @@ -7,4 +7,7 @@ 'H512' = {numberOfDataPoints=3145728; gridDefinitionTemplateNumber=150; Nside=512;} 'H1024' = {numberOfDataPoints=12582912; gridDefinitionTemplateNumber=150; Nside=1024;} 'O1280' = {numberOfDataPoints=6599680; gridDefinitionTemplateNumber=40; Nj=2560;} -'O8000' = {numberOfDataPoints=256288000; gridDefinitionTemplateNumber=40; Nj=16000;} \ No newline at end of file +'O2560' = {numberOfDataPoints=26306560; gridDefinitionTemplateNumber=40; Nj=5120;} +'O8000' = {numberOfDataPoints=256288000; gridDefinitionTemplateNumber=40; Nj=16000;} +'F90' = {numberOfDataPoints=65160; gridDefinitionTemplateNumber=0; Ni=360; Nj=181; } +'F360' = {numberOfDataPoints=1038240; gridDefinitionTemplateNumber=0; Ni=1440; Nj=721; } diff --git a/definitions/grib2/products_12.def b/definitions/grib2/products_12.def index 569b90b65..35c5f909c 100644 --- a/definitions/grib2/products_12.def +++ b/definitions/grib2/products_12.def @@ -2,6 +2,4 @@ # Destination Earth (DestinE) -constant marsClass = 'd1'; - -include "grib2/products_destine.def" \ No newline at end of file +include "grib2/products_destine.def" diff --git a/tests/grib_ecc-1691.sh b/tests/grib_ecc-1691.sh index 679732587..31d02884d 100755 --- a/tests/grib_ecc-1691.sh +++ b/tests/grib_ecc-1691.sh @@ -27,7 +27,7 @@ tablesVersionLatest=$( ${tools_dir}/grib_get -p tablesVersionLatest $sample_grib ${tools_dir}/grib_set -s tablesVersion=$tablesVersionLatest,setLocalDefinition=1,grib2LocalSectionNumber=1 $sample_grib2 $temp_grib_a # Then change to processed data = 12 --> DestinE -${tools_dir}/grib_set -s productionStatusOfProcessedData=12 $temp_grib_a $destine_sample +${tools_dir}/grib_set -s productionStatusOfProcessedData=12,class=d1 $temp_grib_a $destine_sample # Check DestinE base related keys are present and correct grib_check_key_exists $destine_sample destineLocalVersion,dataset,marsClass,marsType,marsStream,experimentVersionNumber @@ -36,14 +36,14 @@ grib_check_key_equals $destine_sample "marsClass,dataset,destineLocalVersion" "d # Check setting dataset to climate-dt (1). Check keys are present and equal defaults ${tools_dir}/grib_set -s dataset=1 $destine_sample $temp_grib_a -grib_check_key_exists $temp_grib_a dataset,datasetVersion,datasetActivity,datasetExperiment,model -grib_check_key_equals $temp_grib_a "dataset,datasetVersion,datasetActivity,datasetExperiment,model" "1 0 0 0 0" +grib_check_key_exists $temp_grib_a dataset,generation,activity,experiment,model,realisation,resolution +grib_check_key_equals $temp_grib_a "dataset,generation,activity,experiment,model,realisation,resolution" "1 255 0 0 0 255 0" # Check an example where a few additional things are set in climate-dt -${tools_dir}/grib_set -s dataset=1,datasetVersion=2,datasetActivity=1,datasetExperiment=1,model=2 $destine_sample $temp_grib_a +${tools_dir}/grib_set -s dataset=1,generation=2,activity=1,experiment=1,model=2,realisation=1,resolution=1 $destine_sample $temp_grib_a -grib_check_key_equals $temp_grib_a "dataset,datasetVersion,datasetActivity,datasetExperiment,model" "1 2 1 1 2" -grib_check_key_equals $temp_grib_a "dataset:s,datasetVersion:s,datasetActivity:s,datasetExperiment:s,model:s" "climate-dt v20231015 CMIP6 hist IFS-NEMO" +grib_check_key_equals $temp_grib_a "dataset,generation,activity,experiment,model,realisation,resolution" "1 2 1 1 2 1 1" +grib_check_key_equals $temp_grib_a "dataset:s,activity:s,experiment:s,model:s,resolution:s" "climate-dt CMIP6 hist IFS-NEMO standard" # Check mars.date and mars.time are equal to validityDate and validityTime, and that mars.step has been unaliased result1=$( ${tools_dir}/grib_get -p mars.date,mars.time $temp_grib_a ) From dc9067994b6b01328626665a59c984298ed6573b Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Mon, 9 Oct 2023 14:14:43 +0000 Subject: [PATCH 22/39] Added medium resolution to code table --- definitions/grib2/destine_resolution.table | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/definitions/grib2/destine_resolution.table b/definitions/grib2/destine_resolution.table index cf3263497..30e347f44 100644 --- a/definitions/grib2/destine_resolution.table +++ b/definitions/grib2/destine_resolution.table @@ -1,4 +1,5 @@ 0 unknown unknown 1 standard Standard resolution model output with guaranteed availability -2 highres High resolution model output with limited availability +2 mediumres Medium resolution model output with limited availability +3 highres High resolution model output with limited availability 65535 65535 Missing \ No newline at end of file From 979b52fb05385faec9988b367d894e9059973849 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 9 Oct 2023 16:56:40 +0100 Subject: [PATCH 23/39] ECC-1691: Remove future entries from GRIB2 table version 31 --- definitions/grib2/tables/31/1.3.table | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/definitions/grib2/tables/31/1.3.table b/definitions/grib2/tables/31/1.3.table index 26005a4d0..5e2e59087 100644 --- a/definitions/grib2/tables/31/1.3.table +++ b/definitions/grib2/tables/31/1.3.table @@ -11,8 +11,6 @@ 9 9 Uncertainties in Ensembles of Regional ReAnalyses project test (UERRA) 10 10 Copernicus regional reanalysis (CARRA/CERRA) 11 11 Copernicus regional reanalysis test (CARRA/CERRA) -12 12 Destination Earth (DestinE) -13 13 Destination Earth test (DestinE) -# 14-191 Reserved +# 12-191 Reserved # 192-254 Reserved for local use 255 255 Missing From 68d8bc0b1aa1dcaac2bcf9ae758b486a83a07848 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Mon, 9 Oct 2023 16:52:05 +0000 Subject: [PATCH 24/39] ECC-1691: Fixed a typo and reverted some changes --- definitions/grib2/destine_resolution.table | 5 ++--- definitions/grib2/local.destine.climate-dt.def | 2 +- definitions/grib2/tables/31/1.3.table | 4 +--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/definitions/grib2/destine_resolution.table b/definitions/grib2/destine_resolution.table index 30e347f44..48d816018 100644 --- a/definitions/grib2/destine_resolution.table +++ b/definitions/grib2/destine_resolution.table @@ -1,5 +1,4 @@ 0 unknown unknown -1 standard Standard resolution model output with guaranteed availability -2 mediumres Medium resolution model output with limited availability -3 highres High resolution model output with limited availability +1 standard Standard resolution model output with longer availability +2 highres High resolution model output with limited availability 65535 65535 Missing \ No newline at end of file diff --git a/definitions/grib2/local.destine.climate-dt.def b/definitions/grib2/local.destine.climate-dt.def index e1266ce6e..f66c7378d 100644 --- a/definitions/grib2/local.destine.climate-dt.def +++ b/definitions/grib2/local.destine.climate-dt.def @@ -4,7 +4,7 @@ codetable[2] activity "grib2/destine_activity.table" : dump; alias mars.activity = activity; codetable[2] experiment "grib2/destine_experiment.table" : dump; -alias mars.study = experiment; +alias mars.experiment = experiment; unsigned[1] generation = 255 : dump; alias mars.generation = generation; diff --git a/definitions/grib2/tables/31/1.3.table b/definitions/grib2/tables/31/1.3.table index 26005a4d0..5e2e59087 100644 --- a/definitions/grib2/tables/31/1.3.table +++ b/definitions/grib2/tables/31/1.3.table @@ -11,8 +11,6 @@ 9 9 Uncertainties in Ensembles of Regional ReAnalyses project test (UERRA) 10 10 Copernicus regional reanalysis (CARRA/CERRA) 11 11 Copernicus regional reanalysis test (CARRA/CERRA) -12 12 Destination Earth (DestinE) -13 13 Destination Earth test (DestinE) -# 14-191 Reserved +# 12-191 Reserved # 192-254 Reserved for local use 255 255 Missing From 6f6f431490fe45f8b08fc8938e5d9be0647c1919 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Tue, 10 Oct 2023 10:38:17 +0000 Subject: [PATCH 25/39] ECC-1691: Removed type and stream from products; We don't want to define this in products_destine; It is added in mars_labeling. --- definitions/grib2/products_destine.def | 39 -------------------------- 1 file changed, 39 deletions(-) diff --git a/definitions/grib2/products_destine.def b/definitions/grib2/products_destine.def index 3744612d4..93c8b8f9d 100644 --- a/definitions/grib2/products_destine.def +++ b/definitions/grib2/products_destine.def @@ -21,45 +21,6 @@ if(typeOfFirstFixedSurface == 103) { } } -# Define marsType based on type of processed data -concept marsType(unknown) { - - fc = { - typeOfProcessedData = 1; - } - "9" = { - typeOfProcessedData = 1; - } - - an = { - typeOfProcessedData = 0; - } - "2" = { - typeOfProcessedData = 0; - } -} - -alias mars.type = marsType; - -concept marsStream(unknown) { - - oper = { - productDefinitionTemplateNumber = 8; - } - oper = { - productDefinitionTemplateNumber = 0; - } - - enda = { - productDefinitionTemplateNumber = 11; - } - enda = { - productDefinitionTemplateNumber = 1; - } -} : no_copy; - -alias mars.stream = marsStream; - if (dataset is "climate-dt") { alias mars.date = validityDate; alias mars.time = validityTime; From da51abe8755e0261c1aef1ee2132f2ea9112dc4a Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Tue, 10 Oct 2023 14:33:36 +0000 Subject: [PATCH 26/39] ECC-1691: Deleted some model entries --- definitions/grib2/destine_model.table | 2 -- 1 file changed, 2 deletions(-) diff --git a/definitions/grib2/destine_model.table b/definitions/grib2/destine_model.table index e0662ac43..1e33fbac1 100644 --- a/definitions/grib2/destine_model.table +++ b/definitions/grib2/destine_model.table @@ -3,6 +3,4 @@ 2 IFS-NEMO IFS with NEMO ocean model 3 IFS-FESOM IFS with FESOM ocean model 4 ICON ICON with no ocean model -5 ICON-NEMO ICON with NEMO ocean model -6 ICON-FESOM ICON with FESOM ocean model 65535 65535 Missing From ec0fd03b6ce0ed8a00685e59b3485cc207c2e23e Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Thu, 12 Oct 2023 16:33:41 +0000 Subject: [PATCH 27/39] ECC-1691: Added mars streams and definition files; Added destine sample GRIB2 file; Modified test to account for new streams. --- definitions/grib2/products_destine.def | 8 +----- definitions/mars/grib.clim.fc.def | 4 +++ definitions/mars/grib.clmn.fc.def | 6 +++++ definitions/mars/stream.table | 2 ++ samples/destine_grib2.tmpl | Bin 0 -> 200 bytes tests/grib_ecc-1691.sh | 35 +++++++++++++++++++------ 6 files changed, 40 insertions(+), 15 deletions(-) create mode 100644 definitions/mars/grib.clim.fc.def create mode 100644 definitions/mars/grib.clmn.fc.def create mode 100644 samples/destine_grib2.tmpl diff --git a/definitions/grib2/products_destine.def b/definitions/grib2/products_destine.def index 93c8b8f9d..98788e64f 100644 --- a/definitions/grib2/products_destine.def +++ b/definitions/grib2/products_destine.def @@ -19,10 +19,4 @@ if(typeOfFirstFixedSurface == 103) { # levelist was unaliased in template.4.horizontal.def so we must have it back alias mars.levelist = level; } -} - -if (dataset is "climate-dt") { - alias mars.date = validityDate; - alias mars.time = validityTime; - unalias mars.step; -} +} \ No newline at end of file diff --git a/definitions/mars/grib.clim.fc.def b/definitions/mars/grib.clim.fc.def new file mode 100644 index 000000000..18cbc6f10 --- /dev/null +++ b/definitions/mars/grib.clim.fc.def @@ -0,0 +1,4 @@ +alias mars.date = validityDate; +alias mars.time = validityTime; +unalias mars.step; +unalias mars.domain; \ No newline at end of file diff --git a/definitions/mars/grib.clmn.fc.def b/definitions/mars/grib.clmn.fc.def new file mode 100644 index 000000000..34723b605 --- /dev/null +++ b/definitions/mars/grib.clmn.fc.def @@ -0,0 +1,6 @@ +alias mars.year = year; +alias mars.month = month; +unalias mars.date; +unalias mars.time; +unalias mars.step; +unalias mars.domain; \ No newline at end of file diff --git a/definitions/mars/stream.table b/definitions/mars/stream.table index a5d90c167..cde61acd5 100644 --- a/definitions/mars/stream.table +++ b/definitions/mars/stream.table @@ -69,6 +69,8 @@ 1095 wamf Wave monthly forecast 1096 wmfm Wave monthly forecast means 1097 smma Seasonal monthly means anomalies +1098 clim Climate run output +1099 clmn Climate run monthly means output 1110 seap Sensitive area prediction 1120 eefh Extended ensemble forecast hindcast 1121 eehs Extended ensemble forecast hindcast statistics diff --git a/samples/destine_grib2.tmpl b/samples/destine_grib2.tmpl new file mode 100644 index 0000000000000000000000000000000000000000..95154453c7d79748bd091682d633d23c1fb1607e GIT binary patch literal 200 zcmZ<{@^t$DpMi-10!{!aQAUO&1_pTsM)vE>;yertJRnI?CI&_z#mJz?z{J96U|?Vf z Date: Fri, 13 Oct 2023 11:06:11 +0000 Subject: [PATCH 28/39] ECC-1691: Validity time needs to be padded as str; --- definitions/mars/grib.clim.fc.def | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/definitions/mars/grib.clim.fc.def b/definitions/mars/grib.clim.fc.def index 18cbc6f10..f75dd3faf 100644 --- a/definitions/mars/grib.clim.fc.def +++ b/definitions/mars/grib.clim.fc.def @@ -1,4 +1,5 @@ alias mars.date = validityDate; -alias mars.time = validityTime; +meta padded_vtime sprintf("%.4d", validityTime): no_copy; +alias mars.time = padded_vtime; unalias mars.step; unalias mars.domain; \ No newline at end of file From 9d4ce9b613c63358179f6f4156455b67397bd5e5 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Fri, 13 Oct 2023 13:59:10 +0000 Subject: [PATCH 29/39] ECC-1691: Don't want origin in mars namespace --- definitions/grib2/products_destine.def | 1 - 1 file changed, 1 deletion(-) diff --git a/definitions/grib2/products_destine.def b/definitions/grib2/products_destine.def index 98788e64f..b1d0c4aee 100644 --- a/definitions/grib2/products_destine.def +++ b/definitions/grib2/products_destine.def @@ -8,7 +8,6 @@ alias parameter.name=name; alias mars.class = marsClass; alias mars.param = paramId; -alias mars.origin = centre; # Special rule for level type 103 'Specified height level above ground (m)' if(typeOfFirstFixedSurface == 103) { From e25954bc301e62a54958631b2fe44e6f59c900cb Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Fri, 13 Oct 2023 14:12:54 +0000 Subject: [PATCH 30/39] ECC-1691: Sticking to CMIP format we use US format; realisation --> realization --- definitions/grib2/local.destine.climate-dt.def | 4 ++-- tests/grib_ecc-1691.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/definitions/grib2/local.destine.climate-dt.def b/definitions/grib2/local.destine.climate-dt.def index f66c7378d..61df737fc 100644 --- a/definitions/grib2/local.destine.climate-dt.def +++ b/definitions/grib2/local.destine.climate-dt.def @@ -12,8 +12,8 @@ alias mars.generation = generation; codetable[2] model "grib2/destine_model.table" : dump; alias mars.model = model; -unsigned[1] realisation = 255 : dump; -alias mars.realisation = realisation; +unsigned[1] realization = 255 : dump; +alias mars.realization = realization; codetable[2] resolution "grib2/destine_resolution.table" : dump; alias mars.resolution = resolution; diff --git a/tests/grib_ecc-1691.sh b/tests/grib_ecc-1691.sh index 471de43ba..b02883e27 100755 --- a/tests/grib_ecc-1691.sh +++ b/tests/grib_ecc-1691.sh @@ -36,13 +36,13 @@ grib_check_key_equals $destine_sample "marsClass,dataset,destineLocalVersion" "d # Check setting dataset to climate-dt (1). Check keys are present and equal defaults ${tools_dir}/grib_set -s dataset=1 $destine_sample $temp_grib_a -grib_check_key_exists $temp_grib_a dataset,generation,activity,experiment,model,realisation,resolution -grib_check_key_equals $temp_grib_a "dataset,generation,activity,experiment,model,realisation,resolution" "1 255 0 0 0 255 0" +grib_check_key_exists $temp_grib_a dataset,generation,activity,experiment,model,realization,resolution +grib_check_key_equals $temp_grib_a "dataset,generation,activity,experiment,model,realization,resolution" "1 255 0 0 0 255 0" # Check an example where a few additional things are set in climate-dt -${tools_dir}/grib_set -s dataset=1,generation=2,activity=1,experiment=1,model=2,realisation=1,resolution=1 $destine_sample $temp_grib_a +${tools_dir}/grib_set -s dataset=1,generation=2,activity=1,experiment=1,model=2,realization=1,resolution=1 $destine_sample $temp_grib_a -grib_check_key_equals $temp_grib_a "dataset,generation,activity,experiment,model,realisation,resolution" "1 2 1 1 2 1 1" +grib_check_key_equals $temp_grib_a "dataset,generation,activity,experiment,model,realization,resolution" "1 2 1 1 2 1 1" grib_check_key_equals $temp_grib_a "dataset:s,activity:s,experiment:s,model:s,resolution:s" "climate-dt CMIP6 hist IFS-NEMO standard" # Check setting dataset to extremes-dt (2). This time we will check string also From 878b2bdb47a26c5ab5b5fd607cff4a75cd9a0429 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Fri, 13 Oct 2023 15:14:17 +0000 Subject: [PATCH 31/39] ECC-1691: Removed hyphen which fdb has issues with --- definitions/grib2/destine_dataset.table | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/definitions/grib2/destine_dataset.table b/definitions/grib2/destine_dataset.table index 58b82fc41..709cc74a2 100644 --- a/definitions/grib2/destine_dataset.table +++ b/definitions/grib2/destine_dataset.table @@ -1,5 +1,5 @@ 0 unknown unknown -1 climate-dt Climate change adaptation digital twin +1 climateDT Climate change adaptation digital twin 2 extremes-dt Weather and geophysical extremes digital twin 3 on-demand-climate-dt On-demand climate change adaptation digital twin 4 on-demand-extremes-dt On-demand weather and geophysical extremes digital twin From 64a3dc9d96846be5260f7df7167131c15eac91e8 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Fri, 13 Oct 2023 15:30:24 +0000 Subject: [PATCH 32/39] ECC-1691: Need to change climateDT related file --- .../{local.destine.climate-dt.def => local.destine.climateDT.def} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename definitions/grib2/{local.destine.climate-dt.def => local.destine.climateDT.def} (100%) diff --git a/definitions/grib2/local.destine.climate-dt.def b/definitions/grib2/local.destine.climateDT.def similarity index 100% rename from definitions/grib2/local.destine.climate-dt.def rename to definitions/grib2/local.destine.climateDT.def From 80e7e88b62a188eaf54528aa1c276da4fe79549a Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Fri, 13 Oct 2023 16:27:07 +0000 Subject: [PATCH 33/39] ECC-1691: Back to "climate-dt"; This is what we want for future, but had to change while doing fdb tests --- definitions/grib2/destine_dataset.table | 2 +- ...local.destine.climateDT.def => local.destine.climate-dt.def} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename definitions/grib2/{local.destine.climateDT.def => local.destine.climate-dt.def} (100%) diff --git a/definitions/grib2/destine_dataset.table b/definitions/grib2/destine_dataset.table index 709cc74a2..58b82fc41 100644 --- a/definitions/grib2/destine_dataset.table +++ b/definitions/grib2/destine_dataset.table @@ -1,5 +1,5 @@ 0 unknown unknown -1 climateDT Climate change adaptation digital twin +1 climate-dt Climate change adaptation digital twin 2 extremes-dt Weather and geophysical extremes digital twin 3 on-demand-climate-dt On-demand climate change adaptation digital twin 4 on-demand-extremes-dt On-demand weather and geophysical extremes digital twin diff --git a/definitions/grib2/local.destine.climateDT.def b/definitions/grib2/local.destine.climate-dt.def similarity index 100% rename from definitions/grib2/local.destine.climateDT.def rename to definitions/grib2/local.destine.climate-dt.def From 3cfccfddf6f332e7442eb26884ce9a27a403d2bb Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Mon, 16 Oct 2023 16:38:33 +0000 Subject: [PATCH 34/39] ECC-1691: Changed dash to underscores in dataset; This is because the values of these keys are used directly in the schema The fdb schema doesn't support hyphens currently --- definitions/grib2/destine_dataset.table | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/definitions/grib2/destine_dataset.table b/definitions/grib2/destine_dataset.table index 58b82fc41..4690b4bab 100644 --- a/definitions/grib2/destine_dataset.table +++ b/definitions/grib2/destine_dataset.table @@ -1,6 +1,6 @@ 0 unknown unknown -1 climate-dt Climate change adaptation digital twin -2 extremes-dt Weather and geophysical extremes digital twin -3 on-demand-climate-dt On-demand climate change adaptation digital twin -4 on-demand-extremes-dt On-demand weather and geophysical extremes digital twin +1 climate_dt Climate change adaptation digital twin +2 extremes_dt Weather and geophysical extremes digital twin +3 on_demand_climate_dt On-demand climate change adaptation digital twin +4 on_demand_extremes_dt On-demand weather and geophysical extremes digital twin 65535 65535 Missing From 0f5dde658d870e8dac1409c6e1e344e0667f7d5c Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Tue, 17 Oct 2023 08:11:45 +0000 Subject: [PATCH 35/39] ECC-1691: Tweaked test to change from "-" to "_". --- tests/grib_ecc-1691.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/grib_ecc-1691.sh b/tests/grib_ecc-1691.sh index b02883e27..f827d8108 100755 --- a/tests/grib_ecc-1691.sh +++ b/tests/grib_ecc-1691.sh @@ -33,22 +33,22 @@ ${tools_dir}/grib_set -s productionStatusOfProcessedData=12,class=d1 $temp_grib_ grib_check_key_exists $destine_sample destineLocalVersion,dataset,marsClass,marsType,marsStream,experimentVersionNumber grib_check_key_equals $destine_sample "marsClass,dataset,destineLocalVersion" "d1 0 1" -# Check setting dataset to climate-dt (1). Check keys are present and equal defaults +# Check setting dataset to climate_dt (1). Check keys are present and equal defaults ${tools_dir}/grib_set -s dataset=1 $destine_sample $temp_grib_a grib_check_key_exists $temp_grib_a dataset,generation,activity,experiment,model,realization,resolution grib_check_key_equals $temp_grib_a "dataset,generation,activity,experiment,model,realization,resolution" "1 255 0 0 0 255 0" -# Check an example where a few additional things are set in climate-dt +# Check an example where a few additional things are set in climate_dt ${tools_dir}/grib_set -s dataset=1,generation=2,activity=1,experiment=1,model=2,realization=1,resolution=1 $destine_sample $temp_grib_a grib_check_key_equals $temp_grib_a "dataset,generation,activity,experiment,model,realization,resolution" "1 2 1 1 2 1 1" -grib_check_key_equals $temp_grib_a "dataset:s,activity:s,experiment:s,model:s,resolution:s" "climate-dt CMIP6 hist IFS-NEMO standard" +grib_check_key_equals $temp_grib_a "dataset:s,activity:s,experiment:s,model:s,resolution:s" "climate_dt CMIP6 hist IFS-NEMO standard" -# Check setting dataset to extremes-dt (2). This time we will check string also +# Check setting dataset to extremes_dt (2). This time we will check string also ${tools_dir}/grib_set -s dataset=2 $destine_sample $temp_grib_a -grib_check_key_equals $temp_grib_a "dataset,dataset:s" "2 extremes-dt" +grib_check_key_equals $temp_grib_a "dataset,dataset:s" "2 extremes_dt" # Check concepts. First check default value and then example of mapping grib_check_key_exists $destine_sample destineOrigin,gridSpecification From 12a90946efa5cb107a2254e2c9d9e614c4bc0308 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Tue, 17 Oct 2023 08:56:19 +0000 Subject: [PATCH 36/39] ECC-1691: Update "-" to "_" in filename. --- ...{local.destine.climate-dt.def => local.destine.climate_dt.def} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename definitions/grib2/{local.destine.climate-dt.def => local.destine.climate_dt.def} (100%) diff --git a/definitions/grib2/local.destine.climate-dt.def b/definitions/grib2/local.destine.climate_dt.def similarity index 100% rename from definitions/grib2/local.destine.climate-dt.def rename to definitions/grib2/local.destine.climate_dt.def From 86118f33e221b245110cc06e2a41df0be4702d21 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Thu, 19 Oct 2023 13:35:31 +0000 Subject: [PATCH 37/39] ECC-1691: Changed stream name from clim to clte; This avoids confusion with climatology --- definitions/mars/{grib.clim.fc.def => grib.clte.fc.def} | 0 definitions/mars/stream.table | 2 +- tests/grib_ecc-1691.sh | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename definitions/mars/{grib.clim.fc.def => grib.clte.fc.def} (100%) diff --git a/definitions/mars/grib.clim.fc.def b/definitions/mars/grib.clte.fc.def similarity index 100% rename from definitions/mars/grib.clim.fc.def rename to definitions/mars/grib.clte.fc.def diff --git a/definitions/mars/stream.table b/definitions/mars/stream.table index cde61acd5..446d5e6b0 100644 --- a/definitions/mars/stream.table +++ b/definitions/mars/stream.table @@ -69,7 +69,7 @@ 1095 wamf Wave monthly forecast 1096 wmfm Wave monthly forecast means 1097 smma Seasonal monthly means anomalies -1098 clim Climate run output +1098 clte Climate run output 1099 clmn Climate run monthly means output 1110 seap Sensitive area prediction 1120 eefh Extended ensemble forecast hindcast diff --git a/tests/grib_ecc-1691.sh b/tests/grib_ecc-1691.sh index f827d8108..13263cb69 100755 --- a/tests/grib_ecc-1691.sh +++ b/tests/grib_ecc-1691.sh @@ -65,10 +65,10 @@ ${tools_dir}/grib_set -s numberOfDataPoints=12582912,gridDefinitionTemplateNumbe grib_check_key_equals $temp_grib_a "gridSpecification" "H1024" # Now check streams. -# Setting stream clim and type fc should set mars.date and mars.time to validityDate and validityTime, +# Setting stream clte and type fc should set mars.date and mars.time to validityDate and validityTime, # and mars.step should be unaliased -${tools_dir}/grib_set -s stream=clim,type=fc $destine_sample $temp_grib_a +${tools_dir}/grib_set -s stream=clte,type=fc $destine_sample $temp_grib_a result1=$( ${tools_dir}/grib_get -p mars.date,mars.time $temp_grib_a ) result2=$( ${tools_dir}/grib_get -p validityDate,validityTime $temp_grib_a ) From 32d3ce7b90f118a4e2ca2a76cc167330965b38de Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Fri, 20 Oct 2023 15:00:37 +0000 Subject: [PATCH 38/39] ECC-1691: Edited destineOrigin concept Small tweak to destineOrigin concept and test as aresult. --- .../destine/destineOriginConcept.def | 15 ++++++++------- tests/grib_ecc-1691.sh | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/definitions/grib2/localConcepts/destine/destineOriginConcept.def b/definitions/grib2/localConcepts/destine/destineOriginConcept.def index 041905d77..aabe1dca6 100644 --- a/definitions/grib2/localConcepts/destine/destineOriginConcept.def +++ b/definitions/grib2/localConcepts/destine/destineOriginConcept.def @@ -1,9 +1,10 @@ # Concept destineOrigin -"DWD" = { centre=98; subCentre=78; } -"MeteoFrance" = { centre=98; subCentre=84; } -"MPI-M" = { centre=98; subCentre=252; } -"AWI" = { centre=98; subCentre=253; } -"BSC" = { centre=98; subCentre=1000; } -"CSC" = { centre=98; subCentre=1001; } -"DKRZ" = { centre=98; subCentre=1002; } +"DWD" = { centre=98; subCentre=78; } +"Meteo-France" = { centre=98; subCentre=84; } +"Meteo-France" = { centre=98; subCentre=85; } +"MPI-M" = { centre=98; subCentre=252; } +"AWI" = { centre=98; subCentre=253; } +"BSC" = { centre=98; subCentre=1000; } +"CSC" = { centre=98; subCentre=1001; } +"DKRZ" = { centre=98; subCentre=1002; } "Climate DT consortium (CSC,AWI,BSC,MPI-M)" = { centre=98; subCentre=1003; } diff --git a/tests/grib_ecc-1691.sh b/tests/grib_ecc-1691.sh index 13263cb69..98578d83e 100755 --- a/tests/grib_ecc-1691.sh +++ b/tests/grib_ecc-1691.sh @@ -55,9 +55,9 @@ grib_check_key_exists $destine_sample destineOrigin,gridSpecification grib_check_key_equals $destine_sample "destineOrigin,gridSpecification" "unknown unknown" # Below mapping is for MeteoFrance -${tools_dir}/grib_set -s centre=98,subCentre=84 $destine_sample $temp_grib_a +${tools_dir}/grib_set -s centre=98,subCentre=85 $destine_sample $temp_grib_a -grib_check_key_equals $temp_grib_a "destineOrigin" "MeteoFrance" +grib_check_key_equals $temp_grib_a "destineOrigin" "Meteo-France" # Below mapping is for H1024 ${tools_dir}/grib_set -s numberOfDataPoints=12582912,gridDefinitionTemplateNumber=150,Nside=1024 $destine_sample $temp_grib_a From b94723f9ea59ee46173a06221c1fa79d7756c316 Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Tue, 24 Oct 2023 12:39:51 +0000 Subject: [PATCH 39/39] ECC-1691: Revert underscores to dashes in dataset FDB will support this by the end of the week. --- definitions/grib2/destine_dataset.table | 8 ++++---- ...ine.climate_dt.def => local.destine.climate-dt.def} | 0 tests/grib_ecc-1691.sh | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) rename definitions/grib2/{local.destine.climate_dt.def => local.destine.climate-dt.def} (100%) diff --git a/definitions/grib2/destine_dataset.table b/definitions/grib2/destine_dataset.table index 4690b4bab..58b82fc41 100644 --- a/definitions/grib2/destine_dataset.table +++ b/definitions/grib2/destine_dataset.table @@ -1,6 +1,6 @@ 0 unknown unknown -1 climate_dt Climate change adaptation digital twin -2 extremes_dt Weather and geophysical extremes digital twin -3 on_demand_climate_dt On-demand climate change adaptation digital twin -4 on_demand_extremes_dt On-demand weather and geophysical extremes digital twin +1 climate-dt Climate change adaptation digital twin +2 extremes-dt Weather and geophysical extremes digital twin +3 on-demand-climate-dt On-demand climate change adaptation digital twin +4 on-demand-extremes-dt On-demand weather and geophysical extremes digital twin 65535 65535 Missing diff --git a/definitions/grib2/local.destine.climate_dt.def b/definitions/grib2/local.destine.climate-dt.def similarity index 100% rename from definitions/grib2/local.destine.climate_dt.def rename to definitions/grib2/local.destine.climate-dt.def diff --git a/tests/grib_ecc-1691.sh b/tests/grib_ecc-1691.sh index 98578d83e..38a9a1603 100755 --- a/tests/grib_ecc-1691.sh +++ b/tests/grib_ecc-1691.sh @@ -33,22 +33,22 @@ ${tools_dir}/grib_set -s productionStatusOfProcessedData=12,class=d1 $temp_grib_ grib_check_key_exists $destine_sample destineLocalVersion,dataset,marsClass,marsType,marsStream,experimentVersionNumber grib_check_key_equals $destine_sample "marsClass,dataset,destineLocalVersion" "d1 0 1" -# Check setting dataset to climate_dt (1). Check keys are present and equal defaults +# Check setting dataset to climate-dt (1). Check keys are present and equal defaults ${tools_dir}/grib_set -s dataset=1 $destine_sample $temp_grib_a grib_check_key_exists $temp_grib_a dataset,generation,activity,experiment,model,realization,resolution grib_check_key_equals $temp_grib_a "dataset,generation,activity,experiment,model,realization,resolution" "1 255 0 0 0 255 0" -# Check an example where a few additional things are set in climate_dt +# Check an example where a few additional things are set in climate-dt ${tools_dir}/grib_set -s dataset=1,generation=2,activity=1,experiment=1,model=2,realization=1,resolution=1 $destine_sample $temp_grib_a grib_check_key_equals $temp_grib_a "dataset,generation,activity,experiment,model,realization,resolution" "1 2 1 1 2 1 1" -grib_check_key_equals $temp_grib_a "dataset:s,activity:s,experiment:s,model:s,resolution:s" "climate_dt CMIP6 hist IFS-NEMO standard" +grib_check_key_equals $temp_grib_a "dataset:s,activity:s,experiment:s,model:s,resolution:s" "climate-dt CMIP6 hist IFS-NEMO standard" -# Check setting dataset to extremes_dt (2). This time we will check string also +# Check setting dataset to extremes-dt (2). This time we will check string also ${tools_dir}/grib_set -s dataset=2 $destine_sample $temp_grib_a -grib_check_key_equals $temp_grib_a "dataset,dataset:s" "2 extremes_dt" +grib_check_key_equals $temp_grib_a "dataset,dataset:s" "2 extremes-dt" # Check concepts. First check default value and then example of mapping grib_check_key_exists $destine_sample destineOrigin,gridSpecification