Changeset 1060 for CMIP6dreqbuild


Ignore:
Timestamp:
17/09/17 16:12:53 (2 years ago)
Author:
mjuckes
Message:

tracing makeTable TOTAL bug

Location:
CMIP6dreqbuild/trunk/src/framework/dreqPy
Files:
4 edited

Legend:

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

    r1037 r1060  
    189189      else: 
    190190        ng = len( targ._inx.iref_by_sect[cmv.uid].a['requestVar'] ) 
    191         nv = len( targ._inx.iref_by_sect[cmv.vid].a['CMORvar'] ) 
     191        try: 
     192          nv = len( targ._inx.iref_by_sect[cmv.vid].a['CMORvar'] ) 
     193        except: 
     194          print 'FAILED: %s' % cmv.uid 
     195          raise 
    192196        return '<li>%s.%s [%s]: %s {groups: %s, vars: %s}</li>' % ( cmv.label,cmv.mipTable, targ.__href__(odir='../u/',label=targ.priority) , cmv.__href__(odir='../u/',label=cmv.title), ng, nv  ) 
    193197    else: 
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/packageConfig.py

    r1053 r1060  
    1414DOC_DIR = os.environ.get('DRQ_CONFIG_DIR', DOC_DEFAULT_DIR) 
    1515 
    16 __versionComment__ = "Version 01.00.15" 
    17 __version__ = "01.00.15" 
     16__versionComment__ = "Version 01.00.16" 
     17__version__ = "01.00.16" 
    1818__title__ = "dreqPy" 
    1919__description__ = "CMIP6 Data Request Python API" 
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/table_utils.py

    r1037 r1060  
    244244      self.oo.close() 
    245245 
     246### 
     247### need to have name of experiment here, for the aggregation over MIPs to work ... in the column of request by MIPs 
     248### 
    246249class makeTab(object): 
    247250  def __init__(self, dq, subset=None, mcfgNote=None, dest='tables/test', skipped=set(), collected=None,xls=True,txt=False,txtOpts=None,byFreqRealm=False, tslice=None): 
     
    268271    addMips = True 
    269272    if addMips: 
    270       c = vrev.checkVar(dq) 
     273      chkv = vrev.checkVar(dq) 
    271274    mode = 'c' 
    272275    tableNotes = [ 
     
    362365              orec = [v.mipTable,] + orec 
    363366 
     367##! 
     368# CHECK -- ERROR HERE FOR "TOTAL" ROW --spurious mips in thismips --- 
     369##! 
     370## change "c" to something searchable 
    364371            if addMips: 
    365               thismips = c.chkCmv( v.uid ) 
    366               thismips2 = c.chkCmv( v.uid, byExpt=True ) 
     372              thismips = chkv.chkCmv( v.uid ) 
     373              thismips2 = chkv.chkCmv( v.uid, byExpt=True ) 
    367374              orec.append( ','.join( sorted( list( thismips) ) ) ) 
    368375              orec.append( ','.join( sorted( list( thismips2) ) ) ) 
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/vrev.py

    r1031 r1060  
    6262  def chkCmv(self,cmvid, byExpt=False, byBoth=False): 
    6363    dq = self.dq 
     64## 
     65## find set of requestVar records referring to this CMORvar 
     66## 
    6467    s = set( dq.inx.iref_by_sect[cmvid].a['requestVar'] ) 
    6568 
    66 ## filter out the ones whch link to a remark 
     69## filter out the ones which link to a remark 
    6770 
    6871# s0: set of requestVars 
     
    7982    ##s1  = set( [dq.inx.uid[i].vgid for i in s0 ] ) 
    8083     
     84## 
     85## loop over requestGroups, find requestLink records, filtered by priority 
     86## 
    8187    s2 = set() 
    8288    for i in cc1: 
     
    101107        return s2 
    102108 
     109## 
     110## logic here omits a filter on experiment name .... and hence gives too many MIPs when aggregated over mIPSs 
     111## 
    103112    if byBoth or not byExpt: 
    104113      mips0 = set( [dq.inx.uid[i].mip for i in s2] ) 
Note: See TracChangeset for help on using the changeset viewer.