Skip to content

Commit

Permalink
Fix uncertainty values in battery datasets.
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi authored and romainsacchi committed Aug 5, 2024
1 parent 02be4c1 commit c8c02dd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions premise/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def adjust_battery_mass(self) -> None:
[mean_2020_energy_density, mean_2050_energy_density],
),
0,
1,
None,
)

scaling_factor_min = minimum_2020_energy_density / np.clip(
Expand All @@ -247,7 +247,7 @@ def adjust_battery_mass(self) -> None:
[minimum_2020_energy_density, minimum_2050_energy_density],
),
0,
1,
None,
)

scaling_factor_max = maximum_2020_energy_density / np.clip(
Expand All @@ -257,7 +257,7 @@ def adjust_battery_mass(self) -> None:
[maximum_2020_energy_density, maximum_2050_energy_density],
),
0,
1,
None,
)

if "log parameters" not in ds:
Expand Down
Binary file modified premise/data/additional_inventories/lci-battery-capacity.xlsx
Binary file not shown.
6 changes: 3 additions & 3 deletions premise/data/battery/energy_density.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Li-S:
# value for 2050 from https://www.nature.com/articles/s41560-020-00748-8/figures/1
2050:
mean: 0.340
minimum: 0.185
minimum: 0.270
maximum: 0.500

SiB:
Expand All @@ -221,8 +221,8 @@ SiB:
# future values from https://doi.org/10.3390/batteries9070379.
2050:
mean: 0.200
minimum: 0.160
maximum: 0.220
minimum: 0.150
maximum: 0.230

VRFB:
ecoinvent_aliases:
Expand Down
16 changes: 8 additions & 8 deletions premise/transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,22 +1068,22 @@ def relink_datasets(self, excludes_datasets=None, alt_names=None):
"uncertainty type": exc.get("uncertainty type", 0),
"loc": (
exc.get("loc", 0) / exc["amount"]
if exc.get("loc")
if exc.get("loc", None) is not None
else None
),
"scale": (
exc.get("scale", 0) / exc["amount"]
if exc.get("scale")
if exc.get("scale", None) is not None
else None
),
"minimum": (
exc.get("minimum", 0) / exc["amount"]
if exc.get("minimum")
if exc.get("minimum", None) is not None
else None
),
"maximum": (
exc.get("maximum", 0) / exc["amount"]
if exc.get("maximum")
if exc.get("maximum", None) is not None
else None
),
}
Expand Down Expand Up @@ -1994,22 +1994,22 @@ def relink_technosphere_exchanges(
"uncertainty type": exc.get("uncertainty type", 0),
"loc": (
exc.get("loc", 0) / exc["amount"]
if exc.get("loc")
if exc.get("loc", None) is not None
else None
),
"scale": (
exc.get("scale", 0) / exc["amount"]
if exc.get("scale")
if exc.get("scale", None) is not None
else None
),
"minimum": (
exc.get("minimum", 0) / exc["amount"]
if exc.get("minimum")
if exc.get("minimum", None) is not None
else None
),
"maximum": (
exc.get("maximum", 0) / exc["amount"]
if exc.get("maximum")
if exc.get("maximum", None) is not None
else None
),
}
Expand Down

0 comments on commit c8c02dd

Please sign in to comment.