Repository navigation
Add diagnostic windgust (support for multi-datasets) #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
radiradev
wants to merge
10
commits into
main
Choose a base branch
from
feat/diagnostic-decoders
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
28a15b4
Add realv2 (diagnostic VMAX_10M) multi-output forecaster showcase
radiradev cc5b467
cleanup
radiradev b423285
showcase runs
radiradev 1578e13
verif working
radiradev d357202
add peakweather comparison
radiradev cdfaeb1
Merge remote-tracking branch 'origin/main' into feat/diagnostic-decoders
radiradev 42c5717
Add CAPE_MU secondary decoder support and improve inference robustness
andreaspauling 4a956e5
Adapt inference_execute for Linard: squashfs-mount -s flag and srun o…
andreaspauling 11a532e
Add CAPE_MU secondary decoder support for showcase (and improve infer…
andreaspauling ab1a9e4
Add TOT_PREC aggregated param support and m-to-mm conversion for show…
andreaspauling File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # yaml-language-server: $schema=../workflow/tools/config.schema.json | ||
| description: | | ||
| Test run for the multi-output "secondary_decoder" anemoi architecture (ICON-CH1 | ||
| cutout forecaster with a diagnostic CAPE_MU stream on the ICON-CH1 1km grid). | ||
|
|
||
| dates: | ||
| start: 2025-08-15T00:00 | ||
| end: 2025-08-16T00:00 | ||
| frequency: 24h | ||
|
|
||
| runs: | ||
| - forecaster: | ||
| checkpoint: /scratch/mch/mbosch/devml/varda-forecaster-single-extra_decoders/data/output/checkpoint/a7e9ca1add4e4da8b1034f277e8d0681/inference-last.ckpt | ||
| label: cape_mu_bounded | ||
| steps: 0/24/6 | ||
| config: resources/inference/configs/sgm-multidataset-forecaster-cape-ich1.yaml | ||
| extra_requirements: | ||
| - "anemoi-inference @ git+https://github.com/martibosch/anemoi-inference@8c870ae7" | ||
| - anemoi-transform>=0.4.1 | ||
|
|
||
| - baseline: | ||
| label: ICON-CH1-ctrl | ||
| root: /store_new/mch/msopr/osm/ICON-CH1-EPS | ||
| steps: 0/24/6 | ||
|
|
||
| truth: | ||
| label: KENDA-CH1 | ||
| root: /store_new/mch/msopr/ml/datasets/mch-ich1-1km-2024-2025-1h-pl13-ifsnames-v1.0.zarr | ||
|
|
||
| experiment: | ||
| params: | ||
| - CAPE_MU | ||
| stratification: | ||
| regions: | ||
| - jura | ||
| root: /scratch/mch/bhendj/regions/Prognoseregionen_LV95_20220517 | ||
| thresholds: | ||
| CAPE_MU: | ||
| gt: [100.0, 500.0, 1000.0] | ||
| dashboard: | ||
| stratification: | ||
| - season | ||
|
|
||
| locations: | ||
| output_root: output/ | ||
|
|
||
| profile: | ||
| executor: slurm | ||
| global_resources: | ||
| gpus: 16 | ||
| default_resources: | ||
| slurm_partition: "postproc" | ||
| cpus_per_task: 1 | ||
| mem_mb_per_cpu: 1800 | ||
| runtime: "1h" | ||
| gpus: 0 | ||
| jobs: 50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| # yaml-language-server: $schema=../workflow/tools/config.schema.json | ||
| description: | | ||
| As windgust.yaml (realv2 VMAX_10M showcase), but verifies against PeakWeather | ||
| station observations instead of the REAL-CH1 gridded analysis. | ||
|
|
||
| # One week of daily initialisations for verification. | ||
| dates: | ||
| start: 2024-02-01T00:00 | ||
| end: 2024-02-07T00:00 | ||
| frequency: 24h | ||
|
|
||
| runs: | ||
| - forecaster: | ||
| checkpoint: /scratch/mch/rradev/output/checkpoint/9efa01f8c7464328897edb2c03a407c2/inference-last.ckpt | ||
| label: realv2_vmax10m | ||
| steps: 0/120/6 | ||
| config: resources/inference/configs/sgm-multidataset-forecaster-windgust-ich1.yaml | ||
| extra_requirements: | ||
| # checkpoint needs: (1) EmptyInput.create_input_state propagates the date | ||
| # (else KeyError 'date' in add_initial_forcings_to_input_state for the | ||
| - git+https://github.com/radiradev/anemoi-inference.git@fix/empty-input-propagate-date | ||
|
|
||
| - eccodes==2.39.1 | ||
| - eccodes-cosmo-resources-python==2.38.3.1 | ||
|
|
||
| - baseline: | ||
| label: ICON-CH1-ctrl | ||
| root: /store_new/mch/msopr/osm/ICON-CH1-EPS | ||
| steps: 0/33/6 | ||
|
|
||
| truth: | ||
| label: PeakWeather | ||
| root: output/data/observations/peakweather | ||
|
|
||
| experiment: | ||
| params: | ||
| - VMAX_10M | ||
| stratification: | ||
| regions: | ||
| - jura | ||
| - mittelland | ||
| - voralpen | ||
| - alpennordhang | ||
| - innerealpentaeler | ||
| - alpensuedseite | ||
| root: /scratch/mch/bhendj/regions/Prognoseregionen_LV95_20220517 | ||
| thresholds: | ||
| VMAX_10M: | ||
| gt: [10.0, 20.0, 30.0] | ||
| dashboard: | ||
| stratification: | ||
| - season | ||
|
|
||
| showcase: | ||
| params: | ||
| - T_2M | ||
| - SP_10M | ||
| - VMAX_10M | ||
| meteograms: | ||
| enabled: false | ||
| stations: [JUN] | ||
| animations: | ||
| enabled: true | ||
| domains: | ||
| - icon-ch | ||
| - switzerland | ||
|
|
||
| locations: | ||
| output_root: output/ | ||
|
|
||
| profile: | ||
| executor: slurm | ||
| global_resources: | ||
| gpus: 16 | ||
| default_resources: | ||
| slurm_partition: "postproc" | ||
| cpus_per_task: 1 | ||
| mem_mb_per_cpu: 1800 | ||
| runtime: "1h" | ||
| gpus: 0 | ||
| slurm_extra: "--exclusive" # whole nodes; avoid oversubscription | ||
| jobs: 50 | ||
| batch_rules: | ||
| plot_forecast_frame: 32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| # yaml-language-server: $schema=../workflow/tools/config.schema.json | ||
| description: | | ||
| Showcase the multi-output "realv2" anemoi architecture (ICON-CH1 cutout forecaster | ||
| with a diagnostic VMAX_10M stream on the REAL-CH1 / ICON-CH1 1km grid). | ||
|
|
||
| # One week of daily initialisations for verification. | ||
| dates: | ||
| start: 2024-02-01T00:00 | ||
| end: 2024-02-07T00:00 | ||
| frequency: 24h | ||
|
|
||
| runs: | ||
| - forecaster: | ||
| checkpoint: /scratch/mch/rradev/output/checkpoint/9efa01f8c7464328897edb2c03a407c2/inference-last.ckpt | ||
| label: realv2_vmax10m | ||
| steps: 0/120/6 | ||
| config: resources/inference/configs/sgm-multidataset-forecaster-windgust-ich1.yaml | ||
| extra_requirements: | ||
| # checkpoint needs: (1) EmptyInput.create_input_state propagates the date | ||
| # (else KeyError 'date' in add_initial_forcings_to_input_state for the | ||
| - git+https://github.com/radiradev/anemoi-inference.git@fix/empty-input-propagate-date | ||
|
|
||
| - eccodes==2.39.1 | ||
| - eccodes-cosmo-resources-python==2.38.3.1 | ||
|
|
||
| - baseline: | ||
| label: ICON-CH1-ctrl | ||
| root: /store_new/mch/msopr/osm/ICON-CH1-EPS | ||
| steps: 0/33/6 | ||
|
|
||
| truth: | ||
| label: REAL-CH1 | ||
| root: /store_new/mch/msopr/ml/datasets/mch-realch1-fdb-1km-2005-2025-1h-pl13-v2.0.zarr | ||
|
|
||
| experiment: | ||
| params: | ||
| - VMAX_10M | ||
| stratification: | ||
| regions: | ||
| - jura | ||
| - mittelland | ||
| - voralpen | ||
| - alpennordhang | ||
| - innerealpentaeler | ||
| - alpensuedseite | ||
| root: /scratch/mch/bhendj/regions/Prognoseregionen_LV95_20220517 | ||
| thresholds: | ||
| VMAX_10M: | ||
| gt: [10.0, 20.0, 30.0] | ||
| dashboard: | ||
| stratification: | ||
| - season | ||
|
|
||
| showcase: | ||
| params: | ||
| - T_2M | ||
| - SP_10M | ||
| - VMAX_10M | ||
| meteograms: | ||
| enabled: false | ||
| stations: [JUN] | ||
| animations: | ||
| enabled: true | ||
| domains: | ||
| - icon-ch | ||
| - switzerland | ||
|
|
||
| locations: | ||
| output_root: output/ | ||
|
|
||
| profile: | ||
| executor: slurm | ||
| global_resources: | ||
| gpus: 16 | ||
| default_resources: | ||
| slurm_partition: "postproc" | ||
| cpus_per_task: 1 | ||
| mem_mb_per_cpu: 1800 | ||
| runtime: "1h" | ||
| gpus: 0 | ||
| slurm_extra: "--exclusive" # whole nodes; avoid oversubscription | ||
| jobs: 50 | ||
| batch_rules: | ||
| plot_forecast_frame: 32 |
87 changes: 87 additions & 0 deletions
87
resources/inference/configs/sgm-multidataset-forecaster-cape-ich1.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| lead_time: 120h | ||
| write_initial_state: true | ||
| allow_nans: true | ||
|
|
||
| env: | ||
| ANEMOI_INFERENCE_NUM_CHUNKS: 8 # OOM error if not set | ||
|
|
||
| # inputs | ||
| input: | ||
| test: | ||
| use_original_paths: true | ||
|
|
||
| output: | ||
| # Global cutout state (ICON-CH1 LAM + AIFS N320 global). | ||
| data: | ||
| tee: | ||
| - grib: | ||
| path: grib/{date}{time:04}_{step:03}.grib | ||
| encoding: | ||
| typeOfGeneratingProcess: 2 | ||
| centre: lssw | ||
| templates: | ||
| samples: resources/templates_index_icon.yaml | ||
| post_processors: | ||
| - extract_mask: # keep only LAM points | ||
| mask: "lam_0/cutout_mask" | ||
| as_slice: true | ||
| - grib: | ||
| path: grib/ifs-{date}{time:04}_{step:03}.grib | ||
| encoding: | ||
| typeOfGeneratingProcess: 2 | ||
| centre: ecmf | ||
| templates: | ||
| samples: resources/templates_index_ifs.yaml | ||
| post_processors: | ||
| - extract_mask: # removes LAM points | ||
| mask: "lam_0/cutout_mask" | ||
| as_slice: true | ||
| inverse: true | ||
| - assign_mask: # fill local/global overlapping points with nan | ||
| mask: "global/cutout_mask" | ||
| modifiers: | ||
| - patches: | ||
| - variable: | ||
| U_10M: {"param": 165, "shortName": "10u"} | ||
| 10u: {"param": 165, "shortName": "10u"} | ||
| V_10M: {"param": 166, "shortName": "10v"} | ||
| 10v: {"param": 166, "shortName": "10v"} | ||
| TD_2M: {"param": 168, "shortName": "2d"} | ||
| 2d: {"param": 168, "shortName": "2d"} | ||
| T_2M: {"param": 167, "shortName": "2t"} | ||
| 2t: {"param": 167, "shortName": "2t"} | ||
| FR_LAND: {"param": 172, "shortName": "lsm"} | ||
| lsm: {"param": 172, "shortName": "lsm"} | ||
| PMSL: {"param": 151, "shortName": "msl"} | ||
| msl: {"param": 151, "shortName": "msl"} | ||
| PS: {"param": 134, "shortName": "sp"} | ||
| sp: {"param": 134, "shortName": "sp"} | ||
| SSO_SIGMA: {"param": 163, "shortName": "slor"} | ||
| slor: {"param": 163, "shortName": "slor"} | ||
| SSO_STDH: {"param": 160, "shortName": "sdor"} | ||
| sdor: {"param": 160, "shortName": "sdor"} | ||
| TOT_PREC: {"param": 228, "shortName": "tp"} | ||
| tp: {"param": 228, "shortName": "tp"} | ||
| z: {"param": 129, "shortName": "z"} | ||
| "^q_(\\d+)$": {"param": 133, "shortName": "q"} | ||
| "^t_(\\d+)$": {"param": 130, "shortName": "t"} | ||
| "^u_(\\d+)$": {"param": 131, "shortName": "u"} | ||
| "^v_(\\d+)$": {"param": 132, "shortName": "v"} | ||
| "^w_(\\d+)$": {"param": 135, "shortName": "w"} | ||
| "^z_(\\d+)$": {"param": 129, "shortName": "z"} | ||
| # Diagnostic CAPE_MU decoder on ICON grid only | ||
| secondary_decoder: | ||
| grib: | ||
| path: grib/secondary_decoder-{date}{time:04}_{step:03}.grib | ||
| # diagnostic-only branch has no initial state fields | ||
| write_initial_state: false | ||
| encoding: | ||
| typeOfGeneratingProcess: 2 | ||
| centre: lssw | ||
| templates: | ||
| samples: resources/templates_index_realch1.yaml | ||
|
|
||
| # Remaps the `data` stream's IFS variable names (2t, 10u, tp, ...) to the COSMO | ||
| # shortNames expected by the ICON GRIB templates, and supplies CAPE_MU metadata | ||
| # for the diagnostic secondary_decoder stream. | ||
| patch_metadata: resources/sgm-cape-ich1-patch.yaml |
58 changes: 58 additions & 0 deletions
58
resources/inference/configs/sgm-multidataset-forecaster-windgust-ich1.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| lead_time: 120h | ||
| write_initial_state: true | ||
| allow_nans: true | ||
|
|
||
| env: | ||
| ANEMOI_INFERENCE_NUM_CHUNKS: 8 # OOM error if not set | ||
|
|
||
| # inputs | ||
| input: | ||
| test: | ||
| use_original_paths: true | ||
|
|
||
| output: | ||
| # Global cutout state (ICON-CH1 LAM + AIFS N320 global). | ||
| data: | ||
| tee: | ||
| - grib: | ||
| path: grib/{date}{time:04}_{step:03}.grib | ||
| encoding: | ||
| typeOfGeneratingProcess: 2 | ||
| centre: lssw | ||
| templates: | ||
| samples: resources/templates_index_icon.yaml | ||
| post_processors: | ||
| - extract_mask: # keep only LAM points | ||
| mask: "lam_0/cutout_mask" | ||
| as_slice: true | ||
| - grib: | ||
| path: grib/ifs-{date}{time:04}_{step:03}.grib | ||
| encoding: | ||
| typeOfGeneratingProcess: 2 | ||
| centre: ecmf | ||
| templates: | ||
| samples: resources/templates_index_ifs.yaml | ||
| post_processors: | ||
| - extract_mask: # removes LAM points | ||
| mask: "lam_0/cutout_mask" | ||
| as_slice: true | ||
| inverse: true | ||
| - assign_mask: # fill local/global overlapping points with nan | ||
| mask: "global/cutout_mask" | ||
| # Dianostic decoder on ICON grid only | ||
| realv2: | ||
| grib: | ||
| path: grib/realv2-{date}{time:04}_{step:03}.grib | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here too |
||
| # diagnostic is first valid at the model step (e.g. +6h) | ||
| write_initial_state: false | ||
| encoding: | ||
| typeOfGeneratingProcess: 2 | ||
| centre: lssw | ||
| templates: | ||
| samples: resources/templates_index_realch1.yaml | ||
|
|
||
| # Remaps the `data` stream's IFS variable names (2t, 10u, tp, ...) to the COSMO | ||
| # shortNames expected by the ICON GRIB templates, and gives the realv2 VMAX_10M | ||
| # diagnostic a whole-hour max period (['6h', '12h']) so its GRIB time-processing | ||
| # is encoded correctly. | ||
| patch_metadata: resources/sgm-windgust-ich1-patch.yaml | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
realv2should be called something else likesecondary_decoder