Ignore:
Timestamp:
12/05/16 13:23:47 (4 years ago)
Author:
mjuckes
Message:

bugs in volume estimates in tables

File:
1 edited

Legend:

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

    r643 r655  
    349349    for i in l1: 
    350350      imips.add(i.mip) 
    351     ##imips = {i.mip for i in l1} 
    352351     
    353352    rql, l1p, exset = self.rqlByExpt( l1, ex, pmax=pmax, expFullEx=expFullEx ) 
     
    367366      if exi._h.label == 'experiment': 
    368367        exset = set( [ex,exi.egid,exi.mip] ) 
    369  
    370368##### 
    371369    if len( rql ) == 0: 
     
    411409## 
    412410    nymg = collections.defaultdict( dict ) 
    413  
    414411## 
    415412## if dataset count rather than volume is wanted, use item 3 from rqiExp tuple. 
     
    633630  def rqiByMip( self, mip): 
    634631 
     632    if mip == 'TOTAL': 
     633        mip = self.mips 
    635634    if type(mip) in [type( '' ),type( u'') ]: 
    636635      if mip not in self.mips: 
     
    641640      nf = [ m for m in mip if m not in self.mips] 
    642641      if len(nf) > 0: 
    643         raise baseException( 'rqiByMip: Name of mip(s) not recognised: %s' % str(nf) ) 
     642          raise baseException( 'rqiByMip: Name of mip(s) not recognised: %s' % str(nf) ) 
    644643      l1 = [i for i in  self.dq.coll['requestItem'].items if i.mip in mip] 
    645644    elif type(mip) == type( dict()): 
     
    718717    for e in exps: 
    719718      expts = self.esid_to_exptList(e,deref=True,full=False) 
     719      print 'EXPTS: ',e,len(expts) 
    720720      if expts not in  [None,[]]: 
    721         self.volByE[e] = self.volByExpt( l1, e, pmax=pmax, cc=cc, retainRedundantRank=retainRedundantRank, intersection=intersection, adsCount=adsCount ) 
    722         vtot += self.volByE[e][0] 
     721        for ei in expts: 
     722          self.volByE[ei.label] = self.volByExpt( l1, ei.uid, pmax=pmax, cc=cc, retainRedundantRank=retainRedundantRank, intersection=intersection, adsCount=adsCount ) 
     723          vtot += self.volByE[ei.label][0] 
    723724        self.allVars = self.allVars.union( self.vars ) 
    724725      ##else: 
     
    900901      mips = self.adict['m'] 
    901902      odir = self.adict.get( 'xlsdir', 'xls' ) 
    902       ##print 'odir:::::::::: ',odir 
    903       ##m = list( mips )[0] 
    904903      self.sc.checkDir( odir, 'xls files' ) 
    905904 
Note: See TracChangeset for help on using the changeset viewer.