Changeset 274 for CCCC


Ignore:
Timestamp:
20/01/15 10:41:06 (5 years ago)
Author:
mjuckes
Message:

fixed bug with fixed files for CCMI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CCCC/trunk/ceda_cc/utils_c4.py

    r273 r274  
    269269    if self.pcfg.freqIndex != None: 
    270270      self.freq = self.fnParts[self.pcfg.freqIndex] 
    271     elif self.group == 'fx': 
     271    elif self.group in ['fx','fixed']: 
    272272      self.freq = 'fx' 
    273273    else: 
     
    285285        self.var = self.pcfg.fnvdict.get( self.var )['v'] 
    286286 
    287     self.isFixed = self.freq == 'fx' 
     287    self.isFixed = self.freq in ['fx','fixed'] 
    288288    if self.isFixed: 
    289289      self.test( len(self.fnParts) in self.pcfg.fnPartsOkFixedLen, 'Number of file name elements not acceptable for fixed data' ) 
     
    481481    if self.pcfg.varTables=='CMIP': 
    482482      contAts = ['long_name', 'standard_name', 'units'] 
    483       if varGroup != 'fx': 
     483      if varGroup not in ['fx','fixed']: 
    484484        contAts.append( 'cell_methods' ) 
    485485    else: 
     
    524524       self.log_pass() 
    525525 
    526     if varGroup != 'fx' and hcm: 
     526    if (varGroup not in ['fx','fixed']) and hcm: 
    527527      self.isInstantaneous = string.find( varAts[varName]['cell_methods'], 'time: point' ) != -1 
    528528    else: 
     
    615615    self.checkId = ('001','time_attributes') 
    616616    self.calendar = 'None' 
    617     if varGroup != 'fx': 
     617    if varGroup not in ['fx','fixed']: 
    618618      ok = True 
    619619      self.test( 'time' in da.keys(), 'Time dimension not found' , abort=True, part=True ) 
     
    10351035          freq = None 
    10361036 
    1037         isFixed = freq == 'fx' 
     1037        isFixed = freq  in ['fx','fixed'] 
    10381038        group = fnParts[ self.pcfg.groupIndex ] 
    10391039 
     
    11001100    keys.sort() 
    11011101    for k in keys: 
    1102       if k != 'fx': 
     1102      if k not in ['fx','fixed']: 
    11031103        keys2 = self.ee[k].keys() 
    11041104        keys2.sort() 
Note: See TracChangeset for help on using the changeset viewer.