Skip to content

Commit

Permalink
Fix issue with new RGI IDs (#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaussion committed Dec 11, 2022
1 parent b0b4aae commit c8bdf67
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions oggm/utils/_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2651,9 +2651,10 @@ def __init__(self, rgi_entity, base_dir=None, reset=False,
gstatus = '0'

# rgi version can be useful
rgi_version = self.rgi_id.split('-')[1][1] + self.rgi_id.split('-')[1][3]
if rgi_version == '70':
self.rgi_version = rgi_version
# RGI2000-v7.0-G-06-00029
# RGI60-07.00245
if self.rgi_id.count('-') == 4:
self.rgi_version = '70'
else:
rgi_version = self.rgi_id.split('-')[0][-2:]
if rgi_version not in ['50', '60', '61']:
Expand Down

0 comments on commit c8bdf67

Please sign in to comment.