nappy/contrib/aircraft/old_na_to_nc_with_aircraft.py
def defineGeneralHeader(self, header_items={}):
        """
	Defines known header items and overwrites any with header_items 
	key/value pairs.
	"""
	# Check if DATE field previously known in NASA Ames file
	time_now=time.strftime("%Y %m %d", time.localtime(time.time())).split()
	if not self.na_dict.has_key("RDATE"):
	    self.na_dict["RDATE"]=time_now
	
        if self.ax0.isTime():
            # Get first date in list
	    try:
                (unit, start_date)=re.match("(\w+)\s+?since\s+?(\d+-\d+-\d+)", self.ax0.units).groups()            
                comptime=cdtime.s2c(start_date)
                first_day=comptime.add(self.na_dict["X"][0][0], getattr(cdtime, unit.capitalize()))
                self.na_dict["DATE"]=string.replace(str(first_day).split(" ")[0], "-", " ").split()
	    except:
	        msg="Nappy Warning: Could not get the first date in the file. You will need to manually edit the output file."
		print msg
		self.outputMessage.append(msg)
		self.na_dict["DATE"]=("DATE", "NOT", "KNOWN")
        else: 
            if not self.na_dict.has_key("DATE"):
	        msg="Nappy Warning: Could not get the first date in the file. You will need to manually edit the output file."
		print msg
		self.outputMessage.append(msg)
	        self.na_dict["DATE"]=("DATE", "NOT", "KNOWN")
        self.na_dict["IVOL"]=1
        self.na_dict["NVOL"]=1
        for key in header_items.keys():
             self.na_dict[key]=header_items[key]
        return

	Defines known header items and overwrites any with header_items 
	key/value pairs.
	
Defines known header items and overwrites any with header_items
key/value pairs.
Defines known header items and overwrites any with header_items key / value pairs .
def defineGeneralHeader(self, header_items={}):
	time_now=time.strftime("%Y %m %d", time.localtime(time.time())).split()
	if not self.na_dict.has_key("RDATE"):
	    self.na_dict["RDATE"]=time_now
        if self.ax0.isTime():
	    try:
                (unit, start_date)=re.match("(\w+)\s+?since\s+?(\d+-\d+-\d+)", self.ax0.units).groups()            
                comptime=cdtime.s2c(start_date)
                first_day=comptime.add(self.na_dict["X"][0][0], getattr(cdtime, unit.capitalize()))
                self.na_dict["DATE"]=string.replace(str(first_day).split(" ")[0], "-", " ").split()
	    except:
	        msg="Nappy Warning: Could not get the first date in the file. You will need to manually edit the output file."
		print msg
		self.outputMessage.append(msg)
		self.na_dict["DATE"]=("DATE", "NOT", "KNOWN")
        else: 
            if not self.na_dict.has_key("DATE"):
	        msg="Nappy Warning: Could not get the first date in the file. You will need to manually edit the output file."
		print msg
		self.outputMessage.append(msg)
	        self.na_dict["DATE"]=("DATE", "NOT", "KNOWN")
        self.na_dict["IVOL"]=1
        self.na_dict["NVOL"]=1
        for key in header_items.keys():
             self.na_dict[key]=header_items[key]
        return
def defineGeneralHeader ( self , header_items = { } ) : time_now = time . strftime ( "%Y %m %d" , time . localtime ( time . time ( ) ) ) . split ( ) if not self . na_dict . has_key ( "RDATE" ) : self . na_dict [ "RDATE" ] = time_now if self . ax0 . isTime ( ) : try : ( unit , start_date ) = re . match ( "(\w+)\s+?since\s+?(\d+-\d+-\d+)" , self . ax0 . units ) . groups ( ) comptime = cdtime . s2c ( start_date ) first_day = comptime . add ( self . na_dict [ "X" ] [ 0 ] [ 0 ] , getattr ( cdtime , unit . capitalize ( ) ) ) self . na_dict [ "DATE" ] = string . replace ( str ( first_day ) . split ( " " ) [ 0 ] , "-" , " " ) . split ( ) except : msg = "Nappy Warning: Could not get the first date in the file. You will need to manually edit the output file." print msg self . outputMessage . append ( msg ) self . na_dict [ "DATE" ] = ( "DATE" , "NOT" , "KNOWN" ) else : if not self . na_dict . has_key ( "DATE" ) : msg = "Nappy Warning: Could not get the first date in the file. You will need to manually edit the output file." print msg self . outputMessage . append ( msg ) self . na_dict [ "DATE" ] = ( "DATE" , "NOT" , "KNOWN" ) self . na_dict [ "IVOL" ] = 1 self . na_dict [ "NVOL" ] = 1 for key in header_items . keys ( ) : self . na_dict [ key ] = header_items [ key ] return
Defines known header items and overwrites any with header_items
key/value pairs.
Defines known header items and overwrites any with header_items key / value pairs .
"""
	Defines known header items and overwrites any with header_items 
	key/value pairs.
	""" # Check if DATE field previously known in NASA Ames file
 # Get first date in list

self
header_items