Ignore:
Timestamp:
02/12/16 18:08:59 (3 years ago)
Author:
mjuckes
Message:

release candidate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/utilities.py

    r536 r885  
    11 
     2class gridOptionSort(object): 
     3  def __init__(self,oldpy=True): 
     4    self.od = {'1deg':'1001','2deg':'1002','native':'0102','DEF':'9000','':'9001','native:01':'0101'} 
     5    self.oldpy = oldpy 
     6 
     7  def cmp(self,x,y): 
     8    return cmp( self.od[x], self.od[y] ) 
     9 
     10  def sort(self,ll): 
     11    if self.oldpy: 
     12       return sorted( ll, cmp=self.cmp ) 
     13    else: 
     14       return sorted( ll, key=lambda x: self.od[x] ) 
     15     
    216class cmvFilter(object): 
    317  """Class to filter list of CMOR variables by rank. 
Note: See TracChangeset for help on using the changeset viewer.