source: flex_extract.git/Documentation/html/Documentation/Api/api_python.html @ 0690a6c

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

capitalize all directory names and adapt pathes in files

  • Property mode set to 100644
File size: 213.0 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<dl class="method">
2219<dt id="GribUtil.GribUtil.copy_dummy_msg">
2220<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='w'</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>
2221<dd><p>Add the content of another input grib file to the objects file but
2222only messages corresponding to keys/values passed to the function.
2223The selectWhere switch decides if to copy the keys equal to (True) or
2224different to (False) the keynames/keyvalues list passed to the function.</p>
2225<table class="docutils field-list" frame="void" rules="none">
2226<col class="field-name" />
2227<col class="field-body" />
2228<tbody valign="top">
2229<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2230<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>
2231<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
2232different to (False) the keynames/keyvalues list passed to the
2233function. Default is True.</li>
2234<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>
2235<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>
2236<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 “w”.</li>
2237</ul>
2238</td>
2239</tr>
2240</tbody>
2241</table>
2242</dd></dl>
2243
2244<dl class="method">
2245<dt id="GribUtil.GribUtil.get_keys">
2246<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>
2247<dd><p>Get keyvalues for a given list of keynames a where statement
2248can be given (list of key and list of values)</p>
2249<table class="docutils field-list" frame="void" rules="none">
2250<col class="field-name" />
2251<col class="field-body" />
2252<tbody valign="top">
2253<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2254<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>
2255<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>
2256<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>
2257</ul>
2258</td>
2259</tr>
2260<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>
2261</td>
2262</tr>
2263<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>
2264</td>
2265</tr>
2266</tbody>
2267</table>
2268</dd></dl>
2269
2270<dl class="method">
2271<dt id="GribUtil.GribUtil.index">
2272<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>
2273<dd><p>Create index file from a list of files if it does not exist or
2274read an index file.</p>
2275<table class="docutils field-list" frame="void" rules="none">
2276<col class="field-name" />
2277<col class="field-body" />
2278<tbody valign="top">
2279<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2280<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
2281which the index is to be created.
2282Default is a list with a single entry string “mars”.</li>
2283<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.
2284Default is “my.idx”.</li>
2285</ul>
2286</td>
2287</tr>
2288<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>
2289</td>
2290</tr>
2291<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>
2292</td>
2293</tr>
2294</tbody>
2295</table>
2296</dd></dl>
2297
2298<dl class="method">
2299<dt id="GribUtil.GribUtil.set_keys">
2300<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='w'</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>
2301<dd><p>Opens the file to read the grib messages and then write
2302the selected messages (with wherekeys) to a new output file.
2303Also, the keyvalues of the passed list of keynames are set.</p>
2304<table class="docutils field-list" frame="void" rules="none">
2305<col class="field-name" />
2306<col class="field-body" />
2307<tbody valign="top">
2308<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2309<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>
2310<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.
2311Default is an empty list.</li>
2312<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.
2313Default is an empty list.</li>
2314<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.
2315Default value is an empty list.</li>
2316<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.
2317Default value is an empty list.</li>
2318<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
2319is written out the grib file (False) or only those
2320meeting the where statement (True). Default is False.</li>
2321<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 “w”.</li>
2322</ul>
2323</td>
2324</tr>
2325</tbody>
2326</table>
2327</dd></dl>
2328
2329</dd></dl>
2330
2331</div>
2332<div class="section" id="module-MarsRetrieval">
2333<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>
2334<dl class="class">
2335<dt id="MarsRetrieval.MarsRetrieval">
2336<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>
2337<dd><p>Specific syntax and content for submission of MARS retrievals.</p>
2338<p>A MARS revtrieval has a specific syntax with a selection of keywords and
2339their corresponding values. This class provides the necessary functions
2340by displaying the selected parameters and their values and the actual
2341retrievement of the data through a mars request or a Python web api
2342interface. The initialization already expects all the keyword values.</p>
2343<p>A description of MARS keywords/arguments and examples of their
2344values can be found here:
2345<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>
2346<dl class="attribute">
2347<dt id="MarsRetrieval.MarsRetrieval.server">
2348<code class="descname">server</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.server" title="Permalink to this definition"></a></dt>
2349<dd><p>This is the connection to the ECMWF data servers.</p>
2350<table class="docutils field-list" frame="void" rules="none">
2351<col class="field-name" />
2352<col class="field-body" />
2353<tbody valign="top">
2354<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">ECMWFService or ECMWFDataServer</td>
2355</tr>
2356</tbody>
2357</table>
2358</dd></dl>
2359
2360<dl class="attribute">
2361<dt id="MarsRetrieval.MarsRetrieval.public">
2362<code class="descname">public</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.public" title="Permalink to this definition"></a></dt>
2363<dd><p>Decides which Web API Server version is used.</p>
2364<table class="docutils field-list" frame="void" rules="none">
2365<col class="field-name" />
2366<col class="field-body" />
2367<tbody valign="top">
2368<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">int</td>
2369</tr>
2370</tbody>
2371</table>
2372</dd></dl>
2373
2374<dl class="attribute">
2375<dt id="MarsRetrieval.MarsRetrieval.marsclass">
2376<code class="descname">marsclass</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.marsclass" title="Permalink to this definition"></a></dt>
2377<dd><p>Characterisation of dataset.</p>
2378<table class="docutils field-list" frame="void" rules="none">
2379<col class="field-name" />
2380<col class="field-body" />
2381<tbody valign="top">
2382<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2383</tr>
2384</tbody>
2385</table>
2386</dd></dl>
2387
2388<dl class="attribute">
2389<dt id="MarsRetrieval.MarsRetrieval.dataset">
2390<code class="descname">dataset</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.dataset" title="Permalink to this definition"></a></dt>
2391<dd><p>For public datasets there is the specific naming and parameter
2392dataset which has to be used to characterize the type of
2393data.</p>
2394<table class="docutils field-list" frame="void" rules="none">
2395<col class="field-name" />
2396<col class="field-body" />
2397<tbody valign="top">
2398<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2399</tr>
2400</tbody>
2401</table>
2402</dd></dl>
2403
2404<dl class="attribute">
2405<dt id="MarsRetrieval.MarsRetrieval.type">
2406<code class="descname">type</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.type" title="Permalink to this definition"></a></dt>
2407<dd><p>Determines the type of fields to be retrieved.</p>
2408<table class="docutils field-list" frame="void" rules="none">
2409<col class="field-name" />
2410<col class="field-body" />
2411<tbody valign="top">
2412<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2413</tr>
2414</tbody>
2415</table>
2416</dd></dl>
2417
2418<dl class="attribute">
2419<dt id="MarsRetrieval.MarsRetrieval.levtype">
2420<code class="descname">levtype</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.levtype" title="Permalink to this definition"></a></dt>
2421<dd><p>Denotes type of level.</p>
2422<table class="docutils field-list" frame="void" rules="none">
2423<col class="field-name" />
2424<col class="field-body" />
2425<tbody valign="top">
2426<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2427</tr>
2428</tbody>
2429</table>
2430</dd></dl>
2431
2432<dl class="attribute">
2433<dt id="MarsRetrieval.MarsRetrieval.levelist">
2434<code class="descname">levelist</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.levelist" title="Permalink to this definition"></a></dt>
2435<dd><p>Specifies the required levels.</p>
2436<table class="docutils field-list" frame="void" rules="none">
2437<col class="field-name" />
2438<col class="field-body" />
2439<tbody valign="top">
2440<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2441</tr>
2442</tbody>
2443</table>
2444</dd></dl>
2445
2446<dl class="attribute">
2447<dt id="MarsRetrieval.MarsRetrieval.repres">
2448<code class="descname">repres</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.repres" title="Permalink to this definition"></a></dt>
2449<dd><p>Selects the representation of the archived data.</p>
2450<table class="docutils field-list" frame="void" rules="none">
2451<col class="field-name" />
2452<col class="field-body" />
2453<tbody valign="top">
2454<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2455</tr>
2456</tbody>
2457</table>
2458</dd></dl>
2459
2460<dl class="attribute">
2461<dt id="MarsRetrieval.MarsRetrieval.date">
2462<code class="descname">date</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.date" title="Permalink to this definition"></a></dt>
2463<dd><p>Specifies the Analysis date, the Forecast base date or
2464Observations date.</p>
2465<table class="docutils field-list" frame="void" rules="none">
2466<col class="field-name" />
2467<col class="field-body" />
2468<tbody valign="top">
2469<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2470</tr>
2471</tbody>
2472</table>
2473</dd></dl>
2474
2475<dl class="attribute">
2476<dt id="MarsRetrieval.MarsRetrieval.resol">
2477<code class="descname">resol</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.resol" title="Permalink to this definition"></a></dt>
2478<dd><p>Specifies the desired triangular truncation of retrieved data,
2479before carrying out any other selected post-processing.</p>
2480<table class="docutils field-list" frame="void" rules="none">
2481<col class="field-name" />
2482<col class="field-body" />
2483<tbody valign="top">
2484<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2485</tr>
2486</tbody>
2487</table>
2488</dd></dl>
2489
2490<dl class="attribute">
2491<dt id="MarsRetrieval.MarsRetrieval.stream">
2492<code class="descname">stream</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.stream" title="Permalink to this definition"></a></dt>
2493<dd><p>Identifies the forecasting system used to generate the data.</p>
2494<table class="docutils field-list" frame="void" rules="none">
2495<col class="field-name" />
2496<col class="field-body" />
2497<tbody valign="top">
2498<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2499</tr>
2500</tbody>
2501</table>
2502</dd></dl>
2503
2504<dl class="attribute">
2505<dt id="MarsRetrieval.MarsRetrieval.area">
2506<code class="descname">area</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.area" title="Permalink to this definition"></a></dt>
2507<dd><p>Specifies the desired sub-area of data to be extracted.</p>
2508<table class="docutils field-list" frame="void" rules="none">
2509<col class="field-name" />
2510<col class="field-body" />
2511<tbody valign="top">
2512<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2513</tr>
2514</tbody>
2515</table>
2516</dd></dl>
2517
2518<dl class="attribute">
2519<dt id="MarsRetrieval.MarsRetrieval.time">
2520<code class="descname">time</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.time" title="Permalink to this definition"></a></dt>
2521<dd><p>Specifies the time of the data in hours and minutes.</p>
2522<table class="docutils field-list" frame="void" rules="none">
2523<col class="field-name" />
2524<col class="field-body" />
2525<tbody valign="top">
2526<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2527</tr>
2528</tbody>
2529</table>
2530</dd></dl>
2531
2532<dl class="attribute">
2533<dt id="MarsRetrieval.MarsRetrieval.step">
2534<code class="descname">step</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.step" title="Permalink to this definition"></a></dt>
2535<dd><p>Specifies the forecast time step from forecast base time.</p>
2536<table class="docutils field-list" frame="void" rules="none">
2537<col class="field-name" />
2538<col class="field-body" />
2539<tbody valign="top">
2540<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2541</tr>
2542</tbody>
2543</table>
2544</dd></dl>
2545
2546<dl class="attribute">
2547<dt id="MarsRetrieval.MarsRetrieval.expver">
2548<code class="descname">expver</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.expver" title="Permalink to this definition"></a></dt>
2549<dd><p>The version of the dataset.</p>
2550<table class="docutils field-list" frame="void" rules="none">
2551<col class="field-name" />
2552<col class="field-body" />
2553<tbody valign="top">
2554<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2555</tr>
2556</tbody>
2557</table>
2558</dd></dl>
2559
2560<dl class="attribute">
2561<dt id="MarsRetrieval.MarsRetrieval.number">
2562<code class="descname">number</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.number" title="Permalink to this definition"></a></dt>
2563<dd><p>Selects the member in ensemble forecast run.</p>
2564<table class="docutils field-list" frame="void" rules="none">
2565<col class="field-name" />
2566<col class="field-body" />
2567<tbody valign="top">
2568<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2569</tr>
2570</tbody>
2571</table>
2572</dd></dl>
2573
2574<dl class="attribute">
2575<dt id="MarsRetrieval.MarsRetrieval.accuracy">
2576<code class="descname">accuracy</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.accuracy" title="Permalink to this definition"></a></dt>
2577<dd><p>Specifies the number of bits per value to be used in the
2578generated GRIB coded fields.</p>
2579<table class="docutils field-list" frame="void" rules="none">
2580<col class="field-name" />
2581<col class="field-body" />
2582<tbody valign="top">
2583<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2584</tr>
2585</tbody>
2586</table>
2587</dd></dl>
2588
2589<dl class="attribute">
2590<dt id="MarsRetrieval.MarsRetrieval.grid">
2591<code class="descname">grid</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.grid" title="Permalink to this definition"></a></dt>
2592<dd><p>Specifies the output grid which can be either a Gaussian grid
2593or a Latitude/Longitude grid.</p>
2594<table class="docutils field-list" frame="void" rules="none">
2595<col class="field-name" />
2596<col class="field-body" />
2597<tbody valign="top">
2598<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2599</tr>
2600</tbody>
2601</table>
2602</dd></dl>
2603
2604<dl class="attribute">
2605<dt id="MarsRetrieval.MarsRetrieval.gaussian">
2606<code class="descname">gaussian</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.gaussian" title="Permalink to this definition"></a></dt>
2607<dd><p>This parameter is deprecated and should no longer be used.
2608Specifies the desired type of Gaussian grid for the output.</p>
2609<table class="docutils field-list" frame="void" rules="none">
2610<col class="field-name" />
2611<col class="field-body" />
2612<tbody valign="top">
2613<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2614</tr>
2615</tbody>
2616</table>
2617</dd></dl>
2618
2619<dl class="attribute">
2620<dt id="MarsRetrieval.MarsRetrieval.target">
2621<code class="descname">target</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.target" title="Permalink to this definition"></a></dt>
2622<dd><p>Specifies a file into which data is to be written after
2623retrieval or manipulation.</p>
2624<table class="docutils field-list" frame="void" rules="none">
2625<col class="field-name" />
2626<col class="field-body" />
2627<tbody valign="top">
2628<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2629</tr>
2630</tbody>
2631</table>
2632</dd></dl>
2633
2634<dl class="attribute">
2635<dt id="MarsRetrieval.MarsRetrieval.param">
2636<code class="descname">param</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.param" title="Permalink to this definition"></a></dt>
2637<dd><p>Specifies the meteorological parameter.</p>
2638<table class="docutils field-list" frame="void" rules="none">
2639<col class="field-name" />
2640<col class="field-body" />
2641<tbody valign="top">
2642<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str, optional</td>
2643</tr>
2644</tbody>
2645</table>
2646</dd></dl>
2647
2648<dl class="method">
2649<dt id="MarsRetrieval.MarsRetrieval.data_retrieve">
2650<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>
2651<dd><p>Submits a MARS retrieval. Depending on the existence of
2652ECMWF Web-API or CDS API it is submitted via Python or a
2653subprocess in the Shell. The parameter for the mars retrieval
2654are taken from the defined class attributes.</p>
2655</dd></dl>
2656
2657<dl class="method">
2658<dt id="MarsRetrieval.MarsRetrieval.display_info">
2659<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>
2660<dd><p>Prints all class attributes and their values to the
2661standard output.</p>
2662</dd></dl>
2663
2664<dl class="method">
2665<dt id="MarsRetrieval.MarsRetrieval.print_infodata_csv">
2666<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>
2667<dd><p>Write all request parameter in alpabetical order into a “csv” file.</p>
2668<table class="docutils field-list" frame="void" rules="none">
2669<col class="field-name" />
2670<col class="field-body" />
2671<tbody valign="top">
2672<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2673<li><strong>inputdir</strong> (<em>str</em>) – The path where all data from the retrievals are stored.</li>
2674<li><strong>request_number</strong> (<em>int</em>) – Number of mars requests for flux and non-flux data.</li>
2675</ul>
2676</td>
2677</tr>
2678</tbody>
2679</table>
2680</dd></dl>
2681
2682</dd></dl>
2683
2684</div>
2685<div class="section" id="module-UioFiles">
2686<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>
2687<dl class="class">
2688<dt id="UioFiles.UioFiles">
2689<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>
2690<dd><p>Collection of files matching a specific pattern.</p>
2691<p>The pattern can contain regular expressions for the files.
2692The files are listed and can be transformed to a single string or
2693they can be deleted.</p>
2694<dl class="attribute">
2695<dt id="UioFiles.UioFiles.path">
2696<code class="descname">path</code><a class="headerlink" href="#UioFiles.UioFiles.path" title="Permalink to this definition"></a></dt>
2697<dd><p>Directory where to list the files.</p>
2698<table class="docutils field-list" frame="void" rules="none">
2699<col class="field-name" />
2700<col class="field-body" />
2701<tbody valign="top">
2702<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
2703</tr>
2704</tbody>
2705</table>
2706</dd></dl>
2707
2708<dl class="attribute">
2709<dt id="UioFiles.UioFiles.pattern">
2710<code class="descname">pattern</code><a class="headerlink" href="#UioFiles.UioFiles.pattern" title="Permalink to this definition"></a></dt>
2711<dd><p>Regular expression pattern. For example: ‘*.grb’</p>
2712<table class="docutils field-list" frame="void" rules="none">
2713<col class="field-name" />
2714<col class="field-body" />
2715<tbody valign="top">
2716<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">str</td>
2717</tr>
2718</tbody>
2719</table>
2720</dd></dl>
2721
2722<dl class="attribute">
2723<dt id="UioFiles.UioFiles.files">
2724<code class="descname">files</code><a class="headerlink" href="#UioFiles.UioFiles.files" title="Permalink to this definition"></a></dt>
2725<dd><p>List of files matching the pattern in the path.</p>
2726<table class="docutils field-list" frame="void" rules="none">
2727<col class="field-name" />
2728<col class="field-body" />
2729<tbody valign="top">
2730<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of str</td>
2731</tr>
2732</tbody>
2733</table>
2734</dd></dl>
2735
2736<dl class="method">
2737<dt id="UioFiles.UioFiles.delete_files">
2738<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>
2739<dd><p>Deletes the files.</p>
2740</dd></dl>
2741
2742</dd></dl>
2743
2744</div>
2745</div>
2746<div class="section" id="modules">
2747<h2><a class="toc-backref" href="#id10">Modules</a><a class="headerlink" href="#modules" title="Permalink to this headline"></a></h2>
2748<div class="section" id="module-get_mars_data">
2749<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>
2750<p>This script extracts MARS data from ECMWF servers.</p>
2751<p>At first, the necessary parameters from command line and CONTROL files are
2752extracted. They define the data set to be extracted from MARS.</p>
2753<p>This file can also be imported as a module and contains the following
2754functions:</p>
2755<blockquote>
2756<div><ul class="simple">
2757<li>main - the main function of the script</li>
2758<li>get_mars_data - overall control of ECMWF data retrievment</li>
2759<li>write_reqheader - writes the header into the mars_request file</li>
2760<li>mk_server - creates the server connection to ECMWF servers</li>
2761<li>mk_dates - defines the start and end date</li>
2762<li>remove_old - deletes old retrieved grib files</li>
2763<li>do_retrievement - creates individual retrievals</li>
2764</ul>
2765</div></blockquote>
2766<p>Type: get_mars_data.py –help
2767to get information about command line parameters.
2768Read the documentation for usage instructions.</p>
2769<dl class="function">
2770<dt id="get_mars_data.check_dates_for_nonflux_fc_times">
2771<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>
2772<dd></dd></dl>
2773
2774<dl class="function">
2775<dt id="get_mars_data.do_retrievement">
2776<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>
2777<dd><p>Divides the complete retrieval period in smaller chunks and
2778retrieves the data from MARS.</p>
2779<table class="docutils field-list" frame="void" rules="none">
2780<col class="field-name" />
2781<col class="field-body" />
2782<tbody valign="top">
2783<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2784<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
2785command line.</li>
2786<li><strong>server</strong> (<em>ECMWFService</em><em> or </em><em>ECMWFDataServer</em>) – The server connection to ECMWF.</li>
2787<li><strong>start</strong> (<em>datetime</em>) – The start date of the retrieval.</li>
2788<li><strong>end</strong> (<em>datetime</em>) – The end date of the retrieval.</li>
2789<li><strong>delta_t</strong> (<em>datetime</em>) – Delta_t + 1 is the maximal time period of a single
2790retrieval.</li>
2791<li><strong>fluxes</strong> (<em>boolean</em><em>, </em><em>optional</em>) – Decides if the flux parameters are to be retrieved or
2792the rest of the parameter list.
2793Default value is False.</li>
2794</ul>
2795</td>
2796</tr>
2797</tbody>
2798</table>
2799</dd></dl>
2800
2801<dl class="function">
2802<dt id="get_mars_data.get_mars_data">
2803<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>
2804<dd><p>Retrieves the EC data needed for a FLEXPART simulation.</p>
2805<p>Start and end dates for retrieval period is set. Retrievals
2806are divided into smaller periods if necessary and datechunk parameter
2807is set.</p>
2808<table class="docutils field-list" frame="void" rules="none">
2809<col class="field-name" />
2810<col class="field-body" />
2811<tbody valign="top">
2812<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
2813command line.</td>
2814</tr>
2815</tbody>
2816</table>
2817</dd></dl>
2818
2819<dl class="function">
2820<dt id="get_mars_data.main">
2821<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>
2822<dd><p>Controls the program to get data out of mars.</p>
2823<p>This is done if it is called directly from command line.
2824Then it also takes program call arguments and control file input.</p>
2825</dd></dl>
2826
2827<dl class="function">
2828<dt id="get_mars_data.mk_dates">
2829<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>
2830<dd><p>Prepares start and end date depending on flux or non flux data.</p>
2831<p>If forecast for maximum one day (upto 24h) are to be retrieved, then
2832collect accumulation data (flux data) with additional days in the
2833beginning and at the end (used for complete disaggregation of
2834original period)</p>
2835<p>If forecast data longer than 24h are to be retrieved, then
2836collect accumulation data (flux data) with the exact start and end date
2837(disaggregation will be done for the exact time period with
2838boundary conditions)</p>
2839<p>Since for basetime the extraction contains the 12 hours upfront,
2840if basetime is 0, the starting date has to be the day before and</p>
2841<table class="docutils field-list" frame="void" rules="none">
2842<col class="field-name" />
2843<col class="field-body" />
2844<tbody valign="top">
2845<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2846<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
2847command line.</li>
2848<li><strong>fluxes</strong> (<em>boolean</em><em>, </em><em>optional</em>) – Decides if the flux parameter settings are stored or
2849the rest of the parameter list.
2850Default value is False.</li>
2851</ul>
2852</td>
2853</tr>
2854<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
2855<li><strong>start</strong> (<em>datetime</em>) – The start date of the retrieving data set.</li>
2856<li><strong>end</strong> (<em>datetime</em>) – The end date of the retrieving data set.</li>
2857<li><strong>chunk</strong> (<em>datetime</em>) – Time period in days for one single mars retrieval.</li>
2858</ul>
2859</p>
2860</td>
2861</tr>
2862</tbody>
2863</table>
2864</dd></dl>
2865
2866<dl class="function">
2867<dt id="get_mars_data.mk_server">
2868<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>
2869<dd><p>Creates a server connection with available python API.</p>
2870<p>Which API is used depends on availability and the dataset to be retrieved.
2871The CDS API is used for ERA5 dataset no matter if the user is a member or
2872a public user. ECMWF WebAPI is used for all other available datasets.</p>
2873<table class="docutils field-list" frame="void" rules="none">
2874<col class="field-name" />
2875<col class="field-body" />
2876<tbody valign="top">
2877<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
2878command line.</td>
2879</tr>
2880<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>
2881</tr>
2882<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">ECMWFDataServer, ECMWFService or Client</td>
2883</tr>
2884</tbody>
2885</table>
2886</dd></dl>
2887
2888<dl class="function">
2889<dt id="get_mars_data.remove_old">
2890<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>
2891<dd><p>Deletes old retrieval files from current input directory
2892matching the pattern.</p>
2893<table class="docutils field-list" frame="void" rules="none">
2894<col class="field-name" />
2895<col class="field-body" />
2896<tbody valign="top">
2897<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2898<li><strong>pattern</strong> (<em>str</em>) – The sub string pattern which identifies the files to be deleted.</li>
2899<li><strong>inputdir</strong> (<em>str</em><em>, </em><em>optional</em>) – Path to the directory where the retrieved data is stored.</li>
2900</ul>
2901</td>
2902</tr>
2903</tbody>
2904</table>
2905</dd></dl>
2906
2907<dl class="function">
2908<dt id="get_mars_data.write_reqheader">
2909<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>
2910<dd><p>Writes header with column names into mars request file.</p>
2911<table class="docutils field-list" frame="void" rules="none">
2912<col class="field-name" />
2913<col class="field-body" />
2914<tbody valign="top">
2915<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>
2916</tr>
2917</tbody>
2918</table>
2919</dd></dl>
2920
2921</div>
2922<div class="section" id="module-prepare_flexpart">
2923<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>
2924<p>This script prepares the final version of the grib files which are
2925then used by FLEXPART.</p>
2926<p>It converts the bunch of grib files extracted via get_mars_data before,
2927by doing the necessary conversion to get consistent grids or the
2928disaggregation of flux data. Finally, the data fields are combined
2929in files per available hour with the naming convention xxYYMMDDHH,
2930where xx should be 2 arbitrary letters (mostly xx is chosen to be “EN”).</p>
2931<p>This file can also be imported as a module which then contains the following
2932functions:</p>
2933<blockquote>
2934<div><ul class="simple">
2935<li>main</li>
2936<li>prepare_flexpart</li>
2937</ul>
2938</div></blockquote>
2939<p>Type: prepare_flexpart.py –help
2940to get information about command line parameters.
2941Read the documentation for usage instructions.</p>
2942<dl class="function">
2943<dt id="prepare_flexpart.main">
2944<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>
2945<dd><p>Controls the program to prepare flexpart input files from mars data.</p>
2946<p>This is done if it is called directly from command line.
2947Then it also takes program call arguments and control file input.</p>
2948</dd></dl>
2949
2950<dl class="function">
2951<dt id="prepare_flexpart.prepare_flexpart">
2952<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>
2953<dd><p>Converts the mars data into flexpart ready input files.</p>
2954<p>Specific data fields are converted to a different grid and the flux
2955data are going to be disaggregated. The data fields are collected by
2956hour and stored in a file with a specific FLEXPART relevant naming
2957convention.</p>
2958<table class="docutils field-list" frame="void" rules="none">
2959<col class="field-name" />
2960<col class="field-body" />
2961<tbody valign="top">
2962<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2963<li><strong>ppid</strong> (<em>int</em>) – Contains the ppid number of the current ECMWF job. It will be None if
2964the method was called within this module.</li>
2965<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
2966command line.</li>
2967</ul>
2968</td>
2969</tr>
2970</tbody>
2971</table>
2972</dd></dl>
2973
2974</div>
2975<div class="section" id="module-tools">
2976<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>
2977<p>This module contains a collection of diverse tasks within flex_extract.</p>
2978<dl class="function">
2979<dt id="tools.clean_up">
2980<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>
2981<dd><p>Remove files from the intermediate directory (inputdir).</p>
2982<p>It keeps the final FLEXPART input files if program runs without
2983ECMWF Api and keywords “ectrans” or “ecstorage” are set to “1”.</p>
2984<table class="docutils field-list" frame="void" rules="none">
2985<col class="field-name" />
2986<col class="field-body" />
2987<tbody valign="top">
2988<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
2989command line.</td>
2990</tr>
2991</tbody>
2992</table>
2993</dd></dl>
2994
2995<dl class="function">
2996<dt id="tools.execute_subprocess">
2997<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>
2998<dd><p>Executes a command line instruction via a subprocess.</p>
2999<p>Error handling is done if an error occures.</p>
3000<table class="docutils field-list" frame="void" rules="none">
3001<col class="field-name" />
3002<col class="field-body" />
3003<tbody valign="top">
3004<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
3005list entry is a single part of the command which is seperated from
3006the rest by a blank space.
3007E.g. [‘mv’, file1, file2]</td>
3008</tr>
3009<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.
3010By default it will just tell “SUBPROCESS FAILED!”.</td>
3011</tr>
3012<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str, optional</td>
3013</tr>
3014</tbody>
3015</table>
3016</dd></dl>
3017
3018<dl class="function">
3019<dt id="tools.generate_retrieval_period_boundary">
3020<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>
3021<dd><p>Generates retrieval period boundary datetimes from CONTROL information.</p>
3022<table class="docutils field-list" frame="void" rules="none">
3023<col class="field-name" />
3024<col class="field-body" />
3025<tbody valign="top">
3026<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
3027command line.</td>
3028</tr>
3029<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><ul class="simple">
3030<li><strong>start_period</strong> (<em>datetime</em>) – The first timestamp of the actual retrieval period disregarding
3031the temporary times which were used for processing reasons.</li>
3032<li><strong>end_period</strong> (<em>datetime</em>) – The last timestamp of the actual retrieval period disregarding
3033the temporary times which were used for processing reasons.</li>
3034</ul>
3035</td>
3036</tr>
3037</tbody>
3038</table>
3039</dd></dl>
3040
3041<dl class="function">
3042<dt id="tools.get_cmdline_args">
3043<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>
3044<dd><p>Decomposes the command line arguments and assigns them to variables.
3045Apply default values for non mentioned arguments.</p>
3046<table class="docutils field-list" frame="void" rules="none">
3047<col class="field-name" />
3048<col class="field-body" />
3049<tbody valign="top">
3050<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>
3051</tr>
3052<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">Namespace</td>
3053</tr>
3054</tbody>
3055</table>
3056</dd></dl>
3057
3058<dl class="function">
3059<dt id="tools.get_dimensions">
3060<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>
3061<dd><p>This function specifies the correct dimensions for x, y and t.</p>
3062<table class="docutils field-list" frame="void" rules="none">
3063<col class="field-name" />
3064<col class="field-body" />
3065<tbody valign="top">
3066<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3067<li><strong>info</strong> (<em>dict</em>) – Contains basic informations of the ECMWF grib files, e.g.
3068‘Ni’, ‘Nj’, ‘latitudeOfFirstGridPointInDegrees’,
3069‘longitudeOfFirstGridPointInDegrees’, ‘latitudeOfLastGridPointInDegrees’,
3070‘longitudeOfLastGridPointInDegrees’, ‘jDirectionIncrementInDegrees’,
3071‘iDirectionIncrementInDegrees’, ‘missingValue’</li>
3072<li><strong>purefc</strong> (<em>int</em>) – Switch for definition of pure forecast mode or not.</li>
3073<li><strong>dtime</strong> (<em>str</em>) – Time step in hours.</li>
3074<li><strong>index_vals</strong> (<em>list of list of str</em>) – Contains the values from the keys used for a distinct selection
3075of grib messages in processing  the grib files.
3076Content looks like e.g.:
3077index_vals[0]: (‘20171106’, ‘20171107’, ‘20171108’) ; date
3078index_vals[1]: (‘0’, ‘1200’, ‘1800’, ‘600’) ; time
3079index_vals[2]: (‘0’, ‘12’, ‘3’, ‘6’, ‘9’) ; stepRange</li>
3080<li><strong>start_date</strong> (<em>str</em>) – The start date of the retrieval job.</li>
3081<li><strong>end_date</strong> (<em>str</em>) – The end date of the retrieval job.</li>
3082</ul>
3083</td>
3084</tr>
3085<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>
3086</td>
3087</tr>
3088<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">tuple of int</p>
3089</td>
3090</tr>
3091</tbody>
3092</table>
3093</dd></dl>
3094
3095<dl class="function">
3096<dt id="tools.get_informations">
3097<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>
3098<dd><p>Gets basic information from an example grib file.</p>
3099<p>These information are important for later use and the
3100initialization of numpy arrays for data storing.</p>
3101<table class="docutils field-list" frame="void" rules="none">
3102<col class="field-name" />
3103<col class="field-body" />
3104<tbody valign="top">
3105<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>
3106</tr>
3107<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.
3108‘Ni’, ‘Nj’, ‘latitudeOfFirstGridPointInDegrees’,
3109‘longitudeOfFirstGridPointInDegrees’, ‘latitudeOfLastGridPointInDegrees’,
3110‘longitudeOfLastGridPointInDegrees’, ‘jDirectionIncrementInDegrees’,
3111‘iDirectionIncrementInDegrees’, ‘missingValue’</td>
3112</tr>
3113<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
3114</tr>
3115</tbody>
3116</table>
3117</dd></dl>
3118
3119<dl class="function">
3120<dt id="tools.get_list_as_string">
3121<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>
3122<dd><p>Converts a list of arbitrary content into a single string.</p>
3123<table class="docutils field-list" frame="void" rules="none">
3124<col class="field-name" />
3125<col class="field-body" />
3126<tbody valign="top">
3127<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3128<li><strong>list_obj</strong> (<em>list of *</em>) – A list with arbitrary content.</li>
3129<li><strong>concatenate_sign</strong> (<em>str</em><em>, </em><em>optional</em>) – A string which is used to concatenate the single
3130list elements. Default value is “, “.</li>
3131</ul>
3132</td>
3133</tr>
3134<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>
3135</td>
3136</tr>
3137<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3138</td>
3139</tr>
3140</tbody>
3141</table>
3142</dd></dl>
3143
3144<dl class="function">
3145<dt id="tools.init128">
3146<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>
3147<dd><p>Opens and reads the grib file with table 128 information.</p>
3148<table class="docutils field-list" frame="void" rules="none">
3149<col class="field-name" />
3150<col class="field-body" />
3151<tbody valign="top">
3152<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>
3153</tr>
3154<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.
3155The key is the parameter number and the value is the
3156short name of the parameter.</td>
3157</tr>
3158<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
3159</tr>
3160</tbody>
3161</table>
3162</dd></dl>
3163
3164<dl class="function">
3165<dt id="tools.make_dir">
3166<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>
3167<dd><p>Creates a directory.</p>
3168<p>It gives a warning if the directory already exists and skips process.
3169The program stops only if there is another problem.</p>
3170<table class="docutils field-list" frame="void" rules="none">
3171<col class="field-name" />
3172<col class="field-body" />
3173<tbody valign="top">
3174<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>
3175</tr>
3176</tbody>
3177</table>
3178</dd></dl>
3179
3180<dl class="function">
3181<dt id="tools.my_error">
3182<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>
3183<dd><p>Prints a specified error message which can be passed to the function
3184before exiting the program.</p>
3185<table class="docutils field-list" frame="void" rules="none">
3186<col class="field-name" />
3187<col class="field-body" />
3188<tbody valign="top">
3189<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>
3190</tr>
3191</tbody>
3192</table>
3193</dd></dl>
3194
3195<dl class="function">
3196<dt id="tools.none_or_int">
3197<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>
3198<dd><p>Converts the input string into pythons None-type if the string
3199contains string “None”. Otherwise it is converted to an integer value.</p>
3200<table class="docutils field-list" frame="void" rules="none">
3201<col class="field-name" />
3202<col class="field-body" />
3203<tbody valign="top">
3204<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>
3205</tr>
3206<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”,
3207then the python type None is returned. Otherwise the string is
3208converted into an integer value.</td>
3209</tr>
3210<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None or int(value)</td>
3211</tr>
3212</tbody>
3213</table>
3214</dd></dl>
3215
3216<dl class="function">
3217<dt id="tools.none_or_str">
3218<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>
3219<dd><p>Converts the input string into pythons None-type if the string
3220contains string “None”.</p>
3221<table class="docutils field-list" frame="void" rules="none">
3222<col class="field-name" />
3223<col class="field-body" />
3224<tbody valign="top">
3225<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>
3226</tr>
3227<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”,
3228then the python type None is returned. Otherwise the string itself.</td>
3229</tr>
3230<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None or value</td>
3231</tr>
3232</tbody>
3233</table>
3234</dd></dl>
3235
3236<dl class="function">
3237<dt id="tools.normal_exit">
3238<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>
3239<dd><p>Prints a specific exit message which can be passed to the function.</p>
3240<table class="docutils field-list" frame="void" rules="none">
3241<col class="field-name" />
3242<col class="field-body" />
3243<tbody valign="top">
3244<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>
3245</tr>
3246</tbody>
3247</table>
3248</dd></dl>
3249
3250<dl class="function">
3251<dt id="tools.product">
3252<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>
3253<dd><p>Creates combinations of all passed arguments.</p>
3254<p>This method combines the single characters of the passed arguments
3255with each other. So that each character of each argument value
3256will be combined with each character of the other arguments as a tuple.</p>
3257<div class="admonition note">
3258<p class="first admonition-title">Note</p>
3259<p class="last">This method is taken from an example at the ECMWF wiki website.
3260<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>
3261</div>
3262<p class="rubric">Example</p>
3263<p>product(‘ABCD’, ‘xy’) –&gt; Ax Ay Bx By Cx Cy Dx Dy</p>
3264<p>product(range(2), repeat = 3) –&gt; 000 001 010 011 100 101 110 111</p>
3265<table class="docutils field-list" frame="void" rules="none">
3266<col class="field-name" />
3267<col class="field-body" />
3268<tbody valign="top">
3269<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3270<li><strong>*args</strong> (<em>list</em><em> or </em><em>str</em>) – Positional arguments (arbitrary number).</li>
3271<li><strong>**kwds</strong> (<em>dict</em>) – Contains all the keyword arguments from *args.</li>
3272</ul>
3273</td>
3274</tr>
3275<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.
3276See example in description above.</p>
3277</td>
3278</tr>
3279<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>
3280</td>
3281</tr>
3282</tbody>
3283</table>
3284</dd></dl>
3285
3286<dl class="function">
3287<dt id="tools.put_file_to_ecserver">
3288<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>
3289<dd><p>Uses the ecaccess-file-put command to send a file to the ECMWF servers.</p>
3290<div class="admonition note">
3291<p class="first admonition-title">Note</p>
3292<p class="last">The return value is just for testing reasons. It does not have
3293to be used from the calling function since the whole error handling
3294is done in here.</p>
3295</div>
3296<table class="docutils field-list" frame="void" rules="none">
3297<col class="field-name" />
3298<col class="field-body" />
3299<tbody valign="top">
3300<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3301<li><strong>ecd</strong> (<em>str</em>) – The path were the file is stored.</li>
3302<li><strong>filename</strong> (<em>str</em>) – The name of the file to send to the ECMWF server.</li>
3303<li><strong>target</strong> (<em>str</em>) – The target queue where the file should be sent to.</li>
3304<li><strong>ecuid</strong> (<em>str</em>) – The user id on ECMWF server.</li>
3305<li><strong>ecgid</strong> (<em>str</em>) – The group id on ECMWF server.</li>
3306</ul>
3307</td>
3308</tr>
3309</tbody>
3310</table>
3311</dd></dl>
3312
3313<dl class="function">
3314<dt id="tools.read_ecenv">
3315<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>
3316<dd><p>Reads the file into a dictionary where the key values are the parameter
3317names.</p>
3318<table class="docutils field-list" frame="void" rules="none">
3319<col class="field-name" />
3320<col class="field-body" />
3321<tbody valign="top">
3322<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>
3323</tr>
3324<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
3325and destination for ECMWF server environments.</td>
3326</tr>
3327<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
3328</tr>
3329</tbody>
3330</table>
3331</dd></dl>
3332
3333<dl class="function">
3334<dt id="tools.send_mail">
3335<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>
3336<dd><p>Prints a specific exit message which can be passed to the function.</p>
3337<table class="docutils field-list" frame="void" rules="none">
3338<col class="field-name" />
3339<col class="field-body" />
3340<tbody valign="top">
3341<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3342<li><strong>users</strong> (<em>list of str</em>) – Contains all email addresses which should be notified.
3343It might also contain just the ecmwf user name which wil trigger
3344mailing to the associated email address for this user.</li>
3345<li><strong>success_mode</strong> (<em>str</em>) – States the exit mode of the program to put into
3346the mail subject line.</li>
3347<li><strong>message</strong> (<em>str</em><em>, </em><em>optional</em>) – Message for exiting program. Default value is “Done!”.</li>
3348</ul>
3349</td>
3350</tr>
3351</tbody>
3352</table>
3353</dd></dl>
3354
3355<dl class="function">
3356<dt id="tools.setup_controldata">
3357<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>
3358<dd><p>Collects, stores and checks controlling arguments from command line,
3359CONTROL file and ECMWF_ENV file.</p>
3360<table class="docutils field-list" frame="void" rules="none">
3361<col class="field-name" />
3362<col class="field-body" />
3363<tbody valign="top">
3364<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><ul class="simple">
3365<li><strong>c</strong> (<em>ControlFile</em>) – Contains all the parameters of CONTROL file and
3366command line.</li>
3367<li><strong>ppid</strong> (<em>str</em>) – Parent process id.</li>
3368<li><strong>queue</strong> (<em>str</em>) – Name of queue for submission to ECMWF (e.g. ecgate or cca )</li>
3369<li><strong>job_template</strong> (<em>str</em>) – Name of the job template file for submission to ECMWF server.</li>
3370</ul>
3371</td>
3372</tr>
3373</tbody>
3374</table>
3375</dd></dl>
3376
3377<dl class="function">
3378<dt id="tools.silent_remove">
3379<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>
3380<dd><p>Remove file if it exists.
3381The function does not fail if the file does not exist.</p>
3382<table class="docutils field-list" frame="void" rules="none">
3383<col class="field-name" />
3384<col class="field-body" />
3385<tbody valign="top">
3386<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>
3387</tr>
3388</tbody>
3389</table>
3390</dd></dl>
3391
3392<dl class="function">
3393<dt id="tools.submit_job_to_ecserver">
3394<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>
3395<dd><p>Uses ecaccess-job-submit command to submit a job to the ECMWF server.</p>
3396<div class="admonition note">
3397<p class="first admonition-title">Note</p>
3398<p class="last">The return value is just for testing reasons. It does not have
3399to be used from the calling function since the whole error handling
3400is done in here.</p>
3401</div>
3402<table class="docutils field-list" frame="void" rules="none">
3403<col class="field-name" />
3404<col class="field-body" />
3405<tbody valign="top">
3406<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3407<li><strong>target</strong> (<em>str</em>) – The target where the file should be sent to, e.g. the queue.</li>
3408<li><strong>jobname</strong> (<em>str</em>) – The name of the jobfile to be submitted to the ECMWF server.</li>
3409</ul>
3410</td>
3411</tr>
3412<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>
3413</td>
3414</tr>
3415<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">int</p>
3416</td>
3417</tr>
3418</tbody>
3419</table>
3420</dd></dl>
3421
3422<dl class="function">
3423<dt id="tools.to_param_id">
3424<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>
3425<dd><p>Transform parameter names to parameter ids with ECMWF grib table 128.</p>
3426<table class="docutils field-list" frame="void" rules="none">
3427<col class="field-name" />
3428<col class="field-body" />
3429<tbody valign="top">
3430<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3431<li><strong>pars</strong> (<em>str</em>) – Addpar argument from CONTROL file in the format of
3432parameter names instead of ids. The parameter short
3433names are sepearted with “/” and they are passed as
3434one single string.</li>
3435<li><strong>table</strong> (<em>dict</em>) – Contains the ECMWF grib table 128 information.
3436The key is the parameter number and the value is the
3437short name of the parameter.</li>
3438</ul>
3439</td>
3440</tr>
3441<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
3442parameter ids in the format of integer.</p>
3443</td>
3444</tr>
3445<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list of int</p>
3446</td>
3447</tr>
3448</tbody>
3449</table>
3450</dd></dl>
3451
3452<dl class="function">
3453<dt id="tools.to_param_id_with_tablenumber">
3454<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>
3455<dd><p>Transform parameter names to parameter ids and add table id.</p>
3456<p>Conversion with ECMWF grib table 128.</p>
3457<table class="docutils field-list" frame="void" rules="none">
3458<col class="field-name" />
3459<col class="field-body" />
3460<tbody valign="top">
3461<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3462<li><strong>pars</strong> (<em>str</em>) – Addpar argument from CONTROL file in the format of
3463parameter names instead of ids. The parameter short
3464names are sepearted with “/” and they are passed as
3465one single string.</li>
3466<li><strong>table</strong> (<em>dict</em>) – Contains the ECMWF grib table 128 information.
3467The key is the parameter number and the value is the
3468short name of the parameter.</li>
3469</ul>
3470</td>
3471</tr>
3472<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
3473parameter ids in the format of integer.</p>
3474</td>
3475</tr>
3476<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3477</td>
3478</tr>
3479</tbody>
3480</table>
3481</dd></dl>
3482
3483</div>
3484<div class="section" id="module-checks">
3485<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>
3486<p>This module contains check methods for the CONTROL paramaters.</p>
3487<dl class="function">
3488<dt id="checks.check_accmaxstep">
3489<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>
3490<dd><p>Guarantees that the accumulation forecast step were set.</p>
3491<table class="docutils field-list" frame="void" rules="none">
3492<col class="field-name" />
3493<col class="field-body" />
3494<tbody valign="top">
3495<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3496<li><strong>accmaxstep</strong> (<em>str</em>) – The maximum forecast step for the accumulated forecast fields.</li>
3497<li><strong>marsclass</strong> (<em>str</em>) – ECMWF data classification identifier.</li>
3498<li><strong>purefc</strong> (<em>int</em>) – Switch for definition of pure forecast mode or not.</li>
3499<li><strong>maxstep</strong> (<em>str</em>) – The maximum forecast time step in hours from the forecast base time.
3500This is the maximum step for non flux (accumulated) forecast data.</li>
3501</ul>
3502</td>
3503</tr>
3504<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>
3505</td>
3506</tr>
3507<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3508</td>
3509</tr>
3510</tbody>
3511</table>
3512</dd></dl>
3513
3514<dl class="function">
3515<dt id="checks.check_acctime">
3516<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>
3517<dd><p>Guarantees that the accumulation forecast times were set.</p>
3518<p>If it is not set, it tries to set the value for some of the
3519most commonly used data sets. Otherwise it raises an error.</p>
3520<table class="docutils field-list" frame="void" rules="none">
3521<col class="field-name" />
3522<col class="field-body" />
3523<tbody valign="top">
3524<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3525<li><strong>acctime</strong> (<em>str</em>) – The starting time from the accumulated forecasts.</li>
3526<li><strong>marsclass</strong> (<em>str</em>) – ECMWF data classification identifier.</li>
3527<li><strong>purefc</strong> (<em>int</em>) – Switch for definition of pure forecast mode or not.</li>
3528</ul>
3529</td>
3530</tr>
3531<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>
3532</td>
3533</tr>
3534<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3535</td>
3536</tr>
3537</tbody>
3538</table>
3539</dd></dl>
3540
3541<dl class="function">
3542<dt id="checks.check_acctype">
3543<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>
3544<dd><p>Guarantees that the accumulation field type is set.</p>
3545<p>If not set, it is derivated as in the old method (TYPE[1]).</p>
3546<table class="docutils field-list" frame="void" rules="none">
3547<col class="field-name" />
3548<col class="field-body" />
3549<tbody valign="top">
3550<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3551<li><strong>acctype</strong> (<em>str</em>) – The field type for the accumulated forecast fields.</li>
3552<li><strong>ftype</strong> (<em>list of str</em>) – List of field types.</li>
3553</ul>
3554</td>
3555</tr>
3556<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>
3557</td>
3558</tr>
3559<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3560</td>
3561</tr>
3562</tbody>
3563</table>
3564</dd></dl>
3565
3566<dl class="function">
3567<dt id="checks.check_addpar">
3568<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>
3569<dd><p>Check that addpar has correct format of additional parameters in
3570a single string, so that it can be easily appended to the hard coded
3571parameters that are retrieved in any case.</p>
3572<table class="docutils field-list" frame="void" rules="none">
3573<col class="field-name" />
3574<col class="field-body" />
3575<tbody valign="top">
3576<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>
3577</tr>
3578<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>
3579</tr>
3580<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
3581</tr>
3582</tbody>
3583</table>
3584</dd></dl>
3585
3586<dl class="function">
3587<dt id="checks.check_area">
3588<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>
3589<dd><p>Defines the correct area string.</p>
3590<p>Checks on the format of the four area components. Wether it is of
3591the order of 1000 or 1. Also checks wether area was already set by command
3592line, then the four components are overwritten.
3593Convert to correct format of the order of magnitude “1” and sets the
3594area parameter (North/West/South/East).
3595E.g.: -5./20./10./10.</p>
3596<table class="docutils field-list" frame="void" rules="none">
3597<col class="field-name" />
3598<col class="field-body" />
3599<tbody valign="top">
3600<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3601<li><strong>grid</strong> (<em>str</em>) – Contains grid information.</li>
3602<li><strong>area</strong> (<em>str</em>) – Contains area informtion.</li>
3603<li><strong>upper</strong> (<em>str</em>) – The northern most latitude.</li>
3604<li><strong>lower</strong> (<em>str</em>) – The souther most latitude.</li>
3605<li><strong>left</strong> (<em>str</em>) – The western most longitude.</li>
3606<li><strong>right</strong> (<em>str</em>) – The eastern most longiude.</li>
3607</ul>
3608</td>
3609</tr>
3610<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>
3611</td>
3612</tr>
3613<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3614</td>
3615</tr>
3616</tbody>
3617</table>
3618</dd></dl>
3619
3620<dl class="function">
3621<dt id="checks.check_basetime">
3622<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>
3623<dd><p>Check if basetime is set and contains one of the two
3624possible values (0, 12).</p>
3625<table class="docutils field-list" frame="void" rules="none">
3626<col class="field-name" />
3627<col class="field-body" />
3628<tbody valign="top">
3629<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
3630retrieved.</td>
3631</tr>
3632<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
3633retrieved.</td>
3634</tr>
3635<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">int or None</td>
3636</tr>
3637</tbody>
3638</table>
3639</dd></dl>
3640
3641<dl class="function">
3642<dt id="checks.check_dates">
3643<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>
3644<dd><p>Checks if there is at least a start date for a one day retrieval.</p>
3645<p>Checks if end date lies after start date and end date is set.</p>
3646<table class="docutils field-list" frame="void" rules="none">
3647<col class="field-name" />
3648<col class="field-body" />
3649<tbody valign="top">
3650<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3651<li><strong>start</strong> (<em>str</em>) – The start date of the retrieval job.</li>
3652<li><strong>end</strong> (<em>str</em>) – The end date of the retrieval job.</li>
3653</ul>
3654</td>
3655</tr>
3656<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
3657<li><strong>start</strong> (<em>str</em>) – The start date of the retrieval job.</li>
3658<li><strong>end</strong> (<em>str</em>) – The end date of the retrieval job.</li>
3659</ul>
3660</p>
3661</td>
3662</tr>
3663</tbody>
3664</table>
3665</dd></dl>
3666
3667<dl class="function">
3668<dt id="checks.check_grid">
3669<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>
3670<dd><p>Convert grid into correct Lat/Lon format. E.g. ‘0.5/0.5’</p>
3671<p>Checks on format of original grid. Wether it is in the order of 1000 or 1.
3672Convert to correct grid format and substitute into “Lat/Lon” format string.</p>
3673<table class="docutils field-list" frame="void" rules="none">
3674<col class="field-name" />
3675<col class="field-body" />
3676<tbody valign="top">
3677<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>
3678</tr>
3679<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>
3680</tr>
3681<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
3682</tr>
3683</tbody>
3684</table>
3685</dd></dl>
3686
3687<dl class="function">
3688<dt id="checks.check_job_chunk">
3689<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>
3690<dd><p>Checks that if job chunk is set, the number is positive and non zero.</p>
3691<table class="docutils field-list" frame="void" rules="none">
3692<col class="field-name" />
3693<col class="field-body" />
3694<tbody valign="top">
3695<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>
3696</tr>
3697<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>
3698</tr>
3699<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">int</td>
3700</tr>
3701</tbody>
3702</table>
3703</dd></dl>
3704
3705<dl class="function">
3706<dt id="checks.check_len_type_time_step">
3707<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>
3708<dd><p>Check if</p>
3709<table class="docutils field-list" frame="void" rules="none">
3710<col class="field-name" />
3711<col class="field-body" />
3712<tbody valign="top">
3713<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3714<li><strong>ftype</strong> (<em>list of str</em>) – List of field types.</li>
3715<li><strong>ftime</strong> (<em>list of str</em><em> or </em><em>str</em>) – The time in hours of the field.</li>
3716<li><strong>steps</strong> (<em>str</em>) – Specifies the forecast time step from forecast base time.
3717Valid values are hours (HH) from forecast base time.</li>
3718<li><strong>maxstep</strong> (<em>int</em>) – The maximum forecast time step in hours from the forecast base time.
3719This is the maximum step for non flux (accumulated) forecast data.</li>
3720<li><strong>purefc</strong> (<em>int</em>) – Switch for definition of pure forecast mode or not.</li>
3721</ul>
3722</td>
3723</tr>
3724<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
3725<li><strong>ftype</strong> (<em>list of str</em>) – List of field types.</li>
3726<li><strong>ftime</strong> (<em>list of str</em>) – The time in hours of the field.</li>
3727<li><strong>steps</strong> (<em>str</em>) – Specifies the forecast time step from forecast base time.
3728Valid values are hours (HH) from forecast base time.</li>
3729</ul>
3730</p>
3731</td>
3732</tr>
3733</tbody>
3734</table>
3735</dd></dl>
3736
3737<dl class="function">
3738<dt id="checks.check_levels">
3739<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>
3740<dd><p>Defines correct level list and guarantees that the maximum level is
3741one of the available maximum levels.</p>
3742<table class="docutils field-list" frame="void" rules="none">
3743<col class="field-name" />
3744<col class="field-body" />
3745<tbody valign="top">
3746<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3747<li><strong>levelist</strong> (<em>str</em>) – Specifies the level list.
3748Examples: model level: 1/to/137, pressure levels: 500/to/1000</li>
3749<li><strong>level</strong> (<em>str</em>) – Specifies the maximum level.</li>
3750</ul>
3751</td>
3752</tr>
3753<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
3754<li><strong>levelist</strong> (<em>str</em>) – Specifies the required levels. It has to have a valid
3755correspondence to the selected levtype.
3756Examples: model level: 1/to/137, pressure levels: 500/to/1000</li>
3757<li><strong>level</strong> (<em>str</em>) – Specifies the maximum level. It has to be one of the
3758available maximum level number as contained in the variable
3759MAX_LEVEL_LIST in “_config”. E.g. [16, 19, 31, 40, 50, 60, 62, 91, 137]</li>
3760</ul>
3761</p>
3762</td>
3763</tr>
3764</tbody>
3765</table>
3766</dd></dl>
3767
3768<dl class="function">
3769<dt id="checks.check_logicals_type">
3770<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>
3771<dd><p>Check that the logical variables have correct type integer.</p>
3772<table class="docutils field-list" frame="void" rules="none">
3773<col class="field-name" />
3774<col class="field-body" />
3775<tbody valign="top">
3776<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3777<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
3778command line.</li>
3779<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
3780program.</li>
3781</ul>
3782</td>
3783</tr>
3784</tbody>
3785</table>
3786</dd></dl>
3787
3788<dl class="function">
3789<dt id="checks.check_mail">
3790<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>
3791<dd><p>Check the string of mail addresses, seperate them and convert to a list.</p>
3792<table class="docutils field-list" frame="void" rules="none">
3793<col class="field-name" />
3794<col class="field-body" />
3795<tbody valign="top">
3796<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.
3797It might also contain just the ecmwf user name which will trigger
3798mailing to the associated email address for this user.</td>
3799</tr>
3800<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>mail</strong> – Contains email addresses for notifications.
3801It might also contain just the ecmwf user name which will trigger
3802mailing to the associated email address for this user.</td>
3803</tr>
3804<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list of str</td>
3805</tr>
3806</tbody>
3807</table>
3808</dd></dl>
3809
3810<dl class="function">
3811<dt id="checks.check_maxstep">
3812<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>
3813<dd><p>Convert maxstep into integer if it is already given. Otherwise, select
3814maxstep by going through the steps list.</p>
3815<table class="docutils field-list" frame="void" rules="none">
3816<col class="field-name" />
3817<col class="field-body" />
3818<tbody valign="top">
3819<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3820<li><strong>maxstep</strong> (<em>str</em>) – The maximum forecast time step in hours from the forecast base time.
3821This is the maximum step for non flux (accumulated) forecast data.</li>
3822<li><strong>steps</strong> (<em>str</em>) – Specifies the forecast time step from forecast base time.
3823Valid values are hours (HH) from forecast base time.</li>
3824</ul>
3825</td>
3826</tr>
3827<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.
3828This is the maximum step for non flux (accumulated) forecast data.</p>
3829</td>
3830</tr>
3831<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">int</p>
3832</td>
3833</tr>
3834</tbody>
3835</table>
3836</dd></dl>
3837
3838<dl class="function">
3839<dt id="checks.check_number">
3840<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>
3841<dd><p>Check for correct string format of ensemble member numbers.</p>
3842<table class="docutils field-list" frame="void" rules="none">
3843<col class="field-name" />
3844<col class="field-body" />
3845<tbody valign="top">
3846<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3847<li><strong>number</strong> (<em>str</em>) – List of ensemble member forecast runs.</li>
3848<li><strong>mailfail</strong> (<em>list of str</em>) – Contains all email addresses which should be notified.
3849It might also contain just the ecmwf user name which will trigger
3850mailing to the associated email address for this user.</li>
3851</ul>
3852</td>
3853</tr>
3854<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>
3855</td>
3856</tr>
3857<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
3858</td>
3859</tr>
3860</tbody>
3861</table>
3862</dd></dl>
3863
3864<dl class="function">
3865<dt id="checks.check_pathes">
3866<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>
3867<dd><p>Check if output and flexpart pathes are set.</p>
3868<table class="docutils field-list" frame="void" rules="none">
3869<col class="field-name" />
3870<col class="field-body" />
3871<tbody valign="top">
3872<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3873<li><strong>idir</strong> (<em>str</em>) – Path to the temporary directory for MARS retrieval data.</li>
3874<li><strong>odir</strong> (<em>str</em>) – Path to the final output directory where the FLEXPART input files
3875will be stored.</li>
3876<li><strong>fpdir</strong> (<em>str</em>) – Path to FLEXPART root directory.</li>
3877<li><strong>fedir</strong> (<em>str</em>) – Path to flex_extract root directory.</li>
3878</ul>
3879</td>
3880</tr>
3881<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
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</ul>
3886</p>
3887</td>
3888</tr>
3889</tbody>
3890</table>
3891</dd></dl>
3892
3893<dl class="function">
3894<dt id="checks.check_ppid">
3895<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>
3896<dd><p>Sets the current PPID.</p>
3897<table class="docutils field-list" frame="void" rules="none">
3898<col class="field-name" />
3899<col class="field-body" />
3900<tbody valign="top">
3901<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3902<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
3903command line.</li>
3904<li><strong>ppid</strong> (<em>int</em><em> or </em><em>None</em>) – Contains the ppid number provided by the command line parameter
3905of is None otherwise.</li>
3906</ul>
3907</td>
3908</tr>
3909</tbody>
3910</table>
3911</dd></dl>
3912
3913<dl class="function">
3914<dt id="checks.check_public">
3915<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>
3916<dd><p>Check wether the dataset parameter is set for a
3917public data set retrieval.</p>
3918<table class="docutils field-list" frame="void" rules="none">
3919<col class="field-name" />
3920<col class="field-body" />
3921<tbody valign="top">
3922<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3923<li><strong>public</strong> (<em>int</em>) – Specifies if public data are to be retrieved or not.</li>
3924<li><strong>dataset</strong> (<em>str</em>) – Specific name which identifies the public dataset.</li>
3925</ul>
3926</td>
3927</tr>
3928</tbody>
3929</table>
3930</dd></dl>
3931
3932<dl class="function">
3933<dt id="checks.check_purefc">
3934<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>
3935<dd><p>Check for a pure forecast mode.</p>
3936<table class="docutils field-list" frame="void" rules="none">
3937<col class="field-name" />
3938<col class="field-body" />
3939<tbody valign="top">
3940<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>
3941</tr>
3942<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
3943analysis fields in between.</td>
3944</tr>
3945<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">True or False</td>
3946</tr>
3947</tbody>
3948</table>
3949</dd></dl>
3950
3951<dl class="function">
3952<dt id="checks.check_queue">
3953<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>
3954<dd><p>Check if the necessary ECMWF parameters are set if the queue is
3955one of the QUEUES_LIST (in _config).</p>
3956<table class="docutils field-list" frame="void" rules="none">
3957<col class="field-name" />
3958<col class="field-body" />
3959<tbody valign="top">
3960<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3961<li><strong>queue</strong> (<em>str</em>) – Name of the queue if submitted to the ECMWF servers.
3962Used to check if ecuid, ecgid, gateway and destination
3963are set correctly and are not empty.</li>
3964<li><strong>gateway</strong> (<em>str</em>) – The address of the gateway server.</li>
3965<li><strong>destination</strong> (<em>str</em>) – The name of the destination of the gateway server for data
3966transfer through ectrans. E.g. <a class="reference external" href="mailto:name&#37;&#52;&#48;genericSftp">name<span>&#64;</span>genericSftp</a></li>
3967<li><strong>ecuid</strong> (<em>str</em>) – ECMWF user id.</li>
3968<li><strong>ecgid</strong> (<em>str</em>) – ECMWF group id.</li>
3969</ul>
3970</td>
3971</tr>
3972</tbody>
3973</table>
3974</dd></dl>
3975
3976<dl class="function">
3977<dt id="checks.check_request">
3978<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>
3979<dd><p>Check if there is an old mars request file and remove it.</p>
3980<table class="docutils field-list" frame="void" rules="none">
3981<col class="field-name" />
3982<col class="field-body" />
3983<tbody valign="top">
3984<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
3985<li><strong>request</strong> (<em>int</em>) – Selects the mode of retrieval.
39860: Retrieves the data from ECMWF.
39871: Prints the mars requests to an output file.
39882: Retrieves the data and prints the mars request.</li>
3989<li><strong>marsfile</strong> (<em>str</em>) – Path to the mars request file.</li>
3990</ul>
3991</td>
3992</tr>
3993</tbody>
3994</table>
3995</dd></dl>
3996
3997<dl class="function">
3998<dt id="checks.check_step">
3999<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>
4000<dd><p>Checks on step format and convert into a list of steps.</p>
4001<p>If the steps were defined with “to” and “by” they are converted into
4002a list of steps. If the steps were set in a string, it is
4003converted into a list.</p>
4004<table class="docutils field-list" frame="void" rules="none">
4005<col class="field-name" />
4006<col class="field-body" />
4007<tbody valign="top">
4008<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4009<li><strong>step</strong> (<em>list of str</em><em> or </em><em>str</em>) – Specifies the forecast time step from forecast base time.
4010Valid values are hours (HH) from forecast base time.</li>
4011<li><strong>mailfail</strong> (<em>list of str</em>) – Contains all email addresses which should be notified.
4012It might also contain just the ecmwf user name which will trigger
4013mailing to the associated email address for this user.</li>
4014</ul>
4015</td>
4016</tr>
4017<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>
4018</td>
4019</tr>
4020<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list of str</p>
4021</td>
4022</tr>
4023</tbody>
4024</table>
4025</dd></dl>
4026
4027<dl class="function">
4028<dt id="checks.check_time">
4029<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>
4030<dd><p>Check if time variable is of type list. Otherwise convert to list.</p>
4031<table class="docutils field-list" frame="void" rules="none">
4032<col class="field-name" />
4033<col class="field-body" />
4034<tbody valign="top">
4035<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>
4036</tr>
4037<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>
4038</tr>
4039<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list of str</td>
4040</tr>
4041</tbody>
4042</table>
4043</dd></dl>
4044
4045<dl class="function">
4046<dt id="checks.check_type">
4047<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>
4048<dd><p>Check if type variable is of type list and if analysis field has
4049forecast step 0.</p>
4050<table class="docutils field-list" frame="void" rules="none">
4051<col class="field-name" />
4052<col class="field-body" />
4053<tbody valign="top">
4054<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4055<li><strong>ftype</strong> (<em>list of str</em><em> or </em><em>str</em>) – List of field types.</li>
4056<li><strong>steps</strong> (<em>str</em>) – Specifies the forecast time step from forecast base time.
4057Valid values are hours (HH) from forecast base time.</li>
4058</ul>
4059</td>
4060</tr>
4061<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>
4062</td>
4063</tr>
4064<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list of str</p>
4065</td>
4066</tr>
4067</tbody>
4068</table>
4069</dd></dl>
4070
4071</div>
4072<div class="section" id="module-disaggregation">
4073<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>
4074<p>Disaggregation of deaccumulated flux data from an ECMWF model FG field.</p>
4075<dl class="docutils">
4076<dt>Initially the flux data to be concerned are:</dt>
4077<dd><ul class="first last simple">
4078<li>large-scale precipitation</li>
4079<li>convective precipitation</li>
4080<li>surface sensible heat flux</li>
4081<li>surface solar radiation</li>
4082<li>u stress</li>
4083<li>v stress</li>
4084</ul>
4085</dd>
4086</dl>
4087<p>Different versions of disaggregation is provided for rainfall
4088data (darain, modified linear) and the surface fluxes and
4089stress data (dapoly, cubic polynomial).</p>
4090<dl class="function">
4091<dt id="disaggregation.IA3">
4092<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>
4093<dd><p>Interpolation with a non-negative geometric mean based algorithm.</p>
4094<p>The original grid is reconstructed by adding two sampling points in each
4095data series interval. This subgrid is used to keep all information during
4096the interpolation within the associated interval. Additionally, an advanced
4097monotonicity filter is applied to improve the monotonicity properties of
4098the series.</p>
4099<div class="admonition note">
4100<p class="first admonition-title">Note</p>
4101<p>(C) Copyright 2017-2019
4102Sabine Hittmeir, Anne Philipp, Petra Seibert</p>
4103<p class="last">This work is licensed under the Creative Commons Attribution 4.0
4104International License. To view a copy of this license, visit
4105<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
4106Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.</p>
4107</div>
4108<table class="docutils field-list" frame="void" rules="none">
4109<col class="field-name" />
4110<col class="field-body" />
4111<tbody valign="top">
4112<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
4113the dimension of the original raw series.</td>
4114</tr>
4115<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.
4116Its dimension is equal to the length of the input data series
4117times three.</td>
4118</tr>
4119<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list of float</td>
4120</tr>
4121</tbody>
4122</table>
4123<p class="rubric">References</p>
4124<p>For more information see article:
4125Hittmeir, S.; Philipp, A.; Seibert, P. (2017): A conservative
4126interpolation scheme for extensive quantities with application to the
4127Lagrangian particle dispersion model FLEXPART.,
4128Geoscientific Model Development</p>
4129</dd></dl>
4130
4131<dl class="function">
4132<dt id="disaggregation.dapoly">
4133<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>
4134<dd><p>Cubic polynomial interpolation of deaccumulated fluxes.</p>
4135<p>Interpolation of deaccumulated fluxes of an ECMWF model FG field
4136using a cubic polynomial solution which conserves the integrals
4137of the fluxes within each timespan.
4138Disaggregation is done for 4 accumluated timespans which
4139generates a new, disaggregated value which is output at the
4140central point of the 4 accumulation timespans.
4141This new point is used for linear interpolation of the complete
4142timeseries afterwards.</p>
4143<table class="docutils field-list" frame="void" rules="none">
4144<col class="field-name" />
4145<col class="field-body" />
4146<tbody valign="top">
4147<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.
4148E.g. [[array_t1], [array_t2], [array_t3], [array_t4]]</td>
4149</tr>
4150<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>
4151</tr>
4152<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">array of float</td>
4153</tr>
4154</tbody>
4155</table>
4156<div class="admonition note">
4157<p class="first admonition-title">Note</p>
4158<dl class="last docutils">
4159<dt>March 2000 <span class="classifier-delimiter">:</span> <span class="classifier">P. JAMES</span></dt>
4160<dd>Original author</dd>
4161<dt>June 2003 <span class="classifier-delimiter">:</span> <span class="classifier">A. BECK</span></dt>
4162<dd>Adaptations</dd>
4163<dt>November 2015 <span class="classifier-delimiter">:</span> <span class="classifier">Leopold Haimberger (University of Vienna)</span></dt>
4164<dd>Migration from Fortran to Python</dd>
4165</dl>
4166</div>
4167</dd></dl>
4168
4169<dl class="function">
4170<dt id="disaggregation.darain">
4171<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>
4172<dd><p>Linear interpolation of deaccumulated fluxes.</p>
4173<p>Interpolation of deaccumulated fluxes of an ECMWF model FG rainfall
4174field using a modified linear solution which conserves the integrals
4175of the fluxes within each timespan.
4176Disaggregation is done for 4 accumluated timespans which generates
4177a new, disaggregated value which is output at the central point
4178of the 4 accumulation timespans. This new point is used for linear
4179interpolation of the complete timeseries afterwards.</p>
4180<table class="docutils field-list" frame="void" rules="none">
4181<col class="field-name" />
4182<col class="field-body" />
4183<tbody valign="top">
4184<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.
4185E.g. [[array_t1], [array_t2], [array_t3], [array_t4]]</td>
4186</tr>
4187<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>
4188</tr>
4189<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">array of float</td>
4190</tr>
4191</tbody>
4192</table>
4193<div class="admonition note">
4194<p class="first admonition-title">Note</p>
4195<dl class="last docutils">
4196<dt>March 2000 <span class="classifier-delimiter">:</span> <span class="classifier">P. JAMES</span></dt>
4197<dd>Original author</dd>
4198<dt>June 2003 <span class="classifier-delimiter">:</span> <span class="classifier">A. BECK</span></dt>
4199<dd>Adaptations</dd>
4200<dt>November 2015 <span class="classifier-delimiter">:</span> <span class="classifier">Leopold Haimberger (University of Vienna)</span></dt>
4201<dd>Migration from Fortran to Python</dd>
4202</dl>
4203</div>
4204</dd></dl>
4205
4206<div class="toctree-wrapper compound">
4207</div>
4208</div>
4209</div>
4210</div>
4211
4212
4213           </div>
4214           
4215          </div>
4216          <footer>
4217 
4218    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
4219     
4220        <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>
4221     
4222     
4223        <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>
4224     
4225    </div>
4226 
4227
4228  <hr/>
4229
4230  <div role="contentinfo">
4231    <p>
4232        &copy; Copyright 2019, Anne Philipp and Leopold Haimberger
4233
4234    </p>
4235  </div>
4236  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>.
4237
4238</footer>
4239
4240        </div>
4241      </div>
4242
4243    </section>
4244
4245  </div>
4246 
4247
4248
4249  <script type="text/javascript">
4250      jQuery(function () {
4251          SphinxRtdTheme.Navigation.enable(true);
4252      });
4253  </script>
4254
4255 
4256 
4257   
4258   
4259
4260</body>
4261</html>
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG