source: flex_extract.git/documentation/Sphinx/build/html/api.html @ f66f990

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

deleted jobscripts for tracking and updated Sphinx doc

  • Property mode set to 100644
File size: 147.5 KB
Line 
1
2
3<!DOCTYPE html>
4<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
5<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
6<head>
7  <meta charset="utf-8">
8 
9  <meta name="viewport" content="width=device-width, initial-scale=1.0">
10 
11  <title>Auto Generated Documentation &mdash; flex_extract 7.1 alpha documentation</title>
12 
13
14 
15 
16 
17 
18
19 
20
21 
22 
23   
24
25 
26
27  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
28  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
29    <link rel="index" title="Index" href="genindex.html" />
30    <link rel="search" title="Search" href="search.html" />
31    <link rel="next" title="Support" href="support.html" />
32    <link rel="prev" title="CONTROL-file templates" href="user_guide/control_templates.html" /> 
33
34 
35  <script src="_static/js/modernizr.min.js"></script>
36
37</head>
38
39<body class="wy-body-for-nav">
40
41   
42  <div class="wy-grid-for-nav">
43
44   
45    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
46      <div class="wy-side-scroll">
47        <div class="wy-side-nav-search">
48         
49
50         
51            <a href="index.html" class="icon icon-home"> flex_extract
52         
53
54         
55          </a>
56
57         
58           
59           
60              <div class="version">
61                7.1
62              </div>
63           
64         
65
66         
67<div role="search">
68  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
69    <input type="text" name="q" placeholder="Search docs" />
70    <input type="hidden" name="check_keywords" value="yes" />
71    <input type="hidden" name="area" value="default" />
72  </form>
73</div>
74
75         
76        </div>
77
78        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
79         
80           
81           
82             
83           
84           
85              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
86<ul class="current">
87<li class="toctree-l1"><a class="reference internal" href="downloads.html">Downloads</a></li>
88<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
89<li class="toctree-l1"><a class="reference internal" href="program_structure.html">Program Structure</a></li>
90<li class="toctree-l1"><a class="reference internal" href="user_guide.html">User Guide</a></li>
91<li class="toctree-l1 current"><a class="current reference internal" href="#">Auto Generated Documentation</a><ul>
92<li class="toctree-l2"><a class="reference internal" href="#porgrams">Porgrams</a><ul>
93<li class="toctree-l3"><a class="reference internal" href="#module-install">install</a></li>
94<li class="toctree-l3"><a class="reference internal" href="#module-submit">submit</a></li>
95</ul>
96</li>
97<li class="toctree-l2"><a class="reference internal" href="#classes">Classes</a><ul>
98<li class="toctree-l3"><a class="reference internal" href="#module-ControlFile">ControlFile</a></li>
99<li class="toctree-l3"><a class="reference internal" href="#module-EcFlexpart">EcFlexpart</a></li>
100<li class="toctree-l3"><a class="reference internal" href="#module-GribUtil">GribUtil</a></li>
101<li class="toctree-l3"><a class="reference internal" href="#module-MarsRetrieval">MarsRetrieval</a></li>
102<li class="toctree-l3"><a class="reference internal" href="#module-UioFiles">UioFiles</a></li>
103</ul>
104</li>
105<li class="toctree-l2"><a class="reference internal" href="#modules">Modules</a><ul>
106<li class="toctree-l3"><a class="reference internal" href="#module-get_mars_data">get_mars_data</a></li>
107<li class="toctree-l3"><a class="reference internal" href="#module-prepare_flexpart">prepare_flexpart</a></li>
108<li class="toctree-l3"><a class="reference internal" href="#module-tools">tools</a></li>
109<li class="toctree-l3"><a class="reference internal" href="#module-disaggregation">disaggregation</a></li>
110</ul>
111</li>
112</ul>
113</li>
114<li class="toctree-l1"><a class="reference internal" href="support.html">Support</a></li>
115</ul>
116
117           
118         
119        </div>
120      </div>
121    </nav>
122
123    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
124
125     
126      <nav class="wy-nav-top" aria-label="top navigation">
127       
128          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
129          <a href="index.html">flex_extract</a>
130       
131      </nav>
132
133
134      <div class="wy-nav-content">
135       
136        <div class="rst-content">
137       
138         
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154<div role="navigation" aria-label="breadcrumbs navigation">
155
156  <ul class="wy-breadcrumbs">
157   
158      <li><a href="index.html">Docs</a> &raquo;</li>
159       
160      <li>Auto Generated Documentation</li>
161   
162   
163      <li class="wy-breadcrumbs-aside">
164       
165           
166            <a href="_sources/api.rst.txt" rel="nofollow"> View page source</a>
167         
168       
169      </li>
170   
171  </ul>
172
173 
174  <hr/>
175</div>
176          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
177           <div itemprop="articleBody">
178           
179  <div class="section" id="auto-generated-documentation">
180<h1>Auto Generated Documentation<a class="headerlink" href="#auto-generated-documentation" title="Permalink to this headline"></a></h1>
181<div class="contents local topic" id="contents">
182<ul class="simple">
183<li><a class="reference internal" href="#porgrams" id="id1">Porgrams</a><ul>
184<li><a class="reference internal" href="#module-install" id="id2">install</a></li>
185<li><a class="reference internal" href="#module-submit" id="id3">submit</a></li>
186</ul>
187</li>
188<li><a class="reference internal" href="#classes" id="id4">Classes</a><ul>
189<li><a class="reference internal" href="#module-ControlFile" id="id5">ControlFile</a></li>
190<li><a class="reference internal" href="#module-EcFlexpart" id="id6">EcFlexpart</a></li>
191<li><a class="reference internal" href="#module-GribUtil" id="id7">GribUtil</a></li>
192<li><a class="reference internal" href="#module-MarsRetrieval" id="id8">MarsRetrieval</a></li>
193<li><a class="reference internal" href="#module-UioFiles" id="id9">UioFiles</a></li>
194</ul>
195</li>
196<li><a class="reference internal" href="#modules" id="id10">Modules</a><ul>
197<li><a class="reference internal" href="#module-get_mars_data" id="id11">get_mars_data</a></li>
198<li><a class="reference internal" href="#module-prepare_flexpart" id="id12">prepare_flexpart</a></li>
199<li><a class="reference internal" href="#module-tools" id="id13">tools</a></li>
200<li><a class="reference internal" href="#module-disaggregation" id="id14">disaggregation</a></li>
201</ul>
202</li>
203</ul>
204</div>
205<div class="section" id="porgrams">
206<h2><a class="toc-backref" href="#id1">Porgrams</a><a class="headerlink" href="#porgrams" title="Permalink to this headline"></a></h2>
207<div class="section" id="module-install">
208<span id="install"></span><h3><a class="toc-backref" href="#id2">install</a><a class="headerlink" href="#module-install" title="Permalink to this headline"></a></h3>
209<p>This script installs the flex_extract program.</p>
210<p>Depending on the selected installation environment (locally or on the
211ECMWF server ecgate or cca) the program extracts the commandline
212arguments and the CONTROL file parameter and prepares the corresponding
213environment.
214The necessary files are collected in a tar-ball and placed
215at the target location. There its untared, the environment variables will
216be set and the Fortran code will be compiled.
217If the ECMWF environment is selected a job script is prepared and submitted
218for the remaining configurations after putting the tar-ball to the
219target ECMWF server.</p>
220<p>Type: install.py –help
221to get information about command line parameters.
222Read the documentation for usage instructions.</p>
223<dl class="function">
224<dt id="install.check_install_conditions">
225<code class="descclassname">install.</code><code class="descname">check_install_conditions</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#check_install_conditions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.check_install_conditions" title="Permalink to this definition"></a></dt>
226<dd><p>Checks a couple of necessary attributes and conditions
227for the installation such as if they exist and contain values.
228Otherwise set default values.</p>
229<table class="docutils field-list" frame="void" rules="none">
230<col class="field-name" />
231<col class="field-body" />
232<tbody valign="top">
233<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
234command line.</td>
235</tr>
236</tbody>
237</table>
238</dd></dl>
239
240<dl class="function">
241<dt id="install.del_convert_build">
242<code class="descclassname">install.</code><code class="descname">del_convert_build</code><span class="sig-paren">(</span><em>src_path</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#del_convert_build"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.del_convert_build" title="Permalink to this definition"></a></dt>
243<dd><p>Clean up the Fortran source directory and remove all
244build files (e.g. *.o, *.mod and CONVERT2)</p>
245<table class="docutils field-list" frame="void" rules="none">
246<col class="field-name" />
247<col class="field-body" />
248<tbody valign="top">
249<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>src_path</strong> (<em>str</em>) – Path to the fortran source directory.</td>
250</tr>
251</tbody>
252</table>
253</dd></dl>
254
255<dl class="function">
256<dt id="install.get_install_cmdline_args">
257<code class="descclassname">install.</code><code class="descname">get_install_cmdline_args</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#get_install_cmdline_args"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.get_install_cmdline_args" title="Permalink to this definition"></a></dt>
258<dd><p>Decomposes the command line arguments and assigns them to variables.
259Apply default values for non mentioned arguments.</p>
260<table class="docutils field-list" frame="void" rules="none">
261<col class="field-name" />
262<col class="field-body" />
263<tbody valign="top">
264<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>args</strong> – Contains the commandline arguments from script/program call.</td>
265</tr>
266<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">Namespace</td>
267</tr>
268</tbody>
269</table>
270</dd></dl>
271
272<dl class="function">
273<dt id="install.install_via_gateway">
274<code class="descclassname">install.</code><code class="descname">install_via_gateway</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#install_via_gateway"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.install_via_gateway" title="Permalink to this definition"></a></dt>
275<dd><p>Perform the actual installation on local machine or prepare data
276transfer to remote gate and submit a job script which will
277install everything on the remote gate.</p>
278<table class="docutils field-list" frame="void" rules="none">
279<col class="field-name" />
280<col class="field-body" />
281<tbody valign="top">
282<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
283command line.</td>
284</tr>
285</tbody>
286</table>
287</dd></dl>
288
289<dl class="function">
290<dt id="install.main">
291<code class="descclassname">install.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.main" title="Permalink to this definition"></a></dt>
292<dd><p>Controls the installation process. Calls the installation function
293if target is specified.</p>
294</dd></dl>
295
296<dl class="function">
297<dt id="install.mk_compilejob">
298<code class="descclassname">install.</code><code class="descname">mk_compilejob</code><span class="sig-paren">(</span><em>makefile</em>, <em>target</em>, <em>ecuid</em>, <em>ecgid</em>, <em>fp_root</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#mk_compilejob"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_compilejob" title="Permalink to this definition"></a></dt>
299<dd><p>Modifies the original job template file so that it is specified
300for the user and the environment were it will be applied. Result
301is stored in a new file “job.temp” in the python directory.</p>
302<table class="docutils field-list" frame="void" rules="none">
303<col class="field-name" />
304<col class="field-body" />
305<tbody valign="top">
306<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
307<li><strong>makefile</strong> (<em>str</em>) – Name of the makefile which should be used to compile FORTRAN
308CONVERT2 program.</li>
309<li><strong>target</strong> (<em>str</em>) – The target where the installation should be done, e.g. the queue.</li>
310<li><strong>ecuid</strong> (<em>str</em>) – The user id on ECMWF server.</li>
311<li><strong>ecgid</strong> (<em>str</em>) – The group id on ECMWF server.</li>
312<li><strong>fp_root</strong> (<em>str</em>) – Path to the root directory of FLEXPART environment or flex_extract
313environment.</li>
314</ul>
315</td>
316</tr>
317</tbody>
318</table>
319</dd></dl>
320
321<dl class="function">
322<dt id="install.mk_convert_build">
323<code class="descclassname">install.</code><code class="descname">mk_convert_build</code><span class="sig-paren">(</span><em>src_path</em>, <em>makefile</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#mk_convert_build"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_convert_build" title="Permalink to this definition"></a></dt>
324<dd><p>Compiles the Fortran code and generates the executable.</p>
325<table class="docutils field-list" frame="void" rules="none">
326<col class="field-name" />
327<col class="field-body" />
328<tbody valign="top">
329<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
330<li><strong>src_path</strong> (<em>str</em>) – Path to the fortran source directory.</li>
331<li><strong>makefile</strong> (<em>str</em>) – The name of the makefile which should be used.</li>
332</ul>
333</td>
334</tr>
335</tbody>
336</table>
337</dd></dl>
338
339<dl class="function">
340<dt id="install.mk_env_vars">
341<code class="descclassname">install.</code><code class="descname">mk_env_vars</code><span class="sig-paren">(</span><em>ecuid</em>, <em>ecgid</em>, <em>gateway</em>, <em>destination</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#mk_env_vars"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_env_vars" title="Permalink to this definition"></a></dt>
342<dd><p>Creates a file named ECMWF_ENV which contains the
343necessary environmental variables at ECMWF servers.
344It is based on the template ECMWF_ENV.template.</p>
345<table class="docutils field-list" frame="void" rules="none">
346<col class="field-name" />
347<col class="field-body" />
348<tbody valign="top">
349<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
350<li><strong>ecuid</strong> (<em>str</em>) – The user id on ECMWF server.</li>
351<li><strong>ecgid</strong> (<em>str</em>) – The group id on ECMWF server.</li>
352<li><strong>gateway</strong> (<em>str</em>) – The gateway server the user is using.</li>
353<li><strong>destination</strong> (<em>str</em>) – The remote destination which is used to transfer files
354from ECMWF server to local gateway server.</li>
355</ul>
356</td>
357</tr>
358</tbody>
359</table>
360</dd></dl>
361
362<dl class="function">
363<dt id="install.mk_job_template">
364<code class="descclassname">install.</code><code class="descname">mk_job_template</code><span class="sig-paren">(</span><em>ecuid</em>, <em>ecgid</em>, <em>gateway</em>, <em>destination</em>, <em>fp_root</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#mk_job_template"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_job_template" title="Permalink to this definition"></a></dt>
365<dd><p>Modifies the original job template file so that it is specified
366for the user and the environment were it will be applied. Result
367is stored in a new file.</p>
368<table class="docutils field-list" frame="void" rules="none">
369<col class="field-name" />
370<col class="field-body" />
371<tbody valign="top">
372<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
373<li><strong>ecuid</strong> (<em>str</em>) – The user id on ECMWF server.</li>
374<li><strong>ecgid</strong> (<em>str</em>) – The group id on ECMWF server.</li>
375<li><strong>gateway</strong> (<em>str</em>) – The gateway server the user is using.</li>
376<li><strong>destination</strong> (<em>str</em>) – The remote destination which is used to transfer files
377from ECMWF server to local gateway server.</li>
378<li><strong>fp_root</strong> (<em>str</em>) – Path to the root directory of FLEXPART environment or flex_extract
379environment.</li>
380</ul>
381</td>
382</tr>
383</tbody>
384</table>
385</dd></dl>
386
387<dl class="function">
388<dt id="install.mk_tarball">
389<code class="descclassname">install.</code><code class="descname">mk_tarball</code><span class="sig-paren">(</span><em>tarball_path</em>, <em>target</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#mk_tarball"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_tarball" title="Permalink to this definition"></a></dt>
390<dd><p>Creates a tarball with all necessary files which need to be sent to the
391installation directory.
392It does not matter if this is local or remote.
393Collects all python files, the Fortran source and makefiles,
394the ECMWF_ENV file, the CONTROL files as well as the
395template files.</p>
396<table class="docutils field-list" frame="void" rules="none">
397<col class="field-name" />
398<col class="field-body" />
399<tbody valign="top">
400<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
401<li><strong>tarball_path</strong> (<em>str</em>) – The complete path to the tar file which will contain all
402relevant data for flex_extract.</li>
403<li><strong>target</strong> (<em>str</em>) – The queue where the job is submitted to.</li>
404</ul>
405</td>
406</tr>
407</tbody>
408</table>
409</dd></dl>
410
411<dl class="function">
412<dt id="install.un_tarball">
413<code class="descclassname">install.</code><code class="descname">un_tarball</code><span class="sig-paren">(</span><em>tarball_path</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#un_tarball"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.un_tarball" title="Permalink to this definition"></a></dt>
414<dd><p>Extracts the given tarball into current directory.</p>
415<table class="docutils field-list" frame="void" rules="none">
416<col class="field-name" />
417<col class="field-body" />
418<tbody valign="top">
419<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>tarball_path</strong> (<em>str</em>) – The complete path to the tar file which will contain all
420relevant data for flex_extract.</td>
421</tr>
422</tbody>
423</table>
424</dd></dl>
425
426</div>
427<div class="section" id="module-submit">
428<span id="submit"></span><h3><a class="toc-backref" href="#id3">submit</a><a class="headerlink" href="#module-submit" title="Permalink to this headline"></a></h3>
429<p>This script allows the user to extract meteorological fields from the ECMWF.</p>
430<p>It prepares the settings for retrieving the data from ECMWF servers and
431process the resulting files to prepare them for the use with FLEXPART or
432FLEXTRA.</p>
433<p>If it is supposed to work locally then it works through the necessary
434functions get_mars_data and prepare_flexpart. Otherwise it prepares
435a job script (korn shell) which will do the necessary work on the
436ECMWF server. This script will de submitted via the ecaccess command
437ecaccess-job-submit.</p>
438<p>This file can also be imported as a module which then contains the following
439functions:</p>
440<blockquote>
441<div><ul class="simple">
442<li>main - the main function of the script</li>
443<li>submit - calls mk_jobscript depending on operation mode and submits its</li>
444<li>mk_jobscript - creates the job script from a template</li>
445</ul>
446</div></blockquote>
447<p>Type: submit.py –help
448to get information about command line parameters.
449Read the documentation for usage instructions.</p>
450<dl class="function">
451<dt id="submit.main">
452<code class="descclassname">submit.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/submit.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#submit.main" title="Permalink to this definition"></a></dt>
453<dd><p>Get the arguments from script call and from CONTROL file.
454Decides from the argument “queue” if the local version
455is done “queue=None” or the gateway version with “queue=ecgate”
456or “queue=cca”.</p>
457</dd></dl>
458
459<dl class="function">
460<dt id="submit.mk_jobscript">
461<code class="descclassname">submit.</code><code class="descname">mk_jobscript</code><span class="sig-paren">(</span><em>jtemplate</em>, <em>job_file</em>, <em>clist</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/submit.html#mk_jobscript"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#submit.mk_jobscript" title="Permalink to this definition"></a></dt>
462<dd><p>Creates the job script from template.</p>
463<table class="docutils field-list" frame="void" rules="none">
464<col class="field-name" />
465<col class="field-body" />
466<tbody valign="top">
467<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
468<li><strong>jtemplate</strong> (<em>str</em>) – Job template file from sub-directory “_templates” for
469submission to ECMWF. It contains all necessary
470module and variable settings for the ECMWF environment as well as
471the job call and mail report instructions.
472Default is “job.temp”.</li>
473<li><strong>job_file</strong> (<em>str</em>) – Path to the job script file.</li>
474<li><strong>clist</strong> (<em>list of str</em>) – Contains all necessary parameters for ECMWF CONTROL file.</li>
475</ul>
476</td>
477</tr>
478</tbody>
479</table>
480</dd></dl>
481
482<dl class="function">
483<dt id="submit.submit">
484<code class="descclassname">submit.</code><code class="descname">submit</code><span class="sig-paren">(</span><em>jtemplate</em>, <em>c</em>, <em>queue</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/submit.html#submit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#submit.submit" title="Permalink to this definition"></a></dt>
485<dd><p>Prepares the job script and submits it to the specified queue.</p>
486<table class="docutils field-list" frame="void" rules="none">
487<col class="field-name" />
488<col class="field-body" />
489<tbody valign="top">
490<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
491<li><strong>jtemplate</strong> (<em>str</em>) – Job template file from sub-directory “_templates” for
492submission to ECMWF. It contains all necessary
493module and variable settings for the ECMWF environment as well as
494the job call and mail report instructions.
495Default is “job.temp”.</li>
496<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
497command line.</li>
498<li><strong>queue</strong> (<em>str</em>) – Name of queue for submission to ECMWF (e.g. ecgate or cca )</li>
499</ul>
500</td>
501</tr>
502</tbody>
503</table>
504</dd></dl>
505
506</div>
507</div>
508<div class="section" id="classes">
509<h2><a class="toc-backref" href="#id4">Classes</a><a class="headerlink" href="#classes" title="Permalink to this headline"></a></h2>
510<div class="section" id="module-ControlFile">
511<span id="controlfile"></span><h3><a class="toc-backref" href="#id5">ControlFile</a><a class="headerlink" href="#module-ControlFile" title="Permalink to this headline"></a></h3>
512<dl class="class">
513<dt id="ControlFile.ControlFile">
514<em class="property">class </em><code class="descclassname">ControlFile.</code><code class="descname">ControlFile</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ControlFile.html#ControlFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile" title="Permalink to this definition"></a></dt>
515<dd><p>Contains the information which are stored in the CONTROL files.</p>
516<p>The CONTROL file is the steering part of the FLEXPART extraction
517software. All necessary parameters needed to retrieve the data fields
518from the MARS archive for driving FLEXPART are set in a CONTROL file.
519Some specific parameters like the start and end dates can be overwritten
520by the command line parameters, but in generel all parameters needed
521for a complete set of fields for FLEXPART can be set in the CONTROL file.</p>
522<dl class="attribute">
523<dt id="ControlFile.ControlFile.controlfile">
524<code class="descname">controlfile</code><a class="headerlink" href="#ControlFile.ControlFile.controlfile" title="Permalink to this definition"></a></dt>
525<dd><p><em>str</em> – The name of the control file to be processed. Default value is the
526filename passed to the init function when initialised.</p>
527</dd></dl>
528
529<dl class="attribute">
530<dt id="ControlFile.ControlFile.start_date">
531<code class="descname">start_date</code><a class="headerlink" href="#ControlFile.ControlFile.start_date" title="Permalink to this definition"></a></dt>
532<dd><p><em>str</em> – The first day of the retrieval period. Default value is None.</p>
533</dd></dl>
534
535<dl class="attribute">
536<dt id="ControlFile.ControlFile.end_date">
537<code class="descname">end_date</code><a class="headerlink" href="#ControlFile.ControlFile.end_date" title="Permalink to this definition"></a></dt>
538<dd><p><em>str</em> – The last day of the retrieval period. Default value is None.</p>
539</dd></dl>
540
541<dl class="attribute">
542<dt id="ControlFile.ControlFile.date_chunk">
543<code class="descname">date_chunk</code><a class="headerlink" href="#ControlFile.ControlFile.date_chunk" title="Permalink to this definition"></a></dt>
544<dd><p><em>int</em> – Length of period for a single mars retrieval. Default value is 3.</p>
545</dd></dl>
546
547<dl class="attribute">
548<dt id="ControlFile.ControlFile.dtime">
549<code class="descname">dtime</code><a class="headerlink" href="#ControlFile.ControlFile.dtime" title="Permalink to this definition"></a></dt>
550<dd><p><em>str</em> – The time step in hours. Default value is None.</p>
551</dd></dl>
552
553<dl class="attribute">
554<dt id="ControlFile.ControlFile.basetime">
555<code class="descname">basetime</code><a class="headerlink" href="#ControlFile.ControlFile.basetime" title="Permalink to this definition"></a></dt>
556<dd><p><em>int</em> – The time for a half day retrieval. The 12 hours upfront are to be
557retrieved. Default value is None.</p>
558</dd></dl>
559
560<dl class="attribute">
561<dt id="ControlFile.ControlFile.maxstep">
562<code class="descname">maxstep</code><a class="headerlink" href="#ControlFile.ControlFile.maxstep" title="Permalink to this definition"></a></dt>
563<dd><p><em>int</em> – The maximum forecast step for non flux data. Default value is None.</p>
564</dd></dl>
565
566<dl class="attribute">
567<dt id="ControlFile.ControlFile.type">
568<code class="descname">type</code><a class="headerlink" href="#ControlFile.ControlFile.type" title="Permalink to this definition"></a></dt>
569<dd><p><em>list of str</em> – List of field type per retrieving hour. Default value is None.</p>
570</dd></dl>
571
572<dl class="attribute">
573<dt id="ControlFile.ControlFile.time">
574<code class="descname">time</code><a class="headerlink" href="#ControlFile.ControlFile.time" title="Permalink to this definition"></a></dt>
575<dd><p><em>list of str</em> – List of retrieving times in hours. Default valuer is None.</p>
576</dd></dl>
577
578<dl class="attribute">
579<dt id="ControlFile.ControlFile.step">
580<code class="descname">step</code><a class="headerlink" href="#ControlFile.ControlFile.step" title="Permalink to this definition"></a></dt>
581<dd><p><em>list of str or str</em> – List of forecast time steps in hours for non flux data.
582Default value is None.</p>
583</dd></dl>
584
585<dl class="attribute">
586<dt id="ControlFile.ControlFile.acctype">
587<code class="descname">acctype</code><a class="headerlink" href="#ControlFile.ControlFile.acctype" title="Permalink to this definition"></a></dt>
588<dd><p><em>str</em> – The field type for the accumulated forecast fields.
589Default value is None.</p>
590</dd></dl>
591
592<dl class="attribute">
593<dt id="ControlFile.ControlFile.acctime">
594<code class="descname">acctime</code><a class="headerlink" href="#ControlFile.ControlFile.acctime" title="Permalink to this definition"></a></dt>
595<dd><p><em>str</em> – The starting time of the accumulated forecasts. Default value is None.</p>
596</dd></dl>
597
598<dl class="attribute">
599<dt id="ControlFile.ControlFile.accmaxstep">
600<code class="descname">accmaxstep</code><a class="headerlink" href="#ControlFile.ControlFile.accmaxstep" title="Permalink to this definition"></a></dt>
601<dd><p><em>int</em> – The maximum forecast step for the accumulated forecast fields
602(flux data). Default value is None.</p>
603</dd></dl>
604
605<dl class="attribute">
606<dt id="ControlFile.ControlFile.marsclass">
607<code class="descname">marsclass</code><a class="headerlink" href="#ControlFile.ControlFile.marsclass" title="Permalink to this definition"></a></dt>
608<dd><p><em>str</em> – Characterisation of dataset. Default value is None.</p>
609</dd></dl>
610
611<dl class="attribute">
612<dt id="ControlFile.ControlFile.dataset">
613<code class="descname">dataset</code><a class="headerlink" href="#ControlFile.ControlFile.dataset" title="Permalink to this definition"></a></dt>
614<dd><p><em>str</em> – For public datasets there is the specific naming and parameter
615dataset which has to be used to characterize the type of
616data. Default value is None.</p>
617</dd></dl>
618
619<dl class="attribute">
620<dt id="ControlFile.ControlFile.stream">
621<code class="descname">stream</code><a class="headerlink" href="#ControlFile.ControlFile.stream" title="Permalink to this definition"></a></dt>
622<dd><p><em>str</em> – Identifies the forecasting system used to generate the data.
623Default value is None.</p>
624</dd></dl>
625
626<dl class="attribute">
627<dt id="ControlFile.ControlFile.number">
628<code class="descname">number</code><a class="headerlink" href="#ControlFile.ControlFile.number" title="Permalink to this definition"></a></dt>
629<dd><p><em>str</em> – Selects the member in ensemble forecast run. Default value is ‘OFF’.</p>
630</dd></dl>
631
632<dl class="attribute">
633<dt id="ControlFile.ControlFile.expver">
634<code class="descname">expver</code><a class="headerlink" href="#ControlFile.ControlFile.expver" title="Permalink to this definition"></a></dt>
635<dd><p><em>str</em> – The version number of the dataset. Default value is ‘1’.</p>
636</dd></dl>
637
638<dl class="attribute">
639<dt id="ControlFile.ControlFile.gaussian">
640<code class="descname">gaussian</code><a class="headerlink" href="#ControlFile.ControlFile.gaussian" title="Permalink to this definition"></a></dt>
641<dd><p><em>str</em> – This parameter is deprecated and should no longer be used.
642Specifies the desired type of Gaussian grid for the output.
643Default value is an empty string ‘’.</p>
644</dd></dl>
645
646<dl class="attribute">
647<dt id="ControlFile.ControlFile.grid">
648<code class="descname">grid</code><a class="headerlink" href="#ControlFile.ControlFile.grid" title="Permalink to this definition"></a></dt>
649<dd><p><em>str</em> – Specifies the output grid which can be either a Gaussian grid
650or a Latitude/Longitude grid. Default value is None.</p>
651</dd></dl>
652
653<dl class="attribute">
654<dt id="ControlFile.ControlFile.area">
655<code class="descname">area</code><a class="headerlink" href="#ControlFile.ControlFile.area" title="Permalink to this definition"></a></dt>
656<dd><p><em>str</em> – Specifies the desired sub-area of data to be extracted.
657Default value is None.</p>
658</dd></dl>
659
660<dl class="attribute">
661<dt id="ControlFile.ControlFile.left">
662<code class="descname">left</code><a class="headerlink" href="#ControlFile.ControlFile.left" title="Permalink to this definition"></a></dt>
663<dd><p><em>str</em> – The western most longitude of the area to be extracted.
664Default value is None.</p>
665</dd></dl>
666
667<dl class="attribute">
668<dt id="ControlFile.ControlFile.lower">
669<code class="descname">lower</code><a class="headerlink" href="#ControlFile.ControlFile.lower" title="Permalink to this definition"></a></dt>
670<dd><p><em>str</em> – The southern most latitude of the area to be extracted.
671Default value is None.</p>
672</dd></dl>
673
674<dl class="attribute">
675<dt id="ControlFile.ControlFile.upper">
676<code class="descname">upper</code><a class="headerlink" href="#ControlFile.ControlFile.upper" title="Permalink to this definition"></a></dt>
677<dd><p><em>str</em> – The northern most latitued of the area to be extracted.
678Default value is None.</p>
679</dd></dl>
680
681<dl class="attribute">
682<dt id="ControlFile.ControlFile.right">
683<code class="descname">right</code><a class="headerlink" href="#ControlFile.ControlFile.right" title="Permalink to this definition"></a></dt>
684<dd><p><em>str</em> – The eastern most longitude of the area to be extracted.
685Default value is None.</p>
686</dd></dl>
687
688<dl class="attribute">
689<dt id="ControlFile.ControlFile.level">
690<code class="descname">level</code><a class="headerlink" href="#ControlFile.ControlFile.level" title="Permalink to this definition"></a></dt>
691<dd><p><em>str</em> – Specifies the maximum level. Default value is None.</p>
692</dd></dl>
693
694<dl class="attribute">
695<dt id="ControlFile.ControlFile.levelist">
696<code class="descname">levelist</code><a class="headerlink" href="#ControlFile.ControlFile.levelist" title="Permalink to this definition"></a></dt>
697<dd><p><em>str</em> – Specifies the required level list. Default value is None.</p>
698</dd></dl>
699
700<dl class="attribute">
701<dt id="ControlFile.ControlFile.resol">
702<code class="descname">resol</code><a class="headerlink" href="#ControlFile.ControlFile.resol" title="Permalink to this definition"></a></dt>
703<dd><p><em>str</em> – Specifies the desired triangular truncation of retrieved data,
704before carrying out any other selected post-processing.
705Default value is None.</p>
706</dd></dl>
707
708<dl class="attribute">
709<dt id="ControlFile.ControlFile.gauss">
710<code class="descname">gauss</code><a class="headerlink" href="#ControlFile.ControlFile.gauss" title="Permalink to this definition"></a></dt>
711<dd><p><em>int</em> – Switch to select gaussian fields (1) or regular lat/lon (0).
712Default value is 0.</p>
713</dd></dl>
714
715<dl class="attribute">
716<dt id="ControlFile.ControlFile.accuracy">
717<code class="descname">accuracy</code><a class="headerlink" href="#ControlFile.ControlFile.accuracy" title="Permalink to this definition"></a></dt>
718<dd><p><em>int</em> – Specifies the number of bits per value to be used in the
719generated GRIB coded fields. Default value is 24.</p>
720</dd></dl>
721
722<dl class="attribute">
723<dt id="ControlFile.ControlFile.omega">
724<code class="descname">omega</code><a class="headerlink" href="#ControlFile.ControlFile.omega" title="Permalink to this definition"></a></dt>
725<dd><p><em>int</em> – Switch to select omega retrieval (1) or not (0). Default value is 0.</p>
726</dd></dl>
727
728<dl class="attribute">
729<dt id="ControlFile.ControlFile.omegadiff">
730<code class="descname">omegadiff</code><a class="headerlink" href="#ControlFile.ControlFile.omegadiff" title="Permalink to this definition"></a></dt>
731<dd><p><em>int</em> – Switch to decide to calculate Omega and Dps/Dt from continuity
732equation for diagnostic purposes (1) or not (0). Default value is 0.</p>
733</dd></dl>
734
735<dl class="attribute">
736<dt id="ControlFile.ControlFile.eta">
737<code class="descname">eta</code><a class="headerlink" href="#ControlFile.ControlFile.eta" title="Permalink to this definition"></a></dt>
738<dd><p><em>int</em> – Switch to select direct retrieval of etadot from MARS (1) or
739wether it has to be calculated (0). Then Default value is 0.</p>
740</dd></dl>
741
742<dl class="attribute">
743<dt id="ControlFile.ControlFile.etadiff">
744<code class="descname">etadiff</code><a class="headerlink" href="#ControlFile.ControlFile.etadiff" title="Permalink to this definition"></a></dt>
745<dd><p><em>int</em> – Switch to select calculation of etadot and Dps/Dt from continuity
746equation for diagnostic purposes (1) or not (0). Default value is 0.</p>
747</dd></dl>
748
749<dl class="attribute">
750<dt id="ControlFile.ControlFile.etapar">
751<code class="descname">etapar</code><a class="headerlink" href="#ControlFile.ControlFile.etapar" title="Permalink to this definition"></a></dt>
752<dd><p><em>int</em> – GRIB parameter Id for etadot fields. Default value is 77.</p>
753</dd></dl>
754
755<dl class="attribute">
756<dt id="ControlFile.ControlFile.dpdeta">
757<code class="descname">dpdeta</code><a class="headerlink" href="#ControlFile.ControlFile.dpdeta" title="Permalink to this definition"></a></dt>
758<dd><p><em>int</em> – Switch to select multiplication of etadot with dpdeta.
759Default value is 1.</p>
760</dd></dl>
761
762<dl class="attribute">
763<dt id="ControlFile.ControlFile.smooth">
764<code class="descname">smooth</code><a class="headerlink" href="#ControlFile.ControlFile.smooth" title="Permalink to this definition"></a></dt>
765<dd><p><em>int</em> – Spectral truncation of ETADOT after calculation on Gaussian grid.
766Default value is 0.</p>
767</dd></dl>
768
769<dl class="attribute">
770<dt id="ControlFile.ControlFile.format">
771<code class="descname">format</code><a class="headerlink" href="#ControlFile.ControlFile.format" title="Permalink to this definition"></a></dt>
772<dd><p><em>str</em> – The format of the GRIB data. Default value is ‘GRIB1’.</p>
773</dd></dl>
774
775<dl class="attribute">
776<dt id="ControlFile.ControlFile.addpar">
777<code class="descname">addpar</code><a class="headerlink" href="#ControlFile.ControlFile.addpar" title="Permalink to this definition"></a></dt>
778<dd><p><em>str</em> – List of additional surface level ECMWF parameter to be retrieved.
779Default value is None.</p>
780</dd></dl>
781
782<dl class="attribute">
783<dt id="ControlFile.ControlFile.prefix">
784<code class="descname">prefix</code><a class="headerlink" href="#ControlFile.ControlFile.prefix" title="Permalink to this definition"></a></dt>
785<dd><p><em>str</em> – Prefix string for the final FLEXPART/FLEXTRA ready input files.
786Default value is ‘EN’.</p>
787</dd></dl>
788
789<dl class="attribute">
790<dt id="ControlFile.ControlFile.cwc">
791<code class="descname">cwc</code><a class="headerlink" href="#ControlFile.ControlFile.cwc" title="Permalink to this definition"></a></dt>
792<dd><p><em>int</em> – Switch to select wether the sum of cloud liquid water content and
793cloud ice water content should be retrieved. Default value is 0.</p>
794</dd></dl>
795
796<dl class="attribute">
797<dt id="ControlFile.ControlFile.wrf">
798<code class="descname">wrf</code><a class="headerlink" href="#ControlFile.ControlFile.wrf" title="Permalink to this definition"></a></dt>
799<dd><p><em>int</em> – Switch to select further parameters for retrievment to support
800WRF simulations. Default value is 0.</p>
801</dd></dl>
802
803<dl class="attribute">
804<dt id="ControlFile.ControlFile.ecfsdir">
805<code class="descname">ecfsdir</code><a class="headerlink" href="#ControlFile.ControlFile.ecfsdir" title="Permalink to this definition"></a></dt>
806<dd><p><em>str</em> – Path to the ECMWF storage  ‘ectmp:/${USER}/econdemand/’</p>
807</dd></dl>
808
809<dl class="attribute">
810<dt id="ControlFile.ControlFile.mailfail">
811<code class="descname">mailfail</code><a class="headerlink" href="#ControlFile.ControlFile.mailfail" title="Permalink to this definition"></a></dt>
812<dd><p><em>list of str</em> – Email list for sending error log files from ECMWF servers.
813The email addresses should be seperated by a comma.
814Default value is [‘${USER}’].</p>
815</dd></dl>
816
817<dl class="attribute">
818<dt id="ControlFile.ControlFile.mailops">
819<code class="descname">mailops</code><a class="headerlink" href="#ControlFile.ControlFile.mailops" title="Permalink to this definition"></a></dt>
820<dd><p><em>list of str</em> – Email list for sending operational log files from ECMWF servers.
821The email addresses should be seperated by a comma.
822Default value is [‘${USER}’].</p>
823</dd></dl>
824
825<dl class="attribute">
826<dt id="ControlFile.ControlFile.grib2flexpart">
827<code class="descname">grib2flexpart</code><a class="headerlink" href="#ControlFile.ControlFile.grib2flexpart" title="Permalink to this definition"></a></dt>
828<dd><p><em>int 0</em> – Switch to select generation of preprocessed FLEXPART files “.fp”.
829If it is selected, the program grib2flexpart will try
830to convert the flex_extract output files into “.fp” format.</p>
831</dd></dl>
832
833<dl class="attribute">
834<dt id="ControlFile.ControlFile.ecstorage">
835<code class="descname">ecstorage</code><a class="headerlink" href="#ControlFile.ControlFile.ecstorage" title="Permalink to this definition"></a></dt>
836<dd><p><em>int</em> – Switch to select storage of FLEXPART ready output files
837in the ECFS file system. Default value is 0.</p>
838</dd></dl>
839
840<dl class="attribute">
841<dt id="ControlFile.ControlFile.ectrans">
842<code class="descname">ectrans</code><a class="headerlink" href="#ControlFile.ControlFile.ectrans" title="Permalink to this definition"></a></dt>
843<dd><p><em>int</em> – Switch to select the transfer of FLEXPART ready output files
844to the gateway server. Default value is 0.</p>
845</dd></dl>
846
847<dl class="attribute">
848<dt id="ControlFile.ControlFile.inputdir">
849<code class="descname">inputdir</code><a class="headerlink" href="#ControlFile.ControlFile.inputdir" title="Permalink to this definition"></a></dt>
850<dd><p><em>str</em> – Path to the temporary directory for the retrieval grib files and
851other processing files. Default value is _config.PATH_INPUT_DIR.</p>
852</dd></dl>
853
854<dl class="attribute">
855<dt id="ControlFile.ControlFile.outputdir">
856<code class="descname">outputdir</code><a class="headerlink" href="#ControlFile.ControlFile.outputdir" title="Permalink to this definition"></a></dt>
857<dd><p><em>str</em> – Path to the final directory where the final FLEXPART ready input
858files are stored. Default value is None.</p>
859</dd></dl>
860
861<dl class="attribute">
862<dt id="ControlFile.ControlFile.flexextractdir">
863<code class="descname">flexextractdir</code><a class="headerlink" href="#ControlFile.ControlFile.flexextractdir" title="Permalink to this definition"></a></dt>
864<dd><p><em>str</em> – Path to the flex_extract root directory. Default value is
865_config.PATH_FLEXEXTRACT_DIR.</p>
866</dd></dl>
867
868<dl class="attribute">
869<dt id="ControlFile.ControlFile.exedir">
870<code class="descname">exedir</code><a class="headerlink" href="#ControlFile.ControlFile.exedir" title="Permalink to this definition"></a></dt>
871<dd><p><em>str</em> – Path to the FORTRAN executable file. Default value is
872_config.PATH_FORTRAN_SRC.</p>
873</dd></dl>
874
875<dl class="attribute">
876<dt id="ControlFile.ControlFile.flexpartdir">
877<code class="descname">flexpartdir</code><a class="headerlink" href="#ControlFile.ControlFile.flexpartdir" title="Permalink to this definition"></a></dt>
878<dd><p><em>str</em> – Path to a FLEXPART root directory. Default value is None.</p>
879</dd></dl>
880
881<dl class="attribute">
882<dt id="ControlFile.ControlFile.makefile">
883<code class="descname">makefile</code><a class="headerlink" href="#ControlFile.ControlFile.makefile" title="Permalink to this definition"></a></dt>
884<dd><p><em>str</em> – Name of the makefile to be used for the Fortran program.
885Default value is ‘Makefile.gfortran’.</p>
886</dd></dl>
887
888<dl class="attribute">
889<dt id="ControlFile.ControlFile.destination">
890<code class="descname">destination</code><a class="headerlink" href="#ControlFile.ControlFile.destination" title="Permalink to this definition"></a></dt>
891<dd><p><em>str</em> – The remote destination which is used to transfer files
892from ECMWF server to local gateway server. Default value is None.</p>
893</dd></dl>
894
895<dl class="attribute">
896<dt id="ControlFile.ControlFile.gateway">
897<code class="descname">gateway</code><a class="headerlink" href="#ControlFile.ControlFile.gateway" title="Permalink to this definition"></a></dt>
898<dd><p><em>str</em> – The gateway server the user is using. Default value is None.</p>
899</dd></dl>
900
901<dl class="attribute">
902<dt id="ControlFile.ControlFile.ecuid">
903<code class="descname">ecuid</code><a class="headerlink" href="#ControlFile.ControlFile.ecuid" title="Permalink to this definition"></a></dt>
904<dd><p><em>str</em> – The user id on ECMWF server. Default value is None.</p>
905</dd></dl>
906
907<dl class="attribute">
908<dt id="ControlFile.ControlFile.ecgid">
909<code class="descname">ecgid</code><a class="headerlink" href="#ControlFile.ControlFile.ecgid" title="Permalink to this definition"></a></dt>
910<dd><p><em>str</em> – The group id on ECMWF server. Default value is None.</p>
911</dd></dl>
912
913<dl class="attribute">
914<dt id="ControlFile.ControlFile.install_target">
915<code class="descname">install_target</code><a class="headerlink" href="#ControlFile.ControlFile.install_target" title="Permalink to this definition"></a></dt>
916<dd><p><em>str</em> – Defines the location where the installation is to be done.
917Default value is None.</p>
918</dd></dl>
919
920<dl class="attribute">
921<dt id="ControlFile.ControlFile.debug">
922<code class="descname">debug</code><a class="headerlink" href="#ControlFile.ControlFile.debug" title="Permalink to this definition"></a></dt>
923<dd><p><em>int</em> – Switch to keep temporary files at the end of postprocessing (1) or
924to delete all temporary files except the final output files (0).
925Default value is 0.</p>
926</dd></dl>
927
928<dl class="attribute">
929<dt id="ControlFile.ControlFile.oper">
930<code class="descname">oper</code><a class="headerlink" href="#ControlFile.ControlFile.oper" title="Permalink to this definition"></a></dt>
931<dd><p><em>int</em> – Switch to prepare the operational job script. Start date, end date and
932basetime will be prepared with environment variables.
933Default value is 0.</p>
934</dd></dl>
935
936<dl class="attribute">
937<dt id="ControlFile.ControlFile.request">
938<code class="descname">request</code><a class="headerlink" href="#ControlFile.ControlFile.request" title="Permalink to this definition"></a></dt>
939<dd><p><em>int</em> – Switch to select between just retrieving the data (0), writing the mars
940parameter values to a csv file (1) or doing both (2).
941Default value is 0.</p>
942</dd></dl>
943
944<dl class="attribute">
945<dt id="ControlFile.ControlFile.public">
946<code class="descname">public</code><a class="headerlink" href="#ControlFile.ControlFile.public" title="Permalink to this definition"></a></dt>
947<dd><p><em>int</em> – Switch to select kind of ECMWF Web Api access and the
948possible data sets. Public data sets (1) and Memberstate data sets (0).
949Default value is 0.</p>
950</dd></dl>
951
952<dl class="attribute">
953<dt id="ControlFile.ControlFile.ec_api">
954<code class="descname">ec_api</code><a class="headerlink" href="#ControlFile.ControlFile.ec_api" title="Permalink to this definition"></a></dt>
955<dd><p><em>boolean</em> – Tells wether the ECMWF Web API was able to load or not.
956Default value is None.</p>
957</dd></dl>
958
959<dl class="attribute">
960<dt id="ControlFile.ControlFile.cds_api">
961<code class="descname">cds_api</code><a class="headerlink" href="#ControlFile.ControlFile.cds_api" title="Permalink to this definition"></a></dt>
962<dd><p><em>boolean</em> – Tells wether the CDS API was able to load or not.
963Default value is None.</p>
964</dd></dl>
965
966<dl class="attribute">
967<dt id="ControlFile.ControlFile.purefc">
968<code class="descname">purefc</code><a class="headerlink" href="#ControlFile.ControlFile.purefc" title="Permalink to this definition"></a></dt>
969<dd><p><em>int</em> – Switch to decide wether the job is a pure forecast retrieval or
970coupled with analysis data. Default value is 0.</p>
971</dd></dl>
972
973<dl class="attribute">
974<dt id="ControlFile.ControlFile.rrint">
975<code class="descname">rrint</code><a class="headerlink" href="#ControlFile.ControlFile.rrint" title="Permalink to this definition"></a></dt>
976<dd><p><em>int</em> – Switch to select between old precipitation disaggregation method (0)
977or the new IA3 disaggegration method (1). Default value is 0.</p>
978</dd></dl>
979
980<dl class="attribute">
981<dt id="ControlFile.ControlFile.logicals">
982<code class="descname">logicals</code><a class="headerlink" href="#ControlFile.ControlFile.logicals" title="Permalink to this definition"></a></dt>
983<dd><p><em>list of str</em> – List of the names of logical switches which controls the flow
984of the program. Default list is [‘gauss’, ‘omega’, ‘omegadiff’, ‘eta’,
985‘etadiff’, ‘dpdeta’, ‘cwc’, ‘wrf’, ‘grib2flexpart’, ‘ecstorage’,
986‘ectrans’, ‘debug’, ‘request’, ‘public’, ‘purefc’, ‘rrint’]</p>
987</dd></dl>
988
989<dl class="method">
990<dt id="ControlFile.ControlFile.assign_args_to_control">
991<code class="descname">assign_args_to_control</code><span class="sig-paren">(</span><em>args</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ControlFile.html#ControlFile.assign_args_to_control"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.assign_args_to_control" title="Permalink to this definition"></a></dt>
992<dd><p>Overwrites the existing ControlFile instance attributes with
993the command line arguments.</p>
994<table class="docutils field-list" frame="void" rules="none">
995<col class="field-name" />
996<col class="field-body" />
997<tbody valign="top">
998<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>args</strong> (<em>Namespace</em>) – Contains the commandline arguments from script/program call.</td>
999</tr>
1000</tbody>
1001</table>
1002</dd></dl>
1003
1004<dl class="method">
1005<dt id="ControlFile.ControlFile.assign_envs_to_control">
1006<code class="descname">assign_envs_to_control</code><span class="sig-paren">(</span><em>envs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ControlFile.html#ControlFile.assign_envs_to_control"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.assign_envs_to_control" title="Permalink to this definition"></a></dt>
1007<dd><p>Assigns the ECMWF environment parameter.</p>
1008<table class="docutils field-list" frame="void" rules="none">
1009<col class="field-name" />
1010<col class="field-body" />
1011<tbody valign="top">
1012<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>envs</strong> (<em>dict of str</em>) – Contains the ECMWF environment parameternames “ECUID”, “ECGID”,
1013“DESTINATION” and “GATEWAY” with its corresponding values.
1014They were read from the file “ECMWF_ENV”.</td>
1015</tr>
1016</tbody>
1017</table>
1018</dd></dl>
1019
1020<dl class="method">
1021<dt id="ControlFile.ControlFile.check_conditions">
1022<code class="descname">check_conditions</code><span class="sig-paren">(</span><em>queue</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ControlFile.html#ControlFile.check_conditions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.check_conditions" title="Permalink to this definition"></a></dt>
1023<dd><p>Checks a couple of necessary attributes and conditions,
1024such as if they exist and contain values.
1025Otherwise set default values.</p>
1026<table class="docutils field-list" frame="void" rules="none">
1027<col class="field-name" />
1028<col class="field-body" />
1029<tbody valign="top">
1030<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>queue</strong> (<em>str</em>) – Name of the queue if submitted to the ECMWF servers.
1031Used to check if ecuid, ecgid, gateway and destination
1032are set correctly and are not empty.</td>
1033</tr>
1034</tbody>
1035</table>
1036</dd></dl>
1037
1038<dl class="method">
1039<dt id="ControlFile.ControlFile.to_list">
1040<code class="descname">to_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/ControlFile.html#ControlFile.to_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.to_list" title="Permalink to this definition"></a></dt>
1041<dd><p>Just generates a list of strings containing the attributes and
1042assigned values except the attributes “_expanded”, “exedir”,
1043“flexextractdir” and “flexpartdir”.</p>
1044<table class="docutils field-list" frame="void" rules="none">
1045<col class="field-name" />
1046<col class="field-body" />
1047<tbody valign="top">
1048<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>l</strong> – A sorted list of the all ControlFile class attributes with
1049their values except the attributes “_expanded”, “exedir”,
1050“flexextractdir” and “flexpartdir”.</td>
1051</tr>
1052<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list of *</td>
1053</tr>
1054</tbody>
1055</table>
1056</dd></dl>
1057
1058</dd></dl>
1059
1060</div>
1061<div class="section" id="module-EcFlexpart">
1062<span id="ecflexpart"></span><h3><a class="toc-backref" href="#id6">EcFlexpart</a><a class="headerlink" href="#module-EcFlexpart" title="Permalink to this headline"></a></h3>
1063<dl class="class">
1064<dt id="EcFlexpart.EcFlexpart">
1065<em class="property">class </em><code class="descclassname">EcFlexpart.</code><code class="descname">EcFlexpart</code><span class="sig-paren">(</span><em>c</em>, <em>fluxes=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart" title="Permalink to this definition"></a></dt>
1066<dd><p>Class to represent FLEXPART specific ECMWF data.</p>
1067<p>FLEXPART needs grib files in a specifc format. All necessary data fields
1068for one time step are stored in a single file. The class represents an
1069instance with all the parameter and settings necessary for retrieving
1070MARS data and modifing them so they are fitting FLEXPART needs. The class
1071is able to disaggregate the fluxes and convert grid types to the one needed
1072by FLEXPART, therefore using the FORTRAN program.</p>
1073<dl class="attribute">
1074<dt id="EcFlexpart.EcFlexpart.mreq_count">
1075<code class="descname">mreq_count</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.mreq_count" title="Permalink to this definition"></a></dt>
1076<dd><p><em>int</em> – Counter for the number of generated mars requests.</p>
1077</dd></dl>
1078
1079<dl class="attribute">
1080<dt id="EcFlexpart.EcFlexpart.inputdir">
1081<code class="descname">inputdir</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.inputdir" title="Permalink to this definition"></a></dt>
1082<dd><p><em>str</em> – Path to the directory where the retrieved data is stored.</p>
1083</dd></dl>
1084
1085<dl class="attribute">
1086<dt id="EcFlexpart.EcFlexpart.dataset">
1087<code class="descname">dataset</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.dataset" title="Permalink to this definition"></a></dt>
1088<dd><p><em>str</em> – For public datasets there is the specific naming and parameter
1089dataset which has to be used to characterize the type of
1090data.</p>
1091</dd></dl>
1092
1093<dl class="attribute">
1094<dt id="EcFlexpart.EcFlexpart.basetime">
1095<code class="descname">basetime</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.basetime" title="Permalink to this definition"></a></dt>
1096<dd><p><em>int</em> – The time for a half day retrieval. The 12 hours upfront are to be
1097retrieved.</p>
1098</dd></dl>
1099
1100<dl class="attribute">
1101<dt id="EcFlexpart.EcFlexpart.dtime">
1102<code class="descname">dtime</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.dtime" title="Permalink to this definition"></a></dt>
1103<dd><p><em>str</em> – Time step in hours.</p>
1104</dd></dl>
1105
1106<dl class="attribute">
1107<dt id="EcFlexpart.EcFlexpart.acctype">
1108<code class="descname">acctype</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.acctype" title="Permalink to this definition"></a></dt>
1109<dd><p><em>str</em> – The field type for the accumulated forecast fields.</p>
1110</dd></dl>
1111
1112<dl class="attribute">
1113<dt id="EcFlexpart.EcFlexpart.acctime">
1114<code class="descname">acctime</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.acctime" title="Permalink to this definition"></a></dt>
1115<dd><p><em>str</em> – The starting time from the accumulated forecasts.</p>
1116</dd></dl>
1117
1118<dl class="attribute">
1119<dt id="EcFlexpart.EcFlexpart.accmaxstep">
1120<code class="descname">accmaxstep</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.accmaxstep" title="Permalink to this definition"></a></dt>
1121<dd><p><em>str</em> – The maximum forecast step for the accumulated forecast fields.</p>
1122</dd></dl>
1123
1124<dl class="attribute">
1125<dt id="EcFlexpart.EcFlexpart.marsclass">
1126<code class="descname">marsclass</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.marsclass" title="Permalink to this definition"></a></dt>
1127<dd><p><em>str</em> – Characterisation of dataset.</p>
1128</dd></dl>
1129
1130<dl class="attribute">
1131<dt id="EcFlexpart.EcFlexpart.stream">
1132<code class="descname">stream</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.stream" title="Permalink to this definition"></a></dt>
1133<dd><p><em>str</em> – Identifies the forecasting system used to generate the data.</p>
1134</dd></dl>
1135
1136<dl class="attribute">
1137<dt id="EcFlexpart.EcFlexpart.number">
1138<code class="descname">number</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.number" title="Permalink to this definition"></a></dt>
1139<dd><p><em>str</em> – Selects the member in ensemble forecast run.</p>
1140</dd></dl>
1141
1142<dl class="attribute">
1143<dt id="EcFlexpart.EcFlexpart.resol">
1144<code class="descname">resol</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.resol" title="Permalink to this definition"></a></dt>
1145<dd><p><em>str</em> – Specifies the desired triangular truncation of retrieved data,
1146before carrying out any other selected post-processing.</p>
1147</dd></dl>
1148
1149<dl class="attribute">
1150<dt id="EcFlexpart.EcFlexpart.accuracy">
1151<code class="descname">accuracy</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.accuracy" title="Permalink to this definition"></a></dt>
1152<dd><p><em>str</em> – Specifies the number of bits per value to be used in the
1153generated GRIB coded fields.</p>
1154</dd></dl>
1155
1156<dl class="attribute">
1157<dt id="EcFlexpart.EcFlexpart.addpar">
1158<code class="descname">addpar</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.addpar" title="Permalink to this definition"></a></dt>
1159<dd><p><em>str</em> – List of additional parameters to be retrieved.</p>
1160</dd></dl>
1161
1162<dl class="attribute">
1163<dt id="EcFlexpart.EcFlexpart.level">
1164<code class="descname">level</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.level" title="Permalink to this definition"></a></dt>
1165<dd><p><em>str</em> – Specifies the maximum level.</p>
1166</dd></dl>
1167
1168<dl class="attribute">
1169<dt id="EcFlexpart.EcFlexpart.expver">
1170<code class="descname">expver</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.expver" title="Permalink to this definition"></a></dt>
1171<dd><p><em>str</em> – The version of the dataset.</p>
1172</dd></dl>
1173
1174<dl class="attribute">
1175<dt id="EcFlexpart.EcFlexpart.levelist">
1176<code class="descname">levelist</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.levelist" title="Permalink to this definition"></a></dt>
1177<dd><p><em>str</em> – Specifies the required levels.</p>
1178</dd></dl>
1179
1180<dl class="attribute">
1181<dt id="EcFlexpart.EcFlexpart.glevelist">
1182<code class="descname">glevelist</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.glevelist" title="Permalink to this definition"></a></dt>
1183<dd><p><em>str</em> – Specifies the required levels for gaussian grids.</p>
1184</dd></dl>
1185
1186<dl class="attribute">
1187<dt id="EcFlexpart.EcFlexpart.gaussian">
1188<code class="descname">gaussian</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.gaussian" title="Permalink to this definition"></a></dt>
1189<dd><p><em>str</em> – This parameter is deprecated and should no longer be used.
1190Specifies the desired type of Gaussian grid for the output.</p>
1191</dd></dl>
1192
1193<dl class="attribute">
1194<dt id="EcFlexpart.EcFlexpart.grid">
1195<code class="descname">grid</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.grid" title="Permalink to this definition"></a></dt>
1196<dd><p><em>str</em> – Specifies the output grid which can be either a Gaussian grid
1197or a Latitude/Longitude grid.</p>
1198</dd></dl>
1199
1200<dl class="attribute">
1201<dt id="EcFlexpart.EcFlexpart.area">
1202<code class="descname">area</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.area" title="Permalink to this definition"></a></dt>
1203<dd><p><em>str</em> – Specifies the desired sub-area of data to be extracted.</p>
1204</dd></dl>
1205
1206<dl class="attribute">
1207<dt id="EcFlexpart.EcFlexpart.purefc">
1208<code class="descname">purefc</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.purefc" title="Permalink to this definition"></a></dt>
1209<dd><p><em>int</em> – Switch for definition of pure forecast mode or not.</p>
1210</dd></dl>
1211
1212<dl class="attribute">
1213<dt id="EcFlexpart.EcFlexpart.outputfilelist">
1214<code class="descname">outputfilelist</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.outputfilelist" title="Permalink to this definition"></a></dt>
1215<dd><p><em>list of str</em> – The final list of FLEXPART ready input files.</p>
1216</dd></dl>
1217
1218<dl class="attribute">
1219<dt id="EcFlexpart.EcFlexpart.types">
1220<code class="descname">types</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.types" title="Permalink to this definition"></a></dt>
1221<dd><p><em>dictionary</em> – Determines the combination of type of fields, time and forecast step
1222to be retrieved.</p>
1223</dd></dl>
1224
1225<dl class="attribute">
1226<dt id="EcFlexpart.EcFlexpart.params">
1227<code class="descname">params</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.params" title="Permalink to this definition"></a></dt>
1228<dd><p><em>dictionary</em> – Collection of grid types and their corresponding parameters,
1229levels, level types and the grid definition.</p>
1230</dd></dl>
1231
1232<dl class="attribute">
1233<dt id="EcFlexpart.EcFlexpart.server">
1234<code class="descname">server</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.server" title="Permalink to this definition"></a></dt>
1235<dd><p><em>ECMWFService or ECMWFDataServer</em> – This is the connection to the ECMWF data servers.</p>
1236</dd></dl>
1237
1238<dl class="attribute">
1239<dt id="EcFlexpart.EcFlexpart.public">
1240<code class="descname">public</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.public" title="Permalink to this definition"></a></dt>
1241<dd><p><em>int</em> – Decides which Web API Server version is used.</p>
1242</dd></dl>
1243
1244<dl class="attribute">
1245<dt id="EcFlexpart.EcFlexpart.dates">
1246<code class="descname">dates</code><a class="headerlink" href="#EcFlexpart.EcFlexpart.dates" title="Permalink to this definition"></a></dt>
1247<dd><p><em>str</em> – Contains start and end date of the retrieval in the format
1248“YYYYMMDD/to/YYYYMMDD”</p>
1249</dd></dl>
1250
1251<dl class="method">
1252<dt id="EcFlexpart.EcFlexpart.calc_extra_elda">
1253<code class="descname">calc_extra_elda</code><span class="sig-paren">(</span><em>path</em>, <em>prefix</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.calc_extra_elda"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.calc_extra_elda" title="Permalink to this definition"></a></dt>
1254<dd><p>Calculates extra ensemble members for ELDA - Stream.</p>
1255<table class="docutils field-list" frame="void" rules="none">
1256<col class="field-name" />
1257<col class="field-body" />
1258<tbody valign="top">
1259<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1260<li><strong>path</strong> (<em>str</em>) – Path to the output files.</li>
1261<li><strong>prefix</strong> (<em>str</em>) – The prefix of the output filenames as defined in Control file.</li>
1262</ul>
1263</td>
1264</tr>
1265</tbody>
1266</table>
1267</dd></dl>
1268
1269<dl class="method">
1270<dt id="EcFlexpart.EcFlexpart.create">
1271<code class="descname">create</code><span class="sig-paren">(</span><em>inputfiles</em>, <em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.create"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.create" title="Permalink to this definition"></a></dt>
1272<dd><p>An index file will be created which depends on the combination
1273of “date”, “time” and “stepRange” values. This is used to iterate
1274over all messages in each grib file which were passed through the
1275parameter “inputfiles” to seperate specific parameters into fort.*
1276files. Afterwards the FORTRAN program is called to convert
1277the data fields all to the same grid and put them in one file
1278per unique time step (combination of “date”, “time” and
1279“stepRange”).</p>
1280<div class="admonition note">
1281<p class="first admonition-title">Note</p>
1282<p class="last">This method is based on the ECMWF example index.py
1283<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>
1284</div>
1285<table class="docutils field-list" frame="void" rules="none">
1286<col class="field-name" />
1287<col class="field-body" />
1288<tbody valign="top">
1289<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1290<li><strong>inputfiles</strong> (<a class="reference internal" href="#UioFiles.UioFiles" title="UioFiles.UioFiles"><em>UioFiles</em></a>) – Contains a list of files.</li>
1291<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
1292command line.</li>
1293</ul>
1294</td>
1295</tr>
1296</tbody>
1297</table>
1298</dd></dl>
1299
1300<dl class="method">
1301<dt id="EcFlexpart.EcFlexpart.deacc_fluxes">
1302<code class="descname">deacc_fluxes</code><span class="sig-paren">(</span><em>inputfiles</em>, <em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.deacc_fluxes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.deacc_fluxes" title="Permalink to this definition"></a></dt>
1303<dd><p>De-accumulate and disaggregate flux data.</p>
1304<p>Goes through all flux fields in ordered time and de-accumulate
1305the fields. Afterwards the fields are disaggregated in time.
1306Different versions of disaggregation is provided for rainfall
1307data (darain, modified linear) and the surface fluxes and
1308stress data (dapoly, cubic polynomial).</p>
1309<table class="docutils field-list" frame="void" rules="none">
1310<col class="field-name" />
1311<col class="field-body" />
1312<tbody valign="top">
1313<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1314<li><strong>inputfiles</strong> (<a class="reference internal" href="#UioFiles.UioFiles" title="UioFiles.UioFiles"><em>UioFiles</em></a>) – Contains the list of files that contain flux data.</li>
1315<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
1316command line.</li>
1317</ul>
1318</td>
1319</tr>
1320</tbody>
1321</table>
1322</dd></dl>
1323
1324<dl class="method">
1325<dt id="EcFlexpart.EcFlexpart.prepare_fp_files">
1326<code class="descname">prepare_fp_files</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.prepare_fp_files"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.prepare_fp_files" title="Permalink to this definition"></a></dt>
1327<dd><p>Conversion of GRIB files to FLEXPART binary format.</p>
1328<table class="docutils field-list" frame="void" rules="none">
1329<col class="field-name" />
1330<col class="field-body" />
1331<tbody valign="top">
1332<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
1333command line.</td>
1334</tr>
1335</tbody>
1336</table>
1337</dd></dl>
1338
1339<dl class="method">
1340<dt id="EcFlexpart.EcFlexpart.process_output">
1341<code class="descname">process_output</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.process_output"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.process_output" title="Permalink to this definition"></a></dt>
1342<dd><p>Postprocessing of FLEXPART input files.</p>
1343<p>The grib files are postprocessed depending on the selection in
1344CONTROL file. The resulting files are moved to the output
1345directory if its not equal to the input directory.
1346The following modifications might be done if
1347properly switched in CONTROL file:
1348GRIB2 - Conversion to GRIB2
1349ECTRANS - Transfer of files to gateway server
1350ECSTORAGE - Storage at ECMWF server</p>
1351<table class="docutils field-list" frame="void" rules="none">
1352<col class="field-name" />
1353<col class="field-body" />
1354<tbody valign="top">
1355<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
1356command line.</td>
1357</tr>
1358</tbody>
1359</table>
1360</dd></dl>
1361
1362<dl class="method">
1363<dt id="EcFlexpart.EcFlexpart.retrieve">
1364<code class="descname">retrieve</code><span class="sig-paren">(</span><em>server</em>, <em>dates</em>, <em>public</em>, <em>request</em>, <em>inputdir='.'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.retrieve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.retrieve" title="Permalink to this definition"></a></dt>
1365<dd><p>Finalizing the retrieval information by setting final details
1366depending on grid type.
1367Prepares MARS retrievals per grid type and submits them.</p>
1368<table class="docutils field-list" frame="void" rules="none">
1369<col class="field-name" />
1370<col class="field-body" />
1371<tbody valign="top">
1372<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1373<li><strong>server</strong> (<em>ECMWFService</em><em> or </em><em>ECMWFDataServer</em>) – The connection to the ECMWF server. This is different
1374for member state users which have full access and non
1375member state users which have only access to the public
1376data sets. The decision is made from command line argument
1377“public”; for public access its True (ECMWFDataServer)
1378for member state users its False (ECMWFService)</li>
1379<li><strong>dates</strong> (<em>str</em>) – Contains start and end date of the retrieval in the format
1380“YYYYMMDD/to/YYYYMMDD”</li>
1381<li><strong>request</strong> (<em>int</em>) – Selects the mode of retrieval.
13820: Retrieves the data from ECMWF.
13831: Prints the mars requests to an output file.
13842: Retrieves the data and prints the mars request.</li>
1385<li><strong>inputdir</strong> (<em>str</em><em>, </em><em>optional</em>) – Path to the directory where the retrieved data is about
1386to be stored. The default is the current directory (‘.’).</li>
1387</ul>
1388</td>
1389</tr>
1390</tbody>
1391</table>
1392</dd></dl>
1393
1394<dl class="method">
1395<dt id="EcFlexpart.EcFlexpart.write_namelist">
1396<code class="descname">write_namelist</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.write_namelist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.write_namelist" title="Permalink to this definition"></a></dt>
1397<dd><p>Creates a namelist file in the temporary directory and writes
1398the following values to it: maxl, maxb, mlevel,
1399mlevelist, mnauf, metapar, rlo0, rlo1, rla0, rla1,
1400momega, momegadiff, mgauss, msmooth, meta, metadiff, mdpdeta</p>
1401<table class="docutils field-list" frame="void" rules="none">
1402<col class="field-name" />
1403<col class="field-body" />
1404<tbody valign="top">
1405<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1406<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
1407command line.</li>
1408<li><strong>filename</strong> (<em>str</em>) – Name of the namelist file.</li>
1409</ul>
1410</td>
1411</tr>
1412</tbody>
1413</table>
1414</dd></dl>
1415
1416</dd></dl>
1417
1418</div>
1419<div class="section" id="module-GribUtil">
1420<span id="gributil"></span><h3><a class="toc-backref" href="#id7">GribUtil</a><a class="headerlink" href="#module-GribUtil" title="Permalink to this headline"></a></h3>
1421<dl class="class">
1422<dt id="GribUtil.GribUtil">
1423<em class="property">class </em><code class="descclassname">GribUtil.</code><code class="descname">GribUtil</code><span class="sig-paren">(</span><em>filenames</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/GribUtil.html#GribUtil"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribUtil.GribUtil" title="Permalink to this definition"></a></dt>
1424<dd><p>Class for GRIB utilities (new methods) based on GRIB API</p>
1425<dl class="method">
1426<dt id="GribUtil.GribUtil.copy_dummy_msg">
1427<code class="descname">copy_dummy_msg</code><span class="sig-paren">(</span><em>filename_in</em>, <em>selectWhere=True</em>, <em>keynames=[]</em>, <em>keyvalues=[]</em>, <em>filemode='w'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/GribUtil.html#GribUtil.copy_dummy_msg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribUtil.GribUtil.copy_dummy_msg" title="Permalink to this definition"></a></dt>
1428<dd><p>Add the content of another input grib file to the objects file but
1429only messages corresponding to keys/values passed to the function.
1430The selectWhere switch decides if to copy the keys equal to (True) or
1431different to (False) the keynames/keyvalues list passed to the function.</p>
1432<table class="docutils field-list" frame="void" rules="none">
1433<col class="field-name" />
1434<col class="field-body" />
1435<tbody valign="top">
1436<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1437<li><strong>filename_in</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Filename of the input file to read the grib messages from.</li>
1438<li><strong>selectWhere</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">boolean</span></code>, optional) – Decides if to copy the keynames and values equal to (True) or
1439different to (False) the keynames/keyvalues list passed to the
1440function. Default is True.</li>
1441<li><strong>keynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – List of keynames. Default is an empty list.</li>
1442<li><strong>keyvalues</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – List of keyvalues. Default is an empty list.</li>
1443<li><strong>filemode</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Sets the mode for the output file. Default is “w”.</li>
1444</ul>
1445</td>
1446</tr>
1447</tbody>
1448</table>
1449</dd></dl>
1450
1451<dl class="method">
1452<dt id="GribUtil.GribUtil.get_keys">
1453<code class="descname">get_keys</code><span class="sig-paren">(</span><em>keynames</em>, <em>wherekeynames=[]</em>, <em>wherekeyvalues=[]</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/GribUtil.html#GribUtil.get_keys"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribUtil.GribUtil.get_keys" title="Permalink to this definition"></a></dt>
1454<dd><p>Get keyvalues for a given list of keynames a where statement
1455can be given (list of key and list of values)</p>
1456<table class="docutils field-list" frame="void" rules="none">
1457<col class="field-name" />
1458<col class="field-body" />
1459<tbody valign="top">
1460<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1461<li><strong>keynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – List of keynames.</li>
1462<li><strong>wherekeynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Default value is an empty list.</li>
1463<li><strong>wherekeyvalues</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Default value is an empty list.</li>
1464</ul>
1465</td>
1466</tr>
1467<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>return_list</strong> – List of keyvalues for given keynames.</p>
1468</td>
1469</tr>
1470<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code></p>
1471</td>
1472</tr>
1473</tbody>
1474</table>
1475</dd></dl>
1476
1477<dl class="method">
1478<dt id="GribUtil.GribUtil.index">
1479<code class="descname">index</code><span class="sig-paren">(</span><em>index_keys=['mars'], index_file='my.idx'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/GribUtil.html#GribUtil.index"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribUtil.GribUtil.index" title="Permalink to this definition"></a></dt>
1480<dd><p>Create index file from a list of files if it does not exist or
1481read an index file.</p>
1482<table class="docutils field-list" frame="void" rules="none">
1483<col class="field-name" />
1484<col class="field-body" />
1485<tbody valign="top">
1486<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1487<li><strong>index_keys</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Contains the list of key parameter names from
1488which the index is to be created.
1489Default is a list with a single entry string “mars”.</li>
1490<li><strong>index_file</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Filename where the indices are stored.
1491Default is “my.idx”.</li>
1492</ul>
1493</td>
1494</tr>
1495<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>iid</strong> – Grib index id.</p>
1496</td>
1497</tr>
1498<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">integer</span></code></p>
1499</td>
1500</tr>
1501</tbody>
1502</table>
1503</dd></dl>
1504
1505<dl class="method">
1506<dt id="GribUtil.GribUtil.set_keys">
1507<code class="descname">set_keys</code><span class="sig-paren">(</span><em>fromfile</em>, <em>keynames</em>, <em>keyvalues</em>, <em>wherekeynames=[]</em>, <em>wherekeyvalues=[]</em>, <em>strict=False</em>, <em>filemode='w'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/GribUtil.html#GribUtil.set_keys"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribUtil.GribUtil.set_keys" title="Permalink to this definition"></a></dt>
1508<dd><p>Opens the file to read the grib messages and then write
1509the selected messages (with wherekeys) to a new output file.
1510Also, the keyvalues of the passed list of keynames are set.</p>
1511<table class="docutils field-list" frame="void" rules="none">
1512<col class="field-name" />
1513<col class="field-body" />
1514<tbody valign="top">
1515<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1516<li><strong>fromfile</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Filename of the input file to read the grib messages from.</li>
1517<li><strong>keynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – List of keynames to set in the selected messages.
1518Default is an empty list.</li>
1519<li><strong>keyvalues</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – List of keyvalues to set in the selected messages.
1520Default is an empty list.</li>
1521<li><strong>wherekeynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – List of keynames to select correct message.
1522Default value is an empty list.</li>
1523<li><strong>wherekeyvalues</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – List of keyvalues for keynames to select correct message.
1524Default value is an empty list.</li>
1525<li><strong>strict</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">boolean</span></code>, optional) – Decides if everything from keynames and keyvalues
1526is written out the grib file (False) or only those
1527meeting the where statement (True). Default is False.</li>
1528<li><strong>filemode</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Sets the mode for the output file. Default is “w”.</li>
1529</ul>
1530</td>
1531</tr>
1532</tbody>
1533</table>
1534</dd></dl>
1535
1536</dd></dl>
1537
1538</div>
1539<div class="section" id="module-MarsRetrieval">
1540<span id="marsretrieval"></span><h3><a class="toc-backref" href="#id8">MarsRetrieval</a><a class="headerlink" href="#module-MarsRetrieval" title="Permalink to this headline"></a></h3>
1541<dl class="class">
1542<dt id="MarsRetrieval.MarsRetrieval">
1543<em class="property">class </em><code class="descclassname">MarsRetrieval.</code><code class="descname">MarsRetrieval</code><span class="sig-paren">(</span><em>server</em>, <em>public</em>, <em>marsclass='EA'</em>, <em>dataset=''</em>, <em>type=''</em>, <em>levtype=''</em>, <em>levelist=''</em>, <em>repres=''</em>, <em>date=''</em>, <em>resol=''</em>, <em>stream=''</em>, <em>area=''</em>, <em>time=''</em>, <em>step=''</em>, <em>expver='1'</em>, <em>number=''</em>, <em>accuracy=''</em>, <em>grid=''</em>, <em>gaussian=''</em>, <em>target=''</em>, <em>param=''</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/MarsRetrieval.html#MarsRetrieval"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval" title="Permalink to this definition"></a></dt>
1544<dd><p>Specific syntax and content for submission of MARS retrievals.</p>
1545<p>A MARS revtrieval has a specific syntax with a selection of keywords and
1546their corresponding values. This class provides the necessary functions
1547by displaying the selected parameters and their values and the actual
1548retrievement of the data through a mars request or a Python web api
1549interface. The initialization already expects all the keyword values.</p>
1550<p>A description of MARS keywords/arguments and examples of their
1551values can be found here:
1552<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>
1553<dl class="attribute">
1554<dt id="MarsRetrieval.MarsRetrieval.server">
1555<code class="descname">server</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.server" title="Permalink to this definition"></a></dt>
1556<dd><p><em>ECMWFService or ECMWFDataServer</em> – This is the connection to the ECMWF data servers.</p>
1557</dd></dl>
1558
1559<dl class="attribute">
1560<dt id="MarsRetrieval.MarsRetrieval.public">
1561<code class="descname">public</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.public" title="Permalink to this definition"></a></dt>
1562<dd><p><em>int</em> – Decides which Web API Server version is used.</p>
1563</dd></dl>
1564
1565<dl class="attribute">
1566<dt id="MarsRetrieval.MarsRetrieval.marsclass">
1567<code class="descname">marsclass</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.marsclass" title="Permalink to this definition"></a></dt>
1568<dd><p><em>str, optional</em> – Characterisation of dataset.</p>
1569</dd></dl>
1570
1571<dl class="attribute">
1572<dt id="MarsRetrieval.MarsRetrieval.dataset">
1573<code class="descname">dataset</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.dataset" title="Permalink to this definition"></a></dt>
1574<dd><p><em>str, optional</em> – For public datasets there is the specific naming and parameter
1575dataset which has to be used to characterize the type of
1576data.</p>
1577</dd></dl>
1578
1579<dl class="attribute">
1580<dt id="MarsRetrieval.MarsRetrieval.type">
1581<code class="descname">type</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.type" title="Permalink to this definition"></a></dt>
1582<dd><p><em>str, optional</em> – Determines the type of fields to be retrieved.</p>
1583</dd></dl>
1584
1585<dl class="attribute">
1586<dt id="MarsRetrieval.MarsRetrieval.levtype">
1587<code class="descname">levtype</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.levtype" title="Permalink to this definition"></a></dt>
1588<dd><p><em>str, optional</em> – Denotes type of level.</p>
1589</dd></dl>
1590
1591<dl class="attribute">
1592<dt id="MarsRetrieval.MarsRetrieval.levelist">
1593<code class="descname">levelist</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.levelist" title="Permalink to this definition"></a></dt>
1594<dd><p><em>str, optional</em> – Specifies the required levels.</p>
1595</dd></dl>
1596
1597<dl class="attribute">
1598<dt id="MarsRetrieval.MarsRetrieval.repres">
1599<code class="descname">repres</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.repres" title="Permalink to this definition"></a></dt>
1600<dd><p><em>str, optional</em> – Selects the representation of the archived data.</p>
1601</dd></dl>
1602
1603<dl class="attribute">
1604<dt id="MarsRetrieval.MarsRetrieval.date">
1605<code class="descname">date</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.date" title="Permalink to this definition"></a></dt>
1606<dd><p><em>str, optional</em> – Specifies the Analysis date, the Forecast base date or
1607Observations date.</p>
1608</dd></dl>
1609
1610<dl class="attribute">
1611<dt id="MarsRetrieval.MarsRetrieval.resol">
1612<code class="descname">resol</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.resol" title="Permalink to this definition"></a></dt>
1613<dd><p><em>str, optional</em> – Specifies the desired triangular truncation of retrieved data,
1614before carrying out any other selected post-processing.</p>
1615</dd></dl>
1616
1617<dl class="attribute">
1618<dt id="MarsRetrieval.MarsRetrieval.stream">
1619<code class="descname">stream</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.stream" title="Permalink to this definition"></a></dt>
1620<dd><p><em>str, optional</em> – Identifies the forecasting system used to generate the data.</p>
1621</dd></dl>
1622
1623<dl class="attribute">
1624<dt id="MarsRetrieval.MarsRetrieval.area">
1625<code class="descname">area</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.area" title="Permalink to this definition"></a></dt>
1626<dd><p><em>str, optional</em> – Specifies the desired sub-area of data to be extracted.</p>
1627</dd></dl>
1628
1629<dl class="attribute">
1630<dt id="MarsRetrieval.MarsRetrieval.time">
1631<code class="descname">time</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.time" title="Permalink to this definition"></a></dt>
1632<dd><p><em>str, optional</em> – Specifies the time of the data in hours and minutes.</p>
1633</dd></dl>
1634
1635<dl class="attribute">
1636<dt id="MarsRetrieval.MarsRetrieval.step">
1637<code class="descname">step</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.step" title="Permalink to this definition"></a></dt>
1638<dd><p><em>str, optional</em> – Specifies the forecast time step from forecast base time.</p>
1639</dd></dl>
1640
1641<dl class="attribute">
1642<dt id="MarsRetrieval.MarsRetrieval.expver">
1643<code class="descname">expver</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.expver" title="Permalink to this definition"></a></dt>
1644<dd><p><em>str, optional</em> – The version of the dataset.</p>
1645</dd></dl>
1646
1647<dl class="attribute">
1648<dt id="MarsRetrieval.MarsRetrieval.number">
1649<code class="descname">number</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.number" title="Permalink to this definition"></a></dt>
1650<dd><p><em>str, optional</em> – Selects the member in ensemble forecast run.</p>
1651</dd></dl>
1652
1653<dl class="attribute">
1654<dt id="MarsRetrieval.MarsRetrieval.accuracy">
1655<code class="descname">accuracy</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.accuracy" title="Permalink to this definition"></a></dt>
1656<dd><p><em>str, optional</em> – Specifies the number of bits per value to be used in the
1657generated GRIB coded fields.</p>
1658</dd></dl>
1659
1660<dl class="attribute">
1661<dt id="MarsRetrieval.MarsRetrieval.grid">
1662<code class="descname">grid</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.grid" title="Permalink to this definition"></a></dt>
1663<dd><p><em>str, optional</em> – Specifies the output grid which can be either a Gaussian grid
1664or a Latitude/Longitude grid.</p>
1665</dd></dl>
1666
1667<dl class="attribute">
1668<dt id="MarsRetrieval.MarsRetrieval.gaussian">
1669<code class="descname">gaussian</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.gaussian" title="Permalink to this definition"></a></dt>
1670<dd><p><em>str, optional</em> – This parameter is deprecated and should no longer be used.
1671Specifies the desired type of Gaussian grid for the output.</p>
1672</dd></dl>
1673
1674<dl class="attribute">
1675<dt id="MarsRetrieval.MarsRetrieval.target">
1676<code class="descname">target</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.target" title="Permalink to this definition"></a></dt>
1677<dd><p><em>str, optional</em> – Specifies a file into which data is to be written after
1678retrieval or manipulation.</p>
1679</dd></dl>
1680
1681<dl class="attribute">
1682<dt id="MarsRetrieval.MarsRetrieval.param">
1683<code class="descname">param</code><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.param" title="Permalink to this definition"></a></dt>
1684<dd><p><em>str, optional</em> – Specifies the meteorological parameter.</p>
1685</dd></dl>
1686
1687<dl class="method">
1688<dt id="MarsRetrieval.MarsRetrieval.data_retrieve">
1689<code class="descname">data_retrieve</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/MarsRetrieval.html#MarsRetrieval.data_retrieve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.data_retrieve" title="Permalink to this definition"></a></dt>
1690<dd><p>Submits a MARS retrieval. Depending on the existence of
1691ECMWF Web-API or CDS API it is submitted via Python or a
1692subprocess in the Shell. The parameter for the mars retrieval
1693are taken from the defined class attributes.</p>
1694</dd></dl>
1695
1696<dl class="method">
1697<dt id="MarsRetrieval.MarsRetrieval.display_info">
1698<code class="descname">display_info</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/MarsRetrieval.html#MarsRetrieval.display_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.display_info" title="Permalink to this definition"></a></dt>
1699<dd><p>Prints all class attributes and their values to the
1700standard output.</p>
1701</dd></dl>
1702
1703<dl class="method">
1704<dt id="MarsRetrieval.MarsRetrieval.print_infodata_csv">
1705<code class="descname">print_infodata_csv</code><span class="sig-paren">(</span><em>inputdir</em>, <em>request_number</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/MarsRetrieval.html#MarsRetrieval.print_infodata_csv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.print_infodata_csv" title="Permalink to this definition"></a></dt>
1706<dd><p>Write all request parameter in alpabetical order into a “csv” file.</p>
1707<table class="docutils field-list" frame="void" rules="none">
1708<col class="field-name" />
1709<col class="field-body" />
1710<tbody valign="top">
1711<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1712<li><strong>inputdir</strong> (<em>str</em>) – The path where all data from the retrievals are stored.</li>
1713<li><strong>request_number</strong> (<em>int</em>) – Number of mars requests for flux and non-flux data.</li>
1714</ul>
1715</td>
1716</tr>
1717</tbody>
1718</table>
1719</dd></dl>
1720
1721</dd></dl>
1722
1723</div>
1724<div class="section" id="module-UioFiles">
1725<span id="uiofiles"></span><h3><a class="toc-backref" href="#id9">UioFiles</a><a class="headerlink" href="#module-UioFiles" title="Permalink to this headline"></a></h3>
1726<dl class="class">
1727<dt id="UioFiles.UioFiles">
1728<em class="property">class </em><code class="descclassname">UioFiles.</code><code class="descname">UioFiles</code><span class="sig-paren">(</span><em>path</em>, <em>pattern</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/UioFiles.html#UioFiles"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#UioFiles.UioFiles" title="Permalink to this definition"></a></dt>
1729<dd><p>Collection of files matching a specific pattern.</p>
1730<p>The pattern can contain regular expressions for the files.
1731The files are listed and can be transformed to a single string or
1732they can be deleted.</p>
1733<dl class="attribute">
1734<dt id="UioFiles.UioFiles.path">
1735<code class="descname">path</code><a class="headerlink" href="#UioFiles.UioFiles.path" title="Permalink to this definition"></a></dt>
1736<dd><p><em>str</em> – Directory where to list the files.</p>
1737</dd></dl>
1738
1739<dl class="attribute">
1740<dt id="UioFiles.UioFiles.pattern">
1741<code class="descname">pattern</code><a class="headerlink" href="#UioFiles.UioFiles.pattern" title="Permalink to this definition"></a></dt>
1742<dd><p><em>str</em> – Regular expression pattern. For example: ‘*.grb’</p>
1743</dd></dl>
1744
1745<dl class="attribute">
1746<dt id="UioFiles.UioFiles.files">
1747<code class="descname">files</code><a class="headerlink" href="#UioFiles.UioFiles.files" title="Permalink to this definition"></a></dt>
1748<dd><p><em>list of str</em> – List of files matching the pattern in the path.</p>
1749</dd></dl>
1750
1751<dl class="method">
1752<dt id="UioFiles.UioFiles.delete_files">
1753<code class="descname">delete_files</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/UioFiles.html#UioFiles.delete_files"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#UioFiles.UioFiles.delete_files" title="Permalink to this definition"></a></dt>
1754<dd><p>Deletes the files.</p>
1755</dd></dl>
1756
1757</dd></dl>
1758
1759</div>
1760</div>
1761<div class="section" id="modules">
1762<h2><a class="toc-backref" href="#id10">Modules</a><a class="headerlink" href="#modules" title="Permalink to this headline"></a></h2>
1763<div class="section" id="module-get_mars_data">
1764<span id="get-mars-data"></span><h3><a class="toc-backref" href="#id11">get_mars_data</a><a class="headerlink" href="#module-get_mars_data" title="Permalink to this headline"></a></h3>
1765<p>This script extracts MARS data from ECMWF servers.</p>
1766<p>At first, the necessary parameters from command line and CONTROL files are
1767extracted. They define the data set to be extracted from MARS.</p>
1768<p>This file can also be imported as a module and contains the following
1769functions:</p>
1770<blockquote>
1771<div><ul class="simple">
1772<li>main - the main function of the script</li>
1773<li>get_mars_data - overall control of ECMWF data retrievment</li>
1774<li>write_reqheader - writes the header into the mars_request file</li>
1775<li>mk_server - creates the server connection to ECMWF servers</li>
1776<li>mk_dates - defines the start and end date</li>
1777<li>remove_old - deletes old retrieved grib files</li>
1778<li>do_retrievement - creates individual retrievals</li>
1779</ul>
1780</div></blockquote>
1781<p>Type: get_mars_data.py –help
1782to get information about command line parameters.
1783Read the documentation for usage instructions.</p>
1784<dl class="function">
1785<dt id="get_mars_data.check_dates_for_nonflux_fc_times">
1786<code class="descclassname">get_mars_data.</code><code class="descname">check_dates_for_nonflux_fc_times</code><span class="sig-paren">(</span><em>types</em>, <em>times</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/get_mars_data.html#check_dates_for_nonflux_fc_times"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.check_dates_for_nonflux_fc_times" title="Permalink to this definition"></a></dt>
1787<dd></dd></dl>
1788
1789<dl class="function">
1790<dt id="get_mars_data.do_retrievement">
1791<code class="descclassname">get_mars_data.</code><code class="descname">do_retrievement</code><span class="sig-paren">(</span><em>c</em>, <em>server</em>, <em>start</em>, <em>end</em>, <em>delta_t</em>, <em>fluxes=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/get_mars_data.html#do_retrievement"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.do_retrievement" title="Permalink to this definition"></a></dt>
1792<dd><p>Divides the complete retrieval period in smaller chunks and
1793retrieves the data from MARS.</p>
1794<table class="docutils field-list" frame="void" rules="none">
1795<col class="field-name" />
1796<col class="field-body" />
1797<tbody valign="top">
1798<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1799<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
1800command line.</li>
1801<li><strong>server</strong> (<em>ECMWFService</em><em> or </em><em>ECMWFDataServer</em>) – The server connection to ECMWF.</li>
1802<li><strong>start</strong> (<em>datetime</em>) – The start date of the retrieval.</li>
1803<li><strong>end</strong> (<em>datetime</em>) – The end date of the retrieval.</li>
1804<li><strong>delta_t</strong> (<em>datetime</em>) – Delta_t + 1 is the maximal time period of a single
1805retrieval.</li>
1806<li><strong>fluxes</strong> (<em>boolean</em><em>, </em><em>optional</em>) – Decides if the flux parameters are to be retrieved or
1807the rest of the parameter list.
1808Default value is False.</li>
1809</ul>
1810</td>
1811</tr>
1812</tbody>
1813</table>
1814</dd></dl>
1815
1816<dl class="function">
1817<dt id="get_mars_data.get_mars_data">
1818<code class="descclassname">get_mars_data.</code><code class="descname">get_mars_data</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/get_mars_data.html#get_mars_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.get_mars_data" title="Permalink to this definition"></a></dt>
1819<dd><p>Retrieves the EC data needed for a FLEXPART simulation.</p>
1820<p>Start and end dates for retrieval period is set. Retrievals
1821are divided into smaller periods if necessary and datechunk parameter
1822is set.</p>
1823<table class="docutils field-list" frame="void" rules="none">
1824<col class="field-name" />
1825<col class="field-body" />
1826<tbody valign="top">
1827<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
1828command line.</td>
1829</tr>
1830</tbody>
1831</table>
1832</dd></dl>
1833
1834<dl class="function">
1835<dt id="get_mars_data.main">
1836<code class="descclassname">get_mars_data.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/get_mars_data.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.main" title="Permalink to this definition"></a></dt>
1837<dd><p>Controls the program to get data out of mars.</p>
1838<p>This is done if it is called directly from command line.
1839Then it also takes program call arguments and control file input.</p>
1840</dd></dl>
1841
1842<dl class="function">
1843<dt id="get_mars_data.mk_dates">
1844<code class="descclassname">get_mars_data.</code><code class="descname">mk_dates</code><span class="sig-paren">(</span><em>c</em>, <em>fluxes</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/get_mars_data.html#mk_dates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.mk_dates" title="Permalink to this definition"></a></dt>
1845<dd><p>Prepares start and end date depending on flux or non flux data.</p>
1846<p>If forecast for maximum one day (upto 24h) are to be retrieved, then
1847collect accumulation data (flux data) with additional days in the
1848beginning and at the end (used for complete disaggregation of
1849original period)</p>
1850<p>If forecast data longer than 24h are to be retrieved, then
1851collect accumulation data (flux data) with the exact start and end date
1852(disaggregation will be done for the exact time period with
1853boundary conditions)</p>
1854<p>Since for basetime the extraction contains the 12 hours upfront,
1855if basetime is 0, the starting date has to be the day before and</p>
1856<table class="docutils field-list" frame="void" rules="none">
1857<col class="field-name" />
1858<col class="field-body" />
1859<tbody valign="top">
1860<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1861<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
1862command line.</li>
1863<li><strong>fluxes</strong> (<em>boolean</em><em>, </em><em>optional</em>) – Decides if the flux parameter settings are stored or
1864the rest of the parameter list.
1865Default value is False.</li>
1866</ul>
1867</td>
1868</tr>
1869<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
1870<li><strong>start</strong> (<em>datetime</em>) – The start date of the retrieving data set.</li>
1871<li><strong>end</strong> (<em>datetime</em>) – The end date of the retrieving data set.</li>
1872<li><strong>chunk</strong> (<em>datetime</em>) – Time period in days for one single mars retrieval.</li>
1873</ul>
1874</p>
1875</td>
1876</tr>
1877</tbody>
1878</table>
1879</dd></dl>
1880
1881<dl class="function">
1882<dt id="get_mars_data.mk_server">
1883<code class="descclassname">get_mars_data.</code><code class="descname">mk_server</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/get_mars_data.html#mk_server"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.mk_server" title="Permalink to this definition"></a></dt>
1884<dd><p>Creates a server connection with available python API.</p>
1885<p>Which API is used depends on availability and the dataset to be retrieved.
1886The CDS API is used for ERA5 dataset no matter if the user is a member or
1887a public user. ECMWF WebAPI is used for all other available datasets.</p>
1888<table class="docutils field-list" frame="void" rules="none">
1889<col class="field-name" />
1890<col class="field-body" />
1891<tbody valign="top">
1892<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
1893command line.</td>
1894</tr>
1895<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>server</strong> – Connection to ECMWF server via python interface ECMWF WebAPI or CDS API.</td>
1896</tr>
1897<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">ECMWFDataServer, ECMWFService or Client</td>
1898</tr>
1899</tbody>
1900</table>
1901</dd></dl>
1902
1903<dl class="function">
1904<dt id="get_mars_data.remove_old">
1905<code class="descclassname">get_mars_data.</code><code class="descname">remove_old</code><span class="sig-paren">(</span><em>pattern</em>, <em>inputdir</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/get_mars_data.html#remove_old"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.remove_old" title="Permalink to this definition"></a></dt>
1906<dd><p>Deletes old retrieval files from current input directory
1907matching the pattern.</p>
1908<table class="docutils field-list" frame="void" rules="none">
1909<col class="field-name" />
1910<col class="field-body" />
1911<tbody valign="top">
1912<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1913<li><strong>pattern</strong> (<em>str</em>) – The sub string pattern which identifies the files to be deleted.</li>
1914<li><strong>inputdir</strong> (<em>str</em><em>, </em><em>optional</em>) – Path to the directory where the retrieved data is stored.</li>
1915</ul>
1916</td>
1917</tr>
1918</tbody>
1919</table>
1920</dd></dl>
1921
1922<dl class="function">
1923<dt id="get_mars_data.write_reqheader">
1924<code class="descclassname">get_mars_data.</code><code class="descname">write_reqheader</code><span class="sig-paren">(</span><em>marsfile</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/get_mars_data.html#write_reqheader"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.write_reqheader" title="Permalink to this definition"></a></dt>
1925<dd><p>Writes header with column names into mars request file.</p>
1926<table class="docutils field-list" frame="void" rules="none">
1927<col class="field-name" />
1928<col class="field-body" />
1929<tbody valign="top">
1930<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>marsfile</strong> (<em>str</em>) – Path to the mars request file.</td>
1931</tr>
1932</tbody>
1933</table>
1934</dd></dl>
1935
1936</div>
1937<div class="section" id="module-prepare_flexpart">
1938<span id="prepare-flexpart"></span><h3><a class="toc-backref" href="#id12">prepare_flexpart</a><a class="headerlink" href="#module-prepare_flexpart" title="Permalink to this headline"></a></h3>
1939<p>This script prepares the final version of the grib files which are
1940then used by FLEXPART.</p>
1941<p>It converts the bunch of grib files extracted via get_mars_data before,
1942by doing the necessary conversion to get consistent grids or the
1943disaggregation of flux data. Finally, the data fields are combined
1944in files per available hour with the naming convention xxYYMMDDHH,
1945where xx should be 2 arbitrary letters (mostly xx is chosen to be “EN”).</p>
1946<p>This file can also be imported as a module which then contains the following
1947functions:</p>
1948<blockquote>
1949<div><ul class="simple">
1950<li>main</li>
1951<li>prepare_flexpart</li>
1952</ul>
1953</div></blockquote>
1954<p>Type: prepare_flexpart.py –help
1955to get information about command line parameters.
1956Read the documentation for usage instructions.</p>
1957<dl class="function">
1958<dt id="prepare_flexpart.main">
1959<code class="descclassname">prepare_flexpart.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/prepare_flexpart.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#prepare_flexpart.main" title="Permalink to this definition"></a></dt>
1960<dd><p>Controls the program to prepare flexpart input files from mars data.</p>
1961<p>This is done if it is called directly from command line.
1962Then it also takes program call arguments and control file input.</p>
1963</dd></dl>
1964
1965<dl class="function">
1966<dt id="prepare_flexpart.prepare_flexpart">
1967<code class="descclassname">prepare_flexpart.</code><code class="descname">prepare_flexpart</code><span class="sig-paren">(</span><em>ppid</em>, <em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/prepare_flexpart.html#prepare_flexpart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#prepare_flexpart.prepare_flexpart" title="Permalink to this definition"></a></dt>
1968<dd><p>Converts the mars data into flexpart ready input files.</p>
1969<p>Specific data fields are converted to a different grid and the flux
1970data are going to be disaggregated. The data fields are collected by
1971hour and stored in a file with a specific FLEXPART relevant naming
1972convention.</p>
1973<table class="docutils field-list" frame="void" rules="none">
1974<col class="field-name" />
1975<col class="field-body" />
1976<tbody valign="top">
1977<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1978<li><strong>ppid</strong> (<em>int</em>) – Contains the ppid number of the current ECMWF job. It will be None if
1979the method was called within this module.</li>
1980<li><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
1981command line.</li>
1982</ul>
1983</td>
1984</tr>
1985</tbody>
1986</table>
1987</dd></dl>
1988
1989</div>
1990<div class="section" id="module-tools">
1991<span id="tools"></span><h3><a class="toc-backref" href="#id13">tools</a><a class="headerlink" href="#module-tools" title="Permalink to this headline"></a></h3>
1992<p>This module contains a collection of diverse tasks within flex_extract.</p>
1993<dl class="function">
1994<dt id="tools.clean_up">
1995<code class="descclassname">tools.</code><code class="descname">clean_up</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#clean_up"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.clean_up" title="Permalink to this definition"></a></dt>
1996<dd><p>Remove files from the intermediate directory (inputdir).</p>
1997<p>It keeps the final FLEXPART input files if program runs without
1998ECMWF Api and keywords “ectrans” or “ecstorage” are set to “1”.</p>
1999<table class="docutils field-list" frame="void" rules="none">
2000<col class="field-name" />
2001<col class="field-body" />
2002<tbody valign="top">
2003<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#ControlFile.ControlFile" title="ControlFile.ControlFile"><em>ControlFile</em></a>) – Contains all the parameters of CONTROL file and
2004command line.</td>
2005</tr>
2006</tbody>
2007</table>
2008</dd></dl>
2009
2010<dl class="function">
2011<dt id="tools.execute_subprocess">
2012<code class="descclassname">tools.</code><code class="descname">execute_subprocess</code><span class="sig-paren">(</span><em>cmd_list</em>, <em>error_msg='SUBPROCESS FAILED!'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#execute_subprocess"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.execute_subprocess" title="Permalink to this definition"></a></dt>
2013<dd><p>Executes a command line instruction via a subprocess.</p>
2014<p>Error handling is done if an error occures.</p>
2015<table class="docutils field-list" frame="void" rules="none">
2016<col class="field-name" />
2017<col class="field-body" />
2018<tbody valign="top">
2019<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>cmd_list</strong> (<em>list of str</em>) – A list of the components for the command line execution. Each
2020list entry is a single part of the command which is seperated from
2021the rest by a blank space.
2022E.g. [‘mv’, file1, file2]</td>
2023</tr>
2024<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>error_msg</strong> – The possible error message if the subprocess failed.
2025By default it will just tell “SUBPROCESS FAILED!”.</td>
2026</tr>
2027<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str, optional</td>
2028</tr>
2029</tbody>
2030</table>
2031</dd></dl>
2032
2033<dl class="function">
2034<dt id="tools.get_cmdline_args">
2035<code class="descclassname">tools.</code><code class="descname">get_cmdline_args</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#get_cmdline_args"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.get_cmdline_args" title="Permalink to this definition"></a></dt>
2036<dd><p>Decomposes the command line arguments and assigns them to variables.
2037Apply default values for non mentioned arguments.</p>
2038<table class="docutils field-list" frame="void" rules="none">
2039<col class="field-name" />
2040<col class="field-body" />
2041<tbody valign="top">
2042<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>args</strong> – Contains the commandline arguments from script/program call.</td>
2043</tr>
2044<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">Namespace</td>
2045</tr>
2046</tbody>
2047</table>
2048</dd></dl>
2049
2050<dl class="function">
2051<dt id="tools.get_dimensions">
2052<code class="descclassname">tools.</code><code class="descname">get_dimensions</code><span class="sig-paren">(</span><em>info</em>, <em>purefc</em>, <em>dtime</em>, <em>index_vals</em>, <em>start_date</em>, <em>end_date</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#get_dimensions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.get_dimensions" title="Permalink to this definition"></a></dt>
2053<dd><p>This function specifies the correct dimensions for x, y and t.</p>
2054<table class="docutils field-list" frame="void" rules="none">
2055<col class="field-name" />
2056<col class="field-body" />
2057<tbody valign="top">
2058<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2059<li><strong>info</strong> (<em>dict</em>) – Contains basic informations of the ECMWF grib files, e.g.
2060‘Ni’, ‘Nj’, ‘latitudeOfFirstGridPointInDegrees’,
2061‘longitudeOfFirstGridPointInDegrees’, ‘latitudeOfLastGridPointInDegrees’,
2062‘longitudeOfLastGridPointInDegrees’, ‘jDirectionIncrementInDegrees’,
2063‘iDirectionIncrementInDegrees’, ‘missingValue’</li>
2064<li><strong>purefc</strong> (<em>int</em>) – Switch for definition of pure forecast mode or not.</li>
2065<li><strong>dtime</strong> (<em>str</em>) – Time step in hours.</li>
2066<li><strong>index_vals</strong> (<em>list of list of str</em>) – Contains the values from the keys used for a distinct selection
2067of grib messages in processing  the grib files.
2068Content looks like e.g.:
2069index_vals[0]: (‘20171106’, ‘20171107’, ‘20171108’) ; date
2070index_vals[1]: (‘0’, ‘1200’, ‘1800’, ‘600’) ; time
2071index_vals[2]: (‘0’, ‘12’, ‘3’, ‘6’, ‘9’) ; stepRange</li>
2072<li><strong>start_date</strong> (<em>str</em>) – The start date of the retrieval job.</li>
2073<li><strong>end_date</strong> (<em>str</em>) – The end date of the retrieval job.</li>
2074</ul>
2075</td>
2076</tr>
2077<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>(ix, jy, it)</strong> – Dimension in x-direction, y-direction and in time.</p>
2078</td>
2079</tr>
2080<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">tuple of int</p>
2081</td>
2082</tr>
2083</tbody>
2084</table>
2085</dd></dl>
2086
2087<dl class="function">
2088<dt id="tools.get_informations">
2089<code class="descclassname">tools.</code><code class="descname">get_informations</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#get_informations"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.get_informations" title="Permalink to this definition"></a></dt>
2090<dd><p>Gets basic information from an example grib file.</p>
2091<p>These information are important for later use and the
2092initialization of numpy arrays for data storing.</p>
2093<table class="docutils field-list" frame="void" rules="none">
2094<col class="field-name" />
2095<col class="field-body" />
2096<tbody valign="top">
2097<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<em>str</em>) – Name of the file which will be opened to extract basic information.</td>
2098</tr>
2099<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>data</strong> – Contains basic informations of the ECMWF grib files, e.g.
2100‘Ni’, ‘Nj’, ‘latitudeOfFirstGridPointInDegrees’,
2101‘longitudeOfFirstGridPointInDegrees’, ‘latitudeOfLastGridPointInDegrees’,
2102‘longitudeOfLastGridPointInDegrees’, ‘jDirectionIncrementInDegrees’,
2103‘iDirectionIncrementInDegrees’, ‘missingValue’</td>
2104</tr>
2105<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
2106</tr>
2107</tbody>
2108</table>
2109</dd></dl>
2110
2111<dl class="function">
2112<dt id="tools.get_list_as_string">
2113<code class="descclassname">tools.</code><code class="descname">get_list_as_string</code><span class="sig-paren">(</span><em>list_obj</em>, <em>concatenate_sign='</em>, <em>'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#get_list_as_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.get_list_as_string" title="Permalink to this definition"></a></dt>
2114<dd><p>Converts a list of arbitrary content into a single string.</p>
2115<table class="docutils field-list" frame="void" rules="none">
2116<col class="field-name" />
2117<col class="field-body" />
2118<tbody valign="top">
2119<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2120<li><strong>list_obj</strong> (<em>list of *</em>) – A list with arbitrary content.</li>
2121<li><strong>concatenate_sign</strong> (<em>str</em><em>, </em><em>optional</em>) – A string which is used to concatenate the single
2122list elements. Default value is “, “.</li>
2123</ul>
2124</td>
2125</tr>
2126<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>str_of_list</strong> – The content of the list as a single string.</p>
2127</td>
2128</tr>
2129<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
2130</td>
2131</tr>
2132</tbody>
2133</table>
2134</dd></dl>
2135
2136<dl class="function">
2137<dt id="tools.init128">
2138<code class="descclassname">tools.</code><code class="descname">init128</code><span class="sig-paren">(</span><em>filepath</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#init128"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.init128" title="Permalink to this definition"></a></dt>
2139<dd><p>Opens and reads the grib file with table 128 information.</p>
2140<table class="docutils field-list" frame="void" rules="none">
2141<col class="field-name" />
2142<col class="field-body" />
2143<tbody valign="top">
2144<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filepath</strong> (<em>str</em>) – Path to file of ECMWF grib table number 128.</td>
2145</tr>
2146<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>table128</strong> – Contains the ECMWF grib table 128 information.
2147The key is the parameter number and the value is the
2148short name of the parameter.</td>
2149</tr>
2150<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
2151</tr>
2152</tbody>
2153</table>
2154</dd></dl>
2155
2156<dl class="function">
2157<dt id="tools.make_dir">
2158<code class="descclassname">tools.</code><code class="descname">make_dir</code><span class="sig-paren">(</span><em>directory</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#make_dir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.make_dir" title="Permalink to this definition"></a></dt>
2159<dd><p>Creates a directory.</p>
2160<p>It gives a warning if the directory already exists and skips process.
2161The program stops only if there is another problem.</p>
2162<table class="docutils field-list" frame="void" rules="none">
2163<col class="field-name" />
2164<col class="field-body" />
2165<tbody valign="top">
2166<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>directory</strong> (<em>str</em>) – The path to directory which should be created.</td>
2167</tr>
2168</tbody>
2169</table>
2170</dd></dl>
2171
2172<dl class="function">
2173<dt id="tools.my_error">
2174<code class="descclassname">tools.</code><code class="descname">my_error</code><span class="sig-paren">(</span><em>message='ERROR'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#my_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.my_error" title="Permalink to this definition"></a></dt>
2175<dd><p>Prints a specified error message which can be passed to the function
2176before exiting the program.</p>
2177<table class="docutils field-list" frame="void" rules="none">
2178<col class="field-name" />
2179<col class="field-body" />
2180<tbody valign="top">
2181<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>message</strong> (<em>str</em><em>, </em><em>optional</em>) – Error message. Default value is “ERROR”.</td>
2182</tr>
2183</tbody>
2184</table>
2185</dd></dl>
2186
2187<dl class="function">
2188<dt id="tools.none_or_int">
2189<code class="descclassname">tools.</code><code class="descname">none_or_int</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#none_or_int"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.none_or_int" title="Permalink to this definition"></a></dt>
2190<dd><p>Converts the input string into pythons None-type if the string
2191contains string “None”. Otherwise it is converted to an integer value.</p>
2192<table class="docutils field-list" frame="void" rules="none">
2193<col class="field-name" />
2194<col class="field-body" />
2195<tbody valign="top">
2196<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> (<em>str</em>) – String to be checked for the “None” word.</td>
2197</tr>
2198<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Return depends on the content of the input value. If it was “None”,
2199then the python type None is returned. Otherwise the string is
2200converted into an integer value.</td>
2201</tr>
2202<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None or int(value)</td>
2203</tr>
2204</tbody>
2205</table>
2206</dd></dl>
2207
2208<dl class="function">
2209<dt id="tools.none_or_str">
2210<code class="descclassname">tools.</code><code class="descname">none_or_str</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#none_or_str"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.none_or_str" title="Permalink to this definition"></a></dt>
2211<dd><p>Converts the input string into pythons None-type if the string
2212contains string “None”.</p>
2213<table class="docutils field-list" frame="void" rules="none">
2214<col class="field-name" />
2215<col class="field-body" />
2216<tbody valign="top">
2217<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> (<em>str</em>) – String to be checked for the “None” word.</td>
2218</tr>
2219<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Return depends on the content of the input value. If it was “None”,
2220then the python type None is returned. Otherwise the string itself.</td>
2221</tr>
2222<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None or value</td>
2223</tr>
2224</tbody>
2225</table>
2226</dd></dl>
2227
2228<dl class="function">
2229<dt id="tools.normal_exit">
2230<code class="descclassname">tools.</code><code class="descname">normal_exit</code><span class="sig-paren">(</span><em>message='Done!'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#normal_exit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.normal_exit" title="Permalink to this definition"></a></dt>
2231<dd><p>Prints a specific exit message which can be passed to the function.</p>
2232<table class="docutils field-list" frame="void" rules="none">
2233<col class="field-name" />
2234<col class="field-body" />
2235<tbody valign="top">
2236<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>message</strong> (<em>str</em><em>, </em><em>optional</em>) – Message for exiting program. Default value is “Done!”.</td>
2237</tr>
2238</tbody>
2239</table>
2240</dd></dl>
2241
2242<dl class="function">
2243<dt id="tools.product">
2244<code class="descclassname">tools.</code><code class="descname">product</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwds</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#product"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.product" title="Permalink to this definition"></a></dt>
2245<dd><p>Creates combinations of all passed arguments.</p>
2246<p>This method combines the single characters of the passed arguments
2247with each other. So that each character of each argument value
2248will be combined with each character of the other arguments as a tuple.</p>
2249<div class="admonition note">
2250<p class="first admonition-title">Note</p>
2251<p class="last">This method is taken from an example at the ECMWF wiki website.
2252<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>
2253</div>
2254<p class="rubric">Example</p>
2255<p>product(‘ABCD’, ‘xy’) –&gt; Ax Ay Bx By Cx Cy Dx Dy</p>
2256<p>product(range(2), repeat = 3) –&gt; 000 001 010 011 100 101 110 111</p>
2257<table class="docutils field-list" frame="void" rules="none">
2258<col class="field-name" />
2259<col class="field-body" />
2260<tbody valign="top">
2261<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2262<li><strong>*args</strong> (<em>list</em><em> or </em><em>str</em>) – Positional arguments (arbitrary number).</li>
2263<li><strong>**kwds</strong> (<em>dict</em>) – Contains all the keyword arguments from *args.</li>
2264</ul>
2265</td>
2266</tr>
2267<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>prod</strong> – Return will be done with “yield”. A tuple of combined arguments.
2268See example in description above.</p>
2269</td>
2270</tr>
2271<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tuple</span></code></p>
2272</td>
2273</tr>
2274</tbody>
2275</table>
2276</dd></dl>
2277
2278<dl class="function">
2279<dt id="tools.put_file_to_ecserver">
2280<code class="descclassname">tools.</code><code class="descname">put_file_to_ecserver</code><span class="sig-paren">(</span><em>ecd</em>, <em>filename</em>, <em>target</em>, <em>ecuid</em>, <em>ecgid</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#put_file_to_ecserver"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.put_file_to_ecserver" title="Permalink to this definition"></a></dt>
2281<dd><p>Uses the ecaccess-file-put command to send a file to the ECMWF servers.</p>
2282<div class="admonition note">
2283<p class="first admonition-title">Note</p>
2284<p class="last">The return value is just for testing reasons. It does not have
2285to be used from the calling function since the whole error handling
2286is done in here.</p>
2287</div>
2288<table class="docutils field-list" frame="void" rules="none">
2289<col class="field-name" />
2290<col class="field-body" />
2291<tbody valign="top">
2292<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2293<li><strong>ecd</strong> (<em>str</em>) – The path were the file is stored.</li>
2294<li><strong>filename</strong> (<em>str</em>) – The name of the file to send to the ECMWF server.</li>
2295<li><strong>target</strong> (<em>str</em>) – The target queue where the file should be sent to.</li>
2296<li><strong>ecuid</strong> (<em>str</em>) – The user id on ECMWF server.</li>
2297<li><strong>ecgid</strong> (<em>str</em>) – The group id on ECMWF server.</li>
2298</ul>
2299</td>
2300</tr>
2301</tbody>
2302</table>
2303</dd></dl>
2304
2305<dl class="function">
2306<dt id="tools.read_ecenv">
2307<code class="descclassname">tools.</code><code class="descname">read_ecenv</code><span class="sig-paren">(</span><em>filepath</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#read_ecenv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.read_ecenv" title="Permalink to this definition"></a></dt>
2308<dd><p>Reads the file into a dictionary where the key values are the parameter
2309names.</p>
2310<table class="docutils field-list" frame="void" rules="none">
2311<col class="field-name" />
2312<col class="field-body" />
2313<tbody valign="top">
2314<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filepath</strong> (<em>str</em>) – Path to file where the ECMWF environment parameters are stored.</td>
2315</tr>
2316<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>envs</strong> – Contains the environment parameter ecuid, ecgid, gateway
2317and destination for ECMWF server environments.</td>
2318</tr>
2319<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
2320</tr>
2321</tbody>
2322</table>
2323</dd></dl>
2324
2325<dl class="function">
2326<dt id="tools.send_mail">
2327<code class="descclassname">tools.</code><code class="descname">send_mail</code><span class="sig-paren">(</span><em>users</em>, <em>success_mode</em>, <em>message</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#send_mail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.send_mail" title="Permalink to this definition"></a></dt>
2328<dd><p>Prints a specific exit message which can be passed to the function.</p>
2329<table class="docutils field-list" frame="void" rules="none">
2330<col class="field-name" />
2331<col class="field-body" />
2332<tbody valign="top">
2333<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2334<li><strong>users</strong> (<em>list of str</em>) – Contains all email addresses which should be notified.
2335It might also contain just the ecmwf user name which wil trigger
2336mailing to the associated email address for this user.</li>
2337<li><strong>success_mode</strong> (<em>str</em>) – States the exit mode of the program to put into
2338the mail subject line.</li>
2339<li><strong>message</strong> (<em>str</em><em>, </em><em>optional</em>) – Message for exiting program. Default value is “Done!”.</li>
2340</ul>
2341</td>
2342</tr>
2343</tbody>
2344</table>
2345</dd></dl>
2346
2347<dl class="function">
2348<dt id="tools.setup_controldata">
2349<code class="descclassname">tools.</code><code class="descname">setup_controldata</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#setup_controldata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.setup_controldata" title="Permalink to this definition"></a></dt>
2350<dd><p>Collects, stores and checks controlling arguments from command line,
2351CONTROL file and ECMWF_ENV file.</p>
2352<table class="docutils field-list" frame="void" rules="none">
2353<col class="field-name" />
2354<col class="field-body" />
2355<tbody valign="top">
2356<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><ul class="simple">
2357<li><strong>c</strong> (<em>ControlFile</em>) – Contains all the parameters of CONTROL file and
2358command line.</li>
2359<li><strong>ppid</strong> (<em>str</em>) – Parent process id.</li>
2360<li><strong>queue</strong> (<em>str</em>) – Name of queue for submission to ECMWF (e.g. ecgate or cca )</li>
2361<li><strong>job_template</strong> (<em>str</em>) – Name of the job template file for submission to ECMWF server.</li>
2362</ul>
2363</td>
2364</tr>
2365</tbody>
2366</table>
2367</dd></dl>
2368
2369<dl class="function">
2370<dt id="tools.silent_remove">
2371<code class="descclassname">tools.</code><code class="descname">silent_remove</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#silent_remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.silent_remove" title="Permalink to this definition"></a></dt>
2372<dd><p>Remove file if it exists.
2373The function does not fail if the file does not exist.</p>
2374<table class="docutils field-list" frame="void" rules="none">
2375<col class="field-name" />
2376<col class="field-body" />
2377<tbody valign="top">
2378<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<em>str</em>) – The name of the file to be removed without notification.</td>
2379</tr>
2380</tbody>
2381</table>
2382</dd></dl>
2383
2384<dl class="function">
2385<dt id="tools.submit_job_to_ecserver">
2386<code class="descclassname">tools.</code><code class="descname">submit_job_to_ecserver</code><span class="sig-paren">(</span><em>target</em>, <em>jobname</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#submit_job_to_ecserver"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.submit_job_to_ecserver" title="Permalink to this definition"></a></dt>
2387<dd><p>Uses ecaccess-job-submit command to submit a job to the ECMWF server.</p>
2388<div class="admonition note">
2389<p class="first admonition-title">Note</p>
2390<p class="last">The return value is just for testing reasons. It does not have
2391to be used from the calling function since the whole error handling
2392is done in here.</p>
2393</div>
2394<table class="docutils field-list" frame="void" rules="none">
2395<col class="field-name" />
2396<col class="field-body" />
2397<tbody valign="top">
2398<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2399<li><strong>target</strong> (<em>str</em>) – The target where the file should be sent to, e.g. the queue.</li>
2400<li><strong>jobname</strong> (<em>str</em>) – The name of the jobfile to be submitted to the ECMWF server.</li>
2401</ul>
2402</td>
2403</tr>
2404<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>job_id</strong> – The id number of the job as a reference at the ecmwf server.</p>
2405</td>
2406</tr>
2407<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">int</p>
2408</td>
2409</tr>
2410</tbody>
2411</table>
2412</dd></dl>
2413
2414<dl class="function">
2415<dt id="tools.to_param_id">
2416<code class="descclassname">tools.</code><code class="descname">to_param_id</code><span class="sig-paren">(</span><em>pars</em>, <em>table</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#to_param_id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.to_param_id" title="Permalink to this definition"></a></dt>
2417<dd><p>Transform parameter names to parameter ids with ECMWF grib table 128.</p>
2418<table class="docutils field-list" frame="void" rules="none">
2419<col class="field-name" />
2420<col class="field-body" />
2421<tbody valign="top">
2422<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2423<li><strong>pars</strong> (<em>str</em>) – Addpar argument from CONTROL file in the format of
2424parameter names instead of ids. The parameter short
2425names are sepearted with “/” and they are passed as
2426one single string.</li>
2427<li><strong>table</strong> (<em>dict</em>) – Contains the ECMWF grib table 128 information.
2428The key is the parameter number and the value is the
2429short name of the parameter.</li>
2430</ul>
2431</td>
2432</tr>
2433<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>ipar</strong> – List of addpar parameters from CONTROL file transformed to
2434parameter ids in the format of integer.</p>
2435</td>
2436</tr>
2437<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list of int</p>
2438</td>
2439</tr>
2440</tbody>
2441</table>
2442</dd></dl>
2443
2444<dl class="function">
2445<dt id="tools.to_param_id_with_tablenumber">
2446<code class="descclassname">tools.</code><code class="descname">to_param_id_with_tablenumber</code><span class="sig-paren">(</span><em>pars</em>, <em>table</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#to_param_id_with_tablenumber"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.to_param_id_with_tablenumber" title="Permalink to this definition"></a></dt>
2447<dd><p>Transform parameter names to parameter ids and add table id.</p>
2448<p>Conversion with ECMWF grib table 128.</p>
2449<table class="docutils field-list" frame="void" rules="none">
2450<col class="field-name" />
2451<col class="field-body" />
2452<tbody valign="top">
2453<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2454<li><strong>pars</strong> (<em>str</em>) – Addpar argument from CONTROL file in the format of
2455parameter names instead of ids. The parameter short
2456names are sepearted with “/” and they are passed as
2457one single string.</li>
2458<li><strong>table</strong> (<em>dict</em>) – Contains the ECMWF grib table 128 information.
2459The key is the parameter number and the value is the
2460short name of the parameter.</li>
2461</ul>
2462</td>
2463</tr>
2464<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>spar</strong> – List of addpar parameters from CONTROL file transformed to
2465parameter ids in the format of integer.</p>
2466</td>
2467</tr>
2468<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
2469</td>
2470</tr>
2471</tbody>
2472</table>
2473</dd></dl>
2474
2475</div>
2476<div class="section" id="module-disaggregation">
2477<span id="disaggregation"></span><h3><a class="toc-backref" href="#id14">disaggregation</a><a class="headerlink" href="#module-disaggregation" title="Permalink to this headline"></a></h3>
2478<p>Disaggregation of deaccumulated flux data from an ECMWF model FG field.</p>
2479<dl class="docutils">
2480<dt>Initially the flux data to be concerned are:</dt>
2481<dd><ul class="first last simple">
2482<li>large-scale precipitation</li>
2483<li>convective precipitation</li>
2484<li>surface sensible heat flux</li>
2485<li>surface solar radiation</li>
2486<li>u stress</li>
2487<li>v stress</li>
2488</ul>
2489</dd>
2490</dl>
2491<p>Different versions of disaggregation is provided for rainfall
2492data (darain, modified linear) and the surface fluxes and
2493stress data (dapoly, cubic polynomial).</p>
2494<dl class="function">
2495<dt id="disaggregation.IA3">
2496<code class="descclassname">disaggregation.</code><code class="descname">IA3</code><span class="sig-paren">(</span><em>g</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/disaggregation.html#IA3"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#disaggregation.IA3" title="Permalink to this definition"></a></dt>
2497<dd><p>Interpolation with a non-negative geometric mean based algorithm.</p>
2498<p>The original grid is reconstructed by adding two sampling points in each
2499data series interval. This subgrid is used to keep all information during
2500the interpolation within the associated interval. Additionally, an advanced
2501monotonicity filter is applied to improve the monotonicity properties of
2502the series.</p>
2503<div class="admonition note">
2504<p class="first admonition-title">Note</p>
2505<p>(C) Copyright 2017-2019
2506Sabine Hittmeir, Anne Philipp, Petra Seibert</p>
2507<p class="last">This work is licensed under the Creative Commons Attribution 4.0
2508International License. To view a copy of this license, visit
2509<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
2510Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.</p>
2511</div>
2512<table class="docutils field-list" frame="void" rules="none">
2513<col class="field-name" />
2514<col class="field-body" />
2515<tbody valign="top">
2516<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>g</strong> (<em>list of float</em>) – Complete data series that will be interpolated having
2517the dimension of the original raw series.</td>
2518</tr>
2519<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>f</strong> – The interpolated data series with additional subgrid points.
2520Its dimension is equal to the length of the input data series
2521times three.</td>
2522</tr>
2523<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list of float</td>
2524</tr>
2525</tbody>
2526</table>
2527<p class="rubric">References</p>
2528<p>For more information see article:
2529Hittmeir, S.; Philipp, A.; Seibert, P. (2017): A conservative
2530interpolation scheme for extensive quantities with application to the
2531Lagrangian particle dispersion model FLEXPART.,
2532Geoscientific Model Development</p>
2533</dd></dl>
2534
2535<dl class="function">
2536<dt id="disaggregation.dapoly">
2537<code class="descclassname">disaggregation.</code><code class="descname">dapoly</code><span class="sig-paren">(</span><em>alist</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/disaggregation.html#dapoly"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#disaggregation.dapoly" title="Permalink to this definition"></a></dt>
2538<dd><p>Cubic polynomial interpolation of deaccumulated fluxes.</p>
2539<p>Interpolation of deaccumulated fluxes of an ECMWF model FG field
2540using a cubic polynomial solution which conserves the integrals
2541of the fluxes within each timespan.
2542Disaggregation is done for 4 accumluated timespans which
2543generates a new, disaggregated value which is output at the
2544central point of the 4 accumulation timespans.
2545This new point is used for linear interpolation of the complete
2546timeseries afterwards.</p>
2547<table class="docutils field-list" frame="void" rules="none">
2548<col class="field-name" />
2549<col class="field-body" />
2550<tbody valign="top">
2551<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alist</strong> (<em>list of array of float</em>) – List of 4 timespans as 2-dimensional, horizontal fields.
2552E.g. [[array_t1], [array_t2], [array_t3], [array_t4]]</td>
2553</tr>
2554<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>nfield</strong> – Interpolated flux at central point of accumulation timespan.</td>
2555</tr>
2556<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">array of float</td>
2557</tr>
2558</tbody>
2559</table>
2560<div class="admonition note">
2561<p class="first admonition-title">Note</p>
2562<dl class="last docutils">
2563<dt>March 2000 <span class="classifier-delimiter">:</span> <span class="classifier">P. JAMES</span></dt>
2564<dd>Original author</dd>
2565<dt>June 2003 <span class="classifier-delimiter">:</span> <span class="classifier">A. BECK</span></dt>
2566<dd>Adaptations</dd>
2567<dt>November 2015 <span class="classifier-delimiter">:</span> <span class="classifier">Leopold Haimberger (University of Vienna)</span></dt>
2568<dd>Migration from Fortran to Python</dd>
2569</dl>
2570</div>
2571</dd></dl>
2572
2573<dl class="function">
2574<dt id="disaggregation.darain">
2575<code class="descclassname">disaggregation.</code><code class="descname">darain</code><span class="sig-paren">(</span><em>alist</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/disaggregation.html#darain"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#disaggregation.darain" title="Permalink to this definition"></a></dt>
2576<dd><p>Linear interpolation of deaccumulated fluxes.</p>
2577<p>Interpolation of deaccumulated fluxes of an ECMWF model FG rainfall
2578field using a modified linear solution which conserves the integrals
2579of the fluxes within each timespan.
2580Disaggregation is done for 4 accumluated timespans which generates
2581a new, disaggregated value which is output at the central point
2582of the 4 accumulation timespans. This new point is used for linear
2583interpolation of the complete timeseries afterwards.</p>
2584<table class="docutils field-list" frame="void" rules="none">
2585<col class="field-name" />
2586<col class="field-body" />
2587<tbody valign="top">
2588<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alist</strong> (<em>list of array of float</em>) – List of 4 timespans as 2-dimensional, horizontal fields.
2589E.g. [[array_t1], [array_t2], [array_t3], [array_t4]]</td>
2590</tr>
2591<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>nfield</strong> – Interpolated flux at central point of accumulation timespan.</td>
2592</tr>
2593<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">array of float</td>
2594</tr>
2595</tbody>
2596</table>
2597<div class="admonition note">
2598<p class="first admonition-title">Note</p>
2599<dl class="last docutils">
2600<dt>March 2000 <span class="classifier-delimiter">:</span> <span class="classifier">P. JAMES</span></dt>
2601<dd>Original author</dd>
2602<dt>June 2003 <span class="classifier-delimiter">:</span> <span class="classifier">A. BECK</span></dt>
2603<dd>Adaptations</dd>
2604<dt>November 2015 <span class="classifier-delimiter">:</span> <span class="classifier">Leopold Haimberger (University of Vienna)</span></dt>
2605<dd>Migration from Fortran to Python</dd>
2606</dl>
2607</div>
2608</dd></dl>
2609
2610</div>
2611</div>
2612</div>
2613
2614
2615           </div>
2616           
2617          </div>
2618          <footer>
2619 
2620    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
2621     
2622        <a href="support.html" class="btn btn-neutral float-right" title="Support" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
2623     
2624     
2625        <a href="user_guide/control_templates.html" class="btn btn-neutral" title="CONTROL-file templates" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
2626     
2627    </div>
2628 
2629
2630  <hr/>
2631
2632  <div role="contentinfo">
2633    <p>
2634        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
2635
2636    </p>
2637  </div>
2638  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>.
2639
2640</footer>
2641
2642        </div>
2643      </div>
2644
2645    </section>
2646
2647  </div>
2648 
2649
2650
2651 
2652
2653    <script type="text/javascript">
2654        var DOCUMENTATION_OPTIONS = {
2655            URL_ROOT:'./',
2656            VERSION:'7.1 alpha',
2657            LANGUAGE:'None',
2658            COLLAPSE_INDEX:false,
2659            FILE_SUFFIX:'.html',
2660            HAS_SOURCE:  true,
2661            SOURCELINK_SUFFIX: '.txt'
2662        };
2663    </script>
2664      <script type="text/javascript" src="_static/jquery.js"></script>
2665      <script type="text/javascript" src="_static/underscore.js"></script>
2666      <script type="text/javascript" src="_static/doctools.js"></script>
2667      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
2668
2669 
2670
2671  <script type="text/javascript" src="_static/js/theme.js"></script>
2672
2673  <script type="text/javascript">
2674      jQuery(function () {
2675          SphinxRtdTheme.Navigation.enable(true);
2676      });
2677  </script> 
2678
2679</body>
2680</html>
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG