Open dbantje opened 4 days ago
The premise script used to create the datapackage is
from premise import *
import bw2data as bd
ei_version = "3.10"
bd.projects.set_current("pathways_testing_{}".format(ei_version))
scenarios=[
{"model": "remind", "pathway": "SSP2-NPi", }
]
for scenario in scenarios:
ndb = PathwaysDataPackage(
scenarios=[
scenario,
],
#years=[
# 2020,
#2050
#],
years=[2020, 2030, 2050],
source_db="ecoinvent-3.10-cutoff", # <-- name of the database in the BW2 project. Must be a string.
source_version=ei_version, # <-- version of ecoinvent. Can be "3.5", "3.6", "3.7" or "3.8". Must be a string.
key="tUePmX_S5B8ieZkkM7WUU2CnO8SmShwmAeWK9x2rTFo=",
use_absolute_efficiency=True,
biosphere_name="ecoinvent-3.10-biosphere"
)
ndb.create_datapackage()
and the pathways script
from pathways import Pathways
from datetime import datetime
p = Pathways(datapackage="pathways_2024-10-22.zip")
vars = [
"Wind Offshore"
]
recipe2016_methods = [m for m in p.lcia_methods if m.startswith("ReCiPe 2016 v1.03, midpoint (H) - ")]
p.calculate(
methods=recipe2016_methods,
scenarios=[
"SSP2-NPi",
#"SSP2-RCP19",
],
variables=vars,
years=[
2020,
2050
],
multiprocessing=True,
subshares=True,
use_distributions=0,
)
fname = f"results_shares_wind_{datetime.now().strftime('%Y%m%d_%H%M%S')}"
p.export_results(filename=fname)
I'll try to find some time fo this and your other issue this week.
Hi!
I'm getting the following error running
p.calculate
withshares=True
:I thought it was due to
technologies_shares.yml
not containing the right information, so I changed that to