Merge branch 'master' into graphics-to-doc-img

This commit is contained in:
Fabian Neumann 2024-05-12 15:38:41 +02:00
commit b9a1d79f63
4 changed files with 10 additions and 3 deletions

View File

@ -172,6 +172,10 @@ Upcoming Release
* Bugfix: allow modelling sector-coupled landlocked regions. (Fixed handling of offshore wind.) * Bugfix: allow modelling sector-coupled landlocked regions. (Fixed handling of offshore wind.)
* Bugfix: approximation of hydro power generation if Portugal or Spain are not included works now.
* Bugfix: copy_timeslice does not copy anymore, if country not present in load data.
* Adapt the disabling of transmission expansion in myopic foresight optimisations when limit is already reached to also handle cost limits. * Adapt the disabling of transmission expansion in myopic foresight optimisations when limit is already reached to also handle cost limits.
* Fix duplicated years and grouping years reference in `add_land_use_constraint_m`. * Fix duplicated years and grouping years reference in `add_land_use_constraint_m`.

View File

@ -129,7 +129,7 @@ def copy_timeslice(load, cntry, start, stop, delta, fn_load=None):
load.loc[start:stop, cntry] = load.loc[ load.loc[start:stop, cntry] = load.loc[
start - delta : stop - delta, cntry start - delta : stop - delta, cntry
].values ].values
elif fn_load is not None: elif fn_load is not None and cntry in load:
duration = pd.date_range(freq="h", start=start - delta, end=stop - delta) duration = pd.date_range(freq="h", start=start - delta, end=stop - delta)
load_raw = load_timeseries(fn_load, duration, [cntry]) load_raw = load_timeseries(fn_load, duration, [cntry])
load.loc[start:stop, cntry] = load_raw.loc[ load.loc[start:stop, cntry] = load_raw.loc[

View File

@ -139,7 +139,10 @@ def approximate_missing_eia_stats(eia_stats, runoff_fn, countries):
runoff.index = runoff.index.astype(int) runoff.index = runoff.index.astype(int)
# fix outliers; exceptional floods in 1977-1979 in ES & PT # fix outliers; exceptional floods in 1977-1979 in ES & PT
runoff.loc[1978, ["ES", "PT"]] = runoff.loc[1979, ["ES", "PT"]] if "ES" in runoff:
runoff.loc[1978, "ES"] = runoff.loc[1979, "ES"]
if "PT" in runoff:
runoff.loc[1978, "PT"] = runoff.loc[1979, "PT"]
runoff_eia = runoff.loc[eia_stats.index] runoff_eia = runoff.loc[eia_stats.index]

View File

@ -97,7 +97,7 @@ def define_spatial(nodes, options):
spatial.gas.industry = nodes + " gas for industry" spatial.gas.industry = nodes + " gas for industry"
spatial.gas.industry_cc = nodes + " gas for industry CC" spatial.gas.industry_cc = nodes + " gas for industry CC"
spatial.gas.biogas_to_gas = nodes + " biogas to gas" spatial.gas.biogas_to_gas = nodes + " biogas to gas"
spatial.gas.biogas_to_gas_cc = nodes + "biogas to gas CC" spatial.gas.biogas_to_gas_cc = nodes + " biogas to gas CC"
else: else:
spatial.gas.nodes = ["EU gas"] spatial.gas.nodes = ["EU gas"]
spatial.gas.locations = ["EU"] spatial.gas.locations = ["EU"]