Skip to content

Commit

Permalink
Fix uncertainty params for a few datasets.
Browse files Browse the repository at this point in the history
Created datasets to provide 1 kWh of electricity from stationary batteries.
Renamed product of battery markets to "electricity storage capacity".
  • Loading branch information
romainsacchi authored and romainsacchi committed Aug 5, 2024
1 parent 16dc032 commit 4a99443
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 14 deletions.
Binary file modified premise/data/additional_inventories/lci-battery-capacity.xlsx
Binary file not shown.
Binary file modified premise/data/additional_inventories/lci-buses.xlsx
Binary file not shown.
Binary file modified premise/data/additional_inventories/lci-carbon-capture.xlsx
Binary file not shown.
Binary file modified premise/data/additional_inventories/lci-pass_cars.xlsx
Binary file not shown.
Binary file modified premise/data/additional_inventories/lci-trucks.xlsx
Binary file not shown.
Binary file modified premise/data/additional_inventories/lci-two_wheelers.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion premise/electricity.py
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ def create_region_specific_power_plants(self):
ws.either(
*[ws.contains("name", name) for name in list_datasets_to_duplicate]
),
# ws.exclude(ws.contains("name", "market")),
ws.exclude(ws.contains("name", "market")),
ws.exclude(ws.contains("name", ", oxy, ")),
ws.exclude(ws.contains("name", ", pre, ")),
):
Expand Down
2 changes: 1 addition & 1 deletion premise/iam_variables_mapping/electricity_variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ Solar PV Residential:
Storage, Battery:
ecoinvent_aliases:
fltr:
- market for battery capacity, stationary (CONT scenario)
- electricity supply, from stationary battery (CONT scenario)
iam_aliases:
image: Secondary Energy|Electricity|Storage
message: Secondary Energy|Electricity|Storage
Expand Down
22 changes: 10 additions & 12 deletions premise/inventory_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,22 +262,20 @@ def check_uncertainty_data(data, filename):
exc["uncertainty type"] = 0

if exc["uncertainty type"] not in {0, 1}:
if not all(
f in exc
for f in MANDATORY_UNCERTAINTY_FIELDS[exc["uncertainty type"]]
):
missing_parameters = [
f
for f in MANDATORY_UNCERTAINTY_FIELDS[
exc["uncertainty type"]
]
if exc.get(f) is None
]
if missing_parameters:
rows.append(
[
dataset["name"][:30],
exc["name"][:30],
exc["uncertainty type"],
[
f
for f in MANDATORY_UNCERTAINTY_FIELDS[
exc["uncertainty type"]
]
if f not in exc
],
missing_parameters
]
)

Expand All @@ -294,7 +292,7 @@ def check_uncertainty_data(data, filename):
]
)

if not exc["minimum"] <= exc["loc"] <= exc["maximum"]:
if not exc.get("minimum", 0) <= exc.get("loc", 0) <= exc.get("maximum", 0):
rows.append(
[
dataset["name"][:30],
Expand Down

0 comments on commit 4a99443

Please sign in to comment.