Skip to content

Commit

Permalink
Merge branch 'pypsa-meets-earth:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
GbotemiB authored Nov 19, 2024
2 parents a750641 + aea9d27 commit 72e74fc
Show file tree
Hide file tree
Showing 9 changed files with 192 additions and 117 deletions.
5 changes: 3 additions & 2 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ run = config.get("run", {})
RDIR = run["name"] + "/" if run.get("name") else ""
CDIR = RDIR if not run.get("shared_cutouts") else ""
SECDIR = run["sector_name"] + "/" if run.get("sector_name") else ""
SDIR = config["summary_dir"].strip("/") + f"/{RDIR}{SECDIR}"
RESDIR = config["results_dir"].strip("/") + f"/{RDIR}{SECDIR}"
SDIR = config["summary_dir"].strip("/") + f"/{SECDIR}"
RESDIR = config["results_dir"].strip("/") + f"/{SECDIR}"
COSTDIR = config["costs_dir"]

load_data_paths = get_load_paths_gegis("data", config)
Expand Down Expand Up @@ -1063,6 +1063,7 @@ if not config["custom_data"]["gas_network"]:
rule prepare_sector_network:
params:
costs=config["costs"],
electricity=config["electricity"],
input:
network=RESDIR
+ "prenetworks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_{sopts}_{planning_horizons}_{discountrate}_{demand}_presec.nc",
Expand Down
9 changes: 8 additions & 1 deletion config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,10 @@ sector:
blue_share: 0.40
pink_share: 0.05
coal:
spatial_coal: true
shift_to_elec: true # If true, residential and services demand of coal is shifted to electricity. If false, the final energy demand of coal is disregarded
lignite:
spatial_lignite: false

international_bunkers: false #Whether or not to count the emissions of international aviation and navigation

Expand Down Expand Up @@ -674,7 +677,11 @@ sector:

conventional_generation: # generator : carrier
OCGT: gas
#Gen_Test: oil # Just for testing purposes
oil: oil
coal: coal
lignite: lignite
biomass: biomass
keep_existing_capacities: true


solving:
Expand Down
3 changes: 3 additions & 0 deletions scripts/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,9 @@ def locate_bus(
# insert any variable into that place using .format - extract string and filter for those containing co (MA)
point = Point(coords["x"], coords["y"]) # point object

if gdf_co.empty:
return None

try:
return gdf_co[gdf_co.contains(point)][
col
Expand Down
Loading

0 comments on commit 72e74fc

Please sign in to comment.