From fbd128f54cfd9b659ed6c3c1e9900e1a5352c1f9 Mon Sep 17 00:00:00 2001 From: Sebastien Villaume Date: Fri, 26 Jan 2024 08:47:49 +0000 Subject: [PATCH] working on model name and version mapping --- definitions/grib2/local/ecmf/parameters_extras.def | 8 ++++++++ definitions/grib2/local/ecmf/section4_extras.def | 8 ++++++++ definitions/grib2/localConcepts/ecmf/modelNameConcept.def | 8 ++++++++ .../grib2/localConcepts/ecmf/modelVersionConcept_AIFS.def | 2 ++ .../grib2/localConcepts/ecmf/modelVersionConcept_IFS.def | 2 ++ definitions/grib2/section.4.def | 4 ++++ 6 files changed, 32 insertions(+) create mode 100644 definitions/grib2/local/ecmf/parameters_extras.def create mode 100644 definitions/grib2/local/ecmf/section4_extras.def create mode 100644 definitions/grib2/localConcepts/ecmf/modelNameConcept.def create mode 100644 definitions/grib2/localConcepts/ecmf/modelVersionConcept_AIFS.def create mode 100644 definitions/grib2/localConcepts/ecmf/modelVersionConcept_IFS.def diff --git a/definitions/grib2/local/ecmf/parameters_extras.def b/definitions/grib2/local/ecmf/parameters_extras.def new file mode 100644 index 000000000..18f8c8f04 --- /dev/null +++ b/definitions/grib2/local/ecmf/parameters_extras.def @@ -0,0 +1,8 @@ +# (C) Copyright 2005- ECMWF. + +#concept modelName ("unknown", "modelNameConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; + +#if (!(modelName is "unknown")) { +# concept modelVersion ("unknown", "modelVersionConcept.[modelName].def",conceptsDir2,conceptsDir1): no_copy, dump; +# alias mars.model = modelName; +#} diff --git a/definitions/grib2/local/ecmf/section4_extras.def b/definitions/grib2/local/ecmf/section4_extras.def new file mode 100644 index 000000000..18f8c8f04 --- /dev/null +++ b/definitions/grib2/local/ecmf/section4_extras.def @@ -0,0 +1,8 @@ +# (C) Copyright 2005- ECMWF. + +#concept modelName ("unknown", "modelNameConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; + +#if (!(modelName is "unknown")) { +# concept modelVersion ("unknown", "modelVersionConcept.[modelName].def",conceptsDir2,conceptsDir1): no_copy, dump; +# alias mars.model = modelName; +#} diff --git a/definitions/grib2/localConcepts/ecmf/modelNameConcept.def b/definitions/grib2/localConcepts/ecmf/modelNameConcept.def new file mode 100644 index 000000000..6deecd5ec --- /dev/null +++ b/definitions/grib2/localConcepts/ecmf/modelNameConcept.def @@ -0,0 +1,8 @@ +'IFS' = { + backgroundProcess = 255; +} +'IFS' = { + backgroundProcess = 255; +} +'AIFS' = { + backgroundProcess = 1; diff --git a/definitions/grib2/localConcepts/ecmf/modelVersionConcept_AIFS.def b/definitions/grib2/localConcepts/ecmf/modelVersionConcept_AIFS.def new file mode 100644 index 000000000..b06e75f21 --- /dev/null +++ b/definitions/grib2/localConcepts/ecmf/modelVersionConcept_AIFS.def @@ -0,0 +1,2 @@ +'v1' = { generatingProcessIdentifier = 1; } +'v2' = { generatingProcessIdentifier = 2; } diff --git a/definitions/grib2/localConcepts/ecmf/modelVersionConcept_IFS.def b/definitions/grib2/localConcepts/ecmf/modelVersionConcept_IFS.def new file mode 100644 index 000000000..38757a209 --- /dev/null +++ b/definitions/grib2/localConcepts/ecmf/modelVersionConcept_IFS.def @@ -0,0 +1,2 @@ +'cy48r1' = { generatingProcessIdentifier = 154; } +'cy47r3' = { generatingProcessIdentifier = 153; } diff --git a/definitions/grib2/section.4.def b/definitions/grib2/section.4.def index 0c45720b1..410e7bcdc 100644 --- a/definitions/grib2/section.4.def +++ b/definitions/grib2/section.4.def @@ -77,6 +77,10 @@ if (defined(marsStream) && defined(marsType)) { template parameters "grib2/parameters.def"; + +#adding hook for local extras +template_nofail section4_extras "grib2/local/[centreForLocal]/section4_extras.def"; + # Detect if this is for Generalized vertical height coordinates if (defined(typeOfFirstFixedSurface)) { if (typeOfFirstFixedSurface == 150) {