def openFile(self, config_file, readonly = True): if self.debug: print '\t\treadARMS.openFile loading config file..' if config_file != None: try: self._config = testReader.getConfig(config_file) self.set_config_globals() self.set_file_names() self.set_preferred_coordinates() model_name = str(testReader.get_config_value(self._config,'Reader', 'ModelName')) if self.debug: print '\t\t\tresetting model_name attribute to', model_name self.globalAttributes['model_name'] = Attribute('model_name', model_name) except: raise if self.debug: print '\t\treadARMS.openFile setting current filename' self.current_filename = self.data_file_name self.read_ARMS_header(self.header_file_name) #defines variableNames if self.debug: print '\t\treadARMS.openFile initializing variable IDs and attributes' self.initializeVariableIDs() self.initializeVariableAttributeIDs() variables = self.variableNames.values() readARMS.variables_tuple = collections.namedtuple('Variables', variables) #so interpolate_variables can access it self.initializeGlobalAttributeIDs() #why did I comment this out? return pyKameleon.FileReader.OK
def __init__(self, config_file=None): # This line is required to call the base class constructor super(testReader.pyFileReader, self).__init__() if (config_file != None): self.Config = testReader.getConfig(config_file) self.variables = {}
def __init__(self, config_file = None): # This line is required to call the base class constructor super(testReader.pyFileReader, self).__init__() if (config_file != None): self.Config = testReader.getConfig(config_file) self.variables = {}
def __init__(self, config_file = None): # This line is required to call the base class constructor testReader.pyFileReader.__init__(self) if config_file != None: self._config = testReader.getConfig(config_file) self.set_file_names() self.tree_data = {} self.leaf_data = {} self.roots = [] # sorted by R,T,P bounding box minima self.last_key = None self.visited = {} self.missing_value = -256.*-256.*-256.*-256.*-256. self.leaf_iterations = 0
def __init__(self, config_file=None): # This line is required to call the base class constructor testReader.pyFileReader.__init__(self) if config_file != None: self._config = testReader.getConfig(config_file) self.set_file_names() self.tree_data = {} self.leaf_data = {} self.roots = [] # sorted by R,T,P bounding box minima self.last_key = None self.visited = {} self.missing_value = -256. * -256. * -256. * -256. * -256. self.leaf_iterations = 0
def __init__(self, config_file = None): # This line is required to call the base class constructor testReader.pyFileReader.__init__(self) if config_file != None: self._config = testReader.getConfig(config_file) self.set_config_globals() self.set_file_names() self.set_preferred_coordinates() self.tree_data = {} self.leaf_data = {} self.roots = [] # sorted by R,T,P bounding box minima self.last_key = None self.visited = {} self.leaf_iterations = 0 self._data_loaded = False self._tolerance = .0001 self.globalAttributes['model_name'] = Attribute('model_name', 'ARMs')
def openFile(self, config_file, readonly = True): # print 'loading config file' if config_file != None: try: self._config = testReader.getConfig(config_file) self.set_file_names() except: raise # print 'setting current filename' self.current_filename = self.data_file_name self.read_ARMS_header(self.header_file_name) self.read_ARMS_data(self.data_file_name) self.initializeVariableIDs() self.initializeVariableAttributeIDs() variables = self.variableNames.values() readARMS.variables_tuple = collections.namedtuple('Variables', variables) #so interpolate_variables can access it # self.initializeGlobalAttributeIDs() # for key, val in self.globalAttributes.items(): # print key, val return pyKameleon.FileReader.OK
def openFile(self, config_file, readonly=True): # print 'loading config file' if config_file != None: try: self._config = testReader.getConfig(config_file) self.set_file_names() except: raise # print 'setting current filename' self.current_filename = self.data_file_name self.read_ARMS_header(self.header_file_name) self.read_ARMS_data(self.data_file_name) self.initializeVariableIDs() self.initializeVariableAttributeIDs() variables = self.variableNames.values() readARMS.variables_tuple = collections.namedtuple( 'Variables', variables) #so interpolate_variables can access it # self.initializeGlobalAttributeIDs() # for key, val in self.globalAttributes.items(): # print key, val return pyKameleon.FileReader.OK