Derive weather-dependent configuration from top-level weather_year - #1941
Derive weather-dependent configuration from top-level weather_year#1941danielelerede-oet wants to merge 16 commits into
weather_year#1941Conversation
davide-f
left a comment
There was a problem hiding this comment.
Hello and thanks @danielelerede-oet !
Some merge conflicts have unfortunately arrived.
Regarding the proposal, what about keeping weather_year in load_options with optional value "derive_from_snapshots" to achieve the same goal?
This is a good point; good to keep in mind that weather_year is not too flexible depending on the data source and we can improve the documentation to improve that.
I see value in having the option to choose a different weather year to enable more customization and I see also the benefit in having the option you suggest.
How do you see having an optional non-default value like "weather_year: derive_from_snapshots" to select the weather_year from snapshots?
|
Hi @davide-f , thanks for the suggestion. I have resolved the merge conflicts for the time being, but regarding your though I agree that keeping |
|
Hi @davide-f the requested changes are ready and I updated the documentation and PR description accordingly |
Changes proposed in this Pull Request
This PR simplifies the configuration of a model run by resolving the weather year, snapshot range, and atlite cutout configuration consistently.
Previously, users had to manually keep several options aligned when changing the weather year, including:
load_options.weather_year;snapshots.startandsnapshots.end;With this PR,
load_options.weather_yearaccepts two modes:2013or2018(as it is already)derive_from_snapshotsWhen an explicit year is provided, the workflow automatically derives:
snapshots.start;snapshots.end;For example:
resolves to:
2018-01-01to2019-01-01;cutout-2018-era5;cutout: autousing the resolved cutout.Alternatively:
preserves the configured snapshot range and infers the demand weather year from
snapshots.start.Snapshot-derived weather years are only accepted when the configured range belongs to a single calendar year.
The PR also simplifies the atlite configuration by replacing:
with:
The resolved
atlite.defaultandatlite.cutoutsentries are reconstructed internally by the workflow. Legacyatlite.cutoutsandatlite.defaultconfigurations are migrated automatically toatlite.cutoutwith a deprecation warning.User impact
Users can choose which configuration should be authoritative:
load_options.weather_yearto derive an annual snapshot range and matching cutout;derive_from_snapshotsto preserve a custom snapshot range and infer the matching weather year.This removes the need to manually synchronize the demand weather year, snapshots, atlite cutout, and renewable profile configuration.
Checklist
envs/environment.yamlanddoc/requirements.txt.config.default.yamlandconfig.tutorial.yaml.test/(note tests are changing the config.tutorial.yaml)doc/configtables/*.csvand line references are adjusted indoc/user-guide/configuration.mdanddoc/tutorials/electricity-model.md.doc/assets/scripts/extract_config_snippets.pyaccordingly.configs/bundle_config.yaml.doc/release-notes.mdis amended in the format of previous release notes, including reference to the requested PR.