Ignore:
Timestamp:
09/08/16 19:31:43 (5 years ago)
Author:
mjuckes
Message:

New ingestion pathway

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreqbuild/trunk/src/framework/scanDreq.py

    r682 r713  
    676676      
    677677  def strTtl(self,dq): 
     678    that = self.doc.getElementsByTagName('spatialShape')[0] 
     679    dil = that.getElementsByTagName('item') 
     680    ee1 = {} 
     681    for item in dil: 
     682      uid = item.getAttribute( 'uid' ) 
     683      lab = item.getAttribute( 'label' ) 
     684      ttl = item.getAttribute( 'title' ) 
     685      ee1[uid] = (lab,ttl) 
     686 
    678687    this = self.doc.getElementsByTagName('structure')[0] 
    679688    dil = this.getElementsByTagName('item') 
    680      
    681689     
    682690    filterStr = True 
     
    693701        o = item.getAttribute( 'odims' )   
    694702        c = item.getAttribute( 'coords' )   
    695         s = dq.inx.uid[spid] 
    696         title = '%s, %s [%s]' % (dq.inx.uid[tmid].title, s.title, s.label)  
     703        if spid not in ee1: 
     704          print 'SEVERE:spid.0001: spid not found: %s' % spid  
     705          sl = '__unknowm__' 
     706          st = '__unknowm__' 
     707        else: 
     708          sl,st = ee1[spid] 
     709        title = '%s, %s [%s]' % (dq.inx.uid[tmid].title, st, sl)  
    697710        if string.strip( c ) != '' or string.strip( o ) != '': 
    698711          title += ' {%s:%s}' % (o,c) 
Note: See TracChangeset for help on using the changeset viewer.