Merge pull request #931 from PyPSA/ammonia
bugfix: include all countries in ammonia production resource
This commit is contained in:
commit
be3472dee9
@ -10,6 +10,11 @@ Release Notes
|
|||||||
Upcoming Release
|
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
|
* Regions are assigned to all buses with unique coordinates in the network with
|
||||||
a preference given to substations. Previously, only substations had assigned
|
a preference given to substations. Previously, only substations had assigned
|
||||||
regions, but this could lead to issues when a high spatial resolution was
|
regions, but this could lead to issues when a high spatial resolution was
|
||||||
|
@ -392,8 +392,6 @@ rule build_salt_cavern_potentials:
|
|||||||
|
|
||||||
|
|
||||||
rule build_ammonia_production:
|
rule build_ammonia_production:
|
||||||
params:
|
|
||||||
countries=config["countries"],
|
|
||||||
input:
|
input:
|
||||||
usgs="data/bundle-sector/myb1-2017-nitro.xls",
|
usgs="data/bundle-sector/myb1-2017-nitro.xls",
|
||||||
output:
|
output:
|
||||||
|
@ -25,13 +25,14 @@ if __name__ == "__main__":
|
|||||||
header=0,
|
header=0,
|
||||||
index_col=0,
|
index_col=0,
|
||||||
skipfooter=19,
|
skipfooter=19,
|
||||||
|
na_values=["--"],
|
||||||
)
|
)
|
||||||
|
|
||||||
ammonia.index = cc.convert(ammonia.index, to="iso2")
|
ammonia.index = cc.convert(ammonia.index, to="iso2")
|
||||||
|
|
||||||
years = [str(i) for i in range(2013, 2018)]
|
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
|
# convert from ktonN to ktonNH3
|
||||||
ammonia *= 17 / 14
|
ammonia *= 17 / 14
|
||||||
|
Loading…
Reference in New Issue
Block a user