Skip to content

Commit

Permalink
chore(data): Add irrigation to the Ecoinvent organic cotton (#832)
Browse files Browse the repository at this point in the history
## 🔧 Problem

The organic cotton is a EI-modified one with only irrigation added. It's
impacts are hardcoded and not retrieved from either simapro or
brightway.

## 🍰 Solution

Use the Ecoinvent organic cotton and add a strategy to add irrigation to
it during import.

## 🚨  Points to watch/comments

This may only applies on brightway, as I'm unsure where to find the
modified organic cotton in SimaPro. It would be great to first merge
#822

## 🏝️ How to test

Run the `make clean_data import_ecoinvent` then check in brightway / EI
3.9.1 and EI 3.10 that the organic cotton has an irrigation in the
technosphere.
Compare the new impact with the previous ones.

ecobalyse-data: organic_cotton
  • Loading branch information
ccomb authored Nov 21, 2024
1 parent ef6287d commit 1939b77
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 31 deletions.
4 changes: 2 additions & 2 deletions data/common/import_.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,13 @@ def import_simapro_csv(
print("### Applying strategies...")
# exclude strategies/migrations
database.strategies = (
first_strategies
list(first_strategies)
+ [
s
for s in database.strategies
if not any([e in repr(s) for e in excluded_strategies])
]
+ other_strategies
+ list(other_strategies)
)

database.apply_strategies()
Expand Down
29 changes: 29 additions & 0 deletions data/import_ecoinvent.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,33 @@
]


def organic_cotton_irrigation(db):
"""add irrigation to the organic cotton"""
for ds in db:
if ds.get("simapro metadata", {}).get("Process identifier") in (
"MTE00149000081182217968", # EI 3.9.1
"EI3ARUNI000011519618166", # EI 3.10
):
# add: irrigation//[IN] market for irrigation;m3;0.75;Undefined;0;0;0;;
ds["exchanges"].append(
{
"amount": 0.75,
"categories": ("Materials/fuels",),
"comment": "",
"loc": 0.75,
"name": "irrigation//[IN] market for irrigation",
"negative": False,
"type": "technosphere",
"uncertainty type": 2,
"unit": "cubic meter",
}
)
return db


STRATEGIES = [organic_cotton_irrigation]


def main():
projects.set_current(PROJECT)
# projects.create_project(PROJECT, activate=True, exist_ok=True)
Expand All @@ -31,6 +58,7 @@ def main():
import_simapro_csv(
join("..", "..", "dbfiles", EI391),
db,
first_strategies=STRATEGIES,
excluded_strategies=EXCLUDED,
)
else:
Expand All @@ -40,6 +68,7 @@ def main():
import_simapro_csv(
join("..", "..", "dbfiles", EI310),
db,
first_strategies=STRATEGIES,
excluded_strategies=EXCLUDED,
)

Expand Down
28 changes: 3 additions & 25 deletions data/textile/activities.json
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@
{
"displayName": "Production de fibres de coton bio",
"info": "Textile > Matières > Matières naturelles",
"source": "Custom",
"source": "Ecoinvent 3.9.1",
"search": "fibre, cotton, organic//[RoW] fibre production, cotton, organic, ginning",
"correctif": "",
"step_usage": "Matières",
"uuid": "coton-bio",
Expand All @@ -603,30 +604,7 @@
"geographicOrigin": "Asie - Pacifique",
"defaultCountry": "CN",
"priority": 100,
"unit": "kg",
"impacts": {
"acd": 0.0306797,
"cch": 0.680164,
"etf": 5.1314,
"etf-c": 5.2637,
"fru": 1.65306,
"fwe": 0.0121382,
"htc": 5.32889e-9,
"htc-c": 6.73849e-11,
"htn": -2.36397e-7,
"htn-c": 3.03781e-10,
"ior": 0.0037548,
"ldu": 696.27,
"mru": 9.15075e-7,
"ozd": 1.15859e-9,
"pco": 0.0042632,
"pma": 1.97418e-7,
"swe": 0.0813382,
"tre": 0.1392,
"wtu": 32.2334,
"ecs": 618.962439739018,
"pef": 736.2192841211813
}
"unit": "kg"
},
{
"displayName": "Production de chanvre",
Expand Down
8 changes: 4 additions & 4 deletions public/data/textile/processes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1102,11 +1102,11 @@
"alias": null
},
{
"name": "Production de fibres de coton bio",
"name": "fibre, cotton, organic//[RoW] fibre production, cotton, organic, ginning",
"displayName": "Production de fibres de coton bio",
"info": "Textile > Matières > Matières naturelles",
"unit": "kg",
"source": "Custom",
"source": "Ecoinvent 3.9.1",
"correctif": "",
"step_usage": "Matières",
"uuid": "coton-bio",
Expand All @@ -1130,8 +1130,8 @@
"swe": 0,
"tre": 0,
"wtu": 0,
"ecs": 618.9624397390182,
"pef": 736.2192841211813
"ecs": 421.8780180420624,
"pef": 488.6208132830078
},
"heat_MJ": 0,
"elec_pppm": 0,
Expand Down

0 comments on commit 1939b77

Please sign in to comment.