Ignore:
Timestamp:
08/11/07 18:17:40 (12 years ago)
Author:
astephen
Message:

Consolidation of titania version under DX with proper source in trunk of SVN.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/cdms2na.py

    r368 r3005  
    261261 
    262262def cdms2na(infilename, outfilenames, naVars={}, variables=None, nFilesOnly="no",  
    263             rule=None, ffi="automatic", spacer="    ", floatFormat="%8.3f",  
     263            rule=None, ffi="automatic", spacer="    ", floatFormat="%g",  
    264264            rules=None, sizeLimit=None): 
    265265    """ 
     
    430430        else:            
    431431            general.openNAFile(newname, 'w', builtNADict, spacer=spacer, floatFormat=floatFormat) 
    432         #nlhead=fixHeaderLength(newname)   
    433432 
    434433        msg="\nWrote the following variables:"+"\n\t"+("\n\t".join(i[1][0])) 
     
    528527 
    529528            # Deal with specific datasets with special rules 
    530             if self.rule[0]=="aircraft": 
     529            if self.rule!=None and self.rule[0]=="aircraft": 
    531530                var=self._useLocalRule(var, self.rule) 
    532531                if type(var)==type(None):  
     
    578577        for var in self.vars[:bestVarIndex-1]+self.vars[bestVarIndex:]: 
    579578            # Deal with specific datasets with special rules 
    580             if self.rule[0]=="aircraft": 
     579            if self.rule!=None and self.rule[0]=="aircraft": 
    581580                if var.rank()==2: 
    582581                    var=self._useLocalRule(var, self.rule) 
Note: See TracChangeset for help on using the changeset viewer.