nappy/nc_interface/na_to_cdms.py
def _convertCdmsAuxVariables(self):
        """
        Creates a cdms variable from an auxiliary variable
        """
        self.cdms_aux_variables = []

        if self.aux_variables in (None, "all"):
            for avar_number in range(self.na_file_obj.NAUXV):
                self.cdms_aux_variables.append(self._convertNAAuxToCdmsVariable(avar_number))
        else:
            if type(self.aux_variables[0]) == type(1): # They are integers = indices
                for avar_number in self.aux_variables:
                    self.cdms_aux_variables.append(self._convertNAAuxToCdmsVariable(avar_number))   

            elif type(self.aux_variables[0]) == type("string"): # They are strings
                for avar_name in self.aux_variables:
                    if avar_name in self.na_file_obj.ANAME:
                        avar_number = self.na_file_obj.ANAME.index(avar_name)
                        self.cdms_aux_variables.append(self._convertNAAuxToCdmsVariable(avar_number)) 
            else:
                raise Exception("Auxiliary variable name not known: " + avar_name)

        Creates a cdms variable from an auxiliary variable
        
Creates a cdms variable from an auxiliary variable
Creates a cdms variable from an auxiliary variable
def _convertCdmsAuxVariables(self):
        self.cdms_aux_variables = []
        if self.aux_variables in (None, "all"):
            for avar_number in range(self.na_file_obj.NAUXV):
                self.cdms_aux_variables.append(self._convertNAAuxToCdmsVariable(avar_number))
        else:
            if type(self.aux_variables[0]) == type(1): 
                for avar_number in self.aux_variables:
                    self.cdms_aux_variables.append(self._convertNAAuxToCdmsVariable(avar_number))   
            elif type(self.aux_variables[0]) == type("string"): 
                for avar_name in self.aux_variables:
                    if avar_name in self.na_file_obj.ANAME:
                        avar_number = self.na_file_obj.ANAME.index(avar_name)
                        self.cdms_aux_variables.append(self._convertNAAuxToCdmsVariable(avar_number)) 
            else:
                raise Exception("Auxiliary variable name not known: " + avar_name)
def _convertCdmsAuxVariables ( self ) : self . cdms_aux_variables = [ ] if self . aux_variables in ( None , "all" ) : for avar_number in range ( self . na_file_obj . NAUXV ) : self . cdms_aux_variables . append ( self . _convertNAAuxToCdmsVariable ( avar_number ) ) else : if type ( self . aux_variables [ 0 ] ) == type ( 1 ) : for avar_number in self . aux_variables : self . cdms_aux_variables . append ( self . _convertNAAuxToCdmsVariable ( avar_number ) ) elif type ( self . aux_variables [ 0 ] ) == type ( "string" ) : for avar_name in self . aux_variables : if avar_name in self . na_file_obj . ANAME : avar_number = self . na_file_obj . ANAME . index ( avar_name ) self . cdms_aux_variables . append ( self . _convertNAAuxToCdmsVariable ( avar_number ) ) else : raise Exception ( "Auxiliary variable name not known: " + avar_name )
Creates a cdms variable from an auxiliary variable
Creates a cdms variable from an auxiliary variable
"""
        Creates a cdms variable from an auxiliary variable
        """ # They are integers = indices # They are strings
self