Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Loisel/lca2rmnd
Browse files Browse the repository at this point in the history
  • Loading branch information
Loisel committed Mar 1, 2021
2 parents 65b6df5 + 91de51b commit dcdecab
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lca2rmnd/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ class LCAReporting():
:vartype source_db: str
"""
def __init__(self, scenario, years, project,
remind_output_folder, regions,
methods):
remind_output_folder,
methods, regions=None):
self.years = years
self.scenario = scenario
self.model = "remind"
self.regions = regions
bw.projects.set_current(project)
self.selector = ActivitySelector()
self.methods = methods
Expand All @@ -60,8 +59,12 @@ def __init__(self, scenario, years, project,
rdc = RemindDataCollection(self.scenario, remind_output_folder)
self.data = rdc.data[rdc.data.Year.isin(self.years) &
(rdc.data.Region != "World")]
# all regions there?
assert self.regions in self.data.Region.unique()
if regions is None:
self.regions = self.data.Region.unique()
else:
# all regions there?
self.regions = regions
assert self.regions in self.data.Region.unique()
self.geo = Geomap(self.model)


Expand Down

0 comments on commit dcdecab

Please sign in to comment.