Update for compatibility with latest PyPSA-eur master branch
Remove non-renewable generator and storage units from electricity-only base network, since they're added differently here with links. Remove unncessary cruft from config.yaml which is not used by PyPSA-Eur-Sec (e.g. renewable configuration parameters). Rename "naptha" to correct "naphtha".
This commit is contained in:
parent
3b0e0dfb3a
commit
5157041ee2
13
README.md
13
README.md
@ -17,20 +17,25 @@ the additional sectors.
|
|||||||
|
|
||||||
Currently the scripts to solve and process the resulting PyPSA models
|
Currently the scripts to solve and process the resulting PyPSA models
|
||||||
are also included in PyPSA-Eur-Sec, although they could in future be
|
are also included in PyPSA-Eur-Sec, although they could in future be
|
||||||
better integrated with the corresponding scripts in PyPSA-Eur.
|
better integrated with the corresponding scripts in PyPSA-Eur. A
|
||||||
|
stumbling block to sharing solve_network.py between PyPSA-Eur and
|
||||||
|
PyPSA-Eur-Sec is the different extra_functionality required to build
|
||||||
|
storage and CHP constraints.
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
First install [PyPSA-Eur](https://github.com/PyPSA/pypsa-eur) and all
|
First install [PyPSA-Eur](https://github.com/PyPSA/pypsa-eur) and all
|
||||||
its dependencies.
|
its dependencies. Clone the repository:
|
||||||
|
```shell
|
||||||
|
projects % git clone git@github.com:PyPSA/pypsa-eur.git
|
||||||
|
```
|
||||||
|
then download and unpack all the data files.
|
||||||
|
|
||||||
Create a parallel directory for PyPSA-Eur-Sec with:
|
Create a parallel directory for PyPSA-Eur-Sec with:
|
||||||
```shell
|
```shell
|
||||||
projects % git clone git@github.com:nworbmot/pypsa-eur-sec.git
|
projects % git clone git@github.com:nworbmot/pypsa-eur-sec.git
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Data requirements
|
## Data requirements
|
||||||
|
|
||||||
The Data requirements include JRC-IDEES-2015, JRC biomass potentials,
|
The Data requirements include JRC-IDEES-2015, JRC biomass potentials,
|
||||||
|
67
config.yaml
67
config.yaml
@ -2,7 +2,7 @@ logging_level: INFO
|
|||||||
|
|
||||||
results_dir: 'results/'
|
results_dir: 'results/'
|
||||||
summary_dir: results
|
summary_dir: results
|
||||||
run: '190416-modular-test'
|
run: '190418-test-rebase'
|
||||||
|
|
||||||
scenario:
|
scenario:
|
||||||
sectors: [E] # ,E+EV,E+BEV,E+BEV+V2G] # [ E+EV, E+BEV, E+BEV+V2G ]
|
sectors: [E] # ,E+EV,E+BEV,E+BEV+V2G] # [ E+EV, E+BEV, E+BEV+V2G ]
|
||||||
@ -35,73 +35,11 @@ electricity:
|
|||||||
conventional_carriers: [] # nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass]
|
conventional_carriers: [] # nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass]
|
||||||
|
|
||||||
atlite:
|
atlite:
|
||||||
nprocesses: 4
|
|
||||||
cutout_dir: '../pypsa-eur/cutouts'
|
cutout_dir: '../pypsa-eur/cutouts'
|
||||||
cutouts:
|
|
||||||
europe-2013-era5:
|
|
||||||
module: era5
|
|
||||||
xs: [-12., 35.]
|
|
||||||
ys: [72., 33.]
|
|
||||||
years: [2013, 2013]
|
|
||||||
europe-2013-sarah:
|
|
||||||
module: sarah
|
|
||||||
resolution: 0.2
|
|
||||||
xs: [-12., 42.]
|
|
||||||
ys: [65., 33.]
|
|
||||||
years: [2013, 2013]
|
|
||||||
|
|
||||||
renewable:
|
renewable:
|
||||||
onwind:
|
onwind:
|
||||||
cutout: europe-2013-era5
|
cutout: europe-2013-era5
|
||||||
resource:
|
|
||||||
method: wind
|
|
||||||
turbine: Vestas_V112_3MW
|
|
||||||
# ScholzPhd Tab 4.3.1: 10MW/km^2
|
|
||||||
capacity_per_sqm: 3
|
|
||||||
# correction_factor: 0.93
|
|
||||||
corine:
|
|
||||||
#The selection of CORINE Land Cover [1] types that are allowed for wind and solar are based on [2] p.42 / p.28
|
|
||||||
#
|
|
||||||
#[1] https://www.eea.europa.eu/ds_resolveuid/C9RK15EA06
|
|
||||||
#
|
|
||||||
#[2] Scholz, Y. (2012). Renewable energy based electricity supply at low costs: development of the REMix model and application for Europe.
|
|
||||||
grid_codes: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
|
|
||||||
24, 25, 26, 27, 28, 29, 31, 32]
|
|
||||||
distance: 1000
|
|
||||||
distance_grid_codes: [1, 2, 3, 4, 5, 6]
|
|
||||||
natura: true
|
|
||||||
offwind:
|
|
||||||
cutout: europe-2013-era5
|
|
||||||
resource:
|
|
||||||
method: wind
|
|
||||||
turbine: NREL_ReferenceTurbine_5MW_offshore
|
|
||||||
# ScholzPhd Tab 4.3.1: 10MW/km^2
|
|
||||||
capacity_per_sqm: 3
|
|
||||||
height_cutoff: 50
|
|
||||||
# correction_factor: 0.93
|
|
||||||
corine:
|
|
||||||
grid_codes: [44, 255]
|
|
||||||
natura: true
|
|
||||||
solar:
|
|
||||||
cutout: europe-2013-sarah
|
|
||||||
resource:
|
|
||||||
method: pv
|
|
||||||
panel: CSi
|
|
||||||
orientation:
|
|
||||||
slope: 35.
|
|
||||||
azimuth: 180.
|
|
||||||
# ScholzPhd Tab 4.3.1: 170 MW/km^2
|
|
||||||
capacity_per_sqm: 1.7
|
|
||||||
correction_factor: 0.877
|
|
||||||
corine:
|
|
||||||
grid_codes: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
|
|
||||||
18, 19, 20, 26, 31, 32]
|
|
||||||
natura: true
|
|
||||||
hydro:
|
|
||||||
cutout: europe-2013-era5
|
|
||||||
carriers: [ror, PHS, hydro]
|
|
||||||
PHS_max_hours: 6
|
|
||||||
|
|
||||||
|
|
||||||
biomass:
|
biomass:
|
||||||
year: 2030
|
year: 2030
|
||||||
@ -216,7 +154,8 @@ plotting:
|
|||||||
energy_threshold: 50.
|
energy_threshold: 50.
|
||||||
|
|
||||||
|
|
||||||
vre_techs: ["onwind", "offwind", "solar", "ror"]
|
vre_techs: ["onwind", "offwind-ac", "offwind-dc", "solar", "ror"]
|
||||||
|
renewable_storage_techs: ["PHS","hydro"]
|
||||||
conv_techs: ["OCGT", "CCGT", "Nuclear", "Coal"]
|
conv_techs: ["OCGT", "CCGT", "Nuclear", "Coal"]
|
||||||
storage_techs: ["hydro+PHS", "battery", "H2"]
|
storage_techs: ["hydro+PHS", "battery", "H2"]
|
||||||
# store_techs: ["Li ion", "water tanks"]
|
# store_techs: ["Li ion", "water tanks"]
|
||||||
|
@ -10,7 +10,7 @@ def build_industrial_demand():
|
|||||||
|
|
||||||
totals = pd.Series(data=[1100.,1814.,586.,400.,580.,186.],
|
totals = pd.Series(data=[1100.,1814.,586.,400.,580.,186.],
|
||||||
index=["industry new electricity","industry process heat",
|
index=["industry new electricity","industry process heat",
|
||||||
"naptha feedstock","shipping H2","aviation kerosene","process emissions"])
|
"naphtha feedstock","shipping H2","aviation kerosene","process emissions"])
|
||||||
|
|
||||||
industrial_demand = pd.DataFrame({i : population["total"]*totals[i]*1e6/population["total"].sum() for i in totals.index })
|
industrial_demand = pd.DataFrame({i : population["total"]*totals[i]*1e6/population["total"].sum() for i in totals.index })
|
||||||
|
|
||||||
|
@ -37,6 +37,21 @@ override_component_attrs["Link"].loc["p3"] = ["series","MW",0.,"3rd bus output",
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def remove_elec_base_techs(n):
|
||||||
|
"""remove conventional generators (e.g. OCGT) and storage units (e.g. batteries and H2)
|
||||||
|
from base electricity-only network, since they're added here differently using links
|
||||||
|
"""
|
||||||
|
to_keep = {"generators" : snakemake.config["plotting"]["vre_techs"],
|
||||||
|
"storage_units" : snakemake.config["plotting"]["renewable_storage_techs"]}
|
||||||
|
|
||||||
|
n.carriers = n.carriers.loc[to_keep["generators"] + to_keep["storage_units"]]
|
||||||
|
|
||||||
|
for components, techs in iteritems(to_keep):
|
||||||
|
df = getattr(n,components)
|
||||||
|
to_remove = df.carrier.value_counts().index^techs
|
||||||
|
print("removing {} with carrier {}".format(components,to_remove))
|
||||||
|
df.drop(df.index[df.carrier.isin(to_remove)],inplace=True)
|
||||||
|
|
||||||
|
|
||||||
def add_co2_tracking(n):
|
def add_co2_tracking(n):
|
||||||
|
|
||||||
@ -1141,7 +1156,7 @@ def add_industry(network):
|
|||||||
network.add("Load",
|
network.add("Load",
|
||||||
"Fischer-Tropsch",
|
"Fischer-Tropsch",
|
||||||
bus="Fischer-Tropsch",
|
bus="Fischer-Tropsch",
|
||||||
p_set = industrial_demand.loc[nodes,["aviation kerosene","naptha feedstock"]].sum().sum()/8760.)
|
p_set = industrial_demand.loc[nodes,["aviation kerosene","naphtha feedstock"]].sum().sum()/8760.)
|
||||||
|
|
||||||
network.madd("Load",
|
network.madd("Load",
|
||||||
nodes,
|
nodes,
|
||||||
@ -1200,6 +1215,8 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
costs = prepare_costs()
|
costs = prepare_costs()
|
||||||
|
|
||||||
|
remove_elec_base_techs(n)
|
||||||
|
|
||||||
add_co2_tracking(n)
|
add_co2_tracking(n)
|
||||||
|
|
||||||
add_generation(n)
|
add_generation(n)
|
||||||
|
Loading…
Reference in New Issue
Block a user