Sentence capitalized
This commit is contained in:
parent
d237e60b25
commit
379ed0da93
@ -16,7 +16,7 @@ from helper import override_component_attrs, update_config_with_sector_opts
|
|||||||
|
|
||||||
def add_brownfield(n, n_p, year):
|
def add_brownfield(n, n_p, year):
|
||||||
|
|
||||||
logger.info(f"preparing brownfield for the year {year}")
|
logger.info(f"Preparing brownfield for the year {year}")
|
||||||
|
|
||||||
# electric transmission grid set optimised capacities of previous as minimum
|
# electric transmission grid set optimised capacities of previous as minimum
|
||||||
n.lines.s_nom_min = n_p.lines.s_nom_opt
|
n.lines.s_nom_min = n_p.lines.s_nom_opt
|
||||||
@ -126,7 +126,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
update_config_with_sector_opts(snakemake.config, snakemake.wildcards.sector_opts)
|
update_config_with_sector_opts(snakemake.config, snakemake.wildcards.sector_opts)
|
||||||
|
|
||||||
logger.info(f"preparing brownfield from the file {snakemake.input.network_p}")
|
logger.info(f"Preparing brownfield from the file {snakemake.input.network_p}")
|
||||||
|
|
||||||
year = int(snakemake.wildcards.planning_horizons)
|
year = int(snakemake.wildcards.planning_horizons)
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
|
|||||||
to read lifetime to estimate YearDecomissioning
|
to read lifetime to estimate YearDecomissioning
|
||||||
baseyear : int
|
baseyear : int
|
||||||
"""
|
"""
|
||||||
logger.debug(f"adding power capacities installed before {baseyear} from powerplants.csv")
|
logger.debug(f"Adding power capacities installed before {baseyear} from powerplants.csv")
|
||||||
|
|
||||||
df_agg = pd.read_csv(snakemake.input.powerplants, index_col=0)
|
df_agg = pd.read_csv(snakemake.input.powerplants, index_col=0)
|
||||||
|
|
||||||
@ -352,7 +352,7 @@ def add_heating_capacities_installed_before_baseyear(n, baseyear, grouping_years
|
|||||||
services proportional to heating load in both 50% capacities
|
services proportional to heating load in both 50% capacities
|
||||||
in rural busess 50% in urban buses
|
in rural busess 50% in urban buses
|
||||||
"""
|
"""
|
||||||
logger.debug(f"adding heating capacities installed before {baseyear}")
|
logger.debug(f"Adding heating capacities installed before {baseyear}")
|
||||||
|
|
||||||
# Add existing heating capacities, data comes from the study
|
# Add existing heating capacities, data comes from the study
|
||||||
# "Mapping and analyses of the current and future (2020 - 2030)
|
# "Mapping and analyses of the current and future (2020 - 2030)
|
||||||
|
@ -540,7 +540,7 @@ def make_summaries(networks_dict):
|
|||||||
df[output] = pd.DataFrame(columns=columns, dtype=float)
|
df[output] = pd.DataFrame(columns=columns, dtype=float)
|
||||||
|
|
||||||
for label, filename in networks_dict.items():
|
for label, filename in networks_dict.items():
|
||||||
logger.info(f"make summary for scenario {label}, using {filename}")
|
logger.info(f"Make summary for scenario {label}, using {filename}")
|
||||||
|
|
||||||
overrides = override_component_attrs(snakemake.input.overrides)
|
overrides = override_component_attrs(snakemake.input.overrides)
|
||||||
n = pypsa.Network(filename, override_component_attrs=overrides)
|
n = pypsa.Network(filename, override_component_attrs=overrides)
|
||||||
|
@ -105,7 +105,7 @@ def plot_map(network, components=["links", "stores", "storage_units", "generator
|
|||||||
# drop non-bus
|
# drop non-bus
|
||||||
to_drop = costs.index.levels[0].symmetric_difference(n.buses.index)
|
to_drop = costs.index.levels[0].symmetric_difference(n.buses.index)
|
||||||
if len(to_drop) != 0:
|
if len(to_drop) != 0:
|
||||||
logger.info(f"dropping non-buses {to_drop.tolist()}")
|
logger.info(f"Dropping non-buses {to_drop.tolist()}")
|
||||||
costs.drop(to_drop, level=0, inplace=True, axis=0, errors="ignore")
|
costs.drop(to_drop, level=0, inplace=True, axis=0, errors="ignore")
|
||||||
|
|
||||||
# make sure they are removed from index
|
# make sure they are removed from index
|
||||||
@ -754,7 +754,7 @@ def plot_series(network, carrier="AC", name="test"):
|
|||||||
to_drop = supply.columns[(abs(supply) < threshold).all()]
|
to_drop = supply.columns[(abs(supply) < threshold).all()]
|
||||||
|
|
||||||
if len(to_drop) != 0:
|
if len(to_drop) != 0:
|
||||||
logger.info(f"dropping {to_drop.tolist()} from supply")
|
logger.info(f"Dropping {to_drop.tolist()} from supply")
|
||||||
supply.drop(columns=to_drop, inplace=True)
|
supply.drop(columns=to_drop, inplace=True)
|
||||||
|
|
||||||
supply.index.name = None
|
supply.index.name = None
|
||||||
|
@ -136,7 +136,7 @@ def plot_costs():
|
|||||||
|
|
||||||
to_drop = df.index[df.max(axis=1) < snakemake.config['plotting']['costs_threshold']]
|
to_drop = df.index[df.max(axis=1) < snakemake.config['plotting']['costs_threshold']]
|
||||||
|
|
||||||
logger.info(f"dropping technology with costs below {snakemake.config['plotting']['costs_threshold']} EUR billion per year")
|
logger.info(f"Dropping technology with costs below {snakemake.config['plotting']['costs_threshold']} EUR billion per year")
|
||||||
logger.debug(df.loc[to_drop])
|
logger.debug(df.loc[to_drop])
|
||||||
|
|
||||||
df = df.drop(to_drop)
|
df = df.drop(to_drop)
|
||||||
@ -191,7 +191,7 @@ def plot_energy():
|
|||||||
|
|
||||||
to_drop = df.index[df.abs().max(axis=1) < snakemake.config['plotting']['energy_threshold']]
|
to_drop = df.index[df.abs().max(axis=1) < snakemake.config['plotting']['energy_threshold']]
|
||||||
|
|
||||||
logger.info(f"dropping all technology with energy consumption or production below {snakemake.config['plotting']['energy_threshold']} TWh/a")
|
logger.info(f"Dropping all technology with energy consumption or production below {snakemake.config['plotting']['energy_threshold']} TWh/a")
|
||||||
logger.debug(df.loc[to_drop])
|
logger.debug(df.loc[to_drop])
|
||||||
|
|
||||||
df = df.drop(to_drop)
|
df = df.drop(to_drop)
|
||||||
@ -265,7 +265,7 @@ def plot_balances():
|
|||||||
else:
|
else:
|
||||||
units = "TWh/a"
|
units = "TWh/a"
|
||||||
|
|
||||||
logger.info(f"dropping technology energy balance smaller than {snakemake.config['plotting']['energy_threshold']/10} {units}")
|
logger.info(f"Dropping technology energy balance smaller than {snakemake.config['plotting']['energy_threshold']/10} {units}")
|
||||||
logger.debug(df.loc[to_drop])
|
logger.debug(df.loc[to_drop])
|
||||||
|
|
||||||
df = df.drop(to_drop)
|
df = df.drop(to_drop)
|
||||||
|
@ -706,7 +706,7 @@ def prepare_costs(cost_file, USD_to_EUR, discount_rate, Nyears, lifetime):
|
|||||||
|
|
||||||
def add_generation(n, costs):
|
def add_generation(n, costs):
|
||||||
|
|
||||||
logger.info("adding electricity generation")
|
logger.info("Adding electricity generation")
|
||||||
|
|
||||||
nodes = pop_layout.index
|
nodes = pop_layout.index
|
||||||
|
|
||||||
@ -737,7 +737,7 @@ def add_generation(n, costs):
|
|||||||
|
|
||||||
def add_ammonia(n, costs):
|
def add_ammonia(n, costs):
|
||||||
|
|
||||||
logger.info("adding ammonia carrier with synthesis, cracking and storage")
|
logger.info("Adding ammonia carrier with synthesis, cracking and storage")
|
||||||
|
|
||||||
nodes = pop_layout.index
|
nodes = pop_layout.index
|
||||||
|
|
||||||
@ -1495,7 +1495,7 @@ def add_heat(n, costs):
|
|||||||
# exogenously reduce space heat demand
|
# exogenously reduce space heat demand
|
||||||
if options["reduce_space_heat_exogenously"]:
|
if options["reduce_space_heat_exogenously"]:
|
||||||
dE = get(options["reduce_space_heat_exogenously_factor"], investment_year)
|
dE = get(options["reduce_space_heat_exogenously_factor"], investment_year)
|
||||||
logger.info(f"assumed space heat reduction of {dE:.2%}")
|
logger.info(f"Assumed space heat reduction of {dE:.2%}")
|
||||||
for sector in sectors:
|
for sector in sectors:
|
||||||
heat_demand[sector + " space"] = (1 - dE) * heat_demand[sector + " space"]
|
heat_demand[sector + " space"] = (1 - dE) * heat_demand[sector + " space"]
|
||||||
|
|
||||||
@ -2647,7 +2647,7 @@ def maybe_adjust_costs_and_potentials(n, opts):
|
|||||||
|
|
||||||
# TODO this should rather be a config no wildcard
|
# TODO this should rather be a config no wildcard
|
||||||
def limit_individual_line_extension(n, maxext):
|
def limit_individual_line_extension(n, maxext):
|
||||||
logger.info(f"limiting new HVAC and HVDC extensions to {maxext} MW")
|
logger.info(f"Limiting new HVAC and HVDC extensions to {maxext} MW")
|
||||||
n.lines['s_nom_max'] = n.lines['s_nom'] + maxext
|
n.lines['s_nom_max'] = n.lines['s_nom'] + maxext
|
||||||
hvdc = n.links.index[n.links.carrier == 'DC']
|
hvdc = n.links.index[n.links.carrier == 'DC']
|
||||||
n.links.loc[hvdc, 'p_nom_max'] = n.links.loc[hvdc, 'p_nom'] + maxext
|
n.links.loc[hvdc, 'p_nom_max'] = n.links.loc[hvdc, 'p_nom'] + maxext
|
||||||
@ -2814,7 +2814,7 @@ def set_temporal_aggregation(n, opts, solver_name):
|
|||||||
m = re.match(r"(^\d+)sn$", o, re.IGNORECASE)
|
m = re.match(r"(^\d+)sn$", o, re.IGNORECASE)
|
||||||
if m is not None:
|
if m is not None:
|
||||||
sn = int(m[1])
|
sn = int(m[1])
|
||||||
logger.info(f"use every {sn} snapshot as representative")
|
logger.info(f"Use every {sn} snapshot as representative")
|
||||||
n.set_snapshots(n.snapshots[::sn])
|
n.set_snapshots(n.snapshots[::sn])
|
||||||
n.snapshot_weightings *= sn
|
n.snapshot_weightings *= sn
|
||||||
break
|
break
|
||||||
@ -2822,7 +2822,7 @@ def set_temporal_aggregation(n, opts, solver_name):
|
|||||||
m = re.match(r"^(\d+)seg$", o, re.IGNORECASE)
|
m = re.match(r"^(\d+)seg$", o, re.IGNORECASE)
|
||||||
if m is not None:
|
if m is not None:
|
||||||
segments = int(m[1])
|
segments = int(m[1])
|
||||||
logger.info(f"use temporal segmentation with {segments} segments")
|
logger.info(f"Use temporal segmentation with {segments} segments")
|
||||||
n = apply_time_segmentation(n, segments, solver_name=solver_name)
|
n = apply_time_segmentation(n, segments, solver_name=solver_name)
|
||||||
break
|
break
|
||||||
return n
|
return n
|
||||||
|
Loading…
Reference in New Issue
Block a user