From ca7629f1068acf6411cb9f00a6ac265eac0b1252 Mon Sep 17 00:00:00 2001 From: Francesco Zanetta Date: Wed, 18 Feb 2026 15:15:33 +0100 Subject: [PATCH 1/4] metadata patching --- config/forecasters-ich1-oper.yaml | 3 +- config/forecasters-ich1.yaml | 4 +- .../sgm-forecaster-global-ich1-oper.yaml | 19 +- .../configs/sgm-forecaster-global-ich1.yaml | 12 +- .../sgm-ich1-oper-patch_metadata.yaml | 730 ++++++++++++++++++ .../metadata/sgm-ich1-patch_metadata.yaml | 730 ++++++++++++++++++ workflow/scripts/inference_prepare.py | 8 +- 7 files changed, 1478 insertions(+), 28 deletions(-) create mode 100644 resources/inference/metadata/sgm-ich1-oper-patch_metadata.yaml create mode 100644 resources/inference/metadata/sgm-ich1-patch_metadata.yaml diff --git a/config/forecasters-ich1-oper.yaml b/config/forecasters-ich1-oper.yaml index 5dc22fdb..8b11a1ed 100644 --- a/config/forecasters-ich1-oper.yaml +++ b/config/forecasters-ich1-oper.yaml @@ -18,11 +18,10 @@ runs: label: stage_C_icon_1km steps: 0/120/6 config: resources/inference/configs/sgm-forecaster-global-ich1-oper.yaml - disable_local_eccodes_definitions: true extra_requirements: - earthkit-utils<0.2.0 - earthkit-data<0.19.0 - - git+https://github.com/ecmwf/anemoi-inference.git@main + - git+https://github.com/ecmwf/anemoi-inference.git@feat/patch-metadata-file baselines: - baseline: diff --git a/config/forecasters-ich1.yaml b/config/forecasters-ich1.yaml index c3a51a03..98f96888 100644 --- a/config/forecasters-ich1.yaml +++ b/config/forecasters-ich1.yaml @@ -17,7 +17,7 @@ runs: extra_requirements: - earthkit-utils<0.2.0 - earthkit-data<0.19.0 - - git+https://github.com/ecmwf/anemoi-inference.git@main + - git+https://github.com/ecmwf/anemoi-inference.git@feat/patch-metadata-file - forecaster: checkpoint: /scratch/mch/apennino/output/checkpoint/973b78b8b39543949abc2b154c5f98d9/inference-last.ckpt @@ -28,7 +28,7 @@ runs: extra_requirements: - earthkit-utils<0.2.0 - earthkit-data<0.19.0 - - git+https://github.com/ecmwf/anemoi-inference.git@main + - git+https://github.com/ecmwf/anemoi-inference.git@feat/patch-metadata-file # - forecaster: # checkpoint: https://huggingface.co/met-no/bris_cloudy-skies/blob/main/2025-10/cloudy-skies-2025-10.ckpt diff --git a/resources/inference/configs/sgm-forecaster-global-ich1-oper.yaml b/resources/inference/configs/sgm-forecaster-global-ich1-oper.yaml index 7e52968e..0a8bbd06 100644 --- a/resources/inference/configs/sgm-forecaster-global-ich1-oper.yaml +++ b/resources/inference/configs/sgm-forecaster-global-ich1-oper.yaml @@ -18,14 +18,9 @@ output: path: grib/{date}{time:04}_{step:03}.grib encoding: typeOfGeneratingProcess: 2 + centre: lssw templates: - - file: - path: resources/icon-ch1-typeOfLevel=surface.grib - variables: [lsm, msl, sp, z, skt, tp] - - file: - path: resources/icon-ch1-typeOfLevel=heightAboveGround.grib - variables: [2t, 2d, 10u, 10v] - - file: resources/icon-ch1-typeOfLevel=isobaricInhPa.grib + samples: resources//templates_index_icon.yaml post_processors: - extract_mask: # removes global points mask: "lam_0/cutout_mask" @@ -34,6 +29,7 @@ output: path: grib/ifs-{date}{time:04}_{step:03}.grib encoding: typeOfGeneratingProcess: 2 + centre: ecmf templates: samples: resources/templates_index_ifs.yaml post_processors: @@ -44,11 +40,4 @@ output: - assign_mask: # fill local/global overlapping points with nan mask: "global/cutout_mask" -patch_metadata: - config: - dataloader: - test: - dataset: - cutout: - - dataset: /store_new/mch/msopr/ml/datasets/mch-ich1-1km-2024-2025-1h-pl13-ifsnames-v1.0.zarr - - dataset: /store_new/mch/msopr/ml/datasets/aifs-od-an-oper-0001-mars-n320-2016-2025-6h-v1-for-single-v2.zarr +patch_metadata: resources/sgm-ich1-oper-patch_metadata.yaml diff --git a/resources/inference/configs/sgm-forecaster-global-ich1.yaml b/resources/inference/configs/sgm-forecaster-global-ich1.yaml index 1094902b..04c01837 100644 --- a/resources/inference/configs/sgm-forecaster-global-ich1.yaml +++ b/resources/inference/configs/sgm-forecaster-global-ich1.yaml @@ -25,6 +25,9 @@ output: - file: path: resources/icon-ch1-typeOfLevel=heightAboveGround.grib variables: [2t, 2d, 10u, 10v] + - file: + path: resources/icon-ch1-typeOfLevel=meanSea.grib + variables: [msl] - file: resources/icon-ch1-typeOfLevel=isobaricInhPa.grib post_processors: - extract_mask: # removes global points @@ -44,11 +47,4 @@ output: - assign_mask: # fill local/global overlapping points with nan mask: "global/cutout_mask" -patch_metadata: - config: - dataloader: - test: - dataset: - cutout: - - dataset: /store_new/mch/msopr/ml/datasets/mch-realch1-fdb-1km-2005-2025-1h-pl13-ifsnames-v1.0.zarr - - dataset: /store_new/mch/msopr/ml/datasets/aifs-ea-an-oper-0001-mars-n320-1979-2024-6h-v1-for-single-v2.zarr +patch_metadata: resources/sgm-ich1-patch_metadata.yaml diff --git a/resources/inference/metadata/sgm-ich1-oper-patch_metadata.yaml b/resources/inference/metadata/sgm-ich1-oper-patch_metadata.yaml new file mode 100644 index 00000000..8da8a748 --- /dev/null +++ b/resources/inference/metadata/sgm-ich1-oper-patch_metadata.yaml @@ -0,0 +1,730 @@ +config: + dataloader: + test: + dataset: + cutout: + - dataset: /store_new/mch/msopr/ml/datasets/mch-ich1-1km-2024-2025-1h-pl13-ifsnames-v1.0.zarr + - dataset: /store_new/mch/msopr/ml/datasets/aifs-od-an-oper-0001-mars-n320-2016-2025-6h-v1-for-single-v2.zarr +dataset: + variables_metadata: + 10u: + mars: + date: 20050101 + levtype: sfc + param: U_10M + step: 12 + time: 0 + 10v: + mars: + date: 20050101 + levtype: sfc + param: V_10M + step: 12 + time: 0 + 2d: + mars: + date: 20050101 + levtype: sfc + param: TD_2M + step: 12 + time: 0 + 2t: + mars: + date: 20050101 + levtype: sfc + param: T_2M + step: 12 + time: 0 + cos_julian_day: + computed_forcing: true + constant_in_time: false + cos_latitude: + computed_forcing: true + constant_in_time: true + cos_local_time: + computed_forcing: true + constant_in_time: false + cos_longitude: + computed_forcing: true + constant_in_time: true + insolation: + computed_forcing: true + constant_in_time: false + lsm: + constant_in_time: true + mars: + date: 20050101 + levtype: sfc + param: FR_LAND + step: 0 + time: 12 + msl: + mars: + date: 20050101 + levtype: sfc + param: PMSL + step: 12 + time: 0 + q_100: + mars: + date: 20050101 + levelist: 100 + levtype: pl + param: QV + step: 12 + time: 0 + q_1000: + mars: + date: 20050101 + levelist: 1000 + levtype: pl + param: QV + step: 12 + time: 0 + q_150: + mars: + date: 20050101 + levelist: 150 + levtype: pl + param: QV + step: 12 + time: 0 + q_200: + mars: + date: 20050101 + levelist: 200 + levtype: pl + param: QV + step: 12 + time: 0 + q_250: + mars: + date: 20050101 + levelist: 250 + levtype: pl + param: QV + step: 12 + time: 0 + q_300: + mars: + date: 20050101 + levelist: 300 + levtype: pl + param: QV + step: 12 + time: 0 + q_400: + mars: + date: 20050101 + levelist: 400 + levtype: pl + param: QV + step: 12 + time: 0 + q_50: + mars: + date: 20050101 + levelist: 50 + levtype: pl + param: QV + step: 12 + time: 0 + q_500: + mars: + date: 20050101 + levelist: 500 + levtype: pl + param: QV + step: 12 + time: 0 + q_600: + mars: + date: 20050101 + levelist: 600 + levtype: pl + param: QV + step: 12 + time: 0 + q_700: + mars: + date: 20050101 + levelist: 700 + levtype: pl + param: QV + step: 12 + time: 0 + q_850: + mars: + date: 20050101 + levelist: 850 + levtype: pl + param: QV + step: 12 + time: 0 + q_925: + mars: + date: 20050101 + levelist: 925 + levtype: pl + param: QV + step: 12 + time: 0 + sin_julian_day: + computed_forcing: true + constant_in_time: false + sin_latitude: + computed_forcing: true + constant_in_time: true + sin_local_time: + computed_forcing: true + constant_in_time: false + sin_longitude: + computed_forcing: true + constant_in_time: true + sp: + mars: + date: 20050101 + levtype: sfc + param: PS + step: 12 + time: 0 + t_100: + mars: + date: 20050101 + levelist: 100 + levtype: pl + param: T + step: 12 + time: 0 + t_1000: + mars: + date: 20050101 + levelist: 1000 + levtype: pl + param: T + step: 12 + time: 0 + t_150: + mars: + date: 20050101 + levelist: 150 + levtype: pl + param: T + step: 12 + time: 0 + t_200: + mars: + date: 20050101 + levelist: 200 + levtype: pl + param: T + step: 12 + time: 0 + t_250: + mars: + date: 20050101 + levelist: 250 + levtype: pl + param: T + step: 12 + time: 0 + t_300: + mars: + date: 20050101 + levelist: 300 + levtype: pl + param: T + step: 12 + time: 0 + t_400: + mars: + date: 20050101 + levelist: 400 + levtype: pl + param: T + step: 12 + time: 0 + t_50: + mars: + date: 20050101 + levelist: 50 + levtype: pl + param: T + step: 12 + time: 0 + t_500: + mars: + date: 20050101 + levelist: 500 + levtype: pl + param: T + step: 12 + time: 0 + t_600: + mars: + date: 20050101 + levelist: 600 + levtype: pl + param: T + step: 12 + time: 0 + t_700: + mars: + date: 20050101 + levelist: 700 + levtype: pl + param: T + step: 12 + time: 0 + t_850: + mars: + date: 20050101 + levelist: 850 + levtype: pl + param: T + step: 12 + time: 0 + t_925: + mars: + date: 20050101 + levelist: 925 + levtype: pl + param: T + step: 12 + time: 0 + tp: + mars: + date: 20050101 + levtype: sfc + param: TOT_PREC + step: 12 + time: 0 + period: + - 6h + - 12h + process: accumulation + u_100: + mars: + date: 20050101 + levelist: 100 + levtype: pl + param: U + step: 12 + time: 0 + u_1000: + mars: + date: 20050101 + levelist: 1000 + levtype: pl + param: U + step: 12 + time: 0 + u_150: + mars: + date: 20050101 + levelist: 150 + levtype: pl + param: U + step: 12 + time: 0 + u_200: + mars: + date: 20050101 + levelist: 200 + levtype: pl + param: U + step: 12 + time: 0 + u_250: + mars: + date: 20050101 + levelist: 250 + levtype: pl + param: U + step: 12 + time: 0 + u_300: + mars: + date: 20050101 + levelist: 300 + levtype: pl + param: U + step: 12 + time: 0 + u_400: + mars: + date: 20050101 + levelist: 400 + levtype: pl + param: U + step: 12 + time: 0 + u_50: + mars: + date: 20050101 + levelist: 50 + levtype: pl + param: U + step: 12 + time: 0 + u_500: + mars: + date: 20050101 + levelist: 500 + levtype: pl + param: U + step: 12 + time: 0 + u_600: + mars: + date: 20050101 + levelist: 600 + levtype: pl + param: U + step: 12 + time: 0 + u_700: + mars: + date: 20050101 + levelist: 700 + levtype: pl + param: U + step: 12 + time: 0 + u_850: + mars: + date: 20050101 + levelist: 850 + levtype: pl + param: U + step: 12 + time: 0 + u_925: + mars: + date: 20050101 + levelist: 925 + levtype: pl + param: U + step: 12 + time: 0 + v_100: + mars: + date: 20050101 + levelist: 100 + levtype: pl + param: V + step: 12 + time: 0 + v_1000: + mars: + date: 20050101 + levelist: 1000 + levtype: pl + param: V + step: 12 + time: 0 + v_150: + mars: + date: 20050101 + levelist: 150 + levtype: pl + param: V + step: 12 + time: 0 + v_200: + mars: + date: 20050101 + levelist: 200 + levtype: pl + param: V + step: 12 + time: 0 + v_250: + mars: + date: 20050101 + levelist: 250 + levtype: pl + param: V + step: 12 + time: 0 + v_300: + mars: + date: 20050101 + levelist: 300 + levtype: pl + param: V + step: 12 + time: 0 + v_400: + mars: + date: 20050101 + levelist: 400 + levtype: pl + param: V + step: 12 + time: 0 + v_50: + mars: + date: 20050101 + levelist: 50 + levtype: pl + param: V + step: 12 + time: 0 + v_500: + mars: + date: 20050101 + levelist: 500 + levtype: pl + param: V + step: 12 + time: 0 + v_600: + mars: + date: 20050101 + levelist: 600 + levtype: pl + param: V + step: 12 + time: 0 + v_700: + mars: + date: 20050101 + levelist: 700 + levtype: pl + param: V + step: 12 + time: 0 + v_850: + mars: + date: 20050101 + levelist: 850 + levtype: pl + param: V + step: 12 + time: 0 + v_925: + mars: + date: 20050101 + levelist: 925 + levtype: pl + param: V + step: 12 + time: 0 + w_100: + mars: + date: 20050101 + levelist: 100 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_1000: + mars: + date: 20050101 + levelist: 1000 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_150: + mars: + date: 20050101 + levelist: 150 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_200: + mars: + date: 20050101 + levelist: 200 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_250: + mars: + date: 20050101 + levelist: 250 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_300: + mars: + date: 20050101 + levelist: 300 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_400: + mars: + date: 20050101 + levelist: 400 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_50: + mars: + date: 20050101 + levelist: 50 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_500: + mars: + date: 20050101 + levelist: 500 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_600: + mars: + date: 20050101 + levelist: 600 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_700: + mars: + date: 20050101 + levelist: 700 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_850: + mars: + date: 20050101 + levelist: 850 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_925: + mars: + date: 20050101 + levelist: 925 + levtype: pl + param: OMEGA + step: 12 + time: 0 + z: + constant_in_time: true + mars: + date: 20050101 + levelist: null + levtype: sfc + param: FIS + step: 0 + time: 12 + z_100: + mars: + date: 20050101 + levelist: 100 + levtype: pl + param: FI + step: 12 + time: 0 + z_1000: + mars: + date: 20050101 + levelist: 1000 + levtype: pl + param: FI + step: 12 + time: 0 + z_150: + mars: + date: 20050101 + levelist: 150 + levtype: pl + param: FI + step: 12 + time: 0 + z_200: + mars: + date: 20050101 + levelist: 200 + levtype: pl + param: FI + step: 12 + time: 0 + z_250: + mars: + date: 20050101 + levelist: 250 + levtype: pl + param: FI + step: 12 + time: 0 + z_300: + mars: + date: 20050101 + levelist: 300 + levtype: pl + param: FI + step: 12 + time: 0 + z_400: + mars: + date: 20050101 + levelist: 400 + levtype: pl + param: FI + step: 12 + time: 0 + z_50: + mars: + date: 20050101 + levelist: 50 + levtype: pl + param: FI + step: 12 + time: 0 + z_500: + mars: + date: 20050101 + levelist: 500 + levtype: pl + param: FI + step: 12 + time: 0 + z_600: + mars: + date: 20050101 + levelist: 600 + levtype: pl + param: FI + step: 12 + time: 0 + z_700: + mars: + date: 20050101 + levelist: 700 + levtype: pl + param: FI + step: 12 + time: 0 + z_850: + mars: + date: 20050101 + levelist: 850 + levtype: pl + param: FI + step: 12 + time: 0 + z_925: + mars: + date: 20050101 + levelist: 925 + levtype: pl + param: FI + step: 12 + time: 0 diff --git a/resources/inference/metadata/sgm-ich1-patch_metadata.yaml b/resources/inference/metadata/sgm-ich1-patch_metadata.yaml new file mode 100644 index 00000000..21f82701 --- /dev/null +++ b/resources/inference/metadata/sgm-ich1-patch_metadata.yaml @@ -0,0 +1,730 @@ +config: + dataloader: + test: + dataset: + cutout: + - dataset: /store_new/mch/msopr/ml/datasets/mch-realch1-fdb-1km-2005-2025-1h-pl13-ifsnames-v1.0.zarr + - dataset: /store_new/mch/msopr/ml/datasets/aifs-ea-an-oper-0001-mars-n320-1979-2024-6h-v1-for-single-v2.zarr +dataset: + variables_metadata: + 10u: + mars: + date: 20050101 + levtype: sfc + param: U_10M + step: 12 + time: 0 + 10v: + mars: + date: 20050101 + levtype: sfc + param: V_10M + step: 12 + time: 0 + 2d: + mars: + date: 20050101 + levtype: sfc + param: TD_2M + step: 12 + time: 0 + 2t: + mars: + date: 20050101 + levtype: sfc + param: T_2M + step: 12 + time: 0 + cos_julian_day: + computed_forcing: true + constant_in_time: false + cos_latitude: + computed_forcing: true + constant_in_time: true + cos_local_time: + computed_forcing: true + constant_in_time: false + cos_longitude: + computed_forcing: true + constant_in_time: true + insolation: + computed_forcing: true + constant_in_time: false + lsm: + constant_in_time: true + mars: + date: 20050101 + levtype: sfc + param: FR_LAND + step: 0 + time: 12 + msl: + mars: + date: 20050101 + levtype: sfc + param: PMSL + step: 12 + time: 0 + q_100: + mars: + date: 20050101 + levelist: 100 + levtype: pl + param: QV + step: 12 + time: 0 + q_1000: + mars: + date: 20050101 + levelist: 1000 + levtype: pl + param: QV + step: 12 + time: 0 + q_150: + mars: + date: 20050101 + levelist: 150 + levtype: pl + param: QV + step: 12 + time: 0 + q_200: + mars: + date: 20050101 + levelist: 200 + levtype: pl + param: QV + step: 12 + time: 0 + q_250: + mars: + date: 20050101 + levelist: 250 + levtype: pl + param: QV + step: 12 + time: 0 + q_300: + mars: + date: 20050101 + levelist: 300 + levtype: pl + param: QV + step: 12 + time: 0 + q_400: + mars: + date: 20050101 + levelist: 400 + levtype: pl + param: QV + step: 12 + time: 0 + q_50: + mars: + date: 20050101 + levelist: 50 + levtype: pl + param: QV + step: 12 + time: 0 + q_500: + mars: + date: 20050101 + levelist: 500 + levtype: pl + param: QV + step: 12 + time: 0 + q_600: + mars: + date: 20050101 + levelist: 600 + levtype: pl + param: QV + step: 12 + time: 0 + q_700: + mars: + date: 20050101 + levelist: 700 + levtype: pl + param: QV + step: 12 + time: 0 + q_850: + mars: + date: 20050101 + levelist: 850 + levtype: pl + param: QV + step: 12 + time: 0 + q_925: + mars: + date: 20050101 + levelist: 925 + levtype: pl + param: QV + step: 12 + time: 0 + sin_julian_day: + computed_forcing: true + constant_in_time: false + sin_latitude: + computed_forcing: true + constant_in_time: true + sin_local_time: + computed_forcing: true + constant_in_time: false + sin_longitude: + computed_forcing: true + constant_in_time: true + sp: + mars: + date: 20050101 + levtype: sfc + param: PS + step: 12 + time: 0 + t_100: + mars: + date: 20050101 + levelist: 100 + levtype: pl + param: T + step: 12 + time: 0 + t_1000: + mars: + date: 20050101 + levelist: 1000 + levtype: pl + param: T + step: 12 + time: 0 + t_150: + mars: + date: 20050101 + levelist: 150 + levtype: pl + param: T + step: 12 + time: 0 + t_200: + mars: + date: 20050101 + levelist: 200 + levtype: pl + param: T + step: 12 + time: 0 + t_250: + mars: + date: 20050101 + levelist: 250 + levtype: pl + param: T + step: 12 + time: 0 + t_300: + mars: + date: 20050101 + levelist: 300 + levtype: pl + param: T + step: 12 + time: 0 + t_400: + mars: + date: 20050101 + levelist: 400 + levtype: pl + param: T + step: 12 + time: 0 + t_50: + mars: + date: 20050101 + levelist: 50 + levtype: pl + param: T + step: 12 + time: 0 + t_500: + mars: + date: 20050101 + levelist: 500 + levtype: pl + param: T + step: 12 + time: 0 + t_600: + mars: + date: 20050101 + levelist: 600 + levtype: pl + param: T + step: 12 + time: 0 + t_700: + mars: + date: 20050101 + levelist: 700 + levtype: pl + param: T + step: 12 + time: 0 + t_850: + mars: + date: 20050101 + levelist: 850 + levtype: pl + param: T + step: 12 + time: 0 + t_925: + mars: + date: 20050101 + levelist: 925 + levtype: pl + param: T + step: 12 + time: 0 + tp: + mars: + date: 20050101 + levtype: sfc + param: TOT_PREC + step: 12 + time: 0 + period: + - 6h + - 12h + process: accumulation + u_100: + mars: + date: 20050101 + levelist: 100 + levtype: pl + param: U + step: 12 + time: 0 + u_1000: + mars: + date: 20050101 + levelist: 1000 + levtype: pl + param: U + step: 12 + time: 0 + u_150: + mars: + date: 20050101 + levelist: 150 + levtype: pl + param: U + step: 12 + time: 0 + u_200: + mars: + date: 20050101 + levelist: 200 + levtype: pl + param: U + step: 12 + time: 0 + u_250: + mars: + date: 20050101 + levelist: 250 + levtype: pl + param: U + step: 12 + time: 0 + u_300: + mars: + date: 20050101 + levelist: 300 + levtype: pl + param: U + step: 12 + time: 0 + u_400: + mars: + date: 20050101 + levelist: 400 + levtype: pl + param: U + step: 12 + time: 0 + u_50: + mars: + date: 20050101 + levelist: 50 + levtype: pl + param: U + step: 12 + time: 0 + u_500: + mars: + date: 20050101 + levelist: 500 + levtype: pl + param: U + step: 12 + time: 0 + u_600: + mars: + date: 20050101 + levelist: 600 + levtype: pl + param: U + step: 12 + time: 0 + u_700: + mars: + date: 20050101 + levelist: 700 + levtype: pl + param: U + step: 12 + time: 0 + u_850: + mars: + date: 20050101 + levelist: 850 + levtype: pl + param: U + step: 12 + time: 0 + u_925: + mars: + date: 20050101 + levelist: 925 + levtype: pl + param: U + step: 12 + time: 0 + v_100: + mars: + date: 20050101 + levelist: 100 + levtype: pl + param: V + step: 12 + time: 0 + v_1000: + mars: + date: 20050101 + levelist: 1000 + levtype: pl + param: V + step: 12 + time: 0 + v_150: + mars: + date: 20050101 + levelist: 150 + levtype: pl + param: V + step: 12 + time: 0 + v_200: + mars: + date: 20050101 + levelist: 200 + levtype: pl + param: V + step: 12 + time: 0 + v_250: + mars: + date: 20050101 + levelist: 250 + levtype: pl + param: V + step: 12 + time: 0 + v_300: + mars: + date: 20050101 + levelist: 300 + levtype: pl + param: V + step: 12 + time: 0 + v_400: + mars: + date: 20050101 + levelist: 400 + levtype: pl + param: V + step: 12 + time: 0 + v_50: + mars: + date: 20050101 + levelist: 50 + levtype: pl + param: V + step: 12 + time: 0 + v_500: + mars: + date: 20050101 + levelist: 500 + levtype: pl + param: V + step: 12 + time: 0 + v_600: + mars: + date: 20050101 + levelist: 600 + levtype: pl + param: V + step: 12 + time: 0 + v_700: + mars: + date: 20050101 + levelist: 700 + levtype: pl + param: V + step: 12 + time: 0 + v_850: + mars: + date: 20050101 + levelist: 850 + levtype: pl + param: V + step: 12 + time: 0 + v_925: + mars: + date: 20050101 + levelist: 925 + levtype: pl + param: V + step: 12 + time: 0 + w_100: + mars: + date: 20050101 + levelist: 100 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_1000: + mars: + date: 20050101 + levelist: 1000 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_150: + mars: + date: 20050101 + levelist: 150 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_200: + mars: + date: 20050101 + levelist: 200 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_250: + mars: + date: 20050101 + levelist: 250 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_300: + mars: + date: 20050101 + levelist: 300 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_400: + mars: + date: 20050101 + levelist: 400 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_50: + mars: + date: 20050101 + levelist: 50 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_500: + mars: + date: 20050101 + levelist: 500 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_600: + mars: + date: 20050101 + levelist: 600 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_700: + mars: + date: 20050101 + levelist: 700 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_850: + mars: + date: 20050101 + levelist: 850 + levtype: pl + param: OMEGA + step: 12 + time: 0 + w_925: + mars: + date: 20050101 + levelist: 925 + levtype: pl + param: OMEGA + step: 12 + time: 0 + z: + constant_in_time: true + mars: + date: 20050101 + levelist: null + levtype: sfc + param: FIS + step: 0 + time: 12 + z_100: + mars: + date: 20050101 + levelist: 100 + levtype: pl + param: FI + step: 12 + time: 0 + z_1000: + mars: + date: 20050101 + levelist: 1000 + levtype: pl + param: FI + step: 12 + time: 0 + z_150: + mars: + date: 20050101 + levelist: 150 + levtype: pl + param: FI + step: 12 + time: 0 + z_200: + mars: + date: 20050101 + levelist: 200 + levtype: pl + param: FI + step: 12 + time: 0 + z_250: + mars: + date: 20050101 + levelist: 250 + levtype: pl + param: FI + step: 12 + time: 0 + z_300: + mars: + date: 20050101 + levelist: 300 + levtype: pl + param: FI + step: 12 + time: 0 + z_400: + mars: + date: 20050101 + levelist: 400 + levtype: pl + param: FI + step: 12 + time: 0 + z_50: + mars: + date: 20050101 + levelist: 50 + levtype: pl + param: FI + step: 12 + time: 0 + z_500: + mars: + date: 20050101 + levelist: 500 + levtype: pl + param: FI + step: 12 + time: 0 + z_600: + mars: + date: 20050101 + levelist: 600 + levtype: pl + param: FI + step: 12 + time: 0 + z_700: + mars: + date: 20050101 + levelist: 700 + levtype: pl + param: FI + step: 12 + time: 0 + z_850: + mars: + date: 20050101 + levelist: 850 + levtype: pl + param: FI + step: 12 + time: 0 + z_925: + mars: + date: 20050101 + levelist: 925 + levtype: pl + param: FI + step: 12 + time: 0 diff --git a/workflow/scripts/inference_prepare.py b/workflow/scripts/inference_prepare.py index 7116ae38..c020c70b 100644 --- a/workflow/scripts/inference_prepare.py +++ b/workflow/scripts/inference_prepare.py @@ -47,7 +47,13 @@ def prepare_workdir(workdir: Path, resources_root: Path): """ workdir.mkdir(parents=True, exist_ok=True) (workdir / "grib").mkdir(parents=True, exist_ok=True) - shutil.copytree(resources_root / "templates", workdir / "resources") + (workdir / "resources").mkdir(parents=True, exist_ok=True) + shutil.copytree( + resources_root / "templates", workdir / "resources", dirs_exist_ok=True + ) + shutil.copytree( + resources_root / "metadata", workdir / "resources", dirs_exist_ok=True + ) def prepare_interpolator(smk): From 71ebe8ddb4236b77a8f32830666c3c23734330e3 Mon Sep 17 00:00:00 2001 From: Francesco Zanetta Date: Wed, 18 Feb 2026 16:01:10 +0100 Subject: [PATCH 2/4] update configs --- config/forecasters-ich1.yaml | 2 -- .../configs/sgm-forecaster-global-ich1-oper.yaml | 2 +- .../inference/configs/sgm-forecaster-global-ich1.yaml | 11 +---------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/config/forecasters-ich1.yaml b/config/forecasters-ich1.yaml index 98f96888..067930d5 100644 --- a/config/forecasters-ich1.yaml +++ b/config/forecasters-ich1.yaml @@ -13,7 +13,6 @@ runs: label: stage_C_icon_1km steps: 0/120/6 config: resources/inference/configs/sgm-forecaster-global-ich1.yaml - disable_local_eccodes_definitions: true extra_requirements: - earthkit-utils<0.2.0 - earthkit-data<0.19.0 @@ -24,7 +23,6 @@ runs: label: stage_C_icon_1km_hidden_11 steps: 0/120/6 config: resources/inference/configs/sgm-forecaster-global-ich1.yaml - disable_local_eccodes_definitions: true extra_requirements: - earthkit-utils<0.2.0 - earthkit-data<0.19.0 diff --git a/resources/inference/configs/sgm-forecaster-global-ich1-oper.yaml b/resources/inference/configs/sgm-forecaster-global-ich1-oper.yaml index 0a8bbd06..a7f4ef92 100644 --- a/resources/inference/configs/sgm-forecaster-global-ich1-oper.yaml +++ b/resources/inference/configs/sgm-forecaster-global-ich1-oper.yaml @@ -20,7 +20,7 @@ output: typeOfGeneratingProcess: 2 centre: lssw templates: - samples: resources//templates_index_icon.yaml + samples: resources/templates_index_icon.yaml post_processors: - extract_mask: # removes global points mask: "lam_0/cutout_mask" diff --git a/resources/inference/configs/sgm-forecaster-global-ich1.yaml b/resources/inference/configs/sgm-forecaster-global-ich1.yaml index 04c01837..d70d8b98 100644 --- a/resources/inference/configs/sgm-forecaster-global-ich1.yaml +++ b/resources/inference/configs/sgm-forecaster-global-ich1.yaml @@ -19,16 +19,7 @@ output: encoding: typeOfGeneratingProcess: 2 templates: - - file: - path: resources/icon-ch1-typeOfLevel=surface.grib - variables: [lsm, msl, sp, z, skt, tp] - - file: - path: resources/icon-ch1-typeOfLevel=heightAboveGround.grib - variables: [2t, 2d, 10u, 10v] - - file: - path: resources/icon-ch1-typeOfLevel=meanSea.grib - variables: [msl] - - file: resources/icon-ch1-typeOfLevel=isobaricInhPa.grib + samples: resources/templates_index_icon.yaml post_processors: - extract_mask: # removes global points mask: "lam_0/cutout_mask" From 333e3fa05e0c8465fcbc965f8d5d59555885abc9 Mon Sep 17 00:00:00 2001 From: Francesco Zanetta Date: Thu, 19 Feb 2026 10:05:30 +0100 Subject: [PATCH 3/4] use anemoi-inference@main --- config/forecasters-ich1-oper.yaml | 2 +- config/forecasters-ich1.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/forecasters-ich1-oper.yaml b/config/forecasters-ich1-oper.yaml index 8b11a1ed..fc1ae591 100644 --- a/config/forecasters-ich1-oper.yaml +++ b/config/forecasters-ich1-oper.yaml @@ -21,7 +21,7 @@ runs: extra_requirements: - earthkit-utils<0.2.0 - earthkit-data<0.19.0 - - git+https://github.com/ecmwf/anemoi-inference.git@feat/patch-metadata-file + - git+https://github.com/ecmwf/anemoi-inference.git@main baselines: - baseline: diff --git a/config/forecasters-ich1.yaml b/config/forecasters-ich1.yaml index 067930d5..b4831717 100644 --- a/config/forecasters-ich1.yaml +++ b/config/forecasters-ich1.yaml @@ -16,7 +16,7 @@ runs: extra_requirements: - earthkit-utils<0.2.0 - earthkit-data<0.19.0 - - git+https://github.com/ecmwf/anemoi-inference.git@feat/patch-metadata-file + - git+https://github.com/ecmwf/anemoi-inference.git@main - forecaster: checkpoint: /scratch/mch/apennino/output/checkpoint/973b78b8b39543949abc2b154c5f98d9/inference-last.ckpt @@ -26,7 +26,7 @@ runs: extra_requirements: - earthkit-utils<0.2.0 - earthkit-data<0.19.0 - - git+https://github.com/ecmwf/anemoi-inference.git@feat/patch-metadata-file + - git+https://github.com/ecmwf/anemoi-inference.git@main # - forecaster: # checkpoint: https://huggingface.co/met-no/bris_cloudy-skies/blob/main/2025-10/cloudy-skies-2025-10.ckpt From 33629181d1195f5957cbb1b06f27d9c99c990f29 Mon Sep 17 00:00:00 2001 From: Francesco Zanetta Date: Thu, 19 Feb 2026 11:01:50 +0100 Subject: [PATCH 4/4] TOT_PREC template hourly step --- .../templates/icon-ch1-shortName=TOT_PREC.grib | Bin 203 -> 203 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/resources/inference/templates/icon-ch1-shortName=TOT_PREC.grib b/resources/inference/templates/icon-ch1-shortName=TOT_PREC.grib index d3657efddbd5e191625f513a16dce201a89210dd..445bc8272e82d76df6d5cbc9176e57b90897c716 100644 GIT binary patch delta 11 ScmX@jc$#s-Oh(3uvkU