nappy/contrib/aircraft/old_na_to_nc_with_aircraft.py
def defineNAVars(self, vars):
        """
	Method to define NASA Ames file object variables and their
	associated metadata.
	"""
        self.na_dict["NV"]=len(vars)
        self.na_dict["VNAME"]=[]
        self.na_dict["VMISS"]=[]
        self.na_dict["VSCAL"]=[]
        self.na_dict["V"]=[]
        for var in vars:
            name=getBestName(var)
            self.na_dict["VNAME"].append(name)
            miss=getMissingValue(var)
            if type(miss) not in (float, int, long):  miss=miss[0]
            self.na_dict["VMISS"].append(miss)
            #print self.na_dict["VMISS"]
            self.na_dict["VSCAL"].append(1)
            # AND THE ARRAY
            # Populate the variable list  
            ######## NOTE - might not have to do this #####
            ######## It  might handle writing from a Numeric array ########
            self.na_dict["V"].append(var._data)
            #listOfListsCreator(inlist, var.shape)
            #arrayToList(var, inlist)

            if not self.na_dict.has_key("X"):
                self.na_dict["NXDEF"]=[]
                self.na_dict["NX"]=[]
                # Create independent variable information
		#print var.id, var.getAxis(0)
                self.ax0=var.getAxis(0)
                self.na_dict["X"]=[list(self.ax0._data_)]
                self.na_dict["XNAME"]=[getBestName(self.ax0)]
                if len(self.ax0)==1:
                    self.na_dict["DX"]=[0]
                else:
                    incr=self.ax0[1]-self.ax0[0]
		    # Set default increment as gap between first two
		    self.na_dict["DX"]=[incr]
		    # Now overwrite it as zero if non-uniform interval in axis
                    for i in range(1, len(self.ax0)):
                        if (self.ax0[i]-self.ax0[i-1])!=incr:
                            self.na_dict["DX"]=[0]
                            break

                # Now sort the rest of the axes
                for axis in var.getAxisList()[1:]:
                    self.getAxisDefinition(axis)

	Method to define NASA Ames file object variables and their
	associated metadata.
	
Method to define NASA Ames file object variables and their
associated metadata.
Method to define NASA Ames file object variables and their associated metadata .
def defineNAVars(self, vars):
        self.na_dict["NV"]=len(vars)
        self.na_dict["VNAME"]=[]
        self.na_dict["VMISS"]=[]
        self.na_dict["VSCAL"]=[]
        self.na_dict["V"]=[]
        for var in vars:
            name=getBestName(var)
            self.na_dict["VNAME"].append(name)
            miss=getMissingValue(var)
            if type(miss) not in (float, int, long):  miss=miss[0]
            self.na_dict["VMISS"].append(miss)
            self.na_dict["VSCAL"].append(1)
            self.na_dict["V"].append(var._data)
            if not self.na_dict.has_key("X"):
                self.na_dict["NXDEF"]=[]
                self.na_dict["NX"]=[]
                self.ax0=var.getAxis(0)
                self.na_dict["X"]=[list(self.ax0._data_)]
                self.na_dict["XNAME"]=[getBestName(self.ax0)]
                if len(self.ax0)==1:
                    self.na_dict["DX"]=[0]
                else:
                    incr=self.ax0[1]-self.ax0[0]
		    self.na_dict["DX"]=[incr]
                    for i in range(1, len(self.ax0)):
                        if (self.ax0[i]-self.ax0[i-1])!=incr:
                            self.na_dict["DX"]=[0]
                            break
                for axis in var.getAxisList()[1:]:
                    self.getAxisDefinition(axis)
def defineNAVars ( self , vars ) : self . na_dict [ "NV" ] = len ( vars ) self . na_dict [ "VNAME" ] = [ ] self . na_dict [ "VMISS" ] = [ ] self . na_dict [ "VSCAL" ] = [ ] self . na_dict [ "V" ] = [ ] for var in vars : name = getBestName ( var ) self . na_dict [ "VNAME" ] . append ( name ) miss = getMissingValue ( var ) if type ( miss ) not in ( float , int , long ) : miss = miss [ 0 ] self . na_dict [ "VMISS" ] . append ( miss ) self . na_dict [ "VSCAL" ] . append ( 1 ) self . na_dict [ "V" ] . append ( var . _data ) if not self . na_dict . has_key ( "X" ) : self . na_dict [ "NXDEF" ] = [ ] self . na_dict [ "NX" ] = [ ] self . ax0 = var . getAxis ( 0 ) self . na_dict [ "X" ] = [ list ( self . ax0 . _data_ ) ] self . na_dict [ "XNAME" ] = [ getBestName ( self . ax0 ) ] if len ( self . ax0 ) == 1 : self . na_dict [ "DX" ] = [ 0 ] else : incr = self . ax0 [ 1 ] - self . ax0 [ 0 ] self . na_dict [ "DX" ] = [ incr ] for i in range ( 1 , len ( self . ax0 ) ) : if ( self . ax0 [ i ] - self . ax0 [ i - 1 ] ) != incr : self . na_dict [ "DX" ] = [ 0 ] break for axis in var . getAxisList ( ) [ 1 : ] : self . getAxisDefinition ( axis )
Method to define NASA Ames file object variables and their
associated metadata.
Method to define NASA Ames file object variables and their associated metadata .
"""
	Method to define NASA Ames file object variables and their
	associated metadata.
	""" #print self.na_dict["VMISS"]
 # AND THE ARRAY
 # Populate the variable list  
 ######## NOTE - might not have to do this #####
 ######## It  might handle writing from a Numeric array ########
 #listOfListsCreator(inlist, var.shape)
 #arrayToList(var, inlist)
 # Create independent variable information
 #print var.id, var.getAxis(0)
 # Set default increment as gap between first two
 # Now overwrite it as zero if non-uniform interval in axis
 # Now sort the rest of the axes

self
vars