add support for YAML, trying to keep XML interface
Ciao Michi,
With this commit, I can currently run the gridded-chain using both an XML file and a YAML file. A small change in the engine was necessary to activate forecasts not based on the attribute. Its activated when the forecast section within meteo exists. Within YAML we can comment out and link a forecast to a nowcast if they use the same source and variables. The provider already supports multiple forecasts now, so within a YAML domain file I am aiming for the following look (example for linking and commenting out):
meteo:
dem:
nc_file: "$AWSOME_STATIC/nwp-model-grids/euregio_inca_1km.nc"
surface_variable: "HGT_surface"
grid_coarsening: "2"
delivery: "SMET"
nowcast: &nowcast
source: "arome-tirol"
variables: "TA RH VW DW VW_MAX ISWR PSUM TAU_CLD"
# forecast:
# source: "arome-tirol"
# variables: "TA RH VW DW VW_MAX ISWR PSUM TAU_CLD"
forecast2: *nowcast
In XML, commenting out is not as nice, but at least possible, so would this solution work for you? An alternative would be to include an enable one level below the cast_type, similar to activating the postprocessing packages - see full domain file for gridded-chain below:
I ll adapt the gridded-chain tests now, then move on to the snowobs-chain. Would it be possible for you to test this branch with some of your chains to make sure that it does not break something outside of the scope of gridded, snowobs, provider, qmah?
FYI: @fherla
aws:
domain:
shape:
file: "$AWSOME_STATIC/eaws-regions/public/micro-regions/AT-07_micro-regions.geojson.json"
name: "$AWSOME_STATIC/eaws-regions/public/micro-regions_names/de.json"
gridded-chain:
run:
season_start: "2024-11-05"
season_end: "2025-05-15"
date_opera: "2024-12-31"
ncpus: "20"
distribution: "fully-distributed"
spatial_filter:
subregion_id: "AT-07-07,AT-07-25"
wkt: ""
wkt_crs: "4326"
add_polygon_coordinates: "true"
debug_mode: "0"
snowpack:
aspects: "F N E S W"
angles: "38"
flavor: "nwp"
flavor-pre: "nwp-pre"
resume: "false"
meteo:
dem:
nc_file: "$AWSOME_STATIC/nwp-model-grids/euregio_inca_1km.nc"
surface_variable: "HGT_surface"
grid_coarsening: "2"
delivery: "SMET"
nowcast: &nowcast
source: "arome-tirol"
variables: "TA RH VW DW VW_MAX ISWR PSUM TAU_CLD"
forecast:
source: "arome-tirol"
variables: "TA RH VW DW VW_MAX ISWR PSUM TAU_CLD"
forecast2: *nowcast
elevation_bands:
band:
- name: "below_threshold"
lower_limit: "0"
upper_limit: "1400"
enabled: "false"
- name: "below_treeline"
lower_limit: "1400"
upper_limit: "1900"
enabled: "true"
- name: "above_treeline"
lower_limit: "1900"
upper_limit: "3800"
enabled: "true"
output:
qmah-geojson:
enabled: "true"
time_start: "00:00"
resolution: "6"
recompute_ndays: "-7"
datetags:
enabled: "true"
by: "region"
# human_datetags: ""
dump_simplified_stratigraphy: "true"
indices: "Punstable sk38_rta lwc ccl"
add_size_estimate: "McClung2009"
aggregatepro:
enabled: "true"
daily_time: "06:00"