Ignore:
Timestamp:
17/06/16 13:48:44 (4 years ago)
Author:
mjuckes
Message:

near release

File:
1 edited

Legend:

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

    r677 r680  
    4545    self.txt=txt 
    4646    self.txtOpts = txtOpts 
     47    self.mcfgNote = 'Reference Volume (1 deg. atmosphere, 0.5 deg. ocean)' 
    4748    if xls: 
    4849      self.wb = xlsxwriter.Workbook('%s.xlsx' % fn) 
     
    7475        ri += 2 
    7576        sht.write( ri, 0, 'Table', self.sect_cell_format ) 
    76         sht.write( ri, 1, 'Reference Volume (1 deg. atmosphere, 0.5 deg. ocean)', self.sect_cell_format ) 
     77        sht.write( ri, 1, self.mcfgNote, self.sect_cell_format ) 
    7778        for k in sorted( collected.keys() ): 
    7879          ri += 1 
     
    268269       
    269270class makeTab(object): 
    270   def __init__(self, dq, subset=None, dest='tables/test', skipped=set(), collected=None,xls=True,txt=False,txtOpts=None): 
     271  def __init__(self, dq, subset=None, mcfgNote=None, dest='tables/test', skipped=set(), collected=None,xls=True,txt=False,txtOpts=None): 
    271272    """txtOpts: gives option to list MIP variables instead of CMOR variables""" 
    272273    if subset != None: 
     
    286287 
    287288    wb = xlsx( dest, xls=xls, txt=txt ) 
     289    if mcfgNote != None: 
     290      wb.mcfgNote = mcfgNote 
    288291    wb.header( tableNotes, collected) 
    289292 
     
    530533    return '<li>%s: %s</li>' % (  targ.label, targ.__href__(odir='../u/', label=targ.title,title=targ.description) ) 
    531534 
     535  def unitLink(self,targ,frm='',ann=''): 
     536    return '<li>%s [%s]: %s</li>' % (  targ.text, targ.label, targ.__href__(odir='../u/', label=targ.title) ) 
     537 
    532538  def strLink(self,targ,frm='',ann=''): 
    533539    return '<li>%s: %s</li>' % (  targ.label, targ.__href__(odir='../u/', label=targ.title) ) 
     
    622628          x0 = x[0] 
    623629 
    624       ### print 'xxxxxzz',mlab,mlab2,'%12.5e' % x[0],x0 
    625630      if mlab2 == 'TOTAL' and x0 == 0: 
    626631        print ( 'no data detected for %s' % mlab ) 
     
    688693          ##print '> maketab: ','%s/%s-%s_%s_%s.xlsx' % (self.odir,mlab,mlab2,self.sc.tierMax,pmax) 
    689694          makeTab( self.sc.dq, subset=lll, dest='%s/%s-%s_%s_%s' % (self.odir,mlab,mlab2,self.sc.tierMax,pmax), collected=collector[kkc].a, 
     695              mcfgNote=self.sc.mcfgNote, 
    690696              txt=self.doTxt, xls=self.doXls, txtOpts=self.txtOpts ) 
    691697 
     
    711717htmlStyle['varRelations'] = {'getIrefs':['__all__']} 
    712718htmlStyle['varRelLnk'] = {'getIrefs':['__all__']} 
     719htmlStyle['units'] = {'getIrefs':['__all__']} 
    713720 
    714721if __name__ == "__main__": 
     
    728735  dq.itemStyles['CMORvar'] = styls.cmvLink 
    729736  dq.itemStyles['objective'] = styls.objLink 
     737  dq.itemStyles['units'] = styls.unitLink 
    730738  dq.itemStyles['structure'] = styls.strLink 
    731739  dq.itemStyles['objectiveLink'] = styls.objLnkLink 
Note: See TracChangeset for help on using the changeset viewer.