From 3ea2ff162bd389c6b050d9931952a2ab91f5671b Mon Sep 17 00:00:00 2001 From: "Matthew Dillon (diogenes)" Date: Mon, 16 Sep 2013 07:19:57 -0800 Subject: [PATCH] Added 'resolution' attribute, fixed setup.py --- setup.py | 2 +- snapextract/_backend.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 95024fc..6a92b63 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages -with open('README') as f: +with open('README.md') as f: readme = f.read() with open('LICENSE') as f: diff --git a/snapextract/_backend.py b/snapextract/_backend.py index 00eb0ae..d2d0ce2 100755 --- a/snapextract/_backend.py +++ b/snapextract/_backend.py @@ -42,7 +42,8 @@ class SNAPDataSet: if 'historical' in components: # HISTORICAL DATA self.model = 'CRU' - self.scenario = components[components.index('CRU')+1] + self.scenario = components[components.index('CRU') + 1] + self.resolution = components[components.index('CRU') - 1] else: # PROJECTION DATA for comp in components: @@ -52,6 +53,7 @@ class SNAPDataSet: self.scenario = comp.replace('sres', '').upper() endmarker = components.index(comp) self.model = "_".join(components[startmarker:endmarker]) + self.resolution = components[startmarker - 1] def load_dataset(self):