Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bc5373a
add config for nudging
Jul 2, 2026
6e13d16
update configs
Jul 2, 2026
a81103c
update config and small edits
Aug 4, 2026
6968349
update configs for nudging
Aug 4, 2026
930ef89
chore: fix pre-commit
Aug 4, 2026
9e43c40
add cross validation for nudging
Aug 5, 2026
9f48857
fix bug in dashboard plotting
Aug 5, 2026
5b88610
small edits to dashboard
Aug 6, 2026
8c4bb45
add cross validation functionality: stations grouped in all, holdin a…
Aug 7, 2026
91b4c26
update configs
Aug 11, 2026
b5c41df
change selector layout in dashboard
Aug 11, 2026
7ffe364
edit configs
Aug 20, 2026
0572149
update cross validation methodology, add filtering to jretrieve output
lclanzi Sep 7, 2026
ce68e03
Merge branch 'main' into feat/nudge-initial-condition-toward-observation
lclanzi Sep 7, 2026
3e8feb8
fix linting
lclanzi Sep 7, 2026
65e611f
restore varda-single config
lclanzi Sep 7, 2026
133e3cf
fix linting
lclanzi Sep 7, 2026
5955d8a
update configs
lclanzi Sep 10, 2026
e97998b
remove filtering from jretrieve and insert a new region (switzerland)…
lclanzi Sep 11, 2026
21e480c
Merge branch 'main' into feat/nudge-initial-condition-toward-observation
lclanzi Sep 11, 2026
24b5b02
fix linting
lclanzi Sep 11, 2026
460deea
reply reviewer comments
Sep 22, 2026
8ca4ed5
Merge branch 'main' into feat/nudge-initial-condition-toward-observation
Sep 22, 2026
f662266
fix linting
Sep 22, 2026
88ee5c7
disentangle nudging logic from station stratification
Sep 23, 2026
4d62b4c
fix linting
Sep 23, 2026
ec031eb
fix jretrieve path in config
Sep 23, 2026
4658375
remove reference to previous version in comments
Sep 25, 2026
f1cbf29
remove varda-rapid configs
lclanzi Oct 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ _dev
.vscode
.idea
.snakemake
output
output*
_sandbox/
experiment_report.html

Expand Down
158 changes: 158 additions & 0 deletions config/varda-rapid-0.2.yaml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is adding an experiment yaml really necessary for this new feature PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the yaml. I will make a separate PR with varda-rapid related configs

Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# yaml-language-server: $schema=../workflow/tools/config.schema.json
description: |
Evaluate skill of Varda-rapid against ground observations.

config_label: varda-rapid-0.2

dates:
# start: 2025-01-01T06:00
# end: 2025-12-31T06:00
# frequency: 294h
- 2025-03-01T00:00
- 2025-04-02T06:00
- 2025-07-02T12:00
- 2025-11-02T18:00

runs:
- temporal_downscaler:
checkpoint: https://service.meteoswiss.ch/mlstore#/models/sruc-m-2-interpolator/versions/3
label: Varda-rapid-0.2
steps: 0/12/1
config: resources/inference/configs/sgm-temporal-downscaler-global_trimedge_multi_with_nudging.yaml
extra_requirements:
- anemoi-datasets==0.5.35
- git+https://github.com/MeteoSwiss/anemoi-plugins-meteoswiss@0e69b5916166a7feb104f892cdf2a091bd45bd56
- git+https://github.com/ecmwf/anemoi-inference@88c1ec13632c570f246cc2580ce324e45f36a03b
forecaster:
checkpoint: https://service.meteoswiss.ch/mlstore#/models/sruc-m-1-forecaster/versions/4
config: resources/inference/configs/sgm-multidataset-forecaster-global-ich1-oper.yaml
steps: 0/12/6
extra_requirements:
- git+https://github.com/MeteoSwiss/anemoi-plugins-meteoswiss@0e69b5916166a7feb104f892cdf2a091bd45bd56
- git+https://github.com/ecmwf/anemoi-inference@88c1ec13632c570f246cc2580ce324e45f36a03b

- temporal_downscaler:
checkpoint: https://service.meteoswiss.ch/mlstore#/models/sruc-m-2-interpolator/versions/3
label: Varda-single-1.0
steps: 0/12/1
config: resources/inference/configs/sgm-temporal-downscaler-global_trimedge_multi.yaml
extra_requirements:
- anemoi-datasets==0.5.35
- git+https://github.com/MeteoSwiss/anemoi-plugins-meteoswiss@cc116a80c86346cb8de4449c1091bb2c6299a302
- git+https://github.com/ecmwf/anemoi-inference@88c1ec13632c570f246cc2580ce324e45f36a03b
forecaster:
checkpoint: https://service.meteoswiss.ch/mlstore#/models/sruc-m-1-forecaster/versions/4
config: resources/inference/configs/sgm-multidataset-forecaster-global-ich1-oper.yaml
steps: 0/12/6
extra_requirements:
- git+https://github.com/MeteoSwiss/anemoi-plugins-meteoswiss@cc116a80c86346cb8de4449c1091bb2c6299a302
- git+https://github.com/ecmwf/anemoi-inference@88c1ec13632c570f246cc2580ce324e45f36a03b

- baseline:
label: INCA
root: /store_new/mch/msclim/INCA
steps: 0/6/1
- baseline:
label: ICON-CH2-CTRL
root: /store_new/mch/msopr/osm/ICON-CH2-EPS
steps: 0/12/1
- baseline:
label: ICON-CH1-CTRL
root: /store_new/mch/msopr/osm/ICON-CH1-EPS
steps: 0/12/1

truth:
label: SwissMetNet
root: jretrievedwh:bbox=45.7,48.0,5.8,10.8;use_limitation=40

experiment:
params:
- T_2M
- TD_2M
- U_10M
- V_10M
- TOT_PREC
- PMSL
- PS
stratification:
regions:
- icon
- switzerland

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not supported in

def parse_regions():
, where is it coming from?

@lclanzi lclanzi Sep 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to perform a couple of tests, and therefore added the shapefile and support for this region. Note that this did not require any code change, but solely uploading the shapefile to the correct path

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I see, thanks, very well. Could you just make sure that the shape files have the same permissions as the other ones in that same folder?

- mittelland
- berge
- alpennordseite
- alpensuedseite
- jura
root: /store_new/mch/msopr/ml/regions/Prognoseregionen_LV95_20220517
thresholds:
TOT_PREC:
gt: [0.0, 1, 5]
U_10M:
gt: [2.5, 5.0, 10.0]
V_10M:
gt: [2.5, 5.0, 10.0]
T_2M:
lt: [273.15]
gt: [288.15, 298.15]
dashboard:
stratification:
- season
# - region
station_holdout:
- CHM
- FRE
- RUE
- BAS
- PLF
- CGI
- HOE
- PUY
- RAG
- EIN
- ALT
- GOS
- COV
- ULR
- BIN
- GUE
- ROE
- BIA
- CEV
- OTL
scoremaps:
enabled: false

showcase:
params:
- T_2M
- TD_2M
- U_10M
- V_10M
meteograms:
enabled: false
stations: [JUN, KLO, LUG, GVE] #, COV, GOR, WFJ, SAE, SAM, DAV, ZER, ANT, VSBAS, BRT, LTB, GOS, CEV, BIA]
animations:
enabled: true
frames_per_second: 0.5
domains:
# - globe
# - europe
- alps
- icon-ch
- switzerland

locations:
output_root: output/

profile:
executor: slurm
global_resources:
gpus: 16
default_resources:
slurm_partition: "normal"
cpus_per_task: 1
mem_mb_per_cpu: 1800
runtime: "1h"
gpus: 0
slurm_account: s83
jobs: 50

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this config can't be used by anyone else since in multiple instances it points to your personal folders, correct? Can we fix this? Otherwise remove the yaml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the yaml. I will make a separate PR with varda-rapid related configs

Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
runner: temporal_downscaler

input:
cutout:
- lam_0:
grib:
path: forecaster/20*
pre_processors:
- forward_transform_filter:
# does not have an effect if the temporal downscaler does not use tp as prognostic variable
rescale:
scale: 0.001 # convert from kg m-2 to m
offset: 0
param: tp
# nudge the initial condition toward station observations.
- forward_transform_filter:
retrieve_observation:
obs_path: observation/nudging_station_obs_raw.parquet
jretrieve_src_path: /scratch/mch/llanzila/sruc/evalml/src
retrieval_bbox: [40.5, 53.0, 0.0, 17.5]
# station_group: "1,2"
variables: [T_2M, TD_2M, U_10M, V_10M, TOT_PREC, PMSL, PS]
use_limitation: 40
run_mode: "devt"
station_filter_mode: domain
trim_bbox: [45.7, 48.0, 5.8, 10.8]
- forward_transform_filter:
clean_observation:
obs_path_in: observation/nudging_station_obs_raw.parquet
obs_path_out: observation/nudging_station_obs.parquet
- forward_transform_filter:
nudge_toward_observation:
Comment thread
dnerini marked this conversation as resolved.
obs_path: observation/nudging_station_obs.parquet
nudge_variables: [T_2M, TD_2M, U_10M, V_10M, PMSL, PS]
icon_grid_file: /scratch/mch/llanzila/sruc/aux_files/icon_grid_0001_R19B08_mch.nc
icon_orog_file: /scratch/mch/icontest/testing-input-data/c2sm/icon-1/external_parameter_icon_grid_0001_R19B08_mch.nc
d_eff_file: /scratch/mch/llanzila/sruc/aux_files/d_eff_cache_domain_maxdist50km_nbar50x3_bw1500m_elev50_elevdiff100_nsta1939.nc
weight_power: 2.0
max_dist: 50000.0
use_reliability_check: true
number_of_std: 5.0
reliability_min_dist_frac: 0.03
write_diagnostics: true
diagnostics_dir: nudging_diagnostics
run_mode: "devt"
namer: &namer
rules:
- - shortName: T
- t_{level}
- - shortName: U
- u_{level}
- - shortName: V
- v_{level}
- - shortName: W
- w_{level}
- - shortName: QV
- q_{level}
- - shortName: FI
- z_{level}
- - shortName: PMSL
- msl
- - shortName: FIS
- z
- - shortName: PS
- sp
- - shortName: T_2M
- 2t
- - shortName: TD_2M
- 2d
- - shortName: T_G
- skt
- - shortName: U_10M
- 10u
- - shortName: V_10M
- 10v
- - shortName: FR_LAND
- lsm
- - shortName: TOT_PREC
- tp
- global:
grib:
path: forecaster/ifs*
namer: *namer

constant_forcings:
test:
use_original_paths: true

patch_metadata: resources/sgm-temporal-downscaler-ich1-oper-patch.yaml

post_processors:
- accumulate_from_start_of_forecast: # accumulate tp from start of forecast
accumulations:
- tp
- forward_transform_filter:
rescale:
scale: 1000 # convert units from m to kg m-2
offset: 0
param: tp

output:
tee:
- grib:
path: grib/{dateTime}_{step:03}.grib
encoding:
typeOfGeneratingProcess: 2
templates:
samples: resources/templates_index_icon.yaml
post_processors:
- extract_mask: # removes global points
mask: "lam_0/cutout_mask"
as_slice: true
# here, the trimedge mask can be specified when available
# at overlap steps (multiples of the forecaster stride) replace the
# re-predicted prognostics with the forecaster's boundary values
- forward_transform_filter:
copy-prognostic-from-forecaster:
forecaster_path: forecaster/20*
common_leadtime: 6h
params_to_keep: [tp] # NOTE, if more diagnostics are added, update accordingly.
namer: *namer

- grib:
path: grib/ifs-{dateTime}_{step:03}.grib
encoding:
typeOfGeneratingProcess: 2
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"
- forward_transform_filter:
copy-prognostic-from-forecaster:
forecaster_path: forecaster/ifs*
common_leadtime: 6h
params_to_keep: [tp] # NOTE, if more diagnostics are added, update accordingly.
namer: *namer
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"}

# silenced due to bug in anemoi-inference for multi-step temporal downscalers, can be removed when fixed
verbosity: 0
allow_nans: true
output_frequency: "1h"
Loading
Loading