change industry reference year to 2019
This commit is contained in:
parent
314f6c6f0f
commit
aa820fa046
@ -716,7 +716,7 @@ industry:
|
||||
MWh_CH4_per_tMeOH: 10.25
|
||||
MWh_MeOH_per_tMeOH: 5.528
|
||||
hotmaps_locate_missing: false
|
||||
reference_year: 2021
|
||||
reference_year: 2019
|
||||
|
||||
|
||||
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#costs
|
||||
|
@ -293,6 +293,7 @@ def separate_basic_chemicals(demand, year):
|
||||
"""
|
||||
Separate basic chemicals into ammonia, chlorine, methanol and HVC.
|
||||
"""
|
||||
# ammonia data from 2017-2021
|
||||
ammonia = pd.read_csv(snakemake.input.ammonia_production, index_col=0)
|
||||
|
||||
there = ammonia.index.intersection(demand.index)
|
||||
@ -302,7 +303,10 @@ def separate_basic_chemicals(demand, year):
|
||||
|
||||
demand["Ammonia"] = 0.0
|
||||
|
||||
demand.loc[there, "Ammonia"] = ammonia.loc[there, str(year)]
|
||||
year_to_use = min(max(year, 2017), 2021)
|
||||
if year_to_use != year:
|
||||
logger.info(f"Using data from {year_to_use} for ammonia production.")
|
||||
demand.loc[there, "Ammonia"] = ammonia.loc[there, str(year_to_use)]
|
||||
|
||||
demand["Basic chemicals"] -= demand["Ammonia"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user