update ammonia demand data to 2022

This commit is contained in:
lisazeyen 2024-07-29 16:09:38 +02:00
parent aa820fa046
commit 2f3fde26d0
4 changed files with 5 additions and 5 deletions

View File

@ -437,7 +437,7 @@ rule build_salt_cavern_potentials:
rule build_ammonia_production:
input:
usgs="data/bundle/myb1-2021-nitro-ert.xlsx",
usgs="data/bundle/myb1-2022-nitro-ert.xlsx",
output:
ammonia_production=resources("ammonia_production.csv"),
threads: 1

View File

@ -67,7 +67,7 @@ if config["enable"]["retrieve"] and config["enable"].get("retrieve_databundle",
rule retrieve_ammonia_demand:
output:
"data/bundle/myb1-2021-nitro-ert.xlsx",
"data/bundle/myb1-2022-nitro-ert.xlsx",
log:
"logs/retrieve_ammonia_demand.log",
retries: 2

View File

@ -43,13 +43,13 @@ if __name__ == "__main__":
skiprows=5,
header=0,
index_col=0,
skipfooter=19,
skipfooter=7,
na_values=["--"],
)
ammonia.index = cc.convert(ammonia.index, to="iso2")
years = [str(i) for i in range(2017, 2022)]
years = [str(i) for i in range(2018, 2023)]
ammonia = ammonia.rename(columns=lambda x: str(x))[years]

View File

@ -303,7 +303,7 @@ def separate_basic_chemicals(demand, year):
demand["Ammonia"] = 0.0
year_to_use = min(max(year, 2017), 2021)
year_to_use = min(max(year, 2018), 2022)
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)]