Following the official instruction, I still got stuck when trying to replicate the pypsa-eur tutorial case. Logs can be found below:
(pypsa-eur) hjy@mavt-esa-n105w:/mnt/c/Projects/NorthSeaSectorCoupling/PyPSA_SysModel/pypsa-eur$ snakemake -j 1 results/networks/elec_s_6_ec_lcopt_Co2L-24H.nc
Restricted license - for non-production use only - expires 2023-10-25
No parameters matching '_test' found
Building DAG of jobs...
Using shell: /usr/bin/bash
Provided cores: 1 (use --cores to define parallelism)
Rules claiming more threads will be scaled down.
Job stats:
job count min threads max threads
------------------------ ------- ------------- -------------
add_electricity 1 1 1
add_extra_components 1 1 1
build_renewable_profiles 4 1 1
build_ship_raster 1 1 1
cluster_network 1 1 1
prepare_network 1 1 1
simplify_network 1 1 1
solve_network 1 1 1
total 11 1 1
Select jobs to execute...
[Wed Sep 28 16:44:14 2022]
rule build_ship_raster:
input: data/shipdensity_global.zip, cutouts/
be-03-2013-era5.nc output: resources/
shipdensity_raster.nc log: logs/build_ship_raster.log
jobid: 14
benchmark: benchmarks/build_ship_raster
reason: Set of input files has changed since last execution
resources: tmpdir=/tmp, mem_mb=5000
/mnt/c/Projects/NorthSeaSectorCoupling/PyPSA_SysModel/pypsa-eur/.snakemake/scripts/
tmp0khija2v.build_ship_raster.py:66: DeprecationWarning: open_rasterio is Deprecated in favor of rioxarray. For information about transitioning, see:
https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html with xr.open_rasterio("shipdensity_global.tif") as ship_density:
[Wed Sep 28 16:45:10 2022]
Finished job 14.
1 of 11 steps (9%) done
Select jobs to execute...
[Wed Sep 28 16:45:10 2022]
rule build_renewable_profiles:
input: networks/
base.nc, data/bundle/corine/g250_clc06_V18_5.tif, resources/natura.tiff, resources/country_shapes.geojson, resources/offshore_shapes.geojson, resources/regions_onshore.geojson, cutouts/
be-03-2013-era5.nc output: resources/
profile_onwind.nc log: logs/build_renewable_profile_onwind.log
jobid: 6
benchmark: benchmarks/build_renewable_profiles_onwind
reason: Set of input files has changed since last execution
wildcards: technology=onwind
resources: tmpdir=/tmp, mem_mb=20000
INFO:__main__:Calculate landuse availabilities...
INFO:__main__:Completed availability calculation (160.30s)
INFO:atlite.convert:Convert and aggregate 'wind'.
INFO:atlite.convert:Convert and aggregate 'wind'.
INFO:__main__:Calculating maximal capacity per bus (method 'simple')
INFO:__main__:Calculate average distances.
[Wed Sep 28 16:47:59 2022]
Finished job 6.
2 of 11 steps (18%) done
Select jobs to execute...
[Wed Sep 28 16:47:59 2022]
rule build_renewable_profiles:
input: networks/
base.nc, data/bundle/corine/g250_clc06_V18_5.tif, resources/natura.tiff, resources/
shipdensity_raster.nc, resources/country_shapes.geojson, resources/offshore_shapes.geojson, resources/regions_offshore.geojson, cutouts/
be-03-2013-era5.nc output: resources/
profile_offwind-ac.nc log: logs/build_renewable_profile_offwind-ac.log
jobid: 13
benchmark: benchmarks/build_renewable_profiles_offwind-ac
reason: Input files updated by another job: resources/
shipdensity_raster.nc wildcards: technology=offwind-ac
resources: tmpdir=/tmp, mem_mb=20000
INFO:__main__:Calculate landuse availabilities...
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/site-packages/atlite/gis.py", line 534, in _process_func
return shape_availability_reprojected(shapes.loc[[i]], *args)[0]
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/site-packages/atlite/gis.py", line 509, in shape_availability_reprojected
masked, transform = shape_availability(geometry, excluder)
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/site-packages/atlite/gis.py", line 463, in shape_availability
exclusions = exclusions | masked_
ValueError: operands could not be broadcast together with shapes (283,246) (113,103)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/mnt/c/Projects/NorthSeaSectorCoupling/PyPSA_SysModel/pypsa-eur/.snakemake/scripts/
tmp_6if6ca0.build_renewable_profiles.py", line 286, in <module>
availability = cutout.availabilitymatrix(regions, excluder, **kwargs)
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/site-packages/atlite/gis.py", line 610, in compute_availabilitymatrix
availability = list(pool.map(_process_func, shapes.index))
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/multiprocessing/pool.py", line 367, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/multiprocessing/pool.py", line 774, in get
raise self._value
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/site-packages/atlite/gis.py", line 534, in _process_func
return shape_availability_reprojected(shapes.loc[[i]], *args)[0]
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/site-packages/atlite/gis.py", line 509, in shape_availability_reprojected
masked, transform = shape_availability(geometry, excluder)
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/site-packages/atlite/gis.py", line 463, in shape_availability
exclusions = exclusions | masked_
ValueError: operands could not be broadcast together with shapes (283,246) (113,103)
[Wed Sep 28 16:48:08 2022]
Error in rule build_renewable_profiles:
jobid: 13
output: resources/
profile_offwind-ac.nc log: logs/build_renewable_profile_offwind-ac.log (check log file(s) for error message)
RuleException:
CalledProcessErrorin line 377 of /mnt/c/Projects/NorthSeaSectorCoupling/PyPSA_SysModel/pypsa-eur/Snakefile:
Command 'set -euo pipefail; /home/hjy/miniconda3/envs/pypsa-eur/bin/python3.10 /mnt/c/Projects/NorthSeaSectorCoupling/PyPSA_SysModel/pypsa-eur/.snakemake/scripts/
tmp_6if6ca0.build_renewable_profiles.py' returned non-zero exit status 1.
File "/mnt/c/Projects/NorthSeaSectorCoupling/PyPSA_SysModel/pypsa-eur/Snakefile", line 377, in __rule_build_renewable_profiles
File "/home/hjy/miniconda3/envs/pypsa-eur/lib/python3.10/concurrent/futures/thread.py", line 58, in run
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake/log/2022-09-28T164413.458072.snakemake.log
What is the problem here? The script was run on WSL.
And what if I want to run a specific snakemake rule with wildcards specified in config.yaml, e.g. solve_network, prepare_networks, make_summary, etc.? It would be way much helpful if there is some intruction on these general cases but I couldn't find one.