source: flex_extract.git/Documentation/html/Documentation/Api/api_python.html @ 08c9091

ctbtodev
Last change on this file since 08c9091 was 08c9091, checked in by Anne Philipp <anne.philipp@…>, 4 years ago

updated online docu (rm tabs)

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