Changeset 493


Ignore:
Timestamp:
20/11/15 16:38:44 (5 years ago)
Author:
mjuckes
Message:

Ready for beta.13

Location:
CMIP6dreqbuild/trunk/src/framework
Files:
7 edited

Legend:

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

    r470 r493  
    22 
    33targ ?= dreq 
     4fmt ?= txt 
    45 
    56 
     
    1920 
    2021out/$(targ)Sample.xml: ../../docs/$(targ).txt ptxt.py  
    21         python ptxt.py -f $(targ).txt samp 
     22        python ptxt.py -f $(targ).$(fmt) samp 
    2223 
    2324out/$(targ)Defn.xml: ../../docs/$(targ).txt ptxt.py 
    24         python ptxt.py -f $(targ).txt defn 
     25        python ptxt.py -f $(targ).$(fmt) defn 
    2526 
    2627out/vocabSample.xml: ../../docs/vocab.txt ptxt.py  
     
    7879        cp -r html/index.html /var/www/f/ 
    7980 
     81sHtml: 
     82        zip -r html.zip data2.js html  
     83 
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/dreq.py

    r491 r493  
    1414 
    1515def loadBS(bsfile): 
     16  """Read in the 'BlockSchema' definitions of the attributes defining attributes""" 
    1617  ii = open( bsfile, 'r' ).readlines() 
    1718  ll = [] 
    1819  for l in ii: 
    19     ##ll.append( [x[1:-1] for x in string.strip(l).split('\t') ] ) 
    2020    ll.append( [x[1:-1] for x in l.strip().split('\t') ] ) 
    2121  cc = collections.defaultdict( dict ) 
     
    8989 
    9090       def __href__(self,odir="",label=None): 
     91         """Generate html text for a link to this item.""" 
    9192         igns =  ['','__unset__'] 
    9293         if 'description' in self.__dict__ and self.description != None and string.strip( self.description ) not in igns: 
     
    401402  
    402403  def info(self,ss): 
     404    """Switchable print function ... switch off by setting self.silent=True""" 
    403405    if not self.silent: 
    404406      print ( ss ) 
    405407 
    406   def get(self): 
    407     return self.coll 
     408  ###def get(self): 
     409    ###return self.coll 
    408410 
    409411  def itemClassFact(self, sectionInfo,ns=None): 
     
    434436 
    435437  def addAttributes( self, thisClass, attrDict ): 
     438    """Add a set of attributes, from a dictionary, to a class""" 
    436439    for k in attrDict: 
    437440      setattr( thisClass, '%s' % k , attrDict[k] ) 
     
    573576 
    574577class ds(object): 
     578  """Comparison object to assist sorting of lists of dictionaries""" 
    575579  def __init__(self,k): 
    576580    self.k = k 
    577581  def cmp(self,x,y): 
    578582    return cmp( x.__dict__[self.k], y.__dict__[self.k] ) 
     583 
     584class kscl(object): 
     585  """Comparison object to assist sorting of dictionaries of class instances""" 
     586  def __init__(self,idict,k): 
     587    self.k = k 
     588    self.idict = idict 
     589  def cmp(self,x,y): 
     590    return cmp( self.idict[x].__dict__[self.k], self.idict[y].__dict__[self.k] ) 
    579591 
    580592src1 = '../workbook/trial_20150831.xml' 
     
    598610  def __init__(self,dreqXML=defaultDreqPath, configdoc=defaultConfigPath, useShelve=False, htmlStyles=None ): 
    599611    self.c = config( thisdoc=dreqXML, configdoc=configdoc, useShelve=useShelve) 
    600     self.coll = self.c.get() 
     612    self.coll = self.c.coll 
    601613    self.inx = index(self.coll) 
    602     self.defaultItemLineStyle = lambda i, frm='': '<li>%s: %s</li>' % ( i.label, i.__href__(odir='../u/') ) 
    603614    self.itemStyles = {} 
     615    self.defaultItemLineStyle = lambda i, frm='', ann='': '<li>%s: %s</li>' % ( i.label, i.__href__(odir='../u/') ) 
    604616## 
    605617## add index to Item base class .. so that it can be accessed by item instances 
     
    623635 
    624636  def getHtmlItemStyle(self, sect): 
     637    """Get the styling method associated with a given section.""" 
    625638    if sect in self.itemStyles: 
    626639      return self.itemStyles[sect] 
    627640    return self.defaultItemLineStyle 
    628641 
    629   def makeHtml(self,odir='./html', ttl0 = 'Data Request Index'): 
     642 
     643  def makeHtml(self,odir='./html', ttl0 = 'Data Request Index', annotations=None): 
    630644    """Generate a html view of the vocabularies, using the "__html__" method of the vocabulary item class to generate a 
    631645page for each item and also generating index pages. 
     
    633647    ttl0: Title for main index (in odir/index.html)""" 
    634648 
    635     for k in self.inx.uid.keys(): 
     649    ks = self.inx.uid.keys() 
     650    ks.sort( kscl( self.inx.uid, 'title' ).cmp ) 
     651    for k in ks: 
    636652      i = self.inx.uid[k] 
    637653      ttl = 'Data Request Record: [%s]%s' % (i._h.label,i.label) 
     
    643659    msg0 = ['<h1>%s</h1>' % ttl0, '<ul>',] 
    644660    ks = sorted( self.coll.keys() ) 
     661    ee = {} 
    645662    for k in ks: 
     663      ee[self.coll[k].header.title] = k 
     664    kks = sorted( ee.keys() ) 
     665    for kt in kks: 
     666      k = ee[kt] 
    646667## 
    647668## sort on item label 
    648669## 
     670      if annotations != None and k in annotations: 
     671        ann = annotations[k] 
     672      else: 
     673        ann = {} 
     674 
    649675      self.coll[k].items.sort( ds('label').cmp ) 
    650676      ttl = 'Data Request Section: %s' % k 
     
    653679      msg.append( '<a href="../index.html">Home</a><br/>\n' ) 
    654680      lst = self.getHtmlItemStyle(k) 
     681       
    655682      for i in self.coll[k].items: 
    656683        ##m = '<li>%s: %s</li>' % ( i.label, i.__href__(odir='../u/') ) 
    657         m = lst( i ) 
     684        
     685        m = lst( i, ann=ann.get( i.label ) ) 
    658686        msg.append( m ) 
    659687      msg.append( '</ul>' ) 
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/packageConfig.py

    r470 r493  
    1515 
    1616__versionComment__ = "Support for command line interface added" 
    17 __version__ = "01.beta.11" 
     17__version__ = "01.beta.13" 
    1818__title__ = "dreqPy" 
    1919__description__ = "CMIP6 Data Request Python API" 
  • CMIP6dreqbuild/trunk/src/framework/out/dreq2Defn.xml

    r470 r493  
    44xmlns="urn:w3id.org:cmip6.dreq.framework:a" 
    55xsi:schemaLocation="http://w3id.org/cmip6dr/ns vocabFrameworkSchema_v01beta.xsd"> 
    6 <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" 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"/> 
    17 </table> 
    18 <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" 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"/> 
    42 </table> 
    43 <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" 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"/> 
    58 </table> 
    59 <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" 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"/> 
    67 </table> 
    68 <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" 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"/> 
    75 </table> 
    76 <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" 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"/> 
    85 </table> 
    86 <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" 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"/> 
    94 </table> 
    95 <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" 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"/> 
    102 </table> 
    103 <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" 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"/> 
    118 </table> 
    119 <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" 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"/> 
    134 </table> 
    135 <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" 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"/> 
    146 </table> 
    147 <table label="experiment" uid="SECTION:experiment" title="Experiments" id="cmip.drv.012" itemLabelMode="def" level="0" maxOccurs="1" labUnique="No"> 
    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"/> 
     6<table label="requestVarGroup" uid="SECTION:requestVarGroup" title="3.1 Request variable group: a collection of request variables" id="cmip.drv.008" itemLabelMode="def" level="3" maxOccurs="1" labUnique="Yes"> 
     7  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23bcec6-8fa4-11e5-a341-ac72891c3257"/> 
     8  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23c0a76-8fa4-11e5-a341-ac72891c3257"/> 
     9  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     10  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     11  <rowAttribute label="uid" type="xs:string" title="" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     12  <rowAttribute label="mip" type="xs:string" title="Endorsed MIP defining the variable group" useClass="" techNote="" description="" uid="" superclass=""/> 
     13  <rowAttribute label="ref" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     14  <rowAttribute label="refNote" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     15</table> 
     16<table label="requestItem" uid="SECTION:requestItem" title="3.2 Request Item: specifying the number of years for an experiment" id="cmip.drv.010" itemLabelMode="def" level="5" maxOccurs="1" labUnique="No"> 
     17  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23c57b0-8fa4-11e5-a341-ac72891c3257"/> 
     18  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23c931a-8fa4-11e5-a341-ac72891c3257"/> 
     19  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     20  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     21  <rowAttribute label="uid" type="xs:string" title="" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     22  <rowAttribute label="mip" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     23  <rowAttribute label="tab" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     24  <rowAttribute label="expt" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     25  <rowAttribute label="rlid" type="xs:string" title="Identifier of corresponding requestLink" useClass="internalLink" techNote="" description="" uid="" superclass=""/> 
     26  <rowAttribute label="esid" type="xs:string" title="Identifier experiment(s): a link to an experiment, an experiment group or a MIP" useClass="internalLink" techNote="" description="" uid="" superclass=""/> 
     27  <rowAttribute label="esidComment" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     28  <rowAttribute label="preset" type="xs:integer" title="Option to override priority set in each variable group" useClass="" techNote="" description="" uid="" superclass=""/> 
     29  <rowAttribute label="ny" type="xs:integer" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     30  <rowAttribute label="nexmax" type="xs:integer" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     31  <rowAttribute label="nenmax" type="xs:integer" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     32  <rowAttribute label="nymax" type="xs:float" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
    16333</table> 
    16434<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" 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"/> 
    170 </table> 
    171 <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" 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"/> 
    178 </table> 
    179 <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" 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"/> 
    185 </table> 
    186 <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" 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"/> 
    193 </table> 
    194 <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" 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"/> 
    202 </table> 
    203 <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" 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"/> 
    212 </table> 
    213 <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" 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"/> 
    221 </table> 
    222 <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" 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"/> 
    231 </table> 
    232 <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" 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"/> 
     35  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23cda64-8fa4-11e5-a341-ac72891c3257"/> 
     36  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23ce02c-8fa4-11e5-a341-ac72891c3257"/> 
     37  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     38  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     39  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     40  <rowAttribute label="tierMin" type="xs:integer" title="Minimum tier of experiments in group" useClass="" techNote="" description="" uid="" superclass=""/> 
     41  <rowAttribute label="ntot" type="xs:integer" title="Total number of years" useClass="" techNote="" description="" uid="" superclass=""/> 
     42</table> 
     43<table label="CMORvar" uid="SECTION:CMORvar" title="1.3 CMOR Variable" id="cmip.drv.002" itemLabelMode="def" level="1" maxOccurs="1" labUnique="No"> 
     44  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23ceca2-8fa4-11e5-a341-ac72891c3257"/> 
     45  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23cee82-8fa4-11e5-a341-ac72891c3257"/> 
     46  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     47  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     48  <rowAttribute label="uid" type="xs:string" title="" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     49  <rowAttribute label="title" type="xs:string" title="Long name" useClass="" techNote="" description="The long name is used as the long_name variable attribute in the NetCDF files." uid="" superclass=""/> 
     50  <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" description="" uid="" superclass=""/> 
     51  <rowAttribute label="vid" type="xs:string" title="MIP Variable" useClass="internalLink" techNote="var" description="The MIP Variable specifies the physical quantity." uid="" superclass=""/> 
     52  <rowAttribute label="valid_min" type="xs:string" title="Minimum expected value for this variable." useClass="" techNote="" description="" uid="" superclass=""/> 
     53  <rowAttribute label="valid_max" type="xs:string" title="Maximum expected value for this variable." useClass="" techNote="" description="" uid="" superclass=""/> 
     54  <rowAttribute label="ok_min_mean_abs" type="xs:string" title="Minimum expected value of the mean absolute value at each point in time" useClass="" techNote="" description="" uid="" superclass=""/> 
     55  <rowAttribute label="ok_max_mean_abs" type="xs:string" title="Maximum expected value of the mean absolute value at each point in time" useClass="" techNote="" description="" uid="" superclass=""/> 
     56  <rowAttribute label="deflate" type="xs:string" title="Deflate: NetCDF compression parameter" useClass="" techNote="" description="" uid="" superclass=""/> 
     57  <rowAttribute label="deflate_level" type="xs:string" title="Deflate Level: NetCDF compression parameter" useClass="" techNote="" description="" uid="" superclass=""/> 
     58  <rowAttribute label="shuffle" type="xs:string" title="Shuffle: NetCDF compression parameter" useClass="" techNote="" description="" uid="" superclass=""/> 
     59  <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" useClass="" techNote="" description="" uid="" superclass=""/> 
     60  <rowAttribute label="type" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     61  <rowAttribute label="modeling_realm" type="xs:string" title="" useClass="drsVocab" techNote="" description="" uid="" superclass=""/> 
     62  <rowAttribute label="positive" type="xs:string" title="" useClass="CMORdirective" techNote="" description="" uid="" superclass=""/> 
     63  <rowAttribute label="mipTable" type="xs:string" title="The MIP table: each table identifies a collection of variables" useClass="drsVocab" techNote="" description="" uid="" superclass=""/> 
     64  <rowAttribute label="prov" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     65  <rowAttribute label="provNote" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     66  <rowAttribute label="frequency" type="xs:string" title="Frequency of time steps to be archived." useClass="drsVocab" techNote="" description="" uid="" superclass=""/> 
     67  <rowAttribute label="rowIndex" type="xs:integer" title="Row index of entry in source sheet" useClass="" techNote="" description="" uid="" superclass=""/> 
     68  <rowAttribute label="description" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     69</table> 
     70<table label="objective" uid="SECTION:objective" title="1.6 Scientific objectives" id="cmip.drv.014" itemLabelMode="def" level="0" maxOccurs="1" labUnique="No"> 
     71  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23cffb2-8fa4-11e5-a341-ac72891c3257"/> 
     72  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d0188-8fa4-11e5-a341-ac72891c3257"/> 
     73  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     74  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     75  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     76  <rowAttribute label="description" type="xs:string" title="Description" useClass="freeText" techNote="" description="" uid="" superclass=""/> 
     77  <rowAttribute label="title" type="xs:string" title="Long name" useClass="" techNote="" description="" uid="" superclass=""/> 
     78  <rowAttribute label="mip" type="xs:string" title="Endorsed MIP" useClass="" techNote="" description="" uid="" superclass=""/> 
     79</table> 
     80<table label="spatialShape" uid="SECTION:spatialShape" title="2.1 Spatial dimensions" id="cmip.drv.004" itemLabelMode="def" level="3" maxOccurs="1" labUnique="Yes"> 
     81  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d0890-8fa4-11e5-a341-ac72891c3257"/> 
     82  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d0a3e-8fa4-11e5-a341-ac72891c3257"/> 
     83  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     84  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     85  <rowAttribute label="uid" type="xs:string" title="" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     86  <rowAttribute label="dimensions" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     87  <rowAttribute label="shape" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     88  <rowAttribute label="levels" type="xs:integer" title="Number of vertical levels (ignored if levelFlag=false)" useClass="" techNote="" description="" uid="" superclass=""/> 
     89  <rowAttribute label="levelFlag" type="xs:boolean" title="Flag set to *false* if number of levels is optional (e.g. determined by the model)" useClass="" techNote="" description="" uid="" superclass=""/> 
     90</table> 
     91<table label="requestLink" uid="SECTION:requestLink" title="3.3 Request link: linking a set of variables and a set of experiments" id="cmip.drv.009" itemLabelMode="def" level="4" maxOccurs="1" labUnique="No"> 
     92  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d1240-8fa4-11e5-a341-ac72891c3257"/> 
     93  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d13ee-8fa4-11e5-a341-ac72891c3257"/> 
     94  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     95  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     96  <rowAttribute label="uid" type="xs:string" title="" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     97  <rowAttribute label="mip" type="xs:string" title="Endorsed MIP requesting the data" useClass="internalLink" techNote="" description="" uid="" superclass=""/> 
     98  <rowAttribute label="tab" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     99  <rowAttribute label="objective" type="xs:string" title="Science objectives associated with this request" useClass="" techNote="" 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="" superclass=""/> 
     100  <rowAttribute label="grid" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     101  <rowAttribute label="gridreq" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     102  <rowAttribute label="comment" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     103  <rowAttribute label="ref" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     104  <rowAttribute label="refNote" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     105  <rowAttribute label="refid" type="xs:string" title="reference to a request Variable Group" useClass="internalLink" techNote="" description="" uid="" superclass=""/> 
     106  <rowAttribute label="opt" type="xs:string" title="option for selecting a subset of variables" useClass="" techNote="" description="" uid="" superclass=""/> 
     107  <rowAttribute label="opar" type="xs:string" title="parameter associated with *opt*" useClass="" techNote="" description="" uid="" superclass=""/> 
     108</table> 
     109<table label="tableSection" uid="SECTION:tableSection" title="3.4 CMOR Table Sections" id="cmip.drv.007" itemLabelMode="def" level="1" maxOccurs="1" labUnique="No"> 
     110  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d1fc4-8fa4-11e5-a341-ac72891c3257"/> 
     111  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d2186-8fa4-11e5-a341-ac72891c3257"/> 
     112  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     113  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     114  <rowAttribute label="uid" type="xs:string" title="" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     115  <rowAttribute label="gpid" type="xs:string" title="Identifier for CMOR Tables" useClass="internalLink" techNote="requestVarGroup" description="" uid="" superclass=""/> 
     116  <rowAttribute label="mip" type="xs:string" title="Project" useClass="" techNote="" description="" uid="" superclass=""/> 
     117  <rowAttribute label="ref" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     118  <rowAttribute label="refNote" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     119</table> 
     120<table label="modelConfig" uid="SECTION:modelConfig" title="3.5 Model configuration options" id="cmip.drv.020" itemLabelMode="an" level="0" maxOccurs="1" labUnique="Yes"> 
     121  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d28c0-8fa4-11e5-a341-ac72891c3257"/> 
     122  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d2a78-8fa4-11e5-a341-ac72891c3257"/> 
     123  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     124  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     125  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     126  <rowAttribute label="title" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     127  <rowAttribute label="MIPs" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     128  <rowAttribute label="usage" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     129  <rowAttribute label="type" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     130  <rowAttribute label="range" type="xs:string" title="Range of valid values, e.g. xs:boolean" useClass="" techNote="" description="" uid="" superclass=""/> 
     131</table> 
     132<table label="varChoiceLinkC" uid="SECTION:varChoiceLinkC" title="3.6 Links a variable to a choice element" id="cmip.drv.017" itemLabelMode="def" level="0" maxOccurs="1" labUnique="Yes"> 
     133  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d3284-8fa4-11e5-a341-ac72891c3257"/> 
     134  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d3432-8fa4-11e5-a341-ac72891c3257"/> 
     135  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     136  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     137  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     138  <rowAttribute label="vid" type="xs:string" title="Variable" useClass="internalLink" techNote="" description="" uid="" superclass=""/> 
     139  <rowAttribute label="cfgid" type="xs:string" title="Configuration Option" useClass="internalLink" techNote="" description="" uid="" superclass=""/> 
     140  <rowAttribute label="cfg" type="xs:boolean" title="Configuration Value" useClass="" techNote="" description="" uid="" superclass=""/> 
     141  <rowAttribute label="cid" type="xs:string" title="Choice -- can provide a link to related variables" useClass="internalLink" techNote="" description="" uid="" superclass=""/> 
     142</table> 
     143<table label="objectiveLink" uid="SECTION:objectiveLink" title="3.7 Link between scientific objectives and requests" id="cmip.drv.015" itemLabelMode="def" level="0" maxOccurs="1" labUnique="No"> 
     144  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d3b94-8fa4-11e5-a341-ac72891c3257"/> 
     145  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d3d42-8fa4-11e5-a341-ac72891c3257"/> 
     146  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     147  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     148  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     149  <rowAttribute label="oid" type="xs:string" title="Identifier for a scientific objective" useClass="internalLink" techNote="objective" description="" uid="" superclass=""/> 
     150  <rowAttribute label="rid" type="xs:string" title="Identifier for a request link" useClass="internalLink" techNote="requestLink" description="" uid="" superclass=""/> 
     151</table> 
     152<table label="remarks" uid="SECTION:remarks" title="3.08 Remarks about other items" id="cmip.drv.011" itemLabelMode="def" level="10" maxOccurs="1" labUnique="No"> 
     153  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d4454-8fa4-11e5-a341-ac72891c3257"/> 
     154  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d45f8-8fa4-11e5-a341-ac72891c3257"/> 
     155  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     156  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     157  <rowAttribute label="uid" type="xs:string" title="" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     158  <rowAttribute label="tid" type="xs:string" title="Target identifier: the record ID of the item this refers to." useClass="internalLink" techNote="" description="" uid="" superclass=""/> 
     159  <rowAttribute label="tattr" type="xs:string" title="Target attribute: an attribute of the target item, or 'ALL'" useClass="" techNote="" description="" uid="" superclass=""/> 
     160  <rowAttribute label="description" type="xs:string" title="Free text remarks -- unless there are specific restrictions associated with the class attribute of this remark" useClass="" techNote="" description="" uid="" superclass=""/> 
     161  <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')." useClass="" techNote="" description="" uid="" superclass=""/> 
     162  <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." useClass="" techNote="" description="" uid="" superclass=""/> 
     163  <rowAttribute label="techNote" type="xs:string" title="Optional additional machine readable content (though not restricted by the schema)" useClass="" techNote="" description="" uid="" superclass=""/> 
     164  <rowAttribute label="prov" type="xs:string" title="Provenance" useClass="" techNote="" description="" uid="" superclass=""/> 
     165</table> 
     166<table label="experiment" uid="SECTION:experiment" title="1.5 Experiments" id="cmip.drv.012" itemLabelMode="def" level="0" maxOccurs="1" labUnique="No"> 
     167  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d5002-8fa4-11e5-a341-ac72891c3257"/> 
     168  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d51b0-8fa4-11e5-a341-ac72891c3257"/> 
     169  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     170  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     171  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     172  <rowAttribute label="description" type="xs:string" title="Description" useClass="freeText" techNote="" description="" uid="" superclass=""/> 
     173  <rowAttribute label="egid" type="xs:string" title="Identifier for experiment group" useClass="internalLink" techNote="" description="" uid="" superclass=""/> 
     174  <rowAttribute label="mip" type="xs:string" title="MIP defining experiment" useClass="internalLink" techNote="" description="" uid="" superclass=""/> 
     175  <rowAttribute label="mcfg" type="xs:string" title="Model category" useClass="" techNote="" description="" uid="" superclass=""/> 
     176  <rowAttribute label="tier" type="xs:integer" title="Tier of experiment" useClass="" techNote="" description="Experiments are assigned a tier by the MIP specifying the tier, tier 1 experiments being the most important." uid="" superclass=""/> 
     177  <rowAttribute label="nstart" type="xs:integer" title="Number of start dates" useClass="" techNote="" description="" uid="" superclass=""/> 
     178  <rowAttribute label="starty" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     179  <rowAttribute label="endy" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     180  <rowAttribute label="yps" type="xs:integer" title="Years per simulation" useClass="" techNote="" description="" uid="" superclass=""/> 
     181  <rowAttribute label="ensz" type="xs:integer" title="Ensemble size" useClass="" techNote="" description="" uid="" superclass=""/> 
     182  <rowAttribute label="ntot" type="xs:integer" title="Total number of years" useClass="" techNote="" description="" uid="" superclass=""/> 
     183  <rowAttribute label="comment" type="xs:string" title="Comment" useClass="" techNote="" description="" uid="" superclass=""/> 
     184</table> 
     185<table label="requestVar" uid="SECTION:requestVar" title="1.4 Request variable (carrying priority and link to group)" id="cmip.drv.006" itemLabelMode="def" level="3" maxOccurs="1" labUnique="No"> 
     186  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d5d40-8fa4-11e5-a341-ac72891c3257"/> 
     187  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d5ee4-8fa4-11e5-a341-ac72891c3257"/> 
     188  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     189  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     190  <rowAttribute label="uid" type="xs:string" title="" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     191  <rowAttribute label="priority" type="xs:integer" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     192  <rowAttribute label="vid" type="xs:string" title="Identifier for MIP Output Variable" useClass="internalLink" techNote="ovar" description="" uid="" superclass=""/> 
     193  <rowAttribute label="vgid" type="xs:string" title="Identifier for Variable Group" useClass="internalLink" techNote="requestVarGroup" description="" uid="" superclass=""/> 
     194  <rowAttribute label="mip" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     195  <rowAttribute label="table" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     196</table> 
     197<table label="standardname" uid="SECTION:standardname" title="1.8 CF Standard Names" id="cmip.drv.021" itemLabelMode="an" level="0" maxOccurs="1" labUnique="Yes"> 
     198  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d6722-8fa4-11e5-a341-ac72891c3257"/> 
     199  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d68d0-8fa4-11e5-a341-ac72891c3257"/> 
     200  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     201  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     202  <rowAttribute label="uid" type="xs:string" title="CF Standard Name" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     203  <rowAttribute label="description" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     204  <rowAttribute label="title" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     205  <rowAttribute label="label" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     206  <rowAttribute label="units" type="xs:string" title="Canonical Units" useClass="" techNote="" description="" uid="" superclass=""/> 
     207</table> 
     208<table label="varChoiceLinkR" uid="SECTION:varChoiceLinkR" title="3.09 Links a variable to a choice element" id="cmip.drv.016" itemLabelMode="def" level="0" maxOccurs="1" labUnique="Yes"> 
     209  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d6fba-8fa4-11e5-a341-ac72891c3257"/> 
     210  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d715e-8fa4-11e5-a341-ac72891c3257"/> 
     211  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     212  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     213  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     214  <rowAttribute label="vid" type="xs:string" title="Variable" useClass="internalLink" techNote="" description="" uid="" superclass=""/> 
     215  <rowAttribute label="cid" type="xs:string" title="Choice" useClass="internalLink" techNote="" description="" uid="" superclass=""/> 
     216  <rowAttribute label="rank" type="xs:integer" title="For ranked choices, the rank of this variable (higher rank makes lower ranks redundant)" useClass="" techNote="" description="" uid="" superclass=""/> 
     217</table> 
     218<table label="var" uid="SECTION:var" title="1.2 MIP Variable" id="cmip.drv.001" itemLabelMode="def" level="0" maxOccurs="1" labUnique="No"> 
     219  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d7870-8fa4-11e5-a341-ac72891c3257"/> 
     220  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d7a14-8fa4-11e5-a341-ac72891c3257"/> 
     221  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     222  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     223  <rowAttribute label="sn" type="xs:string" title="CF Standard Name" useClass="internalLink" techNote="" description="The CF Standard Name is part of an extensive vocabulary maintained within the CF Convention." uid="" superclass=""/> 
     224  <rowAttribute label="units" type="xs:string" title="Units" useClass="" techNote="" description="" uid="" superclass=""/> 
     225  <rowAttribute label="description" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     226  <rowAttribute label="title" type="xs:string" title="Long name" useClass="" techNote="" description="The long name is used as the long_name variable attribute in the NetCDF files." uid="" superclass=""/> 
     227  <rowAttribute label="procnote" type="xs:string" title="Processing notes" useClass="list" techNote="" description="" uid="" superclass=""/> 
     228  <rowAttribute label="procComment" type="xs:string" title="Processing comments" useClass="freeText" techNote="" description="" uid="" superclass=""/> 
     229  <rowAttribute label="prov" type="xs:string" title="Provenance" useClass="freeText" techNote="" description="" uid="" superclass=""/> 
     230  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     231</table> 
     232<table label="mip" uid="SECTION:mip" title="1.1 Model Intercomparison Project" id="cmip.drv.019" itemLabelMode="def" level="0" maxOccurs="1" labUnique="Yes"> 
     233  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d836a-8fa4-11e5-a341-ac72891c3257"/> 
     234  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d850e-8fa4-11e5-a341-ac72891c3257"/> 
     235  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     236  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     237  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     238  <rowAttribute label="title" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     239  <rowAttribute label="description" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     240  <rowAttribute label="url" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     241  <rowAttribute label="status" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     242</table> 
     243<table label="varChoice" uid="SECTION:varChoice" title="3.10 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"> 
     244  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d8c0c-8fa4-11e5-a341-ac72891c3257"/> 
     245  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d8dba-8fa4-11e5-a341-ac72891c3257"/> 
     246  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     247  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     248  <rowAttribute label="uid" type="xs:string" title="Record identifier" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     249  <rowAttribute label="class" type="xs:string" title="Class of choice: heirarchy|cfg" useClass="" techNote="" description="" uid="" superclass=""/> 
     250  <rowAttribute label="title" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     251  <rowAttribute label="description" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     252  <rowAttribute label="varList" type="xs:string" title="A colon separated list of variable names" useClass="" techNote="" description="" uid="" superclass=""/> 
     253  <rowAttribute label="optionList" type="xs:string" title="A list of options, one for each variable" useClass="" techNote="" description="" uid="" superclass=""/> 
     254</table> 
     255<table label="temporalShape" uid="SECTION:temporalShape" title="2.2 Temporal dimension" id="cmip.drv.005" itemLabelMode="def" level="3" maxOccurs="1" labUnique="Yes"> 
     256  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d9580-8fa4-11e5-a341-ac72891c3257"/> 
     257  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23d972e-8fa4-11e5-a341-ac72891c3257"/> 
     258  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     259  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     260  <rowAttribute label="uid" type="xs:string" title="" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     261  <rowAttribute label="dimensions" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     262  <rowAttribute label="label" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     263  <rowAttribute label="description" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     264</table> 
     265<table label="structure" uid="SECTION:structure" title="2.3 Dimensions and related information" id="cmip.drv.003" itemLabelMode="def" level="3" maxOccurs="1" labUnique="Yes"> 
     266  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23d9e5e-8fa4-11e5-a341-ac72891c3257"/> 
     267  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23da002-8fa4-11e5-a341-ac72891c3257"/> 
     268  <rowAttribute label="label" type="xs:string" title="Record Label" useClass="" techNote="" description="" uid="" superclass=""/> 
     269  <rowAttribute label="title" type="xs:string" title="Record Title" useClass="" techNote="" description="" uid="" superclass=""/> 
     270  <rowAttribute label="uid" type="xs:string" title="" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     271  <rowAttribute label="spid" type="xs:string" title="" useClass="internalLink" techNote="spatialShape" description="" uid="" superclass=""/> 
     272  <rowAttribute label="tmid" type="xs:string" title="" useClass="internalLink" techNote="temporalShape" description="" uid="" superclass=""/> 
     273  <rowAttribute label="odims" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     274  <rowAttribute label="coords" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     275  <rowAttribute label="cell_methods" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     276  <rowAttribute label="cell_measures" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     277  <rowAttribute label="flag_values" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     278  <rowAttribute label="flag_meanings" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     279  <rowAttribute label="description" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     280  <rowAttribute label="procNote" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     281  <rowAttribute label="prov" type="xs:string" title="" useClass="" techNote="" description="" uid="" superclass=""/> 
     282</table> 
     283<table label="grids" uid="SECTION:grids" title="1.7 Specification of dimensions" id="cmip.drv.003" itemLabelMode="def" level="4" maxOccurs="1" labUnique="Yes"> 
     284  <rowAttribute label="label" type="xs:string" title="Record Label" uid="d23dab9c-8fa4-11e5-a341-ac72891c3257"/> 
     285  <rowAttribute label="title" type="xs:string" title="Record Title" uid="d23dad36-8fa4-11e5-a341-ac72891c3257"/> 
     286  <rowAttribute label="tables" type="xs:string" title="CMOR table(s)" useClass="" techNote="" description="List of tables which make use of this dimension" uid="" superclass=""/> 
     287  <rowAttribute label="uid" type="xs:string" title="Identifier" useClass="recordId" techNote="" description="" uid="" superclass=""/> 
     288  <rowAttribute label="label" type="xs:string" title="CMOR dimension" useClass="" techNote="" description="Unique label" uid="" superclass=""/> 
     289  <rowAttribute label="altLabel" type="xs:string" title="output dimension name" useClass="" techNote="" description="Name used for the dimension in NetCDF files" uid="" superclass=""/> 
     290  <rowAttribute label="description" type="xs:string" title="description" useClass="" techNote="" description="" uid="" superclass=""/> 
     291  <rowAttribute label="standardName" type="xs:string" title="standard name" useClass="internalLink" techNote="" description="CF Standard Name" uid="" superclass=""/> 
     292  <rowAttribute label="title" type="xs:string" title="long name" useClass="" techNote="" description="Used for the variable long_name attribute" uid="" superclass=""/> 
     293  <rowAttribute label="axis" type="xs:string" title="axis" useClass="" techNote="" description="" uid="" superclass=""/> 
     294  <rowAttribute label="units" type="xs:string" title="units" useClass="" techNote="" description="" uid="" superclass=""/> 
     295  <rowAttribute label="isIndex" type="xs:string" title="index axis?" useClass="" techNote="" description="" uid="" superclass=""/> 
     296  <rowAttribute label="coords" type="xs:string" title="coords_attrib" useClass="" techNote="" description="" uid="" superclass=""/> 
     297  <rowAttribute label="bounds" type="xs:string" title="bounds?" useClass="" techNote="" description="" uid="" superclass=""/> 
     298  <rowAttribute label="direction" type="xs:string" title="stored direction" useClass="" techNote="" description="" uid="" superclass=""/> 
     299  <rowAttribute label="validMin" type="xs:string" title="valid_min" useClass="" techNote="" description="" uid="" superclass=""/> 
     300  <rowAttribute label="validMax" type="xs:string" title="valid_max" useClass="" techNote="" description="" uid="" superclass=""/> 
     301  <rowAttribute label="type" type="xs:string" title="type" useClass="" techNote="" description="" uid="" superclass=""/> 
     302  <rowAttribute label="positive" type="xs:string" title="positive" useClass="" techNote="" description="" uid="" superclass=""/> 
     303  <rowAttribute label="value" type="xs:string" title="value" useClass="" techNote="" description="" uid="" superclass=""/> 
     304  <rowAttribute label="boundsValues" type="xs:string" title="bounds _values" useClass="" techNote="" description="" uid="" superclass=""/> 
     305  <rowAttribute label="requested" type="xs:string" title="requested" useClass="" techNote="" description="" uid="" superclass=""/> 
     306  <rowAttribute label="boundsRequested" type="aa:st__floatList" title="bounds_ requested" useClass="" techNote="" description="" uid="" superclass=""/> 
     307  <rowAttribute label="tolRequested" type="xs:string" title="tol_on_requests: variance from requested values that is tolerated" useClass="" techNote="" description="" uid="" superclass=""/> 
     308  <rowAttribute label="isGrid" type="xs:string" title="grid?" useClass="" techNote="" description="" uid="" superclass=""/> 
    240309</table> 
    241310</defDoc> 
  • CMIP6dreqbuild/trunk/src/framework/ptxt.py

    r470 r493  
    88Schema namespace implemented partially -- need to work through for update and vocabs.  
    99''' 
    10 import string, re, collections, sys, uuid 
    11 import time, datetime 
     10import string, re, collections, sys, uuid, utils_wb 
     11import time, datetime, xlrd 
    1212 
    1313sys.path.append('dreqPy' ) 
    1414import packageConfig 
    1515 
    16 if len(sys.argv) == 1: 
    17   print __doc__ 
    18   exit() 
    19  
    2016t = time.gmtime() 
    2117d = datetime.date(t.tm_year, t.tm_mon, t.tm_mday) 
    2218 
    23 version = "01.beta.09" 
    2419version = packageConfig.__version__ 
    2520 
     
    4439""" %  (version,d.isoformat() ) 
    4540 
    46 args = sys.argv[1:] 
    47 if args[0] == '-f': 
    48   srcFn = args[1] 
    49   args = args[2:] 
    50 elif args[0] == '-v': 
    51   srcFn = 'vocab.txt' 
    52   args = args[1:] 
    53 else: 
    54   srcFn = 'dreq.txt' 
    55    
    56 mode = args[0] 
    57  
    58 assert mode in ["defn", "samp","upd","updsamp"] 
    59  
    6041re_it = re.compile( '{(.*)}' ) 
    6142re_is = re.compile( '\[(.*)\]' ) 
     
    8869 
    8970  def __init__( self, line, kk=0, counter=None ): 
    90      bits = map( string.strip, string.split(line, ';' ) ) 
    91      assert len (bits) == 7, '[1] Cannot parse %s' % line 
    92      assert bits[0][:5] == 'vocab', '[2] Cannot parse %s' % line 
    93      self.label = string.split(bits[0], ' ')[1] 
    94      self.title = bits[1] 
    95      self.id = 'cmip.drv.%3.3i' % kk 
    96      self.ilt = bits[3] 
    97      self.level = int(bits[4] ) 
    98      self.kk = kk 
    99      self.labu = bits[6] 
    100      self.mxo = int(bits[5]) 
     71     if type(line) in [type(''),type(u'')]: 
     72       bits = map( string.strip, string.split(line, ';' ) ) 
     73       assert len (bits) == 7, '[1] Cannot parse %s' % line 
     74       assert bits[0][:5] == 'vocab', '[2] Cannot parse %s' % line 
     75       self.label = string.split(bits[0], ' ')[1] 
     76       self.title = bits[1] 
     77       self.id = 'cmip.drv.%3.3i' % kk 
     78       self.ilt = bits[3] 
     79       self.level = int(bits[4] ) 
     80       self.kk = kk 
     81       self.labu = bits[6] 
     82       self.mxo = int(bits[5]) 
     83     else: 
     84       self.label,self.title , self.id, self.ilt, self.level, self.kk, self.labu, self.mxo = tuple( line[1:] ) 
     85       self.level = int( self.level ) 
     86       self.mxo = int( self.mxo ) 
     87     self.header = (self.label,self.title , self.id, self.ilt, self.level, self.kk, self.labu, self.mxo ) 
    10188     self.msg( '[%s] %s {%s:%s}' % (self.label, self.title, self.id, self.ilt) ) 
    10289###nt__itematt = collections.namedtuple( 'itematt', ['name','type','title','clss','techn'] ) 
     
    166153           elif i.type == "xs:float": 
    167154             value = '5.' 
     155           elif i.type == "aa:st__floatList": 
     156             value = '5. 6.' 
    168157           elif i.type == "xs:boolean": 
    169158             value = 'false' 
     
    195184       return 
    196185     print text 
     186 
     187  def attr02(self,line): 
     188         self.itematts.append( nt__itematt._make( line ) ) 
     189         self.msg( '%s, %s, %s, %s, %s' % (line[0], line[1], line[2], line[3], line[4]) ) 
    197190 
    198191  def attr(self,line): 
     
    234227class main(object): 
    235228 
    236   def __init__(self,fn): 
    237     ii = [] 
    238     for l in open('../../docs/%s' % fn).readlines(): 
    239       if l[0] != '#': 
    240         ii.append(l) 
     229  def __init__(self,fn,mode): 
     230    if fn[-4:] == '.xls': 
     231      imode = 0 
     232      ii = [] 
     233      self.isect = {} 
     234      wb = utils_wb.workbook(fn ) 
     235      s0 = wb.book.sheet_by_name( 'SECTIONS' ) 
     236      ks = [] 
     237      for j in range(1,s0.nrows): 
     238        rr = map( lambda x: x.value, s0.row(j) ) 
     239        self.isect[str(rr[0]) ] = rr 
     240        ks.append( str(rr[0]) ) 
     241      for k in ks: 
     242        ii.append( ['vocab',] + self.isect[k] ) 
     243        s = wb.book.sheet_by_name( k ) 
     244        for j in range(1,s.nrows): 
     245          rr = map( lambda x: x.value, s.row(j) ) 
     246          ii.append(rr) 
     247          
     248    else:  
     249      imode = 1 
     250      ii = [] 
     251      for l in open('../../docs/%s' % fn).readlines(): 
     252        if l[0] != '#': 
     253          ii.append(l) 
    241254    kk= 0 
    242255    this = None 
     
    267280 - updProv {Proposer of update}''' 
    268281 
    269     if l[:5] == 'vocab': 
    270       prolo = samplePrologueVocab 
    271     else: 
    272       prolo = samplePrologue 
     282##    if l[:5] == 'vocab': 
     283      ##prolo = samplePrologueVocab 
     284    ##else: 
     285      ##prolo = samplePrologue 
    273286 
    274287    if mode in [ 'samp','updsamp']: 
    275288      oo.write( '%s<main>\n' % samplePrologue ) 
    276289    counter = collections.defaultdict(int) 
     290    self.sections = {} 
    277291    for l in ii: 
    278       if l[:5] == 'vocab': 
     292      if (imode == 1 and l[:5] == 'vocab') or (imode == 0 and l[0] == 'vocab'): 
    279293        if this != None: 
    280294          this.tmpl(oo=oo,mode=mode) 
     295          self.sections[this.label] = (this.header, this.itematts) 
    281296        kk+=1 
    282297        this = vocab(l,kk=kk,counter=counter) 
     
    284299          for l1 in string.split( updExtra, '\n' ): 
    285300            this.attr( l1 ) 
     301      elif imode == 1: 
     302        this.attr( l) 
    286303      else: 
    287         this.attr( l ) 
     304        this.attr02( l) 
    288305 
    289306    this.tmpl(oo=oo,mode=mode) 
     307    self.sections[this.label] = (this.header, this.itematts) 
    290308    if mode in [ 'samp','updsamp']: 
    291309      oo.write( '</main>\n' ) 
     
    293311    oo.close() 
    294312 
    295 m = main(srcFn) 
     313if __name__ == "__main__": 
     314  if len(sys.argv) == 1: 
     315    print __doc__ 
     316    exit() 
     317 
     318  args = sys.argv[1:] 
     319  if args[0] == '-f': 
     320    srcFn = args[1] 
     321    args = args[2:] 
     322  elif args[0] == '-v': 
     323    srcFn = 'vocab.txt' 
     324    args = args[1:] 
     325  else: 
     326    srcFn = 'dreq.txt' 
     327   
     328  mode = args[0] 
     329 
     330  assert mode in ["defn", "samp","upd","updsamp"] 
     331 
     332  m = main(srcFn,mode) 
  • CMIP6dreqbuild/trunk/src/framework/scanDreq.py

    r470 r493  
    22import collections, string, os, utils_wb 
    33import htmlTemplates as tmpl 
    4 import xml, re 
     4import xml, re, uuid 
    55import xml.dom, xml.dom.minidom 
    66import sets 
     
    491491    expl = dq.coll[k].items[0] 
    492492    atl = atlSort( expl.__dict__.keys() ) 
    493     if 'parent' in atl: 
    494       atl.pop( atl.index('parent') ) 
    495     dumpcsv( 'csv2/%s.csv' % k, k, atl ) 
     493    atl1 = [a for a in atl if a != 'parent' and a[0] != '_'] 
     494    print k, atl1 
     495    dumpcsv( 'csv2/%s.csv' % k, k, atl1 ) 
    496496   
    497497oo = open( 'var1.csv', 'w' ) 
     
    511511    self.doc = xml.dom.minidom.parse( src  ) 
    512512    self.dreq = dreq 
     513 
     514 
     515  def fixCellMethods(self,dq): 
     516    this = self.doc.getElementsByTagName('structure')[0] 
     517    dil = this.getElementsByTagName('item') 
     518    cmrep = collections.defaultdict( set ) 
     519    cmc = collections.defaultdict( int ) 
     520    nrep = 0 
     521    for item in dil: 
     522      cm = item.getAttribute( 'cell_methods' )   
     523      if string.find( cm, "area: where" ) != -1: 
     524        cm1 = string.replace( cm, "area: where", "area: mean where" ) 
     525        item.setAttribute( 'cell_methods', cm1 )   
     526        cmrep[cm].add(cm1) 
     527        cmc[cm1] += 1 
     528        nrep += 1 
     529      elif string.find( cm, "time:mean" ) != -1: 
     530        cm1 = string.replace( cm, "time:mean", "time: mean" ) 
     531        item.setAttribute( 'cell_methods', cm1 )   
     532        cmrep[cm].add(cm1) 
     533        cmc[cm1] += 1 
     534        nrep += 1 
     535      elif string.find( cm, "weighted b " ) != -1: 
     536        cm1 = string.replace( cm, "weighted b ", "weighted by " ) 
     537        item.setAttribute( 'cell_methods', cm1 )   
     538        cmrep[cm].add(cm1) 
     539        cmc[cm1] += 1 
     540        nrep += 1 
     541    print ('FIXED CELL METHODS .. %s' % nrep ) 
     542    for k in cmc: 
     543      print ('%s: %s' % (k,cmc[k]) ) 
     544 
     545 
     546  def sectionCopy(self,dq): 
     547    this = self.doc.getElementsByTagName('CMORvar')[0] 
     548    thisRqv = self.doc.getElementsByTagName('requestVar')[0] 
     549    xx = [i for i in dq.coll['requestVarGroup'].items if i.label == 'OMIP-Omon'] 
     550    assert len(xx) == 1, 'OMIP-Omon request variable group not found' 
     551    omipOmonUid = xx[0].uid 
     552    dil = this.getElementsByTagName('item') 
     553    for item in dil: 
     554      mipt = item.getAttribute( 'mipTable' )   
     555      prov = item.getAttribute( 'prov' )   
     556      provn = item.getAttribute( 'provNote' )   
     557      if mipt == 'Oyr' and prov[:12] == "CMIP6 [OMIP]" and provn == 'bgc': 
     558        rowix = int( item.getAttribute( 'rowIndex' ) ) 
     559        if rowix < 65: 
     560          var = item.getAttribute( 'label' ) 
     561          new = item.cloneNode(True) 
     562          new.setAttribute( 'defaultPriority', '2' ) 
     563          new.setAttribute( 'mipTable', 'Omon' ) 
     564          new.setAttribute( 'prov', 'Copy from Oyr' ) 
     565          new.setAttribute( 'provNote', 'sdq.001' ) 
     566          vid =  str( uuid.uuid1() )  
     567          new.setAttribute( 'uid', vid ) 
     568          this.appendChild( new ) 
     569## 
     570## create request var 
     571## 
     572          new2 = self.doc.createElement( 'item' ) 
     573          uid =  str( uuid.uuid1() )  
     574          new2.setAttribute( 'uid', uid ) 
     575          new2.setAttribute( 'priority', '2' ) 
     576          new2.setAttribute( 'vid', vid ) 
     577          new2.setAttribute( 'vgid', omipOmonUid ) 
     578          new2.setAttribute( 'mip', 'OMIP' ) 
     579          new2.setAttribute( 'table', 'OMIP-Omon' ) 
     580          thisRqv.appendChild(new2) 
     581 
    513582 
    514583  def missingRefs(self,mrefs,clear=True): 
     
    561630  an = annotate( dq.c.vsamp, dq ) 
    562631  an.missingRefs( dq.inx.missingIds ) 
     632  an.sectionCopy(dq) 
     633  an.fixCellMethods(dq) 
  • CMIP6dreqbuild/trunk/src/framework/vrev.py

    r458 r493  
    1414      self.mips.discard(i) 
    1515 
     16  def chk2(self,vn,byExpt=False, byBoth=False): 
     17    dq = self.dq 
     18    ks = [i for i in dq.coll['var'].items if i.label == vn ] 
     19 
     20    v = ks[0] 
     21    cc = {} 
     22    l = dq.inx.iref_by_sect[v.uid].a['CMORvar'] 
     23    for i in l: 
     24      r = dq.inx.uid[i] 
     25      kk = '%s.%s' % (r.mipTable, r.label ) 
     26      cc[i] = (kk,self.chkCmv( i, byExpt=byExpt, byBoth=byBoth ) ) 
     27 
     28    return cc 
     29 
    1630  def chk(self,vn): 
    1731    ks = [i for i in dq.coll['var'].items if i.label == vn ] 
     
    2640        s.add(j) 
    2741 
    28 ## filter out the ones whch link to a remark 
     42## filter out the ones which link to a remark 
    2943    s0 = {i for i in s if dq.inx.uid[dq.inx.uid[i].vgid]._h.label != 'remarks'} 
    3044 
     
    4458 
    4559############# 
    46   def chkCmv(self,cmvid): 
     60  def chkCmv(self,cmvid, byExpt=False, byBoth=False): 
    4761    dq = self.dq 
    4862    s = set( dq.inx.iref_by_sect[cmvid].a['requestVar'] ) 
     
    5973    if len(ll) == 0: 
    6074      return set() 
     75 
    6176    s2 = reduce( operator.or_, ll)  
    6277 
    63     mips = {dq.inx.uid[i].mip for i in s2} 
    64     return mips 
     78    if byBoth or not byExpt: 
     79      mips0 = set( [dq.inx.uid[i].mip for i in s2] ) 
     80    if byExpt or byBoth: 
     81 
     82##  set of esid values 
     83      esids = set() 
     84      for i in s2: 
     85        for u in dq.inx.iref_by_sect[i].a['requestItem']: 
     86          esids.add( dq.inx.uid[u].esid ) 
     87      mips = set() 
     88      for e in esids: 
     89        if e == '': 
     90          print 'WARNING: empty esid encountered' 
     91        else: 
     92          r = dq.inx.uid[e] 
     93          if r._h.label == 'mip': 
     94            mips.add(e) 
     95          else: 
     96            if r._h.label == 'exptgroup': 
     97              r = dq.inx.uid[  dq.inx.iref_by_sect[e].a['experiment'][0] ] 
     98            if r._h.label == 'remarks': 
     99              print 'WARNING: link to remarks encountered' 
     100            else: 
     101              assert r._h.label == 'experiment', 'LOGIC ERROR ... should have an experiment record here: %s' % r._h.label 
     102              mips.add(r.mip) 
     103      if byBoth: 
     104        return (mips0,mips) 
     105      else: 
     106        return mips 
     107    else: 
     108      return mips0 
    65109 
    66110if __name__ == '__main__': 
Note: See TracChangeset for help on using the changeset viewer.