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 — 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-GribTools">GribTools</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> »</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-GribTools" id="id7">GribTools</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 | <dl class="function"> |
---|
210 | <dt id="install.delete_convert_build"> |
---|
211 | <code class="descclassname">install.</code><code class="descname">delete_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#delete_convert_build"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.delete_convert_build" title="Permalink to this definition">¶</a></dt> |
---|
212 | <dd><p>Clean up the Fortran source directory and remove all |
---|
213 | build files (e.g. *.o, *.mod and CONVERT2)</p> |
---|
214 | <table class="docutils field-list" frame="void" rules="none"> |
---|
215 | <col class="field-name" /> |
---|
216 | <col class="field-body" /> |
---|
217 | <tbody valign="top"> |
---|
218 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>src_path</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Path to the fortran source directory.</td> |
---|
219 | </tr> |
---|
220 | </tbody> |
---|
221 | </table> |
---|
222 | </dd></dl> |
---|
223 | |
---|
224 | <dl class="function"> |
---|
225 | <dt id="install.get_install_cmdline_arguments"> |
---|
226 | <code class="descclassname">install.</code><code class="descname">get_install_cmdline_arguments</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#get_install_cmdline_arguments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.get_install_cmdline_arguments" title="Permalink to this definition">¶</a></dt> |
---|
227 | <dd><p>Decomposes the command line arguments and assigns them to variables. |
---|
228 | Apply default values for non mentioned arguments.</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">Returns:</th><td class="field-body"><strong>args</strong> – Contains the commandline arguments from script/program call.</td> |
---|
234 | </tr> |
---|
235 | <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Namespace</span></code></td> |
---|
236 | </tr> |
---|
237 | </tbody> |
---|
238 | </table> |
---|
239 | </dd></dl> |
---|
240 | |
---|
241 | <dl class="function"> |
---|
242 | <dt id="install.install_via_gateway"> |
---|
243 | <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> |
---|
244 | <dd><p>Perform the actual installation on local machine or prepare data |
---|
245 | transfer to remote gate and submit a job script which will |
---|
246 | install everything on the remote gate.</p> |
---|
247 | <table class="docutils field-list" frame="void" rules="none"> |
---|
248 | <col class="field-name" /> |
---|
249 | <col class="field-body" /> |
---|
250 | <tbody valign="top"> |
---|
251 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and |
---|
252 | command line.</td> |
---|
253 | </tr> |
---|
254 | </tbody> |
---|
255 | </table> |
---|
256 | </dd></dl> |
---|
257 | |
---|
258 | <dl class="function"> |
---|
259 | <dt id="install.main"> |
---|
260 | <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> |
---|
261 | <dd><p>Controls the installation process. Calls the installation function |
---|
262 | if target is specified.</p> |
---|
263 | </dd></dl> |
---|
264 | |
---|
265 | <dl class="function"> |
---|
266 | <dt id="install.make_convert_build"> |
---|
267 | <code class="descclassname">install.</code><code class="descname">make_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#make_convert_build"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.make_convert_build" title="Permalink to this definition">¶</a></dt> |
---|
268 | <dd><p>Compiles the Fortran code and generates the executable.</p> |
---|
269 | <table class="docutils field-list" frame="void" rules="none"> |
---|
270 | <col class="field-name" /> |
---|
271 | <col class="field-body" /> |
---|
272 | <tbody valign="top"> |
---|
273 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
274 | <li><strong>src_path</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Path to the fortran source directory.</li> |
---|
275 | <li><strong>makefile</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The name of the makefile which should be used.</li> |
---|
276 | </ul> |
---|
277 | </td> |
---|
278 | </tr> |
---|
279 | </tbody> |
---|
280 | </table> |
---|
281 | </dd></dl> |
---|
282 | |
---|
283 | <dl class="function"> |
---|
284 | <dt id="install.mk_compilejob"> |
---|
285 | <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> |
---|
286 | <dd><p>Modifies the original job template file so that it is specified |
---|
287 | for the user and the environment were it will be applied. Result |
---|
288 | is stored in a new file “job.temp” in the python directory.</p> |
---|
289 | <table class="docutils field-list" frame="void" rules="none"> |
---|
290 | <col class="field-name" /> |
---|
291 | <col class="field-body" /> |
---|
292 | <tbody valign="top"> |
---|
293 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
294 | <li><strong>makefile</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Name of the makefile which should be used to compile FORTRAN |
---|
295 | CONVERT2 program.</li> |
---|
296 | <li><strong>target</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The target where the installation should be done, e.g. the queue.</li> |
---|
297 | <li><strong>ecuid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The user id on ECMWF server.</li> |
---|
298 | <li><strong>ecgid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The group id on ECMWF server.</li> |
---|
299 | <li><strong>fp_root</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Path to the root directory of FLEXPART environment or flex_extract |
---|
300 | environment.</li> |
---|
301 | </ul> |
---|
302 | </td> |
---|
303 | </tr> |
---|
304 | </tbody> |
---|
305 | </table> |
---|
306 | </dd></dl> |
---|
307 | |
---|
308 | <dl class="function"> |
---|
309 | <dt id="install.mk_env_vars"> |
---|
310 | <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> |
---|
311 | <dd><p>Creates a file named ECMWF_ENV which contains the |
---|
312 | necessary environmental variables at ECMWF servers. |
---|
313 | It is based on the template ECMWF_ENV.template.</p> |
---|
314 | <table class="docutils field-list" frame="void" rules="none"> |
---|
315 | <col class="field-name" /> |
---|
316 | <col class="field-body" /> |
---|
317 | <tbody valign="top"> |
---|
318 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
319 | <li><strong>ecuid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The user id on ECMWF server.</li> |
---|
320 | <li><strong>ecgid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The group id on ECMWF server.</li> |
---|
321 | <li><strong>gateway</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The gateway server the user is using.</li> |
---|
322 | <li><strong>destination</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The remote destination which is used to transfer files |
---|
323 | from ECMWF server to local gateway server.</li> |
---|
324 | </ul> |
---|
325 | </td> |
---|
326 | </tr> |
---|
327 | </tbody> |
---|
328 | </table> |
---|
329 | </dd></dl> |
---|
330 | |
---|
331 | <dl class="function"> |
---|
332 | <dt id="install.mk_job_template"> |
---|
333 | <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> |
---|
334 | <dd><p>Modifies the original job template file so that it is specified |
---|
335 | for the user and the environment were it will be applied. Result |
---|
336 | is stored in a new file.</p> |
---|
337 | <table class="docutils field-list" frame="void" rules="none"> |
---|
338 | <col class="field-name" /> |
---|
339 | <col class="field-body" /> |
---|
340 | <tbody valign="top"> |
---|
341 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
342 | <li><strong>ecuid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The user id on ECMWF server.</li> |
---|
343 | <li><strong>ecgid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The group id on ECMWF server.</li> |
---|
344 | <li><strong>gateway</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The gateway server the user is using.</li> |
---|
345 | <li><strong>destination</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The remote destination which is used to transfer files |
---|
346 | from ECMWF server to local gateway server.</li> |
---|
347 | <li><strong>fp_root</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Path to the root directory of FLEXPART environment or flex_extract |
---|
348 | environment.</li> |
---|
349 | </ul> |
---|
350 | </td> |
---|
351 | </tr> |
---|
352 | </tbody> |
---|
353 | </table> |
---|
354 | </dd></dl> |
---|
355 | |
---|
356 | <dl class="function"> |
---|
357 | <dt id="install.mk_tarball"> |
---|
358 | <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> |
---|
359 | <dd><p>Creates a tarball with all necessary files which need to be sent to the |
---|
360 | installation directory. |
---|
361 | It does not matter if this is local or remote. |
---|
362 | Collects all python files, the Fortran source and makefiles, |
---|
363 | the ECMWF_ENV file, the CONTROL files as well as the |
---|
364 | template files.</p> |
---|
365 | <table class="docutils field-list" frame="void" rules="none"> |
---|
366 | <col class="field-name" /> |
---|
367 | <col class="field-body" /> |
---|
368 | <tbody valign="top"> |
---|
369 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
370 | <li><strong>tarball_path</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The complete path to the tar file which will contain all |
---|
371 | relevant data for flex_extract.</li> |
---|
372 | <li><strong>target</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The queue where the job is submitted to.</li> |
---|
373 | </ul> |
---|
374 | </td> |
---|
375 | </tr> |
---|
376 | </tbody> |
---|
377 | </table> |
---|
378 | </dd></dl> |
---|
379 | |
---|
380 | <dl class="function"> |
---|
381 | <dt id="install.un_tarball"> |
---|
382 | <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> |
---|
383 | <dd><p>Extracts the given tarball into current directory.</p> |
---|
384 | <table class="docutils field-list" frame="void" rules="none"> |
---|
385 | <col class="field-name" /> |
---|
386 | <col class="field-body" /> |
---|
387 | <tbody valign="top"> |
---|
388 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>tarball_path</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The complete path to the tar file which will contain all |
---|
389 | relevant data for flex_extract.</td> |
---|
390 | </tr> |
---|
391 | </tbody> |
---|
392 | </table> |
---|
393 | </dd></dl> |
---|
394 | |
---|
395 | </div> |
---|
396 | <div class="section" id="module-submit"> |
---|
397 | <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> |
---|
398 | <dl class="function"> |
---|
399 | <dt id="submit.main"> |
---|
400 | <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> |
---|
401 | <dd><p>Get the arguments from script call and from CONTROL file. |
---|
402 | Decides from the argument “queue” if the local version |
---|
403 | is done “queue=None” or the gateway version with “queue=ecgate” |
---|
404 | or “queue=cca”.</p> |
---|
405 | </dd></dl> |
---|
406 | |
---|
407 | <dl class="function"> |
---|
408 | <dt id="submit.submit"> |
---|
409 | <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> |
---|
410 | <dd><p>Prepares the job script and submit it to the specified queue.</p> |
---|
411 | <table class="docutils field-list" frame="void" rules="none"> |
---|
412 | <col class="field-name" /> |
---|
413 | <col class="field-body" /> |
---|
414 | <tbody valign="top"> |
---|
415 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
416 | <li><strong>jtemplate</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Job template file from sub-directory “_templates” for |
---|
417 | submission to ECMWF. It contains all necessary |
---|
418 | module and variable settings for the ECMWF environment as well as |
---|
419 | the job call and mail report instructions. |
---|
420 | Default is “job.temp”.</li> |
---|
421 | <li><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and |
---|
422 | command line.</li> |
---|
423 | <li><strong>queue</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Name of queue for submission to ECMWF (e.g. ecgate or cca )</li> |
---|
424 | </ul> |
---|
425 | </td> |
---|
426 | </tr> |
---|
427 | </tbody> |
---|
428 | </table> |
---|
429 | </dd></dl> |
---|
430 | |
---|
431 | </div> |
---|
432 | </div> |
---|
433 | <div class="section" id="classes"> |
---|
434 | <h2><a class="toc-backref" href="#id4">Classes</a><a class="headerlink" href="#classes" title="Permalink to this headline">¶</a></h2> |
---|
435 | <div class="section" id="module-ControlFile"> |
---|
436 | <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> |
---|
437 | <dl class="class"> |
---|
438 | <dt id="ControlFile.ControlFile"> |
---|
439 | <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> |
---|
440 | <dd><p>Contains the information which are stored in the CONTROL files.</p> |
---|
441 | <dl class="method"> |
---|
442 | <dt id="ControlFile.ControlFile.assign_args_to_control"> |
---|
443 | <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> |
---|
444 | <dd><p>Overwrites the existing ControlFile instance attributes with |
---|
445 | the command line arguments.</p> |
---|
446 | <table class="docutils field-list" frame="void" rules="none"> |
---|
447 | <col class="field-name" /> |
---|
448 | <col class="field-body" /> |
---|
449 | <tbody valign="top"> |
---|
450 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>args</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">Namespace</span></code>) – Contains the commandline arguments from script/program call.</td> |
---|
451 | </tr> |
---|
452 | </tbody> |
---|
453 | </table> |
---|
454 | </dd></dl> |
---|
455 | |
---|
456 | <dl class="method"> |
---|
457 | <dt id="ControlFile.ControlFile.assign_envs_to_control"> |
---|
458 | <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> |
---|
459 | <dd><p>Assigns the ECMWF environment parameter.</p> |
---|
460 | <table class="docutils field-list" frame="void" rules="none"> |
---|
461 | <col class="field-name" /> |
---|
462 | <col class="field-body" /> |
---|
463 | <tbody valign="top"> |
---|
464 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>envs</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">dictionary</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">strings</span></code>) – Contains the ECMWF environment parameternames “ECUID”, “ECGID”, |
---|
465 | “DESTINATION” and “GATEWAY” with its corresponding values. |
---|
466 | They were read from the file “ECMWF_ENV”.</td> |
---|
467 | </tr> |
---|
468 | </tbody> |
---|
469 | </table> |
---|
470 | </dd></dl> |
---|
471 | |
---|
472 | <dl class="method"> |
---|
473 | <dt id="ControlFile.ControlFile.check_conditions"> |
---|
474 | <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> |
---|
475 | <dd><p>Checks a couple of necessary attributes and conditions, |
---|
476 | such as if they exist and contain values. |
---|
477 | Otherwise set default values.</p> |
---|
478 | <table class="docutils field-list" frame="void" rules="none"> |
---|
479 | <col class="field-name" /> |
---|
480 | <col class="field-body" /> |
---|
481 | <tbody valign="top"> |
---|
482 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>queue</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Name of the queue if submitted to the ECMWF servers. |
---|
483 | Used to check if ecuid, ecgid, gateway and destination |
---|
484 | are set correctly and are not empty.</td> |
---|
485 | </tr> |
---|
486 | </tbody> |
---|
487 | </table> |
---|
488 | </dd></dl> |
---|
489 | |
---|
490 | <dl class="method"> |
---|
491 | <dt id="ControlFile.ControlFile.check_install_conditions"> |
---|
492 | <code class="descname">check_install_conditions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/ControlFile.html#ControlFile.check_install_conditions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.check_install_conditions" title="Permalink to this definition">¶</a></dt> |
---|
493 | <dd><p>Checks a couple of necessary attributes and conditions |
---|
494 | for the installation such as if they exist and contain values. |
---|
495 | Otherwise set default values.</p> |
---|
496 | </dd></dl> |
---|
497 | |
---|
498 | <dl class="method"> |
---|
499 | <dt id="ControlFile.ControlFile.to_list"> |
---|
500 | <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> |
---|
501 | <dd><p>Just generates a list of strings containing the attributes and |
---|
502 | assigned values except the attributes “_expanded”, “exedir”, |
---|
503 | “ecmwfdatadir” and “flexpart_root_scripts”.</p> |
---|
504 | <table class="docutils field-list" frame="void" rules="none"> |
---|
505 | <col class="field-name" /> |
---|
506 | <col class="field-body" /> |
---|
507 | <tbody valign="top"> |
---|
508 | <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 |
---|
509 | their values except the attributes “_expanded”, “exedir”, |
---|
510 | “ecmwfdatadir” and “flexpart_root_scripts”.</td> |
---|
511 | </tr> |
---|
512 | <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code></td> |
---|
513 | </tr> |
---|
514 | </tbody> |
---|
515 | </table> |
---|
516 | </dd></dl> |
---|
517 | |
---|
518 | </dd></dl> |
---|
519 | |
---|
520 | </div> |
---|
521 | <div class="section" id="module-EcFlexpart"> |
---|
522 | <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> |
---|
523 | <dl class="class"> |
---|
524 | <dt id="EcFlexpart.EcFlexpart"> |
---|
525 | <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> |
---|
526 | <dd><p>Class to retrieve FLEXPART specific ECMWF data.</p> |
---|
527 | <dl class="method"> |
---|
528 | <dt id="EcFlexpart.EcFlexpart.create"> |
---|
529 | <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> |
---|
530 | <dd><p>An index file will be created which depends on the combination |
---|
531 | of “date”, “time” and “stepRange” values. This is used to iterate |
---|
532 | over all messages in each grib file which were passed through the |
---|
533 | parameter “inputfiles” to seperate specific parameters into fort.* |
---|
534 | files. Afterwards the FORTRAN program is called to convert |
---|
535 | the data fields all to the same grid and put them in one file |
---|
536 | per unique time step (combination of “date”, “time” and |
---|
537 | “stepRange”).</p> |
---|
538 | <div class="admonition note"> |
---|
539 | <p class="first admonition-title">Note</p> |
---|
540 | <p class="last">This method is based on the ECMWF example index.py |
---|
541 | <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> |
---|
542 | </div> |
---|
543 | <table class="docutils field-list" frame="void" rules="none"> |
---|
544 | <col class="field-name" /> |
---|
545 | <col class="field-body" /> |
---|
546 | <tbody valign="top"> |
---|
547 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
548 | <li><strong>inputfiles</strong> (<a class="reference internal" href="#module-UioFiles" title="UioFiles"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UioFiles</span></code></a>) – Contains a list of files.</li> |
---|
549 | <li><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and |
---|
550 | command line.</li> |
---|
551 | </ul> |
---|
552 | </td> |
---|
553 | </tr> |
---|
554 | </tbody> |
---|
555 | </table> |
---|
556 | </dd></dl> |
---|
557 | |
---|
558 | <dl class="method"> |
---|
559 | <dt id="EcFlexpart.EcFlexpart.deacc_fluxes"> |
---|
560 | <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> |
---|
561 | <dd><p>Goes through all flux fields in ordered time and de-accumulate |
---|
562 | the fields. Afterwards the fields are disaggregated in time. |
---|
563 | Different versions of disaggregation is provided for rainfall |
---|
564 | data (darain, modified linear) and the surface fluxes and |
---|
565 | stress data (dapoly, cubic polynomial).</p> |
---|
566 | <table class="docutils field-list" frame="void" rules="none"> |
---|
567 | <col class="field-name" /> |
---|
568 | <col class="field-body" /> |
---|
569 | <tbody valign="top"> |
---|
570 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
571 | <li><strong>inputfiles</strong> (<a class="reference internal" href="#module-UioFiles" title="UioFiles"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UioFiles</span></code></a>) – Contains a list of files.</li> |
---|
572 | <li><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and |
---|
573 | command line.</li> |
---|
574 | </ul> |
---|
575 | </td> |
---|
576 | </tr> |
---|
577 | </tbody> |
---|
578 | </table> |
---|
579 | </dd></dl> |
---|
580 | |
---|
581 | <dl class="method"> |
---|
582 | <dt id="EcFlexpart.EcFlexpart.prepare_fp_files"> |
---|
583 | <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> |
---|
584 | <dd><p>Conversion of GRIB files to FLEXPART binary format.</p> |
---|
585 | <table class="docutils field-list" frame="void" rules="none"> |
---|
586 | <col class="field-name" /> |
---|
587 | <col class="field-body" /> |
---|
588 | <tbody valign="top"> |
---|
589 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and |
---|
590 | command line.</td> |
---|
591 | </tr> |
---|
592 | </tbody> |
---|
593 | </table> |
---|
594 | </dd></dl> |
---|
595 | |
---|
596 | <dl class="method"> |
---|
597 | <dt id="EcFlexpart.EcFlexpart.process_output"> |
---|
598 | <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> |
---|
599 | <dd><p>The grib files are postprocessed depending on the selection in |
---|
600 | CONTROL file. The resulting files are moved to the output |
---|
601 | directory if its not equal to the input directory. |
---|
602 | The following modifications might be done if |
---|
603 | properly switched in CONTROL file: |
---|
604 | GRIB2 - Conversion to GRIB2 |
---|
605 | ECTRANS - Transfer of files to gateway server |
---|
606 | ECSTORAGE - Storage at ECMWF server</p> |
---|
607 | <table class="docutils field-list" frame="void" rules="none"> |
---|
608 | <col class="field-name" /> |
---|
609 | <col class="field-body" /> |
---|
610 | <tbody valign="top"> |
---|
611 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and |
---|
612 | command line.</td> |
---|
613 | </tr> |
---|
614 | </tbody> |
---|
615 | </table> |
---|
616 | </dd></dl> |
---|
617 | |
---|
618 | <dl class="method"> |
---|
619 | <dt id="EcFlexpart.EcFlexpart.retrieve"> |
---|
620 | <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> |
---|
621 | <dd><p>Finalizing the retrieval information by setting final details |
---|
622 | depending on grid type. |
---|
623 | Prepares MARS retrievals per grid type and submits them.</p> |
---|
624 | <table class="docutils field-list" frame="void" rules="none"> |
---|
625 | <col class="field-name" /> |
---|
626 | <col class="field-body" /> |
---|
627 | <tbody valign="top"> |
---|
628 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
629 | <li><strong>server</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">ECMWFService</span></code> or <code class="xref py py-obj docutils literal notranslate"><span class="pre">ECMWFDataServer</span></code>) – The connection to the ECMWF server. This is different |
---|
630 | for member state users which have full access and non |
---|
631 | member state users which have only access to the public |
---|
632 | data sets. The decision is made from command line argument |
---|
633 | “public”; for public access its True (ECMWFDataServer) |
---|
634 | for member state users its False (ECMWFService)</li> |
---|
635 | <li><strong>dates</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Contains start and end date of the retrieval in the format |
---|
636 | “YYYYMMDD/to/YYYYMMDD”</li> |
---|
637 | <li><strong>request</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">integer</span></code>) – Selects the mode of retrieval. |
---|
638 | 0: Retrieves the data from ECMWF. |
---|
639 | 1: Prints the mars requests to an output file. |
---|
640 | 2: Retrieves the data and prints the mars request.</li> |
---|
641 | <li><strong>inputdir</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Path to the directory where the retrieved data is about |
---|
642 | to be stored. The default is the current directory (‘.’).</li> |
---|
643 | </ul> |
---|
644 | </td> |
---|
645 | </tr> |
---|
646 | </tbody> |
---|
647 | </table> |
---|
648 | </dd></dl> |
---|
649 | |
---|
650 | <dl class="method"> |
---|
651 | <dt id="EcFlexpart.EcFlexpart.write_namelist"> |
---|
652 | <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> |
---|
653 | <dd><p>Creates a namelist file in the temporary directory and writes |
---|
654 | the following values to it: maxl, maxb, mlevel, |
---|
655 | mlevelist, mnauf, metapar, rlo0, rlo1, rla0, rla1, |
---|
656 | momega, momegadiff, mgauss, msmooth, meta, metadiff, mdpdeta</p> |
---|
657 | <table class="docutils field-list" frame="void" rules="none"> |
---|
658 | <col class="field-name" /> |
---|
659 | <col class="field-body" /> |
---|
660 | <tbody valign="top"> |
---|
661 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
662 | <li><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and |
---|
663 | command line.</li> |
---|
664 | <li><strong>filename</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Name of the namelist file.</li> |
---|
665 | </ul> |
---|
666 | </td> |
---|
667 | </tr> |
---|
668 | </tbody> |
---|
669 | </table> |
---|
670 | </dd></dl> |
---|
671 | |
---|
672 | </dd></dl> |
---|
673 | |
---|
674 | </div> |
---|
675 | <div class="section" id="module-GribTools"> |
---|
676 | <span id="gribtools"></span><h3><a class="toc-backref" href="#id7">GribTools</a><a class="headerlink" href="#module-GribTools" title="Permalink to this headline">¶</a></h3> |
---|
677 | <dl class="class"> |
---|
678 | <dt id="GribTools.GribTools"> |
---|
679 | <em class="property">class </em><code class="descclassname">GribTools.</code><code class="descname">GribTools</code><span class="sig-paren">(</span><em>filenames</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/GribTools.html#GribTools"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribTools.GribTools" title="Permalink to this definition">¶</a></dt> |
---|
680 | <dd><p>Class for GRIB utilities (new methods) based on GRIB API</p> |
---|
681 | <dl class="method"> |
---|
682 | <dt id="GribTools.GribTools.copy"> |
---|
683 | <code class="descname">copy</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/GribTools.html#GribTools.copy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribTools.GribTools.copy" title="Permalink to this definition">¶</a></dt> |
---|
684 | <dd><p>Add the content of another input grib file to the objects file but |
---|
685 | only messages corresponding to keys/values passed to the function. |
---|
686 | The selectWhere switch decides if to copy the keys equal to (True) or |
---|
687 | different to (False) the keynames/keyvalues list passed to the function.</p> |
---|
688 | <table class="docutils field-list" frame="void" rules="none"> |
---|
689 | <col class="field-name" /> |
---|
690 | <col class="field-body" /> |
---|
691 | <tbody valign="top"> |
---|
692 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
693 | <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> |
---|
694 | <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 |
---|
695 | different to (False) the keynames/keyvalues list passed to the |
---|
696 | function. Default is True.</li> |
---|
697 | <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> |
---|
698 | <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 keynames. Default is an empty list.</li> |
---|
699 | <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> |
---|
700 | </ul> |
---|
701 | </td> |
---|
702 | </tr> |
---|
703 | </tbody> |
---|
704 | </table> |
---|
705 | </dd></dl> |
---|
706 | |
---|
707 | <dl class="method"> |
---|
708 | <dt id="GribTools.GribTools.get_keys"> |
---|
709 | <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/GribTools.html#GribTools.get_keys"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribTools.GribTools.get_keys" title="Permalink to this definition">¶</a></dt> |
---|
710 | <dd><p>Get keyvalues for a given list of keynames a where statement |
---|
711 | can be given (list of key and list of values)</p> |
---|
712 | <table class="docutils field-list" frame="void" rules="none"> |
---|
713 | <col class="field-name" /> |
---|
714 | <col class="field-body" /> |
---|
715 | <tbody valign="top"> |
---|
716 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
717 | <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> |
---|
718 | <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> |
---|
719 | <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> |
---|
720 | </ul> |
---|
721 | </td> |
---|
722 | </tr> |
---|
723 | <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> |
---|
724 | </td> |
---|
725 | </tr> |
---|
726 | <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> |
---|
727 | </td> |
---|
728 | </tr> |
---|
729 | </tbody> |
---|
730 | </table> |
---|
731 | </dd></dl> |
---|
732 | |
---|
733 | <dl class="method"> |
---|
734 | <dt id="GribTools.GribTools.index"> |
---|
735 | <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/GribTools.html#GribTools.index"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribTools.GribTools.index" title="Permalink to this definition">¶</a></dt> |
---|
736 | <dd><p>Create index file from a list of files if it does not exist or |
---|
737 | read an index file.</p> |
---|
738 | <table class="docutils field-list" frame="void" rules="none"> |
---|
739 | <col class="field-name" /> |
---|
740 | <col class="field-body" /> |
---|
741 | <tbody valign="top"> |
---|
742 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
743 | <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 |
---|
744 | which the index is to be created. |
---|
745 | Default is a list with a single entry string “mars”.</li> |
---|
746 | <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. |
---|
747 | Default is “my.idx”.</li> |
---|
748 | </ul> |
---|
749 | </td> |
---|
750 | </tr> |
---|
751 | <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> |
---|
752 | </td> |
---|
753 | </tr> |
---|
754 | <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> |
---|
755 | </td> |
---|
756 | </tr> |
---|
757 | </tbody> |
---|
758 | </table> |
---|
759 | </dd></dl> |
---|
760 | |
---|
761 | <dl class="method"> |
---|
762 | <dt id="GribTools.GribTools.set_keys"> |
---|
763 | <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/GribTools.html#GribTools.set_keys"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribTools.GribTools.set_keys" title="Permalink to this definition">¶</a></dt> |
---|
764 | <dd><p>Opens the file to read the grib messages and then write |
---|
765 | them to a new output file. By default all messages are |
---|
766 | written out. Also, the keyvalues of the passed list of |
---|
767 | keynames are set or only those meeting the where statement. |
---|
768 | (list of key and list of values).</p> |
---|
769 | <table class="docutils field-list" frame="void" rules="none"> |
---|
770 | <col class="field-name" /> |
---|
771 | <col class="field-body" /> |
---|
772 | <tbody valign="top"> |
---|
773 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
774 | <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> |
---|
775 | <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. Default is an empty list.</li> |
---|
776 | <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 keynames. Default is an empty list.</li> |
---|
777 | <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> |
---|
778 | <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> |
---|
779 | <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 |
---|
780 | is written out the grib file (False) or only those |
---|
781 | meeting the where statement (True). Default is False.</li> |
---|
782 | <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> |
---|
783 | </ul> |
---|
784 | </td> |
---|
785 | </tr> |
---|
786 | </tbody> |
---|
787 | </table> |
---|
788 | </dd></dl> |
---|
789 | |
---|
790 | </dd></dl> |
---|
791 | |
---|
792 | </div> |
---|
793 | <div class="section" id="module-MarsRetrieval"> |
---|
794 | <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> |
---|
795 | <dl class="class"> |
---|
796 | <dt id="MarsRetrieval.MarsRetrieval"> |
---|
797 | <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='ei'</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> |
---|
798 | <dd><p>Class for submitting MARS retrievals.</p> |
---|
799 | <p>A description of MARS keywords/arguments and examples of their |
---|
800 | values can be found here: |
---|
801 | <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> |
---|
802 | <dl class="method"> |
---|
803 | <dt id="MarsRetrieval.MarsRetrieval.data_retrieve"> |
---|
804 | <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> |
---|
805 | <dd><p>Submits a MARS retrieval. Depending on the existence of |
---|
806 | ECMWF Web-API it is submitted via Python or a |
---|
807 | subprocess in the Shell. The parameter for the mars retrieval |
---|
808 | are taken from the defined class attributes.</p> |
---|
809 | </dd></dl> |
---|
810 | |
---|
811 | <dl class="method"> |
---|
812 | <dt id="MarsRetrieval.MarsRetrieval.display_info"> |
---|
813 | <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> |
---|
814 | <dd><p>Prints all class attributes and their values to the |
---|
815 | standard output.</p> |
---|
816 | </dd></dl> |
---|
817 | |
---|
818 | <dl class="method"> |
---|
819 | <dt id="MarsRetrieval.MarsRetrieval.print_info"> |
---|
820 | <code class="descname">print_info</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_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.print_info" title="Permalink to this definition">¶</a></dt> |
---|
821 | <dd><p>Prints all mars requests to an extra file for debugging and |
---|
822 | information.</p> |
---|
823 | <table class="docutils field-list" frame="void" rules="none"> |
---|
824 | <col class="field-name" /> |
---|
825 | <col class="field-body" /> |
---|
826 | <tbody valign="top"> |
---|
827 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
828 | <li><strong>inputdir</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The path where all data from the retrievals are stored.</li> |
---|
829 | <li><strong>request_number</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">integer</span></code>) – Number of mars requests for flux and non-flux data.</li> |
---|
830 | </ul> |
---|
831 | </td> |
---|
832 | </tr> |
---|
833 | </tbody> |
---|
834 | </table> |
---|
835 | </dd></dl> |
---|
836 | |
---|
837 | <dl class="method"> |
---|
838 | <dt id="MarsRetrieval.MarsRetrieval.print_infodata_csv"> |
---|
839 | <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> |
---|
840 | <dd><p>Write all request parameter in alpabetical order into a “csv” file.</p> |
---|
841 | <table class="docutils field-list" frame="void" rules="none"> |
---|
842 | <col class="field-name" /> |
---|
843 | <col class="field-body" /> |
---|
844 | <tbody valign="top"> |
---|
845 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
846 | <li><strong>inputdir</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The path where all data from the retrievals are stored.</li> |
---|
847 | <li><strong>request_number</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">integer</span></code>) – Number of mars requests for flux and non-flux data.</li> |
---|
848 | </ul> |
---|
849 | </td> |
---|
850 | </tr> |
---|
851 | </tbody> |
---|
852 | </table> |
---|
853 | </dd></dl> |
---|
854 | |
---|
855 | </dd></dl> |
---|
856 | |
---|
857 | </div> |
---|
858 | <div class="section" id="module-UioFiles"> |
---|
859 | <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> |
---|
860 | <dl class="class"> |
---|
861 | <dt id="UioFiles.UioFiles"> |
---|
862 | <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> |
---|
863 | <dd><p>Class to manipulate files. At initialisation it has the pattern |
---|
864 | which stores a regular expression pattern for the files, the path |
---|
865 | to the files and the files already.</p> |
---|
866 | <dl class="method"> |
---|
867 | <dt id="UioFiles.UioFiles.delete_files"> |
---|
868 | <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> |
---|
869 | <dd><p>Deletes the files.</p> |
---|
870 | </dd></dl> |
---|
871 | |
---|
872 | </dd></dl> |
---|
873 | |
---|
874 | </div> |
---|
875 | </div> |
---|
876 | <div class="section" id="modules"> |
---|
877 | <h2><a class="toc-backref" href="#id10">Modules</a><a class="headerlink" href="#modules" title="Permalink to this headline">¶</a></h2> |
---|
878 | <div class="section" id="module-get_mars_data"> |
---|
879 | <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> |
---|
880 | <dl class="function"> |
---|
881 | <dt id="get_mars_data.do_retrievement"> |
---|
882 | <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> |
---|
883 | <dd><p>Divides the complete retrieval period in smaller chunks and |
---|
884 | retrieves the data from MARS.</p> |
---|
885 | <table class="docutils field-list" frame="void" rules="none"> |
---|
886 | <col class="field-name" /> |
---|
887 | <col class="field-body" /> |
---|
888 | <tbody valign="top"> |
---|
889 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
890 | <li><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and |
---|
891 | command line.</li> |
---|
892 | <li><strong>server</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">ECMWFService</span></code>) – The server connection to ECMWF.</li> |
---|
893 | <li><strong>start</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">datetime</span></code>) – The start date of the retrieval.</li> |
---|
894 | <li><strong>end</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">datetime</span></code>) – The end date of the retrieval.</li> |
---|
895 | <li><strong>delta_t</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">datetime</span></code>) – Delta_t + 1 is the maximal time period of a single |
---|
896 | retrieval.</li> |
---|
897 | <li><strong>fluxes</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">boolean</span></code>, optional) – Decides if the flux parameters are to be retrieved or |
---|
898 | the rest of the parameter list. |
---|
899 | Default value is False.</li> |
---|
900 | </ul> |
---|
901 | </td> |
---|
902 | </tr> |
---|
903 | </tbody> |
---|
904 | </table> |
---|
905 | </dd></dl> |
---|
906 | |
---|
907 | <dl class="function"> |
---|
908 | <dt id="get_mars_data.get_mars_data"> |
---|
909 | <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> |
---|
910 | <dd><p>Retrieves the EC data needed for a FLEXPART simulation.</p> |
---|
911 | <p>Start and end dates for retrieval period is set. Retrievals |
---|
912 | are divided into smaller periods if necessary and datechunk parameter |
---|
913 | is set.</p> |
---|
914 | <table class="docutils field-list" frame="void" rules="none"> |
---|
915 | <col class="field-name" /> |
---|
916 | <col class="field-body" /> |
---|
917 | <tbody valign="top"> |
---|
918 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and |
---|
919 | command line.</td> |
---|
920 | </tr> |
---|
921 | </tbody> |
---|
922 | </table> |
---|
923 | </dd></dl> |
---|
924 | |
---|
925 | <dl class="function"> |
---|
926 | <dt id="get_mars_data.main"> |
---|
927 | <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> |
---|
928 | <dd><p>Controls the program to get data out of mars.</p> |
---|
929 | <p>This is done if it is called directly from command line. |
---|
930 | Then it also takes program call arguments and control file input.</p> |
---|
931 | </dd></dl> |
---|
932 | |
---|
933 | </div> |
---|
934 | <div class="section" id="module-prepare_flexpart"> |
---|
935 | <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> |
---|
936 | <dl class="function"> |
---|
937 | <dt id="prepare_flexpart.main"> |
---|
938 | <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> |
---|
939 | <dd><p>Controls the program to prepare flexpart input files from mars data.</p> |
---|
940 | <p>This is done if it is called directly from command line. |
---|
941 | Then it also takes program call arguments and control file input.</p> |
---|
942 | </dd></dl> |
---|
943 | |
---|
944 | <dl class="function"> |
---|
945 | <dt id="prepare_flexpart.prepare_flexpart"> |
---|
946 | <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> |
---|
947 | <dd><p>Converts the mars data into flexpart ready input files.</p> |
---|
948 | <p>Specific data fields are converted to a different grid and the flux |
---|
949 | data are going to be disaggregated. The data fields are collected by |
---|
950 | hour and stored in a file with a specific FLEXPART relevant naming |
---|
951 | convention.</p> |
---|
952 | <table class="docutils field-list" frame="void" rules="none"> |
---|
953 | <col class="field-name" /> |
---|
954 | <col class="field-body" /> |
---|
955 | <tbody valign="top"> |
---|
956 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
957 | <li><strong>ppid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">int</span></code>) – Contains the ppid number of the current ECMWF job. It will be None if |
---|
958 | the method was called within this module.</li> |
---|
959 | <li><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and |
---|
960 | command line.</li> |
---|
961 | </ul> |
---|
962 | </td> |
---|
963 | </tr> |
---|
964 | </tbody> |
---|
965 | </table> |
---|
966 | </dd></dl> |
---|
967 | |
---|
968 | </div> |
---|
969 | <div class="section" id="module-tools"> |
---|
970 | <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> |
---|
971 | <dl class="function"> |
---|
972 | <dt id="tools.clean_up"> |
---|
973 | <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> |
---|
974 | <dd><p>Remove all files from intermediate directory (inputdir).</p> |
---|
975 | <table class="docutils field-list" frame="void" rules="none"> |
---|
976 | <col class="field-name" /> |
---|
977 | <col class="field-body" /> |
---|
978 | <tbody valign="top"> |
---|
979 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and |
---|
980 | command line.</td> |
---|
981 | </tr> |
---|
982 | </tbody> |
---|
983 | </table> |
---|
984 | </dd></dl> |
---|
985 | |
---|
986 | <dl class="function"> |
---|
987 | <dt id="tools.get_cmdline_arguments"> |
---|
988 | <code class="descclassname">tools.</code><code class="descname">get_cmdline_arguments</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#get_cmdline_arguments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.get_cmdline_arguments" title="Permalink to this definition">¶</a></dt> |
---|
989 | <dd><p>Decomposes the command line arguments and assigns them to variables. |
---|
990 | Apply default values for non mentioned arguments.</p> |
---|
991 | <table class="docutils field-list" frame="void" rules="none"> |
---|
992 | <col class="field-name" /> |
---|
993 | <col class="field-body" /> |
---|
994 | <tbody valign="top"> |
---|
995 | <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> |
---|
996 | </tr> |
---|
997 | <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Namespace</span></code></td> |
---|
998 | </tr> |
---|
999 | </tbody> |
---|
1000 | </table> |
---|
1001 | </dd></dl> |
---|
1002 | |
---|
1003 | <dl class="function"> |
---|
1004 | <dt id="tools.get_list_as_string"> |
---|
1005 | <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> |
---|
1006 | <dd><p>Converts a list of arbitrary content into a single string.</p> |
---|
1007 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1008 | <col class="field-name" /> |
---|
1009 | <col class="field-body" /> |
---|
1010 | <tbody valign="top"> |
---|
1011 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1012 | <li><strong>list_obj</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code>) – A list with arbitrary content.</li> |
---|
1013 | <li><strong>concatenate_sign</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – A string which is used to concatenate the single |
---|
1014 | list elements. Default value is “, “.</li> |
---|
1015 | </ul> |
---|
1016 | </td> |
---|
1017 | </tr> |
---|
1018 | <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> |
---|
1019 | </td> |
---|
1020 | </tr> |
---|
1021 | <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">string</span></code></p> |
---|
1022 | </td> |
---|
1023 | </tr> |
---|
1024 | </tbody> |
---|
1025 | </table> |
---|
1026 | </dd></dl> |
---|
1027 | |
---|
1028 | <dl class="function"> |
---|
1029 | <dt id="tools.init128"> |
---|
1030 | <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> |
---|
1031 | <dd><p>Opens and reads the grib file with table 128 information.</p> |
---|
1032 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1033 | <col class="field-name" /> |
---|
1034 | <col class="field-body" /> |
---|
1035 | <tbody valign="top"> |
---|
1036 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filepath</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Path to file of ECMWF grib table number 128.</td> |
---|
1037 | </tr> |
---|
1038 | <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. |
---|
1039 | The key is the parameter number and the value is the |
---|
1040 | short name of the parameter.</td> |
---|
1041 | </tr> |
---|
1042 | <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dictionary</span></code></td> |
---|
1043 | </tr> |
---|
1044 | </tbody> |
---|
1045 | </table> |
---|
1046 | </dd></dl> |
---|
1047 | |
---|
1048 | <dl class="function"> |
---|
1049 | <dt id="tools.make_dir"> |
---|
1050 | <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> |
---|
1051 | <dd><p>Creates a directory and gives a warning if the directory |
---|
1052 | already exists. The program stops only if there is another problem.</p> |
---|
1053 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1054 | <col class="field-name" /> |
---|
1055 | <col class="field-body" /> |
---|
1056 | <tbody valign="top"> |
---|
1057 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>directory</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The directory name including the path which should be created.</td> |
---|
1058 | </tr> |
---|
1059 | </tbody> |
---|
1060 | </table> |
---|
1061 | </dd></dl> |
---|
1062 | |
---|
1063 | <dl class="function"> |
---|
1064 | <dt id="tools.my_error"> |
---|
1065 | <code class="descclassname">tools.</code><code class="descname">my_error</code><span class="sig-paren">(</span><em>users</em>, <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> |
---|
1066 | <dd><p>Prints a specified error message which can be passed to the function |
---|
1067 | before exiting the program.</p> |
---|
1068 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1069 | <col class="field-name" /> |
---|
1070 | <col class="field-body" /> |
---|
1071 | <tbody valign="top"> |
---|
1072 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
1073 | <li><strong>user</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Contains all email addresses which should be notified. |
---|
1074 | It might also contain just the ecmwf user name which wil trigger |
---|
1075 | mailing to the associated email address for this user.</li> |
---|
1076 | <li><strong>message</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Error message. Default value is “ERROR”.</li> |
---|
1077 | </ul> |
---|
1078 | </td> |
---|
1079 | </tr> |
---|
1080 | </tbody> |
---|
1081 | </table> |
---|
1082 | </dd></dl> |
---|
1083 | |
---|
1084 | <dl class="function"> |
---|
1085 | <dt id="tools.none_or_int"> |
---|
1086 | <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> |
---|
1087 | <dd><p>Converts the input string into pythons None-type if the string |
---|
1088 | contains string “None”. Otherwise it is converted to an integer value.</p> |
---|
1089 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1090 | <col class="field-name" /> |
---|
1091 | <col class="field-body" /> |
---|
1092 | <tbody valign="top"> |
---|
1093 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – String to be checked for the “None” word.</td> |
---|
1094 | </tr> |
---|
1095 | <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”, |
---|
1096 | then the python type None is returned. Otherwise the string is |
---|
1097 | converted into an integer value.</td> |
---|
1098 | </tr> |
---|
1099 | <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None or int(value)</td> |
---|
1100 | </tr> |
---|
1101 | </tbody> |
---|
1102 | </table> |
---|
1103 | </dd></dl> |
---|
1104 | |
---|
1105 | <dl class="function"> |
---|
1106 | <dt id="tools.none_or_str"> |
---|
1107 | <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> |
---|
1108 | <dd><p>Converts the input string into pythons None-type if the string |
---|
1109 | contains string “None”.</p> |
---|
1110 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1111 | <col class="field-name" /> |
---|
1112 | <col class="field-body" /> |
---|
1113 | <tbody valign="top"> |
---|
1114 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – String to be checked for the “None” word.</td> |
---|
1115 | </tr> |
---|
1116 | <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”, |
---|
1117 | then the python type None is returned. Otherwise the string itself.</td> |
---|
1118 | </tr> |
---|
1119 | <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None or value</td> |
---|
1120 | </tr> |
---|
1121 | </tbody> |
---|
1122 | </table> |
---|
1123 | </dd></dl> |
---|
1124 | |
---|
1125 | <dl class="function"> |
---|
1126 | <dt id="tools.normal_exit"> |
---|
1127 | <code class="descclassname">tools.</code><code class="descname">normal_exit</code><span class="sig-paren">(</span><em>users</em>, <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> |
---|
1128 | <dd><p>Prints a specific exit message which can be passed to the function.</p> |
---|
1129 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1130 | <col class="field-name" /> |
---|
1131 | <col class="field-body" /> |
---|
1132 | <tbody valign="top"> |
---|
1133 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
1134 | <li><strong>user</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Contains all email addresses which should be notified. |
---|
1135 | It might also contain just the ecmwf user name which wil trigger |
---|
1136 | mailing to the associated email address for this user.</li> |
---|
1137 | <li><strong>message</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Message for exiting program. Default value is “Done!”.</li> |
---|
1138 | </ul> |
---|
1139 | </td> |
---|
1140 | </tr> |
---|
1141 | </tbody> |
---|
1142 | </table> |
---|
1143 | </dd></dl> |
---|
1144 | |
---|
1145 | <dl class="function"> |
---|
1146 | <dt id="tools.product"> |
---|
1147 | <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> |
---|
1148 | <dd><p>This method combines the single characters of the passed arguments |
---|
1149 | with each other. So that each character of each argument value |
---|
1150 | will be combined with each character of the other arguments as a tuple.</p> |
---|
1151 | <div class="admonition note"> |
---|
1152 | <p class="first admonition-title">Note</p> |
---|
1153 | <p class="last">This method is taken from an example at the ECMWF wiki website. |
---|
1154 | <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> |
---|
1155 | </div> |
---|
1156 | <p class="rubric">Example</p> |
---|
1157 | <p>product(‘ABCD’, ‘xy’) –> Ax Ay Bx By Cx Cy Dx Dy</p> |
---|
1158 | <p>product(range(2), repeat = 3) –> 000 001 010 011 100 101 110 111</p> |
---|
1159 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1160 | <col class="field-name" /> |
---|
1161 | <col class="field-body" /> |
---|
1162 | <tbody valign="top"> |
---|
1163 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1164 | <li><strong>*args</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">tuple</span></code>) – Positional arguments (arbitrary number).</li> |
---|
1165 | <li><strong>**kwds</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">dictionary</span></code>) – Contains all the keyword arguments from *args.</li> |
---|
1166 | </ul> |
---|
1167 | </td> |
---|
1168 | </tr> |
---|
1169 | <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. |
---|
1170 | See example in description above.</p> |
---|
1171 | </td> |
---|
1172 | </tr> |
---|
1173 | <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> |
---|
1174 | </td> |
---|
1175 | </tr> |
---|
1176 | </tbody> |
---|
1177 | </table> |
---|
1178 | </dd></dl> |
---|
1179 | |
---|
1180 | <dl class="function"> |
---|
1181 | <dt id="tools.put_file_to_ecserver"> |
---|
1182 | <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> |
---|
1183 | <dd><p>Uses the ecaccess-file-put command to send a file to the ECMWF servers.</p> |
---|
1184 | <div class="admonition note"> |
---|
1185 | <p class="first admonition-title">Note</p> |
---|
1186 | <p class="last">The return value is just for testing reasons. It does not have |
---|
1187 | to be used from the calling function since the whole error handling |
---|
1188 | is done in here.</p> |
---|
1189 | </div> |
---|
1190 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1191 | <col class="field-name" /> |
---|
1192 | <col class="field-body" /> |
---|
1193 | <tbody valign="top"> |
---|
1194 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1195 | <li><strong>ecd</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The path were the file is stored.</li> |
---|
1196 | <li><strong>filename</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The name of the file to send to the ECMWF server.</li> |
---|
1197 | <li><strong>target</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The target queue where the file should be sent to.</li> |
---|
1198 | <li><strong>ecuid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The user id on ECMWF server.</li> |
---|
1199 | <li><strong>ecgid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The group id on ECMWF server.</li> |
---|
1200 | </ul> |
---|
1201 | </td> |
---|
1202 | </tr> |
---|
1203 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>rcode</strong> – Resulting code of command execution. If successful the string |
---|
1204 | will be empty.</p> |
---|
1205 | </td> |
---|
1206 | </tr> |
---|
1207 | <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">string</span></code></p> |
---|
1208 | </td> |
---|
1209 | </tr> |
---|
1210 | </tbody> |
---|
1211 | </table> |
---|
1212 | </dd></dl> |
---|
1213 | |
---|
1214 | <dl class="function"> |
---|
1215 | <dt id="tools.read_ecenv"> |
---|
1216 | <code class="descclassname">tools.</code><code class="descname">read_ecenv</code><span class="sig-paren">(</span><em>filename</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> |
---|
1217 | <dd><p>Reads the file into a dictionary where the key values are the parameter |
---|
1218 | names.</p> |
---|
1219 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1220 | <col class="field-name" /> |
---|
1221 | <col class="field-body" /> |
---|
1222 | <tbody valign="top"> |
---|
1223 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Path to file where the ECMWF environment parameters are stored.</td> |
---|
1224 | </tr> |
---|
1225 | <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 |
---|
1226 | and destination for ECMWF server environments.</td> |
---|
1227 | </tr> |
---|
1228 | <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dictionary</span></code></td> |
---|
1229 | </tr> |
---|
1230 | </tbody> |
---|
1231 | </table> |
---|
1232 | </dd></dl> |
---|
1233 | |
---|
1234 | <dl class="function"> |
---|
1235 | <dt id="tools.silent_remove"> |
---|
1236 | <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> |
---|
1237 | <dd><p>Remove file if it exists. |
---|
1238 | The function does not fail if the file does not exist.</p> |
---|
1239 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1240 | <col class="field-name" /> |
---|
1241 | <col class="field-body" /> |
---|
1242 | <tbody valign="top"> |
---|
1243 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The name of the file to be removed without notification.</td> |
---|
1244 | </tr> |
---|
1245 | </tbody> |
---|
1246 | </table> |
---|
1247 | </dd></dl> |
---|
1248 | |
---|
1249 | <dl class="function"> |
---|
1250 | <dt id="tools.submit_job_to_ecserver"> |
---|
1251 | <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> |
---|
1252 | <dd><p>Uses ecaccess-job-submit command to submit a job to the ECMWF server.</p> |
---|
1253 | <div class="admonition note"> |
---|
1254 | <p class="first admonition-title">Note</p> |
---|
1255 | <p class="last">The return value is just for testing reasons. It does not have |
---|
1256 | to be used from the calling function since the whole error handling |
---|
1257 | is done in here.</p> |
---|
1258 | </div> |
---|
1259 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1260 | <col class="field-name" /> |
---|
1261 | <col class="field-body" /> |
---|
1262 | <tbody valign="top"> |
---|
1263 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1264 | <li><strong>target</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The target where the file should be sent to, e.g. the queue.</li> |
---|
1265 | <li><strong>jobname</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The name of the jobfile to be submitted to the ECMWF server.</li> |
---|
1266 | </ul> |
---|
1267 | </td> |
---|
1268 | </tr> |
---|
1269 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>rcode</strong> – Resulting code of command execution. If successful the string |
---|
1270 | will contain an integer number, representing the id of the job |
---|
1271 | at the ecmwf server.</p> |
---|
1272 | </td> |
---|
1273 | </tr> |
---|
1274 | <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">string</span></code></p> |
---|
1275 | </td> |
---|
1276 | </tr> |
---|
1277 | </tbody> |
---|
1278 | </table> |
---|
1279 | </dd></dl> |
---|
1280 | |
---|
1281 | <dl class="function"> |
---|
1282 | <dt id="tools.to_param_id"> |
---|
1283 | <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> |
---|
1284 | <dd><p>Transform parameter names to parameter ids with ECMWF grib table 128.</p> |
---|
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 simple"> |
---|
1290 | <li><strong>pars</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Addpar argument from CONTROL file in the format of |
---|
1291 | parameter names instead of ids. The parameter short |
---|
1292 | names are sepearted with “/” and they are passed as |
---|
1293 | one single string.</li> |
---|
1294 | <li><strong>table</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">dictionary</span></code>) – Contains the ECMWF grib table 128 information. |
---|
1295 | The key is the parameter number and the value is the |
---|
1296 | short name of the parameter.</li> |
---|
1297 | </ul> |
---|
1298 | </td> |
---|
1299 | </tr> |
---|
1300 | <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 |
---|
1301 | parameter ids in the format of integer.</p> |
---|
1302 | </td> |
---|
1303 | </tr> |
---|
1304 | <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">integer</span></code></p> |
---|
1305 | </td> |
---|
1306 | </tr> |
---|
1307 | </tbody> |
---|
1308 | </table> |
---|
1309 | </dd></dl> |
---|
1310 | |
---|
1311 | </div> |
---|
1312 | <div class="section" id="module-disaggregation"> |
---|
1313 | <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> |
---|
1314 | <dl class="function"> |
---|
1315 | <dt id="disaggregation.IA3"> |
---|
1316 | <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> |
---|
1317 | <dd><p>Interpolation with a non-negative geometric mean based algorithm.</p> |
---|
1318 | <p>The original grid is reconstructed by adding two sampling points in each |
---|
1319 | data series interval. This subgrid is used to keep all information during |
---|
1320 | the interpolation within the associated interval. Additionally, an advanced |
---|
1321 | monotonicity filter is applied to improve the monotonicity properties of |
---|
1322 | the series.</p> |
---|
1323 | <div class="admonition note"> |
---|
1324 | <p class="first admonition-title">Note</p> |
---|
1325 | <p>Copyright 2017 |
---|
1326 | Sabine Hittmeir, Anne Philipp, Petra Seibert</p> |
---|
1327 | <p class="last">This work is licensed under the Creative Commons Attribution 4.0 |
---|
1328 | International License. To view a copy of this license, visit |
---|
1329 | <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 |
---|
1330 | Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.</p> |
---|
1331 | </div> |
---|
1332 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1333 | <col class="field-name" /> |
---|
1334 | <col class="field-body" /> |
---|
1335 | <tbody valign="top"> |
---|
1336 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>g</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">float</span></code>) – Complete data series that will be interpolated having |
---|
1337 | the dimension of the original raw series.</td> |
---|
1338 | </tr> |
---|
1339 | <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. |
---|
1340 | Its dimension is equal to the length of the input data series |
---|
1341 | times three.</td> |
---|
1342 | </tr> |
---|
1343 | <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><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">float</span></code></td> |
---|
1344 | </tr> |
---|
1345 | </tbody> |
---|
1346 | </table> |
---|
1347 | <p class="rubric">References</p> |
---|
1348 | <p>For more information see article: |
---|
1349 | Hittmeir, S.; Philipp, A.; Seibert, P. (2017): A conservative |
---|
1350 | interpolation scheme for extensive quantities with application to the |
---|
1351 | Lagrangian particle dispersion model FLEXPART., |
---|
1352 | Geoscientific Model Development</p> |
---|
1353 | </dd></dl> |
---|
1354 | |
---|
1355 | <dl class="function"> |
---|
1356 | <dt id="disaggregation.dapoly"> |
---|
1357 | <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> |
---|
1358 | <dd><p>Cubic polynomial interpolation of deaccumulated fluxes.</p> |
---|
1359 | <p>Interpolation of deaccumulated fluxes of an ECMWF model FG field |
---|
1360 | using a cubic polynomial solution which conserves the integrals |
---|
1361 | of the fluxes within each timespan. |
---|
1362 | Disaggregation is done for 4 accumluated timespans which |
---|
1363 | generates a new, disaggregated value which is output at the |
---|
1364 | central point of the 4 accumulation timespans. |
---|
1365 | This new point is used for linear interpolation of the complete |
---|
1366 | timeseries afterwards.</p> |
---|
1367 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1368 | <col class="field-name" /> |
---|
1369 | <col class="field-body" /> |
---|
1370 | <tbody valign="top"> |
---|
1371 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alist</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">array</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">float</span></code>) – List of 4 timespans as 2-dimensional, horizontal fields. |
---|
1372 | E.g. [[array_t1], [array_t2], [array_t3], [array_t4]]</td> |
---|
1373 | </tr> |
---|
1374 | <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> |
---|
1375 | </tr> |
---|
1376 | <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">float</span></code></td> |
---|
1377 | </tr> |
---|
1378 | </tbody> |
---|
1379 | </table> |
---|
1380 | <div class="admonition note"> |
---|
1381 | <p class="first admonition-title">Note</p> |
---|
1382 | <dl class="last docutils"> |
---|
1383 | <dt>March 2000 <span class="classifier-delimiter">:</span> <span class="classifier">P. JAMES</span></dt> |
---|
1384 | <dd>Original author</dd> |
---|
1385 | <dt>June 2003 <span class="classifier-delimiter">:</span> <span class="classifier">A. BECK</span></dt> |
---|
1386 | <dd>Adaptations</dd> |
---|
1387 | <dt>November 2015 <span class="classifier-delimiter">:</span> <span class="classifier">Leopold Haimberger (University of Vienna)</span></dt> |
---|
1388 | <dd>Migration from Fortran to Python</dd> |
---|
1389 | </dl> |
---|
1390 | </div> |
---|
1391 | </dd></dl> |
---|
1392 | |
---|
1393 | <dl class="function"> |
---|
1394 | <dt id="disaggregation.darain"> |
---|
1395 | <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> |
---|
1396 | <dd><p>Linear interpolation of deaccumulated fluxes.</p> |
---|
1397 | <p>Interpolation of deaccumulated fluxes of an ECMWF model FG rainfall |
---|
1398 | field using a modified linear solution which conserves the integrals |
---|
1399 | of the fluxes within each timespan. |
---|
1400 | Disaggregation is done for 4 accumluated timespans which generates |
---|
1401 | a new, disaggregated value which is output at the central point |
---|
1402 | of the 4 accumulation timespans. This new point is used for linear |
---|
1403 | interpolation of the complete timeseries afterwards.</p> |
---|
1404 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1405 | <col class="field-name" /> |
---|
1406 | <col class="field-body" /> |
---|
1407 | <tbody valign="top"> |
---|
1408 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alist</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">array</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">float</span></code>) – List of 4 timespans as 2-dimensional, horizontal fields. |
---|
1409 | E.g. [[array_t1], [array_t2], [array_t3], [array_t4]]</td> |
---|
1410 | </tr> |
---|
1411 | <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> |
---|
1412 | </tr> |
---|
1413 | <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">float</span></code></td> |
---|
1414 | </tr> |
---|
1415 | </tbody> |
---|
1416 | </table> |
---|
1417 | <div class="admonition note"> |
---|
1418 | <p class="first admonition-title">Note</p> |
---|
1419 | <dl class="last docutils"> |
---|
1420 | <dt>March 2000 <span class="classifier-delimiter">:</span> <span class="classifier">P. JAMES</span></dt> |
---|
1421 | <dd>Original author</dd> |
---|
1422 | <dt>June 2003 <span class="classifier-delimiter">:</span> <span class="classifier">A. BECK</span></dt> |
---|
1423 | <dd>Adaptations</dd> |
---|
1424 | <dt>November 2015 <span class="classifier-delimiter">:</span> <span class="classifier">Leopold Haimberger (University of Vienna)</span></dt> |
---|
1425 | <dd>Migration from Fortran to Python</dd> |
---|
1426 | </dl> |
---|
1427 | </div> |
---|
1428 | </dd></dl> |
---|
1429 | |
---|
1430 | </div> |
---|
1431 | </div> |
---|
1432 | </div> |
---|
1433 | |
---|
1434 | |
---|
1435 | </div> |
---|
1436 | |
---|
1437 | </div> |
---|
1438 | <footer> |
---|
1439 | |
---|
1440 | <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
---|
1441 | |
---|
1442 | <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> |
---|
1443 | |
---|
1444 | |
---|
1445 | <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> |
---|
1446 | |
---|
1447 | </div> |
---|
1448 | |
---|
1449 | |
---|
1450 | <hr/> |
---|
1451 | |
---|
1452 | <div role="contentinfo"> |
---|
1453 | <p> |
---|
1454 | © Copyright 2018, Anne Philipp and Leopold Haimberger. |
---|
1455 | |
---|
1456 | </p> |
---|
1457 | </div> |
---|
1458 | 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>. |
---|
1459 | |
---|
1460 | </footer> |
---|
1461 | |
---|
1462 | </div> |
---|
1463 | </div> |
---|
1464 | |
---|
1465 | </section> |
---|
1466 | |
---|
1467 | </div> |
---|
1468 | |
---|
1469 | |
---|
1470 | |
---|
1471 | |
---|
1472 | |
---|
1473 | <script type="text/javascript"> |
---|
1474 | var DOCUMENTATION_OPTIONS = { |
---|
1475 | URL_ROOT:'./', |
---|
1476 | VERSION:'7.1 alpha', |
---|
1477 | LANGUAGE:'None', |
---|
1478 | COLLAPSE_INDEX:false, |
---|
1479 | FILE_SUFFIX:'.html', |
---|
1480 | HAS_SOURCE: true, |
---|
1481 | SOURCELINK_SUFFIX: '.txt' |
---|
1482 | }; |
---|
1483 | </script> |
---|
1484 | <script type="text/javascript" src="_static/jquery.js"></script> |
---|
1485 | <script type="text/javascript" src="_static/underscore.js"></script> |
---|
1486 | <script type="text/javascript" src="_static/doctools.js"></script> |
---|
1487 | <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> |
---|
1488 | |
---|
1489 | |
---|
1490 | |
---|
1491 | <script type="text/javascript" src="_static/js/theme.js"></script> |
---|
1492 | |
---|
1493 | <script type="text/javascript"> |
---|
1494 | jQuery(function () { |
---|
1495 | SphinxRtdTheme.Navigation.enable(true); |
---|
1496 | }); |
---|
1497 | </script> |
---|
1498 | |
---|
1499 | </body> |
---|
1500 | </html> |
---|