- Timestamp:
- 09/11/16 12:28:42 (4 years ago)
- Location:
- CMIP6dreq/trunk/dreqPy
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
CMIP6dreq/trunk/dreqPy/makeTables.py
r843 r856 591 591 return '<li>%s {%s}: %s variables, %s request links</li>' % ( targ.__href__(odir='../u/', label=targ.label), targ.mip, gpsz, nlnk ) 592 592 593 def obsolete_getTable(sc,m,m2,pmax,odsz,npy,odir='d1',txt=False,xls=False,txtOpts=None): 594 """replaces tables.getTable( self, m,m2,pmax,odsz,npy)""" 595 ## 596 ## this creates a new instance, and calls doTable .... 597 ## very messy ... 598 ## 599 vs = volsum.vsum( sc, odsz, npy, makeTab, tables ) 600 mlab = setMlab( m ) 601 vs.run( m, 'requestVol_%s_%s_%s' % (mlab,sc.tierMax,pmax), pmax=pmax ) 602 603 604 ## collected=summed volumes by table for first page. 605 makeTab( sc.dq, subset=vs.thiscmvset, dest='%s/%s-%s_%s_%s' % (odir,mlab,mlab2,sc.tierMax,pmax), collected=collector[kkc].a, 606 mcfgNote=sc.mcfgNote, 607 txt=doTxt, xls=doXls, txtOpts=txtOpts ) 608 593 609 class tables(object): 594 610 def __init__(self,sc, odir='xls',xls=True,txt=False,txtOpts=None): … … 611 627 612 628 613 def getTable(self,m,m2,pmax,odsz,npy):614 vs = volsum.vsum( self.sc, odsz, npy, makeTab )615 mlab = setMlab( m )616 vs.run( m, 'requestVol_%s_%s_%s' % (mlab,self.sc.tierMax,pmax), pmax=pmax )617 618 619 ## collected=summed volumes by table for first page.620 makeTab( self.sc.dq, subset=vs.thiscmvset, dest='%s/%s-%s_%s_%s' % (self.odir,mlab,mlab2,self.sc.tierMax,pmax), collected=collector[kkc].a,621 mcfgNote=self.sc.mcfgNote,622 txt=self.doTxt, xls=self.doXls, txtOpts=self.txtOpts )623 629 def doTable(self,m,l1,m2,pmax,collector,acc=True, mlab=None,exptids=None,cc=None): 624 630 """*acc* allows accumulation of values to be switched off when called in single expt mode""" -
CMIP6dreq/trunk/dreqPy/overviewTabs.py
r852 r856 5 5 try: 6 6 import dreq 7 import makeTables8 7 except: 9 8 import dreqPy.dreq as dreq 10 import dreqPy.makeTables as makeTables11 9 12 10 jsh=''' … … 39 37 hmap0 = {'CMIP6':'Historical'} 40 38 class r1(object): 41 def __init__(self,sc,tiermax=1,pmax=1,only=False,vols=None,fnm='new'): 39 def __init__(self,sc,mt_tables,tiermax=1,pmax=1,only=False,vols=None,fnm='new'): 40 self.mt_tables = mt_tables 42 41 43 42 self.fnm = fnm … … 93 92 self.tiermax=tiermax 94 93 sc.setTierMax( tiermax ) 95 tabs = makeTables.tables( sc )94 tabs = self.mt_tables( sc ) 96 95 97 96 mipsToDo = self.mips + ['TOTAL',] … … 283 282 if __name__ == "__main__": 284 283 try: 284 import makeTables 285 285 import scope 286 286 except: 287 287 import dreqPy.scope as scope 288 import dreqPy.makeTables as makeTables 288 289 sc = scope.dreqQuery() 289 r = r1( sc, tiermax=1, pmax=1 )290 r = r1( sc, tiermax=3, pmax=3 )290 r = r1( sc, makeTables.tables, tiermax=1, pmax=1 ) 291 r = r1( sc, makeTables.tables, tiermax=3, pmax=3 ) -
CMIP6dreq/trunk/dreqPy/scope.py
r843 r856 1538 1538 import volsum 1539 1539 self.sc.gridPolicyDefaultNative = True 1540 vs = volsum.vsum( self.sc, odsz, npy, makeTables.makeTab, odir=xlsOdir )1540 vs = volsum.vsum( self.sc, odsz, npy, makeTables.makeTab, makeTables.tables, odir=xlsOdir ) 1541 1541 vs.analAll(pmax) 1542 1542 1543 1543 self.sc.gridPolicyDefaultNative = False 1544 vs = volsum.vsum( self.sc, odsz, npy, makeTables.makeTab, odir=xlsOdir )1544 vs = volsum.vsum( self.sc, odsz, npy, makeTables.makeTab, makeTables.tables, odir=xlsOdir ) 1545 1545 vs.analAll(pmax) 1546 1546 1547 1547 self.sc.setTierMax( 3 ) 1548 vs = volsum.vsum( self.sc, odsz, npy, makeTables.makeTab, odir=xlsOdir )1548 vs = volsum.vsum( self.sc, odsz, npy, makeTables.makeTab, makeTables.tables, odir=xlsOdir ) 1549 1549 vs.analAll(3) 1550 1550 return -
CMIP6dreq/trunk/dreqPy/volsum.py
r843 r856 44 44 45 45 class vsum(object): 46 def __init__(self,sc,odsz,npy,makeTab, exptFilter=None, odir='xls'):46 def __init__(self,sc,odsz,npy,makeTab,mt_tables,exptFilter=None, odir='xls'): 47 47 self.makeTab = makeTab 48 self.mt_tables = mt_tables 48 49 idir = dreq.DOC_DIR 49 50 self.sc = sc … … 89 90 cmvTotal = self.sc.selectedCmv.copy() 90 91 self.uniqueCmv = {} 91 r1 = overviewTabs.r1( self.sc, pmax=pmax, vols=( volsmm, volsme, volsmmt,volsue ) )92 r1 = overviewTabs.r1( self.sc, self.mt_tables, pmax=pmax, vols=( volsmm, volsme, volsmmt,volsue ) ) 92 93 93 94 def _analSelectedCmv(self,cmv):
Note: See TracChangeset
for help on using the changeset viewer.