【问题标题】:How to import EF 3.0 method in Brightway2?如何在 Brightway2 中导入 EF 3.0 方法?
【发布时间】:2021-12-30 12:48:44
【问题描述】:

我的同事,在最近更新 Brightway2 后,可以在可用的范围内看到 EF3.0 方法。 我尝试做同样的事情,但它不起作用(我有一些新方法,但没有 EF3.0)。 这就是我所做的:

Conda update conda
Conda update brightway2

在光明大道

import brightway2 as bw
bw.Database('biosphere3').delete()
bw.Database('biosphere3').deregister()
bw.projects
bw.projects.delete_project('Name of my project',delete_dir=True)
bw.projects.report()
bw.databases
bw.databases.clear()
bw.bw2setup() #Import of biosphere3
# Import ecoinvent 3.7 

ei37dir ="*my directory*"

if 'ecoinvent 3.7_cutoff' in bw.databases:
    print("Database has already been imported")
else:
    ei37 = bw.SingleOutputEcospold2Importer(ei37dir, 'ecoinvent 3.7_cutoff') 
    ei37.apply_strategies()
    ei37.statistics()
    ei37.drop_unlinked(True)

ei37.write_database()
list(bw.methods)

如何实现 EF3.0? 提前谢谢你

凯文

【问题讨论】:

    标签: jupyter-notebook brightway


    【解决方案1】:

    EF 方法是在bw2io 0.8.6 版中添加的。您需要更新到此库版本,然后重新安装 LCIA 方法(与您拥有的 ecoinvent 版本没有任何关系,LCIA 方法是单独的)。

    在一个新项目中,只需调用bw2setup() 就可以了。在旧项目中,您需要重写生物圈流列表和 LCIA 方法:

    import bw2io as bi
    bi.create_default_biosphere3(overwrite=True)
    bi.create_default_lcia_methods(overwrite=True)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多