From debc4b674adb1460c20599b91ae044085da41bee Mon Sep 17 00:00:00 2001 From: Matthew Griffith Date: Thu, 10 Aug 2023 16:25:52 +0000 Subject: [PATCH] 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; +} +