Merge pull request #931 from PyPSA/ammonia

bugfix: include all countries in ammonia production resource
This commit is contained in:
Fabian Neumann 2024-02-16 12:14:07 +01:00 committed by GitHub
commit be3472dee9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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:

View File

@ -25,13 +25,14 @@ if __name__ == "__main__":
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