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

Tutorial example Sector-Coupled does not run through for more countries: ValueError: zero-size array to reduction operation minimum which has no identity #1153

Open
fhg-isi opened this issue Jul 12, 2024 · 0 comments
Labels

Comments

@fhg-isi
Copy link
Contributor

fhg-isi commented Jul 12, 2024

Checklist

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

Describe the Bug

I started from the sector tutorial and changed the number of countries:

countries: ['AL', 'AT', 'BA', 'BE']

When running

snakemake -call all --configfile config/test/config.overnight.yaml

I get the error below.

=> Do the selected countries need to be neighboring countries/build a continuous area? If so, please include that information in the documentation and maybe also include a check and corresponding error message in the code.

Edit

With a different set of countries the workflow succeeds: ['BE', 'DE', 'LU', 'NL']

Error Message

localrule build_industrial_production_per_country_tomorrow:
input: resources/test/industrial_production_per_country.csv
output: resources/test/industrial_production_per_country_tomorrow_2030.csv
log: logs/test/build_industrial_production_per_country_tomorrow_2030.log
jobid: 57
benchmark: benchmarks/test/build_industrial_production_per_country_tomorrow_2030
reason: Input files updated by another job: resources/test/industrial_production_per_country.csv
wildcards: planning_horizons=2030
resources: tmpdir=/tmp, mem_mb=1000, mem_mib=954

INFO:main:Removing buses with voltages Index([132.0], dtype='float64')
INFO:main:TYNDP links outside of the covered area (skipping): Biscay Gulf, Italy-France, IFA2, Italy-Montenegro, NordLink, COBRA cable, Thames Estuary Cluster (NEMO-Link), Anglo-Scottish -1, ALEGrO, North Sea Link, HVDC SuedOstLink, HVDC Line A-North, France-Alderney-Britain, Viking DKW-GB, ElecLink, Greenconnector, Hansa PowerBridge I, NorthConnect, HVDC SuedLink, AQUIND Interconnector, HVDC Ultranet, Gridlink, NeuConnect, NordBalt, Estlink 1, Greenlink, Celtic Interconnector, GiLA, HG North Tyrrhenian Corridor, HG Adriatic Corridor, SAPEI 2, HG Ionian-Tyrrhenian Corridor, HG Ionian-Tyrrhenian Corridor 2, Germany-UK Hybrid Interconnector, NU-Link Interconnector, APOLLO-LINK, Baltic WindConnector (BWC), High-Voltage Direct Current Interconnector Project Romania-Hungary, Rhine-Main-Link, Green Aegean Interconnector
INFO:main:Removing 2 unconnected network components with less than 4 buses. In total 5 buses.
ERROR:root:Uncaught exception
Traceback (most recent call last):
File "/home/projekt-resilient03/pypsa-eur-fresh/.snakemake/scripts/tmp_4adf23s.base_network.py", line 959, in
onshore_regions, offshore_regions, shapes, offshore_shapes = build_bus_shapes(
^^^^^^^^^^^^^^^^^
File "/home/projekt-resilient03/pypsa-eur-fresh/.snakemake/scripts/tmp_4adf23s.base_network.py", line 876, in build_bus_shapes
"geometry": voronoi_partition_pts(
^^^^^^^^^^^^^^^^^^^^^^
File "/home/projekt-resilient03/pypsa-eur-fresh/.snakemake/scripts/tmp_4adf23s.base_network.py", line 813, in voronoi_partition_pts
xmin, ymin = np.amin(points, axis=0)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/projekt-resilient03/conda/envs/pypsa-eur/lib/python3.11/site-packages/numpy/core/fromnumeric.py", line 2970, in amin
return _wrapreduction(a, np.minimum, 'min', axis, None, out,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/projekt-resilient03/conda/envs/pypsa-eur/lib/python3.11/site-packages/numpy/core/fromnumeric.py", line 88, in wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: zero-size array to reduction operation minimum which has no identity
RuleException:
CalledProcessError in file /home/projekt-resilient03/pypsa-eur-fresh/rules/build_electricity.smk, line 102:
Command 'set -euo pipefail; /home/projekt-resilient03/conda/envs/pypsa-eur/bin/python3.11 /home/projekt-resilient03/pypsa-eur-fresh/.snakemake/scripts/tmp_4adf23s.base_network.py' returned non-zero exit status 1.
[Fri Jul 12 15:44:31 2024]
Error in rule base_network:
jobid: 6
input: data/entsoegridkit/buses.csv, data/entsoegridkit/lines.csv, data/entsoegridkit/links.csv, data/entsoegridkit/converters.csv, data/entsoegridkit/transformers.csv, data/parameter_corrections.yaml, data/links_p_nom.csv, data/links_tyndp.csv, resources/test/country_shapes.geojson, resources/test/offshore_shapes.geojson, resources/test/europe_shape.geojson
output: resources/test/networks/base.nc, resources/test/regions_onshore.geojson, resources/test/regions_offshore.geojson
log: logs/test/base_network.log (check log file(s) for error details)
conda-env: /home/projekt-resilient03/pypsa-eur-fresh/.snakemake/conda/ce8d80d23b65556b2a1d396d82587950

[Fri Jul 12 15:44:31 2024]
Finished job 25.
3 of 56 steps (5%) done
[Fri Jul 12 15:44:32 2024]
Finished job 53.
4 of 56 steps (7%) done
[Fri Jul 12 15:44:33 2024]
Finished job 57.
5 of 56 steps (9%) done
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake/log/2024-07-12T154423.027912.snakemake.log
WorkflowError:
At least one job did not complete successfully.

@fhg-isi fhg-isi added the bug label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant