handle leap days in add_brownfield
This commit is contained in:
parent
8d85acc61a
commit
02fc334a2e
@ -70,6 +70,7 @@ rule add_brownfield:
|
||||
),
|
||||
threshold_capacity=config_provider("existing_capacities", " threshold_capacity"),
|
||||
snapshots=config_provider("snapshots"),
|
||||
drop_leap_day=config_provider("enable", "drop_leap_day"),
|
||||
carriers=config_provider("electricity", "renewable_carriers"),
|
||||
input:
|
||||
unpack(input_profile_tech_brownfield),
|
||||
|
@ -14,6 +14,7 @@ import pypsa
|
||||
import xarray as xr
|
||||
from _helpers import (
|
||||
configure_logging,
|
||||
get_snapshots
|
||||
set_scenario_config,
|
||||
update_config_from_wildcards,
|
||||
)
|
||||
@ -192,7 +193,7 @@ def adjust_renewable_profiles(n, input_profiles, params, year):
|
||||
clustermaps.index = clustermaps.index.astype(str)
|
||||
|
||||
# temporal clustering
|
||||
dr = pd.date_range(**params["snapshots"], freq="h")
|
||||
dr = get_snapshots(params["snapshots"], params["drop_leap_day"])
|
||||
snapshotmaps = (
|
||||
pd.Series(dr, index=dr).where(lambda x: x.isin(n.snapshots), pd.NA).ffill()
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user