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

Naming of emission buses more open #185

Merged
merged 2 commits into from
Oct 29, 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name;type;balanced
co2;bus;false
ch4;bus;false
n2o;bus;false
emi_co2;bus;false
emi_ch4;bus;false
emi_n2o;bus;false
el_bus;bus;true
gas_bus;bus;true
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name;type;carrier;amount;bus;emission_bus_0;marginal_cost;output_parameters;emission_factor_co2
green_gas_import;commodity_ghg;gas;300;gas_bus;co2;20;{"max": [1, 1, 1]};-56
fossile_gas_import;commodity_ghg;gas;200;gas_bus;co2;10;{"max": [1, 0, 0]};56
name;type;carrier;amount;bus;emission_bus_0;marginal_cost;output_parameters;emission_factor_emi_co2
green_gas_import;commodity_ghg;gas;300;gas_bus;emi_co2;20;{"max": [1, 1, 1]};-56
fossile_gas_import;commodity_ghg;gas;200;gas_bus;emi_co2;10;{"max": [1, 0, 0]};56
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name;type;carrier;tech;capacity;from_bus;to_bus;emission_bus_0;emission_bus_1;emission_bus_2;marginal_cost;efficiency;emission_factor_co2;emission_factor_ch4;emission_factor_n2o
gtGHG;conversion_ghg;electricity;gt;300;gas_bus;el_bus;co2;ch4;n2o;10;0.5;56;0.4;0.017
name;type;carrier;tech;capacity;from_bus;to_bus;emission_bus_0;emission_bus_1;emission_bus_2;marginal_cost;efficiency;emission_factor_emi_co2;emission_factor_emi_ch4;emission_factor_emi_n2o
gtGHG;conversion_ghg;electricity;gt;300;gas_bus;el_bus;emi_co2;emi_ch4;emi_n2o;10;0.5;56;0.4;0.017
8 changes: 4 additions & 4 deletions src/oemof/tabular/examples/datapackages/GHG/datapackage.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@
"format": "default"
},
{
"name": "emission_factor_co2",
"name": "emission_factor_emi_co2",
"type": "number",
"format": "default"
},
{
"name": "emission_factor_ch4",
"name": "emission_factor_emi_ch4",
"type": "number",
"format": "default"
},
{
"name": "emission_factor_n2o",
"name": "emission_factor_emi_n2o",
"type": "number",
"format": "default"
}
Expand Down Expand Up @@ -213,7 +213,7 @@
"format": "default"
},
{
"name": "emission_factor_co2",
"name": "emission_factor_emi_co2",
"type": "number",
"format": "default"
}
Expand Down
2 changes: 1 addition & 1 deletion src/oemof/tabular/facades/commodity_ghg.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def init_emission_factors(self, buses, kwargs):
emission_factors = {}
for key, value in list(kwargs.items()):
if key.startswith("emission_factor"):
bus_label = key.split("_")[-1]
bus_label = key.removeprefix("emission_factor_")
try:
bus = [
bus
Expand Down
2 changes: 1 addition & 1 deletion src/oemof/tabular/facades/conversion_ghg.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def init_emission_factors(self, buses, kwargs):
"""Adds emission factors as `conversion_factors"""
for key, value in list(kwargs.items()):
if key.startswith("emission_factor"):
bus_label = key.split("_")[-1]
bus_label = key.removeprefix("emission_factor_")
try:
bus = [
bus
Expand Down
Loading