add_electricity: add_line_rating: move snakemake arg out of function
This commit is contained in:
parent
d44283bc82
commit
5ee056bb5c
@ -540,9 +540,8 @@ def estimate_renewable_capacities(n, tech_map=None):
|
|||||||
n.generators.loc[tech_i, 'p_nom_min'] = n.generators.loc[tech_i, 'p_nom']
|
n.generators.loc[tech_i, 'p_nom_min'] = n.generators.loc[tech_i, 'p_nom']
|
||||||
|
|
||||||
def attach_line_rating(n):
|
def attach_line_rating(n):
|
||||||
if snakemake.config["lines"]["line_rating"]:
|
s_max = xr.open_dataarray(snakemake.input.line_rating).to_pandas().transpose()
|
||||||
s_max=xr.open_dataarray(snakemake.input.line_rating).to_pandas().transpose()
|
n.lines_t.s_max_pu = s_max / n.lines.s_nom[s_max.columns] #only considers overhead lines
|
||||||
n.lines_t.s_max_pu=s_max/n.lines.loc[s_max.columns,:]['s_nom'] #only considers overhead lines
|
|
||||||
|
|
||||||
def add_nice_carrier_names(n, config=None):
|
def add_nice_carrier_names(n, config=None):
|
||||||
if config is None: config = snakemake.config
|
if config is None: config = snakemake.config
|
||||||
@ -583,7 +582,9 @@ if __name__ == "__main__":
|
|||||||
estimate_renewable_capacities(n)
|
estimate_renewable_capacities(n)
|
||||||
attach_OPSD_renewables(n)
|
attach_OPSD_renewables(n)
|
||||||
update_p_nom_max(n)
|
update_p_nom_max(n)
|
||||||
attach_line_rating(n)
|
|
||||||
|
if snakemake.config["lines"]["line_rating"]:
|
||||||
|
attach_line_rating(n)
|
||||||
|
|
||||||
add_nice_carrier_names(n)
|
add_nice_carrier_names(n)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user