Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: include all countries in ammonia production resource #931

Merged
merged 4 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Release Notes
Upcoming Release
================


* Include all countries in ammonia production resource. This is so that the full
EU28 ammonia demand can be correctly subtracted in the rule
:mod:`build_industry_sector_ratios`.

* Regions are assigned to all buses with unique coordinates in the network with
a preference given to substations. Previously, only substations had assigned
regions, but this could lead to issues when a high spatial resolution was
Expand Down
2 changes: 0 additions & 2 deletions rules/build_sector.smk
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,6 @@ rule build_salt_cavern_potentials:


rule build_ammonia_production:
params:
countries=config["countries"],
input:
usgs="data/bundle-sector/myb1-2017-nitro.xls",
output:
Expand Down
5 changes: 3 additions & 2 deletions scripts/build_ammonia_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@
header=0,
index_col=0,
skipfooter=19,
na_values=["--"],
)

ammonia.index = cc.convert(ammonia.index, to="iso2")

years = [str(i) for i in range(2013, 2018)]
countries = ammonia.index.intersection(snakemake.params.countries)
ammonia = ammonia.loc[countries, years].astype(float)

ammonia = ammonia[years]

# convert from ktonN to ktonNH3
ammonia *= 17 / 14
Expand Down
Loading