Changeset 747
- Timestamp:
- 19/09/16 16:06:30 (4 years ago)
- Location:
- CMIP6dreq/trunk/dreqPy
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
CMIP6dreq/trunk/dreqPy/docs/dreq2Defn.xml
r717 r747 69 69 <rowAttribute label="deflate_level" type="xs:string" title="Deflate Level: NetCDF compression parameter" useClass="" techNote="" description="" uid="ATTRIBUTE::CMORvar.deflate_level" superclass="" required="true"/> 70 70 <rowAttribute label="shuffle" type="xs:string" title="Shuffle: NetCDF compression parameter" useClass="" techNote="" description="" uid="ATTRIBUTE::CMORvar.shuffle" superclass="" required="true"/> 71 <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="ATTRIBUTE::CMORvar.defaultPriority" superclass="" required="true"/>71 <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="For the priority of requested data, the priority attribute of the requestVar section should be used." uid="ATTRIBUTE::CMORvar.defaultPriority" superclass="" required="true"/> 72 72 <rowAttribute label="type" type="xs:string" title="Data value type, e.g. float or double" useClass="" techNote="" description="" uid="ATTRIBUTE::CMORvar.type" superclass="" required="true"/> 73 73 <rowAttribute label="modeling_realm" type="xs:string" title="Modeling Realm" useClass="drsVocab" techNote="" description="" uid="ATTRIBUTE::CMORvar.modeling_realm" superclass="" required="true"/> … … 76 76 <rowAttribute label="mtid" type="xs:string" title="Link to MIP table record" useClass="internalLink" techNote="" description="" uid="ATTRIBUTE::CMORvar.mtid" superclass="" required="true"/> 77 77 <rowAttribute label="mipTable" type="xs:string" title="The MIP table: each table identifies a collection of variables" useClass="subsection" techNote="" description="" uid="ATTRIBUTE::CMORvar.mipTable" superclass="" required="true"/> 78 <rowAttribute label="prov" type="xs:string" title="Provenance" useClass="" techNote="" description=" " uid="ATTRIBUTE::CMORvar.prov" superclass="" required="true"/>78 <rowAttribute label="prov" type="xs:string" title="Provenance" useClass="" techNote="" description="Provides some indication of the origins of the parameter definition (e.g. the MIP responsible for first defining the variable). Once defined, a variable may be requested by multiple MIPs." uid="ATTRIBUTE::CMORvar.prov" superclass="" required="true"/> 79 79 <rowAttribute label="processing" type="xs:string" title="Processing notes" useClass="" techNote="" description="Processing notes (questions and issues)" uid="ATTRIBUTE::CMORvar.processing" superclass="" required="false"/> 80 80 <rowAttribute label="provNote" type="xs:string" title="Provenance Note" useClass="" techNote="" description="" uid="ATTRIBUTE::CMORvar.provNote" superclass="" required="true"/> … … 286 286 <rowAttribute label="cids" type="aa:st__stringList" title="Identifiers for records in grids section for coordinates" useClass="internalLinkList" techNote="" description="" uid="ATTRIBUTE::structure.cids" superclass="" required="false"/> 287 287 <rowAttribute label="cell_methods" type="xs:string" title="Cell Methods" useClass="" techNote="" description="Text for the NetCDF cell_methods attribute: describes processing used to generate the data values." uid="ATTRIBUTE::structure.cell_methods" superclass="" required="true"/> 288 <rowAttribute label="cell_measures" type="xs:string" title="Cell Measures" useClass="" techNote="" description=" " uid="ATTRIBUTE::structure.cell_measures" superclass="" required="true"/>288 <rowAttribute label="cell_measures" type="xs:string" title="Cell Measures" useClass="" techNote="" description="This can be either a string value for inclusion in the NetCDF variable attribute cell_measures, or a directive. In the latter case it will be a single word, --OPT or --MODEL. The first of these indicates that the data may be provided either on the cell centres or on the cell boundaries. --MODEL indicates that the data should be provided at the cell locations used for that variable in the model code (e.g. cell vertices)." uid="ATTRIBUTE::structure.cell_measures" superclass="" required="true"/> 289 289 <rowAttribute label="flag_values" type="xs:string" title="Flag Values" useClass="" techNote="" description="" uid="ATTRIBUTE::structure.flag_values" superclass="" required="true"/> 290 290 <rowAttribute label="flag_meanings" type="xs:string" title="FLag Meanings" useClass="" techNote="" description="" uid="ATTRIBUTE::structure.flag_meanings" superclass="" required="true"/> -
CMIP6dreq/trunk/dreqPy/docs/dreq2Sample.xml
r717 r747 7 7 xmlns="urn:w3id.org:cmip6.dreq.dreq:a"> 8 8 <prologue> 9 <dc:title>Draft CMIP6 Data Request [01.beta.3 3]</dc:title>9 <dc:title>Draft CMIP6 Data Request [01.beta.35]</dc:title> 10 10 <dc:description>The CMIP6 Data Request will specify the variables requested for the CMIP6 archive, and the detail the experiments and time slices for which they are required.</dc:description> 11 11 <dc:creator>Martin Juckes</dc:creator> 12 <dc:date>2016-0 8-17</dc:date>13 <pav:version>01.beta.3 3</pav:version>12 <dc:date>2016-09-19</dc:date> 13 <pav:version>01.beta.35</pav:version> 14 14 </prologue> 15 15 <main> 16 16 <requestVarGroup label="requestVarGroup" uid="SECTION:requestVarGroup" useClass="vocab" title="3.1 Request variable group: a collection of request variables" id="rqvg"> 17 17 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 18 <item id="001.008.001" label="example-01" title="dummy title string" uid=" 7f8e6960-6454-11e6-a78e-5404a60d96b5" mip="dummyAt" ref="dummyAt" refNote="dummyAt"/>18 <item id="001.008.001" label="example-01" title="dummy title string" uid="35c2418a-7e67-11e6-9b92-5404a60d96b5" mip="dummyAt" ref="dummyAt" refNote="dummyAt"/> 19 19 </requestVarGroup> 20 20 <requestItem label="requestItem" uid="SECTION:requestItem" useClass="vocab" title="3.2 Request Item: specifying the number of years for an experiment" id="rqi"> 21 21 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 22 <item id="001.010.001" label="example-01" title="dummy title string" uid=" 7f8eb9a6-6454-11e6-a78e-5404a60d96b5" mip="dummyAt" tab="dummyAt" expt="dummyAt" rlid="dummyAt" esid="dummyAt" esidComment="dummyAt" preset="25" treset="25" ny="25" nexmax="25" nenmax="25" nymax="5." tslice="dummyAt"/>22 <item id="001.010.001" label="example-01" title="dummy title string" uid="35c29c0c-7e67-11e6-9b92-5404a60d96b5" mip="dummyAt" tab="dummyAt" expt="dummyAt" rlid="dummyAt" esid="dummyAt" esidComment="dummyAt" preset="25" treset="25" ny="25" nexmax="25" nenmax="25" nymax="5." tslice="dummyAt"/> 23 23 </requestItem> 24 24 <exptgroup label="exptgroup" uid="SECTION:exptgroup" useClass="vocab" title="1.9 Experiment Group" id="exg"> 25 25 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 26 <item id="001.013.001" label="example-01" title="dummy title string" uid=" 7f8f055a-6454-11e6-a78e-5404a60d96b5" tierMin="25" ntot="25"/>26 <item id="001.013.001" label="example-01" title="dummy title string" uid="35c2fb70-7e67-11e6-9b92-5404a60d96b5" tierMin="25" ntot="25"/> 27 27 </exptgroup> 28 28 <miptable label="miptable" uid="SECTION:miptable" useClass="vocab" title="2.4 MIP tables" id="mtb"> 29 29 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 30 <item id="001.029.001" label="example-01" title="dummy title string" uid=" 7f8f4f88-6454-11e6-a78e-5404a60d96b5" description="dummyAt" frequency="dummyAt" prov="dummyAt"/>30 <item id="001.029.001" label="example-01" title="dummy title string" uid="35c34b3e-7e67-11e6-9b92-5404a60d96b5" description="dummyAt" frequency="dummyAt" prov="dummyAt"/> 31 31 </miptable> 32 32 <CMORvar label="CMORvar" uid="SECTION:CMORvar" useClass="vocab" title="1.3 CMOR Variable" id="cmv"> 33 33 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 34 <item id="001.002.001" label="example-01" title="dummy title string" uid=" 7f8faece-6454-11e6-a78e-5404a60d96b5" stid="dummyAt" vid="dummyAt" valid_min="5." valid_max="5." ok_min_mean_abs="5." ok_max_mean_abs="5." deflate="dummyAt" deflate_level="dummyAt" shuffle="dummyAt" defaultPriority="25" type="dummyAt" modeling_realm="dummyAt" positive="dummyAt" mipTableSection="dummyAt" mtid="dummyAt" mipTable="dummyAt" prov="dummyAt" processing="dummyAt" provNote="dummyAt" frequency="dummyAt" rowIndex="25" description="dummyAt" subGroup="dummyAt"/>34 <item id="001.002.001" label="example-01" title="dummy title string" uid="35c3997c-7e67-11e6-9b92-5404a60d96b5" stid="dummyAt" vid="dummyAt" valid_min="5." valid_max="5." ok_min_mean_abs="5." ok_max_mean_abs="5." deflate="dummyAt" deflate_level="dummyAt" shuffle="dummyAt" defaultPriority="25" type="dummyAt" modeling_realm="dummyAt" positive="dummyAt" mipTableSection="dummyAt" mtid="dummyAt" mipTable="dummyAt" prov="dummyAt" processing="dummyAt" provNote="dummyAt" frequency="dummyAt" rowIndex="25" description="dummyAt" subGroup="dummyAt"/> 35 35 </CMORvar> 36 36 <objective label="objective" uid="SECTION:objective" useClass="vocab" title="1.6 Scientific objectives" id="obj"> 37 37 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 38 <item id="001.014.001" label="example-01" title="dummy title string" uid=" 7f8fc21a-6454-11e6-a78e-5404a60d96b5" description="dummyAt" mip="dummyAt"/>38 <item id="001.014.001" label="example-01" title="dummy title string" uid="35c3a818-7e67-11e6-9b92-5404a60d96b5" description="dummyAt" mip="dummyAt"/> 39 39 </objective> 40 40 <spatialShape label="spatialShape" uid="SECTION:spatialShape" useClass="vocab" title="2.1 Spatial dimensions" id="ss"> 41 41 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 42 <item id="001.004.001" label="example-01" title="dummy title string" uid=" 7f8fc922-6454-11e6-a78e-5404a60d96b5" dimensions="dummyAt" dimids="alpha beta" shape="dummyAt" levels="25" levelFlag="false"/>42 <item id="001.004.001" label="example-01" title="dummy title string" uid="35c3adcc-7e67-11e6-9b92-5404a60d96b5" dimensions="dummyAt" dimids="alpha beta" shape="dummyAt" levels="25" levelFlag="false"/> 43 43 </spatialShape> 44 44 <requestLink label="requestLink" uid="SECTION:requestLink" useClass="vocab" title="3.3 Request link: linking a set of variables and a set of experiments" id="rql"> 45 45 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 46 <item id="001.009.001" label="example-01" title="dummy title string" uid=" 7f8fd14c-6454-11e6-a78e-5404a60d96b5" mip="dummyAt" tab="dummyAt" objective="dummyAt" grid="dummyAt" gridreq="dummyAt" comment="dummyAt" ref="dummyAt" refNote="dummyAt" refid="dummyAt" opt="dummyAt" opar="dummyAt"/>46 <item id="001.009.001" label="example-01" title="dummy title string" uid="35c3b3d0-7e67-11e6-9b92-5404a60d96b5" mip="dummyAt" tab="dummyAt" objective="dummyAt" grid="dummyAt" gridreq="dummyAt" comment="dummyAt" ref="dummyAt" refNote="dummyAt" refid="dummyAt" opt="dummyAt" opar="dummyAt"/> 47 47 </requestLink> 48 48 <tableSection label="tableSection" uid="SECTION:tableSection" useClass="vocab" title="3.4 CMOR Table Sections" id="tbs"> 49 49 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 50 <item id="001.007.001" label="example-01" title="dummy title string" uid=" 7f8fd9c6-6454-11e6-a78e-5404a60d96b5" gpid="dummyAt" mip="dummyAt" ref="dummyAt" refNote="dummyAt"/>50 <item id="001.007.001" label="example-01" title="dummy title string" uid="35c3bab0-7e67-11e6-9b92-5404a60d96b5" gpid="dummyAt" mip="dummyAt" ref="dummyAt" refNote="dummyAt"/> 51 51 </tableSection> 52 52 <modelConfig label="modelConfig" uid="SECTION:modelConfig" useClass="vocab" title="3.5 Model configuration options" id="mcfg"> 53 53 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 54 <item id="001.020.001" label="example01" title="dummy title string" uid=" 7f8fe02e-6454-11e6-a78e-5404a60d96b5" MIPs="dummyAt" usage="dummyAt" type="dummyAt" range="dummyAt"/>54 <item id="001.020.001" label="example01" title="dummy title string" uid="35c3bfc4-7e67-11e6-9b92-5404a60d96b5" MIPs="dummyAt" usage="dummyAt" type="dummyAt" range="dummyAt"/> 55 55 </modelConfig> 56 56 <varChoiceLinkC label="varChoiceLinkC" uid="SECTION:varChoiceLinkC" useClass="vocab" title="3.6 Links a variable to a choice element" id="vclc"> 57 57 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 58 <item id="001.017.001" label="example-01" title="dummy title string" uid=" 7f8fe66e-6454-11e6-a78e-5404a60d96b5" vid="dummyAt" cfgid="dummyAt" cfg="false" cid="dummyAt"/>58 <item id="001.017.001" label="example-01" title="dummy title string" uid="35c3c4ba-7e67-11e6-9b92-5404a60d96b5" vid="dummyAt" cfgid="dummyAt" cfg="false" cid="dummyAt"/> 59 59 </varChoiceLinkC> 60 60 <objectiveLink label="objectiveLink" uid="SECTION:objectiveLink" useClass="vocab" title="3.7 Link between scientific objectives and requests" id="objl"> 61 61 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 62 <item id="001.015.001" label="example-01" title="dummy title string" uid=" 7f8fec86-6454-11e6-a78e-5404a60d96b5" oid="dummyAt" rid="dummyAt"/>62 <item id="001.015.001" label="example-01" title="dummy title string" uid="35c3c97e-7e67-11e6-9b92-5404a60d96b5" oid="dummyAt" rid="dummyAt"/> 63 63 </objectiveLink> 64 64 <remarks label="remarks" uid="SECTION:remarks" useClass="vocab" title="3.8 Remarks about other items" id="rmk"> 65 65 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 66 <item id="001.011.001" label="example-01" title="dummy title string" uid=" 7f8ff28a-6454-11e6-a78e-5404a60d96b5" tid="dummyAt" tattr="dummyAt" description="dummyAt" class="dummyAt" qid="dummyAt" techNote="dummyAt" prov="dummyAt"/>66 <item id="001.011.001" label="example-01" title="dummy title string" uid="35c3ce4c-7e67-11e6-9b92-5404a60d96b5" tid="dummyAt" tattr="dummyAt" description="dummyAt" class="dummyAt" qid="dummyAt" techNote="dummyAt" prov="dummyAt"/> 67 67 </remarks> 68 68 <experiment label="experiment" uid="SECTION:experiment" useClass="vocab" title="1.5 Experiments" id="exp"> 69 69 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 70 <item id="001.012.001" label="example-01" title="dummy title string" uid=" 7f8ffa78-6454-11e6-a78e-5404a60d96b5" description="dummyAt" egid="dummyAt" mip="dummyAt" mcfg="dummyAt" tier="25 30" nstart="25" starty="dummyAt" endy="dummyAt" yps="25" ensz="25 30" ntot="25" comment="dummyAt"/>70 <item id="001.012.001" label="example-01" title="dummy title string" uid="35c3d5ea-7e67-11e6-9b92-5404a60d96b5" description="dummyAt" egid="dummyAt" mip="dummyAt" mcfg="dummyAt" tier="25 30" nstart="25" starty="dummyAt" endy="dummyAt" yps="25" ensz="25 30" ntot="25" comment="dummyAt"/> 71 71 </experiment> 72 72 <requestVar label="requestVar" uid="SECTION:requestVar" useClass="vocab" title="1.4 Request variable (carrying priority and link to group)" id="rqv"> 73 73 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 74 <item id="001.006.001" label="example-01" title="dummy title string" uid=" 7f90019e-6454-11e6-a78e-5404a60d96b5" priority="25" vid="dummyAt" vgid="dummyAt" mip="dummyAt"/>74 <item id="001.006.001" label="example-01" title="dummy title string" uid="35c3dbbc-7e67-11e6-9b92-5404a60d96b5" priority="25" vid="dummyAt" vgid="dummyAt" mip="dummyAt"/> 75 75 </requestVar> 76 76 <standardname label="standardname" uid="SECTION:standardname" useClass="vocab" title="1.8 CF Standard Names" id="sn"> 77 77 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 78 <item id="001.021.001" label="example01" title="dummy title string" uid=" 7f900720-6454-11e6-a78e-5404a60d96b5" description="dummyAt" units="dummyAt"/>78 <item id="001.021.001" label="example01" title="dummy title string" uid="35c3e04e-7e67-11e6-9b92-5404a60d96b5" description="dummyAt" units="dummyAt"/> 79 79 </standardname> 80 80 <varChoiceLinkR label="varChoiceLinkR" uid="SECTION:varChoiceLinkR" useClass="vocab" title="3.9 Links a variable to a choice element" id="vclr"> 81 81 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 82 <item id="001.016.001" label="example-01" title="dummy title string" uid=" 7f900c7a-6454-11e6-a78e-5404a60d96b5" vid="dummyAt" cid="dummyAt" rank="25"/>82 <item id="001.016.001" label="example-01" title="dummy title string" uid="35c3e562-7e67-11e6-9b92-5404a60d96b5" vid="dummyAt" cid="dummyAt" rank="25"/> 83 83 </varChoiceLinkR> 84 84 <var label="var" uid="SECTION:var" useClass="vocab" title="1.2 MIP Variable" id="var"> 85 85 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 86 <item id="001.001.001" label="example-01" title="dummy title string" sn="dummyAt" units="dummyAt" description="dummyAt" procnote="alpha beta" procComment="dummyAt" prov="dummyAt" uid=" 7f9013a0-6454-11e6-a78e-5404a60d96b5" provmip="dummyAt" unid="dummyAt"/>86 <item id="001.001.001" label="example-01" title="dummy title string" sn="dummyAt" units="dummyAt" description="dummyAt" procnote="alpha beta" procComment="dummyAt" prov="dummyAt" uid="35c3ebe8-7e67-11e6-9b92-5404a60d96b5" provmip="dummyAt" unid="dummyAt"/> 87 87 </var> 88 88 <mip label="mip" uid="SECTION:mip" useClass="vocab" title="1.1 Model Intercomparison Project" id="mip"> 89 89 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 90 <item id="001.019.001" label="example-01" title="dummy title string" uid=" 7f901986-6454-11e6-a78e-5404a60d96b5" description="dummyAt" url="dummyAt"/>90 <item id="001.019.001" label="example-01" title="dummy title string" uid="35c3f17e-7e67-11e6-9b92-5404a60d96b5" description="dummyAt" url="dummyAt"/> 91 91 </mip> 92 92 <varChoice label="varChoice" uid="SECTION:varChoice" useClass="vocab" title="3.10 Indicates variables for which a there is a range of potential CMOR Variables" id="vc"> 93 93 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 94 <item id="001.018.001" label="example-01" title="dummy title string" uid=" 7f901f26-6454-11e6-a78e-5404a60d96b5" class="dummyAt" description="dummyAt" varList="dummyAt" optionList="dummyAt"/>94 <item id="001.018.001" label="example-01" title="dummy title string" uid="35c3f714-7e67-11e6-9b92-5404a60d96b5" class="dummyAt" description="dummyAt" varList="dummyAt" optionList="dummyAt"/> 95 95 </varChoice> 96 96 <temporalShape label="temporalShape" uid="SECTION:temporalShape" useClass="vocab" title="2.2 Temporal dimension" id="ts"> 97 97 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 98 <item id="001.005.001" label="example-01" title="dummy title string" uid=" 7f9024ee-6454-11e6-a78e-5404a60d96b5" dimid="dummyAt" dimensions="dummyAt" description="dummyAt"/>98 <item id="001.005.001" label="example-01" title="dummy title string" uid="35c3fc78-7e67-11e6-9b92-5404a60d96b5" dimid="dummyAt" dimensions="dummyAt" description="dummyAt"/> 99 99 </temporalShape> 100 100 <structure label="structure" uid="SECTION:structure" useClass="vocab" title="2.3 Dimensions and related information" id="str"> 101 101 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 102 <item id="001.003.001" label="example-01" title="dummy title string" uid=" 7f902be2-6454-11e6-a78e-5404a60d96b5" spid="dummyAt" tmid="dummyAt" odims="dummyAt" dids="alpha beta" coords="dummyAt" cids="alpha beta" cell_methods="dummyAt" cell_measures="dummyAt" flag_values="dummyAt" flag_meanings="dummyAt" description="dummyAt" procNote="dummyAt" prov="dummyAt" cmid="dummyAt"/>102 <item id="001.003.001" label="example-01" title="dummy title string" uid="35c40236-7e67-11e6-9b92-5404a60d96b5" spid="dummyAt" tmid="dummyAt" odims="dummyAt" dids="alpha beta" coords="dummyAt" cids="alpha beta" cell_methods="dummyAt" cell_measures="dummyAt" flag_values="dummyAt" flag_meanings="dummyAt" description="dummyAt" procNote="dummyAt" prov="dummyAt" cmid="dummyAt"/> 103 103 </structure> 104 104 <grids label="grids" uid="SECTION:grids" useClass="vocab" title="1.7 Specification of dimensions" id="grd"> 105 105 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 106 <item id="001.022.001" label="example-01" title="dummy title string" tables="dummyAt" uid=" 7f9035ce-6454-11e6-a78e-5404a60d96b5" altLabel="dummyAt" description="dummyAt" standardName="dummyAt" axis="dummyAt" units="dummyAt" isIndex="dummyAt" coords="dummyAt" bounds="dummyAt" direction="dummyAt" valid_min="5." valid_max="5." type="dummyAt" positive="dummyAt" value="dummyAt" boundsValues="dummyAt" requested="dummyAt" boundsRequested="5. 10." tolRequested="dummyAt" isGrid="dummyAt"/>106 <item id="001.022.001" label="example-01" title="dummy title string" tables="dummyAt" uid="35c409e8-7e67-11e6-9b92-5404a60d96b5" altLabel="dummyAt" description="dummyAt" standardName="dummyAt" axis="dummyAt" units="dummyAt" isIndex="dummyAt" coords="dummyAt" bounds="dummyAt" direction="dummyAt" valid_min="5." valid_max="5." type="dummyAt" positive="dummyAt" value="dummyAt" boundsValues="dummyAt" requested="dummyAt" boundsRequested="5. 10." tolRequested="dummyAt" isGrid="dummyAt"/> 107 107 </grids> 108 108 <timeSlice label="timeSlice" uid="SECTION:timeSlice" useClass="vocab" title="3.11 Time Slices for Output Requests" id="tsl"> 109 109 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 110 <item id="001.025.001" label="example-01" title="dummy title string" type="dummyAt" start="25" end="25" step="5." sliceLen="25" nyears="5." uid=" 7f903ec0-6454-11e6-a78e-5404a60d96b5"/>110 <item id="001.025.001" label="example-01" title="dummy title string" type="dummyAt" start="25" end="25" step="5." sliceLen="25" nyears="5." uid="35c41226-7e67-11e6-9b92-5404a60d96b5"/> 111 111 </timeSlice> 112 112 <cellMethods label="cellMethods" uid="SECTION:cellMethods" useClass="vocab" title="7.1 Cell Methods" id="cmth"> 113 113 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 114 <item id="001.029.001" label="example-01" title="dummy title string" uid=" 7f904398-6454-11e6-a78e-5404a60d96b5" cell_methods="dummyAt"/>114 <item id="001.029.001" label="example-01" title="dummy title string" uid="35c415fa-7e67-11e6-9b92-5404a60d96b5" cell_methods="dummyAt"/> 115 115 </cellMethods> 116 116 </main><annex> 117 117 <tags label="tags" uid="SECTION:tags" useClass="vocab" title="6.1 Tags" id="tag"> 118 118 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 119 <item id="001.026.001" label="example-01" title="dummy title string" description="dummyAt" uid=" 7f9048a2-6454-11e6-a78e-5404a60d96b5"/>119 <item id="001.026.001" label="example-01" title="dummy title string" description="dummyAt" uid="35c41a8c-7e67-11e6-9b92-5404a60d96b5"/> 120 120 </tags> 121 121 <varRelations label="varRelations" uid="SECTION:varRelations" useClass="vocab" title="6.2 Relationships between CMOR variables" id="vrln"> 122 122 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 123 <item id="001.027.001" label="example_03" title="dummy title string" description="dummyAt" uid=" 7f904dd4-6454-11e6-a78e-5404a60d96b5" relation="dummyAt"/>123 <item id="001.027.001" label="example_03" title="dummy title string" description="dummyAt" uid="35c4228e-7e67-11e6-9b92-5404a60d96b5" relation="dummyAt"/> 124 124 </varRelations> 125 125 <varRelLnk label="varRelLnk" uid="SECTION:varRelLnk" useClass="vocab" title="6.3 CMOR Variable Relation Links" id="vrln"> 126 126 <!-- <info srcType="dummy" srcRef="ptxt.py">Dummy entries</info> --> 127 <item id="001.028.001" label="example_03" title="dummy title string" uid=" 7f905798-6454-11e6-a78e-5404a60d96b5" rlid="dummyAt" rid="dummyAt"/>127 <item id="001.028.001" label="example_03" title="dummy title string" uid="35c426f8-7e67-11e6-9b92-5404a60d96b5" rlid="dummyAt" rid="dummyAt"/> 128 128 </varRelLnk> 129 129 </annex> -
CMIP6dreq/trunk/dreqPy/dreq.py
r728 r747 151 151 _linkAttrStyle = {} 152 152 __charmeEnable__ = {} 153 _extraHtml = {} 153 154 154 155 def __init__(self,idict=None,xmlMiniDom=None,id='defaultId',etree=False): … … 266 267 msg.append( m ) 267 268 msg.append( '</ul>' ) 269 sect = self._h.label 270 if sect in self._extraHtml: 271 rc, href, hlab = self._extraHtml[sect](self) 272 if rc: 273 msg.append( '<p><a href="%s">%s</a></p>' % (href,hlab) ) 268 274 ## 269 275 ## add list of inward references 270 276 ## 271 oldCode = False 272 if self._base._indexInitialised and oldCode: 273 f1 = self._htmlStyle.get( sect, {} ).get( 'getIrefs', None ) != None 274 if f1: 275 tl = [] 276 if f1: 277 tl = self._htmlStyle[sect]['getIrefs'] 278 doall = '__all__' in tl 279 if doall: 280 tl = self._inx.iref_by_sect[self.uid].a.keys() 281 tl1 = [] 282 for t in tl: 283 if t in self._inx.iref_by_sect[self.uid].a and len( self._inx.iref_by_sect[self.uid].a[t] ) > 0: 284 tl1.append( t ) 285 am = [] 286 if len(tl1) > 0: 287 am.append( '''<div class="demo">\n<div id="tabs">\n<ul>''' ) 288 for t in tl1: 289 u0 = self._inx.iref_by_sect[self.uid].a[t][0] 290 this1 = '<li><a href="#tabs-%s">%s</a></li>' % (t,self._inx.uid[u0]._h.title ) 291 am.append( this1 ) 292 am.append( '</ul>' ) 293 for t in tl1: 294 u0 = self._inx.iref_by_sect[self.uid].a[t][0] 295 am.append( '<div id="tabs-%s">' % t ) 296 am.append( '<h3>%s</h3>' % self._inx.uid[u0]._h.title ) 297 am.append( '<ul>' ) 298 items = [self._inx.uid[u] for u in self._inx.iref_by_sect[self.uid].a[t] ] 299 items.sort( ds('label').cmp ) 300 for targ in items: 301 if ghis == None: 302 m = '<li>%s:%s [%s]</li>' % ( targ._h.label, targ.label, targ.__href__() ) 303 else: 304 lst = ghis( targ._h.label ) 305 m = lst( targ, frm=sect ) 306 am.append( m ) 307 am.append( '</ul>' ) 308 am.append( '</div>' ) 309 if len(am) > 0: 310 am.append( '</div>' ) 311 msg.append( '<h2>Links from other sections</h2>' ) 312 msg.append( ''' <script> 313 $(function() { 314 $( "#tabs" ).tabs({cookie: { expires: 1 } }); 315 }); 316 </script> 317 <!-- how to make tab selection stick: http://stackoverflow.com/questions/5066581/jquery-ui-tabs-wont-save-selected-tab-index-upon-page-reload expiry time in days-->''' ) 318 for m in am: 319 msg.append(m) 320 321 elif self._base._indexInitialised: 277 if self._base._indexInitialised: 322 278 msg += self.__irefHtml__(sect,ghis) 279 323 280 if sect in self.__charmeEnable__: 324 281 msg.append( '<script src="/js/dreq/charme/charme.js"></script>' ) … … 503 460 """Read in a vocabulary collection configuration document and a vocabulary document""" 504 461 505 def __init__(self, configdoc='out/dreqDefn.xml', thisdoc='../workbook/trial_20150724.xml', manifest=None, useShelve=False, strings=False ):462 def __init__(self, configdoc='out/dreqDefn.xml', thisdoc='../workbook/trial_20150724.xml', manifest=None, useShelve=False, strings=False,configOnly=False): 506 463 self.rc = rechecks() 507 464 self.lu = lutilsC() 508 465 self.silent = True 466 self.configOnly = configOnly 509 467 self.coll = {} 510 468 … … 653 611 self.tt1[t[0].label].labUnique = t.header.labUnique 654 612 self.tt1[t[0].label].level = t.header.level 613 self.tt1[t[0].label].uid = t.header.uid 655 614 self.tt1[t[0].label].itemLabelMode = t.header.itemLabelMode 656 615 self.ttl2 += [thisc.__dict__[a] for a in t.attributes] … … 666 625 667 626 self.recordAttributeDefn = tables 627 628 if self.configOnly: 629 return 668 630 for k in tables.keys(): 669 631 if self.etree: … … 749 711 t = v.getAttribute( 'title' ) 750 712 i = v.getAttribute( 'id' ) 713 u = v.getAttribute( 'uid' ) 751 714 ilm = v.getAttribute( 'itemLabelMode' ) 752 715 lev = v.getAttribute( 'level' ) … … 754 717 labu = v.getAttribute( 'labUnique' ) 755 718 il = v.getElementsByTagName( 'rowAttribute' ) 756 vtt = self.nts( v.nodeName, l,t,i,ilm,lev, maxo, labu, 's__%s' % v.nodeName ) 719 ##vtt = self.nts( v.nodeName, l,t,i,ilm,lev, maxo, labu, 's__%s' % v.nodeName ) 720 vtt = self.nts( v.nodeName, l,t,i,ilm,lev, maxo, labu, u ) 757 721 idict = {} 758 722 for i in il: … … 916 880 """ 917 881 918 def __init__(self,dreqXML=defaultDreqPath, configdoc=defaultConfigPath, useShelve=False, htmlStyles=None, strings=False, manifest=None ):919 self.c = config( thisdoc=dreqXML, configdoc=configdoc, useShelve=useShelve,strings=strings,manifest=manifest )882 def __init__(self,dreqXML=defaultDreqPath, configdoc=defaultConfigPath, useShelve=False, htmlStyles=None, strings=False, manifest=None , configOnly=False): 883 self.c = config( thisdoc=dreqXML, configdoc=configdoc, useShelve=useShelve,strings=strings,manifest=manifest,configOnly=configOnly) 920 884 self.coll = self.c.coll 921 885 self.version = self.c.version 922 self.inx = index(self.coll)923 self.itemStyles = {}924 self.defaultItemLineStyle = lambda i, frm='', ann='': '<li>%s: %s</li>' % ( i.label, i.__href__(odir='../u/') )925 886 self.softwareVersion = version 887 if not configOnly: 888 self.inx = index(self.coll) 889 self.itemStyles = {} 890 self.defaultItemLineStyle = lambda i, frm='', ann='': '<li>%s: %s</li>' % ( i.label, i.__href__(odir='../u/') ) 926 891 ## 927 892 ## add index to Item base class .. so that it can be accessed by item instances 928 893 ## 929 dreqItemBase._inx = self.inx930 dreqItemBase._indexInitialised = True894 dreqItemBase._inx = self.inx 895 dreqItemBase._indexInitialised = True 931 896 ## 932 897 ## load in additional styling directives 933 898 ## 934 if htmlStyles != None:935 for k in htmlStyles:936 dreqItemBase._htmlStyle[k] = htmlStyles[k]899 if htmlStyles != None: 900 for k in htmlStyles: 901 dreqItemBase._htmlStyle[k] = htmlStyles[k] 937 902 938 903 ## dreqItemBase._htmlStyle['__general__'] = {'addRemarks':True} 939 904 940 self.pageTmpl = """<html><head><title>%s</title>905 self.pageTmpl = """<html><head><title>%s</title> 941 906 %s 942 907 <link rel="stylesheet" type="text/css" href="%scss/dreq.css"> -
CMIP6dreq/trunk/dreqPy/dreqCmdl.py
r738 r747 27 27 from .packageConfig import __version__, __versionComment__ 28 28 print( 'dreqPy version %s [%s]' % (__version__,__versionComment__) ) 29 print( 'Running in python %s' % str( sys.version_info ) ) 29 30 elif sys.argv[1] == '--unitTest': 30 31 print( "Starting test suite 1" ) -
CMIP6dreq/trunk/dreqPy/makeTables.py
r717 r747 1 1 2 2 import collections, string, os, sys 3 import rvgExtraTable 3 4 4 5 nt__charmeEnable = collections.namedtuple( 'charme', ['id','site'] ) … … 772 773 dq.itemStyles['requestVar'] = styls.rqvLink01 773 774 775 dreq.dreqItemBase._extraHtml['requestVarGroup'] = rvgExtraTable.vgx1(dq).mxoGet 776 774 777 dreq.dreqItemBase.__charmeEnable__['var'] = nt__charmeEnable( 'test','http://clipc-services.ceda.ac.uk/dreq' ) 775 778 -
CMIP6dreq/trunk/dreqPy/packageConfig.py
r730 r747 15 15 16 16 __versionComment__ = "Updates to content for several MIPs; uniqueness of CMOR variable name per table" 17 __version__ = "01.beta.3 4"17 __version__ = "01.beta.35" 18 18 __title__ = "dreqPy" 19 19 __description__ = "CMIP6 Data Request Python API" -
CMIP6dreq/trunk/dreqPy/scope.py
r738 r747 65 65 def filter2( a, b, tt, tm ): 66 66 ## largest tier less than or equal to tm 67 t1 = [t for t in tt if t <= tm][-1] 68 it1 = tt.index(t1) 69 aa = a[it1] 70 if b < 0: 71 return aa 67 ll = [t for t in tt if t <= tm] 68 if len( ll ) > 0: 69 t1 = [t for t in tt if t <= tm][-1] 70 it1 = tt.index(t1) 71 aa = a[it1] 72 if b < 0: 73 return aa 74 else: 75 return min( [aa,b] ) 72 76 else: 73 return min( [aa,b] )77 return 0 74 78 75 79 npy = {'1hrClimMon':24*12, 'daily':365, u'Annual':1, u'fx':0.01, u'1hr':24*365, u'3hr':8*365, … … 207 211 208 212 s = set() 209 for i in self.dq.coll['objectiveLink'].items: 210 if t1(i.label): 211 s.add( self.dq.inx.uid[i.rid] ) 212 213 ##self.rqs = list({self.dq.inx.uid[i.rid] for i in self.dq.coll['objectiveLink'].items if t1(i.label) }) 213 for i in self.dq.coll['requestLink'].items: 214 if t1(i.mip): 215 if 'requestItem' in self.dq.inx.iref_by_sect[i.uid].a: 216 if any( [ self.rqiExp[x][-1] > 0 for x in self.dq.inx.iref_by_sect[i.uid].a['requestItem'] if x in self.rqiExp ] ): 217 s.add( i ) 218 214 219 self.rqs = list( s ) 215 220 return self.rqs … … 221 226 222 227 s = set() 223 for i in self.dq.coll['objectiveLink'].items: 224 if i.label in mipSel: 225 if len(mipSel[i]) == 0 or self.dq.inx.uid[i.oid].label in mipSel[i]: 226 s.add( self.dq.inx.uid[i.rid] ) 227 ##self.rqs = list({self.dq.inx.uid[i.rid] for i in self.dq.coll['objectiveLink'].items if t1(i.label) }) 228 self.rqs = list( s ) 229 return self.rqs 230 231 def getRequestLinkByObjective( self, objSel ): 232 """Return the set of request links which are associated with specified objectives""" 233 if type(objSel) == type(''): 234 t1 = lambda x: x == self.rlu[objSel] 235 elif type(objSel) == type(set()): 236 t1 = lambda x: x in [self.rlu[i] for i in objSel] 237 238 s = set() 239 for i in self.dq.coll['objectiveLink'].items: 240 if t1(i.label): 241 s.add( self.dq.inx.uid[i.oid] ) 242 ## 243 self.rqs = list( s ) 244 ##self.rqs = list({self.dq.inx.uid[i.rid] for i in self.dq.coll['objectiveLink'].items if t1(i.oid) }) 228 for i in self.dq.coll['requestLink'].items: 229 if i.mip in mipSel: 230 if len(mipSel[i.mip]) == 0: 231 s.add( i ) 232 elif 'objectiveLink' in self.dq.inx.iref_by_sect[i.uid].a: 233 ss = {self.dq.inx.uid[k].label for k in self.dq.inx.iref_by_sect[i.uid].a['objectiveLink']} 234 if any( [x in mipSel[i.mip] for x in ss] ): 235 s.add( i ) 236 ## 237 ## filter requestLinks by tierMax: check to see whether they link to experiments with tier below or equal to tiermax. 238 ## 239 s1 = set() 240 for i in s: 241 if 'requestItem' in self.dq.inx.iref_by_sect[i.uid].a: 242 if any( [ self.rqiExp[x][-1] > 0 for x in self.dq.inx.iref_by_sect[i.uid].a['requestItem'] if x in self.rqiExp ] ): 243 s1.add( i ) 244 245 self.rqs = list( s1 ) 245 246 return self.rqs 246 247 … … 518 519 if 'requestVar' not in inx.iref_by_sect[v].a: 519 520 print ( 'Variable with no request ....: %s, %s' % (inx.uid[v].label, inx.uid[v].mipTable) ) 520 szv[v] = self.sz[inx.uid[v].stid]*npy[inx.uid[v].frequency] 521 try: 522 szv[v] = self.sz[inx.uid[v].stid]*npy[inx.uid[v].frequency] 523 except: 524 if inx.uid[v].stid not in self.sz: 525 print ('ERROR: size not found for stid %s (v=%s, %s)' % (inx.uid[v].stid,v,inx.uid[v].label) ) 526 if inx.uid[v].frequency not in npy: 527 print ('ERROR: npy not found for frequency %s (v=%s, %s)' % (inx.uid[v].frequency,v,inx.uid[v].label) ) 528 szv[v] = 0 521 529 ov.append( self.dq.inx.uid[v] ) 522 530 ee = self.listIndexDual( ov, 'mipTable', 'label', acount=None, alist=None, cdict=szv, cc=cc ) … … 528 536 else: 529 537 if 'native' in nymg[v]: 530 ff[v] = s elf.sz[ inx.uid[v].stid ] * npy[inx.uid[v].frequency]538 ff[v] = szv[v] 531 539 ny = nymg[v]['native'] 532 540 else: … … 541 549 ks = list( nymg[v].keys() )[0] 542 550 ny = nymg[v][ks] 543 ff[v] = self.szg[ks][ inx.uid[v].stid ] * npy[inx.uid[v].frequency] 551 if inx.uid[v].stid in self.szg[ks]: 552 ff[v] = self.szg[ks][ inx.uid[v].stid ] * npy[inx.uid[v].frequency] 553 else: 554 ff[v] = 0. 544 555 545 556 if inx.uid[v].frequency != 'monClim': … … 804 815 o: objectives 805 816 e: experiments 817 -q <options>: List information about the schema: 818 s: sections 819 <section>: attributes for a section 820 <section:attribute>: definition of an attribute. 806 821 -h : help: print help text; 807 822 -e <expt>: experiment; … … 831 846 '-h':('h',False), '--printLinesMax':('plm',True), \ 832 847 '-l':('l',True), 848 '-q':('q',True), 833 849 '--printVars':('vars',False), '--intersection':('intersection',False), \ 834 850 '--count':('count',False), \ … … 855 871 856 872 if 'm' in self.adict: 857 if self.adict['m'].find( ':' ) != -1: 873 if self.adict['m'] == '_all_': 874 pass 875 elif self.adict['m'].find( ':' ) != -1: 858 876 ee = {} 859 877 for i in self.adict['m'].split(','): … … 898 916 return 899 917 918 if 'q' in self.adict: 919 if dq == None: 920 dq = dreq.loadDreq(configOnly=True) 921 s = self.adict['q'] 922 if self.adict['q'] == 's': 923 ss = sorted( [(i.title,i.label) for i in dq.coll['__sect__'].items] ) 924 for s in ss: 925 mlg.prnt( '%16s:: %s' % (s[1],s[0]) ) 926 else: 927 ss = [i.label for i in dq.coll['__sect__'].items] 928 if s.find( ':' ) != -1: 929 s,a = s.split( ':' ) 930 else: 931 a = None 932 if s not in ss: 933 mlg.prnt( 'ERROR: option must be a section; use "-q s" to list sections' ) 934 elif a == None: 935 x = [i for i in dq.coll['__sect__'].items if i.label == s] 936 s1 = [i for i in dq.coll['__main__'].items if 'ATTRIBUTE::%s' % s in i.uid] 937 mlg.prnt( x[0].title ) 938 mlg.prnt( ' '.join( sorted ([i.label for i in s1] ) )) 939 else: 940 x = [i for i in dq.coll['__main__'].items if i.uid == 'ATTRIBUTE::%s.%s' % (s,a) ] 941 if len(x) == 0: 942 mlg.prnt( 'ERROR: attribute not found' ) 943 s1 = [i for i in dq.coll['__main__'].items if 'ATTRIBUTE::%s' % s in i.uid] 944 mlg.prnt( 'ATTRIBUTES: ' + ' '.join( sorted ([i.label for i in s1] ) )) 945 else: 946 mlg.prnt( 'Section %s, attribute %s' % (s,a) ) 947 mlg.prnt( x[0].title ) 948 mlg.prnt( x[0].description ) 949 return 950 900 951 if not 'm' in self.adict: 901 952 mlg.prnt ( 'Current version requires -m argument' ) … … 922 973 923 974 ok = True 924 for i in self.adict['m']: 975 if self.adict['m'] == '_all_': 976 self.adict['m'] = set(self.sc.mips ) 977 else: 978 for i in self.adict['m']: 925 979 if i not in self.sc.mips: 926 980 ok = False -
CMIP6dreq/trunk/dreqPy/scope_utils.py
r717 r747 6 6 7 7 ##NT_txtopts = collections.namedtuple( 'txtopts', ['mode'] ) 8 9 class c1(object): 10 def __init__(self): 11 self.a = collections.defaultdict( int ) 8 12 9 13 class xlsTabs(object): -
CMIP6dreq/trunk/dreqPy/simpleCheck.py
r738 r747 1 from .__init__ import DOC_DIR 1 scr = __name__ == '__main__' 2 if scr: 3 from __init__ import DOC_DIR 4 else: 5 from .__init__ import DOC_DIR 2 6 import string, os, sys, collections 3 7 … … 79 83 class check1(checkbase): 80 84 def _ch01_importDreq(self): 81 from . import dreq 85 if scr: 86 import dreq 87 else: 88 from . import dreq 82 89 print ( 'Dreq software import checked' ) 83 90 self.ok = True 84 91 85 92 def _ch02_importSample(self): 86 from . import dreq 93 if scr: 94 import dreq 95 else: 96 from . import dreq 87 97 self.dq = dreq.loadDreq( manifest='%s/dreqManifest.txt' % self.docdir ) 88 98 print ( 'Dreq sample load checked' ) … … 90 100 91 101 def _ch03_linkCheck(self): 102 if scr: 103 import dreq 104 else: 105 from . import dreq 106 92 107 nn = 0 93 from . import dreq94 108 self.dq = dreq.loadDreq( manifest='%s/dreqManifest.txt' % self.docdir ) 95 109 for section in self.dq.coll : … … 103 117 nerr += 1 104 118 cc[k] += 1 105 print ('Bad link found: section: %s: %s %s ' % (section, k, i.__dict__[k]) )119 print ('Bad link found: section: %s: %s %s [%s]' % (section, k, i.__dict__[k], i.uid) ) 106 120 if nerr > 0: 107 121 msg = ''
Note: See TracChangeset
for help on using the changeset viewer.