Skip to content

Commit

Permalink
added clean cooking fuels as stores according to minimal example
Browse files Browse the repository at this point in the history
  • Loading branch information
Mwiche96 committed Jun 17, 2024
1 parent d0bcc2c commit 7b5f5f9
Show file tree
Hide file tree
Showing 56 changed files with 1,598 additions and 800 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:

# Find common spelling mistakes in comments and docstrings
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.2.6
hooks:
- id: codespell
args: ['--ignore-regex="(\b[A-Z]+\b)"', '--ignore-words-list=fom,appartment,bage,ore,setis,tabacco,berfore,fo,FO']
Expand Down Expand Up @@ -72,7 +72,7 @@ repos:

# Format Snakemake rule / workflow files
- repo: https://github.com/snakemake/snakefmt
rev: v0.10.2
rev: v0.10.1
hooks:
- id: snakefmt

Expand Down
39 changes: 15 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ The model is described in the Applied Energy article "PyPSA-Earth. A new global
<img src="https://forum.openmod.org/uploads/db8804/original/1X/6af089c376b19b72ad148e4e4326c162b94db68f.png" width=35%>
</p>

<p align="center"><b> Figure:</b> Example power systems build with PyPSA-Earth. See images of ~193 more countries at <a>https://zenodo.org/records/10080766</a></p>

## Livetracker. Most popular global models:

<p align="center">
Expand Down Expand Up @@ -306,13 +304,6 @@ The documentation is available here: [documentation](https://pypsa-earth.readthe
<sub><b>Emre_Yorat</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/virio-andreyana">
<img src="https://avatars.githubusercontent.com/u/114650479?v=4" width="100;" alt="virio-andreyana"/>
<br />
<sub><b>Null</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/giacfalk">
<img src="https://avatars.githubusercontent.com/u/36954873?v=4" width="100;" alt="giacfalk"/>
Expand All @@ -328,20 +319,20 @@ The documentation is available here: [documentation](https://pypsa-earth.readthe
</a>
</td>
<td align="center">
<a href="https://github.com/finozzifa">
<img src="https://avatars.githubusercontent.com/u/167071962?v=4" width="100;" alt="finozzifa"/>
<a href="https://github.com/virio-andreyana">
<img src="https://avatars.githubusercontent.com/u/114650479?v=4" width="100;" alt="virio-andreyana"/>
<br />
<sub><b>Finozzifa</b></sub>
<sub><b>Null</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/cpschau">
<img src="https://avatars.githubusercontent.com/u/124347782?v=4" width="100;" alt="cpschau"/>
<a href="https://github.com/cschau-ieg">
<img src="https://avatars.githubusercontent.com/u/124347782?v=4" width="100;" alt="cschau-ieg"/>
<br />
<sub><b>Cschau</b></sub>
<sub><b>Cschau-ieg</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/Tooblippe">
<img src="https://avatars.githubusercontent.com/u/805313?v=4" width="100;" alt="Tooblippe"/>
Expand Down Expand Up @@ -376,15 +367,15 @@ The documentation is available here: [documentation](https://pypsa-earth.readthe
<br />
<sub><b>Stephen J Lee</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/juli-a-ko">
<img src="https://avatars.githubusercontent.com/u/126512394?v=4" width="100;" alt="juli-a-ko"/>
<br />
<sub><b>Juli-a-ko</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/squoilin">
<img src="https://avatars.githubusercontent.com/u/4547840?v=4" width="100;" alt="squoilin"/>
Expand Down Expand Up @@ -419,15 +410,15 @@ The documentation is available here: [documentation](https://pypsa-earth.readthe
<br />
<sub><b>Katherine M. Antonio</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/jessLryan">
<img src="https://avatars.githubusercontent.com/u/122939887?v=4" width="100;" alt="jessLryan"/>
<br />
<sub><b>Jess</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/jarry7">
<img src="https://avatars.githubusercontent.com/u/27745389?v=4" width="100;" alt="jarry7"/>
Expand Down
12 changes: 3 additions & 9 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ATLITE_NPROCESSES = config["atlite"].get("nprocesses", 4)

wildcard_constraints:
simpl="[a-zA-Z0-9]*|all",
clusters="[0-9]+(m|flex)?|all|min",
clusters="[0-9]+(m|flex|min)?|all",
ll="(v|c)([0-9\.]+|opt|all)|all",
opts="[-+a-zA-Z0-9\.]*",
unc="[-+a-zA-Z0-9\.]*",
Expand Down Expand Up @@ -269,11 +269,6 @@ rule base_network:
hvdc_as_lines=config["electricity"]["hvdc_as_lines"],
countries=config["countries"],
base_network=config["base_network"],
<<<<<<< HEAD
cooking=config["cooking"] # added link to config for cooking
=======
cooking=config["cooking"]["stove"], # added link to config for cooking
>>>>>>> 7103fd6c665cbdc1dd1b9ca7390647032a5e83fc
input:
osm_buses="resources/" + RDIR + "base_network/all_buses_build_network.csv",
osm_lines="resources/" + RDIR + "base_network/all_lines_build_network.csv",
Expand Down Expand Up @@ -301,7 +296,7 @@ rule base_network:
rule build_bus_regions:
params:
alternative_clustering=config["cluster_options"]["alternative_clustering"],
crs=config["crs"],
area_crs=config["crs"]["area_crs"],
countries=config["countries"],
input:
country_shapes="resources/" + RDIR + "shapes/country_shapes.geojson",
Expand Down Expand Up @@ -461,7 +456,7 @@ rule build_renewable_profiles:
powerplants="resources/" + RDIR + "powerplants.csv",
regions=lambda w: (
"resources/" + RDIR + "bus_regions/regions_onshore.geojson"
if w.technology in ("onwind", "solar", "hydro", "csp")
if w.technology in ("onwind", "solar", "hydro")
else "resources/" + RDIR + "bus_regions/regions_offshore.geojson"
),
cutout=lambda w: "cutouts/"
Expand Down Expand Up @@ -520,7 +515,6 @@ rule add_electricity:
electricity=config["electricity"],
alternative_clustering=config["cluster_options"]["alternative_clustering"],
renewable=config["renewable"],
cooking=config["cooking"],
length_factor=config["lines"]["length_factor"],
input:
**{
Expand Down
45 changes: 6 additions & 39 deletions config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ cluster_options:
remove_stubs: true
remove_stubs_across_borders: true
p_threshold_drop_isolated: 20 # [MW] isolated buses are being discarded if bus mean power is below the specified threshold
p_threshold_merge_isolated: 300 # [MW] isolated buses are being merged into a single isolated bus if a bus mean power is below the specified threshold
s_threshold_fetch_isolated: 0.05 # [-] a share of the national load for merging an isolated network into a backbone network
p_threshold_merge_isolated: 300 # [MW] isolated buses are being merged into a single isolated bus if bus mean power is below the specified threshold
cluster_network:
algorithm: kmeans
feature: solar+onwind-time
Expand Down Expand Up @@ -127,7 +126,7 @@ load_options:

electricity:
base_voltage: 380.
voltages: [132., 220., 300., 380., 500., 750.]
voltages: [220., 300., 380.]
co2limit: 7.75e+7 # European default, 0.05 * 3.1e9*0.5, needs to be adjusted for Africa
co2base: 1.487e+9 # European default, adjustment to Africa necessary
agg_p_nom_limits: data/agg_p_nom_minmax.csv
Expand Down Expand Up @@ -155,7 +154,7 @@ electricity:
custom_powerplants: false # "false" use only powerplantmatching (ppm) data, "merge" combines ppm and custom powerplants, "replace" use only custom powerplants

conventional_carriers: [nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass]
renewable_carriers: [solar, csp, onwind, offwind-ac, offwind-dc, hydro]
renewable_carriers: [solar, onwind, offwind-ac, offwind-dc, hydro]

estimate_renewable_capacities:
stats: "irena" # False, = greenfield expansion, 'irena' uses IRENA stats to add expansion limits
Expand All @@ -169,15 +168,11 @@ electricity:
PV: [solar]

lines:
ac_types:
132.: "243-AL1/39-ST1A 20.0"
types:
220.: "Al/St 240/40 2-bundle 220.0"
300.: "Al/St 240/40 3-bundle 300.0"
380.: "Al/St 240/40 4-bundle 380.0"
500.: "Al/St 240/40 4-bundle 380.0"
750.: "Al/St 560/50 4-bundle 750.0"
dc_types:
500.: "HVDC XLPE 1000"
dc_type: "HVDC XLPE 1000"
s_max_pu: 0.7
s_nom_max: .inf
length_factor: 1.25
Expand Down Expand Up @@ -313,26 +308,6 @@ renewable:
method: hydro_capacities # 'hydro_capacities' to rescale country hydro production by using hydro_capacities, 'eia' to rescale by eia data, false for no rescaling
year: 2013 # (optional) year of statistics used to rescale the runoff time series. When not provided, the weather year of the snapshots is used
multiplier: 1.1 # multiplier applied after the normalization of the hydro production; default 1.0
csp:
cutout: cutout-2013-era5
resource:
method: csp
installation: SAM_solar_tower
capacity_per_sqkm: 2.392 # From 1.7 to 4.6 addresses issue #361
# Determined by comparing uncorrected area-weighted full-load hours to those
# published in Supplementary Data to
# Pietzcker, Robert Carl, et al. "Using the sun to decarbonize the power
# sector: The economic potential of photovoltaics and concentrating solar
# power." Applied Energy 135 (2014): 704-720.
copernicus:
grid_codes: [20, 30, 40, 60, 90]
distancing_codes: [50]
distance_to_codes: 3000
natura: true
potential: simple # or conservative
clip_p_max_pu: 1.e-2
extendable: true
csp_model: advanced # simple or advanced

# TODO: Needs to be adjusted for Africa.
# Costs Configuration (Do not remove, needed for Sphynx documentation).
Expand Down Expand Up @@ -481,21 +456,13 @@ plotting:
"electricity": "#f9d002"
"lines": "#70af1d"
"transmission lines": "#70af1d"
"AC": "#70af1d"
"AC-AC": "#70af1d"
"AC line": "#70af1d"
"links": "#8a1caf"
"HVDC links": "#8a1caf"
"DC": "#8a1caf"
"DC-DC": "#8a1caf"
"DC link": "#8a1caf"
"load": "#ff0000"
"load shedding": "#ff0000"
"battery discharger": slategray
"battery charger": slategray
"h2 fuel cell": '#c251ae'
"h2 electrolysis": '#ff29d9'
"csp": "#fdd404"
"load": "#FF0000"
nice_names:
OCGT: "Open-Cycle Gas"
CCGT: "Combined-Cycle Gas"
Expand Down
45 changes: 6 additions & 39 deletions config.tutorial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ cluster_options:
remove_stubs: true
remove_stubs_across_borders: true
p_threshold_drop_isolated: 20 # [MW] isolated buses are being discarded if bus mean power is below the specified threshold
p_threshold_merge_isolated: 300 # [MW] isolated buses are being merged into a single isolated bus if a bus mean power is below the specified threshold
s_threshold_fetch_isolated: 0.05 # [-] a share of the national load for merging an isolated network into a backbone network
p_threshold_merge_isolated: 300 # [MW] isolated buses are being merged into a single isolated bus if bus mean power is below the specified threshold
cluster_network:
algorithm: kmeans
feature: solar+onwind-time
Expand Down Expand Up @@ -141,7 +140,7 @@ load_options:

electricity:
base_voltage: 380.
voltages: [132., 220., 300., 380., 500., 750.]
voltages: [220., 300., 380.]
co2limit: 1.487e+9
co2base: 1.487e+9
agg_p_nom_limits: data/agg_p_nom_minmax.csv
Expand Down Expand Up @@ -169,7 +168,7 @@ electricity:
custom_powerplants: false # "false" use only powerplantmatching (ppm) data, "merge" combines ppm and custom powerplants, "replace" use only custom powerplants

conventional_carriers: [nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass]
renewable_carriers: [solar, csp, onwind, offwind-ac, offwind-dc, hydro]
renewable_carriers: [solar, onwind, offwind-ac, offwind-dc, hydro]

estimate_renewable_capacities:
stats: "irena" # False, = greenfield expansion, 'irena' uses IRENA stats to add expansion limits
Expand All @@ -182,15 +181,11 @@ electricity:
Onshore: [onwind]
PV: [solar]
lines:
ac_types:
132.: "243-AL1/39-ST1A 20.0"
types:
220.: "Al/St 240/40 2-bundle 220.0"
300.: "Al/St 240/40 3-bundle 300.0"
380.: "Al/St 240/40 4-bundle 380.0"
500.: "Al/St 240/40 4-bundle 380.0"
750.: "Al/St 560/50 4-bundle 750.0"
dc_types:
500.: "HVDC XLPE 1000"
dc_type: "HVDC XLPE 1000"
s_max_pu: 0.7
s_nom_max: .inf
length_factor: 1.25
Expand Down Expand Up @@ -310,26 +305,6 @@ renewable:
method: hydro_capacities # 'hydro_capacities' to rescale country hydro production by using hydro_capacities, 'eia' to rescale by eia data, false for no rescaling
year: 2013 # (optional) year of statistics used to rescale the runoff time series. When not provided, the cutout weather year is used
multiplier: 1.1 # multiplier applied after the normalization of the hydro production; default 1.0
csp:
cutout: cutout-2013-era5-tutorial
resource:
method: csp
installation: SAM_solar_tower
capacity_per_sqkm: 2.392 # From 1.7 to 4.6 addresses issue #361
# Determined by comparing uncorrected area-weighted full-load hours to those
# published in Supplementary Data to
# Pietzcker, Robert Carl, et al. "Using the sun to decarbonize the power
# sector: The economic potential of photovoltaics and concentrating solar
# power." Applied Energy 135 (2014): 704-720.
copernicus:
grid_codes: [20, 30, 40, 60, 90]
distancing_codes: [50]
distance_to_codes: 3000
natura: true
potential: simple # or conservative
clip_p_max_pu: 1.e-2
extendable: true
csp_model: advanced # simple or advanced

# TODO: Needs to be adjusted for Africa
costs:
Expand Down Expand Up @@ -467,21 +442,13 @@ plotting:
"electricity": "#f9d002"
"lines": "#70af1d"
"transmission lines": "#70af1d"
"AC": "#70af1d"
"AC-AC": "#70af1d"
"AC line": "#70af1d"
"links": "#8a1caf"
"HVDC links": "#8a1caf"
"DC": "#8a1caf"
"DC-DC": "#8a1caf"
"DC link": "#8a1caf"
"load": "#ff0000"
"load shedding": "#ff0000"
"battery discharger": slategray
"battery charger": slategray
"h2 fuel cell": '#c251ae'
"h2 electrolysis": '#ff29d9'
"csp": "#fdd404"
"load": "#FF0000"
nice_names:
OCGT: "Open-Cycle Gas"
CCGT: "Combined-Cycle Gas"
Expand Down
2 changes: 1 addition & 1 deletion configs/bundle_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ databundles:
category: cutouts
destination: "cutouts"
urls:
zenodo: https://sandbox.zenodo.org/records/69756/files/bundle_tutorial_cutouts_KZ.zip?download=1
zenodo: https://sandbox.zenodo.org/record/1239739/files/tutorial_cutouts_KZ.zip?download=1
output: [cutouts/cutout-2013-era5-tutorial.nc]
disable_by_opt:
build_cutout: [all]
Expand Down
Loading

0 comments on commit 7b5f5f9

Please sign in to comment.