Skip to content

Commit

Permalink
Merge pull request #8 from IMMM-SFA/region-name
Browse files Browse the repository at this point in the history
Added clause for extractor output
  • Loading branch information
crvernon authored Feb 6, 2019
2 parents 35ba7c2 + 6807273 commit 75ab68d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions demeter/demeter_io/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ def read_gcam_file(log, f, gcam_landclasses, start_yr, end_yr, scenario, region_
# assign user-defined scenario to data frame
gdf['scenario'] = scenario

# check for extractor output which makes region ... gcam_region_name
try:
gdf['region'] = gdf['gcam_region_name']
except KeyError:
pass

# create a list of GCAM years from header that are within the user specified year range
user_years = _get_steps(gdf, start_yr, end_yr)

Expand Down

0 comments on commit 75ab68d

Please sign in to comment.