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

Fixes conversion factor by CH4 load aborad eGon2035 #1107

Merged
merged 3 commits into from Mar 14, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -712,6 +712,8 @@ Bug Fixes
* Fix URL of TYNDP scenario dataset
* Automatically generated tasks now get unique :code:`task_id`\s.
Fixes issue `#985`_ via PR `#986`_.
* Fix conversion factor for CH4 loads abroad in eGon2035
`#1104 <https://github.com/openego/eGon-data/issues/1104>`_

.. _PR #692: https://github.com/openego/eGon-data/pull/692
.. _#343: https://github.com/openego/eGon-data/issues/343
Expand Down
2 changes: 1 addition & 1 deletion src/egon/data/datasets/gas_neighbours/__init__.py
Expand Up @@ -16,7 +16,7 @@ class GasNeighbours(Dataset):
def __init__(self, dependencies):
super().__init__(
name="GasNeighbours",
version="0.0.3",
version="0.0.4",
dependencies=dependencies,
tasks=(
{tyndp_gas_generation, tyndp_gas_demand, grid},
Expand Down
14 changes: 7 additions & 7 deletions src/egon/data/datasets/gas_neighbours/eGon2035.py
Expand Up @@ -593,8 +593,8 @@ def calc_global_ch4_demand(Norway_global_demand_1y):
.drop(columns=["Parameter", "Year"])
)

# Conversion GWh/d to MWh/h
conversion_factor = 1000 / 24
# Conversion GWh/d to MWh/y
conversion_factor = 1000 * 365

df_2035 = pd.concat([df_2040, df_2030], axis=1)
df_2035["GlobD_2035"] = (
Expand All @@ -603,7 +603,7 @@ def calc_global_ch4_demand(Norway_global_demand_1y):
df_2035.loc["NOS0"] = [
0,
0,
Norway_global_demand_1y / 8760,
Norway_global_demand_1y,
] # Manually add Norway demand
grouped_demands = df_2035.drop(
columns=["Value_2030", "Value_2040"]
Expand Down Expand Up @@ -938,8 +938,8 @@ def calc_global_power_to_h2_demand():

Returns
-------
pandas.DataFrame
Global power-to-h2 demand per foreign node
global_power_to_h2_demand : pandas.DataFrame
Global hourly power-to-h2 demand per foreign node

"""
sources = config.datasets()["gas_neighbours"]["sources"]
Expand Down Expand Up @@ -1026,12 +1026,12 @@ def insert_power_to_h2_demand(global_power_to_h2_demand):
"""Insert H2 demands into database for eGon2035

Detailled description
This function insert data in the database and has no return.
This function inserts data in the database and has no return.

Parameters
----------
global_power_to_h2_demand : pandas.DataFrame
Global H2 demand per foreign node in 1 year
Global hourly power-to-h2 demand per foreign node

"""
sources = config.datasets()["gas_neighbours"]["sources"]
Expand Down