Skip to content

Commit

Permalink
Merge pull request #931 from PyPSA/ammonia
Browse files Browse the repository at this point in the history
bugfix: include all countries in ammonia production resource
  • Loading branch information
fneum authored Feb 16, 2024
2 parents dc14082 + 84fc63d commit be3472d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
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

0 comments on commit be3472d

Please sign in to comment.