Skip to content

Commit

Permalink
Advance integration of MESSAGE.
Browse files Browse the repository at this point in the history
Fix LCIs for electrolyzers.
Fix translation of outdated biosphere flows.
Update docs.
  • Loading branch information
romainsacchi committed Jul 27, 2023
1 parent 2f0a7d2 commit 6a51cf8
Show file tree
Hide file tree
Showing 14 changed files with 590 additions and 456 deletions.
1,011 changes: 560 additions & 451 deletions dev/Untitled.ipynb

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion docs/extract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,10 @@ The new datasets introduced are listed in the table below (only production datas
hydrogen production, gaseous, 25 bar, from gasification of woody biomass in entrained flow gasifier, with CCS, at gasification plant CH
hydrogen production, gaseous, 25 bar, from gasification of woody biomass in entrained flow gasifier, at gasification plant CH
hydrogen production, gaseous, 30 bar, from hard coal gasification and reforming, at coal gasification plant RER
hydrogen production, gaseous, 200 bar, from PEM electrolysis, from grid electricity RER
hydrogen production, gaseous, 30 bar, from PEM electrolysis, from grid electricity RER
hydrogen production, gaseous, 20 bar, from AEC electrolysis, from grid electricity RER
hydrogen production, gaseous, 1 bar, from SOEC electrolysis, from grid electricity RER
hydrogen production, gaseous, 1 bar, from SOEC electrolysis, with steam input, from grid electricity RER
hydrogen production, gaseous, 25 bar, from thermochemical water splitting, at solar tower RER
hydrogen production, gaseous, 100 bar, from methane pyrolysis RER
======================================================================================================================================= ===========
Expand Down
Binary file modified premise/data/additional_inventories/lci-Carma-CCS.xlsx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified premise/data/additional_inventories/lci-syngas.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion premise/data/fuels/hydrogen_activities.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from electrolysis:
name: hydrogen production, gaseous, 200 bar, from PEM electrolysis, from grid electricity
name: hydrogen production, gaseous, 30 bar, from PEM electrolysis, from grid electricity
var: hydrogen, electrolysis
feedstock name: electricity, low voltage
feedstock unit: kilowatt hour
Expand Down
3 changes: 3 additions & 0 deletions premise/electricity.py
Original file line number Diff line number Diff line change
Expand Up @@ -1964,6 +1964,9 @@ def create_missing_power_plant_datasets(self) -> None:
if "input" in e:
del e["input"]

ds["comment"] = "This dataset is a proxy dataset for a power plant. " \
"It is used to create missing power plant datasets."

self.database.extend(new_datasets.values())

mapping = InventorySet(self.database)
Expand Down
15 changes: 15 additions & 0 deletions premise/iam_variables_mapping/crops_variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ sugar:
remind:
temperate: sugarbeet
tropical: sugarcane
message:
temperate: sugarbeet
tropical: sugarcane
land_use:
image: Land Use|Marginal|Biomass|Sugar
land_use_change:
Expand All @@ -22,6 +25,9 @@ oil:
remind:
temperate: rapeseed
tropical: palm oil
message:
temperate: rapeseed
tropical: palm oil
land_use:
image: Land Use|Marginal|Biomass|OilCrop
land_use_change:
Expand All @@ -34,6 +40,9 @@ wood:
remind:
temperate: poplar
tropical: eucalyptus
message:
temperate: poplar
tropical: eucalyptus
land_use:
image: Land Use|Marginal|Biomass|Woody
land_use_change:
Expand All @@ -46,6 +55,9 @@ grass:
remind:
temperate: switchgrass
tropical: miscanthus
message:
temperate: switchgrass
tropical: miscanthus
land_use:
image: Land Use|Marginal|Biomass|Grassy
land_use_change:
Expand All @@ -58,6 +70,9 @@ grain:
remind:
temperate: corn
tropical: corn
message:
temperate: corn
tropical: corn
land_use:
image: Land Use|Marginal|Biomass|Maize
land_use_change:
Expand Down
2 changes: 1 addition & 1 deletion premise/iam_variables_mapping/fuels_variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ hydrogen, electrolysis:
remind: Tech|Hydrogen|Electricity|Efficiency
ecoinvent_aliases:
fltr:
- hydrogen production, gaseous, 200 bar, from PEM electrolysis, from grid electricity
- hydrogen production, gaseous, 30 bar, from PEM electrolysis, from grid electricity

hydrogen, solar:
lhv: 120
Expand Down
2 changes: 2 additions & 0 deletions premise/inventory_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ def add_biosphere_links(self, delete_missing: bool = False) -> None:
assert (
key in self.biosphere_dict
), f"Could not find a biosphere flow for {key}."
y["name"] = new_key[0]
else:
print(key)
continue
Expand All @@ -568,6 +569,7 @@ def add_biosphere_links(self, delete_missing: bool = False) -> None:
self.biosphere_dict[key],
)


def lower_case_technosphere_exchanges(self) -> None:
blakclist = [
"NOx",
Expand Down
6 changes: 4 additions & 2 deletions premise/transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ def fetch_proxies(
:param relink: if `relink`, exchanges from the datasets will be relinked to
the most geographically-appropriate providers from the database. This is computer-intensive.
:param regions: regions to create proxy datasets for. if None, all regions are considered.
:param delete_original_dataset: if True, delete original datasets from the database.
:param empty_original_activity: if True, empty original activities from exchanges.
:return: dictionary with IAM regions as keys, proxy datasets as values.
"""

Expand Down Expand Up @@ -592,10 +594,10 @@ def fetch_proxies(
if "input" in d_act[region]:
del d_act[region]["input"]

if production_variable:
if production_variable is not None:
# Add `production volume` field
if isinstance(production_variable, str):
production_variable = [production_variable]
production_variable = [production_variable, ]

if all(
i in self.iam_data.production_volumes.variables
Expand Down

0 comments on commit 6a51cf8

Please sign in to comment.