From f35c5386b7cc858ef274531fb05e829f8c22a436 Mon Sep 17 00:00:00 2001 From: Nina Burgdorfer <83002751+ninaburg@users.noreply.github.com> Date: Thu, 4 Jun 2026 12:23:24 +0200 Subject: [PATCH 1/4] Update schema and path in archive.yaml --- recipes/fdb/5.19/meta/private/fdb_config/archive.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 recipes/fdb/5.19/meta/private/fdb_config/archive.yaml diff --git a/recipes/fdb/5.19/meta/private/fdb_config/archive.yaml b/recipes/fdb/5.19/meta/private/fdb_config/archive.yaml new file mode 100644 index 00000000..904f99bc --- /dev/null +++ b/recipes/fdb/5.19/meta/private/fdb_config/archive.yaml @@ -0,0 +1,8 @@ +--- +type: local +engine: toc +schema: /user-environment/meta/recipe/meta/private/fdb_config/archive.schema +spaces: +- handler: Default + roots: + - path: /scratch/mch/sbolt/icon-archive-data-test/ From 6f3ff42c5aeb86e7c281d1dbe82b83256acdc0bb Mon Sep 17 00:00:00 2001 From: Nina Burgdorfer <83002751+ninaburg@users.noreply.github.com> Date: Thu, 4 Jun 2026 12:24:48 +0200 Subject: [PATCH 2/4] Fix indentation in archive.yaml for path entry --- recipes/fdb/5.19/meta/private/fdb_config/archive.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/fdb/5.19/meta/private/fdb_config/archive.yaml b/recipes/fdb/5.19/meta/private/fdb_config/archive.yaml index 904f99bc..3b44914a 100644 --- a/recipes/fdb/5.19/meta/private/fdb_config/archive.yaml +++ b/recipes/fdb/5.19/meta/private/fdb_config/archive.yaml @@ -5,4 +5,4 @@ schema: /user-environment/meta/recipe/meta/private/fdb_config/archive.schema spaces: - handler: Default roots: - - path: /scratch/mch/sbolt/icon-archive-data-test/ + - path: /scratch/mch/sbolt/icon-archive-data-test From 2aef15d350d23a46c7f9bd04095caa83f3d0d09f Mon Sep 17 00:00:00 2001 From: Nina Burgdorfer <83002751+ninaburg@users.noreply.github.com> Date: Thu, 4 Jun 2026 12:25:44 +0200 Subject: [PATCH 3/4] Create archive.schema --- .../meta/private/fdb_config/archive.schema | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 recipes/fdb/5.19/meta/private/fdb_config/archive.schema diff --git a/recipes/fdb/5.19/meta/private/fdb_config/archive.schema b/recipes/fdb/5.19/meta/private/fdb_config/archive.schema new file mode 100644 index 00000000..7aadd131 --- /dev/null +++ b/recipes/fdb/5.19/meta/private/fdb_config/archive.schema @@ -0,0 +1,107 @@ + +# * Format of the rules is: + +# [a1, a2, a3 ...[b1, b2, b3... [c1, c2, c3...]]] + +# - The first level (a) defines which attributes are used to name the top level directory +# - The second level (b) defines which attributes are used to name the data files +# - The third level (c) defines which attributes are used as index keys + +# * Rules can be grouped + +# [a1, a2, a3 ... +# [b1, b2, b3... [c1, c2, c3...]] +# [B1, B2, B3... [C1, C2, C3...]] +# ] + +# * A list of values can be given for an attribute +# [ ..., stream=enfo/efov, ... ] +# This will be used when matching rules. + +# * Attributes can be typed +# Globally, at the begining of this file: + +# refdate: Date; + +# or in the context of a rule: +# [type=cl, ... [date:ClimateMonth, ...]] + +# Typing attributes is done when the user's requests or the GRIB values need to be modified before directories, files and indexes are created. For example, ClimateMonth will transform 2010-04-01 to 'may' internally. + +# * Attributes can be optional +# [ step, levelist?, param ] +# They will be replaced internally by an empty value. It is also posiible to provide a default subtitution value: e.g. [domain?g] will consider the domain to be 'g' if missing. + +# * Attributes can be removed: +# [grid-] +# This is useful to remove attributes present in the GRIB that should not be ignored + +# * Rules are matched: + +# - If the attributes are present in the GRIB/Request, or marked optional or ignored +# - If a list of possible value is provided, one of them must match, for example +# [ class, expver, stream=enfo/efov, date, time, domain ] +# will match either stream=enfo or stream=efov, all other attributes will be matched if they exist in the GRIB or user's request + +# * On archive: +# - Attributes are extracted from the GRIB (namespace 'mars'), possibly modified by the attribute type +# - Only the first rule is used, so order is important +# - All GRIB attributes must be used by the rules, otherwise an error is raised + +# * On retrieve: +# - Attributes are extracted from the user's request, possibly modified by the attribute type (e.g. for handling of U/V) +# - All the matching rules are considered +# - Only attributes listed in the rules are used to extract values from the user's request + + +# Default types + +param: Param; +step: Step; +date: Date; +hdate: Date; +refdate: Date; +latitude: Double; +longitude: Double; +level: Double; +levelist: Double; +grid: Grid; +expver: Expver; + +time: Time; +fcmonth: Integer; + +number: Integer; +frequency: Integer; +direction: Integer; +channel: Integer; + +instrument: Integer; +ident: Integer; + +diagnostic: Integer; +iteration: Integer; +system: Integer; +method: Integer; + +# ??????? + +# reference: Integer; +# fcperiod: Integer; + +# opttime: Integer; +# leadtime: Integer; + +# quantile: ?????? +# range: ?????? + +# band: Integer; + + +######################################################## +# These rules must be first, otherwise fields of These +# classes will be index with the default rule for oper #expver?, model?, type? + +[ date, time, stream, class, expver, model, type + [ levtype, number? + [ step, param, levelist?, timespan?none ]]] From c8fce172c6b7d24a0578a5b9014d7a3a01a66102 Mon Sep 17 00:00:00 2001 From: Nina Burgdorfer <83002751+ninaburg@users.noreply.github.com> Date: Thu, 4 Jun 2026 13:38:58 +0200 Subject: [PATCH 4/4] Update environments.yaml --- recipes/fdb/5.19/environments.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/recipes/fdb/5.19/environments.yaml b/recipes/fdb/5.19/environments.yaml index d161412a..aea2a3ca 100644 --- a/recipes/fdb/5.19/environments.yaml +++ b/recipes/fdb/5.19/environments.yaml @@ -94,3 +94,23 @@ fdb: - ECCODES_ECKIT_GEO: "1" prepend_path: - PATH: "$@mount@/venvs/fdb/bin/" + archive: + link: roots + uenv: + prefix_paths: + LD_LIBRARY_PATH: [lib, lib64] + env_vars: + set: + - FDB_HOME: "$@view_path@" + - FDB5_HOME: "$@view_path@" + - ECKIT_HOME: "$@view_path@" + - GRIB_DEFINITION_PATH: "$@mount@/data/share/eccodes-cosmo-mars/definitions:\ + $@mount@/venvs/fdb/share/eccodes-cosmo-resources/definitions:\ + $@mount@/env/fdb/share/eccodes/definitions" + # NOTE: this assumes that the fdb config names match the view names + - FDB5_CONFIG_FILE: "$@mount@/meta/recipe/meta/private/fdb_config/$@view_name@.yaml" + - FDB_ENABLE_GRIBJUMP: "1" + - AUTO_LOAD_PLUGINS: "1" + - ECCODES_ECKIT_GEO: "1" + prepend_path: + - PATH: "$@mount@/venvs/fdb/bin/"