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

H2 re-addition in sector causes error #1144

Closed
2 tasks done
yerbol-akhmetov opened this issue Oct 15, 2024 · 5 comments · Fixed by #1145
Closed
2 tasks done

H2 re-addition in sector causes error #1144

yerbol-akhmetov opened this issue Oct 15, 2024 · 5 comments · Fixed by #1145
Labels
bug Something isn't working

Comments

@yerbol-akhmetov
Copy link
Collaborator

yerbol-akhmetov commented Oct 15, 2024

Checklist

  • I am using the current main branch or the latest release. Please indicate.
  • I am running on an up-to-date pypsa-earth environment. Update via conda env update -f envs/environment.yaml.

Describe the Bug

Good day, I have faced the issue when simulation sector-coupled network for US. The error occurs in prepare_sector_network and is related to re-addition of H2 carrier. Since it can already exist in power version, it throws an error. Please see the message. This is potentially a huge issue as H2 Stores are already in the network, while prepare_sector_network tries to add H2 UHS Store. I do not know if it is intended to keep all power H2 Stores and carrier. I will try to create a draft PR on that. The same is true for battery too.

Error Message

image

@GbotemiB
Copy link
Contributor

Hi @yerbol-akhmetov, I have faced this recently. My workaround is to simply remove the stores h2 and battery. Then rerun the workflow.

@hazemakhalek
Copy link
Collaborator

@yerbol-akhmetov: I agree with @GbotemiB, this is the way to go.
The way we used the sector-coupled model before is by making sure we don't carry over H2 and battery from pypsa-earth.

If you want to implement it differently in the config file, I'm happy to review!

@yerbol-akhmetov
Copy link
Collaborator Author

Thanks, @hazemakhalek. I am actually not quite sure what approach is better. I have created a draft PR. My workaround was just adhoc to make sure to carrier (H2 and battery) is not added if it is present. I would like to know if it ok to have both H2 Store and H2 UHS Store. Or dropping mechanism needs to be implemented.

@yerbol-akhmetov
Copy link
Collaborator Author

Hi @yerbol-akhmetov, I have faced this recently. My workaround is to simply remove the stores h2 and battery. Then rerun the workflow.

Thanks, @GbotemiB. I just added if statement to not add carrier if it is present. I am not quite sure, what would be best approach. And it needs to be upstream definitely.

@hazemakhalek
Copy link
Collaborator

Thanks, @hazemakhalek. I am actually not quite sure what approach is better. I have created a draft PR. My workaround was just adhoc to make sure to carrier (H2 and battery) is not added if it is present. I would like to know if it ok to have both H2 Store and H2 UHS Store. Or dropping mechanism needs to be implemented.

In principle it's okay to have H2 storage (tanks) as well as UHS.
On a side note: we have redundant parameters in the config files for underground hydrogen storage (UHS). Maybe we need to clean that out since we're already at it.

What you implemented in principle is okay, and is more or less already tested. A cleaner way, however, is to check first if H2 is already there before trying to add it again in prepare_sector_network. I can't quickly decide if there are other considerations we need to keep in mind for this approach, I'm now mainly signaling the better approach in my opinion but it needs to be tested.

@davide-f davide-f linked a pull request Oct 29, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants