Skip to content
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

[DNMY] Remove pre- and post- prefixes in sector coupled networks #716

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

virio-andreyana
Copy link
Collaborator

@virio-andreyana virio-andreyana commented Aug 8, 2023

Closes #708.

Changes proposed in this Pull Request

Networks that are stored in results/prenetworks are placed in resources/networks. Remove the prefix of post- and pre- to suit pypsa-eur conventions. Brownfield networks are added with the word _brownfield in their name.

Checklist

  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • A release note doc/release_notes.rst is added.

@virio-andreyana virio-andreyana marked this pull request as ready for review August 8, 2023 13:13
@FabianHofmann
Copy link
Contributor

@virio-andreyana could you add a comment to the release notes?

@FabianHofmann
Copy link
Contributor

FabianHofmann commented Aug 15, 2023

@fneum do you agree with the changes? Note that this is a breaking change (which is however necessary to my opinion)

@fneum
Copy link
Member

fneum commented Aug 15, 2023

Hmmm, while I agree that this change very nicely separates resources from results, I see one significant drawback.

It considerably limits the use of shared_resources: true, as it is no longer possible to deviate from the shared resources before prepare_sector_network, where most scenario-dependent settings are made.

For instance, if you have two config files

snakemake ... --configfile config.scenario1.yaml
snakemake ... --configfile config.scenario2.yaml

that only differ in prepare sector networks, you can't do that with shared_resources: true anymore.

@FabianHofmann
Copy link
Contributor

@fneum, thinking about it, I see the problem as very minor. Assuming that the configuration overrides only contain changes in the sector section, both the proposed version and the master branch would trigger the prepare_sector_network run on every snakemake call. The only difference is that the proposed version would not keep the result of prepare_sector_network in the resources folder, but would overwrite it once scenario2 runs. However, both calls would end up in separate result folders.

@FabianHofmann
Copy link
Contributor

@fneum, thinking about it, I see the problem as very minor. Assuming that the configuration overrides only contain changes in the sector section, both the proposed version and the master branch would trigger the prepare_sector_network run on every snakemake call. The only difference is that the proposed version would not keep the result of prepare_sector_network in the resources folder, but would overwrite it once scenario2 runs. However, both calls would end up in separate result folders.

@fneum what do you think?

@fneum
Copy link
Member

fneum commented Aug 22, 2023

Yes, that's right, but only as long as you're not using --rerun-triggers=mtime, in which case snakemake will ignore changed params and not rerun prepare_sector_network.

In the old case, if the configfiles had different run names, prepare_sector_network would be triggered in any case.

If you have everything run until right before prepare_sector_network, and you do the following two calls without waiting for the other to finish first, you could also get interference. (I am doing this a lot).

snakemake ... --configfile config.scenario1.yaml --nolock
snakemake ... --configfile config.scenario2.yaml

(this is a smaller argument as you should soon be able to do this in one call with new scenario management)

@FabianHofmann
Copy link
Contributor

Okay I see. Then, let's wait until we merge #724 and merge this one afterwards.

@fneum fneum changed the title Remove pre- and post- prefixes in sector coupled networks [DNMY] Remove pre- and post- prefixes in sector coupled networks Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove prenetworks and postnetwork directory
3 participants