Changeset 800


Ignore:
Timestamp:
04/11/16 11:03:30 (3 years ago)
Author:
mjuckes
Message:

adding importWbRef

Location:
CMIP6dreqbuild/trunk/src/workbook
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreqbuild/trunk/src/workbook/importWbMods.py

    r799 r800  
    2323class loadGroups(object): 
    2424  def __init__(self): 
    25     wb = workbook( '../framework/sortedVarGroups.xls' ) 
     25    wb = workbook( '../framework/ingest/sortedVarGroups.xls' ) 
    2626    sh = wb.book.sheet_by_name( 'Sheet1' ) 
    2727    self.vg = {} 
  • CMIP6dreqbuild/trunk/src/workbook/isd3b.py

    r799 r800  
    256256      self.tsliceMap = {} 
    257257      self.tsliceMap['DAMIP'] = {'18 (1850, 1860, ..,  2010, 2020)':'DAMIP18', 'all':None, '8\n(2030, 2040, .., 2090, 2100)':'DAMIP8', '61\n(1960-2020)':'DAMIP61', '40\n(2026-2045, 2081-2100)':'DAMIP40', '20\n(2081-2100)':'DAMIP20', '42\n(1979-2020)':'DAMIP42' } 
    258       self.tsliceMap['SIMIP'] = {'100 (last)':'piControl100' } 
     258      self.tsliceMap['SIMIP'] = {'Last 100':'piControl100' } 
    259259 
    260260      thissh = self.skey['experiment'] 
     
    865865                  raise 
    866866 
    867             setu = set() 
     867            eeu = dict() 
    868868 
    869869            ccchk = ivg.checkCmv(gi) 
     
    10481048                if trace.GROUPITEM_ta and lab  == 'ta': 
    10491049                    print 'INFO.045.00005: groupitem: ',thisrqv 
    1050                 if "t2000" in thissh: 
    1051                    print 'BBBB', thiscmv 
    1052  
    10531050 
    10541051                if ccchk.uidReplace.has_key(thiscmv[0]): 
     
    10561053                  thisrqv[2] = ccchk.uidReplace[thiscmv[0]] 
    10571054                else: 
    1058                   if uid in setu: 
    1059                      print 'SEVERE[1]: duplicate uuid: ',tt.__dict__ 
     1055                  if uid in eeu: 
     1056                     print 'SEVERE.cmv.90001: duplicate cmv uuid: ',tt.__dict__,eeu[uid] 
    10601057                  elif uid in setu1: 
    1061                      print 'ERROR[2]: duplicate uuid: ',tt.__dict__ 
     1058                     print 'ERROR[2]: duplicate cmv uuid: ',tt.__dict__ 
    10621059                  else: 
    1063                     setu.add( uid ) 
     1060                    eeu[uid] = tt.__dict__ 
    10641061                    assert len(thiscmv) == len( self.cmvinfo ), 'BAD CMV specification length: %s' % str(cmv) 
    10651062                    self.cmv.append( thiscmv ) 
     
    14601457        sss = [set(),set(),set()] 
    14611458        ttt = [ ('time1', u'Instantaneous (end of year)', 'instantaneous', 'point', 'Synoptic', u'synoptic', u'time: point'), 
    1462         ('time', 'Mean', u'time: mean', u'Time mean', u'daily mean', u'mean', u'time mean', u'time: day', u'time: mean', u'weighted time mean', 'Cumulative annual fraction'), 
     1459        ('Daily max', 'Daily min', 'time', 'Mean', u'time: mean', u'Time mean', u'daily mean', u'mean', u'time mean', u'time: day', u'time: mean', u'weighted time mean', 'Cumulative annual fraction'), 
    14631460        (), 
    14641461        ('diurnal','time3'), ('',)] 
     
    15251522 
    15261523          if not dd.has_key( dds.get(s,s) ): 
    1527             print 'NO SOLUTION FOUND FOR SHAPE: "%s"' % s 
     1524            print 'ERROR.shape.0001: NO SOLUTION FOUND FOR SHAPE: "%s"' % s 
    15281525          else: 
    15291526            tt = dd[dds.get(s,s)] 
     
    20152012                  if type(ll[9]) in [type(''), type(u'')]: 
    20162013                    kkk = string.strip( ll[9] ) 
    2017                     if kkk in self.tsliceMap[ll[0]]: 
     2014                    if kkk in self.tsliceMap[ll[0]] and self.tsliceMap[ll[0]][kkk] != None: 
    20182015                      v = self.tsliceMap[ll[0]][kkk] 
    2019                       if v != None: 
    2020                         item.setAttribute( 'tslice', '_slice_%s' % v ) 
     2016                      item.setAttribute( 'tslice', '_slice_%s' % v ) 
     2017                      print 'INFO.tslice.00001: setting tslice %s' % v 
     2018                    else: 
     2019                      print 'WARN.tslice.00002: no slice found for :%s:  .. %s' % (kkk, str(ll)) 
    20212020                finishedClones = (not cloning) or ( len( clones) == 0 ) 
    20222021                if not finishedClones: 
Note: See TracChangeset for help on using the changeset viewer.