add names to config, add color column to n.carriers

This commit is contained in:
FabianHofmann 2020-01-29 17:01:57 +01:00
parent af985db802
commit 1e9f8717ee
4 changed files with 17 additions and 0 deletions

5
config.default.yaml Normal file → Executable file
View File

@ -324,6 +324,9 @@ plotting:
offwind-ac: "Offshore Wind (AC)"
offwind-dc: "Offshore Wind (DC)"
onwind: "Onshore Wind"
solar: "Solar"
PHS: "Pumped Hydro Storage"
hydro: "Reservoir & Dam"
battery: "Battery Storage"
H2: "Hydrogen Storage"
lines: "Transmission lines"
@ -338,4 +341,6 @@ plotting:
H2: "Hydrogen\nStorage"
lines: "Transmission\nlines"
ror: "Run of\nriver"
PHS: "Pumped Hydro\nStorage"
hydro: "Reservoir\n& Dam"

5
config.tutorial.yaml Normal file → Executable file
View File

@ -303,6 +303,9 @@ plotting:
offwind-ac: "Offshore Wind (AC)"
offwind-dc: "Offshore Wind (DC)"
onwind: "Onshore Wind"
solar: "Solar"
PHS: "Pumped Hydro Storage"
hydro: "Reservoir & Dam"
battery: "Battery Storage"
H2: "Hydrogen Storage"
lines: "Transmission lines"
@ -317,3 +320,5 @@ plotting:
H2: "Hydrogen\nStorage"
lines: "Transmission\nlines"
ror: "Run of\nriver"
PHS: "Pumped Hydro\nStorage"
hydro: "Reservoir\n& Dam"

View File

@ -504,6 +504,8 @@ def add_nice_carrier_names(n, config=None):
if config is None: config = snakemake.config
nice_names = pd.Series(config['plotting']['nice_names'])
n.carriers['nice_name'] = nice_names[n.carriers.index]
colors = pd.Series(config['plotting']['tech_colors'])
n.carriers['color'] = colors[n.carriers.index]
if __name__ == "__main__":

5
test/config.test1.yaml Normal file → Executable file
View File

@ -303,6 +303,9 @@ plotting:
offwind-ac: "Offshore Wind (AC)"
offwind-dc: "Offshore Wind (DC)"
onwind: "Onshore Wind"
solar: "Solar"
PHS: "Pumped Hydro Storage"
hydro: "Reservoir & Dam"
battery: "Battery Storage"
H2: "Hydrogen Storage"
lines: "Transmission lines"
@ -317,3 +320,5 @@ plotting:
H2: "Hydrogen\nStorage"
lines: "Transmission\nlines"
ror: "Run of\nriver"
PHS: "Pumped Hydro\nStorage"
hydro: "Reservoir\n& Dam"