Changeset 842


Ignore:
Timestamp:
09/11/16 11:29:53 (3 years ago)
Author:
mjuckes
Message:

further import corrections

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

Legend:

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

    r835 r842  
    612612 
    613613  def getTable(self,m,m2,pmax,odsz,npy): 
    614      vs = volsum.vsum( self.sc, odsz, npy ) 
     614     vs = volsum.vsum( self.sc, odsz, npy, makeTab ) 
    615615     mlab = setMlab( m ) 
    616616     vs.run( m, 'requestVol_%s_%s_%s' % (mlab,self.sc.tierMax,pmax), pmax=pmax ) 
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/scope.py

    r828 r842  
    15381538      import volsum 
    15391539      self.sc.gridPolicyDefaultNative = True 
    1540       vs = volsum.vsum( self.sc, odsz, npy, odir=xlsOdir ) 
     1540      vs = volsum.vsum( self.sc, odsz, npy, makeTables.makeTab, odir=xlsOdir ) 
    15411541      vs.analAll(pmax) 
    15421542 
    15431543      self.sc.gridPolicyDefaultNative = False 
    1544       vs = volsum.vsum( self.sc, odsz, npy, odir=xlsOdir ) 
     1544      vs = volsum.vsum( self.sc, odsz, npy, makeTables.makeTab, odir=xlsOdir ) 
    15451545      vs.analAll(pmax) 
    15461546 
    15471547      self.sc.setTierMax( 3 ) 
    1548       vs = volsum.vsum( self.sc, odsz, npy, odir=xlsOdir ) 
     1548      vs = volsum.vsum( self.sc, odsz, npy, makeTables.makeTab, odir=xlsOdir ) 
    15491549      vs.analAll(3) 
    15501550      return 
     
    15781578    if 'sf' in self.adict: 
    15791579      import volsum 
    1580       vs = volsum.vsum( self.sc, odsz, npy, odir=xlsOdir ) 
     1580      vs = volsum.vsum( self.sc, odsz, npy, makeTables.makeTab, odir=xlsOdir ) 
    15811581      vs.run( self.adict['m'], 'requestVol_%s_%s_%s' % (mlab,tierMax,pmax), pmax=pmax )  
    15821582      vs.anal(olab=mlab,doUnique=False) 
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/volsum.py

    r839 r842  
    66try: 
    77  import dreq 
    8  
    9   import scope 
    10   import makeTables 
    118  import overviewTabs 
    129except: 
    1310  import dreqPy.dreq as dreq 
    14   import dreqPy.scope as scope 
    15   import dreqPy.makeTables as makeTables 
    1611  import dreqPy.overviewTabs as overviewTabs 
    1712 
     
    4944 
    5045class vsum(object): 
    51   def __init__(self,sc,odsz,npy,exptFilter=None, odir='xls'): 
     46  def __init__(self,sc,odsz,npy,makeTab,exptFilter=None, odir='xls'): 
     47    self.makeTab = makeTab 
    5248    idir = dreq.DOC_DIR 
    5349    self.sc = sc 
     
    185181        ss = ss.union( lm[m] ) 
    186182        if makeTabs: 
    187           makeTables.makeTab(self.sc.dq, subset=lm[m], dest='%s/cmvmm_%s_%s_%s_%s%s' % (self.odir,olab,m,self.sc.tierMax,self.pmax,self.efnsfx), collected=cc[m]) 
     183          self.makeTab(self.sc.dq, subset=lm[m], dest='%s/cmvmm_%s_%s_%s_%s%s' % (self.odir,olab,m,self.sc.tierMax,self.pmax,self.efnsfx), collected=cc[m]) 
    188184 
    189185    if olab != None and makeTabs: 
    190         makeTables.makeTab(self.sc.dq, subset=ss, dest='%s/cmvmm_%s_%s_%s_%s%s' % (self.odir,olab,'TOTAL',self.sc.tierMax,self.pmax,self.efnsfx), collected=cct) 
     186        self.makeTab(self.sc.dq, subset=ss, dest='%s/cmvmm_%s_%s_%s_%s%s' % (self.odir,olab,'TOTAL',self.sc.tierMax,self.pmax,self.efnsfx), collected=cct) 
    191187        if olab != 'TOTAL' and doUnique: 
    192           makeTables.makeTab(self.sc.dq, subset=s_lm, dest='%s/cmvmm_%s_%s_%s_%s%s' % (self.odir,olab,'Unique',self.sc.tierMax,self.pmax,self.efnsfx), collected=s_cc) 
     188          self.makeTab(self.sc.dq, subset=s_lm, dest='%s/cmvmm_%s_%s_%s_%s%s' % (self.odir,olab,'Unique',self.sc.tierMax,self.pmax,self.efnsfx), collected=s_cc) 
    193189 
    194190    cc = collections.defaultdict( dict ) 
     
    200196      if olab != None and makeTabs: 
    201197        el = self.sc.dq.inx.uid[e].label 
    202         makeTables.makeTab(self.sc.dq, subset=lex[e], dest='%s/cmvme_%s_%s_%s_%s%s' % (self.odir,olab,el,self.sc.tierMax,self.pmax,self.efnsfx), collected=cc[e]) 
     198        self.makeTab(self.sc.dq, subset=lex[e], dest='%s/cmvme_%s_%s_%s_%s%s' % (self.odir,olab,el,self.sc.tierMax,self.pmax,self.efnsfx), collected=cc[e]) 
    203199 
    204200    if olab != 'TOTAL' and doUnique: 
     
    208204        if olab != None and makeTabs: 
    209205          el = self.sc.dq.inx.uid[e].label 
    210           makeTables.makeTab(self.sc.dq, subset=s_lex[e], dest='%s/cmvume_%s_%s_%s_%s%s' % (self.odir,olab,el,self.sc.tierMax,self.pmax,self.efnsfx), collected=ucc[e]) 
     206          self.makeTab(self.sc.dq, subset=s_lex[e], dest='%s/cmvume_%s_%s_%s_%s%s' % (self.odir,olab,el,self.sc.tierMax,self.pmax,self.efnsfx), collected=ucc[e]) 
    211207 
    212208    self.res = { 'vmt':vmt, 'vet':vet, 'vm':vm, 'uve':uve, 've':ve, 'lm':lm, 'lex':lex, 'vu':vu, 'cc':cc, 'cct':cct} 
Note: See TracChangeset for help on using the changeset viewer.