source: flex_extract.git/Documentation/html/Documentation/Api/api_python.html @ 30f7911

ctbtodev
Last change on this file since 30f7911 was 30f7911, checked in by Anne Philipp <anne.philipp@…>, 5 years ago

reviewed installation section of online documentation; minor corrections

  • Property mode set to 100644
File size: 213.5 KB
Line 
1
2
3<!DOCTYPE html>
4<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
5<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
6<head>
7  <meta charset="utf-8">
8 
9  <meta name="viewport" content="width=device-width, initial-scale=1.0">
10 
11  <title>Python’s Auto Generated Documentation &mdash; flex_extract 7.1 alpha documentation</title>
12 
13
14 
15 
16 
17 
18
19 
20  <script type="text/javascript" src="../../_static/js/modernizr.min.js"></script>
21 
22   
23      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
24        <script type="text/javascript" src="../../_static/jquery.js"></script>
25        <script type="text/javascript" src="../../_static/underscore.js"></script>
26        <script type="text/javascript" src="../../_static/doctools.js"></script>
27        <script type="text/javascript" src="../../_static/language_data.js"></script>
28        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
29   
30    <script type="text/javascript" src="../../_static/js/theme.js"></script>
31
32   
33
34 
35  <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
36  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
37  <link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />
38  <link rel="stylesheet" href="../../_static/css/theme_overrides.css" type="text/css" />
39    <link rel="index" title="Index" href="../../genindex.html" />
40    <link rel="search" title="Search" href="../../search.html" />
41    <link rel="next" title="Fortran’s Auto Generated Documentation" href="api_fortran.html" />
42    <link rel="prev" title="Auto Generated Documentation" href="../api.html" /> 
43</head>
44
45<body class="wy-body-for-nav">
46
47   
48  <div class="wy-grid-for-nav">
49   
50    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
51      <div class="wy-side-scroll">
52        <div class="wy-side-nav-search" >
53         
54
55         
56            <a href="../../index.html" class="icon icon-home"> flex_extract
57         
58
59         
60          </a>
61
62         
63           
64           
65              <div class="version">
66                7.1
67              </div>
68           
69         
70
71         
72<div role="search">
73  <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
74    <input type="text" name="q" placeholder="Search docs" />
75    <input type="hidden" name="check_keywords" value="yes" />
76    <input type="hidden" name="area" value="default" />
77  </form>
78</div>
79
80         
81        </div>
82
83        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
84         
85           
86           
87             
88           
89           
90              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
91<ul class="current">
92<li class="toctree-l1"><a class="reference internal" href="../../installation.html">Installation</a></li>
93<li class="toctree-l1"><a class="reference internal" href="../../quick_start.html">Quick Start</a></li>
94<li class="toctree-l1"><a class="reference internal" href="../../ecmwf_data.html">ECMWF Data</a></li>
95<li class="toctree-l1 current"><a class="reference internal" href="../../documentation.html">Documentation</a><ul class="current">
96<li class="toctree-l2"><a class="reference internal" href="../overview.html">Overview</a></li>
97<li class="toctree-l2"><a class="reference internal" href="../input.html">Control &amp; Input Data</a></li>
98<li class="toctree-l2"><a class="reference internal" href="../output.html">Output Data</a></li>
99<li class="toctree-l2"><a class="reference internal" href="../disagg.html">Disaggregation of Flux Data</a></li>
100<li class="toctree-l2"><a class="reference internal" href="../vertco.html">Vertical Coordinate</a></li>
101<li class="toctree-l2 current"><a class="reference internal" href="../api.html">Auto Generated Documentation</a><ul class="current">
102<li class="toctree-l3 current"><a class="current reference internal" href="#">Python’s Auto Generated Documentation</a><ul>
103<li class="toctree-l4"><a class="reference internal" href="#programs">Programs</a></li>
104<li class="toctree-l4"><a class="reference internal" href="#classes">Classes</a></li>
105<li class="toctree-l4"><a class="reference internal" href="#modules">Modules</a></li>
106</ul>
107</li>
108<li class="toctree-l3"><a class="reference internal" href="api_fortran.html">Fortran’s Auto Generated Documentation</a></li>
109</ul>
110</li>
111</ul>
112</li>
113<li class="toctree-l1"><a class="reference internal" href="../../evaluation.html">Evaluation</a></li>
114<li class="toctree-l1"><a class="reference internal" href="../../dev_guide.html">Developer Guide</a></li>
115<li class="toctree-l1"><a class="reference internal" href="../../changelog.html">Changelog</a></li>
116<li class="toctree-l1"><a class="reference internal" href="../../support.html">Support</a></li>
117<li class="toctree-l1"><a class="reference internal" href="../../Support/faq.html">FAQ - Frequently asked questions</a></li>
118<li class="toctree-l1"><a class="reference internal" href="../../authors.html">Developer Team</a></li>
119</ul>
120
121           
122         
123        </div>
124      </div>
125    </nav>
126
127    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
128
129     
130      <nav class="wy-nav-top" aria-label="top navigation">
131       
132          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
133          <a href="../../index.html">flex_extract</a>
134       
135      </nav>
136
137
138      <div class="wy-nav-content">
139       
140        <div class="rst-content">
141       
142         
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158<div role="navigation" aria-label="breadcrumbs navigation">
159
160  <ul class="wy-breadcrumbs">
161   
162      <li><a href="../../index.html">Docs</a> &raquo;</li>
163       
164          <li><a href="../../documentation.html">Documentation</a> &raquo;</li>
165       
166          <li><a href="../api.html">Auto Generated Documentation</a> &raquo;</li>
167       
168      <li>Python’s Auto Generated Documentation</li>
169   
170   
171      <li class="wy-breadcrumbs-aside">
172       
173           
174            <a href="../../_sources/Documentation/Api/api_python.rst.txt" rel="nofollow"> View page source</a>
175         
176       
177      </li>
178   
179  </ul>
180
181 
182  <hr/>
183</div>
184          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
185           <div itemprop="articleBody">
186           
187  <div class="section" id="python-s-auto-generated-documentation">
188<h1>Python’s Auto Generated Documentation<a class="headerlink" href="#python-s-auto-generated-documentation" title="Permalink to this headline"></a></h1>
189<div class="contents local topic" id="contents">
190<ul class="simple">
191<li><a class="reference internal" href="#programs" id="id1">Programs</a><ul>
192<li><a class="reference internal" href="#module-install" id="id2">install</a></li>
193<li><a class="reference internal" href="#module-submit" id="id3">submit</a></li>
194</ul>
195</li>
196<li><a class="reference internal" href="#classes" id="id4">Classes</a><ul>
197<li><a class="reference internal" href="#module-ControlFile" id="id5">ControlFile</a></li>
198<li><a class="reference internal" href="#module-EcFlexpart" id="id6">EcFlexpart</a></li>
199<li><a class="reference internal" href="#module-GribUtil" id="id7">GribUtil</a></li>
200<li><a class="reference internal" href="#module-MarsRetrieval" id="id8">MarsRetrieval</a></li>
201<li><a class="reference internal" href="#module-UioFiles" id="id9">UioFiles</a></li>
202</ul>
203</li>
204<li><a class="reference internal" href="#modules" id="id10">Modules</a><ul>
205<li><a class="reference internal" href="#module-get_mars_data" id="id11">get_mars_data</a></li>
206<li><a class="reference internal" href="#module-prepare_flexpart" id="id12">prepare_flexpart</a></li>
207<li><a class="reference internal" href="#module-tools" id="id13">tools</a></li>
208<li><a class="reference internal" href="#module-checks" id="id14">checks</a></li>
209<li><a class="reference internal" href="#module-disaggregation" id="id15">disaggregation</a></li>
210</ul>
211</li>
212</ul>
213</div>
214<div class="section" id="programs">
215<h2><a class="toc-backref" href="#id1">Programs</a><a class="headerlink" href="#programs" title="Permalink to this headline"></a></h2>
216<div class="section" id="module-install">
217<span id="install"></span><h3><a class="toc-backref" href="#id2">install</a><a class="headerlink" href="#module-install" title="Permalink to this headline"></a></h3>
218<p>This script installs the flex_extract program.</p>
219<p>Depending on the selected installation environment (locally or on the
220ECMWF server ecgate or cca) the program extracts the commandline
221arguments and the CONTROL file parameter and prepares the corresponding
222environment.
223The necessary files are collected in a tar-ball and placed
224at the target location. There its untared, the environment variables will
225be set and the Fortran code will be compiled.
226If the ECMWF environment is selected a job script is prepared and submitted
227for the remaining configurations after putting the tar-ball to the
228target ECMWF server.</p>
229<p>Type: install.py –help
230to get information about command line parameters.
231Read the documentation for usage instructions.</p>
232<dl class="function">
233<dt id="install.check_install_conditions">
234<code class="descclassname">install.</code><code class="descname">check_install_conditions</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/install.html#check_install_conditions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.check_install_conditions" title="Permalink to this definition"></a></dt>
235<dd><p>Checks a couple of necessary attributes and conditions
236for the installation such as if they exist and contain values.
237Otherwise set default values.</p>
238<table class="docutils field-list" frame="void" rules="none">
239<col class="field-name" />
240<col class="field-body" />
241<tbody valign="top">
242<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
243command line.</td>
244</tr>
245</tbody>
246</table>
247</dd></dl>
248
249<dl class="function">
250<dt id="install.del_convert_build">
251<code class="descclassname">install.</code><code class="descname">del_convert_build</code><span class="sig-paren">(</span><em>src_path</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/install.html#del_convert_build"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.del_convert_build" title="Permalink to this definition"></a></dt>
252<dd><p>Clean up the Fortran source directory and remove all
253build files (e.g. *.o, *.mod and CONVERT2)</p>
254<table class="docutils field-list" frame="void" rules="none">
255<col class="field-name" />
256<col class="field-body" />
257<tbody valign="top">
258<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>src_path</strong> (<em>str</em>) – Path to the fortran source directory.</td>
259</tr>
260</tbody>
261</table>
262</dd></dl>
263
264<dl class="function">
265<dt id="install.get_install_cmdline_args">
266<code class="descclassname">install.</code><code class="descname">get_install_cmdline_args</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/install.html#get_install_cmdline_args"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.get_install_cmdline_args" title="Permalink to this definition"></a></dt>
267<dd><p>Decomposes the command line arguments and assigns them to variables.
268Apply default values for non mentioned arguments.</p>
269<table class="docutils field-list" frame="void" rules="none">
270<col class="field-name" />
271<col class="field-body" />
272<tbody valign="top">
273<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>args</strong> – Contains the commandline arguments from script/program call.</td>
274</tr>
275<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">Namespace</td>
276</tr>
277</tbody>
278</table>
279</dd></dl>
280
281<dl class="function">
282<dt id="install.install_local">
283<code class="descclassname">install.</code><code class="descname">install_local</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/install.html#install_local"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.install_local" title="Permalink to this definition"></a></dt>
284<dd><p>Perform the actual installation on a local machine.</p>
285<table class="docutils field-list" frame="void" rules="none">
286<col class="field-name" />
287<col class="field-body" />
288<tbody valign="top">
289<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
290command line.</td>
291</tr>
292</tbody>
293</table>
294</dd></dl>
295
296<dl class="function">
297<dt id="install.install_via_gateway">
298<code class="descclassname">install.</code><code class="descname">install_via_gateway</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/install.html#install_via_gateway"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.install_via_gateway" title="Permalink to this definition"></a></dt>
299<dd><p>Prepare data transfer to remote gate and submit a job script which will
300install everything on the remote gate.</p>
301<table class="docutils field-list" frame="void" rules="none">
302<col class="field-name" />
303<col class="field-body" />
304<tbody valign="top">
305<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
306command line.</td>
307</tr>
308</tbody>
309</table>
310</dd></dl>
311
312<dl class="function">
313<dt id="install.main">
314<code class="descclassname">install.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/install.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.main" title="Permalink to this definition"></a></dt>
315<dd><p>Controls the installation process. Calls the installation function
316if target is specified.</p>
317</dd></dl>
318
319<dl class="function">
320<dt id="install.mk_compilejob">
321<code class="descclassname">install.</code><code class="descname">mk_compilejob</code><span class="sig-paren">(</span><em>makefile</em>, <em>target</em>, <em>ecuid</em>, <em>ecgid</em>, <em>fp_root</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/install.html#mk_compilejob"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_compilejob" title="Permalink to this definition"></a></dt>
322<dd><p>Modifies the original job template file so that it is specified
323for the user and the environment were it will be applied. Result
324is stored in a new file “job.temp” in the python directory.</p>
325<table class="docutils field-list" frame="void" rules="none">
326<col class="field-name" />
327<col class="field-body" />
328<tbody valign="top">
329<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
330<li><strong>makefile</strong> (<em>str</em>) – Name of the makefile which should be used to compile FORTRAN
331CONVERT2 program.</li>
332<li><strong>target</strong> (<em>str</em>) – The target where the installation should be done, e.g. the queue.</li>
333<li><strong>ecuid</strong> (<em>str</em>) – The user id on ECMWF server.</li>
334<li><strong>ecgid</strong> (<em>str</em>) – The group id on ECMWF server.</li>
335<li><strong>fp_root</strong> (<em>str</em>) – Path to the root directory of FLEXPART environment or flex_extract
336environment.</li>
337</ul>
338</td>
339</tr>
340</tbody>
341</table>
342</dd></dl>
343
344<dl class="function">
345<dt id="install.mk_convert_build">
346<code class="descclassname">install.</code><code class="descname">mk_convert_build</code><span class="sig-paren">(</span><em>src_path</em>, <em>makefile</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/install.html#mk_convert_build"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_convert_build" title="Permalink to this definition"></a></dt>
347<dd><p>Compiles the Fortran code and generates the executable.</p>
348<table class="docutils field-list" frame="void" rules="none">
349<col class="field-name" />
350<col class="field-body" />
351<tbody valign="top">
352<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
353<li><strong>src_path</strong> (<em>str</em>) – Path to the fortran source directory.</li>
354<li><strong>makefile</strong> (<em>str</em>) – The name of the makefile which should be used.</li>
355</ul>
356</td>
357</tr>
358</tbody>
359</table>
360</dd></dl>
361
362<dl class="function">
363<dt id="install.mk_env_vars">
364<code class="descclassname">install.</code><code class="descname">mk_env_vars</code><span class="sig-paren">(</span><em>ecuid</em>, <em>ecgid</em>, <em>gateway</em>, <em>destination</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/install.html#mk_env_vars"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_env_vars" title="Permalink to this definition"></a></dt>
365<dd><p>Creates a file named ECMWF_ENV which contains the
366necessary environmental variables at ECMWF servers.
367It is based on the template ECMWF_ENV.template.</p>
368<table class="docutils field-list" frame="void" rules="none">
369<col class="field-name" />
370<col class="field-body" />
371<tbody valign="top">
372<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
373<li><strong>ecuid</strong> (<em>str</em>) – The user id on ECMWF server.</li>
374<li><strong>ecgid</strong> (<em>str</em>) – The group id on ECMWF server.</li>
375<li><strong>gateway</strong> (<em>str</em>) – The gateway server the user is using.</li>
376<li><strong>destination</strong> (<em>str</em>) – The remote destination which is used to transfer files
377from ECMWF server to local gateway server.</li>
378</ul>
379</td>
380</tr>
381</tbody>
382</table>
383</dd></dl>
384
385<dl class="function">
386<dt id="install.mk_job_template">
387<code class="descclassname">install.</code><code class="descname">mk_job_template</code><span class="sig-paren">(</span><em>ecuid</em>, <em>ecgid</em>, <em>gateway</em>, <em>destination</em>, <em>fp_root</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/install.html#mk_job_template"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_job_template" title="Permalink to this definition"></a></dt>
388<dd><p>Modifies the original job template file so that it is specified
389for the user and the environment were it will be applied. Result
390is stored in a new file.</p>
391<table class="docutils field-list" frame="void" rules="none">
392<col class="field-name" />
393<col class="field-body" />
394<tbody valign="top">
395<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
396<li><strong>ecuid</strong> (<em>str</em>) – The user id on ECMWF server.</li>
397<li><strong>ecgid</strong> (<em>str</em>) – The group id on ECMWF server.</li>
398<li><strong>gateway</strong> (<em>str</em>) – The gateway server the user is using.</li>
399<li><strong>destination</strong> (<em>str</em>) – The remote destination which is used to transfer files
400from ECMWF server to local gateway server.</li>
401<li><strong>fp_root</strong> (<em>str</em>) – Path to the root directory of FLEXPART environment or flex_extract
402environment.</li>
403</ul>
404</td>
405</tr>
406</tbody>
407</table>
408</dd></dl>
409
410<dl class="function">
411<dt id="install.mk_tarball">
412<code class="descclassname">install.</code><code class="descname">mk_tarball</code><span class="sig-paren">(</span><em>tarball_path</em>, <em>target</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/install.html#mk_tarball"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_tarball" title="Permalink to this definition"></a></dt>
413<dd><p>Creates a tarball with all necessary files which need to be sent to the
414installation directory.
415It does not matter if this is local or remote.
416Collects all python files, the Fortran source and makefiles,
417the ECMWF_ENV file, the CONTROL files as well as the
418template files.</p>
419<table class="docutils field-list" frame="void" rules="none">
420<col class="field-name" />
421<col class="field-body" />
422<tbody valign="top">
423<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
424<li><strong>tarball_path</strong> (<em>str</em>) – The complete path to the tar file which will contain all
425relevant data for flex_extract.</li>
426<li><strong>target</strong> (<em>str</em>) – The queue where the job is submitted to.</li>
427</ul>
428</td>
429</tr>
430</tbody>
431</table>
432</dd></dl>
433
434<dl class="function">
435<dt id="install.un_tarball">
436<code class="descclassname">install.</code><code class="descname">un_tarball</code><span class="sig-paren">(</span><em>tarball_path</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/install.html#un_tarball"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.un_tarball" title="Permalink to this definition"></a></dt>
437<dd><p>Extracts the given tarball into current directory.</p>
438<table class="docutils field-list" frame="void" rules="none">
439<col class="field-name" />
440<col class="field-body" />
441<tbody valign="top">
442<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>tarball_path</strong> (<em>str</em>) – The complete path to the tar file which will contain all
443relevant data for flex_extract.</td>
444</tr>
445</tbody>
446</table>
447</dd></dl>
448
449</div>
450<div class="section" id="module-submit">
451<span id="submit"></span><h3><a class="toc-backref" href="#id3">submit</a><a class="headerlink" href="#module-submit" title="Permalink to this headline"></a></h3>
452<p>This script allows the user to extract meteorological fields from the ECMWF.</p>
453<p>It prepares the settings for retrieving the data from ECMWF servers and
454process the resulting files to prepare them for the use with FLEXPART or
455FLEXTRA.</p>
456<p>If it is supposed to work locally then it works through the necessary
457functions get_mars_data and prepare_flexpart. Otherwise it prepares
458a job script (korn shell) which will do the necessary work on the
459ECMWF server. This script will de submitted via the ecaccess command
460ecaccess-job-submit.</p>
461<p>This file can also be imported as a module which then contains the following
462functions:</p>
463<blockquote>
464<div><ul class="simple">
465<li>main - the main function of the script</li>
466<li>submit - calls mk_jobscript depending on operation mode and submits its</li>
467<li>mk_jobscript - creates the job script from a template</li>
468</ul>
469</div></blockquote>
470<p>Type: submit.py –help
471to get information about command line parameters.
472Read the documentation for usage instructions.</p>
473<dl class="function">
474<dt id="submit.main">
475<code class="descclassname">submit.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/submit.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#submit.main" title="Permalink to this definition"></a></dt>
476<dd><p>Get the arguments from script call and from CONTROL file.
477Decides from the argument “queue” if the local version
478is done “queue=None” or the gateway version with “queue=ecgate”
479or “queue=cca”.</p>
480</dd></dl>
481
482<dl class="function">
483<dt id="submit.mk_jobscript">
484<code class="descclassname">submit.</code><code class="descname">mk_jobscript</code><span class="sig-paren">(</span><em>jtemplate</em>, <em>job_file</em>, <em>clist</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/submit.html#mk_jobscript"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#submit.mk_jobscript" title="Permalink to this definition"></a></dt>
485<dd><p>Creates the job script from template.</p>
486<table class="docutils field-list" frame="void" rules="none">
487<col class="field-name" />
488<col class="field-body" />
489<tbody valign="top">
490<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
491<li><strong>jtemplate</strong> (<em>str</em>) – Job template file from sub-directory “_templates” for
492submission to ECMWF. It contains all necessary
493module and variable settings for the ECMWF environment as well as
494the job call and mail report instructions.
495Default is “job.temp”.</li>
496<li><strong>job_file</strong> (<em>str</em>) – Path to the job script file.</li>
497<li><strong>clist</strong> (<em>list of str</em>) – Contains all necessary parameters for ECMWF CONTROL file.</li>
498</ul>
499</td>
500</tr>
501</tbody>
502</table>
503</dd></dl>
504
505<dl class="function">
506<dt id="submit.submit">
507<code class="descclassname">submit.</code><code class="descname">submit</code><span class="sig-paren">(</span><em>jtemplate</em>, <em>c</em>, <em>queue</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/submit.html#submit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#submit.submit" title="Permalink to this definition"></a></dt>
508<dd><p>Prepares the job script and submits it to the specified queue.</p>
509<table class="docutils field-list" frame="void" rules="none">
510<col class="field-name" />
511<col class="field-body" />
512<tbody valign="top">
513<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
514<li><strong>jtemplate</strong> (<em>str</em>) – Job template file from sub-directory “_templates” for
515submission to ECMWF. It contains all necessary
516module and variable settings for the ECMWF environment as well as
517the job call and mail report instructions.
518Default is “job.temp”.</li>
519<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
520command line.</li>
521<li><strong>queue</strong> (<em>str</em>) – Name of queue for submission to ECMWF (e.g. ecgate or cca )</li>
522</ul>
523</td>
524</tr>
525</tbody>
526</table>
527</dd></dl>
528
529</div>
530</div>
531<div class="section" id="classes">
532<h2><a class="toc-backref" href="#id4">Classes</a><a class="headerlink" href="#classes" title="Permalink to this headline"></a></h2>
533<div class="section" id="module-ControlFile">
534<span id="controlfile"></span><h3><a class="toc-backref" href="#id5">ControlFile</a><a class="headerlink" href="#module-ControlFile" title="Permalink to this headline"></a></h3>
535<dl class="class">
536<dt id="ControlFile.ControlFile">
537<em class="property">class </em><code class="descclassname">ControlFile.</code><code class="descname">ControlFile</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/ControlFile.html#ControlFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile" title="Permalink to this definition"></a></dt>
538<dd><p>Contains the information which are stored in the CONTROL files.</p>
539<p>The CONTROL file is the steering part of the FLEXPART extraction
540software. All necessary parameters needed to retrieve the data fields
541from the MARS archive for driving FLEXPART are set in a CONTROL file.
542Some specific parameters like the start and end dates can be overwritten
543by the command line parameters, but in generel all parameters needed
544for a complete set of fields for FLEXPART can be set in the CONTROL file.</p>
545<dl class="attribute">
546<dt id="ControlFile.ControlFile.controlfile">
547<code class="descname">controlfile</code><a class="headerlink" href="#ControlFile.ControlFile.controlfile" title="Permalink to this definition"></a></dt>
548<dd><p>The name of the control file to be processed. Default value is the
549filename passed to the init function when initialised.</p>
550<table class="docutils field-list" frame="void" rules="none">
551<col class="field-name" />
552<col class="field-body" />
553<tbody valign="top">
554<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
555</tr>
556</tbody>
557</table>
558</dd></dl>
559
560<dl class="attribute">
561<dt id="ControlFile.ControlFile.start_date">
562<code class="descname">start_date</code><a class="headerlink" href="#ControlFile.ControlFile.start_date" title="Permalink to this definition"></a></dt>
563<dd><p>The first day of the retrieval period. Default value is None.</p>
564<table class="docutils field-list" frame="void" rules="none">
565<col class="field-name" />
566<col class="field-body" />
567<tbody valign="top">
568<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
569</tr>
570</tbody>
571</table>
572</dd></dl>
573
574<dl class="attribute">
575<dt id="ControlFile.ControlFile.end_date">
576<code class="descname">end_date</code><a class="headerlink" href="#ControlFile.ControlFile.end_date" title="Permalink to this definition"></a></dt>
577<dd><p>The last day of the retrieval period. Default value is None.</p>
578<table class="docutils field-list" frame="void" rules="none">
579<col class="field-name" />
580<col class="field-body" />
581<tbody valign="top">
582<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
583</tr>
584</tbody>
585</table>
586</dd></dl>
587
588<dl class="attribute">
589<dt id="ControlFile.ControlFile.date_chunk">
590<code class="descname">date_chunk</code><a class="headerlink" href="#ControlFile.ControlFile.date_chunk" title="Permalink to this definition"></a></dt>
591<dd><p>Length of period for a single mars retrieval. Default value is 3.</p>
592<table class="docutils field-list" frame="void" rules="none">
593<col class="field-name" />
594<col class="field-body" />
595<tbody valign="top">
596<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
597</tr>
598</tbody>
599</table>
600</dd></dl>
601
602<dl class="attribute">
603<dt id="ControlFile.ControlFile.dtime">
604<code class="descname">dtime</code><a class="headerlink" href="#ControlFile.ControlFile.dtime" title="Permalink to this definition"></a></dt>
605<dd><p>The time step in hours. Default value is None.</p>
606<table class="docutils field-list" frame="void" rules="none">
607<col class="field-name" />
608<col class="field-body" />
609<tbody valign="top">
610<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
611</tr>
612</tbody>
613</table>
614</dd></dl>
615
616<dl class="attribute">
617<dt id="ControlFile.ControlFile.basetime">
618<code class="descname">basetime</code><a class="headerlink" href="#ControlFile.ControlFile.basetime" title="Permalink to this definition"></a></dt>
619<dd><p>The time for a half day retrieval. The 12 hours upfront are to be
620retrieved. Default value is None.</p>
621<table class="docutils field-list" frame="void" rules="none">
622<col class="field-name" />
623<col class="field-body" />
624<tbody valign="top">
625<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
626</tr>
627</tbody>
628</table>
629</dd></dl>
630
631<dl class="attribute">
632<dt id="ControlFile.ControlFile.maxstep">
633<code class="descname">maxstep</code><a class="headerlink" href="#ControlFile.ControlFile.maxstep" title="Permalink to this definition"></a></dt>
634<dd><p>The maximum forecast step for non flux data. Default value is None.</p>
635<table class="docutils field-list" frame="void" rules="none">
636<col class="field-name" />
637<col class="field-body" />
638<tbody valign="top">
639<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
640</tr>
641</tbody>
642</table>
643</dd></dl>
644
645<dl class="attribute">
646<dt id="ControlFile.ControlFile.type">
647<code class="descname">type</code><a class="headerlink" href="#ControlFile.ControlFile.type" title="Permalink to this definition"></a></dt>
648<dd><p>List of field type per retrieving hour. Default value is None.</p>
649<table class="docutils field-list" frame="void" rules="none">
650<col class="field-name" />
651<col class="field-body" />
652<tbody valign="top">
653<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of str</td>
654</tr>
655</tbody>
656</table>
657</dd></dl>
658
659<dl class="attribute">
660<dt id="ControlFile.ControlFile.time">
661<code class="descname">time</code><a class="headerlink" href="#ControlFile.ControlFile.time" title="Permalink to this definition"></a></dt>
662<dd><p>List of retrieving times in hours. Default valuer is None.</p>
663<table class="docutils field-list" frame="void" rules="none">
664<col class="field-name" />
665<col class="field-body" />
666<tbody valign="top">
667<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of str</td>
668</tr>
669</tbody>
670</table>
671</dd></dl>
672
673<dl class="attribute">
674<dt id="ControlFile.ControlFile.step">
675<code class="descname">step</code><a class="headerlink" href="#ControlFile.ControlFile.step" title="Permalink to this definition"></a></dt>
676<dd><p>List of forecast time steps in hours for non flux data.
677Default value is None.</p>
678<table class="docutils field-list" frame="void" rules="none">
679<col class="field-name" />
680<col class="field-body" />
681<tbody valign="top">
682<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of str or str</td>
683</tr>
684</tbody>
685</table>
686</dd></dl>
687
688<dl class="attribute">
689<dt id="ControlFile.ControlFile.acctype">
690<code class="descname">acctype</code><a class="headerlink" href="#ControlFile.ControlFile.acctype" title="Permalink to this definition"></a></dt>
691<dd><p>The field type for the accumulated forecast fields.
692Default value is None.</p>
693<table class="docutils field-list" frame="void" rules="none">
694<col class="field-name" />
695<col class="field-body" />
696<tbody valign="top">
697<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
698</tr>
699</tbody>
700</table>
701</dd></dl>
702
703<dl class="attribute">
704<dt id="ControlFile.ControlFile.acctime">
705<code class="descname">acctime</code><a class="headerlink" href="#ControlFile.ControlFile.acctime" title="Permalink to this definition"></a></dt>
706<dd><p>The starting time of the accumulated forecasts. Default value is None.</p>
707<table class="docutils field-list" frame="void" rules="none">
708<col class="field-name" />
709<col class="field-body" />
710<tbody valign="top">
711<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
712</tr>
713</tbody>
714</table>
715</dd></dl>
716
717<dl class="attribute">
718<dt id="ControlFile.ControlFile.accmaxstep">
719<code class="descname">accmaxstep</code><a class="headerlink" href="#ControlFile.ControlFile.accmaxstep" title="Permalink to this definition"></a></dt>
720<dd><p>The maximum forecast step for the accumulated forecast fields
721(flux data). Default value is None.</p>
722<table class="docutils field-list" frame="void" rules="none">
723<col class="field-name" />
724<col class="field-body" />
725<tbody valign="top">
726<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
727</tr>
728</tbody>
729</table>
730</dd></dl>
731
732<dl class="attribute">
733<dt id="ControlFile.ControlFile.marsclass">
734<code class="descname">marsclass</code><a class="headerlink" href="#ControlFile.ControlFile.marsclass" title="Permalink to this definition"></a></dt>
735<dd><p>Characterisation of dataset. Default value is None.</p>
736<table class="docutils field-list" frame="void" rules="none">
737<col class="field-name" />
738<col class="field-body" />
739<tbody valign="top">
740<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
741</tr>
742</tbody>
743</table>
744</dd></dl>
745
746<dl class="attribute">
747<dt id="ControlFile.ControlFile.dataset">
748<code class="descname">dataset</code><a class="headerlink" href="#ControlFile.ControlFile.dataset" title="Permalink to this definition"></a></dt>
749<dd><p>For public datasets there is the specific naming and parameter
750dataset which has to be used to characterize the type of
751data. Default value is None.</p>
752<table class="docutils field-list" frame="void" rules="none">
753<col class="field-name" />
754<col class="field-body" />
755<tbody valign="top">
756<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
757</tr>
758</tbody>
759</table>
760</dd></dl>
761
762<dl class="attribute">
763<dt id="ControlFile.ControlFile.stream">
764<code class="descname">stream</code><a class="headerlink" href="#ControlFile.ControlFile.stream" title="Permalink to this definition"></a></dt>
765<dd><p>Identifies the forecasting system used to generate the data.
766Default value is None.</p>
767<table class="docutils field-list" frame="void" rules="none">
768<col class="field-name" />
769<col class="field-body" />
770<tbody valign="top">
771<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
772</tr>
773</tbody>
774</table>
775</dd></dl>
776
777<dl class="attribute">
778<dt id="ControlFile.ControlFile.number">
779<code class="descname">number</code><a class="headerlink" href="#ControlFile.ControlFile.number" title="Permalink to this definition"></a></dt>
780<dd><p>Selects the member in ensemble forecast run. Default value is ‘OFF’.</p>
781<table class="docutils field-list" frame="void" rules="none">
782<col class="field-name" />
783<col class="field-body" />
784<tbody valign="top">
785<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
786</tr>
787</tbody>
788</table>
789</dd></dl>
790
791<dl class="attribute">
792<dt id="ControlFile.ControlFile.expver">
793<code class="descname">expver</code><a class="headerlink" href="#ControlFile.ControlFile.expver" title="Permalink to this definition"></a></dt>
794<dd><p>The version number of the dataset. Default value is ‘1’.</p>
795<table class="docutils field-list" frame="void" rules="none">
796<col class="field-name" />
797<col class="field-body" />
798<tbody valign="top">
799<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
800</tr>
801</tbody>
802</table>
803</dd></dl>
804
805<dl class="attribute">
806<dt id="ControlFile.ControlFile.gaussian">
807<code class="descname">gaussian</code><a class="headerlink" href="#ControlFile.ControlFile.gaussian" title="Permalink to this definition"></a></dt>
808<dd><p>This parameter is deprecated and should no longer be used.
809Specifies the desired type of Gaussian grid for the output.
810Default value is an empty string ‘’.</p>
811<table class="docutils field-list" frame="void" rules="none">
812<col class="field-name" />
813<col class="field-body" />
814<tbody valign="top">
815<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
816</tr>
817</tbody>
818</table>
819</dd></dl>
820
821<dl class="attribute">
822<dt id="ControlFile.ControlFile.grid">
823<code class="descname">grid</code><a class="headerlink" href="#ControlFile.ControlFile.grid" title="Permalink to this definition"></a></dt>
824<dd><p>Specifies the output grid which can be either a Gaussian grid
825or a Latitude/Longitude grid. Default value is None.</p>
826<table class="docutils field-list" frame="void" rules="none">
827<col class="field-name" />
828<col class="field-body" />
829<tbody valign="top">
830<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
831</tr>
832</tbody>
833</table>
834</dd></dl>
835
836<dl class="attribute">
837<dt id="ControlFile.ControlFile.area">
838<code class="descname">area</code><a class="headerlink" href="#ControlFile.ControlFile.area" title="Permalink to this definition"></a></dt>
839<dd><p>Specifies the desired sub-area of data to be extracted.
840Default value is None.</p>
841<table class="docutils field-list" frame="void" rules="none">
842<col class="field-name" />
843<col class="field-body" />
844<tbody valign="top">
845<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
846</tr>
847</tbody>
848</table>
849</dd></dl>
850
851<dl class="attribute">
852<dt id="ControlFile.ControlFile.left">
853<code class="descname">left</code><a class="headerlink" href="#ControlFile.ControlFile.left" title="Permalink to this definition"></a></dt>
854<dd><p>The western most longitude of the area to be extracted.
855Default value is None.</p>
856<table class="docutils field-list" frame="void" rules="none">
857<col class="field-name" />
858<col class="field-body" />
859<tbody valign="top">
860<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
861</tr>
862</tbody>
863</table>
864</dd></dl>
865
866<dl class="attribute">
867<dt id="ControlFile.ControlFile.lower">
868<code class="descname">lower</code><a class="headerlink" href="#ControlFile.ControlFile.lower" title="Permalink to this definition"></a></dt>
869<dd><p>The southern most latitude of the area to be extracted.
870Default value is None.</p>
871<table class="docutils field-list" frame="void" rules="none">
872<col class="field-name" />
873<col class="field-body" />
874<tbody valign="top">
875<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
876</tr>
877</tbody>
878</table>
879</dd></dl>
880
881<dl class="attribute">
882<dt id="ControlFile.ControlFile.upper">
883<code class="descname">upper</code><a class="headerlink" href="#ControlFile.ControlFile.upper" title="Permalink to this definition"></a></dt>
884<dd><p>The northern most latitued of the area to be extracted.
885Default value is None.</p>
886<table class="docutils field-list" frame="void" rules="none">
887<col class="field-name" />
888<col class="field-body" />
889<tbody valign="top">
890<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
891</tr>
892</tbody>
893</table>
894</dd></dl>
895
896<dl class="attribute">
897<dt id="ControlFile.ControlFile.right">
898<code class="descname">right</code><a class="headerlink" href="#ControlFile.ControlFile.right" title="Permalink to this definition"></a></dt>
899<dd><p>The eastern most longitude of the area to be extracted.
900Default value is None.</p>
901<table class="docutils field-list" frame="void" rules="none">
902<col class="field-name" />
903<col class="field-body" />
904<tbody valign="top">
905<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
906</tr>
907</tbody>
908</table>
909</dd></dl>
910
911<dl class="attribute">
912<dt id="ControlFile.ControlFile.level">
913<code class="descname">level</code><a class="headerlink" href="#ControlFile.ControlFile.level" title="Permalink to this definition"></a></dt>
914<dd><p>Specifies the maximum level. Default value is None.</p>
915<table class="docutils field-list" frame="void" rules="none">
916<col class="field-name" />
917<col class="field-body" />
918<tbody valign="top">
919<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
920</tr>
921</tbody>
922</table>
923</dd></dl>
924
925<dl class="attribute">
926<dt id="ControlFile.ControlFile.levelist">
927<code class="descname">levelist</code><a class="headerlink" href="#ControlFile.ControlFile.levelist" title="Permalink to this definition"></a></dt>
928<dd><p>Specifies the required level list. Default value is None.</p>
929<table class="docutils field-list" frame="void" rules="none">
930<col class="field-name" />
931<col class="field-body" />
932<tbody valign="top">
933<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
934</tr>
935</tbody>
936</table>
937</dd></dl>
938
939<dl class="attribute">
940<dt id="ControlFile.ControlFile.resol">
941<code class="descname">resol</code><a class="headerlink" href="#ControlFile.ControlFile.resol" title="Permalink to this definition"></a></dt>
942<dd><p>Specifies the desired triangular truncation of retrieved data,
943before carrying out any other selected post-processing.
944Default value is None.</p>
945<table class="docutils field-list" frame="void" rules="none">
946<col class="field-name" />
947<col class="field-body" />
948<tbody valign="top">
949<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
950</tr>
951</tbody>
952</table>
953</dd></dl>
954
955<dl class="attribute">
956<dt id="ControlFile.ControlFile.gauss">
957<code class="descname">gauss</code><a class="headerlink" href="#ControlFile.ControlFile.gauss" title="Permalink to this definition"></a></dt>
958<dd><p>Switch to select gaussian fields (1) or regular lat/lon (0).
959Default value is 0.</p>
960<table class="docutils field-list" frame="void" rules="none">
961<col class="field-name" />
962<col class="field-body" />
963<tbody valign="top">
964<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
965</tr>
966</tbody>
967</table>
968</dd></dl>
969
970<dl class="attribute">
971<dt id="ControlFile.ControlFile.accuracy">
972<code class="descname">accuracy</code><a class="headerlink" href="#ControlFile.ControlFile.accuracy" title="Permalink to this definition"></a></dt>
973<dd><p>Specifies the number of bits per value to be used in the
974generated GRIB coded fields. Default value is 24.</p>
975<table class="docutils field-list" frame="void" rules="none">
976<col class="field-name" />
977<col class="field-body" />
978<tbody valign="top">
979<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
980</tr>
981</tbody>
982</table>
983</dd></dl>
984
985<dl class="attribute">
986<dt id="ControlFile.ControlFile.omega">
987<code class="descname">omega</code><a class="headerlink" href="#ControlFile.ControlFile.omega" title="Permalink to this definition"></a></dt>
988<dd><p>Switch to select omega retrieval (1) or not (0). Default value is 0.</p>
989<table class="docutils field-list" frame="void" rules="none">
990<col class="field-name" />
991<col class="field-body" />
992<tbody valign="top">
993<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
994</tr>
995</tbody>
996</table>
997</dd></dl>
998
999<dl class="attribute">
1000<dt id="ControlFile.ControlFile.omegadiff">
1001<code class="descname">omegadiff</code><a class="headerlink" href="#ControlFile.ControlFile.omegadiff" title="Permalink to this definition"></a></dt>
1002<dd><p>Switch to decide to calculate Omega and Dps/Dt from continuity
1003equation for diagnostic purposes (1) or not (0). Default value is 0.</p>
1004<table class="docutils field-list" frame="void" rules="none">
1005<col class="field-name" />
1006<col class="field-body" />
1007<tbody valign="top">
1008<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1009</tr>
1010</tbody>
1011</table>
1012</dd></dl>
1013
1014<dl class="attribute">
1015<dt id="ControlFile.ControlFile.eta">
1016<code class="descname">eta</code><a class="headerlink" href="#ControlFile.ControlFile.eta" title="Permalink to this definition"></a></dt>
1017<dd><p>Switch to select direct retrieval of etadot from MARS (1) or
1018wether it has to be calculated (0). Then Default value is 0.</p>
1019<table class="docutils field-list" frame="void" rules="none">
1020<col class="field-name" />
1021<col class="field-body" />
1022<tbody valign="top">
1023<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1024</tr>
1025</tbody>
1026</table>
1027</dd></dl>
1028
1029<dl class="attribute">
1030<dt id="ControlFile.ControlFile.etadiff">
1031<code class="descname">etadiff</code><a class="headerlink" href="#ControlFile.ControlFile.etadiff" title="Permalink to this definition"></a></dt>
1032<dd><p>Switch to select calculation of etadot and Dps/Dt from continuity
1033equation for diagnostic purposes (1) or not (0). Default value is 0.</p>
1034<table class="docutils field-list" frame="void" rules="none">
1035<col class="field-name" />
1036<col class="field-body" />
1037<tbody valign="top">
1038<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1039</tr>
1040</tbody>
1041</table>
1042</dd></dl>
1043
1044<dl class="attribute">
1045<dt id="ControlFile.ControlFile.etapar">
1046<code class="descname">etapar</code><a class="headerlink" href="#ControlFile.ControlFile.etapar" title="Permalink to this definition"></a></dt>
1047<dd><p>GRIB parameter Id for etadot fields. Default value is 77.</p>
1048<table class="docutils field-list" frame="void" rules="none">
1049<col class="field-name" />
1050<col class="field-body" />
1051<tbody valign="top">
1052<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1053</tr>
1054</tbody>
1055</table>
1056</dd></dl>
1057
1058<dl class="attribute">
1059<dt id="ControlFile.ControlFile.dpdeta">
1060<code class="descname">dpdeta</code><a class="headerlink" href="#ControlFile.ControlFile.dpdeta" title="Permalink to this definition"></a></dt>
1061<dd><p>Switch to select multiplication of etadot with dpdeta.
1062Default value is 1.</p>
1063<table class="docutils field-list" frame="void" rules="none">
1064<col class="field-name" />
1065<col class="field-body" />
1066<tbody valign="top">
1067<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1068</tr>
1069</tbody>
1070</table>
1071</dd></dl>
1072
1073<dl class="attribute">
1074<dt id="ControlFile.ControlFile.smooth">
1075<code class="descname">smooth</code><a class="headerlink" href="#ControlFile.ControlFile.smooth" title="Permalink to this definition"></a></dt>
1076<dd><p>Spectral truncation of ETADOT after calculation on Gaussian grid.
1077Default value is 0.</p>
1078<table class="docutils field-list" frame="void" rules="none">
1079<col class="field-name" />
1080<col class="field-body" />
1081<tbody valign="top">
1082<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1083</tr>
1084</tbody>
1085</table>
1086</dd></dl>
1087
1088<dl class="attribute">
1089<dt id="ControlFile.ControlFile.format">
1090<code class="descname">format</code><a class="headerlink" href="#ControlFile.ControlFile.format" title="Permalink to this definition"></a></dt>
1091<dd><p>The format of the GRIB data. Default value is ‘GRIB1’.</p>
1092<table class="docutils field-list" frame="void" rules="none">
1093<col class="field-name" />
1094<col class="field-body" />
1095<tbody valign="top">
1096<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1097</tr>
1098</tbody>
1099</table>
1100</dd></dl>
1101
1102<dl class="attribute">
1103<dt id="ControlFile.ControlFile.addpar">
1104<code class="descname">addpar</code><a class="headerlink" href="#ControlFile.ControlFile.addpar" title="Permalink to this definition"></a></dt>
1105<dd><p>List of additional surface level ECMWF parameter to be retrieved.
1106Default value is None.</p>
1107<table class="docutils field-list" frame="void" rules="none">
1108<col class="field-name" />
1109<col class="field-body" />
1110<tbody valign="top">
1111<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1112</tr>
1113</tbody>
1114</table>
1115</dd></dl>
1116
1117<dl class="attribute">
1118<dt id="ControlFile.ControlFile.prefix">
1119<code class="descname">prefix</code><a class="headerlink" href="#ControlFile.ControlFile.prefix" title="Permalink to this definition"></a></dt>
1120<dd><p>Prefix string for the final FLEXPART/FLEXTRA ready input files.
1121Default value is ‘EN’.</p>
1122<table class="docutils field-list" frame="void" rules="none">
1123<col class="field-name" />
1124<col class="field-body" />
1125<tbody valign="top">
1126<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1127</tr>
1128</tbody>
1129</table>
1130</dd></dl>
1131
1132<dl class="attribute">
1133<dt id="ControlFile.ControlFile.cwc">
1134<code class="descname">cwc</code><a class="headerlink" href="#ControlFile.ControlFile.cwc" title="Permalink to this definition"></a></dt>
1135<dd><p>Switch to select wether the sum of cloud liquid water content and
1136cloud ice water content should be retrieved. Default value is 0.</p>
1137<table class="docutils field-list" frame="void" rules="none">
1138<col class="field-name" />
1139<col class="field-body" />
1140<tbody valign="top">
1141<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1142</tr>
1143</tbody>
1144</table>
1145</dd></dl>
1146
1147<dl class="attribute">
1148<dt id="ControlFile.ControlFile.wrf">
1149<code class="descname">wrf</code><a class="headerlink" href="#ControlFile.ControlFile.wrf" title="Permalink to this definition"></a></dt>
1150<dd><p>Switch to select further parameters for retrievment to support
1151WRF simulations. Default value is 0.</p>
1152<table class="docutils field-list" frame="void" rules="none">
1153<col class="field-name" />
1154<col class="field-body" />
1155<tbody valign="top">
1156<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1157</tr>
1158</tbody>
1159</table>
1160</dd></dl>
1161
1162<dl class="attribute">
1163<dt id="ControlFile.ControlFile.ecfsdir">
1164<code class="descname">ecfsdir</code><a class="headerlink" href="#ControlFile.ControlFile.ecfsdir" title="Permalink to this definition"></a></dt>
1165<dd><p>Path to the ECMWF storage  ‘ectmp:/${USER}/econdemand/’</p>
1166<table class="docutils field-list" frame="void" rules="none">
1167<col class="field-name" />
1168<col class="field-body" />
1169<tbody valign="top">
1170<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1171</tr>
1172</tbody>
1173</table>
1174</dd></dl>
1175
1176<dl class="attribute">
1177<dt id="ControlFile.ControlFile.mailfail">
1178<code class="descname">mailfail</code><a class="headerlink" href="#ControlFile.ControlFile.mailfail" title="Permalink to this definition"></a></dt>
1179<dd><p>Email list for sending error log files from ECMWF servers.
1180The email addresses should be seperated by a comma.
1181Default value is [‘${USER}’].</p>
1182<table class="docutils field-list" frame="void" rules="none">
1183<col class="field-name" />
1184<col class="field-body" />
1185<tbody valign="top">
1186<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of str</td>
1187</tr>
1188</tbody>
1189</table>
1190</dd></dl>
1191
1192<dl class="attribute">
1193<dt id="ControlFile.ControlFile.mailops">
1194<code class="descname">mailops</code><a class="headerlink" href="#ControlFile.ControlFile.mailops" title="Permalink to this definition"></a></dt>
1195<dd><p>Email list for sending operational log files from ECMWF servers.
1196The email addresses should be seperated by a comma.
1197Default value is [‘${USER}’].</p>
1198<table class="docutils field-list" frame="void" rules="none">
1199<col class="field-name" />
1200<col class="field-body" />
1201<tbody valign="top">
1202<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of str</td>
1203</tr>
1204</tbody>
1205</table>
1206</dd></dl>
1207
1208<dl class="attribute">
1209<dt id="ControlFile.ControlFile.grib2flexpart">
1210<code class="descname">grib2flexpart</code><a class="headerlink" href="#ControlFile.ControlFile.grib2flexpart" title="Permalink to this definition"></a></dt>
1211<dd><p>Switch to select generation of preprocessed FLEXPART files “.fp”.
1212If it is selected, the program grib2flexpart will try
1213to convert the flex_extract output files into “.fp” format.</p>
1214<table class="docutils field-list" frame="void" rules="none">
1215<col class="field-name" />
1216<col class="field-body" />
1217<tbody valign="top">
1218<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int 0</td>
1219</tr>
1220</tbody>
1221</table>
1222</dd></dl>
1223
1224<dl class="attribute">
1225<dt id="ControlFile.ControlFile.ecstorage">
1226<code class="descname">ecstorage</code><a class="headerlink" href="#ControlFile.ControlFile.ecstorage" title="Permalink to this definition"></a></dt>
1227<dd><p>Switch to select storage of FLEXPART ready output files
1228in the ECFS file system. Default value is 0.</p>
1229<table class="docutils field-list" frame="void" rules="none">
1230<col class="field-name" />
1231<col class="field-body" />
1232<tbody valign="top">
1233<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1234</tr>
1235</tbody>
1236</table>
1237</dd></dl>
1238
1239<dl class="attribute">
1240<dt id="ControlFile.ControlFile.ectrans">
1241<code class="descname">ectrans</code><a class="headerlink" href="#ControlFile.ControlFile.ectrans" title="Permalink to this definition"></a></dt>
1242<dd><p>Switch to select the transfer of FLEXPART ready output files
1243to the gateway server. Default value is 0.</p>
1244<table class="docutils field-list" frame="void" rules="none">
1245<col class="field-name" />
1246<col class="field-body" />
1247<tbody valign="top">
1248<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1249</tr>
1250</tbody>
1251</table>
1252</dd></dl>
1253
1254<dl class="attribute">
1255<dt id="ControlFile.ControlFile.inputdir">
1256<code class="descname">inputdir</code><a class="headerlink" href="#ControlFile.ControlFile.inputdir" title="Permalink to this definition"></a></dt>
1257<dd><p>Path to the temporary directory for the retrieval grib files and
1258other processing files. Default value is _config.PATH_INPUT_DIR.</p>
1259<table class="docutils field-list" frame="void" rules="none">
1260<col class="field-name" />
1261<col class="field-body" />
1262<tbody valign="top">
1263<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1264</tr>
1265</tbody>
1266</table>
1267</dd></dl>
1268
1269<dl class="attribute">
1270<dt id="ControlFile.ControlFile.outputdir">
1271<code class="descname">outputdir</code><a class="headerlink" href="#ControlFile.ControlFile.outputdir" title="Permalink to this definition"></a></dt>
1272<dd><p>Path to the final directory where the final FLEXPART ready input
1273files are stored. Default value is None.</p>
1274<table class="docutils field-list" frame="void" rules="none">
1275<col class="field-name" />
1276<col class="field-body" />
1277<tbody valign="top">
1278<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1279</tr>
1280</tbody>
1281</table>
1282</dd></dl>
1283
1284<dl class="attribute">
1285<dt id="ControlFile.ControlFile.flexextractdir">
1286<code class="descname">flexextractdir</code><a class="headerlink" href="#ControlFile.ControlFile.flexextractdir" title="Permalink to this definition"></a></dt>
1287<dd><p>Path to the flex_extract root directory. Default value is
1288_config.PATH_FLEXEXTRACT_DIR.</p>
1289<table class="docutils field-list" frame="void" rules="none">
1290<col class="field-name" />
1291<col class="field-body" />
1292<tbody valign="top">
1293<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1294</tr>
1295</tbody>
1296</table>
1297</dd></dl>
1298
1299<dl class="attribute">
1300<dt id="ControlFile.ControlFile.exedir">
1301<code class="descname">exedir</code><a class="headerlink" href="#ControlFile.ControlFile.exedir" title="Permalink to this definition"></a></dt>
1302<dd><p>Path to the FORTRAN executable file. Default value is
1303_config.PATH_FORTRAN_SRC.</p>
1304<table class="docutils field-list" frame="void" rules="none">
1305<col class="field-name" />
1306<col class="field-body" />
1307<tbody valign="top">
1308<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1309</tr>
1310</tbody>
1311</table>
1312</dd></dl>
1313
1314<dl class="attribute">
1315<dt id="ControlFile.ControlFile.installdir">
1316<code class="descname">installdir</code><a class="headerlink" href="#ControlFile.ControlFile.installdir" title="Permalink to this definition"></a></dt>
1317<dd><p>Path to a FLEXPART root directory. Default value is None.</p>
1318<table class="docutils field-list" frame="void" rules="none">
1319<col class="field-name" />
1320<col class="field-body" />
1321<tbody valign="top">
1322<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1323</tr>
1324</tbody>
1325</table>
1326</dd></dl>
1327
1328<dl class="attribute">
1329<dt id="ControlFile.ControlFile.makefile">
1330<code class="descname">makefile</code><a class="headerlink" href="#ControlFile.ControlFile.makefile" title="Permalink to this definition"></a></dt>
1331<dd><p>Name of the makefile to be used for the Fortran program.
1332Default value is ‘Makefile.gfortran’.</p>
1333<table class="docutils field-list" frame="void" rules="none">
1334<col class="field-name" />
1335<col class="field-body" />
1336<tbody valign="top">
1337<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1338</tr>
1339</tbody>
1340</table>
1341</dd></dl>
1342
1343<dl class="attribute">
1344<dt id="ControlFile.ControlFile.destination">
1345<code class="descname">destination</code><a class="headerlink" href="#ControlFile.ControlFile.destination" title="Permalink to this definition"></a></dt>
1346<dd><p>The remote destination which is used to transfer files
1347from ECMWF server to local gateway server. Default value is None.</p>
1348<table class="docutils field-list" frame="void" rules="none">
1349<col class="field-name" />
1350<col class="field-body" />
1351<tbody valign="top">
1352<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1353</tr>
1354</tbody>
1355</table>
1356</dd></dl>
1357
1358<dl class="attribute">
1359<dt id="ControlFile.ControlFile.gateway">
1360<code class="descname">gateway</code><a class="headerlink" href="#ControlFile.ControlFile.gateway" title="Permalink to this definition"></a></dt>
1361<dd><p>The gateway server the user is using. Default value is None.</p>
1362<table class="docutils field-list" frame="void" rules="none">
1363<col class="field-name" />
1364<col class="field-body" />
1365<tbody valign="top">
1366<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1367</tr>
1368</tbody>
1369</table>
1370</dd></dl>
1371
1372<dl class="attribute">
1373<dt id="ControlFile.ControlFile.ecuid">
1374<code class="descname">ecuid</code><a class="headerlink" href="#ControlFile.ControlFile.ecuid" title="Permalink to this definition"></a></dt>
1375<dd><p>The user id on ECMWF server. Default value is None.</p>
1376<table class="docutils field-list" frame="void" rules="none">
1377<col class="field-name" />
1378<col class="field-body" />
1379<tbody valign="top">
1380<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1381</tr>
1382</tbody>
1383</table>
1384</dd></dl>
1385
1386<dl class="attribute">
1387<dt id="ControlFile.ControlFile.ecgid">
1388<code class="descname">ecgid</code><a class="headerlink" href="#ControlFile.ControlFile.ecgid" title="Permalink to this definition"></a></dt>
1389<dd><p>The group id on ECMWF server. Default value is None.</p>
1390<table class="docutils field-list" frame="void" rules="none">
1391<col class="field-name" />
1392<col class="field-body" />
1393<tbody valign="top">
1394<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1395</tr>
1396</tbody>
1397</table>
1398</dd></dl>
1399
1400<dl class="attribute">
1401<dt id="ControlFile.ControlFile.install_target">
1402<code class="descname">install_target</code><a class="headerlink" href="#ControlFile.ControlFile.install_target" title="Permalink to this definition"></a></dt>
1403<dd><p>Defines the location where the installation is to be done.
1404Default value is None.</p>
1405<table class="docutils field-list" frame="void" rules="none">
1406<col class="field-name" />
1407<col class="field-body" />
1408<tbody valign="top">
1409<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1410</tr>
1411</tbody>
1412</table>
1413</dd></dl>
1414
1415<dl class="attribute">
1416<dt id="ControlFile.ControlFile.debug">
1417<code class="descname">debug</code><a class="headerlink" href="#ControlFile.ControlFile.debug" title="Permalink to this definition"></a></dt>
1418<dd><p>Switch to keep temporary files at the end of postprocessing (1) or
1419to delete all temporary files except the final output files (0).
1420Default value is 0.</p>
1421<table class="docutils field-list" frame="void" rules="none">
1422<col class="field-name" />
1423<col class="field-body" />
1424<tbody valign="top">
1425<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1426</tr>
1427</tbody>
1428</table>
1429</dd></dl>
1430
1431<dl class="attribute">
1432<dt id="ControlFile.ControlFile.oper">
1433<code class="descname">oper</code><a class="headerlink" href="#ControlFile.ControlFile.oper" title="Permalink to this definition"></a></dt>
1434<dd><p>Switch to prepare the operational job script. Start date, end date and
1435basetime will be prepared with environment variables.
1436Default value is 0.</p>
1437<table class="docutils field-list" frame="void" rules="none">
1438<col class="field-name" />
1439<col class="field-body" />
1440<tbody valign="top">
1441<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1442</tr>
1443</tbody>
1444</table>
1445</dd></dl>
1446
1447<dl class="attribute">
1448<dt id="ControlFile.ControlFile.request">
1449<code class="descname">request</code><a class="headerlink" href="#ControlFile.ControlFile.request" title="Permalink to this definition"></a></dt>
1450<dd><p>Switch to select between just retrieving the data (0), writing the mars
1451parameter values to a csv file (1) or doing both (2).
1452Default value is 0.</p>
1453<table class="docutils field-list" frame="void" rules="none">
1454<col class="field-name" />
1455<col class="field-body" />
1456<tbody valign="top">
1457<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1458</tr>
1459</tbody>
1460</table>
1461</dd></dl>
1462
1463<dl class="attribute">
1464<dt id="ControlFile.ControlFile.public">
1465<code class="descname">public</code><a class="headerlink" href="#ControlFile.ControlFile.public" title="Permalink to this definition"></a></dt>
1466<dd><p>Switch to select kind of ECMWF Web Api access and the
1467possible data sets. Public data sets (1) and Memberstate data sets (0).
1468Default value is 0.</p>
1469<table class="docutils field-list" frame="void" rules="none">
1470<col class="field-name" />
1471<col class="field-body" />
1472<tbody valign="top">
1473<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1474</tr>
1475</tbody>
1476</table>
1477</dd></dl>
1478
1479<dl class="attribute">
1480<dt id="ControlFile.ControlFile.ec_api">
1481<code class="descname">ec_api</code><a class="headerlink" href="#ControlFile.ControlFile.ec_api" title="Permalink to this definition"></a></dt>
1482<dd><p>Tells wether the ECMWF Web API was able to load or not.
1483Default value is None.</p>
1484<table class="docutils field-list" frame="void" rules="none">
1485<col class="field-name" />
1486<col class="field-body" />
1487<tbody valign="top">
1488<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">boolean</td>
1489</tr>
1490</tbody>
1491</table>
1492</dd></dl>
1493
1494<dl class="attribute">
1495<dt id="ControlFile.ControlFile.cds_api">
1496<code class="descname">cds_api</code><a class="headerlink" href="#ControlFile.ControlFile.cds_api" title="Permalink to this definition"></a></dt>
1497<dd><p>Tells wether the CDS API was able to load or not.
1498Default value is None.</p>
1499<table class="docutils field-list" frame="void" rules="none">
1500<col class="field-name" />
1501<col class="field-body" />
1502<tbody valign="top">
1503<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">boolean</td>
1504</tr>
1505</tbody>
1506</table>
1507</dd></dl>
1508
1509<dl class="attribute">
1510<dt id="ControlFile.ControlFile.purefc">
1511<code class="descname">purefc</code><a class="headerlink" href="#ControlFile.ControlFile.purefc" title="Permalink to this definition"></a></dt>
1512<dd><p>Switch to decide wether the job is a pure forecast retrieval or
1513coupled with analysis data. Default value is 0.</p>
1514<table class="docutils field-list" frame="void" rules="none">
1515<col class="field-name" />
1516<col class="field-body" />
1517<tbody valign="top">
1518<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1519</tr>
1520</tbody>
1521</table>
1522</dd></dl>
1523
1524<dl class="attribute">
1525<dt id="ControlFile.ControlFile.rrint">
1526<code class="descname">rrint</code><a class="headerlink" href="#ControlFile.ControlFile.rrint" title="Permalink to this definition"></a></dt>
1527<dd><p>Switch to select between old precipitation disaggregation method (0)
1528or the new IA3 disaggegration method (1). Default value is 0.</p>
1529<table class="docutils field-list" frame="void" rules="none">
1530<col class="field-name" />
1531<col class="field-body" />
1532<tbody valign="top">
1533<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1534</tr>
1535</tbody>
1536</table>
1537</dd></dl>
1538
1539<dl class="attribute">
1540<dt id="ControlFile.ControlFile.doubleelda">
1541<code class="descname">doubleelda</code><a class="headerlink" href="#ControlFile.ControlFile.doubleelda" title="Permalink to this definition"></a></dt>
1542<dd><p>Switch to select the calculation of extra ensemble members for the
1543ELDA stream. It doubles the amount of retrieved ensemble members.</p>
1544<table class="docutils field-list" frame="void" rules="none">
1545<col class="field-name" />
1546<col class="field-body" />
1547<tbody valign="top">
1548<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1549</tr>
1550</tbody>
1551</table>
1552</dd></dl>
1553
1554<dl class="attribute">
1555<dt id="ControlFile.ControlFile.logicals">
1556<code class="descname">logicals</code><a class="headerlink" href="#ControlFile.ControlFile.logicals" title="Permalink to this definition"></a></dt>
1557<dd><p>List of the names of logical switches which controls the flow
1558of the program. Default list is [‘gauss’, ‘omega’, ‘omegadiff’, ‘eta’,
1559‘etadiff’, ‘dpdeta’, ‘cwc’, ‘wrf’, ‘grib2flexpart’, ‘ecstorage’,
1560‘ectrans’, ‘debug’, ‘request’, ‘public’, ‘purefc’, ‘rrint’, ‘doubleelda’]</p>
1561<table class="docutils field-list" frame="void" rules="none">
1562<col class="field-name" />
1563<col class="field-body" />
1564<tbody valign="top">
1565<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of str</td>
1566</tr>
1567</tbody>
1568</table>
1569</dd></dl>
1570
1571<dl class="method">
1572<dt id="ControlFile.ControlFile.assign_args_to_control">
1573<code class="descname">assign_args_to_control</code><span class="sig-paren">(</span><em>args</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/ControlFile.html#ControlFile.assign_args_to_control"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.assign_args_to_control" title="Permalink to this definition"></a></dt>
1574<dd><p>Overwrites the existing ControlFile instance attributes with
1575the command line arguments.</p>
1576<table class="docutils field-list" frame="void" rules="none">
1577<col class="field-name" />
1578<col class="field-body" />
1579<tbody valign="top">
1580<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>args</strong> (<em>Namespace</em>) – Contains the commandline arguments from script/program call.</td>
1581</tr>
1582</tbody>
1583</table>
1584</dd></dl>
1585
1586<dl class="method">
1587<dt id="ControlFile.ControlFile.assign_envs_to_control">
1588<code class="descname">assign_envs_to_control</code><span class="sig-paren">(</span><em>envs</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/ControlFile.html#ControlFile.assign_envs_to_control"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.assign_envs_to_control" title="Permalink to this definition"></a></dt>
1589<dd><p>Assigns the ECMWF environment parameter.</p>
1590<table class="docutils field-list" frame="void" rules="none">
1591<col class="field-name" />
1592<col class="field-body" />
1593<tbody valign="top">
1594<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>envs</strong> (<em>dict of str</em>) – Contains the ECMWF environment parameternames “ECUID”, “ECGID”,
1595“DESTINATION” and “GATEWAY” with its corresponding values.
1596They were read from the file “ECMWF_ENV”.</td>
1597</tr>
1598</tbody>
1599</table>
1600</dd></dl>
1601
1602<dl class="method">
1603<dt id="ControlFile.ControlFile.check_conditions">
1604<code class="descname">check_conditions</code><span class="sig-paren">(</span><em>queue</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/ControlFile.html#ControlFile.check_conditions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.check_conditions" title="Permalink to this definition"></a></dt>
1605<dd><p>Checks a couple of necessary attributes and conditions,
1606such as if they exist and contain values.
1607Otherwise set default values.</p>
1608<table class="docutils field-list" frame="void" rules="none">
1609<col class="field-name" />
1610<col class="field-body" />
1611<tbody valign="top">
1612<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>queue</strong> (<em>str</em>) – Name of the queue if submitted to the ECMWF servers.
1613Used to check if ecuid, ecgid, gateway and destination
1614are set correctly and are not empty.</td>
1615</tr>
1616</tbody>
1617</table>
1618</dd></dl>
1619
1620<dl class="method">
1621<dt id="ControlFile.ControlFile.to_list">
1622<code class="descname">to_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/ControlFile.html#ControlFile.to_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.to_list" title="Permalink to this definition"></a></dt>
1623<dd><p>Just generates a list of strings containing the attributes and
1624assigned values except the attributes “_expanded”, “exedir”,
1625“flexextractdir” and “installdir”.</p>
1626<table class="docutils field-list" frame="void" rules="none">
1627<col class="field-name" />
1628<col class="field-body" />
1629<tbody valign="top">
1630<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>l</strong> – A sorted list of the all ControlFile class attributes with
1631their values except the attributes “_expanded”, “exedir”,
1632“flexextractdir” and “installdir”.</td>
1633</tr>
1634<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list of *</td>
1635</tr>
1636</tbody>
1637</table>
1638</dd></dl>
1639
1640</dd></dl>
1641
1642</div>
1643<div class="section" id="module-EcFlexpart">
1644<span id="ecflexpart"></span><h3><a class="toc-backref" href="#id6">EcFlexpart</a><a class="headerlink" href="#module-EcFlexpart" title="Permalink to this headline"></a></h3>
1645<dl class="class">
1646<dt id="EcFlexpart.EcFlexpart">
1647<em class="property">class </em><code class="descclassname">EcFlexpart.</code><code class="descname">EcFlexpart</code><span class="sig-paren">(</span><em>c</em>, <em>fluxes=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/EcFlexpart.html#EcFlexpart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart" title="Permalink to this definition"></a></dt>
1648<dd><p>Class to represent FLEXPART specific ECMWF data.</p>
1649<p>FLEXPART needs grib files in a specifc format. All necessary data fields
1650for one time step are stored in a single file. The class represents an
1651instance with all the parameter and settings necessary for retrieving
1652MARS data and modifing them so they are fitting FLEXPART needs. The class
1653is able to disaggregate the fluxes and convert grid types to the one needed
1654by FLEXPART, therefore using the FORTRAN program.</p>
1655<dl class="attribute">
1656<dt id="EcFlexpart.EcFlexpart.mreq_count">
1657<code class="descname">mreq_count</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.mreq_count" title="Permalink to this definition"></a></dt>
1658<dd><p>Counter for the number of generated mars requests.</p>
1659<table class="docutils field-list" frame="void" rules="none">
1660<col class="field-name" />
1661<col class="field-body" />
1662<tbody valign="top">
1663<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1664</tr>
1665</tbody>
1666</table>
1667</dd></dl>
1668
1669<dl class="attribute">
1670<dt id="EcFlexpart.EcFlexpart.inputdir">
1671<code class="descname">inputdir</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.inputdir" title="Permalink to this definition"></a></dt>
1672<dd><p>Path to the directory where the retrieved data is stored.</p>
1673<table class="docutils field-list" frame="void" rules="none">
1674<col class="field-name" />
1675<col class="field-body" />
1676<tbody valign="top">
1677<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1678</tr>
1679</tbody>
1680</table>
1681</dd></dl>
1682
1683<dl class="attribute">
1684<dt id="EcFlexpart.EcFlexpart.dataset">
1685<code class="descname">dataset</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.dataset" title="Permalink to this definition"></a></dt>
1686<dd><p>For public datasets there is the specific naming and parameter
1687dataset which has to be used to characterize the type of
1688data.</p>
1689<table class="docutils field-list" frame="void" rules="none">
1690<col class="field-name" />
1691<col class="field-body" />
1692<tbody valign="top">
1693<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1694</tr>
1695</tbody>
1696</table>
1697</dd></dl>
1698
1699<dl class="attribute">
1700<dt id="EcFlexpart.EcFlexpart.basetime">
1701<code class="descname">basetime</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.basetime" title="Permalink to this definition"></a></dt>
1702<dd><p>The time for a half day retrieval. The 12 hours upfront are to be
1703retrieved.</p>
1704<table class="docutils field-list" frame="void" rules="none">
1705<col class="field-name" />
1706<col class="field-body" />
1707<tbody valign="top">
1708<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1709</tr>
1710</tbody>
1711</table>
1712</dd></dl>
1713
1714<dl class="attribute">
1715<dt id="EcFlexpart.EcFlexpart.dtime">
1716<code class="descname">dtime</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.dtime" title="Permalink to this definition"></a></dt>
1717<dd><p>Time step in hours.</p>
1718<table class="docutils field-list" frame="void" rules="none">
1719<col class="field-name" />
1720<col class="field-body" />
1721<tbody valign="top">
1722<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1723</tr>
1724</tbody>
1725</table>
1726</dd></dl>
1727
1728<dl class="attribute">
1729<dt id="EcFlexpart.EcFlexpart.acctype">
1730<code class="descname">acctype</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.acctype" title="Permalink to this definition"></a></dt>
1731<dd><p>The field type for the accumulated forecast fields.</p>
1732<table class="docutils field-list" frame="void" rules="none">
1733<col class="field-name" />
1734<col class="field-body" />
1735<tbody valign="top">
1736<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1737</tr>
1738</tbody>
1739</table>
1740</dd></dl>
1741
1742<dl class="attribute">
1743<dt id="EcFlexpart.EcFlexpart.acctime">
1744<code class="descname">acctime</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.acctime" title="Permalink to this definition"></a></dt>
1745<dd><p>The starting time from the accumulated forecasts.</p>
1746<table class="docutils field-list" frame="void" rules="none">
1747<col class="field-name" />
1748<col class="field-body" />
1749<tbody valign="top">
1750<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1751</tr>
1752</tbody>
1753</table>
1754</dd></dl>
1755
1756<dl class="attribute">
1757<dt id="EcFlexpart.EcFlexpart.accmaxstep">
1758<code class="descname">accmaxstep</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.accmaxstep" title="Permalink to this definition"></a></dt>
1759<dd><p>The maximum forecast step for the accumulated forecast fields.</p>
1760<table class="docutils field-list" frame="void" rules="none">
1761<col class="field-name" />
1762<col class="field-body" />
1763<tbody valign="top">
1764<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1765</tr>
1766</tbody>
1767</table>
1768</dd></dl>
1769
1770<dl class="attribute">
1771<dt id="EcFlexpart.EcFlexpart.marsclass">
1772<code class="descname">marsclass</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.marsclass" title="Permalink to this definition"></a></dt>
1773<dd><p>Characterisation of dataset.</p>
1774<table class="docutils field-list" frame="void" rules="none">
1775<col class="field-name" />
1776<col class="field-body" />
1777<tbody valign="top">
1778<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1779</tr>
1780</tbody>
1781</table>
1782</dd></dl>
1783
1784<dl class="attribute">
1785<dt id="EcFlexpart.EcFlexpart.stream">
1786<code class="descname">stream</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.stream" title="Permalink to this definition"></a></dt>
1787<dd><p>Identifies the forecasting system used to generate the data.</p>
1788<table class="docutils field-list" frame="void" rules="none">
1789<col class="field-name" />
1790<col class="field-body" />
1791<tbody valign="top">
1792<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1793</tr>
1794</tbody>
1795</table>
1796</dd></dl>
1797
1798<dl class="attribute">
1799<dt id="EcFlexpart.EcFlexpart.number">
1800<code class="descname">number</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.number" title="Permalink to this definition"></a></dt>
1801<dd><p>Selects the member in ensemble forecast run.</p>
1802<table class="docutils field-list" frame="void" rules="none">
1803<col class="field-name" />
1804<col class="field-body" />
1805<tbody valign="top">
1806<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1807</tr>
1808</tbody>
1809</table>
1810</dd></dl>
1811
1812<dl class="attribute">
1813<dt id="EcFlexpart.EcFlexpart.resol">
1814<code class="descname">resol</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.resol" title="Permalink to this definition"></a></dt>
1815<dd><p>Specifies the desired triangular truncation of retrieved data,
1816before carrying out any other selected post-processing.</p>
1817<table class="docutils field-list" frame="void" rules="none">
1818<col class="field-name" />
1819<col class="field-body" />
1820<tbody valign="top">
1821<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1822</tr>
1823</tbody>
1824</table>
1825</dd></dl>
1826
1827<dl class="attribute">
1828<dt id="EcFlexpart.EcFlexpart.accuracy">
1829<code class="descname">accuracy</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.accuracy" title="Permalink to this definition"></a></dt>
1830<dd><p>Specifies the number of bits per value to be used in the
1831generated GRIB coded fields.</p>
1832<table class="docutils field-list" frame="void" rules="none">
1833<col class="field-name" />
1834<col class="field-body" />
1835<tbody valign="top">
1836<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1837</tr>
1838</tbody>
1839</table>
1840</dd></dl>
1841
1842<dl class="attribute">
1843<dt id="EcFlexpart.EcFlexpart.addpar">
1844<code class="descname">addpar</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.addpar" title="Permalink to this definition"></a></dt>
1845<dd><p>List of additional parameters to be retrieved.</p>
1846<table class="docutils field-list" frame="void" rules="none">
1847<col class="field-name" />
1848<col class="field-body" />
1849<tbody valign="top">
1850<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1851</tr>
1852</tbody>
1853</table>
1854</dd></dl>
1855
1856<dl class="attribute">
1857<dt id="EcFlexpart.EcFlexpart.level">
1858<code class="descname">level</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.level" title="Permalink to this definition"></a></dt>
1859<dd><p>Specifies the maximum level.</p>
1860<table class="docutils field-list" frame="void" rules="none">
1861<col class="field-name" />
1862<col class="field-body" />
1863<tbody valign="top">
1864<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1865</tr>
1866</tbody>
1867</table>
1868</dd></dl>
1869
1870<dl class="attribute">
1871<dt id="EcFlexpart.EcFlexpart.expver">
1872<code class="descname">expver</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.expver" title="Permalink to this definition"></a></dt>
1873<dd><p>The version of the dataset.</p>
1874<table class="docutils field-list" frame="void" rules="none">
1875<col class="field-name" />
1876<col class="field-body" />
1877<tbody valign="top">
1878<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1879</tr>
1880</tbody>
1881</table>
1882</dd></dl>
1883
1884<dl class="attribute">
1885<dt id="EcFlexpart.EcFlexpart.levelist">
1886<code class="descname">levelist</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.levelist" title="Permalink to this definition"></a></dt>
1887<dd><p>Specifies the required levels.</p>
1888<table class="docutils field-list" frame="void" rules="none">
1889<col class="field-name" />
1890<col class="field-body" />
1891<tbody valign="top">
1892<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1893</tr>
1894</tbody>
1895</table>
1896</dd></dl>
1897
1898<dl class="attribute">
1899<dt id="EcFlexpart.EcFlexpart.glevelist">
1900<code class="descname">glevelist</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.glevelist" title="Permalink to this definition"></a></dt>
1901<dd><p>Specifies the required levels for gaussian grids.</p>
1902<table class="docutils field-list" frame="void" rules="none">
1903<col class="field-name" />
1904<col class="field-body" />
1905<tbody valign="top">
1906<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1907</tr>
1908</tbody>
1909</table>
1910</dd></dl>
1911
1912<dl class="attribute">
1913<dt id="EcFlexpart.EcFlexpart.gaussian">
1914<code class="descname">gaussian</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.gaussian" title="Permalink to this definition"></a></dt>
1915<dd><p>This parameter is deprecated and should no longer be used.
1916Specifies the desired type of Gaussian grid for the output.</p>
1917<table class="docutils field-list" frame="void" rules="none">
1918<col class="field-name" />
1919<col class="field-body" />
1920<tbody valign="top">
1921<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1922</tr>
1923</tbody>
1924</table>
1925</dd></dl>
1926
1927<dl class="attribute">
1928<dt id="EcFlexpart.EcFlexpart.grid">
1929<code class="descname">grid</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.grid" title="Permalink to this definition"></a></dt>
1930<dd><p>Specifies the output grid which can be either a Gaussian grid
1931or a Latitude/Longitude grid.</p>
1932<table class="docutils field-list" frame="void" rules="none">
1933<col class="field-name" />
1934<col class="field-body" />
1935<tbody valign="top">
1936<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1937</tr>
1938</tbody>
1939</table>
1940</dd></dl>
1941
1942<dl class="attribute">
1943<dt id="EcFlexpart.EcFlexpart.area">
1944<code class="descname">area</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.area" title="Permalink to this definition"></a></dt>
1945<dd><p>Specifies the desired sub-area of data to be extracted.</p>
1946<table class="docutils field-list" frame="void" rules="none">
1947<col class="field-name" />
1948<col class="field-body" />
1949<tbody valign="top">
1950<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
1951</tr>
1952</tbody>
1953</table>
1954</dd></dl>
1955
1956<dl class="attribute">
1957<dt id="EcFlexpart.EcFlexpart.purefc">
1958<code class="descname">purefc</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.purefc" title="Permalink to this definition"></a></dt>
1959<dd><p>Switch for definition of pure forecast mode or not.</p>
1960<table class="docutils field-list" frame="void" rules="none">
1961<col class="field-name" />
1962<col class="field-body" />
1963<tbody valign="top">
1964<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
1965</tr>
1966</tbody>
1967</table>
1968</dd></dl>
1969
1970<dl class="attribute">
1971<dt id="EcFlexpart.EcFlexpart.outputfilelist">
1972<code class="descname">outputfilelist</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.outputfilelist" title="Permalink to this definition"></a></dt>
1973<dd><p>The final list of FLEXPART ready input files.</p>
1974<table class="docutils field-list" frame="void" rules="none">
1975<col class="field-name" />
1976<col class="field-body" />
1977<tbody valign="top">
1978<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of str</td>
1979</tr>
1980</tbody>
1981</table>
1982</dd></dl>
1983
1984<dl class="attribute">
1985<dt id="EcFlexpart.EcFlexpart.types">
1986<code class="descname">types</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.types" title="Permalink to this definition"></a></dt>
1987<dd><p>Determines the combination of type of fields, time and forecast step
1988to be retrieved.</p>
1989<table class="docutils field-list" frame="void" rules="none">
1990<col class="field-name" />
1991<col class="field-body" />
1992<tbody valign="top">
1993<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">dictionary</td>
1994</tr>
1995</tbody>
1996</table>
1997</dd></dl>
1998
1999<dl class="attribute">
2000<dt id="EcFlexpart.EcFlexpart.params">
2001<code class="descname">params</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.params" title="Permalink to this definition"></a></dt>
2002<dd><p>Collection of grid types and their corresponding parameters,
2003levels, level types and the grid definition.</p>
2004<table class="docutils field-list" frame="void" rules="none">
2005<col class="field-name" />
2006<col class="field-body" />
2007<tbody valign="top">
2008<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">dictionary</td>
2009</tr>
2010</tbody>
2011</table>
2012</dd></dl>
2013
2014<dl class="attribute">
2015<dt id="EcFlexpart.EcFlexpart.server">
2016<code class="descname">server</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.server" title="Permalink to this definition"></a></dt>
2017<dd><p>This is the connection to the ECMWF data servers.</p>
2018<table class="docutils field-list" frame="void" rules="none">
2019<col class="field-name" />
2020<col class="field-body" />
2021<tbody valign="top">
2022<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">ECMWFService or ECMWFDataServer</td>
2023</tr>
2024</tbody>
2025</table>
2026</dd></dl>
2027
2028<dl class="attribute">
2029<dt id="EcFlexpart.EcFlexpart.public">
2030<code class="descname">public</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.public" title="Permalink to this definition"></a></dt>
2031<dd><p>Decides which Web API Server version is used.</p>
2032<table class="docutils field-list" frame="void" rules="none">
2033<col class="field-name" />
2034<col class="field-body" />
2035<tbody valign="top">
2036<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
2037</tr>
2038</tbody>
2039</table>
2040</dd></dl>
2041
2042<dl class="attribute">
2043<dt id="EcFlexpart.EcFlexpart.dates">
2044<code class="descname">dates</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.dates" title="Permalink to this definition"></a></dt>
2045<dd><p>Contains start and end date of the retrieval in the format
2046“YYYYMMDD/to/YYYYMMDD”</p>
2047<table class="docutils field-list" frame="void" rules="none">
2048<col class="field-name" />
2049<col class="field-body" />
2050<tbody valign="top">
2051<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
2052</tr>
2053</tbody>
2054</table>
2055</dd></dl>
2056
2057<dl class="method">
2058<dt id="EcFlexpart.EcFlexpart.calc_extra_elda">
2059<code class="descname">calc_extra_elda</code><span class="sig-paren">(</span><em>path</em>, <em>prefix</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/EcFlexpart.html#EcFlexpart.calc_extra_elda"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.calc_extra_elda" title="Permalink to this definition"></a></dt>
2060<dd><p>Calculates extra ensemble members for ELDA - Stream.</p>
2061<p>This is a specific feature which doubles the number of ensemble members
2062for the ELDA Stream.</p>
2063<table class="docutils field-list" frame="void" rules="none">
2064<col class="field-name" />
2065<col class="field-body" />
2066<tbody valign="top">
2067<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2068<li><strong>path</strong> (<em>str</em>) – Path to the output files.</li>
2069<li><strong>prefix</strong> (<em>str</em>) – The prefix of the output filenames as defined in Control file.</li>
2070</ul>
2071</td>
2072</tr>
2073</tbody>
2074</table>
2075</dd></dl>
2076
2077<dl class="method">
2078<dt id="EcFlexpart.EcFlexpart.create">
2079<code class="descname">create</code><span class="sig-paren">(</span><em>inputfiles</em>, <em>c</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/EcFlexpart.html#EcFlexpart.create"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.create" title="Permalink to this definition"></a></dt>
2080<dd><p>An index file will be created which depends on the combination
2081of “date”, “time” and “stepRange” values. This is used to iterate
2082over all messages in each grib file which were passed through the
2083parameter “inputfiles” to seperate specific parameters into fort.*
2084files. Afterwards the FORTRAN program is called to convert
2085the data fields all to the same grid and put them in one file
2086per unique time step (combination of “date”, “time” and
2087“stepRange”).</p>
2088<div class="admonition note">
2089<p class="first admonition-title">Note</p>
2090<p class="last">This method is based on the ECMWF example index.py
2091<a class="reference external" href="https://software.ecmwf.int/wiki/display/GRIB/index.py">https://software.ecmwf.int/wiki/display/GRIB/index.py</a></p>
2092</div>
2093<table class="docutils field-list" frame="void" rules="none">
2094<col class="field-name" />
2095<col class="field-body" />
2096<tbody valign="top">
2097<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2098<li><strong>inputfiles</strong> (<a class="reference internal" href="#UioFiles.UioFiles" title="UioFiles.UioFiles"><em>UioFiles</em></a>) – Contains a list of files.</li>
2099<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
2100command line.</li>
2101</ul>
2102</td>
2103</tr>
2104</tbody>
2105</table>
2106</dd></dl>
2107
2108<dl class="method">
2109<dt id="EcFlexpart.EcFlexpart.deacc_fluxes">
2110<code class="descname">deacc_fluxes</code><span class="sig-paren">(</span><em>inputfiles</em>, <em>c</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/EcFlexpart.html#EcFlexpart.deacc_fluxes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.deacc_fluxes" title="Permalink to this definition"></a></dt>
2111<dd><p>De-accumulate and disaggregate flux data.</p>
2112<p>Goes through all flux fields in ordered time and de-accumulate
2113the fields. Afterwards the fields are disaggregated in time.
2114Different versions of disaggregation is provided for rainfall
2115data (darain, modified linear) and the surface fluxes and
2116stress data (dapoly, cubic polynomial).</p>
2117<table class="docutils field-list" frame="void" rules="none">
2118<col class="field-name" />
2119<col class="field-body" />
2120<tbody valign="top">
2121<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2122<li><strong>inputfiles</strong> (<a class="reference internal" href="#UioFiles.UioFiles" title="UioFiles.UioFiles"><em>UioFiles</em></a>) – Contains the list of files that contain flux data.</li>
2123<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
2124command line.</li>
2125</ul>
2126</td>
2127</tr>
2128</tbody>
2129</table>
2130</dd></dl>
2131
2132<dl class="method">
2133<dt id="EcFlexpart.EcFlexpart.process_output">
2134<code class="descname">process_output</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/EcFlexpart.html#EcFlexpart.process_output"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.process_output" title="Permalink to this definition"></a></dt>
2135<dd><p>Postprocessing of FLEXPART input files.</p>
2136<p>The grib files are postprocessed depending on the selection in
2137CONTROL file. The resulting files are moved to the output
2138directory if its not equal to the input directory.
2139The following modifications might be done if
2140properly switched in CONTROL file:
2141GRIB2 - Conversion to GRIB2
2142ECTRANS - Transfer of files to gateway server
2143ECSTORAGE - Storage at ECMWF server</p>
2144<table class="docutils field-list" frame="void" rules="none">
2145<col class="field-name" />
2146<col class="field-body" />
2147<tbody valign="top">
2148<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
2149command line.</td>
2150</tr>
2151</tbody>
2152</table>
2153</dd></dl>
2154
2155<dl class="method">
2156<dt id="EcFlexpart.EcFlexpart.retrieve">
2157<code class="descname">retrieve</code><span class="sig-paren">(</span><em>server</em>, <em>dates</em>, <em>public</em>, <em>request</em>, <em>inputdir='.'</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/EcFlexpart.html#EcFlexpart.retrieve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.retrieve" title="Permalink to this definition"></a></dt>
2158<dd><p>Finalizing the retrieval information by setting final details
2159depending on grid type.
2160Prepares MARS retrievals per grid type and submits them.</p>
2161<table class="docutils field-list" frame="void" rules="none">
2162<col class="field-name" />
2163<col class="field-body" />
2164<tbody valign="top">
2165<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2166<li><strong>server</strong> (<em>ECMWFService</em><em> or </em><em>ECMWFDataServer</em>) – The connection to the ECMWF server. This is different
2167for member state users which have full access and non
2168member state users which have only access to the public
2169data sets. The decision is made from command line argument
2170“public”; for public access its True (ECMWFDataServer)
2171for member state users its False (ECMWFService)</li>
2172<li><strong>dates</strong> (<em>str</em>) – Contains start and end date of the retrieval in the format
2173“YYYYMMDD/to/YYYYMMDD”</li>
2174<li><strong>request</strong> (<em>int</em>) – Selects the mode of retrieval.
21750: Retrieves the data from ECMWF.
21761: Prints the mars requests to an output file.
21772: Retrieves the data and prints the mars request.</li>
2178<li><strong>inputdir</strong> (<em>str</em><em>, </em><em>optional</em>) – Path to the directory where the retrieved data is about
2179to be stored. The default is the current directory (‘.’).</li>
2180</ul>
2181</td>
2182</tr>
2183</tbody>
2184</table>
2185</dd></dl>
2186
2187<dl class="method">
2188<dt id="EcFlexpart.EcFlexpart.write_namelist">
2189<code class="descname">write_namelist</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/EcFlexpart.html#EcFlexpart.write_namelist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.write_namelist" title="Permalink to this definition"></a></dt>
2190<dd><p>Creates a namelist file in the temporary directory and writes
2191the following values to it: maxl, maxb, mlevel,
2192mlevelist, mnauf, metapar, rlo0, rlo1, rla0, rla1,
2193momega, momegadiff, mgauss, msmooth, meta, metadiff, mdpdeta</p>
2194<table class="docutils field-list" frame="void" rules="none">
2195<col class="field-name" />
2196<col class="field-body" />
2197<tbody valign="top">
2198<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2199<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
2200command line.</li>
2201<li><strong>filename</strong> (<em>str</em>) – Name of the namelist file.</li>
2202</ul>
2203</td>
2204</tr>
2205</tbody>
2206</table>
2207</dd></dl>
2208
2209</dd></dl>
2210
2211</div>
2212<div class="section" id="module-GribUtil">
2213<span id="gributil"></span><h3><a class="toc-backref" href="#id7">GribUtil</a><a class="headerlink" href="#module-GribUtil" title="Permalink to this headline"></a></h3>
2214<dl class="class">
2215<dt id="GribUtil.GribUtil">
2216<em class="property">class </em><code class="descclassname">GribUtil.</code><code class="descname">GribUtil</code><span class="sig-paren">(</span><em>filenames</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/GribUtil.html#GribUtil"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribUtil.GribUtil" title="Permalink to this definition"></a></dt>
2217<dd><p>Class for GRIB utilities (new methods) based on GRIB API</p>
2218<p>The GRIB API provides all necessary tools to work directly with the
2219grib files. Nevertheless, the GRIB API tools are very basic and are in
2220direct connection with the grib files. This class provides some higher
2221functions which apply a set of GRIB API tools together in the respective
2222context. So, the class initially contains a list of grib files (their
2223names) and the using program then applies the methods directly on the
2224class objects without having to think about how the actual GRIB API
2225tools have to be arranged.</p>
2226<dl class="method">
2227<dt id="GribUtil.GribUtil.copy_dummy_msg">
2228<code class="descname">copy_dummy_msg</code><span class="sig-paren">(</span><em>filename_in</em>, <em>selectWhere=True</em>, <em>keynames=[]</em>, <em>keyvalues=[]</em>, <em>filemode='wb'</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/GribUtil.html#GribUtil.copy_dummy_msg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribUtil.GribUtil.copy_dummy_msg" title="Permalink to this definition"></a></dt>
2229<dd><p>Add the content of another input grib file to the objects file but
2230only messages corresponding to keys/values passed to the function.
2231The selectWhere switch decides if to copy the keys equal to (True) or
2232different to (False) the keynames/keyvalues list passed to the function.</p>
2233<table class="docutils field-list" frame="void" rules="none">
2234<col class="field-name" />
2235<col class="field-body" />
2236<tbody valign="top">
2237<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2238<li><strong>filename_in</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Filename of the input file to read the grib messages from.</li>
2239<li><strong>selectWhere</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">boolean</span></code>, optional) – Decides if to copy the keynames and values equal to (True) or
2240different to (False) the keynames/keyvalues list passed to the
2241function. Default is True.</li>
2242<li><strong>keynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – List of keynames. Default is an empty list.</li>
2243<li><strong>keyvalues</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – List of keyvalues. Default is an empty list.</li>
2244<li><strong>filemode</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Sets the mode for the output file. Default is “wb”.</li>
2245</ul>
2246</td>
2247</tr>
2248</tbody>
2249</table>
2250</dd></dl>
2251
2252<dl class="method">
2253<dt id="GribUtil.GribUtil.get_keys">
2254<code class="descname">get_keys</code><span class="sig-paren">(</span><em>keynames</em>, <em>wherekeynames=[]</em>, <em>wherekeyvalues=[]</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/GribUtil.html#GribUtil.get_keys"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribUtil.GribUtil.get_keys" title="Permalink to this definition"></a></dt>
2255<dd><p>Get keyvalues for a given list of keynames a where statement
2256can be given (list of key and list of values)</p>
2257<table class="docutils field-list" frame="void" rules="none">
2258<col class="field-name" />
2259<col class="field-body" />
2260<tbody valign="top">
2261<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2262<li><strong>keynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – List of keynames.</li>
2263<li><strong>wherekeynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Default value is an empty list.</li>
2264<li><strong>wherekeyvalues</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Default value is an empty list.</li>
2265</ul>
2266</td>
2267</tr>
2268<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>return_list</strong> – List of keyvalues for given keynames.</p>
2269</td>
2270</tr>
2271<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code></p>
2272</td>
2273</tr>
2274</tbody>
2275</table>
2276</dd></dl>
2277
2278<dl class="method">
2279<dt id="GribUtil.GribUtil.index">
2280<code class="descname">index</code><span class="sig-paren">(</span><em>index_keys=['mars'], index_file='my.idx'</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/GribUtil.html#GribUtil.index"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribUtil.GribUtil.index" title="Permalink to this definition"></a></dt>
2281<dd><p>Create index file from a list of files if it does not exist or
2282read an index file.</p>
2283<table class="docutils field-list" frame="void" rules="none">
2284<col class="field-name" />
2285<col class="field-body" />
2286<tbody valign="top">
2287<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2288<li><strong>index_keys</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Contains the list of key parameter names from
2289which the index is to be created.
2290Default is a list with a single entry string “mars”.</li>
2291<li><strong>index_file</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Filename where the indices are stored.
2292Default is “my.idx”.</li>
2293</ul>
2294</td>
2295</tr>
2296<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>iid</strong> – Grib index id.</p>
2297</td>
2298</tr>
2299<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">integer</span></code></p>
2300</td>
2301</tr>
2302</tbody>
2303</table>
2304</dd></dl>
2305
2306<dl class="method">
2307<dt id="GribUtil.GribUtil.set_keys">
2308<code class="descname">set_keys</code><span class="sig-paren">(</span><em>fromfile</em>, <em>keynames</em>, <em>keyvalues</em>, <em>wherekeynames=[]</em>, <em>wherekeyvalues=[]</em>, <em>strict=False</em>, <em>filemode='wb'</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/GribUtil.html#GribUtil.set_keys"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribUtil.GribUtil.set_keys" title="Permalink to this definition"></a></dt>
2309<dd><p>Opens the file to read the grib messages and then write
2310the selected messages (with wherekeys) to a new output file.
2311Also, the keyvalues of the passed list of keynames are set.</p>
2312<table class="docutils field-list" frame="void" rules="none">
2313<col class="field-name" />
2314<col class="field-body" />
2315<tbody valign="top">
2316<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2317<li><strong>fromfile</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Filename of the input file to read the grib messages from.</li>
2318<li><strong>keynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – List of keynames to set in the selected messages.
2319Default is an empty list.</li>
2320<li><strong>keyvalues</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – List of keyvalues to set in the selected messages.
2321Default is an empty list.</li>
2322<li><strong>wherekeynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – List of keynames to select correct message.
2323Default value is an empty list.</li>
2324<li><strong>wherekeyvalues</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – List of keyvalues for keynames to select correct message.
2325Default value is an empty list.</li>
2326<li><strong>strict</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">boolean</span></code>, optional) – Decides if everything from keynames and keyvalues
2327is written out the grib file (False) or only those
2328meeting the where statement (True). Default is False.</li>
2329<li><strong>filemode</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Sets the mode for the output file. Default is “wb”.</li>
2330</ul>
2331</td>
2332</tr>
2333</tbody>
2334</table>
2335</dd></dl>
2336
2337</dd></dl>
2338
2339</div>
2340<div class="section" id="module-MarsRetrieval">
2341<span id="marsretrieval"></span><h3><a class="toc-backref" href="#id8">MarsRetrieval</a><a class="headerlink" href="#module-MarsRetrieval" title="Permalink to this headline"></a></h3>
2342<dl class="class">
2343<dt id="MarsRetrieval.MarsRetrieval">
2344<em class="property">class </em><code class="descclassname">MarsRetrieval.</code><code class="descname">MarsRetrieval</code><span class="sig-paren">(</span><em>server</em>, <em>public</em>, <em>marsclass='EA'</em>, <em>dataset=''</em>, <em>type=''</em>, <em>levtype=''</em>, <em>levelist=''</em>, <em>repres=''</em>, <em>date=''</em>, <em>resol=''</em>, <em>stream=''</em>, <em>area=''</em>, <em>time=''</em>, <em>step=''</em>, <em>expver='1'</em>, <em>number=''</em>, <em>accuracy=''</em>, <em>grid=''</em>, <em>gaussian=''</em>, <em>target=''</em>, <em>param=''</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/MarsRetrieval.html#MarsRetrieval"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval" title="Permalink to this definition"></a></dt>
2345<dd><p>Specific syntax and content for submission of MARS retrievals.</p>
2346<p>A MARS revtrieval has a specific syntax with a selection of keywords and
2347their corresponding values. This class provides the necessary functions
2348by displaying the selected parameters and their values and the actual
2349retrievement of the data through a mars request or a Python web api
2350interface. The initialization already expects all the keyword values.</p>
2351<p>A description of MARS keywords/arguments and examples of their
2352values can be found here:
2353<a class="reference external" href="https://software.ecmwf.int/wiki/display/UDOC/">https://software.ecmwf.int/wiki/display/UDOC/</a>                   Identification+keywords#Identificationkeywords-class</p>
2354<dl class="attribute">
2355<dt id="MarsRetrieval.MarsRetrieval.server">
2356<code class="descname">server</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.server" title="Permalink to this definition"></a></dt>
2357<dd><p>This is the connection to the ECMWF data servers.</p>
2358<table class="docutils field-list" frame="void" rules="none">
2359<col class="field-name" />
2360<col class="field-body" />
2361<tbody valign="top">
2362<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">ECMWFService or ECMWFDataServer</td>
2363</tr>
2364</tbody>
2365</table>
2366</dd></dl>
2367
2368<dl class="attribute">
2369<dt id="MarsRetrieval.MarsRetrieval.public">
2370<code class="descname">public</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.public" title="Permalink to this definition"></a></dt>
2371<dd><p>Decides which Web API Server version is used.</p>
2372<table class="docutils field-list" frame="void" rules="none">
2373<col class="field-name" />
2374<col class="field-body" />
2375<tbody valign="top">
2376<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
2377</tr>
2378</tbody>
2379</table>
2380</dd></dl>
2381
2382<dl class="attribute">
2383<dt id="MarsRetrieval.MarsRetrieval.marsclass">
2384<code class="descname">marsclass</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.marsclass" title="Permalink to this definition"></a></dt>
2385<dd><p>Characterisation of dataset.</p>
2386<table class="docutils field-list" frame="void" rules="none">
2387<col class="field-name" />
2388<col class="field-body" />
2389<tbody valign="top">
2390<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2391</tr>
2392</tbody>
2393</table>
2394</dd></dl>
2395
2396<dl class="attribute">
2397<dt id="MarsRetrieval.MarsRetrieval.dataset">
2398<code class="descname">dataset</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.dataset" title="Permalink to this definition"></a></dt>
2399<dd><p>For public datasets there is the specific naming and parameter
2400dataset which has to be used to characterize the type of
2401data.</p>
2402<table class="docutils field-list" frame="void" rules="none">
2403<col class="field-name" />
2404<col class="field-body" />
2405<tbody valign="top">
2406<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2407</tr>
2408</tbody>
2409</table>
2410</dd></dl>
2411
2412<dl class="attribute">
2413<dt id="MarsRetrieval.MarsRetrieval.type">
2414<code class="descname">type</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.type" title="Permalink to this definition"></a></dt>
2415<dd><p>Determines the type of fields to be retrieved.</p>
2416<table class="docutils field-list" frame="void" rules="none">
2417<col class="field-name" />
2418<col class="field-body" />
2419<tbody valign="top">
2420<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2421</tr>
2422</tbody>
2423</table>
2424</dd></dl>
2425
2426<dl class="attribute">
2427<dt id="MarsRetrieval.MarsRetrieval.levtype">
2428<code class="descname">levtype</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.levtype" title="Permalink to this definition"></a></dt>
2429<dd><p>Denotes type of level.</p>
2430<table class="docutils field-list" frame="void" rules="none">
2431<col class="field-name" />
2432<col class="field-body" />
2433<tbody valign="top">
2434<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2435</tr>
2436</tbody>
2437</table>
2438</dd></dl>
2439
2440<dl class="attribute">
2441<dt id="MarsRetrieval.MarsRetrieval.levelist">
2442<code class="descname">levelist</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.levelist" title="Permalink to this definition"></a></dt>
2443<dd><p>Specifies the required levels.</p>
2444<table class="docutils field-list" frame="void" rules="none">
2445<col class="field-name" />
2446<col class="field-body" />
2447<tbody valign="top">
2448<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2449</tr>
2450</tbody>
2451</table>
2452</dd></dl>
2453
2454<dl class="attribute">
2455<dt id="MarsRetrieval.MarsRetrieval.repres">
2456<code class="descname">repres</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.repres" title="Permalink to this definition"></a></dt>
2457<dd><p>Selects the representation of the archived data.</p>
2458<table class="docutils field-list" frame="void" rules="none">
2459<col class="field-name" />
2460<col class="field-body" />
2461<tbody valign="top">
2462<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2463</tr>
2464</tbody>
2465</table>
2466</dd></dl>
2467
2468<dl class="attribute">
2469<dt id="MarsRetrieval.MarsRetrieval.date">
2470<code class="descname">date</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.date" title="Permalink to this definition"></a></dt>
2471<dd><p>Specifies the Analysis date, the Forecast base date or
2472Observations date.</p>
2473<table class="docutils field-list" frame="void" rules="none">
2474<col class="field-name" />
2475<col class="field-body" />
2476<tbody valign="top">
2477<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2478</tr>
2479</tbody>
2480</table>
2481</dd></dl>
2482
2483<dl class="attribute">
2484<dt id="MarsRetrieval.MarsRetrieval.resol">
2485<code class="descname">resol</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.resol" title="Permalink to this definition"></a></dt>
2486<dd><p>Specifies the desired triangular truncation of retrieved data,
2487before carrying out any other selected post-processing.</p>
2488<table class="docutils field-list" frame="void" rules="none">
2489<col class="field-name" />
2490<col class="field-body" />
2491<tbody valign="top">
2492<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2493</tr>
2494</tbody>
2495</table>
2496</dd></dl>
2497
2498<dl class="attribute">
2499<dt id="MarsRetrieval.MarsRetrieval.stream">
2500<code class="descname">stream</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.stream" title="Permalink to this definition"></a></dt>
2501<dd><p>Identifies the forecasting system used to generate the data.</p>
2502<table class="docutils field-list" frame="void" rules="none">
2503<col class="field-name" />
2504<col class="field-body" />
2505<tbody valign="top">
2506<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2507</tr>
2508</tbody>
2509</table>
2510</dd></dl>
2511
2512<dl class="attribute">
2513<dt id="MarsRetrieval.MarsRetrieval.area">
2514<code class="descname">area</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.area" title="Permalink to this definition"></a></dt>
2515<dd><p>Specifies the desired sub-area of data to be extracted.</p>
2516<table class="docutils field-list" frame="void" rules="none">
2517<col class="field-name" />
2518<col class="field-body" />
2519<tbody valign="top">
2520<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2521</tr>
2522</tbody>
2523</table>
2524</dd></dl>
2525
2526<dl class="attribute">
2527<dt id="MarsRetrieval.MarsRetrieval.time">
2528<code class="descname">time</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.time" title="Permalink to this definition"></a></dt>
2529<dd><p>Specifies the time of the data in hours and minutes.</p>
2530<table class="docutils field-list" frame="void" rules="none">
2531<col class="field-name" />
2532<col class="field-body" />
2533<tbody valign="top">
2534<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2535</tr>
2536</tbody>
2537</table>
2538</dd></dl>
2539
2540<dl class="attribute">
2541<dt id="MarsRetrieval.MarsRetrieval.step">
2542<code class="descname">step</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.step" title="Permalink to this definition"></a></dt>
2543<dd><p>Specifies the forecast time step from forecast base time.</p>
2544<table class="docutils field-list" frame="void" rules="none">
2545<col class="field-name" />
2546<col class="field-body" />
2547<tbody valign="top">
2548<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2549</tr>
2550</tbody>
2551</table>
2552</dd></dl>
2553
2554<dl class="attribute">
2555<dt id="MarsRetrieval.MarsRetrieval.expver">
2556<code class="descname">expver</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.expver" title="Permalink to this definition"></a></dt>
2557<dd><p>The version of the dataset.</p>
2558<table class="docutils field-list" frame="void" rules="none">
2559<col class="field-name" />
2560<col class="field-body" />
2561<tbody valign="top">
2562<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2563</tr>
2564</tbody>
2565</table>
2566</dd></dl>
2567
2568<dl class="attribute">
2569<dt id="MarsRetrieval.MarsRetrieval.number">
2570<code class="descname">number</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.number" title="Permalink to this definition"></a></dt>
2571<dd><p>Selects the member in ensemble forecast run.</p>
2572<table class="docutils field-list" frame="void" rules="none">
2573<col class="field-name" />
2574<col class="field-body" />
2575<tbody valign="top">
2576<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2577</tr>
2578</tbody>
2579</table>
2580</dd></dl>
2581
2582<dl class="attribute">
2583<dt id="MarsRetrieval.MarsRetrieval.accuracy">
2584<code class="descname">accuracy</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.accuracy" title="Permalink to this definition"></a></dt>
2585<dd><p>Specifies the number of bits per value to be used in the
2586generated GRIB coded fields.</p>
2587<table class="docutils field-list" frame="void" rules="none">
2588<col class="field-name" />
2589<col class="field-body" />
2590<tbody valign="top">
2591<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2592</tr>
2593</tbody>
2594</table>
2595</dd></dl>
2596
2597<dl class="attribute">
2598<dt id="MarsRetrieval.MarsRetrieval.grid">
2599<code class="descname">grid</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.grid" title="Permalink to this definition"></a></dt>
2600<dd><p>Specifies the output grid which can be either a Gaussian grid
2601or a Latitude/Longitude grid.</p>
2602<table class="docutils field-list" frame="void" rules="none">
2603<col class="field-name" />
2604<col class="field-body" />
2605<tbody valign="top">
2606<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2607</tr>
2608</tbody>
2609</table>
2610</dd></dl>
2611
2612<dl class="attribute">
2613<dt id="MarsRetrieval.MarsRetrieval.gaussian">
2614<code class="descname">gaussian</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.gaussian" title="Permalink to this definition"></a></dt>
2615<dd><p>This parameter is deprecated and should no longer be used.
2616Specifies the desired type of Gaussian grid for the output.</p>
2617<table class="docutils field-list" frame="void" rules="none">
2618<col class="field-name" />
2619<col class="field-body" />
2620<tbody valign="top">
2621<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2622</tr>
2623</tbody>
2624</table>
2625</dd></dl>
2626
2627<dl class="attribute">
2628<dt id="MarsRetrieval.MarsRetrieval.target">
2629<code class="descname">target</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.target" title="Permalink to this definition"></a></dt>
2630<dd><p>Specifies a file into which data is to be written after
2631retrieval or manipulation.</p>
2632<table class="docutils field-list" frame="void" rules="none">
2633<col class="field-name" />
2634<col class="field-body" />
2635<tbody valign="top">
2636<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2637</tr>
2638</tbody>
2639</table>
2640</dd></dl>
2641
2642<dl class="attribute">
2643<dt id="MarsRetrieval.MarsRetrieval.param">
2644<code class="descname">param</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.param" title="Permalink to this definition"></a></dt>
2645<dd><p>Specifies the meteorological parameter.</p>
2646<table class="docutils field-list" frame="void" rules="none">
2647<col class="field-name" />
2648<col class="field-body" />
2649<tbody valign="top">
2650<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2651</tr>
2652</tbody>
2653</table>
2654</dd></dl>
2655
2656<dl class="method">
2657<dt id="MarsRetrieval.MarsRetrieval.data_retrieve">
2658<code class="descname">data_retrieve</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/MarsRetrieval.html#MarsRetrieval.data_retrieve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.data_retrieve" title="Permalink to this definition"></a></dt>
2659<dd><p>Submits a MARS retrieval. Depending on the existence of
2660ECMWF Web-API or CDS API it is submitted via Python or a
2661subprocess in the Shell. The parameter for the mars retrieval
2662are taken from the defined class attributes.</p>
2663</dd></dl>
2664
2665<dl class="method">
2666<dt id="MarsRetrieval.MarsRetrieval.display_info">
2667<code class="descname">display_info</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/MarsRetrieval.html#MarsRetrieval.display_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.display_info" title="Permalink to this definition"></a></dt>
2668<dd><p>Prints all class attributes and their values to the
2669standard output.</p>
2670</dd></dl>
2671
2672<dl class="method">
2673<dt id="MarsRetrieval.MarsRetrieval.print_infodata_csv">
2674<code class="descname">print_infodata_csv</code><span class="sig-paren">(</span><em>inputdir</em>, <em>request_number</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/MarsRetrieval.html#MarsRetrieval.print_infodata_csv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.print_infodata_csv" title="Permalink to this definition"></a></dt>
2675<dd><p>Write all request parameter in alpabetical order into a “csv” file.</p>
2676<table class="docutils field-list" frame="void" rules="none">
2677<col class="field-name" />
2678<col class="field-body" />
2679<tbody valign="top">
2680<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2681<li><strong>inputdir</strong> (<em>str</em>) – The path where all data from the retrievals are stored.</li>
2682<li><strong>request_number</strong> (<em>int</em>) – Number of mars requests for flux and non-flux data.</li>
2683</ul>
2684</td>
2685</tr>
2686</tbody>
2687</table>
2688</dd></dl>
2689
2690</dd></dl>
2691
2692</div>
2693<div class="section" id="module-UioFiles">
2694<span id="uiofiles"></span><h3><a class="toc-backref" href="#id9">UioFiles</a><a class="headerlink" href="#module-UioFiles" title="Permalink to this headline"></a></h3>
2695<dl class="class">
2696<dt id="UioFiles.UioFiles">
2697<em class="property">class </em><code class="descclassname">UioFiles.</code><code class="descname">UioFiles</code><span class="sig-paren">(</span><em>path</em>, <em>pattern</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/UioFiles.html#UioFiles"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#UioFiles.UioFiles" title="Permalink to this definition"></a></dt>
2698<dd><p>Collection of files matching a specific pattern.</p>
2699<p>The pattern can contain regular expressions for the files.
2700The files are listed and can be transformed to a single string or
2701they can be deleted.</p>
2702<dl class="attribute">
2703<dt id="UioFiles.UioFiles.path">
2704<code class="descname">path</code><a class="headerlink" href="#UioFiles.UioFiles.path" title="Permalink to this definition"></a></dt>
2705<dd><p>Directory where to list the files.</p>
2706<table class="docutils field-list" frame="void" rules="none">
2707<col class="field-name" />
2708<col class="field-body" />
2709<tbody valign="top">
2710<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
2711</tr>
2712</tbody>
2713</table>
2714</dd></dl>
2715
2716<dl class="attribute">
2717<dt id="UioFiles.UioFiles.pattern">
2718<code class="descname">pattern</code><a class="headerlink" href="#UioFiles.UioFiles.pattern" title="Permalink to this definition"></a></dt>
2719<dd><p>Regular expression pattern. For example: ‘*.grb’</p>
2720<table class="docutils field-list" frame="void" rules="none">
2721<col class="field-name" />
2722<col class="field-body" />
2723<tbody valign="top">
2724<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
2725</tr>
2726</tbody>
2727</table>
2728</dd></dl>
2729
2730<dl class="attribute">
2731<dt id="UioFiles.UioFiles.files">
2732<code class="descname">files</code><a class="headerlink" href="#UioFiles.UioFiles.files" title="Permalink to this definition"></a></dt>
2733<dd><p>List of files matching the pattern in the path.</p>
2734<table class="docutils field-list" frame="void" rules="none">
2735<col class="field-name" />
2736<col class="field-body" />
2737<tbody valign="top">
2738<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of str</td>
2739</tr>
2740</tbody>
2741</table>
2742</dd></dl>
2743
2744<dl class="method">
2745<dt id="UioFiles.UioFiles.delete_files">
2746<code class="descname">delete_files</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/UioFiles.html#UioFiles.delete_files"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#UioFiles.UioFiles.delete_files" title="Permalink to this definition"></a></dt>
2747<dd><p>Deletes the files.</p>
2748</dd></dl>
2749
2750</dd></dl>
2751
2752</div>
2753</div>
2754<div class="section" id="modules">
2755<h2><a class="toc-backref" href="#id10">Modules</a><a class="headerlink" href="#modules" title="Permalink to this headline"></a></h2>
2756<div class="section" id="module-get_mars_data">
2757<span id="get-mars-data"></span><h3><a class="toc-backref" href="#id11">get_mars_data</a><a class="headerlink" href="#module-get_mars_data" title="Permalink to this headline"></a></h3>
2758<p>This script extracts MARS data from ECMWF servers.</p>
2759<p>At first, the necessary parameters from command line and CONTROL files are
2760extracted. They define the data set to be extracted from MARS.</p>
2761<p>This file can also be imported as a module and contains the following
2762functions:</p>
2763<blockquote>
2764<div><ul class="simple">
2765<li>main - the main function of the script</li>
2766<li>get_mars_data - overall control of ECMWF data retrievment</li>
2767<li>write_reqheader - writes the header into the mars_request file</li>
2768<li>mk_server - creates the server connection to ECMWF servers</li>
2769<li>mk_dates - defines the start and end date</li>
2770<li>remove_old - deletes old retrieved grib files</li>
2771<li>do_retrievement - creates individual retrievals</li>
2772</ul>
2773</div></blockquote>
2774<p>Type: get_mars_data.py –help
2775to get information about command line parameters.
2776Read the documentation for usage instructions.</p>
2777<dl class="function">
2778<dt id="get_mars_data.check_dates_for_nonflux_fc_times">
2779<code class="descclassname">get_mars_data.</code><code class="descname">check_dates_for_nonflux_fc_times</code><span class="sig-paren">(</span><em>types</em>, <em>times</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/get_mars_data.html#check_dates_for_nonflux_fc_times"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.check_dates_for_nonflux_fc_times" title="Permalink to this definition"></a></dt>
2780<dd></dd></dl>
2781
2782<dl class="function">
2783<dt id="get_mars_data.do_retrievement">
2784<code class="descclassname">get_mars_data.</code><code class="descname">do_retrievement</code><span class="sig-paren">(</span><em>c</em>, <em>server</em>, <em>start</em>, <em>end</em>, <em>delta_t</em>, <em>fluxes=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/get_mars_data.html#do_retrievement"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.do_retrievement" title="Permalink to this definition"></a></dt>
2785<dd><p>Divides the complete retrieval period in smaller chunks and
2786retrieves the data from MARS.</p>
2787<table class="docutils field-list" frame="void" rules="none">
2788<col class="field-name" />
2789<col class="field-body" />
2790<tbody valign="top">
2791<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2792<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
2793command line.</li>
2794<li><strong>server</strong> (<em>ECMWFService</em><em> or </em><em>ECMWFDataServer</em>) – The server connection to ECMWF.</li>
2795<li><strong>start</strong> (<em>datetime</em>) – The start date of the retrieval.</li>
2796<li><strong>end</strong> (<em>datetime</em>) – The end date of the retrieval.</li>
2797<li><strong>delta_t</strong> (<em>datetime</em>) – Delta_t + 1 is the maximal time period of a single
2798retrieval.</li>
2799<li><strong>fluxes</strong> (<em>boolean</em><em>, </em><em>optional</em>) – Decides if the flux parameters are to be retrieved or
2800the rest of the parameter list.
2801Default value is False.</li>
2802</ul>
2803</td>
2804</tr>
2805</tbody>
2806</table>
2807</dd></dl>
2808
2809<dl class="function">
2810<dt id="get_mars_data.get_mars_data">
2811<code class="descclassname">get_mars_data.</code><code class="descname">get_mars_data</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/get_mars_data.html#get_mars_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.get_mars_data" title="Permalink to this definition"></a></dt>
2812<dd><p>Retrieves the EC data needed for a FLEXPART simulation.</p>
2813<p>Start and end dates for retrieval period is set. Retrievals
2814are divided into smaller periods if necessary and datechunk parameter
2815is set.</p>
2816<table class="docutils field-list" frame="void" rules="none">
2817<col class="field-name" />
2818<col class="field-body" />
2819<tbody valign="top">
2820<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
2821command line.</td>
2822</tr>
2823</tbody>
2824</table>
2825</dd></dl>
2826
2827<dl class="function">
2828<dt id="get_mars_data.main">
2829<code class="descclassname">get_mars_data.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/get_mars_data.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.main" title="Permalink to this definition"></a></dt>
2830<dd><p>Controls the program to get data out of mars.</p>
2831<p>This is done if it is called directly from command line.
2832Then it also takes program call arguments and control file input.</p>
2833</dd></dl>
2834
2835<dl class="function">
2836<dt id="get_mars_data.mk_dates">
2837<code class="descclassname">get_mars_data.</code><code class="descname">mk_dates</code><span class="sig-paren">(</span><em>c</em>, <em>fluxes</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/get_mars_data.html#mk_dates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.mk_dates" title="Permalink to this definition"></a></dt>
2838<dd><p>Prepares start and end date depending on flux or non flux data.</p>
2839<p>If forecast for maximum one day (upto 24h) are to be retrieved, then
2840collect accumulation data (flux data) with additional days in the
2841beginning and at the end (used for complete disaggregation of
2842original period)</p>
2843<p>If forecast data longer than 24h are to be retrieved, then
2844collect accumulation data (flux data) with the exact start and end date
2845(disaggregation will be done for the exact time period with
2846boundary conditions)</p>
2847<p>Since for basetime the extraction contains the 12 hours upfront,
2848if basetime is 0, the starting date has to be the day before and</p>
2849<table class="docutils field-list" frame="void" rules="none">
2850<col class="field-name" />
2851<col class="field-body" />
2852<tbody valign="top">
2853<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2854<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
2855command line.</li>
2856<li><strong>fluxes</strong> (<em>boolean</em><em>, </em><em>optional</em>) – Decides if the flux parameter settings are stored or
2857the rest of the parameter list.
2858Default value is False.</li>
2859</ul>
2860</td>
2861</tr>
2862<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
2863<li><strong>start</strong> (<em>datetime</em>) – The start date of the retrieving data set.</li>
2864<li><strong>end</strong> (<em>datetime</em>) – The end date of the retrieving data set.</li>
2865<li><strong>chunk</strong> (<em>datetime</em>) – Time period in days for one single mars retrieval.</li>
2866</ul>
2867</p>
2868</td>
2869</tr>
2870</tbody>
2871</table>
2872</dd></dl>
2873
2874<dl class="function">
2875<dt id="get_mars_data.mk_server">
2876<code class="descclassname">get_mars_data.</code><code class="descname">mk_server</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/get_mars_data.html#mk_server"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.mk_server" title="Permalink to this definition"></a></dt>
2877<dd><p>Creates a server connection with available python API.</p>
2878<p>Which API is used depends on availability and the dataset to be retrieved.
2879The CDS API is used for ERA5 dataset no matter if the user is a member or
2880a public user. ECMWF WebAPI is used for all other available datasets.</p>
2881<table class="docutils field-list" frame="void" rules="none">
2882<col class="field-name" />
2883<col class="field-body" />
2884<tbody valign="top">
2885<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
2886command line.</td>
2887</tr>
2888<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>server</strong> – Connection to ECMWF server via python interface ECMWF WebAPI or CDS API.</td>
2889</tr>
2890<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">ECMWFDataServer, ECMWFService or Client</td>
2891</tr>
2892</tbody>
2893</table>
2894</dd></dl>
2895
2896<dl class="function">
2897<dt id="get_mars_data.remove_old">
2898<code class="descclassname">get_mars_data.</code><code class="descname">remove_old</code><span class="sig-paren">(</span><em>pattern</em>, <em>inputdir</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/get_mars_data.html#remove_old"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.remove_old" title="Permalink to this definition"></a></dt>
2899<dd><p>Deletes old retrieval files from current input directory
2900matching the pattern.</p>
2901<table class="docutils field-list" frame="void" rules="none">
2902<col class="field-name" />
2903<col class="field-body" />
2904<tbody valign="top">
2905<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2906<li><strong>pattern</strong> (<em>str</em>) – The sub string pattern which identifies the files to be deleted.</li>
2907<li><strong>inputdir</strong> (<em>str</em><em>, </em><em>optional</em>) – Path to the directory where the retrieved data is stored.</li>
2908</ul>
2909</td>
2910</tr>
2911</tbody>
2912</table>
2913</dd></dl>
2914
2915<dl class="function">
2916<dt id="get_mars_data.write_reqheader">
2917<code class="descclassname">get_mars_data.</code><code class="descname">write_reqheader</code><span class="sig-paren">(</span><em>marsfile</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/get_mars_data.html#write_reqheader"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.write_reqheader" title="Permalink to this definition"></a></dt>
2918<dd><p>Writes header with column names into mars request file.</p>
2919<table class="docutils field-list" frame="void" rules="none">
2920<col class="field-name" />
2921<col class="field-body" />
2922<tbody valign="top">
2923<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>marsfile</strong> (<em>str</em>) – Path to the mars request file.</td>
2924</tr>
2925</tbody>
2926</table>
2927</dd></dl>
2928
2929</div>
2930<div class="section" id="module-prepare_flexpart">
2931<span id="prepare-flexpart"></span><h3><a class="toc-backref" href="#id12">prepare_flexpart</a><a class="headerlink" href="#module-prepare_flexpart" title="Permalink to this headline"></a></h3>
2932<p>This script prepares the final version of the grib files which are
2933then used by FLEXPART.</p>
2934<p>It converts the bunch of grib files extracted via get_mars_data before,
2935by doing the necessary conversion to get consistent grids or the
2936disaggregation of flux data. Finally, the data fields are combined
2937in files per available hour with the naming convention xxYYMMDDHH,
2938where xx should be 2 arbitrary letters (mostly xx is chosen to be “EN”).</p>
2939<p>This file can also be imported as a module which then contains the following
2940functions:</p>
2941<blockquote>
2942<div><ul class="simple">
2943<li>main</li>
2944<li>prepare_flexpart</li>
2945</ul>
2946</div></blockquote>
2947<p>Type: prepare_flexpart.py –help
2948to get information about command line parameters.
2949Read the documentation for usage instructions.</p>
2950<dl class="function">
2951<dt id="prepare_flexpart.main">
2952<code class="descclassname">prepare_flexpart.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/prepare_flexpart.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#prepare_flexpart.main" title="Permalink to this definition"></a></dt>
2953<dd><p>Controls the program to prepare flexpart input files from mars data.</p>
2954<p>This is done if it is called directly from command line.
2955Then it also takes program call arguments and control file input.</p>
2956</dd></dl>
2957
2958<dl class="function">
2959<dt id="prepare_flexpart.prepare_flexpart">
2960<code class="descclassname">prepare_flexpart.</code><code class="descname">prepare_flexpart</code><span class="sig-paren">(</span><em>ppid</em>, <em>c</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/prepare_flexpart.html#prepare_flexpart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#prepare_flexpart.prepare_flexpart" title="Permalink to this definition"></a></dt>
2961<dd><p>Converts the mars data into flexpart ready input files.</p>
2962<p>Specific data fields are converted to a different grid and the flux
2963data are going to be disaggregated. The data fields are collected by
2964hour and stored in a file with a specific FLEXPART relevant naming
2965convention.</p>
2966<table class="docutils field-list" frame="void" rules="none">
2967<col class="field-name" />
2968<col class="field-body" />
2969<tbody valign="top">
2970<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2971<li><strong>ppid</strong> (<em>int</em>) – Contains the ppid number of the current ECMWF job. It will be None if
2972the method was called within this module.</li>
2973<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
2974command line.</li>
2975</ul>
2976</td>
2977</tr>
2978</tbody>
2979</table>
2980</dd></dl>
2981
2982</div>
2983<div class="section" id="module-tools">
2984<span id="tools"></span><h3><a class="toc-backref" href="#id13">tools</a><a class="headerlink" href="#module-tools" title="Permalink to this headline"></a></h3>
2985<p>This module contains a collection of diverse tasks within flex_extract.</p>
2986<dl class="function">
2987<dt id="tools.clean_up">
2988<code class="descclassname">tools.</code><code class="descname">clean_up</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#clean_up"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.clean_up" title="Permalink to this definition"></a></dt>
2989<dd><p>Remove files from the intermediate directory (inputdir).</p>
2990<p>It keeps the final FLEXPART input files if program runs without
2991ECMWF Api and keywords “ectrans” or “ecstorage” are set to “1”.</p>
2992<table class="docutils field-list" frame="void" rules="none">
2993<col class="field-name" />
2994<col class="field-body" />
2995<tbody valign="top">
2996<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
2997command line.</td>
2998</tr>
2999</tbody>
3000</table>
3001</dd></dl>
3002
3003<dl class="function">
3004<dt id="tools.execute_subprocess">
3005<code class="descclassname">tools.</code><code class="descname">execute_subprocess</code><span class="sig-paren">(</span><em>cmd_list</em>, <em>error_msg='SUBPROCESS FAILED!'</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#execute_subprocess"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.execute_subprocess" title="Permalink to this definition"></a></dt>
3006<dd><p>Executes a command line instruction via a subprocess.</p>
3007<p>Error handling is done if an error occures.</p>
3008<table class="docutils field-list" frame="void" rules="none">
3009<col class="field-name" />
3010<col class="field-body" />
3011<tbody valign="top">
3012<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>cmd_list</strong> (<em>list of str</em>) – A list of the components for the command line execution. Each
3013list entry is a single part of the command which is seperated from
3014the rest by a blank space.
3015E.g. [‘mv’, file1, file2]</td>
3016</tr>
3017<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>error_msg</strong> – The possible error message if the subprocess failed.
3018By default it will just tell “SUBPROCESS FAILED!”.</td>
3019</tr>
3020<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str, optional</td>
3021</tr>
3022</tbody>
3023</table>
3024</dd></dl>
3025
3026<dl class="function">
3027<dt id="tools.generate_retrieval_period_boundary">
3028<code class="descclassname">tools.</code><code class="descname">generate_retrieval_period_boundary</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#generate_retrieval_period_boundary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.generate_retrieval_period_boundary" title="Permalink to this definition"></a></dt>
3029<dd><p>Generates retrieval period boundary datetimes from CONTROL information.</p>
3030<table class="docutils field-list" frame="void" rules="none">
3031<col class="field-name" />
3032<col class="field-body" />
3033<tbody valign="top">
3034<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
3035command line.</td>
3036</tr>
3037<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><ul class="simple">
3038<li><strong>start_period</strong> (<em>datetime</em>) – The first timestamp of the actual retrieval period disregarding
3039the temporary times which were used for processing reasons.</li>
3040<li><strong>end_period</strong> (<em>datetime</em>) – The last timestamp of the actual retrieval period disregarding
3041the temporary times which were used for processing reasons.</li>
3042</ul>
3043</td>
3044</tr>
3045</tbody>
3046</table>
3047</dd></dl>
3048
3049<dl class="function">
3050<dt id="tools.get_cmdline_args">
3051<code class="descclassname">tools.</code><code class="descname">get_cmdline_args</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#get_cmdline_args"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.get_cmdline_args" title="Permalink to this definition"></a></dt>
3052<dd><p>Decomposes the command line arguments and assigns them to variables.
3053Apply default values for non mentioned arguments.</p>
3054<table class="docutils field-list" frame="void" rules="none">
3055<col class="field-name" />
3056<col class="field-body" />
3057<tbody valign="top">
3058<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>args</strong> – Contains the commandline arguments from script/program call.</td>
3059</tr>
3060<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">Namespace</td>
3061</tr>
3062</tbody>
3063</table>
3064</dd></dl>
3065
3066<dl class="function">
3067<dt id="tools.get_dimensions">
3068<code class="descclassname">tools.</code><code class="descname">get_dimensions</code><span class="sig-paren">(</span><em>info</em>, <em>purefc</em>, <em>dtime</em>, <em>index_vals</em>, <em>start_date</em>, <em>end_date</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#get_dimensions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.get_dimensions" title="Permalink to this definition"></a></dt>
3069<dd><p>This function specifies the correct dimensions for x, y and t.</p>
3070<table class="docutils field-list" frame="void" rules="none">
3071<col class="field-name" />
3072<col class="field-body" />
3073<tbody valign="top">
3074<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3075<li><strong>info</strong> (<em>dict</em>) – Contains basic informations of the ECMWF grib files, e.g.
3076‘Ni’, ‘Nj’, ‘latitudeOfFirstGridPointInDegrees’,
3077‘longitudeOfFirstGridPointInDegrees’, ‘latitudeOfLastGridPointInDegrees’,
3078‘longitudeOfLastGridPointInDegrees’, ‘jDirectionIncrementInDegrees’,
3079‘iDirectionIncrementInDegrees’, ‘missingValue’</li>
3080<li><strong>purefc</strong> (<em>int</em>) – Switch for definition of pure forecast mode or not.</li>
3081<li><strong>dtime</strong> (<em>str</em>) – Time step in hours.</li>
3082<li><strong>index_vals</strong> (<em>list of list of str</em>) – Contains the values from the keys used for a distinct selection
3083of grib messages in processing  the grib files.
3084Content looks like e.g.:
3085index_vals[0]: (‘20171106’, ‘20171107’, ‘20171108’) ; date
3086index_vals[1]: (‘0’, ‘1200’, ‘1800’, ‘600’) ; time
3087index_vals[2]: (‘0’, ‘12’, ‘3’, ‘6’, ‘9’) ; stepRange</li>
3088<li><strong>start_date</strong> (<em>str</em>) – The start date of the retrieval job.</li>
3089<li><strong>end_date</strong> (<em>str</em>) – The end date of the retrieval job.</li>
3090</ul>
3091</td>
3092</tr>
3093<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>(ix, jy, it)</strong> – Dimension in x-direction, y-direction and in time.</p>
3094</td>
3095</tr>
3096<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">tuple of int</p>
3097</td>
3098</tr>
3099</tbody>
3100</table>
3101</dd></dl>
3102
3103<dl class="function">
3104<dt id="tools.get_informations">
3105<code class="descclassname">tools.</code><code class="descname">get_informations</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#get_informations"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.get_informations" title="Permalink to this definition"></a></dt>
3106<dd><p>Gets basic information from an example grib file.</p>
3107<p>These information are important for later use and the
3108initialization of numpy arrays for data storing.</p>
3109<table class="docutils field-list" frame="void" rules="none">
3110<col class="field-name" />
3111<col class="field-body" />
3112<tbody valign="top">
3113<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<em>str</em>) – Name of the file which will be opened to extract basic information.</td>
3114</tr>
3115<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>data</strong> – Contains basic informations of the ECMWF grib files, e.g.
3116‘Ni’, ‘Nj’, ‘latitudeOfFirstGridPointInDegrees’,
3117‘longitudeOfFirstGridPointInDegrees’, ‘latitudeOfLastGridPointInDegrees’,
3118‘longitudeOfLastGridPointInDegrees’, ‘jDirectionIncrementInDegrees’,
3119‘iDirectionIncrementInDegrees’, ‘missingValue’</td>
3120</tr>
3121<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
3122</tr>
3123</tbody>
3124</table>
3125</dd></dl>
3126
3127<dl class="function">
3128<dt id="tools.get_list_as_string">
3129<code class="descclassname">tools.</code><code class="descname">get_list_as_string</code><span class="sig-paren">(</span><em>list_obj</em>, <em>concatenate_sign='</em>, <em>'</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#get_list_as_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.get_list_as_string" title="Permalink to this definition"></a></dt>
3130<dd><p>Converts a list of arbitrary content into a single string.</p>
3131<table class="docutils field-list" frame="void" rules="none">
3132<col class="field-name" />
3133<col class="field-body" />
3134<tbody valign="top">
3135<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3136<li><strong>list_obj</strong> (<em>list of *</em>) – A list with arbitrary content.</li>
3137<li><strong>concatenate_sign</strong> (<em>str</em><em>, </em><em>optional</em>) – A string which is used to concatenate the single
3138list elements. Default value is “, “.</li>
3139</ul>
3140</td>
3141</tr>
3142<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>str_of_list</strong> – The content of the list as a single string.</p>
3143</td>
3144</tr>
3145<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3146</td>
3147</tr>
3148</tbody>
3149</table>
3150</dd></dl>
3151
3152<dl class="function">
3153<dt id="tools.init128">
3154<code class="descclassname">tools.</code><code class="descname">init128</code><span class="sig-paren">(</span><em>filepath</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#init128"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.init128" title="Permalink to this definition"></a></dt>
3155<dd><p>Opens and reads the grib file with table 128 information.</p>
3156<table class="docutils field-list" frame="void" rules="none">
3157<col class="field-name" />
3158<col class="field-body" />
3159<tbody valign="top">
3160<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filepath</strong> (<em>str</em>) – Path to file of ECMWF grib table number 128.</td>
3161</tr>
3162<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>table128</strong> – Contains the ECMWF grib table 128 information.
3163The key is the parameter number and the value is the
3164short name of the parameter.</td>
3165</tr>
3166<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
3167</tr>
3168</tbody>
3169</table>
3170</dd></dl>
3171
3172<dl class="function">
3173<dt id="tools.make_dir">
3174<code class="descclassname">tools.</code><code class="descname">make_dir</code><span class="sig-paren">(</span><em>directory</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#make_dir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.make_dir" title="Permalink to this definition"></a></dt>
3175<dd><p>Creates a directory.</p>
3176<p>It gives a warning if the directory already exists and skips process.
3177The program stops only if there is another problem.</p>
3178<table class="docutils field-list" frame="void" rules="none">
3179<col class="field-name" />
3180<col class="field-body" />
3181<tbody valign="top">
3182<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>directory</strong> (<em>str</em>) – The path to directory which should be created.</td>
3183</tr>
3184</tbody>
3185</table>
3186</dd></dl>
3187
3188<dl class="function">
3189<dt id="tools.my_error">
3190<code class="descclassname">tools.</code><code class="descname">my_error</code><span class="sig-paren">(</span><em>message='ERROR'</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#my_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.my_error" title="Permalink to this definition"></a></dt>
3191<dd><p>Prints a specified error message which can be passed to the function
3192before exiting the program.</p>
3193<table class="docutils field-list" frame="void" rules="none">
3194<col class="field-name" />
3195<col class="field-body" />
3196<tbody valign="top">
3197<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>message</strong> (<em>str</em><em>, </em><em>optional</em>) – Error message. Default value is “ERROR”.</td>
3198</tr>
3199</tbody>
3200</table>
3201</dd></dl>
3202
3203<dl class="function">
3204<dt id="tools.none_or_int">
3205<code class="descclassname">tools.</code><code class="descname">none_or_int</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#none_or_int"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.none_or_int" title="Permalink to this definition"></a></dt>
3206<dd><p>Converts the input string into pythons None-type if the string
3207contains string “None”. Otherwise it is converted to an integer value.</p>
3208<table class="docutils field-list" frame="void" rules="none">
3209<col class="field-name" />
3210<col class="field-body" />
3211<tbody valign="top">
3212<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> (<em>str</em>) – String to be checked for the “None” word.</td>
3213</tr>
3214<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Return depends on the content of the input value. If it was “None”,
3215then the python type None is returned. Otherwise the string is
3216converted into an integer value.</td>
3217</tr>
3218<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None or int(value)</td>
3219</tr>
3220</tbody>
3221</table>
3222</dd></dl>
3223
3224<dl class="function">
3225<dt id="tools.none_or_str">
3226<code class="descclassname">tools.</code><code class="descname">none_or_str</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#none_or_str"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.none_or_str" title="Permalink to this definition"></a></dt>
3227<dd><p>Converts the input string into pythons None-type if the string
3228contains string “None”.</p>
3229<table class="docutils field-list" frame="void" rules="none">
3230<col class="field-name" />
3231<col class="field-body" />
3232<tbody valign="top">
3233<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> (<em>str</em>) – String to be checked for the “None” word.</td>
3234</tr>
3235<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Return depends on the content of the input value. If it was “None”,
3236then the python type None is returned. Otherwise the string itself.</td>
3237</tr>
3238<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None or value</td>
3239</tr>
3240</tbody>
3241</table>
3242</dd></dl>
3243
3244<dl class="function">
3245<dt id="tools.normal_exit">
3246<code class="descclassname">tools.</code><code class="descname">normal_exit</code><span class="sig-paren">(</span><em>message='Done!'</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#normal_exit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.normal_exit" title="Permalink to this definition"></a></dt>
3247<dd><p>Prints a specific exit message which can be passed to the function.</p>
3248<table class="docutils field-list" frame="void" rules="none">
3249<col class="field-name" />
3250<col class="field-body" />
3251<tbody valign="top">
3252<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>message</strong> (<em>str</em><em>, </em><em>optional</em>) – Message for exiting program. Default value is “Done!”.</td>
3253</tr>
3254</tbody>
3255</table>
3256</dd></dl>
3257
3258<dl class="function">
3259<dt id="tools.product">
3260<code class="descclassname">tools.</code><code class="descname">product</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwds</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#product"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.product" title="Permalink to this definition"></a></dt>
3261<dd><p>Creates combinations of all passed arguments.</p>
3262<p>This method combines the single characters of the passed arguments
3263with each other. So that each character of each argument value
3264will be combined with each character of the other arguments as a tuple.</p>
3265<div class="admonition note">
3266<p class="first admonition-title">Note</p>
3267<p class="last">This method is taken from an example at the ECMWF wiki website.
3268<a class="reference external" href="https://software.ecmwf.int/wiki/display/GRIB/index.py">https://software.ecmwf.int/wiki/display/GRIB/index.py</a>; 2018-03-16</p>
3269</div>
3270<p class="rubric">Example</p>
3271<p>product(‘ABCD’, ‘xy’) –&gt; Ax Ay Bx By Cx Cy Dx Dy</p>
3272<p>product(range(2), repeat = 3) –&gt; 000 001 010 011 100 101 110 111</p>
3273<table class="docutils field-list" frame="void" rules="none">
3274<col class="field-name" />
3275<col class="field-body" />
3276<tbody valign="top">
3277<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3278<li><strong>*args</strong> (<em>list</em><em> or </em><em>str</em>) – Positional arguments (arbitrary number).</li>
3279<li><strong>**kwds</strong> (<em>dict</em>) – Contains all the keyword arguments from *args.</li>
3280</ul>
3281</td>
3282</tr>
3283<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>prod</strong> – Return will be done with “yield”. A tuple of combined arguments.
3284See example in description above.</p>
3285</td>
3286</tr>
3287<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tuple</span></code></p>
3288</td>
3289</tr>
3290</tbody>
3291</table>
3292</dd></dl>
3293
3294<dl class="function">
3295<dt id="tools.put_file_to_ecserver">
3296<code class="descclassname">tools.</code><code class="descname">put_file_to_ecserver</code><span class="sig-paren">(</span><em>ecd</em>, <em>filename</em>, <em>target</em>, <em>ecuid</em>, <em>ecgid</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#put_file_to_ecserver"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.put_file_to_ecserver" title="Permalink to this definition"></a></dt>
3297<dd><p>Uses the ecaccess-file-put command to send a file to the ECMWF servers.</p>
3298<div class="admonition note">
3299<p class="first admonition-title">Note</p>
3300<p class="last">The return value is just for testing reasons. It does not have
3301to be used from the calling function since the whole error handling
3302is done in here.</p>
3303</div>
3304<table class="docutils field-list" frame="void" rules="none">
3305<col class="field-name" />
3306<col class="field-body" />
3307<tbody valign="top">
3308<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3309<li><strong>ecd</strong> (<em>str</em>) – The path were the file is stored.</li>
3310<li><strong>filename</strong> (<em>str</em>) – The name of the file to send to the ECMWF server.</li>
3311<li><strong>target</strong> (<em>str</em>) – The target queue where the file should be sent to.</li>
3312<li><strong>ecuid</strong> (<em>str</em>) – The user id on ECMWF server.</li>
3313<li><strong>ecgid</strong> (<em>str</em>) – The group id on ECMWF server.</li>
3314</ul>
3315</td>
3316</tr>
3317</tbody>
3318</table>
3319</dd></dl>
3320
3321<dl class="function">
3322<dt id="tools.read_ecenv">
3323<code class="descclassname">tools.</code><code class="descname">read_ecenv</code><span class="sig-paren">(</span><em>filepath</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#read_ecenv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.read_ecenv" title="Permalink to this definition"></a></dt>
3324<dd><p>Reads the file into a dictionary where the key values are the parameter
3325names.</p>
3326<table class="docutils field-list" frame="void" rules="none">
3327<col class="field-name" />
3328<col class="field-body" />
3329<tbody valign="top">
3330<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filepath</strong> (<em>str</em>) – Path to file where the ECMWF environment parameters are stored.</td>
3331</tr>
3332<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>envs</strong> – Contains the environment parameter ecuid, ecgid, gateway
3333and destination for ECMWF server environments.</td>
3334</tr>
3335<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
3336</tr>
3337</tbody>
3338</table>
3339</dd></dl>
3340
3341<dl class="function">
3342<dt id="tools.send_mail">
3343<code class="descclassname">tools.</code><code class="descname">send_mail</code><span class="sig-paren">(</span><em>users</em>, <em>success_mode</em>, <em>message</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#send_mail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.send_mail" title="Permalink to this definition"></a></dt>
3344<dd><p>Prints a specific exit message which can be passed to the function.</p>
3345<table class="docutils field-list" frame="void" rules="none">
3346<col class="field-name" />
3347<col class="field-body" />
3348<tbody valign="top">
3349<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3350<li><strong>users</strong> (<em>list of str</em>) – Contains all email addresses which should be notified.
3351It might also contain just the ecmwf user name which wil trigger
3352mailing to the associated email address for this user.</li>
3353<li><strong>success_mode</strong> (<em>str</em>) – States the exit mode of the program to put into
3354the mail subject line.</li>
3355<li><strong>message</strong> (<em>str</em><em>, </em><em>optional</em>) – Message for exiting program. Default value is “Done!”.</li>
3356</ul>
3357</td>
3358</tr>
3359</tbody>
3360</table>
3361</dd></dl>
3362
3363<dl class="function">
3364<dt id="tools.setup_controldata">
3365<code class="descclassname">tools.</code><code class="descname">setup_controldata</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#setup_controldata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.setup_controldata" title="Permalink to this definition"></a></dt>
3366<dd><p>Collects, stores and checks controlling arguments from command line,
3367CONTROL file and ECMWF_ENV file.</p>
3368<table class="docutils field-list" frame="void" rules="none">
3369<col class="field-name" />
3370<col class="field-body" />
3371<tbody valign="top">
3372<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><ul class="simple">
3373<li><strong>c</strong> (<em>ControlFile</em>) – Contains all the parameters of CONTROL file and
3374command line.</li>
3375<li><strong>ppid</strong> (<em>str</em>) – Parent process id.</li>
3376<li><strong>queue</strong> (<em>str</em>) – Name of queue for submission to ECMWF (e.g. ecgate or cca )</li>
3377<li><strong>job_template</strong> (<em>str</em>) – Name of the job template file for submission to ECMWF server.</li>
3378</ul>
3379</td>
3380</tr>
3381</tbody>
3382</table>
3383</dd></dl>
3384
3385<dl class="function">
3386<dt id="tools.silent_remove">
3387<code class="descclassname">tools.</code><code class="descname">silent_remove</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#silent_remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.silent_remove" title="Permalink to this definition"></a></dt>
3388<dd><p>Remove file if it exists.
3389The function does not fail if the file does not exist.</p>
3390<table class="docutils field-list" frame="void" rules="none">
3391<col class="field-name" />
3392<col class="field-body" />
3393<tbody valign="top">
3394<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<em>str</em>) – The name of the file to be removed without notification.</td>
3395</tr>
3396</tbody>
3397</table>
3398</dd></dl>
3399
3400<dl class="function">
3401<dt id="tools.submit_job_to_ecserver">
3402<code class="descclassname">tools.</code><code class="descname">submit_job_to_ecserver</code><span class="sig-paren">(</span><em>target</em>, <em>jobname</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#submit_job_to_ecserver"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.submit_job_to_ecserver" title="Permalink to this definition"></a></dt>
3403<dd><p>Uses ecaccess-job-submit command to submit a job to the ECMWF server.</p>
3404<div class="admonition note">
3405<p class="first admonition-title">Note</p>
3406<p class="last">The return value is just for testing reasons. It does not have
3407to be used from the calling function since the whole error handling
3408is done in here.</p>
3409</div>
3410<table class="docutils field-list" frame="void" rules="none">
3411<col class="field-name" />
3412<col class="field-body" />
3413<tbody valign="top">
3414<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3415<li><strong>target</strong> (<em>str</em>) – The target where the file should be sent to, e.g. the queue.</li>
3416<li><strong>jobname</strong> (<em>str</em>) – The name of the jobfile to be submitted to the ECMWF server.</li>
3417</ul>
3418</td>
3419</tr>
3420<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>job_id</strong> – The id number of the job as a reference at the ecmwf server.</p>
3421</td>
3422</tr>
3423<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">int</p>
3424</td>
3425</tr>
3426</tbody>
3427</table>
3428</dd></dl>
3429
3430<dl class="function">
3431<dt id="tools.to_param_id">
3432<code class="descclassname">tools.</code><code class="descname">to_param_id</code><span class="sig-paren">(</span><em>pars</em>, <em>table</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#to_param_id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.to_param_id" title="Permalink to this definition"></a></dt>
3433<dd><p>Transform parameter names to parameter ids with ECMWF grib table 128.</p>
3434<table class="docutils field-list" frame="void" rules="none">
3435<col class="field-name" />
3436<col class="field-body" />
3437<tbody valign="top">
3438<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3439<li><strong>pars</strong> (<em>str</em>) – Addpar argument from CONTROL file in the format of
3440parameter names instead of ids. The parameter short
3441names are sepearted with “/” and they are passed as
3442one single string.</li>
3443<li><strong>table</strong> (<em>dict</em>) – Contains the ECMWF grib table 128 information.
3444The key is the parameter number and the value is the
3445short name of the parameter.</li>
3446</ul>
3447</td>
3448</tr>
3449<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>ipar</strong> – List of addpar parameters from CONTROL file transformed to
3450parameter ids in the format of integer.</p>
3451</td>
3452</tr>
3453<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list of int</p>
3454</td>
3455</tr>
3456</tbody>
3457</table>
3458</dd></dl>
3459
3460<dl class="function">
3461<dt id="tools.to_param_id_with_tablenumber">
3462<code class="descclassname">tools.</code><code class="descname">to_param_id_with_tablenumber</code><span class="sig-paren">(</span><em>pars</em>, <em>table</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/tools.html#to_param_id_with_tablenumber"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.to_param_id_with_tablenumber" title="Permalink to this definition"></a></dt>
3463<dd><p>Transform parameter names to parameter ids and add table id.</p>
3464<p>Conversion with ECMWF grib table 128.</p>
3465<table class="docutils field-list" frame="void" rules="none">
3466<col class="field-name" />
3467<col class="field-body" />
3468<tbody valign="top">
3469<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3470<li><strong>pars</strong> (<em>str</em>) – Addpar argument from CONTROL file in the format of
3471parameter names instead of ids. The parameter short
3472names are sepearted with “/” and they are passed as
3473one single string.</li>
3474<li><strong>table</strong> (<em>dict</em>) – Contains the ECMWF grib table 128 information.
3475The key is the parameter number and the value is the
3476short name of the parameter.</li>
3477</ul>
3478</td>
3479</tr>
3480<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>spar</strong> – List of addpar parameters from CONTROL file transformed to
3481parameter ids in the format of integer.</p>
3482</td>
3483</tr>
3484<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3485</td>
3486</tr>
3487</tbody>
3488</table>
3489</dd></dl>
3490
3491</div>
3492<div class="section" id="module-checks">
3493<span id="checks"></span><h3><a class="toc-backref" href="#id14">checks</a><a class="headerlink" href="#module-checks" title="Permalink to this headline"></a></h3>
3494<p>This module contains check methods for the CONTROL paramaters.</p>
3495<dl class="function">
3496<dt id="checks.check_accmaxstep">
3497<code class="descclassname">checks.</code><code class="descname">check_accmaxstep</code><span class="sig-paren">(</span><em>accmaxstep</em>, <em>marsclass</em>, <em>purefc</em>, <em>maxstep</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_accmaxstep"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_accmaxstep" title="Permalink to this definition"></a></dt>
3498<dd><p>Guarantees that the accumulation forecast step were set.</p>
3499<table class="docutils field-list" frame="void" rules="none">
3500<col class="field-name" />
3501<col class="field-body" />
3502<tbody valign="top">
3503<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3504<li><strong>accmaxstep</strong> (<em>str</em>) – The maximum forecast step for the accumulated forecast fields.</li>
3505<li><strong>marsclass</strong> (<em>str</em>) – ECMWF data classification identifier.</li>
3506<li><strong>purefc</strong> (<em>int</em>) – Switch for definition of pure forecast mode or not.</li>
3507<li><strong>maxstep</strong> (<em>str</em>) – The maximum forecast time step in hours from the forecast base time.
3508This is the maximum step for non flux (accumulated) forecast data.</li>
3509</ul>
3510</td>
3511</tr>
3512<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>accmaxstep</strong> – The maximum forecast step for the accumulated forecast fields.</p>
3513</td>
3514</tr>
3515<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3516</td>
3517</tr>
3518</tbody>
3519</table>
3520</dd></dl>
3521
3522<dl class="function">
3523<dt id="checks.check_acctime">
3524<code class="descclassname">checks.</code><code class="descname">check_acctime</code><span class="sig-paren">(</span><em>acctime</em>, <em>marsclass</em>, <em>purefc</em>, <em>time</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_acctime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_acctime" title="Permalink to this definition"></a></dt>
3525<dd><p>Guarantees that the accumulation forecast times were set.</p>
3526<p>If it is not set, it tries to set the value for some of the
3527most commonly used data sets. Otherwise it raises an error.</p>
3528<table class="docutils field-list" frame="void" rules="none">
3529<col class="field-name" />
3530<col class="field-body" />
3531<tbody valign="top">
3532<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3533<li><strong>acctime</strong> (<em>str</em>) – The starting time from the accumulated forecasts.</li>
3534<li><strong>marsclass</strong> (<em>str</em>) – ECMWF data classification identifier.</li>
3535<li><strong>purefc</strong> (<em>int</em>) – Switch for definition of pure forecast mode or not.</li>
3536</ul>
3537</td>
3538</tr>
3539<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>acctime</strong> – The starting time from the accumulated forecasts.</p>
3540</td>
3541</tr>
3542<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3543</td>
3544</tr>
3545</tbody>
3546</table>
3547</dd></dl>
3548
3549<dl class="function">
3550<dt id="checks.check_acctype">
3551<code class="descclassname">checks.</code><code class="descname">check_acctype</code><span class="sig-paren">(</span><em>acctype</em>, <em>ftype</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_acctype"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_acctype" title="Permalink to this definition"></a></dt>
3552<dd><p>Guarantees that the accumulation field type is set.</p>
3553<p>If not set, it is derivated as in the old method (TYPE[1]).</p>
3554<table class="docutils field-list" frame="void" rules="none">
3555<col class="field-name" />
3556<col class="field-body" />
3557<tbody valign="top">
3558<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3559<li><strong>acctype</strong> (<em>str</em>) – The field type for the accumulated forecast fields.</li>
3560<li><strong>ftype</strong> (<em>list of str</em>) – List of field types.</li>
3561</ul>
3562</td>
3563</tr>
3564<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>acctype</strong> – The field type for the accumulated forecast fields.</p>
3565</td>
3566</tr>
3567<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3568</td>
3569</tr>
3570</tbody>
3571</table>
3572</dd></dl>
3573
3574<dl class="function">
3575<dt id="checks.check_addpar">
3576<code class="descclassname">checks.</code><code class="descname">check_addpar</code><span class="sig-paren">(</span><em>addpar</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_addpar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_addpar" title="Permalink to this definition"></a></dt>
3577<dd><p>Check that addpar has correct format of additional parameters in
3578a single string, so that it can be easily appended to the hard coded
3579parameters that are retrieved in any case.</p>
3580<table class="docutils field-list" frame="void" rules="none">
3581<col class="field-name" />
3582<col class="field-body" />
3583<tbody valign="top">
3584<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>addpar</strong> (<em>str</em><em> or </em><em>list of str</em>) – List of additional parameters to be retrieved.</td>
3585</tr>
3586<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>addpar</strong> – List of additional parameters to be retrieved.</td>
3587</tr>
3588<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
3589</tr>
3590</tbody>
3591</table>
3592</dd></dl>
3593
3594<dl class="function">
3595<dt id="checks.check_area">
3596<code class="descclassname">checks.</code><code class="descname">check_area</code><span class="sig-paren">(</span><em>grid</em>, <em>area</em>, <em>upper</em>, <em>lower</em>, <em>left</em>, <em>right</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_area"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_area" title="Permalink to this definition"></a></dt>
3597<dd><p>Defines the correct area string.</p>
3598<p>Checks on the format of the four area components. Wether it is of
3599the order of 1000 or 1. Also checks wether area was already set by command
3600line, then the four components are overwritten.
3601Convert to correct format of the order of magnitude “1” and sets the
3602area parameter (North/West/South/East).
3603E.g.: -5./20./10./10.</p>
3604<table class="docutils field-list" frame="void" rules="none">
3605<col class="field-name" />
3606<col class="field-body" />
3607<tbody valign="top">
3608<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3609<li><strong>grid</strong> (<em>str</em>) – Contains grid information.</li>
3610<li><strong>area</strong> (<em>str</em>) – Contains area informtion.</li>
3611<li><strong>upper</strong> (<em>str</em>) – The northern most latitude.</li>
3612<li><strong>lower</strong> (<em>str</em>) – The souther most latitude.</li>
3613<li><strong>left</strong> (<em>str</em>) – The western most longitude.</li>
3614<li><strong>right</strong> (<em>str</em>) – The eastern most longiude.</li>
3615</ul>
3616</td>
3617</tr>
3618<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>grid</strong> – Contains grid in format Lat/lon. E.g. 0.1/0.1</p>
3619</td>
3620</tr>
3621<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3622</td>
3623</tr>
3624</tbody>
3625</table>
3626</dd></dl>
3627
3628<dl class="function">
3629<dt id="checks.check_basetime">
3630<code class="descclassname">checks.</code><code class="descname">check_basetime</code><span class="sig-paren">(</span><em>basetime</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_basetime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_basetime" title="Permalink to this definition"></a></dt>
3631<dd><p>Check if basetime is set and contains one of the two
3632possible values (0, 12).</p>
3633<table class="docutils field-list" frame="void" rules="none">
3634<col class="field-name" />
3635<col class="field-body" />
3636<tbody valign="top">
3637<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>basetime</strong> (<em>int</em><em> or </em><em>str</em><em> or </em><em>None</em>) – The time for a half day retrieval. The 12 hours upfront are to be
3638retrieved.</td>
3639</tr>
3640<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>basetime</strong> – The time for a half day retrieval. The 12 hours upfront are to be
3641retrieved.</td>
3642</tr>
3643<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">int or None</td>
3644</tr>
3645</tbody>
3646</table>
3647</dd></dl>
3648
3649<dl class="function">
3650<dt id="checks.check_dates">
3651<code class="descclassname">checks.</code><code class="descname">check_dates</code><span class="sig-paren">(</span><em>start</em>, <em>end</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_dates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_dates" title="Permalink to this definition"></a></dt>
3652<dd><p>Checks if there is at least a start date for a one day retrieval.</p>
3653<p>Checks if end date lies after start date and end date is set.</p>
3654<table class="docutils field-list" frame="void" rules="none">
3655<col class="field-name" />
3656<col class="field-body" />
3657<tbody valign="top">
3658<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3659<li><strong>start</strong> (<em>str</em>) – The start date of the retrieval job.</li>
3660<li><strong>end</strong> (<em>str</em>) – The end date of the retrieval job.</li>
3661</ul>
3662</td>
3663</tr>
3664<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
3665<li><strong>start</strong> (<em>str</em>) – The start date of the retrieval job.</li>
3666<li><strong>end</strong> (<em>str</em>) – The end date of the retrieval job.</li>
3667</ul>
3668</p>
3669</td>
3670</tr>
3671</tbody>
3672</table>
3673</dd></dl>
3674
3675<dl class="function">
3676<dt id="checks.check_grid">
3677<code class="descclassname">checks.</code><code class="descname">check_grid</code><span class="sig-paren">(</span><em>grid</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_grid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_grid" title="Permalink to this definition"></a></dt>
3678<dd><p>Convert grid into correct Lat/Lon format. E.g. ‘0.5/0.5’</p>
3679<p>Checks on format of original grid. Wether it is in the order of 1000 or 1.
3680Convert to correct grid format and substitute into “Lat/Lon” format string.</p>
3681<table class="docutils field-list" frame="void" rules="none">
3682<col class="field-name" />
3683<col class="field-body" />
3684<tbody valign="top">
3685<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>grid</strong> (<em>str</em>) – Contains grid information</td>
3686</tr>
3687<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>grid</strong> – Contains grid in format Lat/lon. E.g. 0.1/0.1</td>
3688</tr>
3689<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
3690</tr>
3691</tbody>
3692</table>
3693</dd></dl>
3694
3695<dl class="function">
3696<dt id="checks.check_job_chunk">
3697<code class="descclassname">checks.</code><code class="descname">check_job_chunk</code><span class="sig-paren">(</span><em>job_chunk</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_job_chunk"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_job_chunk" title="Permalink to this definition"></a></dt>
3698<dd><p>Checks that if job chunk is set, the number is positive and non zero.</p>
3699<table class="docutils field-list" frame="void" rules="none">
3700<col class="field-name" />
3701<col class="field-body" />
3702<tbody valign="top">
3703<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>job_chunk</strong> (<em>int</em>) – The number of days for a single job script.</td>
3704</tr>
3705<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>job_chunk</strong> – The number of days for a single job script.</td>
3706</tr>
3707<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">int</td>
3708</tr>
3709</tbody>
3710</table>
3711</dd></dl>
3712
3713<dl class="function">
3714<dt id="checks.check_len_type_time_step">
3715<code class="descclassname">checks.</code><code class="descname">check_len_type_time_step</code><span class="sig-paren">(</span><em>ftype</em>, <em>ftime</em>, <em>steps</em>, <em>maxstep</em>, <em>purefc</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_len_type_time_step"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_len_type_time_step" title="Permalink to this definition"></a></dt>
3716<dd><p>Check if</p>
3717<table class="docutils field-list" frame="void" rules="none">
3718<col class="field-name" />
3719<col class="field-body" />
3720<tbody valign="top">
3721<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3722<li><strong>ftype</strong> (<em>list of str</em>) – List of field types.</li>
3723<li><strong>ftime</strong> (<em>list of str</em><em> or </em><em>str</em>) – The time in hours of the field.</li>
3724<li><strong>steps</strong> (<em>str</em>) – Specifies the forecast time step from forecast base time.
3725Valid values are hours (HH) from forecast base time.</li>
3726<li><strong>maxstep</strong> (<em>int</em>) – The maximum forecast time step in hours from the forecast base time.
3727This is the maximum step for non flux (accumulated) forecast data.</li>
3728<li><strong>purefc</strong> (<em>int</em>) – Switch for definition of pure forecast mode or not.</li>
3729</ul>
3730</td>
3731</tr>
3732<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
3733<li><strong>ftype</strong> (<em>list of str</em>) – List of field types.</li>
3734<li><strong>ftime</strong> (<em>list of str</em>) – The time in hours of the field.</li>
3735<li><strong>steps</strong> (<em>str</em>) – Specifies the forecast time step from forecast base time.
3736Valid values are hours (HH) from forecast base time.</li>
3737</ul>
3738</p>
3739</td>
3740</tr>
3741</tbody>
3742</table>
3743</dd></dl>
3744
3745<dl class="function">
3746<dt id="checks.check_levels">
3747<code class="descclassname">checks.</code><code class="descname">check_levels</code><span class="sig-paren">(</span><em>levelist</em>, <em>level</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_levels"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_levels" title="Permalink to this definition"></a></dt>
3748<dd><p>Defines correct level list and guarantees that the maximum level is
3749one of the available maximum levels.</p>
3750<table class="docutils field-list" frame="void" rules="none">
3751<col class="field-name" />
3752<col class="field-body" />
3753<tbody valign="top">
3754<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3755<li><strong>levelist</strong> (<em>str</em>) – Specifies the level list.
3756Examples: model level: 1/to/137, pressure levels: 500/to/1000</li>
3757<li><strong>level</strong> (<em>str</em>) – Specifies the maximum level.</li>
3758</ul>
3759</td>
3760</tr>
3761<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
3762<li><strong>levelist</strong> (<em>str</em>) – Specifies the required levels. It has to have a valid
3763correspondence to the selected levtype.
3764Examples: model level: 1/to/137, pressure levels: 500/to/1000</li>
3765<li><strong>level</strong> (<em>str</em>) – Specifies the maximum level. It has to be one of the
3766available maximum level number as contained in the variable
3767MAX_LEVEL_LIST in “_config”. E.g. [16, 19, 31, 40, 50, 60, 62, 91, 137]</li>
3768</ul>
3769</p>
3770</td>
3771</tr>
3772</tbody>
3773</table>
3774</dd></dl>
3775
3776<dl class="function">
3777<dt id="checks.check_logicals_type">
3778<code class="descclassname">checks.</code><code class="descname">check_logicals_type</code><span class="sig-paren">(</span><em>c</em>, <em>logicals</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_logicals_type"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_logicals_type" title="Permalink to this definition"></a></dt>
3779<dd><p>Check that the logical variables have correct type integer.</p>
3780<table class="docutils field-list" frame="void" rules="none">
3781<col class="field-name" />
3782<col class="field-body" />
3783<tbody valign="top">
3784<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3785<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
3786command line.</li>
3787<li><strong>logicals</strong> (<em>list of</em><em> (</em><em>str</em><em> or </em><em>int</em><em>)</em>) – Names of the switches that are used to control the flow of the
3788program.</li>
3789</ul>
3790</td>
3791</tr>
3792</tbody>
3793</table>
3794</dd></dl>
3795
3796<dl class="function">
3797<dt id="checks.check_mail">
3798<code class="descclassname">checks.</code><code class="descname">check_mail</code><span class="sig-paren">(</span><em>mail</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_mail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_mail" title="Permalink to this definition"></a></dt>
3799<dd><p>Check the string of mail addresses, seperate them and convert to a list.</p>
3800<table class="docutils field-list" frame="void" rules="none">
3801<col class="field-name" />
3802<col class="field-body" />
3803<tbody valign="top">
3804<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mail</strong> (<em>list of str</em><em> or </em><em>str</em>) – Contains email addresses for notifications.
3805It might also contain just the ecmwf user name which will trigger
3806mailing to the associated email address for this user.</td>
3807</tr>
3808<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>mail</strong> – Contains email addresses for notifications.
3809It might also contain just the ecmwf user name which will trigger
3810mailing to the associated email address for this user.</td>
3811</tr>
3812<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list of str</td>
3813</tr>
3814</tbody>
3815</table>
3816</dd></dl>
3817
3818<dl class="function">
3819<dt id="checks.check_maxstep">
3820<code class="descclassname">checks.</code><code class="descname">check_maxstep</code><span class="sig-paren">(</span><em>maxstep</em>, <em>steps</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_maxstep"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_maxstep" title="Permalink to this definition"></a></dt>
3821<dd><p>Convert maxstep into integer if it is already given. Otherwise, select
3822maxstep by going through the steps list.</p>
3823<table class="docutils field-list" frame="void" rules="none">
3824<col class="field-name" />
3825<col class="field-body" />
3826<tbody valign="top">
3827<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3828<li><strong>maxstep</strong> (<em>str</em>) – The maximum forecast time step in hours from the forecast base time.
3829This is the maximum step for non flux (accumulated) forecast data.</li>
3830<li><strong>steps</strong> (<em>str</em>) – Specifies the forecast time step from forecast base time.
3831Valid values are hours (HH) from forecast base time.</li>
3832</ul>
3833</td>
3834</tr>
3835<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>maxstep</strong> – The maximum forecast time step in hours from the forecast base time.
3836This is the maximum step for non flux (accumulated) forecast data.</p>
3837</td>
3838</tr>
3839<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">int</p>
3840</td>
3841</tr>
3842</tbody>
3843</table>
3844</dd></dl>
3845
3846<dl class="function">
3847<dt id="checks.check_number">
3848<code class="descclassname">checks.</code><code class="descname">check_number</code><span class="sig-paren">(</span><em>number</em>, <em>mailfail</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_number"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_number" title="Permalink to this definition"></a></dt>
3849<dd><p>Check for correct string format of ensemble member numbers.</p>
3850<table class="docutils field-list" frame="void" rules="none">
3851<col class="field-name" />
3852<col class="field-body" />
3853<tbody valign="top">
3854<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3855<li><strong>number</strong> (<em>str</em>) – List of ensemble member forecast runs.</li>
3856<li><strong>mailfail</strong> (<em>list of str</em>) – Contains all email addresses which should be notified.
3857It might also contain just the ecmwf user name which will trigger
3858mailing to the associated email address for this user.</li>
3859</ul>
3860</td>
3861</tr>
3862<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>number</strong> – String with list of ensemble member forecast runs. E.g. ‘01/02/03/04’</p>
3863</td>
3864</tr>
3865<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3866</td>
3867</tr>
3868</tbody>
3869</table>
3870</dd></dl>
3871
3872<dl class="function">
3873<dt id="checks.check_pathes">
3874<code class="descclassname">checks.</code><code class="descname">check_pathes</code><span class="sig-paren">(</span><em>idir</em>, <em>odir</em>, <em>fpdir</em>, <em>fedir</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_pathes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_pathes" title="Permalink to this definition"></a></dt>
3875<dd><p>Check if output and flexpart pathes are set.</p>
3876<table class="docutils field-list" frame="void" rules="none">
3877<col class="field-name" />
3878<col class="field-body" />
3879<tbody valign="top">
3880<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3881<li><strong>idir</strong> (<em>str</em>) – Path to the temporary directory for MARS retrieval data.</li>
3882<li><strong>odir</strong> (<em>str</em>) – Path to the final output directory where the FLEXPART input files
3883will be stored.</li>
3884<li><strong>fpdir</strong> (<em>str</em>) – Path to FLEXPART root directory.</li>
3885<li><strong>fedir</strong> (<em>str</em>) – Path to flex_extract root directory.</li>
3886</ul>
3887</td>
3888</tr>
3889<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
3890<li><strong>odir</strong> (<em>str</em>) – Path to the final output directory where the FLEXPART input files
3891will be stored.</li>
3892<li><strong>fpdir</strong> (<em>str</em>) – Path to FLEXPART root directory.</li>
3893</ul>
3894</p>
3895</td>
3896</tr>
3897</tbody>
3898</table>
3899</dd></dl>
3900
3901<dl class="function">
3902<dt id="checks.check_ppid">
3903<code class="descclassname">checks.</code><code class="descname">check_ppid</code><span class="sig-paren">(</span><em>c</em>, <em>ppid</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_ppid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_ppid" title="Permalink to this definition"></a></dt>
3904<dd><p>Sets the current PPID.</p>
3905<table class="docutils field-list" frame="void" rules="none">
3906<col class="field-name" />
3907<col class="field-body" />
3908<tbody valign="top">
3909<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3910<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
3911command line.</li>
3912<li><strong>ppid</strong> (<em>int</em><em> or </em><em>None</em>) – Contains the ppid number provided by the command line parameter
3913of is None otherwise.</li>
3914</ul>
3915</td>
3916</tr>
3917</tbody>
3918</table>
3919</dd></dl>
3920
3921<dl class="function">
3922<dt id="checks.check_public">
3923<code class="descclassname">checks.</code><code class="descname">check_public</code><span class="sig-paren">(</span><em>public</em>, <em>dataset</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_public"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_public" title="Permalink to this definition"></a></dt>
3924<dd><p>Check wether the dataset parameter is set for a
3925public data set retrieval.</p>
3926<table class="docutils field-list" frame="void" rules="none">
3927<col class="field-name" />
3928<col class="field-body" />
3929<tbody valign="top">
3930<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3931<li><strong>public</strong> (<em>int</em>) – Specifies if public data are to be retrieved or not.</li>
3932<li><strong>dataset</strong> (<em>str</em>) – Specific name which identifies the public dataset.</li>
3933</ul>
3934</td>
3935</tr>
3936</tbody>
3937</table>
3938</dd></dl>
3939
3940<dl class="function">
3941<dt id="checks.check_purefc">
3942<code class="descclassname">checks.</code><code class="descname">check_purefc</code><span class="sig-paren">(</span><em>ftype</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_purefc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_purefc" title="Permalink to this definition"></a></dt>
3943<dd><p>Check for a pure forecast mode.</p>
3944<table class="docutils field-list" frame="void" rules="none">
3945<col class="field-name" />
3946<col class="field-body" />
3947<tbody valign="top">
3948<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ftype</strong> (<em>list of str</em>) – List of field types.</td>
3949</tr>
3950<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">True if pure forecasts are to be retrieved. False if there are
3951analysis fields in between.</td>
3952</tr>
3953<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">True or False</td>
3954</tr>
3955</tbody>
3956</table>
3957</dd></dl>
3958
3959<dl class="function">
3960<dt id="checks.check_queue">
3961<code class="descclassname">checks.</code><code class="descname">check_queue</code><span class="sig-paren">(</span><em>queue</em>, <em>gateway</em>, <em>destination</em>, <em>ecuid</em>, <em>ecgid</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_queue"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_queue" title="Permalink to this definition"></a></dt>
3962<dd><p>Check if the necessary ECMWF parameters are set if the queue is
3963one of the QUEUES_LIST (in _config).</p>
3964<table class="docutils field-list" frame="void" rules="none">
3965<col class="field-name" />
3966<col class="field-body" />
3967<tbody valign="top">
3968<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3969<li><strong>queue</strong> (<em>str</em>) – Name of the queue if submitted to the ECMWF servers.
3970Used to check if ecuid, ecgid, gateway and destination
3971are set correctly and are not empty.</li>
3972<li><strong>gateway</strong> (<em>str</em>) – The address of the gateway server.</li>
3973<li><strong>destination</strong> (<em>str</em>) – The name of the destination of the gateway server for data
3974transfer through ectrans. E.g. <a class="reference external" href="mailto:name&#37;&#52;&#48;genericSftp">name<span>&#64;</span>genericSftp</a></li>
3975<li><strong>ecuid</strong> (<em>str</em>) – ECMWF user id.</li>
3976<li><strong>ecgid</strong> (<em>str</em>) – ECMWF group id.</li>
3977</ul>
3978</td>
3979</tr>
3980</tbody>
3981</table>
3982</dd></dl>
3983
3984<dl class="function">
3985<dt id="checks.check_request">
3986<code class="descclassname">checks.</code><code class="descname">check_request</code><span class="sig-paren">(</span><em>request</em>, <em>marsfile</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_request" title="Permalink to this definition"></a></dt>
3987<dd><p>Check if there is an old mars request file and remove it.</p>
3988<table class="docutils field-list" frame="void" rules="none">
3989<col class="field-name" />
3990<col class="field-body" />
3991<tbody valign="top">
3992<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3993<li><strong>request</strong> (<em>int</em>) – Selects the mode of retrieval.
39940: Retrieves the data from ECMWF.
39951: Prints the mars requests to an output file.
39962: Retrieves the data and prints the mars request.</li>
3997<li><strong>marsfile</strong> (<em>str</em>) – Path to the mars request file.</li>
3998</ul>
3999</td>
4000</tr>
4001</tbody>
4002</table>
4003</dd></dl>
4004
4005<dl class="function">
4006<dt id="checks.check_step">
4007<code class="descclassname">checks.</code><code class="descname">check_step</code><span class="sig-paren">(</span><em>step</em>, <em>mailfail</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_step"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_step" title="Permalink to this definition"></a></dt>
4008<dd><p>Checks on step format and convert into a list of steps.</p>
4009<p>If the steps were defined with “to” and “by” they are converted into
4010a list of steps. If the steps were set in a string, it is
4011converted into a list.</p>
4012<table class="docutils field-list" frame="void" rules="none">
4013<col class="field-name" />
4014<col class="field-body" />
4015<tbody valign="top">
4016<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4017<li><strong>step</strong> (<em>list of str</em><em> or </em><em>str</em>) – Specifies the forecast time step from forecast base time.
4018Valid values are hours (HH) from forecast base time.</li>
4019<li><strong>mailfail</strong> (<em>list of str</em>) – Contains all email addresses which should be notified.
4020It might also contain just the ecmwf user name which will trigger
4021mailing to the associated email address for this user.</li>
4022</ul>
4023</td>
4024</tr>
4025<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>step</strong> – List of forecast steps in format e.g. [001, 002, …]</p>
4026</td>
4027</tr>
4028<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list of str</p>
4029</td>
4030</tr>
4031</tbody>
4032</table>
4033</dd></dl>
4034
4035<dl class="function">
4036<dt id="checks.check_time">
4037<code class="descclassname">checks.</code><code class="descname">check_time</code><span class="sig-paren">(</span><em>ftime</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_time"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_time" title="Permalink to this definition"></a></dt>
4038<dd><p>Check if time variable is of type list. Otherwise convert to list.</p>
4039<table class="docutils field-list" frame="void" rules="none">
4040<col class="field-name" />
4041<col class="field-body" />
4042<tbody valign="top">
4043<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ftime</strong> (<em>list of str</em><em> or </em><em>str</em>) – The time in hours of the field.</td>
4044</tr>
4045<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>ftime</strong> – The time in hours of the field.</td>
4046</tr>
4047<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list of str</td>
4048</tr>
4049</tbody>
4050</table>
4051</dd></dl>
4052
4053<dl class="function">
4054<dt id="checks.check_type">
4055<code class="descclassname">checks.</code><code class="descname">check_type</code><span class="sig-paren">(</span><em>ftype</em>, <em>steps</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/checks.html#check_type"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#checks.check_type" title="Permalink to this definition"></a></dt>
4056<dd><p>Check if type variable is of type list and if analysis field has
4057forecast step 0.</p>
4058<table class="docutils field-list" frame="void" rules="none">
4059<col class="field-name" />
4060<col class="field-body" />
4061<tbody valign="top">
4062<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4063<li><strong>ftype</strong> (<em>list of str</em><em> or </em><em>str</em>) – List of field types.</li>
4064<li><strong>steps</strong> (<em>str</em>) – Specifies the forecast time step from forecast base time.
4065Valid values are hours (HH) from forecast base time.</li>
4066</ul>
4067</td>
4068</tr>
4069<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>ftype</strong> – List of field types.</p>
4070</td>
4071</tr>
4072<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list of str</p>
4073</td>
4074</tr>
4075</tbody>
4076</table>
4077</dd></dl>
4078
4079</div>
4080<div class="section" id="module-disaggregation">
4081<span id="disaggregation"></span><h3><a class="toc-backref" href="#id15">disaggregation</a><a class="headerlink" href="#module-disaggregation" title="Permalink to this headline"></a></h3>
4082<p>Disaggregation of deaccumulated flux data from an ECMWF model FG field.</p>
4083<dl class="docutils">
4084<dt>Initially the flux data to be concerned are:</dt>
4085<dd><ul class="first last simple">
4086<li>large-scale precipitation</li>
4087<li>convective precipitation</li>
4088<li>surface sensible heat flux</li>
4089<li>surface solar radiation</li>
4090<li>u stress</li>
4091<li>v stress</li>
4092</ul>
4093</dd>
4094</dl>
4095<p>Different versions of disaggregation is provided for rainfall
4096data (darain, modified linear) and the surface fluxes and
4097stress data (dapoly, cubic polynomial).</p>
4098<dl class="function">
4099<dt id="disaggregation.IA3">
4100<code class="descclassname">disaggregation.</code><code class="descname">IA3</code><span class="sig-paren">(</span><em>g</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/disaggregation.html#IA3"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#disaggregation.IA3" title="Permalink to this definition"></a></dt>
4101<dd><p>Interpolation with a non-negative geometric mean based algorithm.</p>
4102<p>The original grid is reconstructed by adding two sampling points in each
4103data series interval. This subgrid is used to keep all information during
4104the interpolation within the associated interval. Additionally, an advanced
4105monotonicity filter is applied to improve the monotonicity properties of
4106the series.</p>
4107<div class="admonition note">
4108<p class="first admonition-title">Note</p>
4109<p>(C) Copyright 2017-2019
4110Sabine Hittmeir, Anne Philipp, Petra Seibert</p>
4111<p class="last">This work is licensed under the Creative Commons Attribution 4.0
4112International License. To view a copy of this license, visit
4113<a class="reference external" href="http://creativecommons.org/licenses/by/4.0/">http://creativecommons.org/licenses/by/4.0/</a> or send a letter to
4114Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.</p>
4115</div>
4116<table class="docutils field-list" frame="void" rules="none">
4117<col class="field-name" />
4118<col class="field-body" />
4119<tbody valign="top">
4120<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>g</strong> (<em>list of float</em>) – Complete data series that will be interpolated having
4121the dimension of the original raw series.</td>
4122</tr>
4123<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>f</strong> – The interpolated data series with additional subgrid points.
4124Its dimension is equal to the length of the input data series
4125times three.</td>
4126</tr>
4127<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list of float</td>
4128</tr>
4129</tbody>
4130</table>
4131<p class="rubric">References</p>
4132<p>For more information see article:
4133Hittmeir, S.; Philipp, A.; Seibert, P. (2017): A conservative
4134interpolation scheme for extensive quantities with application to the
4135Lagrangian particle dispersion model FLEXPART.,
4136Geoscientific Model Development</p>
4137</dd></dl>
4138
4139<dl class="function">
4140<dt id="disaggregation.dapoly">
4141<code class="descclassname">disaggregation.</code><code class="descname">dapoly</code><span class="sig-paren">(</span><em>alist</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/disaggregation.html#dapoly"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#disaggregation.dapoly" title="Permalink to this definition"></a></dt>
4142<dd><p>Cubic polynomial interpolation of deaccumulated fluxes.</p>
4143<p>Interpolation of deaccumulated fluxes of an ECMWF model FG field
4144using a cubic polynomial solution which conserves the integrals
4145of the fluxes within each timespan.
4146Disaggregation is done for 4 accumluated timespans which
4147generates a new, disaggregated value which is output at the
4148central point of the 4 accumulation timespans.
4149This new point is used for linear interpolation of the complete
4150timeseries afterwards.</p>
4151<table class="docutils field-list" frame="void" rules="none">
4152<col class="field-name" />
4153<col class="field-body" />
4154<tbody valign="top">
4155<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alist</strong> (<em>list of array of float</em>) – List of 4 timespans as 2-dimensional, horizontal fields.
4156E.g. [[array_t1], [array_t2], [array_t3], [array_t4]]</td>
4157</tr>
4158<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>nfield</strong> – Interpolated flux at central point of accumulation timespan.</td>
4159</tr>
4160<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">array of float</td>
4161</tr>
4162</tbody>
4163</table>
4164<div class="admonition note">
4165<p class="first admonition-title">Note</p>
4166<dl class="last docutils">
4167<dt>March 2000 <span class="classifier-delimiter">:</span> <span class="classifier">P. JAMES</span></dt>
4168<dd>Original author</dd>
4169<dt>June 2003 <span class="classifier-delimiter">:</span> <span class="classifier">A. BECK</span></dt>
4170<dd>Adaptations</dd>
4171<dt>November 2015 <span class="classifier-delimiter">:</span> <span class="classifier">Leopold Haimberger (University of Vienna)</span></dt>
4172<dd>Migration from Fortran to Python</dd>
4173</dl>
4174</div>
4175</dd></dl>
4176
4177<dl class="function">
4178<dt id="disaggregation.darain">
4179<code class="descclassname">disaggregation.</code><code class="descname">darain</code><span class="sig-paren">(</span><em>alist</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/disaggregation.html#darain"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#disaggregation.darain" title="Permalink to this definition"></a></dt>
4180<dd><p>Linear interpolation of deaccumulated fluxes.</p>
4181<p>Interpolation of deaccumulated fluxes of an ECMWF model FG rainfall
4182field using a modified linear solution which conserves the integrals
4183of the fluxes within each timespan.
4184Disaggregation is done for 4 accumluated timespans which generates
4185a new, disaggregated value which is output at the central point
4186of the 4 accumulation timespans. This new point is used for linear
4187interpolation of the complete timeseries afterwards.</p>
4188<table class="docutils field-list" frame="void" rules="none">
4189<col class="field-name" />
4190<col class="field-body" />
4191<tbody valign="top">
4192<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alist</strong> (<em>list of array of float</em>) – List of 4 timespans as 2-dimensional, horizontal fields.
4193E.g. [[array_t1], [array_t2], [array_t3], [array_t4]]</td>
4194</tr>
4195<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>nfield</strong> – Interpolated flux at central point of accumulation timespan.</td>
4196</tr>
4197<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">array of float</td>
4198</tr>
4199</tbody>
4200</table>
4201<div class="admonition note">
4202<p class="first admonition-title">Note</p>
4203<dl class="last docutils">
4204<dt>March 2000 <span class="classifier-delimiter">:</span> <span class="classifier">P. JAMES</span></dt>
4205<dd>Original author</dd>
4206<dt>June 2003 <span class="classifier-delimiter">:</span> <span class="classifier">A. BECK</span></dt>
4207<dd>Adaptations</dd>
4208<dt>November 2015 <span class="classifier-delimiter">:</span> <span class="classifier">Leopold Haimberger (University of Vienna)</span></dt>
4209<dd>Migration from Fortran to Python</dd>
4210</dl>
4211</div>
4212</dd></dl>
4213
4214<div class="toctree-wrapper compound">
4215</div>
4216</div>
4217</div>
4218</div>
4219
4220
4221           </div>
4222           
4223          </div>
4224          <footer>
4225 
4226    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
4227     
4228        <a href="api_fortran.html" class="btn btn-neutral float-right" title="Fortran’s Auto Generated Documentation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
4229     
4230     
4231        <a href="../api.html" class="btn btn-neutral float-left" title="Auto Generated Documentation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
4232     
4233    </div>
4234 
4235
4236  <hr/>
4237
4238  <div role="contentinfo">
4239    <p>
4240        &copy; Copyright 2019, Anne Philipp and Leopold Haimberger
4241
4242    </p>
4243  </div>
4244  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
4245
4246</footer>
4247
4248        </div>
4249      </div>
4250
4251    </section>
4252
4253  </div>
4254 
4255
4256
4257  <script type="text/javascript">
4258      jQuery(function () {
4259          SphinxRtdTheme.Navigation.enable(true);
4260      });
4261  </script>
4262
4263 
4264 
4265   
4266   
4267
4268</body>
4269</html>
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG