Changeset 592


Ignore:
Timestamp:
08/02/16 12:10:38 (3 years ago)
Author:
apm
Message:

remove redundant commented-out code; add trap for cdms2.error.CDMSError

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CCCC/branches/branch-apm/ceda_cc/c4_run.py

    r456 r592  
    3939## pkgutil is used in file_utils 
    4040# Third party imports 
    41  
     41import cdms2 
    4242## Local imports with 3rd party dependencies 
    4343#### netcdf --- currently only support for cmds2 -- re-arranged to facilitate support for alternative modules 
     
    5757from fcc_utils2 import tupsort 
    5858 
    59  
    60 #driving_model_ensemble_member = <CMIP5Ensemble_member> 
    61 #rcm_version_id = <RCMVersionID>                      
     59          
    6260 
    6361class dummy(object): 
     
    186184 
    187185    # Define vocabs based on project 
    188     ##self.vocabs = getVocabs(pcgf) 
    189186    self.vocabs = pcfg.vocabs 
    190187 
     
    230227      return 
    231228 
    232     ##self.cgd.plevRequired = config.plevRequired 
    233     ##self.cgd.plevValues = config.plevValues 
    234     ##self.cgd.heightRequired = config.heightRequired 
    235     ##self.cgd.heightValues = config.heightValues 
    236     ##self.cgd.heightRange = config.heightRange 
    237229    self.cgd.check( self.cfn.var, self.cfn.freq, self.da, self.va, self.cga.isInstantaneous, self.vocabs ) 
    238230    self.calendar = self.cgd.calendar 
     
    242234 
    243235    if self.info.pcfg.doCheckGrids: 
    244       ##self.cgg.rotatedPoleGrids = config.rotatedPoleGrids 
    245       ##self.cgg.interpolatedGrids = config.interpolatedGrids 
    246236      self.cgg.check( self.cfn.var, self.cfn.domain, self.da, self.va ) 
    247237     
     
    365355          c4i.logger.info( 'Done -- testing aborted because of severity of errors' ) 
    366356          rec.addErr( f, 'ERRORS FOUND AND CHECKS ABORTED' ) 
     357      except cdms2.error.CDMSError as cdms_error: 
     358        kf -= 1 
     359        c4i.logger.error("CDMSError has occured" ) 
     360        c4i.logger.error(cdms_error ) 
     361        #print "CDMSError has occured" , cdms_error 
     362        if fileLogOpen: 
     363          fLogger.error("C4.100.001: [exception]: FAILED:: CDMSError has occured") 
     364          #c4i.closeFileLog( ) 
     365          #fileLogOpen = False 
     366        rec.addErr( f, 'ERROR: CDMSError' ) 
     367 
    367368      except: 
    368369        c4i.logger.error("Exception has occured" ,exc_info=1) 
Note: See TracChangeset for help on using the changeset viewer.