Closed lindnemi closed 2 months ago
related to #42. @toniseibold
Maybe @fneum has some guidance on how to elegantly specify and rewrite the scenarios.yaml. Let's discuss this next week.
so the problem is that config["iiasa_database"]["scenario"] is the value specified in config.yaml, and does not get overwritten with the scenario specific value. indeed, if i don't specify it in the config.yaml the workflow just breaks instead of using the value in the scenario.yaml
it would be possible to use snakemake.wildcards.run instead of config.iiasa_database.scenario. Then the build_scenario.py might be called four times?
Changing the rule build_scenarios
It now has the input file config/scenarios_manual.yaml
which does not include configs that are taken from the iiasa database.
The rule writes a new config file config/scenarios_automated.yaml
which includes national CO2 targets and transport shares.
The file config/scenarios_automated.yaml
is empty so the user is forced to execute snakemake -call build_scenarios -f
before being able to run the workflow. It might be a good idea to add it to the .gitignore.
I'm open to any other name suggestions for the two files.
great that you already go started on this @toniseibold
i think for the naming of the yaml files we should follow the existing convention and use .
as separator:
scenarios_manual.yaml -> scenarios.manual.yaml
Avoid using snakemake.config
to ensure the scenario settings are used.
The Snakefile
now hands over parameters provided by the config_provider
function
The
build_scenario
was reading thereference_scenario
from the config.yaml, instead of the scenario.yaml. This means that most limits where identical between scenarios. This PR adresses this by reading from scenario.yaml instead and not relying on snakemake for passing run names.Some later scripts read the correct reference from scenarios.yaml (e.g., export_ariadne_variables) and some read the incorrect from the config.yaml (e.g., modify_existing_heating)