Ignore:
Timestamp:
11/11/15 09:37:50 (7 years ago)
Author:
mjuckes
Message:

check

Location:
CMIP6dreqbuild/trunk/src
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreqbuild/trunk/src/framework/Makefile

    r463 r470  
    5656 
    5757distrib: out/dreq2Defn.xml  out/dreq2Sample.xml  out/dreq2Schema.xsd 
    58         cp  out/dreq2Defn.xml  out/dreq2Sample.xml  out/dreq2Schema.xsd  ../../docs/vocabFrameworkSchema.xsd /data/tmp/svn3/exarch/CMIP6dreq/trunk/docs 
    59         cp  out/vocabDefn.xml  out/vocabSample.xml  out/vocabSchema.xsd vocab.xml  /data/tmp/svn3/exarch/CMIP6dreq/trunk/docs 
    60         echo "docs copied to /data/tmp/svn3/exarch/CMIP6dreq/trunk/docs" 
     58        cp  out/dreq2Defn.xml  out/dreq2Sample.xml  out/dreq2Schema.xsd  ../../docs/vocabFrameworkSchema.xsd /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs 
     59        cp  out/vocabDefn.xml  out/vocabSample.xml  out/vocabSchema.xsd vocab.xml  /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs 
     60        echo "docs copied to /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs" 
    6161        bash seddreq.sh annotated_20150731.xml dreq.xml dreqPy/dreq.py >  /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/dreq.py 
    62         bash seddreq02.sh "\.\.\/out" "\.\.\/docs" dreqPy/packageConfig.py > /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/packageConfig.py 
     62        bash seddreq02.sh "\.\.\/out" "docs" dreqPy/packageConfig.py > /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/packageConfig.py 
    6363        cp htmlTemplates.py dreqPy/scope.py dreqPy/example.py dreqPy/utilities.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy   
    6464        cp dreqPy/dreqCmdl.py dreqPy/__init__.py dreqPy/simpleCheck.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy 
    6565        cp vocabDemo.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy     
    6666        cp makeTables.py vrev.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/  
    67         cp out/annotated_20150731.xml /data/tmp/svn3/exarch/CMIP6dreq/trunk/docs/dreq.xml 
     67        cp out/annotated_20150731.xml /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/dreq.xml 
    6868        ### cp LICENSE README.txt setup.py setup.cfg /data/tmp/svn3/exarch/CMIP6dreq/trunk/ 
    69         cp tables/test.xlsx /data/tmp/svn3/exarch/CMIP6dreq/trunk/docs/CMIP6_MIP_tables.xlsx 
    70         cp out/dc1.xsd out/xlink.xsd out/xml.xsd /data/tmp/svn3/exarch/CMIP6dreq/trunk/docs/ 
     69        cp tables/test.xlsx /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/CMIP6_MIP_tables.xlsx 
     70        cp out/dc1.xsd out/xlink.xsd out/xml.xsd /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/ 
     71        cp out/BlockSchema.csv /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/ 
    7172        echo "source copied to /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy" 
    7273 
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/dreq.py

    r463 r470  
    1010from __init__ import DOC_DIR 
    1111 
     12 
     13blockSchemaFile = '%s/%s' % (DOC_DIR, 'BlockSchema.csv' ) 
     14 
     15def loadBS(bsfile): 
     16  ii = open( bsfile, 'r' ).readlines() 
     17  ll = [] 
     18  for l in ii: 
     19    ll.append( [x[1:-1] for x in string.strip(l).split('\t') ] ) 
     20  cc = collections.defaultdict( dict ) 
     21  for l in ll[3:]: 
     22    for i in range( len(ll[2]) ): 
     23      cc[l[0]][ll[2][i]] = l[i] 
     24  return cc 
     25 
    1226class rechecks(object): 
     27  """Checks to be applied to strings""" 
    1328  def __init__(self): 
    1429    self.__isInt = re.compile( '-{0,1}[0-9]+' ) 
    1530 
    1631  def isIntStr( self, tv ): 
     32    """Check whether a string is a valid representation of an integer.""" 
    1733    if type( tv ) not in {type(''),type(u'')}: 
    1834      self.reason = 'NOT STRING' 
     
    4157         ##self._globalDefault = '__unset__' 
    4258         self._contentInitialised = False 
     59         self._greenIcon = '<img height="12pt" src="/images/154g.png" alt="[i]"/>' 
    4360         if dictMode: 
    4461           self.dictInit( dict ) 
     
    5976           for a in self.__dict__.keys(): 
    6077             if a[0] != '_' or full: 
    61                if self._a[a].useClass == 'internalLink' and self._base._indexInitialised: 
     78               if hasattr( self._a[a], 'useClass') and self._a[a].useClass == 'internalLink' and self._base._indexInitialised: 
    6279                 if self.__dict__[a] in self._base._inx.uid: 
    6380                   targ = self._base._inx.uid[ self.__dict__[a] ] 
     
    7289       def __href__(self,odir="",label=None): 
    7390         igns =  {'','__unset__'} 
    74          if 'description' in self.__dict__ and string.strip( self.description ) not in igns: 
     91         if 'description' in self.__dict__ and self.description != None and string.strip( self.description ) not in igns: 
    7592           ttl = self.description 
    76          elif 'title' in self.__dict__ and string.strip( self.title ) not in igns: 
     93         elif 'title' in self.__dict__ and self.title != None and string.strip( self.title ) not in igns: 
    7794           ttl = self.title 
    7895         else: 
     
    83100 
    84101       def getHtmlLinkAttrStyle(self,a): 
     102         """Return a string containing a html fragment for a link to an attribute.""" 
    85103         if a in self.__class__._linkAttrStyle: 
    86104           return self.__class__._linkAttrStyle[a] 
     
    98116           for a in self.__dict__.keys(): 
    99117             if a[0] != '_': 
    100                if self._a[a].useClass == 'internalLink' and self._base._indexInitialised: 
     118               app = '%s%s' % (a, self.__class__.__dict__[a].__href__(label=self._greenIcon) ) 
     119               if hasattr( self._a[a], 'useClass') and self._a[a].useClass == 'internalLink' and self._base._indexInitialised: 
    101120                 if self.__dict__[a] == '__unset__': 
    102                    m = '<li>%s: %s [missing link]</li>' % ( a, self.__dict__[a] ) 
     121                   m = '<li>%s: %s [missing link]</li>' % ( app, self.__dict__[a] ) 
    103122                 else: 
    104123                   try: 
     
    108127                     raise 
    109128                   lst = self.getHtmlLinkAttrStyle(a) 
    110                    m = lst( a, targ, frm=sect ) 
    111                    ##m = '<li>%s: [%s] %s [%s]</li>' % ( a, targ._h.label, targ.label, targ.__href__() ) 
     129                   m = lst( app, targ, frm=sect ) 
     130                   ##m = '<li>%s, %s: [%s] %s [%s]</li>' % ( a, self.__class__.__dict__[a].__href__(label=self._greenIcon), targ._h.label, targ.label, targ.__href__() ) 
    112131               else: 
    113                  m = '<li>%s: %s</li>' % ( a, self.__dict__[a] ) 
     132                 m = '<li>%s: %s</li>' % ( app, self.__dict__[a] ) 
    114133               msg.append( m ) 
    115134           msg.append( '</ul>' ) 
     
    236255    self.vdef = configdoc 
    237256    self.vsamp = thisdoc 
    238     self.nts = collections.namedtuple( 'sectdef', ['tag','label','title','id','itemLabelMode','level'] ) 
     257 
     258    self.nts = collections.namedtuple( 'sectdef', ['tag','label','title','id','itemLabelMode','level','maxOccurs','labUnique'] ) 
    239259    self.nti = collections.namedtuple( 'itemdef', ['tag','label','title','type','useClass','techNote'] ) 
    240260    self.ntt = collections.namedtuple( 'sectinit', ['header','attributes','defaults'] ) 
    241261    self.nt__default = collections.namedtuple( 'deflt', ['defaults','glob'] ) 
    242262    self.ntf = collections.namedtuple( 'sect', ['header','attDefn','items'] ) 
     263    self.bscc = loadBS(blockSchemaFile) 
    243264 
    244265    self.coll = {} 
     
    269290    self.tableClasses = {} 
    270291    self.tableItems = collections.defaultdict( list ) 
     292## 
     293## this loads in some metadata, but not yet in a useful way. 
     294## 
     295    self._t0 = self.parsevcfg(None) 
     296    self._tableClass0 = self.itemClassFact( self._t0, ns=self.ns ) 
     297 
     298## 
     299## define a class for the section heading records. 
     300## 
     301    self._t1 = self.parsevcfg('__sect__') 
     302    self._t2 = self.parsevcfg('__main__') 
     303    self._sectClass0 = self.itemClassFact( self._t1, ns=self.ns ) 
     304 
     305    self.tt0 = {} 
     306    for k in self.bscc: 
     307      self.tt0[k] = self._tableClass0(dict=self.bscc[k]) 
     308      if k in self._t0.attributes: 
     309        setattr( self._tableClass0, '%s' % k, self.tt0[k] ) 
     310      if k in self._t1.attributes: 
     311        setattr( self._sectClass0, '%s' % k, self.tt0[k] ) 
     312 
     313## 
     314## save header information, as for recordAttributeDefn below 
     315## 
     316    self._recAtDef = {'__core__':self._t0, '__sect__':self._t1} 
     317## 
     318## experimental addition of __core__ to coll dictionary .. 
     319## 
     320    self.coll['__core__'] = self.ntf( self._t0.header, self._t0.attributes, [self.tt0[k] for k in self.tt0] ) 
     321      ##self.coll[k] = self.ntf( self.recordAttributeDefn[k].header, self.recordAttributeDefn[k].attributes, self.tableItems[k] ) 
     322 
     323    self.tt1 = {} 
     324    self.ttl2 = [] 
    271325    for v in vl: 
    272326      t = self.parsevcfg(v) 
    273327      tables[t[0].label] = t 
    274328      self.tableClasses[t[0].label] = self.itemClassFact( t, ns=self.ns ) 
     329      thisc = self.tableClasses[t[0].label] 
     330      self.tt1[t[0].label] = self._sectClass0( dict=t.header.__dict__ ) 
     331      self.tt1[t[0].label].maxOccurs = t.header.maxOccurs 
     332      self.tt1[t[0].label].labUnique = t.header.labUnique 
     333      self.tt1[t[0].label].level = t.header.level 
     334      self.tt1[t[0].label].itemLabelMode = t.header.itemLabelMode 
     335      self.ttl2 += [thisc.__dict__[a] for a in t.attributes] 
     336    self.coll['__main__'] = self.ntf( self._t2.header, self._t2.attributes, self.ttl2 ) 
     337 
     338    self.coll['__sect__'] = self.ntf( self._t1.header, self._t1.attributes, [self.tt1[k] for k in self.tt1] ) 
    275339 
    276340    self.recordAttributeDefn = tables 
     
    282346          t = v.get( 'title' ) 
    283347          i = v.get( 'id' ) 
     348          uid = v.get( 'uid' ) 
     349          useclass = v.get( 'useClass' ) 
     350 
     351          self.tt1[k].label = k 
     352          self.tt1[k].title = t 
     353          self.tt1[k].id = i 
     354          self.tt1[k].uid = uid 
     355          self.tt1[k].useClass = useclass 
     356          self.tableClasses[k]._h = self.tt1[k] 
    284357          il = v.findall( '%sitem' % self.ns ) 
    285358          self.info( '%s, %s, %s, %s' % ( k, t, i, len(il) ) ) 
     
    350423     dreqItem._a = sectionInfo.attributes 
    351424     dreqItem._d = sectionInfo.defaults 
     425     if sectionInfo.attributes != None: 
     426        self.addAttributes(dreqItem, sectionInfo.attributes ) 
    352427     ##dreqItem.itemLabelMode = itemLabelMode 
    353428     ##dreqItem.attributes = attributes 
     
    355430     dreqItem.ns = ns 
    356431     return dreqItem 
     432 
     433  def addAttributes( self, thisClass, attrDict ): 
     434    for k in attrDict: 
     435      setattr( thisClass, '%s' % k , attrDict[k] ) 
    357436          
    358437  def parsevcfg(self,v): 
    359438      """Parse a section definition element, including all the record attributes. The results are returned as a namedtuple of attributes for the section and a dictionary of record attribute specifications.""" 
    360       l = v.getAttribute( 'label' ) 
    361       t = v.getAttribute( 'title' ) 
    362       i = v.getAttribute( 'id' ) 
    363       ilm = v.getAttribute( 'itemLabelMode' ) 
    364       lev = v.getAttribute( 'level' ) 
    365       il = v.getElementsByTagName( 'rowAttribute' ) 
    366       vtt = self.nts( v.nodeName, l,t,i,ilm,lev ) 
    367       idict = {} 
    368       for i in il: 
    369         tt = self.parseicfg(i) 
    370         idict[tt.label] = tt 
     439      if v in [ None,'__main__']: 
     440        idict = {'description':'An extended description of the object', 'title':'Record Description', \ 
     441         'techNote':'', 'useClass':'__core__', 'superclass':'rdf:property',\ 
     442         'type':'xs:string', 'uid':'__core__:description', 'label':'label' } 
     443        if v == None: 
     444          vtt = self.nts( '__core__', 'CoreAttributes', 'Core Attributes', '00000000', 'def', '0', '0', 'false' ) 
     445        else: 
     446          vtt = self.nts( '__main__', 'Attributes defined for the Data Request', 'Data Request Attributes', '00000001', 'def', '0', '0', 'false' ) 
     447      elif v == '__sect__': 
     448        idict = {'title':'Record Description', \ 
     449         'uid':'__core__:description', 'label':'label', 'useClass':'text', 'id':'id', 'maxOccurs':'', 'itemLabelMode':'', 'level':'', 'labUnique':'' } 
     450        vtt = self.nts( '__core__', 'sectionAttributes', 'Section Attributes', '00000000', 'def', '0', '0', 'false' ) 
     451##<var label="var" uid="SECTION:var" useClass="vocab" title="MIP Variable" id="cmip.drv.001"> 
     452      else: 
     453        l = v.getAttribute( 'label' ) 
     454        t = v.getAttribute( 'title' ) 
     455        i = v.getAttribute( 'id' ) 
     456        ilm = v.getAttribute( 'itemLabelMode' ) 
     457        lev = v.getAttribute( 'level' ) 
     458        maxo = v.getAttribute( 'maxOccurs' ) 
     459        labu = v.getAttribute( 'labUnique' ) 
     460        il = v.getElementsByTagName( 'rowAttribute' ) 
     461        vtt = self.nts( v.nodeName, l,t,i,ilm,lev, maxo, labu ) 
     462        idict = {} 
     463        for i in il: 
     464          tt = self.parseicfg(i) 
     465          idict[tt.label] = tt 
    371466      deflt = self.nt__default( {}, '__unset__' ) 
    372467      return self.ntt( vtt, idict, deflt ) 
     
    376471      defs = {'type':"xs:string"} 
    377472      ll = [] 
    378       for k in ['label','title','type','useClass','techNote']: 
     473      ee = {} 
     474      for k in ['label','title','type','useClass','techNote','description','uid']: 
    379475        if i.hasAttribute( k ): 
    380476          ll.append( i.getAttribute( k ) ) 
    381477        else: 
    382478          ll.append( defs.get( k, None ) ) 
    383       l, t, ty, cls, tn = ll 
     479        ee[k] = ll[-1] 
     480      l, t, ty, cls, tn, desc, uid = ll 
    384481      self.lastTitle = t 
    385       return self.nti( i.nodeName, l,t,ty,cls,tn ) 
     482 
     483      returnClass = True 
     484      if returnClass: 
     485        return self._tableClass0( dict=ee ) 
     486      else: 
     487        return self.nti( i.nodeName, l,t,ty,cls,tn ) 
    386488 
    387489class container(object): 
     
    395497  def __init__(self): 
    396498    self.a = collections.defaultdict( list ) 
     499 
    397500class index(object): 
    398501  """Create an index of the document. Cross-references are generated from attributes with class 'internalLink'.  
     
    423526    ## 
    424527      for ka in dreq[k].attDefn.keys(): 
    425         if dreq[k].attDefn[ka].useClass == 'internalLink': 
     528        if hasattr( dreq[k].attDefn[ka], 'useClass') and dreq[k].attDefn[ka].useClass == 'internalLink': 
    426529           irefdict[k].append( ka ) 
    427530 
     
    484587 
    485588class loadDreq(object): 
    486   def __init__(self,dreqXML=defaultDreqPath, configdoc=defaultConfigPath, useShelve=False ): 
     589  """Load in a vocabulary document. 
     590  dreqXML: full path to the XML document 
     591  configdoc: full path to associated configuration document 
     592  useShelve: flag to specify whether to retrieve data from cache (not implemented) 
     593  htmlStyles: dictionary of styling directives which influence structure of html page generates by the "makeHtml" method 
     594""" 
     595 
     596  def __init__(self,dreqXML=defaultDreqPath, configdoc=defaultConfigPath, useShelve=False, htmlStyles=None ): 
    487597    self.c = config( thisdoc=dreqXML, configdoc=configdoc, useShelve=useShelve) 
    488598    self.coll = self.c.get() 
     
    495605    dreqItemBase._inx = self.inx 
    496606    dreqItemBase._indexInitialised = True 
    497     dreqItemBase._htmlStyle['CMORvar'] = {'getIrefs':['requestVar']} 
    498     dreqItemBase._htmlStyle['requestVarGroup'] = {'getIrefs':['requestVar','requestLink']} 
    499     dreqItemBase._htmlStyle['var'] = {'getIrefs':['CMORvar']} 
    500     dreqItemBase._htmlStyle['objective'] = {'getIrefs':['objectiveLink']} 
    501     dreqItemBase._htmlStyle['requestLink'] = {'getIrefs':['objectiveLink','requestItem']} 
    502     dreqItemBase._htmlStyle['exptgroup'] = {'getIrefs':['__all__']} 
    503     dreqItemBase._htmlStyle['requestItem'] = {'getIrefs':['__all__']} 
    504     dreqItemBase._htmlStyle['experiment'] = {'getIrefs':['__all__']} 
    505     dreqItemBase._htmlStyle['mip'] = {'getIrefs':['__all__']} 
    506     dreqItemBase._htmlStyle['remarks'] = {'getIrefs':['__all__']} 
     607## 
     608## load in additional styling directives 
     609## 
     610    if htmlStyles != None: 
     611      for k in htmlStyles: 
     612        dreqItemBase._htmlStyle[k] = htmlStyles[k] 
     613 
    507614##    dreqItemBase._htmlStyle['__general__'] = {'addRemarks':True} 
    508615 
     
    518625    return self.defaultItemLineStyle 
    519626 
    520   def makeHtml(self,odir='./html'): 
     627  def makeHtml(self,odir='./html', ttl0 = 'Data Request Index'): 
     628    """Generate a html view of the vocabularies, using the "__html__" method of the vocabulary item class to generate a 
     629page for each item and also generating index pages. 
     630    odir: directory for html files; 
     631    ttl0: Title for main index (in odir/index.html)""" 
     632 
    521633    for k in self.inx.uid.keys(): 
    522634      i = self.inx.uid[k] 
     
    527639      oo.close() 
    528640 
    529     ttl0 = 'Data Request Index' 
    530641    msg0 = ['<h1>%s</h1>' % ttl0, '<ul>',] 
    531642    ks = sorted( self.coll.keys() ) 
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/packageConfig.py

    r442 r470  
    1515 
    1616__versionComment__ = "Support for command line interface added" 
    17 __version__ = "01.beta.09" 
     17__version__ = "01.beta.11" 
    1818__title__ = "dreqPy" 
    1919__description__ = "CMIP6 Data Request Python API" 
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/simpleCheck.py

    r434 r470  
    11from __init__ import DOC_DIR 
     2import string, os 
    23 
    34try: 
     
    6364        except: 
    6465          print ( 'Failed to complete check %s' % tag ) 
     66          raise 
    6567    if ok: 
    6668      print ( '%s: All checks passed' % lab ) 
  • CMIP6dreqbuild/trunk/src/framework/out/dreq2Defn.xml

    r463 r470  
    55xsi:schemaLocation="http://w3id.org/cmip6dr/ns vocabFrameworkSchema_v01beta.xsd"> 
    66<table label="var" uid="SECTION:var" title="MIP Variable" id="cmip.drv.001" itemLabelMode="def" level="0" maxOccurs="1" labUnique="No"> 
    7   <rowAttribute label="label" title="Record Label"/> 
    8   <rowAttribute label="title" title="Record Title"/> 
    9   <rowAttribute label="sn" title="CF Standard Name" useClass="internalLink"/> 
    10   <rowAttribute label="units" title="Units"/> 
    11   <rowAttribute label="description"/> 
    12   <rowAttribute label="title" title="Long name"/> 
    13   <rowAttribute label="procnote" title="Processing notes" useClass="list"/> 
    14   <rowAttribute label="procComment" title="Processing comments" useClass="freeText"/> 
    15   <rowAttribute label="prov" title="Provenance" useClass="freeText"/> 
    16   <rowAttribute label="uid" title="Record identifier" useClass="recordId"/> 
     7  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0cdf5c-8702-11e5-8487-5404a60d96b5"/> 
     8  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0d1e4a-8702-11e5-8487-5404a60d96b5"/> 
     9  <rowAttribute label="sn" type="xs:string" title="CF Standard Name" useClass="internalLink" description="The CF Standard Name is part of an extensive vocabulary maintained within the CF Convention." uid="ec0d57fc-8702-11e5-8487-5404a60d96b5"/> 
     10  <rowAttribute label="units" type="xs:string" title="Units" uid="ec0d9d52-8702-11e5-8487-5404a60d96b5"/> 
     11  <rowAttribute label="description" type="xs:string" uid="ec0df54a-8702-11e5-8487-5404a60d96b5"/> 
     12  <rowAttribute label="title" type="xs:string" title="Long name" description="The long name is used as the long_name variable attribute in the NetCDF files." uid="ec0dfeaa-8702-11e5-8487-5404a60d96b5"/> 
     13  <rowAttribute label="procnote" type="xs:string" title="Processing notes" useClass="list" uid="ec0e0224-8702-11e5-8487-5404a60d96b5"/> 
     14  <rowAttribute label="procComment" type="xs:string" title="Processing comments" useClass="freeText" uid="ec0e056c-8702-11e5-8487-5404a60d96b5"/> 
     15  <rowAttribute label="prov" type="xs:string" title="Provenance" useClass="freeText" uid="ec0e08b4-8702-11e5-8487-5404a60d96b5"/> 
     16  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" uid="ec0e0be8-8702-11e5-8487-5404a60d96b5"/> 
    1717</table> 
    1818<table label="CMORvar" uid="SECTION:CMORvar" title="CMOR Variable" id="cmip.drv.002" itemLabelMode="def" level="1" maxOccurs="1" labUnique="No"> 
    19   <rowAttribute label="label" title="Record Label"/> 
    20   <rowAttribute label="title" title="Record Title"/> 
    21   <rowAttribute label="uid" useClass="recordId"/> 
    22   <rowAttribute label="title" title="Long name"/> 
    23   <rowAttribute label="stid" title="Link to a record specifying the structure of the variable (dimensions and associated variable attributes)." useClass="internalLink" techNote="structure"/> 
    24   <rowAttribute label="vid" title="Identifier for MIP Variable" useClass="internalLink" techNote="var"/> 
    25   <rowAttribute label="valid_min" title="Minimum expected value for this variable."/> 
    26   <rowAttribute label="valid_max" title="Maximum expected value for this variable."/> 
    27   <rowAttribute label="ok_min_mean_abs" title="Minimum expected value of the mean absolute value at each point in time"/> 
    28   <rowAttribute label="ok_max_mean_abs" title="Maximum expected value of the mean absolute value at each point in time"/> 
    29   <rowAttribute label="deflate" title="Deflate: NetCDF compression parameter"/> 
    30   <rowAttribute label="deflate_level" title="Deflate Level: NetCDF compression parameter"/> 
    31   <rowAttribute label="shuffle" title="Shuffle: NetCDF compression parameter"/> 
    32   <rowAttribute label="defaultPriority" type="xs:integer" title="Indicative priority for this parameter, which is over-ruled by the requestVar priority setting, but provides a reference for organisation of the CMORvariables"/> 
    33   <rowAttribute label="type"/> 
    34   <rowAttribute label="modeling_realm" useClass="drsVocab"/> 
    35   <rowAttribute label="positive" useClass="CMORdirective"/> 
    36   <rowAttribute label="mipTable" title="The MIP table: each table identifies a collection of variables" useClass="drsVocab"/> 
    37   <rowAttribute label="prov"/> 
    38   <rowAttribute label="provNote"/> 
    39   <rowAttribute label="frequency" title="Frequency of time steps to be archived." useClass="drsVocab"/> 
    40   <rowAttribute label="rowIndex" type="xs:integer" title="Row index of entry in source sheet"/> 
    41   <rowAttribute label="description"/> 
     19  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0e2fce-8702-11e5-8487-5404a60d96b5"/> 
     20  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0e32ee-8702-11e5-8487-5404a60d96b5"/> 
     21  <rowAttribute label="uid" type="xs:string" useClass="recordId" uid="ec0e360e-8702-11e5-8487-5404a60d96b5"/> 
     22  <rowAttribute label="title" type="xs:string" title="Long name" description="The long name is used as the long_name variable attribute in the NetCDF files." uid="ec0e3910-8702-11e5-8487-5404a60d96b5"/> 
     23  <rowAttribute label="stid" type="xs:string" title="Link to a record specifying the structure of the variable (dimensions and associated variable attributes)." useClass="internalLink" techNote="structure" uid="ec0e3c1c-8702-11e5-8487-5404a60d96b5"/> 
     24  <rowAttribute label="vid" type="xs:string" title="MIP Variable" useClass="internalLink" techNote="var" description="The MIP Variable specifies the physical quantity." uid="ec0e3f1e-8702-11e5-8487-5404a60d96b5"/> 
     25  <rowAttribute label="valid_min" type="xs:string" title="Minimum expected value for this variable." uid="ec0e4220-8702-11e5-8487-5404a60d96b5"/> 
     26  <rowAttribute label="valid_max" type="xs:string" title="Maximum expected value for this variable." uid="ec0e4522-8702-11e5-8487-5404a60d96b5"/> 
     27  <rowAttribute label="ok_min_mean_abs" type="xs:string" title="Minimum expected value of the mean absolute value at each point in time" uid="ec0e4892-8702-11e5-8487-5404a60d96b5"/> 
     28  <rowAttribute label="ok_max_mean_abs" type="xs:string" title="Maximum expected value of the mean absolute value at each point in time" uid="ec0e4ba8-8702-11e5-8487-5404a60d96b5"/> 
     29  <rowAttribute label="deflate" type="xs:string" title="Deflate: NetCDF compression parameter" uid="ec0e4eaa-8702-11e5-8487-5404a60d96b5"/> 
     30  <rowAttribute label="deflate_level" type="xs:string" title="Deflate Level: NetCDF compression parameter" uid="ec0e517a-8702-11e5-8487-5404a60d96b5"/> 
     31  <rowAttribute label="shuffle" type="xs:string" title="Shuffle: NetCDF compression parameter" uid="ec0e545e-8702-11e5-8487-5404a60d96b5"/> 
     32  <rowAttribute label="defaultPriority" type="xs:integer" title="Indicative priority for this parameter, which is over-ruled by the requestVar priority setting, but provides a reference for organisation of the CMORvariables" uid="ec0e574c-8702-11e5-8487-5404a60d96b5"/> 
     33  <rowAttribute label="type" type="xs:string" uid="ec0e5a26-8702-11e5-8487-5404a60d96b5"/> 
     34  <rowAttribute label="modeling_realm" type="xs:string" useClass="drsVocab" uid="ec0e5cf6-8702-11e5-8487-5404a60d96b5"/> 
     35  <rowAttribute label="positive" type="xs:string" useClass="CMORdirective" uid="ec0e5fbc-8702-11e5-8487-5404a60d96b5"/> 
     36  <rowAttribute label="mipTable" type="xs:string" title="The MIP table: each table identifies a collection of variables" useClass="drsVocab" uid="ec0e62c8-8702-11e5-8487-5404a60d96b5"/> 
     37  <rowAttribute label="prov" type="xs:string" uid="ec0e658e-8702-11e5-8487-5404a60d96b5"/> 
     38  <rowAttribute label="provNote" type="xs:string" uid="ec0e685e-8702-11e5-8487-5404a60d96b5"/> 
     39  <rowAttribute label="frequency" type="xs:string" title="Frequency of time steps to be archived." useClass="drsVocab" uid="ec0e6b2e-8702-11e5-8487-5404a60d96b5"/> 
     40  <rowAttribute label="rowIndex" type="xs:integer" title="Row index of entry in source sheet" uid="ec0e6dea-8702-11e5-8487-5404a60d96b5"/> 
     41  <rowAttribute label="description" type="xs:string" uid="ec0e70a6-8702-11e5-8487-5404a60d96b5"/> 
    4242</table> 
    4343<table label="structure" uid="SECTION:structure" title="Dimensions and related information" id="cmip.drv.003" itemLabelMode="def" level="3" maxOccurs="1" labUnique="Yes"> 
    44   <rowAttribute label="label" title="Record Label"/> 
    45   <rowAttribute label="title" title="Record Title"/> 
    46   <rowAttribute label="uid" useClass="recordId"/> 
    47   <rowAttribute label="spid" useClass="internalLink" techNote="spatialShape"/> 
    48   <rowAttribute label="tmid" useClass="internalLink" techNote="temporalShape"/> 
    49   <rowAttribute label="odims"/> 
    50   <rowAttribute label="coords"/> 
    51   <rowAttribute label="cell_methods"/> 
    52   <rowAttribute label="cell_measures"/> 
    53   <rowAttribute label="flag_values"/> 
    54   <rowAttribute label="flag_meanings"/> 
    55   <rowAttribute label="description"/> 
    56   <rowAttribute label="procNote"/> 
    57   <rowAttribute label="prov"/> 
     44  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0e8230-8702-11e5-8487-5404a60d96b5"/> 
     45  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0e850a-8702-11e5-8487-5404a60d96b5"/> 
     46  <rowAttribute label="uid" type="xs:string" useClass="recordId" uid="ec0e87c6-8702-11e5-8487-5404a60d96b5"/> 
     47  <rowAttribute label="spid" type="xs:string" useClass="internalLink" techNote="spatialShape" uid="ec0e8a64-8702-11e5-8487-5404a60d96b5"/> 
     48  <rowAttribute label="tmid" type="xs:string" useClass="internalLink" techNote="temporalShape" uid="ec0e8d0c-8702-11e5-8487-5404a60d96b5"/> 
     49  <rowAttribute label="odims" type="xs:string" uid="ec0e8faa-8702-11e5-8487-5404a60d96b5"/> 
     50  <rowAttribute label="coords" type="xs:string" uid="ec0e923e-8702-11e5-8487-5404a60d96b5"/> 
     51  <rowAttribute label="cell_methods" type="xs:string" uid="ec0e94c8-8702-11e5-8487-5404a60d96b5"/> 
     52  <rowAttribute label="cell_measures" type="xs:string" uid="ec0e975c-8702-11e5-8487-5404a60d96b5"/> 
     53  <rowAttribute label="flag_values" type="xs:string" uid="ec0e99fa-8702-11e5-8487-5404a60d96b5"/> 
     54  <rowAttribute label="flag_meanings" type="xs:string" uid="ec0e9c98-8702-11e5-8487-5404a60d96b5"/> 
     55  <rowAttribute label="description" type="xs:string" uid="ec0e9f22-8702-11e5-8487-5404a60d96b5"/> 
     56  <rowAttribute label="procNote" type="xs:string" uid="ec0ea1b6-8702-11e5-8487-5404a60d96b5"/> 
     57  <rowAttribute label="prov" type="xs:string" uid="ec0ea44a-8702-11e5-8487-5404a60d96b5"/> 
    5858</table> 
    5959<table label="spatialShape" uid="SECTION:spatialShape" title="Spatial dimensions" id="cmip.drv.004" itemLabelMode="def" level="3" maxOccurs="1" labUnique="Yes"> 
    60   <rowAttribute label="label" title="Record Label"/> 
    61   <rowAttribute label="title" title="Record Title"/> 
    62   <rowAttribute label="uid" useClass="recordId"/> 
    63   <rowAttribute label="dimensions"/> 
    64   <rowAttribute label="shape"/> 
    65   <rowAttribute label="levels" type="xs:integer" title="Number of vertical levels (ignored if levelFlag=false)"/> 
    66   <rowAttribute label="levelFlag" type="xs:boolean" title="Flag set to *false* if number of levels is optional (e.g. determined by the model)"/> 
     60  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0eae40-8702-11e5-8487-5404a60d96b5"/> 
     61  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0eb0e8-8702-11e5-8487-5404a60d96b5"/> 
     62  <rowAttribute label="uid" type="xs:string" useClass="recordId" uid="ec0eb37c-8702-11e5-8487-5404a60d96b5"/> 
     63  <rowAttribute label="dimensions" type="xs:string" uid="ec0eb61a-8702-11e5-8487-5404a60d96b5"/> 
     64  <rowAttribute label="shape" type="xs:string" uid="ec0eb8a4-8702-11e5-8487-5404a60d96b5"/> 
     65  <rowAttribute label="levels" type="xs:integer" title="Number of vertical levels (ignored if levelFlag=false)" uid="ec0ebb38-8702-11e5-8487-5404a60d96b5"/> 
     66  <rowAttribute label="levelFlag" type="xs:boolean" title="Flag set to *false* if number of levels is optional (e.g. determined by the model)" uid="ec0ebdd6-8702-11e5-8487-5404a60d96b5"/> 
    6767</table> 
    6868<table label="temporalShape" uid="SECTION:temporalShape" title="Temporal dimension" id="cmip.drv.005" itemLabelMode="def" level="3" maxOccurs="1" labUnique="Yes"> 
    69   <rowAttribute label="label" title="Record Label"/> 
    70   <rowAttribute label="title" title="Record Title"/> 
    71   <rowAttribute label="uid" useClass="recordId"/> 
    72   <rowAttribute label="dimensions"/> 
    73   <rowAttribute label="label"/> 
    74   <rowAttribute label="description"/> 
     69  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0ec5ba-8702-11e5-8487-5404a60d96b5"/> 
     70  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0ec876-8702-11e5-8487-5404a60d96b5"/> 
     71  <rowAttribute label="uid" type="xs:string" useClass="recordId" uid="ec0ecb1e-8702-11e5-8487-5404a60d96b5"/> 
     72  <rowAttribute label="dimensions" type="xs:string" uid="ec0ecda8-8702-11e5-8487-5404a60d96b5"/> 
     73  <rowAttribute label="label" type="xs:string" uid="ec0ed046-8702-11e5-8487-5404a60d96b5"/> 
     74  <rowAttribute label="description" type="xs:string" uid="ec0ed2e4-8702-11e5-8487-5404a60d96b5"/> 
    7575</table> 
    7676<table label="requestVar" uid="SECTION:requestVar" title="Request variable (carrying priority and link to group)" id="cmip.drv.006" itemLabelMode="def" level="3" maxOccurs="1" labUnique="No"> 
    77   <rowAttribute label="label" title="Record Label"/> 
    78   <rowAttribute label="title" title="Record Title"/> 
    79   <rowAttribute label="uid" useClass="recordId"/> 
    80   <rowAttribute label="priority" type="xs:integer"/> 
    81   <rowAttribute label="vid" title="Identifier for MIP Output Variable" useClass="internalLink" techNote="ovar"/> 
    82   <rowAttribute label="vgid" title="Identifier for Variable Group" useClass="internalLink" techNote="requestVarGroup"/> 
    83   <rowAttribute label="mip"/> 
    84   <rowAttribute label="table"/> 
     77  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0eddfc-8702-11e5-8487-5404a60d96b5"/> 
     78  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0ee0ae-8702-11e5-8487-5404a60d96b5"/> 
     79  <rowAttribute label="uid" type="xs:string" useClass="recordId" uid="ec0ee34c-8702-11e5-8487-5404a60d96b5"/> 
     80  <rowAttribute label="priority" type="xs:integer" uid="ec0ee6e4-8702-11e5-8487-5404a60d96b5"/> 
     81  <rowAttribute label="vid" type="xs:string" title="Identifier for MIP Output Variable" useClass="internalLink" techNote="ovar" uid="ec0ee982-8702-11e5-8487-5404a60d96b5"/> 
     82  <rowAttribute label="vgid" type="xs:string" title="Identifier for Variable Group" useClass="internalLink" techNote="requestVarGroup" uid="ec0eec2a-8702-11e5-8487-5404a60d96b5"/> 
     83  <rowAttribute label="mip" type="xs:string" uid="ec0eeebe-8702-11e5-8487-5404a60d96b5"/> 
     84  <rowAttribute label="table" type="xs:string" uid="ec0ef148-8702-11e5-8487-5404a60d96b5"/> 
    8585</table> 
    8686<table label="tableSection" uid="SECTION:tableSection" title="CMOR Table Sections" id="cmip.drv.007" itemLabelMode="def" level="1" maxOccurs="1" labUnique="No"> 
    87   <rowAttribute label="label" title="Record Label"/> 
    88   <rowAttribute label="title" title="Record Title"/> 
    89   <rowAttribute label="uid" useClass="recordId"/> 
    90   <rowAttribute label="gpid" title="Identifier for CMOR Tables" useClass="internalLink" techNote="requestVarGroup"/> 
    91   <rowAttribute label="mip" title="Project"/> 
    92   <rowAttribute label="ref"/> 
    93   <rowAttribute label="refNote"/> 
     87  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0efa80-8702-11e5-8487-5404a60d96b5"/> 
     88  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0efd28-8702-11e5-8487-5404a60d96b5"/> 
     89  <rowAttribute label="uid" type="xs:string" useClass="recordId" uid="ec0effd0-8702-11e5-8487-5404a60d96b5"/> 
     90  <rowAttribute label="gpid" type="xs:string" title="Identifier for CMOR Tables" useClass="internalLink" techNote="requestVarGroup" uid="ec0f026e-8702-11e5-8487-5404a60d96b5"/> 
     91  <rowAttribute label="mip" type="xs:string" title="Project" uid="ec0f0502-8702-11e5-8487-5404a60d96b5"/> 
     92  <rowAttribute label="ref" type="xs:string" uid="ec0f07a0-8702-11e5-8487-5404a60d96b5"/> 
     93  <rowAttribute label="refNote" type="xs:string" uid="ec0f0a34-8702-11e5-8487-5404a60d96b5"/> 
    9494</table> 
    9595<table label="requestVarGroup" uid="SECTION:requestVarGroup" title="Request variable group: a collection of request variables" id="cmip.drv.008" itemLabelMode="def" level="3" maxOccurs="1" labUnique="Yes"> 
    96   <rowAttribute label="label" title="Record Label"/> 
    97   <rowAttribute label="title" title="Record Title"/> 
    98   <rowAttribute label="uid" useClass="recordId"/> 
    99   <rowAttribute label="mip" title="Endorsed MIP requesting the data"/> 
    100   <rowAttribute label="ref"/> 
    101   <rowAttribute label="refNote"/> 
     96  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0f122c-8702-11e5-8487-5404a60d96b5"/> 
     97  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0f14de-8702-11e5-8487-5404a60d96b5"/> 
     98  <rowAttribute label="uid" type="xs:string" useClass="recordId" uid="ec0f177c-8702-11e5-8487-5404a60d96b5"/> 
     99  <rowAttribute label="mip" type="xs:string" title="Endorsed MIP defining the variable group" uid="ec0f1a10-8702-11e5-8487-5404a60d96b5"/> 
     100  <rowAttribute label="ref" type="xs:string" uid="ec0f1ca4-8702-11e5-8487-5404a60d96b5"/> 
     101  <rowAttribute label="refNote" type="xs:string" uid="ec0f1f38-8702-11e5-8487-5404a60d96b5"/> 
    102102</table> 
    103103<table label="requestLink" uid="SECTION:requestLink" title="Request link: linking a set of variables and a set of experiments" id="cmip.drv.009" itemLabelMode="def" level="4" maxOccurs="1" labUnique="No"> 
    104   <rowAttribute label="label" title="Record Label"/> 
    105   <rowAttribute label="title" title="Record Title"/> 
    106   <rowAttribute label="uid" useClass="recordId"/> 
    107   <rowAttribute label="mip"/> 
    108   <rowAttribute label="tab"/> 
    109   <rowAttribute label="objective"/> 
    110   <rowAttribute label="grid"/> 
    111   <rowAttribute label="gridreq"/> 
    112   <rowAttribute label="comment"/> 
    113   <rowAttribute label="ref"/> 
    114   <rowAttribute label="refNote"/> 
    115   <rowAttribute label="refid" title="reference to a request Variable Group" useClass="internalLink"/> 
    116   <rowAttribute label="opt" title="option for selecting a subset of variables"/> 
    117   <rowAttribute label="opar" title="parameter associated with *opt*"/> 
     104  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0f2f3c-8702-11e5-8487-5404a60d96b5"/> 
     105  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0f323e-8702-11e5-8487-5404a60d96b5"/> 
     106  <rowAttribute label="uid" type="xs:string" useClass="recordId" uid="ec0f3522-8702-11e5-8487-5404a60d96b5"/> 
     107  <rowAttribute label="mip" type="xs:string" title="Endorsed MIP requesting the data" useClass="internalLink" uid="ec0f381a-8702-11e5-8487-5404a60d96b5"/> 
     108  <rowAttribute label="tab" type="xs:string" uid="ec0f3aa4-8702-11e5-8487-5404a60d96b5"/> 
     109  <rowAttribute label="objective" type="xs:string" title="Science objectives associated with this request" description="Every request for model ouput is linked to one or more objectives. The XML link is made via objectiveLink records, each of which associates one requestLink with one objective record." uid="ec0f3d42-8702-11e5-8487-5404a60d96b5"/> 
     110  <rowAttribute label="grid" type="xs:string" uid="ec0f3fe0-8702-11e5-8487-5404a60d96b5"/> 
     111  <rowAttribute label="gridreq" type="xs:string" uid="ec0f427e-8702-11e5-8487-5404a60d96b5"/> 
     112  <rowAttribute label="comment" type="xs:string" uid="ec0f4508-8702-11e5-8487-5404a60d96b5"/> 
     113  <rowAttribute label="ref" type="xs:string" uid="ec0f4792-8702-11e5-8487-5404a60d96b5"/> 
     114  <rowAttribute label="refNote" type="xs:string" uid="ec0f4a26-8702-11e5-8487-5404a60d96b5"/> 
     115  <rowAttribute label="refid" type="xs:string" title="reference to a request Variable Group" useClass="internalLink" uid="ec0f4cba-8702-11e5-8487-5404a60d96b5"/> 
     116  <rowAttribute label="opt" type="xs:string" title="option for selecting a subset of variables" uid="ec0f4f4e-8702-11e5-8487-5404a60d96b5"/> 
     117  <rowAttribute label="opar" type="xs:string" title="parameter associated with *opt*" uid="ec0f51e2-8702-11e5-8487-5404a60d96b5"/> 
    118118</table> 
    119119<table label="requestItem" uid="SECTION:requestItem" title="Request Item: specifying the number of years for an experiment" id="cmip.drv.010" itemLabelMode="def" level="5" maxOccurs="1" labUnique="No"> 
    120   <rowAttribute label="label" title="Record Label"/> 
    121   <rowAttribute label="title" title="Record Title"/> 
    122   <rowAttribute label="uid" useClass="recordId"/> 
    123   <rowAttribute label="mip"/> 
    124   <rowAttribute label="tab"/> 
    125   <rowAttribute label="expt"/> 
    126   <rowAttribute label="rlid" title="Identifier of corresponding requestLink" useClass="internalLink"/> 
    127   <rowAttribute label="esid" title="Identifier experiment(s): a link to an experiment, an experiment group or a MIP" useClass="internalLink"/> 
    128   <rowAttribute label="esidComment"/> 
    129   <rowAttribute label="preset" type="xs:integer" title="Option to override priority set in each variable group"/> 
    130   <rowAttribute label="ny" type="xs:integer"/> 
    131   <rowAttribute label="nexmax" type="xs:integer"/> 
    132   <rowAttribute label="nenmax" type="xs:integer"/> 
    133   <rowAttribute label="nymax" type="xs:float"/> 
     120  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0f622c-8702-11e5-8487-5404a60d96b5"/> 
     121  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0f64f2-8702-11e5-8487-5404a60d96b5"/> 
     122  <rowAttribute label="uid" type="xs:string" useClass="recordId" uid="ec0f679a-8702-11e5-8487-5404a60d96b5"/> 
     123  <rowAttribute label="mip" type="xs:string" uid="ec0f6a2e-8702-11e5-8487-5404a60d96b5"/> 
     124  <rowAttribute label="tab" type="xs:string" uid="ec0f6cc2-8702-11e5-8487-5404a60d96b5"/> 
     125  <rowAttribute label="expt" type="xs:string" uid="ec0f6f4c-8702-11e5-8487-5404a60d96b5"/> 
     126  <rowAttribute label="rlid" type="xs:string" title="Identifier of corresponding requestLink" useClass="internalLink" uid="ec0f71ea-8702-11e5-8487-5404a60d96b5"/> 
     127  <rowAttribute label="esid" type="xs:string" title="Identifier experiment(s): a link to an experiment, an experiment group or a MIP" useClass="internalLink" uid="ec0f7488-8702-11e5-8487-5404a60d96b5"/> 
     128  <rowAttribute label="esidComment" type="xs:string" uid="ec0f771c-8702-11e5-8487-5404a60d96b5"/> 
     129  <rowAttribute label="preset" type="xs:integer" title="Option to override priority set in each variable group" uid="ec0f79b0-8702-11e5-8487-5404a60d96b5"/> 
     130  <rowAttribute label="ny" type="xs:integer" uid="ec0f7c3a-8702-11e5-8487-5404a60d96b5"/> 
     131  <rowAttribute label="nexmax" type="xs:integer" uid="ec0f7ec4-8702-11e5-8487-5404a60d96b5"/> 
     132  <rowAttribute label="nenmax" type="xs:integer" uid="ec0f8270-8702-11e5-8487-5404a60d96b5"/> 
     133  <rowAttribute label="nymax" type="xs:float" uid="ec0f850e-8702-11e5-8487-5404a60d96b5"/> 
    134134</table> 
    135135<table label="remarks" uid="SECTION:remarks" title="Remarks about other items" id="cmip.drv.011" itemLabelMode="def" level="10" maxOccurs="1" labUnique="No"> 
    136   <rowAttribute label="label" title="Record Label"/> 
    137   <rowAttribute label="title" title="Record Title"/> 
    138   <rowAttribute label="uid" useClass="recordId"/> 
    139   <rowAttribute label="tid" title="Target identifier: the record ID of the item this refers to." useClass="internalLink"/> 
    140   <rowAttribute label="tattr" title="Target attribute: an attribute of the target item, or 'ALL'"/> 
    141   <rowAttribute label="description" title="Free text remarks -- unless there are specific restrictions associated with the class attribute of this remark"/> 
    142   <rowAttribute label="class" title="Different classes of remark support a range of specialised usages: free (a free text comment), modelTypeReq (a model type requirement), modelTypeExcl (a model type exclusion), varAlt (an alternative variable that my be used instead of this one), varSup (an alternative variable which, if selected makes this one redundant), attChange (a change in the value of an attribute -- old value provided in 'techNote')."/> 
    143   <rowAttribute label="qid" title="Identifier required for classes modelTypeReq, modelTypeExcl, varAlt, varSup. For the first two classes, the identifier points to a model type specification, for the last two it points to an output variable specification."/> 
    144   <rowAttribute label="techNote" title="Optional additional machine readable content (though not restricted by the schema)"/> 
    145   <rowAttribute label="prov" title="Provenance"/> 
     136  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0f9422-8702-11e5-8487-5404a60d96b5"/> 
     137  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0f96de-8702-11e5-8487-5404a60d96b5"/> 
     138  <rowAttribute label="uid" type="xs:string" useClass="recordId" uid="ec0f997c-8702-11e5-8487-5404a60d96b5"/> 
     139  <rowAttribute label="tid" type="xs:string" title="Target identifier: the record ID of the item this refers to." useClass="internalLink" uid="ec0f9c1a-8702-11e5-8487-5404a60d96b5"/> 
     140  <rowAttribute label="tattr" type="xs:string" title="Target attribute: an attribute of the target item, or 'ALL'" uid="ec0f9eae-8702-11e5-8487-5404a60d96b5"/> 
     141  <rowAttribute label="description" type="xs:string" title="Free text remarks -- unless there are specific restrictions associated with the class attribute of this remark" uid="ec0fa14c-8702-11e5-8487-5404a60d96b5"/> 
     142  <rowAttribute label="class" type="xs:string" title="Different classes of remark support a range of specialised usages: free (a free text comment), modelTypeReq (a model type requirement), modelTypeExcl (a model type exclusion), varAlt (an alternative variable that my be used instead of this one), varSup (an alternative variable which, if selected makes this one redundant), attChange (a change in the value of an attribute -- old value provided in 'techNote')." uid="ec0fa3ea-8702-11e5-8487-5404a60d96b5"/> 
     143  <rowAttribute label="qid" type="xs:string" title="Identifier required for classes modelTypeReq, modelTypeExcl, varAlt, varSup. For the first two classes, the identifier points to a model type specification, for the last two it points to an output variable specification." uid="ec0fa688-8702-11e5-8487-5404a60d96b5"/> 
     144  <rowAttribute label="techNote" type="xs:string" title="Optional additional machine readable content (though not restricted by the schema)" uid="ec0fa926-8702-11e5-8487-5404a60d96b5"/> 
     145  <rowAttribute label="prov" type="xs:string" title="Provenance" uid="ec0faba6-8702-11e5-8487-5404a60d96b5"/> 
    146146</table> 
    147147<table label="experiment" uid="SECTION:experiment" title="Experiments" id="cmip.drv.012" itemLabelMode="def" level="0" maxOccurs="1" labUnique="No"> 
    148   <rowAttribute label="label" title="Record Label"/> 
    149   <rowAttribute label="title" title="Record Title"/> 
    150   <rowAttribute label="uid" title="Record identifier" useClass="recordId"/> 
    151   <rowAttribute label="description" title="Description" useClass="freeText"/> 
    152   <rowAttribute label="egid" title="Identifier for experiment group" useClass="internalLink"/> 
    153   <rowAttribute label="mip" title="MIP defining experiment" useClass="internalLink"/> 
    154   <rowAttribute label="mcfg" title="Model category"/> 
    155   <rowAttribute label="tier" type="xs:integer" title="Tier of experiment"/> 
    156   <rowAttribute label="nstart" type="xs:integer" title="Number of start dates"/> 
    157   <rowAttribute label="starty"/> 
    158   <rowAttribute label="endy"/> 
    159   <rowAttribute label="yps" type="xs:integer" title="Years per simulation"/> 
    160   <rowAttribute label="ensz" type="xs:integer" title="Ensemble size"/> 
    161   <rowAttribute label="ntot" type="xs:integer" title="Total number of years"/> 
    162   <rowAttribute label="comment" title="Comment"/> 
     148  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0fbf7e-8702-11e5-8487-5404a60d96b5"/> 
     149  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0fc23a-8702-11e5-8487-5404a60d96b5"/> 
     150  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" uid="ec0fc4f6-8702-11e5-8487-5404a60d96b5"/> 
     151  <rowAttribute label="description" type="xs:string" title="Description" useClass="freeText" uid="ec0fc794-8702-11e5-8487-5404a60d96b5"/> 
     152  <rowAttribute label="egid" type="xs:string" title="Identifier for experiment group" useClass="internalLink" uid="ec0fca3c-8702-11e5-8487-5404a60d96b5"/> 
     153  <rowAttribute label="mip" type="xs:string" title="MIP defining experiment" useClass="internalLink" uid="ec0fcce4-8702-11e5-8487-5404a60d96b5"/> 
     154  <rowAttribute label="mcfg" type="xs:string" title="Model category" uid="ec0fcf8c-8702-11e5-8487-5404a60d96b5"/> 
     155  <rowAttribute label="tier" type="xs:integer" title="Tier of experiment" description="Experiments are assigned a tier by the MIP specifying the tier, tier 1 experiments being the most important." uid="ec0fd220-8702-11e5-8487-5404a60d96b5"/> 
     156  <rowAttribute label="nstart" type="xs:integer" title="Number of start dates" uid="ec0fd4c8-8702-11e5-8487-5404a60d96b5"/> 
     157  <rowAttribute label="starty" type="xs:string" uid="ec0fd7d4-8702-11e5-8487-5404a60d96b5"/> 
     158  <rowAttribute label="endy" type="xs:string" uid="ec0fda90-8702-11e5-8487-5404a60d96b5"/> 
     159  <rowAttribute label="yps" type="xs:integer" title="Years per simulation" uid="ec0fdd6a-8702-11e5-8487-5404a60d96b5"/> 
     160  <rowAttribute label="ensz" type="xs:integer" title="Ensemble size" uid="ec0fe026-8702-11e5-8487-5404a60d96b5"/> 
     161  <rowAttribute label="ntot" type="xs:integer" title="Total number of years" uid="ec0fe2e2-8702-11e5-8487-5404a60d96b5"/> 
     162  <rowAttribute label="comment" type="xs:string" title="Comment" uid="ec0fe5a8-8702-11e5-8487-5404a60d96b5"/> 
    163163</table> 
    164164<table label="exptgroup" uid="SECTION:exptgroup" title="Experiment Group" id="cmip.drv.013" itemLabelMode="def" level="0" maxOccurs="1" labUnique="No"> 
    165   <rowAttribute label="label" title="Record Label"/> 
    166   <rowAttribute label="title" title="Record Title"/> 
    167   <rowAttribute label="uid" title="Record identifier" useClass="recordId"/> 
    168   <rowAttribute label="tierMin" type="xs:integer" title="Minimum tier of experiments in group"/> 
    169   <rowAttribute label="ntot" type="xs:integer" title="Total number of years"/> 
     165  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec0fee7c-8702-11e5-8487-5404a60d96b5"/> 
     166  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec0ff16a-8702-11e5-8487-5404a60d96b5"/> 
     167  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" uid="ec0ff412-8702-11e5-8487-5404a60d96b5"/> 
     168  <rowAttribute label="tierMin" type="xs:integer" title="Minimum tier of experiments in group" uid="ec0ff6a6-8702-11e5-8487-5404a60d96b5"/> 
     169  <rowAttribute label="ntot" type="xs:integer" title="Total number of years" uid="ec0ff944-8702-11e5-8487-5404a60d96b5"/> 
    170170</table> 
    171171<table label="objective" uid="SECTION:objective" title="Scientific objectives" id="cmip.drv.014" itemLabelMode="def" level="0" maxOccurs="1" labUnique="No"> 
    172   <rowAttribute label="label" title="Record Label"/> 
    173   <rowAttribute label="title" title="Record Title"/> 
    174   <rowAttribute label="uid" title="Record identifier" useClass="recordId"/> 
    175   <rowAttribute label="description" title="Description" useClass="freeText"/> 
    176   <rowAttribute label="title" title="Long name"/> 
    177   <rowAttribute label="mip" title="Endorsed MIP"/> 
     172  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec100290-8702-11e5-8487-5404a60d96b5"/> 
     173  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec100588-8702-11e5-8487-5404a60d96b5"/> 
     174  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" uid="ec100858-8702-11e5-8487-5404a60d96b5"/> 
     175  <rowAttribute label="description" type="xs:string" title="Description" useClass="freeText" uid="ec100b32-8702-11e5-8487-5404a60d96b5"/> 
     176  <rowAttribute label="title" type="xs:string" title="Long name" uid="ec100e0c-8702-11e5-8487-5404a60d96b5"/> 
     177  <rowAttribute label="mip" type="xs:string" title="Endorsed MIP" uid="ec1010d2-8702-11e5-8487-5404a60d96b5"/> 
    178178</table> 
    179179<table label="objectiveLink" uid="SECTION:objectiveLink" title="Link between scientific objectives and requests" id="cmip.drv.015" itemLabelMode="def" level="0" maxOccurs="1" labUnique="No"> 
    180   <rowAttribute label="label" title="Record Label"/> 
    181   <rowAttribute label="title" title="Record Title"/> 
    182   <rowAttribute label="uid" title="Record identifier" useClass="recordId"/> 
    183   <rowAttribute label="oid" title="Identifier for a scientific objective" useClass="internalLink" techNote="objective"/> 
    184   <rowAttribute label="rid" title="Identifier for a request link" useClass="internalLink" techNote="requestLink"/> 
     180  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec1019d8-8702-11e5-8487-5404a60d96b5"/> 
     181  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec101d20-8702-11e5-8487-5404a60d96b5"/> 
     182  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" uid="ec101ffa-8702-11e5-8487-5404a60d96b5"/> 
     183  <rowAttribute label="oid" type="xs:string" title="Identifier for a scientific objective" useClass="internalLink" techNote="objective" uid="ec1022d4-8702-11e5-8487-5404a60d96b5"/> 
     184  <rowAttribute label="rid" type="xs:string" title="Identifier for a request link" useClass="internalLink" techNote="requestLink" uid="ec1025a4-8702-11e5-8487-5404a60d96b5"/> 
    185185</table> 
    186186<table label="varChoiceLinkR" uid="SECTION:varChoiceLinkR" title="Links a variable to a choice element" id="cmip.drv.016" itemLabelMode="def" level="0" maxOccurs="1" labUnique="Yes"> 
    187   <rowAttribute label="label" title="Record Label"/> 
    188   <rowAttribute label="title" title="Record Title"/> 
    189   <rowAttribute label="uid" title="Record identifier" useClass="recordId"/> 
    190   <rowAttribute label="vid" title="Variable" useClass="internalLink"/> 
    191   <rowAttribute label="cid" title="Choice" useClass="internalLink"/> 
    192   <rowAttribute label="rank" type="xs:integer" title="For ranked choices, the rank of this variable (higher rank makes lower ranks redundant)"/> 
     187  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec102f9a-8702-11e5-8487-5404a60d96b5"/> 
     188  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec10327e-8702-11e5-8487-5404a60d96b5"/> 
     189  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" uid="ec103666-8702-11e5-8487-5404a60d96b5"/> 
     190  <rowAttribute label="vid" type="xs:string" title="Variable" useClass="internalLink" uid="ec103936-8702-11e5-8487-5404a60d96b5"/> 
     191  <rowAttribute label="cid" type="xs:string" title="Choice" useClass="internalLink" uid="ec103c06-8702-11e5-8487-5404a60d96b5"/> 
     192  <rowAttribute label="rank" type="xs:integer" title="For ranked choices, the rank of this variable (higher rank makes lower ranks redundant)" uid="ec103ee0-8702-11e5-8487-5404a60d96b5"/> 
    193193</table> 
    194194<table label="varChoiceLinkC" uid="SECTION:varChoiceLinkC" title="Links a variable to a choice element" id="cmip.drv.017" itemLabelMode="def" level="0" maxOccurs="1" labUnique="Yes"> 
    195   <rowAttribute label="label" title="Record Label"/> 
    196   <rowAttribute label="title" title="Record Title"/> 
    197   <rowAttribute label="uid" title="Record identifier" useClass="recordId"/> 
    198   <rowAttribute label="vid" title="Variable" useClass="internalLink"/> 
    199   <rowAttribute label="cfgid" title="Configuration Option" useClass="internalLink"/> 
    200   <rowAttribute label="cfg" type="xs:boolean" title="Configuration Value"/> 
    201   <rowAttribute label="cid" title="Choice -- can provide a link to related variables" useClass="internalLink"/> 
     195  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec104a02-8702-11e5-8487-5404a60d96b5"/> 
     196  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec104d04-8702-11e5-8487-5404a60d96b5"/> 
     197  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" uid="ec104fd4-8702-11e5-8487-5404a60d96b5"/> 
     198  <rowAttribute label="vid" type="xs:string" title="Variable" useClass="internalLink" uid="ec1052a4-8702-11e5-8487-5404a60d96b5"/> 
     199  <rowAttribute label="cfgid" type="xs:string" title="Configuration Option" useClass="internalLink" uid="ec10556a-8702-11e5-8487-5404a60d96b5"/> 
     200  <rowAttribute label="cfg" type="xs:boolean" title="Configuration Value" uid="ec105844-8702-11e5-8487-5404a60d96b5"/> 
     201  <rowAttribute label="cid" type="xs:string" title="Choice -- can provide a link to related variables" useClass="internalLink" uid="ec105b1e-8702-11e5-8487-5404a60d96b5"/> 
    202202</table> 
    203203<table label="varChoice" uid="SECTION:varChoice" title="Indicates variables for which a there is a range of potential CMOR Varibles" id="cmip.drv.018" itemLabelMode="def" level="0" maxOccurs="1" labUnique="Yes"> 
    204   <rowAttribute label="label" title="Record Label"/> 
    205   <rowAttribute label="title" title="Record Title"/> 
    206   <rowAttribute label="uid" title="Record identifier" useClass="recordId"/> 
    207   <rowAttribute label="class" title="Class of choice: heirarchy|cfg"/> 
    208   <rowAttribute label="title"/> 
    209   <rowAttribute label="description"/> 
    210   <rowAttribute label="varList" title="A colon separated list of variable names"/> 
    211   <rowAttribute label="optionList" title="A list of options, one for each variable"/> 
     204  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec10671c-8702-11e5-8487-5404a60d96b5"/> 
     205  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec106a00-8702-11e5-8487-5404a60d96b5"/> 
     206  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" uid="ec106cda-8702-11e5-8487-5404a60d96b5"/> 
     207  <rowAttribute label="class" type="xs:string" title="Class of choice: heirarchy|cfg" uid="ec106faa-8702-11e5-8487-5404a60d96b5"/> 
     208  <rowAttribute label="title" type="xs:string" uid="ec10727a-8702-11e5-8487-5404a60d96b5"/> 
     209  <rowAttribute label="description" type="xs:string" uid="ec107540-8702-11e5-8487-5404a60d96b5"/> 
     210  <rowAttribute label="varList" type="xs:string" title="A colon separated list of variable names" uid="ec107810-8702-11e5-8487-5404a60d96b5"/> 
     211  <rowAttribute label="optionList" type="xs:string" title="A list of options, one for each variable" uid="ec107ad6-8702-11e5-8487-5404a60d96b5"/> 
    212212</table> 
    213213<table label="mip" uid="SECTION:mip" title="Model Intercomparison Project" id="cmip.drv.019" itemLabelMode="def" level="0" maxOccurs="1" labUnique="Yes"> 
    214   <rowAttribute label="label" title="Record Label"/> 
    215   <rowAttribute label="title" title="Record Title"/> 
    216   <rowAttribute label="uid" title="Record identifier" useClass="recordId"/> 
    217   <rowAttribute label="title"/> 
    218   <rowAttribute label="description"/> 
    219   <rowAttribute label="url"/> 
    220   <rowAttribute label="status"/> 
     214  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec10847c-8702-11e5-8487-5404a60d96b5"/> 
     215  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec10876a-8702-11e5-8487-5404a60d96b5"/> 
     216  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" uid="ec108a3a-8702-11e5-8487-5404a60d96b5"/> 
     217  <rowAttribute label="title" type="xs:string" uid="ec108d1e-8702-11e5-8487-5404a60d96b5"/> 
     218  <rowAttribute label="description" type="xs:string" uid="ec108fe4-8702-11e5-8487-5404a60d96b5"/> 
     219  <rowAttribute label="url" type="xs:string" uid="ec1092aa-8702-11e5-8487-5404a60d96b5"/> 
     220  <rowAttribute label="status" type="xs:string" uid="ec109566-8702-11e5-8487-5404a60d96b5"/> 
    221221</table> 
    222222<table label="modelConfig" uid="SECTION:modelConfig" title="Model configuration options" id="cmip.drv.020" itemLabelMode="an" level="0" maxOccurs="1" labUnique="Yes"> 
    223   <rowAttribute label="label" title="Record Label"/> 
    224   <rowAttribute label="title" title="Record Title"/> 
    225   <rowAttribute label="uid" title="Record identifier" useClass="recordId"/> 
    226   <rowAttribute label="title"/> 
    227   <rowAttribute label="MIPs"/> 
    228   <rowAttribute label="usage"/> 
    229   <rowAttribute label="type"/> 
    230   <rowAttribute label="range" title="Range of valid values, e.g. xs:boolean"/> 
     223  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec10a006-8702-11e5-8487-5404a60d96b5"/> 
     224  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec10a2f4-8702-11e5-8487-5404a60d96b5"/> 
     225  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" uid="ec10a5ce-8702-11e5-8487-5404a60d96b5"/> 
     226  <rowAttribute label="title" type="xs:string" uid="ec10a894-8702-11e5-8487-5404a60d96b5"/> 
     227  <rowAttribute label="MIPs" type="xs:string" uid="ec10ab64-8702-11e5-8487-5404a60d96b5"/> 
     228  <rowAttribute label="usage" type="xs:string" uid="ec10ae20-8702-11e5-8487-5404a60d96b5"/> 
     229  <rowAttribute label="type" type="xs:string" uid="ec10b0f0-8702-11e5-8487-5404a60d96b5"/> 
     230  <rowAttribute label="range" type="xs:string" title="Range of valid values, e.g. xs:boolean" uid="ec10b3a2-8702-11e5-8487-5404a60d96b5"/> 
    231231</table> 
    232232<table label="standardname" uid="SECTION:standardname" title="CF Standard Names" id="cmip.drv.021" itemLabelMode="an" level="0" maxOccurs="1" labUnique="Yes"> 
    233   <rowAttribute label="label" title="Record Label"/> 
    234   <rowAttribute label="title" title="Record Title"/> 
    235   <rowAttribute label="uid" title="CF Standard Name" useClass="recordId"/> 
    236   <rowAttribute label="description"/> 
    237   <rowAttribute label="title"/> 
    238   <rowAttribute label="label"/> 
    239   <rowAttribute label="units" title="Canonical Units"/> 
     233  <rowAttribute label="label" type="xs:string" title="Record Label" uid="ec10bdca-8702-11e5-8487-5404a60d96b5"/> 
     234  <rowAttribute label="title" type="xs:string" title="Record Title" uid="ec10c0ae-8702-11e5-8487-5404a60d96b5"/> 
     235  <rowAttribute label="uid" type="xs:string" title="CF Standard Name" useClass="recordId" uid="ec10c374-8702-11e5-8487-5404a60d96b5"/> 
     236  <rowAttribute label="description" type="xs:string" uid="ec10c630-8702-11e5-8487-5404a60d96b5"/> 
     237  <rowAttribute label="title" type="xs:string" uid="ec10c8f6-8702-11e5-8487-5404a60d96b5"/> 
     238  <rowAttribute label="label" type="xs:string" uid="ec10cbbc-8702-11e5-8487-5404a60d96b5"/> 
     239  <rowAttribute label="units" type="xs:string" title="Canonical Units" uid="ec10ce82-8702-11e5-8487-5404a60d96b5"/> 
    240240</table> 
    241241</defDoc> 
  • CMIP6dreqbuild/trunk/src/framework/ptxt.py

    r463 r470  
    6161re_is = re.compile( '\[(.*)\]' ) 
    6262re_atdef = re.compile( '^(?P<n>\S+)\s*(((?P<b>\[.*?])|(?P<a>\{.*?\})|(?P<c>\<.*?\>))\s*){0,3}$' ) 
    63 re_atdef = re.compile( '^(?P<n>\S+)\s*((\[(?P<b>.*?)\]|\{(?P<a>.*?)\}|\<(?P<c>.*?)\>)\s*){0,3}$' ) 
     63re_atdef = re.compile( '^(?P<n>\S+)\s*((\[(?P<b>.*?)\]|\{(?P<a>.*?)\}|\<(?P<c>.*?)\>|desc:(?P<desc>.*?)::)\s*){0,3}$' ) 
    6464 
    6565### tuble to define attributes of an item 
    66 nt__itematt = collections.namedtuple( 'itematt', ['name','type','title','clss','techn'] ) 
     66nt__itematt = collections.namedtuple( 'itematt', ['name','type','title','clss','techn','uid','description','superclass'] ) 
    6767 
    6868vocab_elTmpl = '''<table label="%(label)s" uid="%(uid)s" title="%(title)s" id="%(id)s" itemLabelMode="%(ilm)s" level="%(sectLevel)s" maxOccurs="%(mxo)s" labUnique="%(labu)s"> 
     
    7070</table> 
    7171''' 
    72 ial_elTmpl = '  <rowAttribute label="%(label)s"%(wrappedType)s%(wrappedTitle)s%(wrappedClass)s%(wrappedTechn)s/>' 
    73  
    74 expl_Tmpl = '''<%(label)s uid="%(uid)s" useClass="vocab" title="%(title)s" id="%(id)s"> 
     72ial_elTmpl = '  <rowAttribute label="%(label)s"%(wrappedType)s%(wrappedTitle)s%(wrappedClass)s%(wrappedTechn)s%(wrappedDescription)s%(wrappedUid)s%(wrappedSuperclass)s/>' 
     73 
     74expl_Tmpl = '''<%(label)s label="%(label)s" uid="%(uid)s" useClass="vocab" title="%(title)s" id="%(id)s"> 
    7575<!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 
    7676%(exampleItem)s 
     
    7878''' 
    7979item_Tmpl = '<item id="%(id)s" label="%(label)s" title="%(title)s"%(extras)s/>' 
     80 
     81def wrap( x,y): 
     82  if y == None: 
     83    return '' 
     84  else: 
     85    return x % y 
    8086 
    8187class vocab(object): 
     
    95101     self.msg( '[%s] %s {%s:%s}' % (self.label, self.title, self.id, self.ilt) ) 
    96102###nt__itematt = collections.namedtuple( 'itematt', ['name','type','title','clss','techn'] ) 
    97      self.itematts = [  nt__itematt( 'label','xs:string','Record Label',None,None ), 
    98                         nt__itematt( 'title','xs:string','Record Title',None,None ) ] 
     103###nt__itematt = collections.namedtuple( 'itematt', ['name','type','title','clss','techn','uid','description','superclass'] ) 
     104     self.itematts = [  nt__itematt( 'label','xs:string','Record Label',None,None,None,None,None ), 
     105                        nt__itematt( 'title','xs:string','Record Title',None,None,None,None,None ) ] 
    99106     self.counter = counter 
    100107 
     
    103110       ss = [] 
    104111       for i in self.itematts: 
    105          if i.clss != None: 
    106            wrappedClass = ' useClass="%s"' % i.clss 
     112         wrappedClass = wrap( ' useClass="%s"' , i.clss ) 
     113         wrappedTechn = wrap( ' techNote="%s"' , i.techn ) 
     114         wrappedTitle = wrap( ' title="%s"' , i.title ) 
     115         wrappedType = wrap( ' type="%s"' , i.type ) 
     116         if i.uid == None: 
     117           wrappedUid = wrap( ' uid="%s"' , str( uuid.uuid1() ) ) 
    107118         else: 
    108            wrappedClass = '' 
    109  
    110          if i.techn != None: 
    111            wrappedTechn = ' techNote="%s"' % i.techn 
    112          else: 
    113            wrappedTechn = '' 
    114  
    115          if i.title != None: 
    116            wrappedTitle = ' title="%s"' % i.title 
    117          else: 
    118            wrappedTitle = '' 
    119  
    120          if i.type != "xs:string": 
    121            wrappedType = ' type="%s"' % i.type 
    122          else: 
    123            wrappedType = '' 
     119           wrappedUid = wrap( ' uid="%s"' , i.uid ) 
     120 
     121         wrappedDescription = wrap( ' description="%s"' , i.description ) 
     122         wrappedSuperclass = wrap( ' superclass="%s"' , i.superclass ) 
    124123 
    125124         label = i.name 
     
    203202         bn = string.split(b, ' ')[0] 
    204203         x = self.pb(b) 
    205          self.itematts.append( nt__itematt( bn, x[0], x[1], x[2], x[3] ) ) 
     204         self.itematts.append( nt__itematt( bn, x[0], x[1], x[2], x[3], None,x[4], None ) ) 
    206205         self.msg( '%s, %s, %s, %s, %s' % (bn, x[0], x[1], x[2], x[3]) ) 
    207206 
     
    214213    else: 
    215214      ee = m.groupdict() 
    216       for k in ['a','b','c']: 
     215      for k in ['a','b','c','desc']: 
    217216        if type( ee[k] ) == type( 'x' ): 
    218217          assert string.find( ee[k], '"' ) == -1, 'unable to deal with quote in string: %s' % ee[k] 
     
    220219      itemType = ee['b'] 
    221220      itemClass = ee['c'] 
     221      itemDescription = ee['desc'] 
    222222      itemTechNote = None 
    223223      if itemType == None: 
     
    230230          itemTechNote = bits[1] 
    231231         
    232     #if len(x) > 0: 
    233       #itemTitle = x[0] 
    234     #else: 
    235       #itemTitle = None 
    236     #x = re_is.findall(b) 
    237     #if len(x) > 0: 
    238       #itemType = x[0] 
    239     #else: 
    240       #itemType = 'xs:string' 
    241     return [itemType, itemTitle,itemClass,itemTechNote]  
     232    return [itemType, itemTitle,itemClass,itemTechNote, itemDescription]  
    242233 
    243234class main(object): 
  • CMIP6dreqbuild/trunk/src/framework/scanDreq.py

    r458 r470  
    260260class rqHtml(object): 
    261261 
    262   def __init__(self,odir='./html/'): 
     262  def __init__(self,odir='./htmlSc/'): 
    263263    self.odir = odir 
    264264    if not os.path.isdir(odir): 
  • CMIP6dreqbuild/trunk/src/workbook/importShDreq2.py

    r457 r470  
    2727tableNameMap = {'CMIP5_3hr':'3hr', 'CMIP5_6hrLev':'6hrLev', 'CMIP5_6hrPlev':'6hrPlev', 'CMIP5_Amon':'Amon', 'CMIP5_LImon':'LImon', 'CMIP5_Lmon':'Lmon', 'CMIP5_OImon':'CMIP5_OImon', 'CMIP5_Oclim':'Oclim', 'CMIP5_Omon':'CMIP5_Omon', 'CMIP5_Oyr':'CMIP5_Oyr', 'CMIP5_aero':'aero', 'CMIP5_cf3hr':'cf3hr', 'CMIP5_cfDay':'cfDay', 'CMIP5_cfMon':'cfMon', 'CMIP5_cfOff':'cfOff', 'CMIP5_cfSites':'cfsites', 'CMIP5_day':'day', 'CMIP5_fx':'fx', 'OMIP.Omon':'Omon', 'OMIP.Oyr':'Oyr', 'OMIP.day':'Oday', 'OMIP.fx':'Ofx' } 
    2828 
    29 redundantTables = ['CCMI1_annual', 'CCMI1_daily', 'CCMI1_fixed', 'CCMI1_hourly', 'CORDEX_3h', 'CORDEX_6h', 'CORDEX_fx', 'CORDEX_mon', 'CORDEX_sem', 'PMIP3_Aclim', 'PMIP3_Amon', 'PMIP3_LIclim', 'PMIP3_LImon', 'PMIP3_Lclim', 'PMIP3_Lmon', 'PMIP3_OIclim', 'PMIP3_OImon', 'PMIP3_Oclim', 'PMIP3_Omon', 'PMIP3_day', 'PMIP3_fx', 'SPECS_6hr', 'SPECS_Lmon', 'SPECS_fx'] 
     29redundantTables = ['CORDEX_3h', 'CORDEX_6h', 'CORDEX_fx', 'CORDEX_mon', 'CORDEX_sem', 'PMIP3_Aclim', 'PMIP3_Amon', 'PMIP3_LIclim', 'PMIP3_LImon', 'PMIP3_Lclim', 'PMIP3_Lmon', 'PMIP3_OIclim', 'PMIP3_OImon', 'PMIP3_Oclim', 'PMIP3_Omon', 'PMIP3_day', 'PMIP3_fx', 'SPECS_6hr', 'SPECS_Lmon', 'SPECS_fx'] 
    3030 
    3131## mapping of variable groups representing tables .... 
     
    8888    self.src=src 
    8989    self.vgcheck = {} 
     90    self.rqlPreset = {} 
    9091    fok = [test(os.path.isfile(src),'%s not found' % src), ] 
    9192    assert all( fok), 'Required input file(s) missing' 
     
    239240            ss.add( thisl ) 
    240241          self.varGroupByLabel[thisl] = r 
    241           self.varGroupUids.add( r[0] ) 
     242          self.varGroupUids.add( thissh[r][0] ) 
    242243 
    243244    for k in self.prqv.exrqvg.keys(): 
     
    351352          ll = thissh[k][:] 
    352353          vgid = self.prqv.rqv_vg['%s.%s.%s' % (ll[2],ll[1],ll[0])] 
     354          if ll[1][:5] == 'CFMIP': 
     355             print 'INFO.802.00001: ',ll, vgid in self.varGroupSubset.keys() 
    353356          if vgid in self.varGroupSubset.keys(): 
    354357             varGroupFull[vgid][ll[0]] = k 
     
    730733      u,v,f = (c[0],c[2],c[21]) 
    731734      self.cmvUidByFL[f].a[v].append( u )  
    732                     ##self.cmv.append( (tt.uid, (tt.dimensions,tt.cell_methods,tt.cell_measures,tt.flag_values,tt.flag_meanings), lab, tt.title, tt.comment, tt.vid, \ 
    733                       ##tt.deflate_level, tt.shuffle, tt.ok_max_mean_abs, tt.flag_meanings, tt.type, tt.ok_min_mean_abs, \ 
    734                       ##tt.deflate, tt.valid_min, tt.flag_values, tt.modeling_realm, tt.valid_max, tt.positive, tt.mipTable, \ 
    735                       ##prov, '', fr, tt.rowIndex, '') ) 
    736735 
    737736####################################################################################### 
     
    12691268              self.objectiveLinks[mip].a[b].append( str( ll[0] ) ) 
    12701269            self.requestlinkuid.add( str(ll[0] ) ) 
     1270            self.rqlPreset[str(ll[0])] = ll[9] 
    12711271            dothis = False 
    12721272         
     
    12871287              kk = ['mip', 'tab', 'expt', 'rlid', 'ny', 'nexmax', 'nenmax', 'nymax'] 
    12881288              thisl = mycc( '%s %s' % (ll[0],ll[1]) ) 
     1289              if str( ll[3] ) not in self.rqlPreset: 
     1290                 print 'ERROR.090.02000: requestlink not found .. ',ll 
     1291                 preset = '-99' 
     1292              else: 
     1293                 preset = str( self.rqlPreset[ str( ll[3] ) ] ) 
    12891294              if str( ll[3] ) not in self.requestlinkuid: 
    12901295                print 'SEVERE.005.00005: rlid not found: %s' % str(ll) 
     
    13041309              item.setAttribute( 'title', '%s, %s, %s' % (ll[0],ll[1],ll[2]) ) 
    13051310              item.setAttribute( 'uid', str(i) ) 
     1311              item.setAttribute( 'preset', preset ) 
    13061312              ku = str(ll[2]) 
    13071313              item.setAttribute( 'esid', self.exptPntUid[ku][0] ) 
     
    13141320              kk = ['uid', 'gpid', 'mip', 'label', 'title', 'ref', 'refNote'] 
    13151321            thisl = string.replace( str( ll[2] ), '.', '-' ) 
     1322            if str(ll[0]) not in self.varGroupUids: 
     1323              print 'WARN.077.07707: uid not traced: ',ll 
     1324            else: 
     1325              print 'INFO.077.07707: uid traced: ',ll 
    13161326            for j in range(len(kk)): 
    13171327                item.setAttribute( kk[j], str( ll[j] ) ) 
     
    13711381                if n == "stid": 
    13721382                  item.setAttribute( n, stid ) 
     1383                elif n == "label": 
     1384                  thisl = string.replace( r[k], '_', '' ) 
     1385                  item.setAttribute( n, thisl ) 
    13731386                elif n == "frequency": 
    13741387                  fr = freqmap.get( str(r[k]), str(r[k]) ) 
     
    14221435              if k == 'priority': 
    14231436                item.setAttribute( kk[i], str( int(v) ) ) 
     1437              elif kk[i] == 'label': 
     1438                thisl = string.replace( v, '_', '' ) 
     1439                item.setAttribute( kk[i], thisl ) 
    14241440              elif kk[i] == 'title': 
    14251441                if str(v) == 'bsi': 
     
    14591475                item = self.doc.createElement( 'item' ) 
    14601476                for j in range(len(kk)): 
    1461                     thiskk = kk[j] 
    1462  
     1477                  thiskk = kk[j] 
     1478## preset mover to request item .... so it can also be used on a per-experiment basis 
     1479                  if thiskk != 'preset': 
    14631480                    try: 
    14641481                      if kk[j] == 'comment': 
     
    14871504################################## 
    14881505                 
    1489     ##self.dimsTimeInfo = ['uid','label','title','dimensions'] 
    1490     ##self.dimsSpaceInfo = ['uid','label','title','dimensions','levelFlag','levels'] 
    14911506 
    14921507  def finishExptGrp(self): 
Note: See TracChangeset for help on using the changeset viewer.