source: CCCC/trunk/doc/build/html/index.html @ 308

Subversion URL: http://proj.badc.rl.ac.uk/svn/exarch/CCCC/trunk/doc/build/html/index.html@308
Revision 308, 22.0 KB checked in by mjuckes, 6 years ago (diff)

adding latest documentation pages

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4
5<html xmlns="http://www.w3.org/1999/xhtml">
6  <head>
7    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8   
9    <title>The ceda-cc file compliance checker: technical documentation &mdash; ceda-cc 1.3.1+ documentation</title>
10   
11    <link rel="stylesheet" href="_static/default.css" type="text/css" />
12    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13   
14    <script type="text/javascript">
15      var DOCUMENTATION_OPTIONS = {
16        URL_ROOT:    './',
17        VERSION:     '1.3.1+',
18        COLLAPSE_INDEX: false,
19        FILE_SUFFIX: '.html',
20        HAS_SOURCE:  true
21      };
22    </script>
23    <script type="text/javascript" src="_static/jquery.js"></script>
24    <script type="text/javascript" src="_static/underscore.js"></script>
25    <script type="text/javascript" src="_static/doctools.js"></script>
26    <link rel="top" title="ceda-cc 1.3.1+ documentation" href="#" /> 
27  </head>
28  <body>
29    <div class="related">
30      <h3>Navigation</h3>
31      <ul>
32        <li class="right" style="margin-right: 10px">
33          <a href="genindex.html" title="General Index"
34             accesskey="I">index</a></li>
35        <li class="right" >
36          <a href="py-modindex.html" title="Python Module Index"
37             >modules</a> |</li>
38        <li><a href="#">ceda-cc 1.3.1+ documentation</a> &raquo;</li> 
39      </ul>
40    </div> 
41
42    <div class="document">
43      <div class="documentwrapper">
44        <div class="bodywrapper">
45          <div class="body">
46           
47  <div class="section" id="the-ceda-cc-file-compliance-checker-technical-documentation">
48<h1>The ceda-cc file compliance checker: technical documentation<a class="headerlink" href="#the-ceda-cc-file-compliance-checker-technical-documentation" title="Permalink to this headline">¶</a></h1>
49<p>Contents:</p>
50<div class="toctree-wrapper compound">
51<ul class="simple">
52</ul>
53</div>
54</div>
55<div class="section" id="usage-ccinit">
56<h1>Usage (ccinit)<a class="headerlink" href="#usage-ccinit" title="Permalink to this headline">¶</a></h1>
57<div class="section" id="calling-options">
58<h2>Calling options<a class="headerlink" href="#calling-options" title="Permalink to this headline">¶</a></h2>
59<table border="1" class="docutils">
60<colgroup>
61<col width="44%" />
62<col width="56%" />
63</colgroup>
64<thead valign="bottom">
65<tr class="row-odd"><th class="head">Command line</th>
66<th class="head">Description</th>
67</tr>
68</thead>
69<tbody valign="top">
70<tr class="row-even"><td>ceda-cc -p &lt;project&gt; -D &lt;directory&gt;</td>
71<td>check all data in directory tree under specified directory</td>
72</tr>
73<tr class="row-odd"><td>ceda-cc -p &lt;project&gt; -d &lt;directory&gt;</td>
74<td>check all data in specified directory</td>
75</tr>
76<tr class="row-even"><td>ceda-cc -p &lt;project&gt; -f &lt;file&gt;</td>
77<td>check a single file</td>
78</tr>
79<tr class="row-odd"><td>ceda-cc &#8211;sum &lt;log file directory&gt;</td>
80<td>create an overview of results</td>
81</tr>
82<tr class="row-even"><td>ceda-cc &#8211;copy-config-file  &lt;target diectory&gt;</td>
83<td>copy configuration files to a new directory</td>
84</tr>
85</tbody>
86</table>
87<span class="target" id="module-ccinit"></span><dl class="docutils">
88<dt>Arguments:</dt>
89<dd><table class="first last docutils field-list" frame="void" rules="none">
90<col class="field-name" />
91<col class="field-body" />
92<tbody valign="top">
93<tr class="field-odd field"><th class="field-name">-p:</th><td class="field-body">project</td>
94</tr>
95<tr class="field-even field"><th class="field-name">&#8211;copy-config:</th><td class="field-body">&lt;target directory path&gt;: copy configuration files to target directory path;</td>
96</tr>
97<tr class="field-odd field"><th class="field-name">&#8211;sum:</th><td class="field-body">&lt;log file directory&gt; create a summary of the results  logged in the specified directory.</td>
98</tr>
99<tr class="field-even field"><th class="field-name">-f:</th><td class="field-body">&lt;file&gt;: check a single file;</td>
100</tr>
101<tr class="field-odd field"><th class="field-name">-d:</th><td class="field-body">&lt;directory&gt;: check all the NetCDF files in a directory;</td>
102</tr>
103<tr class="field-even field"><th class="field-name">-D:</th><td class="field-body">&lt;directory&gt;: check all the NetCDF files in a directory tree (or latest versions if a recognised version managment system is defined for the project);</td>
104</tr>
105<tr class="field-odd field"><th class="field-name">&#8211;ld:</th><td class="field-body">&lt;log file directory&gt;:  ## directory to take log files;</td>
106</tr>
107<tr class="field-even field"><th class="field-name">-R:</th><td class="field-body">&lt;record file name&gt;: file name for file to take one record per file checked;</td>
108</tr>
109<tr class="field-odd field"><th class="field-name">&#8211;cae:</th><td class="field-body">&#8220;catch all errors&#8221;: will trap exceptions and record in  log files, and then continue. Default is to stop after unrecognised exceptions.</td>
110</tr>
111<tr class="field-even field"><th class="field-name">&#8211;log:</th><td class="field-body">&lt;single|multi&gt;:  Set log file management option &#8211; see &#8220;Single log&#8221; and &#8220;Multi-log&#8221; below.</td>
112</tr>
113<tr class="field-odd field"><th class="field-name">&#8211;blfmode:</th><td class="field-body">&lt;mode&gt;:    Set mode for batch log file &#8211; see log file modes</td>
114</tr>
115<tr class="field-even field"><th class="field-name">&#8211;flfmode:</th><td class="field-body">&lt;mode&gt;:  Set mode for file-level log file &#8211; see log file modes</td>
116</tr>
117<tr class="field-odd field"><th class="field-name">&#8211;aMap:</th><td class="field-body">Read in some attribute mappings and run tests with virtual substitutions;</td>
118</tr>
119</tbody>
120</table>
121</dd>
122</dl>
123<div class="section" id="log-file-modes">
124<h3>Log file modes<a class="headerlink" href="#log-file-modes" title="Permalink to this headline">¶</a></h3>
125<dl class="docutils">
126<dt>Valid modes are: &#8216;a&#8217;: append</dt>
127<dd>&#8216;n&#8217;, &#8216;np&#8217;: new file, &#8216;np&#8217;: protect after closing (mode = 444)
128&#8216;w&#8217;, &#8216;wo&#8217;: write (overwrite if present), &#8216;wo&#8217;: protect after closing (mode = 444)</dd>
129</dl>
130<p>Note that the log files generated in multi-log mode will re-use file names. If running with &#8211;flfmode set to &#8216;n&#8217;,&#8217;np&#8217; or &#8216;wo&#8217; it will be necessary to change or clear the target directory. The names of batch log files include the time, to the nearest second, when the process is started, so will not generally suffer from re-use.</p>
131</div>
132</div>
133</div>
134<div class="section" id="module-utils_c4">
135<span id="utils-c4"></span><h1>utils_c4<a class="headerlink" href="#module-utils_c4" title="Permalink to this headline">¶</a></h1>
136<p>A set of classes running checks and providing utilities to support checks</p>
137<dl class="class">
138<dt id="utils_c4.checkBase">
139<em class="property">class </em><tt class="descclassname">utils_c4.</tt><tt class="descname">checkBase</tt><big>(</big><em>cls='CORDEX'</em>, <em>reportPass=True</em>, <em>parent=None</em>, <em>monitor=None</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkBase"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkBase" title="Permalink to this definition">¶</a></dt>
140<dd><p>Base class for checks, containing a set of standard methods for managing operation of checks and logging of results</p>
141<dl class="method">
142<dt id="utils_c4.checkBase.isInt">
143<tt class="descname">isInt</tt><big>(</big><em>x</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkBase.isInt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkBase.isInt" title="Permalink to this definition">¶</a></dt>
144<dd><p>Check that a string is a representation of an integer</p>
145</dd></dl>
146
147<dl class="method">
148<dt id="utils_c4.checkBase.logMessage">
149<tt class="descname">logMessage</tt><big>(</big><em>msg</em>, <em>error=False</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkBase.logMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkBase.logMessage" title="Permalink to this definition">¶</a></dt>
150<dd><p>Log messages and count messages</p>
151</dd></dl>
152
153<dl class="method">
154<dt id="utils_c4.checkBase.log_error">
155<tt class="descname">log_error</tt><big>(</big><em>msg</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkBase.log_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkBase.log_error" title="Permalink to this definition">¶</a></dt>
156<dd><p>Create an error log message and call logMessage; count errors;</p>
157</dd></dl>
158
159<dl class="method">
160<dt id="utils_c4.checkBase.log_exception">
161<tt class="descname">log_exception</tt><big>(</big><em>msg</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkBase.log_exception"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkBase.log_exception" title="Permalink to this definition">¶</a></dt>
162<dd><p>Logging of exceptions &#8211; putting trace information in log files</p>
163</dd></dl>
164
165<dl class="method">
166<dt id="utils_c4.checkBase.log_pass">
167<tt class="descname">log_pass</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkBase.log_pass"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkBase.log_pass" title="Permalink to this definition">¶</a></dt>
168<dd><p>Create a pass log message and call logMessage; count passes;</p>
169</dd></dl>
170
171<dl class="method">
172<dt id="utils_c4.checkBase.runChecks">
173<tt class="descname">runChecks</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkBase.runChecks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkBase.runChecks" title="Permalink to this definition">¶</a></dt>
174<dd><p>Run all the checks registered in this instance (in self.checks) and handle exceptions</p>
175</dd></dl>
176
177<dl class="method">
178<dt id="utils_c4.checkBase.test">
179<tt class="descname">test</tt><big>(</big><em>res</em>, <em>msg</em>, <em>abort=False</em>, <em>part=False</em>, <em>appendLogfile=(None</em>, <em>None)</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkBase.test"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkBase.test" title="Permalink to this definition">¶</a></dt>
180<dd><p>Handle test results.
181:param res: [True/False] result of test;
182:param msg: Message describing the test;
183:param abort: {optional} Set True if checks should be aborted when test fails;
184:param part: {optional} Set True if this is a component of a test (logging of pass suppressed);
185:param appendLogfile: {optional} Allows results to be appended to pre-existing log file;</p>
186</dd></dl>
187
188</dd></dl>
189
190<dl class="class">
191<dt id="utils_c4.checkByVar">
192<em class="property">class </em><tt class="descclassname">utils_c4.</tt><tt class="descname">checkByVar</tt><big>(</big><em>cls='CORDEX'</em>, <em>reportPass=True</em>, <em>parent=None</em>, <em>monitor=None</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkByVar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkByVar" title="Permalink to this definition">¶</a></dt>
193<dd><p>Run some checks on groups of files with a common variable. Checks for continuity of time in group</p>
194<dl class="method">
195<dt id="utils_c4.checkByVar.checkThisTrange">
196<tt class="descname">checkThisTrange</tt><big>(</big><em>tt</em>, <em>group</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkByVar.checkThisTrange"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkByVar.checkThisTrange" title="Permalink to this definition">¶</a></dt>
197<dd><p>Check consistency across a list of time ranges</p>
198</dd></dl>
199
200<dl class="method">
201<dt id="utils_c4.checkByVar.checkTrange">
202<tt class="descname">checkTrange</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkByVar.checkTrange"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkByVar.checkTrange" title="Permalink to this definition">¶</a></dt>
203<dd><p>Manage time range checks: loop over groups of files identified by <a class="reference internal" href="#utils_c4.checkByVar.impt" title="utils_c4.checkByVar.impt"><tt class="xref py py-meth docutils literal"><span class="pre">impt()</span></tt></a></p>
204</dd></dl>
205
206<dl class="method">
207<dt id="utils_c4.checkByVar.impt">
208<tt class="descname">impt</tt><big>(</big><em>flist</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkByVar.impt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkByVar.impt" title="Permalink to this definition">¶</a></dt>
209<dd><dl class="docutils">
210<dt>Scan a list of files and identify groups which a common variable and extract time ranges into a dictionary of lists, keyed on group identifiers.</dt>
211<dd><table class="first last docutils field-list" frame="void" rules="none">
212<col class="field-name" />
213<col class="field-body" />
214<tbody valign="top">
215<tr class="field-odd field"><th class="field-name">param flist:</th><td class="field-body">List of file names.</td>
216</tr>
217</tbody>
218</table>
219</dd>
220</dl>
221<p>This routine has rather obscure nested logical tests used to identify the group to which a file belongs. The complexity arises from the fact that the identification of the files that should form a continuous time series from the file names alone is not a standardised feature of the file names.</p>
222</dd></dl>
223
224</dd></dl>
225
226<dl class="class">
227<dt id="utils_c4.checkFileName">
228<em class="property">class </em><tt class="descclassname">utils_c4.</tt><tt class="descname">checkFileName</tt><big>(</big><em>cls='CORDEX'</em>, <em>reportPass=True</em>, <em>parent=None</em>, <em>monitor=None</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkFileName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkFileName" title="Permalink to this definition">¶</a></dt>
229<dd><p>Check basic syntax of file names (i.e. checks properties of the text string, it does not attempt to access the file).
230Inherits <a class="reference internal" href="#utils_c4.checkBase" title="utils_c4.checkBase"><tt class="xref py py-class docutils literal"><span class="pre">checkBase</span></tt></a> class. Checks are run by the <a class="reference internal" href="#utils_c4.checkFileName.check" title="utils_c4.checkFileName.check"><tt class="xref py py-meth docutils literal"><span class="pre">check()</span></tt></a> method.</p>
231<dl class="method">
232<dt id="utils_c4.checkFileName.check">
233<tt class="descname">check</tt><big>(</big><em>fn</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkFileName.check"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkFileName.check" title="Permalink to this definition">¶</a></dt>
234<dd><p>Initiate checks: manage arguments and then call <em>runChecks</em> (inherited from checkBase class).
235Arguments: fn: file name: the file name to be checked.</p>
236</dd></dl>
237
238<dl class="method">
239<dt id="utils_c4.checkFileName.do_check_fn">
240<tt class="descname">do_check_fn</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkFileName.do_check_fn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkFileName.do_check_fn" title="Permalink to this definition">¶</a></dt>
241<dd><p>Basic file name checks:
242(1) Check suffix;
243(1b) [for ESA-CCI files] check presence of &#8220;ESACCI&#8221; and identify file naming convention;
244(2) Split file name into components and check number of such components;
245(3) Additional specialist checks for ESA-CCI, CORDEX, CMIP-type (for the time range).</p>
246</dd></dl>
247
248<dl class="method">
249<dt id="utils_c4.checkFileName.do_check_fnextra">
250<tt class="descname">do_check_fnextra</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkFileName.do_check_fnextra"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkFileName.do_check_fnextra" title="Permalink to this definition">¶</a></dt>
251<dd><p>Check whether file name components match constraints &#8211; but only if those constraints are not implicitly verified through comparison with global attributes in later checks</p>
252</dd></dl>
253
254</dd></dl>
255
256<dl class="class">
257<dt id="utils_c4.checkGlobalAttributes">
258<em class="property">class </em><tt class="descclassname">utils_c4.</tt><tt class="descname">checkGlobalAttributes</tt><big>(</big><em>cls='CORDEX'</em>, <em>reportPass=True</em>, <em>parent=None</em>, <em>monitor=None</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkGlobalAttributes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkGlobalAttributes" title="Permalink to this definition">¶</a></dt>
259<dd><p>Check global and variable attributes, using tables of valid values</p>
260</dd></dl>
261
262<dl class="class">
263<dt id="utils_c4.checkStandardDims">
264<em class="property">class </em><tt class="descclassname">utils_c4.</tt><tt class="descname">checkStandardDims</tt><big>(</big><em>cls='CORDEX'</em>, <em>reportPass=True</em>, <em>parent=None</em>, <em>monitor=None</em><big>)</big><a class="reference internal" href="_modules/utils_c4.html#checkStandardDims"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utils_c4.checkStandardDims" title="Permalink to this definition">¶</a></dt>
265<dd><p>Check the dimensions which are defined in the specifications</p>
266</dd></dl>
267
268</div>
269<div class="section" id="module-xceptions">
270<span id="xceptions"></span><h1>xceptions<a class="headerlink" href="#module-xceptions" title="Permalink to this headline">¶</a></h1>
271<p>Some exceptions used in the code</p>
272<dl class="exception">
273<dt id="xceptions.abortChecks">
274<em class="property">exception </em><tt class="descclassname">xceptions.</tt><tt class="descname">abortChecks</tt><a class="reference internal" href="_modules/xceptions.html#abortChecks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#xceptions.abortChecks" title="Permalink to this definition">¶</a></dt>
275<dd><p>Raised when checks are aborted following failure of a critical test (e.g. file name cannot be parsed).</p>
276</dd></dl>
277
278<dl class="exception">
279<dt id="xceptions.baseException">
280<em class="property">exception </em><tt class="descclassname">xceptions.</tt><tt class="descname">baseException</tt><big>(</big><em>msg</em><big>)</big><a class="reference internal" href="_modules/xceptions.html#baseException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#xceptions.baseException" title="Permalink to this definition">¶</a></dt>
281<dd><p>Basic exception for general use in code.</p>
282</dd></dl>
283
284<dl class="exception">
285<dt id="xceptions.loggedException">
286<em class="property">exception </em><tt class="descclassname">xceptions.</tt><tt class="descname">loggedException</tt><a class="reference internal" href="_modules/xceptions.html#loggedException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#xceptions.loggedException" title="Permalink to this definition">¶</a></dt>
287<dd><p>Raised after an exception has been caught and logged in a checking class, allowing execution to fall back to the loop over files.</p>
288</dd></dl>
289
290</div>
291<div class="section" id="indices-and-tables">
292<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
293<ul class="simple">
294<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
295<li><a class="reference internal" href="py-modindex.html"><em>Module Index</em></a></li>
296<li><a class="reference internal" href="search.html"><em>Search Page</em></a></li>
297</ul>
298</div>
299
300
301          </div>
302        </div>
303      </div>
304      <div class="sphinxsidebar">
305        <div class="sphinxsidebarwrapper">
306  <h3><a href="#">Table Of Contents</a></h3>
307  <ul>
308<li><a class="reference internal" href="#">The ceda-cc file compliance checker: technical documentation</a></li>
309<li><a class="reference internal" href="#usage-ccinit">Usage (ccinit)</a><ul>
310<li><a class="reference internal" href="#calling-options">Calling options</a><ul>
311<li><a class="reference internal" href="#log-file-modes">Log file modes</a></li>
312</ul>
313</li>
314</ul>
315</li>
316<li><a class="reference internal" href="#module-utils_c4">utils_c4</a></li>
317<li><a class="reference internal" href="#module-xceptions">xceptions</a></li>
318<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
319</ul>
320
321  <h3>This Page</h3>
322  <ul class="this-page-menu">
323    <li><a href="_sources/index.txt"
324           rel="nofollow">Show Source</a></li>
325  </ul>
326<div id="searchbox" style="display: none">
327  <h3>Quick search</h3>
328    <form class="search" action="search.html" method="get">
329      <input type="text" name="q" />
330      <input type="submit" value="Go" />
331      <input type="hidden" name="check_keywords" value="yes" />
332      <input type="hidden" name="area" value="default" />
333    </form>
334    <p class="searchtip" style="font-size: 90%">
335    Enter search terms or a module, class or function name.
336    </p>
337</div>
338<script type="text/javascript">$('#searchbox').show(0);</script>
339        </div>
340      </div>
341      <div class="clearer"></div>
342    </div>
343    <div class="related">
344      <h3>Navigation</h3>
345      <ul>
346        <li class="right" style="margin-right: 10px">
347          <a href="genindex.html" title="General Index"
348             >index</a></li>
349        <li class="right" >
350          <a href="py-modindex.html" title="Python Module Index"
351             >modules</a> |</li>
352        <li><a href="#">ceda-cc 1.3.1+ documentation</a> &raquo;</li> 
353      </ul>
354    </div>
355    <div class="footer">
356        &copy; Copyright 2015, Martin Juckes.
357      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
358    </div>
359  </body>
360</html>
Note: See TracBrowser for help on using the repository browser.