-
Notifications
You must be signed in to change notification settings - Fork 253
Description
Hi PyPSA-Earth team,
I'm running a minimal simulation for Jordan, a landlocked country (countries: ["JO"]), using the following config.yaml (v0.6.0):
renewables:
technologies:
onwind: true
pv: true
hydro: true
offwind-ac: false
offwind-dc: false
Despite explicitly disabling both offwind-ac and offwind-dc, snakemake still tries to build:
resources/renewable_profiles/profile_offwind-ac.nc
resources/renewable_profiles/profile_offwind-dc.nc
This leads to a failure in build_renewable_profiles because no valid offshore regions exist in the spatial inputs (as expected for a landlocked country).
Observed behavior:
MissingInputException in rule add_electricity:
Missing input files: profile_offwind-ac.nc, profile_offwind-dc.nc
Root cause:
build_renewable_profiles runs for all entries in config["renewable"], even if the technology is set to false and/or not applicable (e.g., no offshore areas in regions_offshore.geojson).
Downstream rule add_electricity expects all profile_*.nc files, even if the technology is irrelevant to the selected country.
Expected behavior:
For landlocked countries, offwind profiles should be excluded entirely from the DAG.
Rules like add_electricity should only depend on renewable technologies that are both enabled and spatially valid.
Potential workaround:
One can patch the rule with:
wildcard_constraints:
technology="onwind|pv|hydro"
…but this only pushes the error to add_electricity, which still looks for missing offwind profiles.
Let me know if you have some ideas.
Thanks for your work on this great tool!