-
Notifications
You must be signed in to change notification settings - Fork 161
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
Tutorial snakefile run: IndexError in simplify_network #638
Comments
Thanks @GridGrapher for reporting. This seems related to issue #554 and PR #632 ... |
@GridGrapher, thanks a lot for the detailed report! @pz-max is absolutely right, it is definitely connected with #632. Looking into it |
@GridGrapher, as a quick fix I can suggest to change value of Currently #635 is in progress which improves implementation of |
The latest commits solve the bug I was having, however now its errors on another step. INFO:pypsa.io:Imported network elec_s.nc has buses, carriers, generators, lines, loads, storage_units
WARNING:__main__:Keyword argument feature is only valid for algorithm `hac`. Given feature `solar+onwind-time` will be ignored.
Traceback (most recent call last):
File "/home/ubuntu-code/Code/pypsa-earth/.snakemake/scripts/tmpqwy8bz7j.cluster_network.py", line 736, in <module>
clustering = clustering_for_n_clusters(
File "/home/ubuntu-code/Code/pypsa-earth/.snakemake/scripts/tmpqwy8bz7j.cluster_network.py", line 582, in clustering_for_n_clusters
busmap = busmap_for_n_clusters(
File "/home/ubuntu-code/Code/pypsa-earth/.snakemake/scripts/tmpqwy8bz7j.cluster_network.py", line 477, in busmap_for_n_clusters
n_clusters = distribute_clusters(
File "/home/ubuntu-code/Code/pypsa-earth/.snakemake/scripts/tmpqwy8bz7j.cluster_network.py", line 310, in distribute_clusters
n_clusters >= len(N) and n_clusters <= N.sum()
AssertionError: Number of clusters must be 17 <= n_clusters <= 99 for this selection of countries.
n_clusters = 6
country sub_network
BJ 0 1
11 1
12 1
NG 1 83
10 1
13 1
14 1
15 1
16 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
dtype: int64 pypsa-earth/scripts/cluster_network.py Line 306 in 508f80c
Working my way through the documentation so I can understand the full scope. |
@GridGrapher it seems that your config.yaml has too little clusters. Ideally the number of clusters that you specified (6) should be sufficient. So, I am wondering if the error is that you run on an old If there is no difference, what if you set both of these value to 20 ? pypsa-earth/config.default.yaml Lines 65 to 66 in 508f80c
|
@pz-max You were right that the config was still the old one. Now that |
Checklist
main
branch or the latest release. [c408092]pypsa-earth
environment. Update viamamba env update -f envs/environment.yaml
. (Used mamba instead of conda)Describe the Bug
Trying to run snakemake on the tutorial config errors out on
jobid: 5
, specifically:IndexError: index 0 is out of bounds for axis 0 with size 0
for this line:
pypsa-earth/scripts/simplify_network.py
Line 651 in c408092
Steps to reproduce
Install following the instructions on the pypsa-earth github page
Copy config of 'config.tutorial.yaml' into 'config.yaml'
Run
snakemake -j 1 solve_all_networks
Error Message
The text was updated successfully, but these errors were encountered: