source: flex_extract.git/Documentation/html/Documentation/Input/run.html @ 30f7911

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

reviewed installation section of online documentation; minor corrections

  • Property mode set to 100644
File size: 37.3 KB
Line 
1
2
3<!DOCTYPE html>
4<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
5<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
6<head>
7  <meta charset="utf-8">
8 
9  <meta name="viewport" content="width=device-width, initial-scale=1.0">
10 
11  <title>The executable Script - run.sh &mdash; flex_extract 7.1 alpha documentation</title>
12 
13
14 
15 
16 
17 
18
19 
20  <script type="text/javascript" src="../../_static/js/modernizr.min.js"></script>
21 
22   
23      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
24        <script type="text/javascript" src="../../_static/jquery.js"></script>
25        <script type="text/javascript" src="../../_static/underscore.js"></script>
26        <script type="text/javascript" src="../../_static/doctools.js"></script>
27        <script type="text/javascript" src="../../_static/language_data.js"></script>
28        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
29   
30    <script type="text/javascript" src="../../_static/js/theme.js"></script>
31
32   
33
34 
35  <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
36  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
37  <link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />
38  <link rel="stylesheet" href="../../_static/css/theme_overrides.css" type="text/css" />
39    <link rel="index" title="Index" href="../../genindex.html" />
40    <link rel="search" title="Search" href="../../search.html" />
41    <link rel="next" title="The Jobscript job.ksh" href="jobscript.html" />
42    <link rel="prev" title="The Fortran Makefile - CONVERT2" href="fortran_makefile.html" /> 
43</head>
44
45<body class="wy-body-for-nav">
46
47   
48  <div class="wy-grid-for-nav">
49   
50    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
51      <div class="wy-side-scroll">
52        <div class="wy-side-nav-search" >
53         
54
55         
56            <a href="../../index.html" class="icon icon-home"> flex_extract
57         
58
59         
60          </a>
61
62         
63           
64           
65              <div class="version">
66                7.1
67              </div>
68           
69         
70
71         
72<div role="search">
73  <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
74    <input type="text" name="q" placeholder="Search docs" />
75    <input type="hidden" name="check_keywords" value="yes" />
76    <input type="hidden" name="area" value="default" />
77  </form>
78</div>
79
80         
81        </div>
82
83        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
84         
85           
86           
87             
88           
89           
90              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
91<ul class="current">
92<li class="toctree-l1"><a class="reference internal" href="../../installation.html">Installation</a></li>
93<li class="toctree-l1"><a class="reference internal" href="../../quick_start.html">Quick Start</a></li>
94<li class="toctree-l1"><a class="reference internal" href="../../ecmwf_data.html">ECMWF Data</a></li>
95<li class="toctree-l1 current"><a class="reference internal" href="../../documentation.html">Documentation</a><ul class="current">
96<li class="toctree-l2"><a class="reference internal" href="../overview.html">Overview</a></li>
97<li class="toctree-l2 current"><a class="reference internal" href="../input.html">Control &amp; Input Data</a><ul class="current">
98<li class="toctree-l3"><a class="reference internal" href="setup.html">The Installation Script - <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code></a></li>
99<li class="toctree-l3"><a class="reference internal" href="compilejob.html">The Compilation Jobscript <code class="docutils literal notranslate"><span class="pre">compilejob.ksh</span></code></a></li>
100<li class="toctree-l3"><a class="reference internal" href="fortran_makefile.html">The Fortran Makefile - <code class="docutils literal notranslate"><span class="pre">CONVERT2</span></code></a></li>
101<li class="toctree-l3 current"><a class="current reference internal" href="#">The executable Script - <code class="docutils literal notranslate"><span class="pre">run.sh</span></code></a><ul>
102<li class="toctree-l4"><a class="reference internal" href="#submission-parameter">Submission Parameter</a></li>
103<li class="toctree-l4"><a class="reference internal" href="#content-of-run-sh">Content of <code class="docutils literal notranslate"><span class="pre">run.sh</span></code></a></li>
104<li class="toctree-l4"><a class="reference internal" href="#usage-of-submit-py-optional">Usage of <code class="docutils literal notranslate"><span class="pre">submit.py</span></code> (optional)</a></li>
105</ul>
106</li>
107<li class="toctree-l3"><a class="reference internal" href="jobscript.html">The Jobscript <code class="docutils literal notranslate"><span class="pre">job.ksh</span></code></a></li>
108<li class="toctree-l3"><a class="reference internal" href="control.html">The CONTROL file</a></li>
109<li class="toctree-l3"><a class="reference internal" href="control_params.html">The CONTROL parameters</a></li>
110<li class="toctree-l3"><a class="reference internal" href="examples.html">CONTROL file examples</a></li>
111<li class="toctree-l3"><a class="reference internal" href="changes.html">CONTROL file changes</a></li>
112<li class="toctree-l3"><a class="reference internal" href="ecmwf_env.html">ECMWF User Credential file <code class="docutils literal notranslate"><span class="pre">ECMWF_ENV</span></code></a></li>
113<li class="toctree-l3"><a class="reference internal" href="templates.html">Templates</a></li>
114</ul>
115</li>
116<li class="toctree-l2"><a class="reference internal" href="../output.html">Output Data</a></li>
117<li class="toctree-l2"><a class="reference internal" href="../disagg.html">Disaggregation of Flux Data</a></li>
118<li class="toctree-l2"><a class="reference internal" href="../vertco.html">Vertical Coordinate</a></li>
119<li class="toctree-l2"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
120</ul>
121</li>
122<li class="toctree-l1"><a class="reference internal" href="../../evaluation.html">Evaluation</a></li>
123<li class="toctree-l1"><a class="reference internal" href="../../dev_guide.html">Developer Guide</a></li>
124<li class="toctree-l1"><a class="reference internal" href="../../changelog.html">Changelog</a></li>
125<li class="toctree-l1"><a class="reference internal" href="../../support.html">Support</a></li>
126<li class="toctree-l1"><a class="reference internal" href="../../Support/faq.html">FAQ - Frequently asked questions</a></li>
127<li class="toctree-l1"><a class="reference internal" href="../../authors.html">Developer Team</a></li>
128</ul>
129
130           
131         
132        </div>
133      </div>
134    </nav>
135
136    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
137
138     
139      <nav class="wy-nav-top" aria-label="top navigation">
140       
141          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
142          <a href="../../index.html">flex_extract</a>
143       
144      </nav>
145
146
147      <div class="wy-nav-content">
148       
149        <div class="rst-content">
150       
151         
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167<div role="navigation" aria-label="breadcrumbs navigation">
168
169  <ul class="wy-breadcrumbs">
170   
171      <li><a href="../../index.html">Docs</a> &raquo;</li>
172       
173          <li><a href="../../documentation.html">Documentation</a> &raquo;</li>
174       
175          <li><a href="../input.html">Control &amp; Input Data</a> &raquo;</li>
176       
177      <li>The executable Script - <code class="docutils literal notranslate"><span class="pre">run.sh</span></code></li>
178   
179   
180      <li class="wy-breadcrumbs-aside">
181       
182           
183            <a href="../../_sources/Documentation/Input/run.rst.txt" rel="nofollow"> View page source</a>
184         
185       
186      </li>
187   
188  </ul>
189
190 
191  <hr/>
192</div>
193          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
194           <div itemprop="articleBody">
195           
196  <div class="section" id="the-executable-script-run-sh">
197<h1>The executable Script - <code class="docutils literal notranslate"><span class="pre">run.sh</span></code><a class="headerlink" href="#the-executable-script-run-sh" title="Permalink to this headline"></a></h1>
198<p>The execution of <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code> is done by the <code class="docutils literal notranslate"><span class="pre">run.sh</span></code> Shell script, which is a wrapping script for the top-level Python script <code class="docutils literal notranslate"><span class="pre">submit.py</span></code>.
199The Python script constitutes the entry point to ECMWF data retrievals with <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code> and controls the program flow.</p>
200<p><code class="docutils literal notranslate"><span class="pre">submit.py</span></code> has two (three) sources for input parameters with information about program flow and ECMWF data selection, the so-called <code class="docutils literal notranslate"><span class="pre">CONTROL</span></code> file,
201the command line parameters and the so-called <code class="docutils literal notranslate"><span class="pre">ECMWF_ENV</span></code> file. Whereby, the command line parameters will override the <code class="docutils literal notranslate"><span class="pre">CONTROL</span></code> file parameters.</p>
202<p>Based on these input information <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code> applies one of the application modes to either retrieve the ECMWF data via a Web API on a local maschine or submit a jobscript to ECMWF servers and retrieve the data there with sending the files to the local system eventually.</p>
203<p>PUT IN HERE A BLOCKDIAGRAM OF RAW PROGRAM FLOW</p>
204<div class="section" id="submission-parameter">
205<h2>Submission Parameter<a class="headerlink" href="#submission-parameter" title="Permalink to this headline"></a></h2>
206<table border="1" class="docutils" id="id1">
207<caption><span class="caption-text">Parameter for Submission</span><a class="headerlink" href="#id1" title="Permalink to this table"></a></caption>
208<colgroup>
209<col width="12%" />
210<col width="9%" />
211<col width="9%" />
212<col width="9%" />
213<col width="27%" />
214<col width="33%" />
215</colgroup>
216<thead valign="bottom">
217<tr class="row-odd"><th class="head">PARAMETER</th>
218<th class="head">Datatype</th>
219<th class="head">Possible values</th>
220<th class="head">Default</th>
221<th class="head">Description</th>
222<th class="head">Specifics / Conditions</th>
223</tr>
224</thead>
225<tbody valign="top">
226<tr class="row-even"><td><p class="first last">START_DATE</p>
227</td>
228<td><p class="first last">String YYYYMMDD</p>
229</td>
230<td><p class="first last">depends on dataset</p>
231</td>
232<td><p class="first last">None</p>
233</td>
234<td><p class="first last">The first day of the retrieval period.</p>
235</td>
236<td><p class="first last">If END_DATE is set, START_DATE must be greater than END_DATE.</p>
237</td>
238</tr>
239<tr class="row-odd"><td><p class="first last">END_DATE</p>
240</td>
241<td><p class="first last">String YYYYMMDD</p>
242</td>
243<td><p class="first last">depends on dataset</p>
244</td>
245<td><p class="first last">None</p>
246</td>
247<td><p class="first last">The last day of the retrieval period. For a one day retrieval it has to be the same date as START_DATE. If not set, it is automatically equal to START_DATE. </p>
248</td>
249<td><p class="first last">Doesn’t have to be set. If set, it has to be greater or equal than START_DATE.</p>
250</td>
251</tr>
252<tr class="row-even"><td><p class="first last">DATE_CHUNK</p>
253</td>
254<td><p class="first last">Integer</p>
255</td>
256<td><p class="first last">depends on resolution</p>
257</td>
258<td><p class="first last">3</p>
259</td>
260<td><p class="first last">Maximum number of days retrieved within one MARS request. </p>
261</td>
262<td><p class="first last">This number is limited due to maximum allowed memory and time limit for one MARS request. Be careful in changing this number.  It can be  larger for reanalysis data but may be too large for very high resolution retrievals.</p>
263</td>
264</tr>
265<tr class="row-odd"><td><p class="first last">JOB_CHUNK</p>
266</td>
267<td><p class="first last">Integer</p>
268</td>
269<td><p class="first last">depends on resolution</p>
270</td>
271<td><p class="first last">None</p>
272</td>
273<td><p class="first last"># of days to be retrieved within a single job</p>
274</td>
275<td><p class="first last">Can be selected to start the submit script once and let it automatically divide the time period in smaller job chunks. Might be very useful for example if one would like to retrieve one month with 0.1° space resolution and 1h time resolution. Then only 1 day per job is possible.</p>
276</td>
277</tr>
278<tr class="row-even"><td><p class="first last">CONTROLFILE</p>
279</td>
280<td><p class="first last">String</p>
281</td>
282<td><p class="first last">any CONTROL file</p>
283</td>
284<td><p class="first last">CONTROL_EA5</p>
285</td>
286<td><p class="first last">The file with all CONTROL parameters.</p>
287</td>
288<td><p class="first last"></p>
289</td>
290</tr>
291<tr class="row-odd"><td><p class="first last">BASETIME</p>
292</td>
293<td><p class="first last">Integer</p>
294</td>
295<td><p class="first last">[0; 12]</p>
296</td>
297<td><p class="first last">None</p>
298</td>
299<td><p class="first last">This parameter is intended for half-day retrievals. Only half a day will be retrieved starting from BASETIME going back 12 hours. E.g. 20180510 with a BASETIME = 00 would lead to a data retrieval of 20180509 12h until 20180510 00h.</p>
300</td>
301<td><p class="first last">Can be set to 00 or 12 only.</p>
302</td>
303</tr>
304<tr class="row-even"><td><p class="first last">STEP</p>
305</td>
306<td><p class="first last">list of String [xx xx … xx] or as String [x/to/x]</p>
307</td>
308<td><p class="first last">[00 - max available STEP in data set]</p>
309</td>
310<td><p class="first last">None</p>
311</td>
312<td><p class="first last">This is the forecast time step in hours for each corresponding field type (TYPE). Counting of the steps starts from the forecast times.  E.g. In Era-Interim, for forecasts at 3, 6, 9 UTC the STEPS 3,6 and 9 are used and the forecast TIME 00 UTC. </p>
313</td>
314<td><p class="first last">Has to have the same amount of values as in TYPE and TIME! For analysis (AN) fields the STEP has to be 00 always! It is more easily set in the CONTROL file. For pure forecast modes it might be set here as e.g. 0/to/36</p>
315</td>
316</tr>
317<tr class="row-odd"><td><p class="first last">LEVELIST</p>
318</td>
319<td><p class="first last">String [start/to/end]</p>
320</td>
321<td><p class="first last">1/to/137; depends on dataset</p>
322</td>
323<td><p class="first last">None</p>
324</td>
325<td><p class="first last">List of vertical levels for MARS request. It can be a subset of levels but it has to include the maximum level (end).</p>
326</td>
327<td><p class="first last">If full list of levels is needed and parameter LEVEL is set, the LEVELIST parameter is not needed. “end” has to be the maximum number of possible levels and has to be the same as in LEVEL, if specified.</p>
328</td>
329</tr>
330<tr class="row-even"><td><p class="first last">AREA</p>
331</td>
332<td><p class="first last">Double [f/f/f/f]</p>
333</td>
334<td><p class="first last">any float within lat and lon boundaries</p>
335</td>
336<td><p class="first last">‘’</p>
337</td>
338<td><p class="first last">Area defined as north/west/south/east</p>
339</td>
340<td><p class="first last"></p>
341</td>
342</tr>
343<tr class="row-odd"><td><p class="first last">DEBUG</p>
344</td>
345<td><p class="first last">Integer</p>
346</td>
347<td><p class="first last">[0,1]</p>
348</td>
349<td><p class="first last">0</p>
350</td>
351<td><p class="first last">Debug mode - leave temporary files intact</p>
352</td>
353<td><p class="first last">Usually only the final FLEXPART inputfiles are saved.</p>
354</td>
355</tr>
356<tr class="row-even"><td><p class="first last">OPER</p>
357</td>
358<td><p class="first last">Integer</p>
359</td>
360<td><p class="first last">[0,1]</p>
361</td>
362<td><p class="first last">0</p>
363</td>
364<td><p class="first last">Operational mode - prepares dates with            environment variables</p>
365</td>
366<td><p class="first last"></p>
367</td>
368</tr>
369<tr class="row-odd"><td><p class="first last">REQUEST</p>
370</td>
371<td><p class="first last">Integer</p>
372</td>
373<td><p class="first last">[0,1,2]</p>
374</td>
375<td><p class="first last">0</p>
376</td>
377<td><p class="first last">List all mars requests with its specifc values in file mars_requests.dat</p>
378</td>
379<td><p class="first last">Very useful for documentation or debugging reasons.</p>
380</td>
381</tr>
382<tr class="row-even"><td><p class="first last">PUBLIC</p>
383</td>
384<td><p class="first last">Integer</p>
385</td>
386<td><p class="first last">[0,1]</p>
387</td>
388<td><p class="first last">0</p>
389</td>
390<td><p class="first last">Public mode - retrieves the public datasets</p>
391</td>
392<td><p class="first last">IMPORTANT: This is necessary to select for each PUBLIC user!</p>
393</td>
394</tr>
395<tr class="row-odd"><td><p class="first last">RRINT</p>
396</td>
397<td><p class="first last">Integer</p>
398</td>
399<td><p class="first last">[0,1]</p>
400</td>
401<td><p class="first last">0</p>
402</td>
403<td><p class="first last">Selection of old or new precipitation interpolation ;
404                        0 - old method;
405                        1 - new method                                                         (additional subgrid points)</p>
406</td>
407<td><p class="first last">IMPORTANT: If this new method is used, each single GRIB file will contain 3 fields for the large scale and 3 fields for the convective precipitation. They can be distinguished by the “stepRange” keyword in the GribMessages. StepRange = 0 : original time step; stepRange = 1 : first subgrid point; stepRange = 2 : second subgrid point </p>
408</td>
409</tr>
410<tr class="row-even"><td><p class="first last">INPUTDIR</p>
411</td>
412<td><p class="first last">String</p>
413</td>
414<td><p class="first last">any path</p>
415</td>
416<td><p class="first last">None</p>
417</td>
418<td><p class="first last">Path to the temporary directory for the retrieval grib files and other processing files.</p>
419</td>
420<td><p class="first last">The temporary directory will be created if it does not already exist.</p>
421</td>
422</tr>
423<tr class="row-odd"><td><p class="first last">OUTPUTDIR</p>
424</td>
425<td><p class="first last">String</p>
426</td>
427<td><p class="first last">any path</p>
428</td>
429<td><p class="first last">None</p>
430</td>
431<td><p class="first last">Path to the final directory where the final FLEXPART ready input files are stored.</p>
432</td>
433<td><p class="first last">The final output directory will be created if it does not already exist.</p>
434</td>
435</tr>
436<tr class="row-even"><td><p class="first last">PPID</p>
437</td>
438<td><p class="first last">Integer</p>
439</td>
440<td><p class="first last"></p>
441</td>
442<td><p class="first last">None</p>
443</td>
444<td><p class="first last">This is the specify parent process id of a single flex_extract run to identify the files. It is the second number in the GRIB files.</p>
445</td>
446<td><p class="first last">This is usually only necessary if the GRIB data were retrieved and a rerun of prepare_flexpart has to be done. Then ppid is used to select the files. </p>
447</td>
448</tr>
449<tr class="row-odd"><td><p class="first last">JOB_TEMPLATE</p>
450</td>
451<td><p class="first last">String</p>
452</td>
453<td><p class="first last">job.temp</p>
454</td>
455<td><p class="first last">job.temp</p>
456</td>
457<td><p class="first last">The job template file which are adapted to be submitted to the batch system on ECMWF server.</p>
458</td>
459<td><p class="first last"></p>
460</td>
461</tr>
462<tr class="row-even"><td><p class="first last">QUEUE</p>
463</td>
464<td><p class="first last">String</p>
465</td>
466<td><p class="first last">ecgate, cca, ccb</p>
467</td>
468<td><p class="first last">None</p>
469</td>
470<td><p class="first last">The ECMWF server name for submission of the job script to the batch system.</p>
471</td>
472<td><p class="first last"></p>
473</td>
474</tr>
475</tbody>
476</table>
477</div>
478<div class="section" id="content-of-run-sh">
479<h2>Content of <code class="docutils literal notranslate"><span class="pre">run.sh</span></code><a class="headerlink" href="#content-of-run-sh" title="Permalink to this headline"></a></h2>
480<div class="literal-block-wrapper docutils container" id="id2">
481<div class="code-block-caption"><span class="caption-text">run.sh</span><a class="headerlink" href="#id2" title="Permalink to this code"></a></div>
482<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/bin/bash</span>
483<span class="c1">#</span>
484<span class="c1"># @Author: Anne Philipp</span>
485<span class="c1">#</span>
486<span class="c1"># @Date: October, 4 2018</span>
487<span class="c1">#</span>
488<span class="c1"># @Description: </span>
489<span class="c1">#</span>
490
491
492<span class="c1"># -----------------------------------------------------------------</span>
493<span class="c1"># AVAILABLE COMMANDLINE ARGUMENTS TO SET</span>
494<span class="c1"># </span>
495<span class="c1"># THE USER HAS TO SPECIFY THESE PARAMETERS:</span>
496
497<span class="nv">QUEUE</span><span class="o">=</span><span class="s1">&#39;ecgate&#39;</span>
498<span class="nv">START_DATE</span><span class="o">=</span>None
499<span class="nv">END_DATE</span><span class="o">=</span>None
500<span class="nv">DATE_CHUNK</span><span class="o">=</span>None
501<span class="nv">JOB_CHUNK</span><span class="o">=</span><span class="m">3</span>
502<span class="nv">BASETIME</span><span class="o">=</span>None
503<span class="nv">STEP</span><span class="o">=</span>None
504<span class="nv">LEVELIST</span><span class="o">=</span>None
505<span class="nv">AREA</span><span class="o">=</span>None
506<span class="nv">INPUTDIR</span><span class="o">=</span>None
507<span class="nv">OUTPUTDIR</span><span class="o">=</span>None
508<span class="nv">PP_ID</span><span class="o">=</span>None
509<span class="nv">JOB_TEMPLATE</span><span class="o">=</span><span class="s1">&#39;job.temp&#39;</span> 
510<span class="nv">CONTROLFILE</span><span class="o">=</span><span class="s1">&#39;CONTROL_OD.OPER.FC.gauss.global&#39;</span> 
511<span class="nv">DEBUG</span><span class="o">=</span><span class="m">0</span>
512<span class="nv">REQUEST</span><span class="o">=</span><span class="m">2</span>
513<span class="nv">PUBLIC</span><span class="o">=</span><span class="m">0</span>
514
515<span class="c1"># -----------------------------------------------------------------</span>
516<span class="c1">#</span>
517<span class="c1"># AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!</span>
518<span class="c1">#</span>
519<span class="c1"># -----------------------------------------------------------------</span>
520
521<span class="c1"># PATH TO SUBMISSION SCRIPT</span>
522<span class="nv">pyscript</span><span class="o">=</span>../Source/Python/submit.py
523
524<span class="c1"># INITIALIZE EMPTY PARAMETERLIST</span>
525<span class="nv">parameterlist</span><span class="o">=</span><span class="s2">&quot;&quot;</span>
526
527<span class="c1"># CHECK FOR MORE PARAMETER </span>
528<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$START_DATE</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
529  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --start_date=</span><span class="nv">$START_DATE</span><span class="s2">&quot;</span>
530<span class="k">fi</span>
531<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$END_DATE</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
532  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --end_date=</span><span class="nv">$END_DATE</span><span class="s2">&quot;</span>
533<span class="k">fi</span>
534<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$DATE_CHUNK</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
535  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --date_chunk=</span><span class="nv">$DATE_CHUNK</span><span class="s2">&quot;</span>
536<span class="k">fi</span>
537<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$JOB_CHUNK</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
538  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --job_chunk=</span><span class="nv">$JOB_CHUNK</span><span class="s2">&quot;</span>
539<span class="k">fi</span>
540<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$BASETIME</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
541  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --basetime=</span><span class="nv">$BASETIME</span><span class="s2">&quot;</span>
542<span class="k">fi</span>
543<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$STEP</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
544  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --step=</span><span class="nv">$STEP</span><span class="s2">&quot;</span>
545<span class="k">fi</span>
546<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$LEVELIST</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
547  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --levelist=</span><span class="nv">$LEVELIST</span><span class="s2">&quot;</span>
548<span class="k">fi</span>
549<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$AREA</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
550  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --area=</span><span class="nv">$AREA</span><span class="s2">&quot;</span>
551<span class="k">fi</span>
552<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$INPUTDIR</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
553  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --inputdir=</span><span class="nv">$INPUTDIR</span><span class="s2">&quot;</span>
554<span class="k">fi</span>
555<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$OUTPUTDIR</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
556  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --outputdir=</span><span class="nv">$OUTPUTDIR</span><span class="s2">&quot;</span>
557<span class="k">fi</span>
558<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$PP_ID</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
559  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --ppid=</span><span class="nv">$PP_ID</span><span class="s2">&quot;</span>
560<span class="k">fi</span>
561<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$JOB_TEMPLATE</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
562  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --job_template=</span><span class="nv">$JOB_TEMPLATE</span><span class="s2">&quot;</span>
563<span class="k">fi</span>
564<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$QUEUE</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
565  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --queue=</span><span class="nv">$QUEUE</span><span class="s2">&quot;</span>
566<span class="k">fi</span>
567<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$CONTROLFILE</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
568  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --controlfile=</span><span class="nv">$CONTROLFILE</span><span class="s2">&quot;</span>
569<span class="k">fi</span>
570<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$DEBUG</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
571  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --debug=</span><span class="nv">$DEBUG</span><span class="s2">&quot;</span>
572<span class="k">fi</span>
573<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$REQUEST</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
574  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --request=</span><span class="nv">$REQUEST</span><span class="s2">&quot;</span>
575<span class="k">fi</span>
576<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$PUBLIC</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
577  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --public=</span><span class="nv">$PUBLIC</span><span class="s2">&quot;</span>
578<span class="k">fi</span>
579
580<span class="c1"># -----------------------------------------------------------------</span>
581<span class="c1"># CALL SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS</span>
582
583<span class="nv">$pyscript</span> <span class="nv">$parameterlist</span>
584</pre></div>
585</div>
586</div>
587</div>
588<div class="section" id="usage-of-submit-py-optional">
589<span id="ref-install-script"></span><h2>Usage of <code class="docutils literal notranslate"><span class="pre">submit.py</span></code> (optional)<a class="headerlink" href="#usage-of-submit-py-optional" title="Permalink to this headline"></a></h2>
590<p>It is also possible to start <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code> directly from command line by using the <code class="docutils literal notranslate"><span class="pre">submit.py</span></code> script instead of the wrapping Shell script <code class="docutils literal notranslate"><span class="pre">run.sh</span></code>.  This top-level script is located in
591<code class="docutils literal notranslate"><span class="pre">flex_extract_vX.X/source/python</span></code> and is executable. With the <code class="docutils literal notranslate"><span class="pre">help</span></code> parameter we see again all possible
592command line parameter.</p>
593<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>submit.py --help
594
595usage: submit.py <span class="o">[</span>-h<span class="o">]</span> <span class="o">[</span>--start_date START_DATE<span class="o">]</span> <span class="o">[</span>--end_date END_DATE<span class="o">]</span>
596              <span class="o">[</span>--date_chunk DATE_CHUNK<span class="o">]</span> <span class="o">[</span>--job_chunk JOB_CHUNK<span class="o">]</span>
597              <span class="o">[</span>--controlfile CONTROLFILE<span class="o">]</span> <span class="o">[</span>--basetime BASETIME<span class="o">]</span>
598              <span class="o">[</span>--step STEP<span class="o">]</span> <span class="o">[</span>--levelist LEVELIST<span class="o">]</span> <span class="o">[</span>--area AREA<span class="o">]</span>
599              <span class="o">[</span>--debug DEBUG<span class="o">]</span> <span class="o">[</span>--oper OPER<span class="o">]</span> <span class="o">[</span>--request REQUEST<span class="o">]</span>
600              <span class="o">[</span>--public PUBLIC<span class="o">]</span> <span class="o">[</span>--rrint RRINT<span class="o">]</span> <span class="o">[</span>--inputdir INPUTDIR<span class="o">]</span>
601              <span class="o">[</span>--outputdir OUTPUTDIR<span class="o">]</span> <span class="o">[</span>--ppid PPID<span class="o">]</span>
602              <span class="o">[</span>--job_template JOB_TEMPLATE<span class="o">]</span> <span class="o">[</span>--queue QUEUE<span class="o">]</span>
603
604 Retrieve FLEXPART input from ECMWF MARS archive
605
606 optional arguments:
607   -h, --help            show this <span class="nb">help</span> message and <span class="nb">exit</span>
608   --start_date START_DATE
609                         start date YYYYMMDD <span class="o">(</span>default: None<span class="o">)</span>
610   --end_date END_DATE   end_date YYYYMMDD <span class="o">(</span>default: None<span class="o">)</span>
611   --date_chunk DATE_CHUNK
612                         <span class="c1"># of days to be retrieved at once (default: None)</span>
613   --job_chunk JOB_CHUNK
614                         <span class="c1"># of days to be retrieved within a single job</span>
615                         <span class="o">(</span>default: None<span class="o">)</span>
616   --controlfile CONTROLFILE
617                         The file with all CONTROL parameters. <span class="o">(</span>default:
618                         CONTROL_EA5<span class="o">)</span>
619   --basetime BASETIME   base such as <span class="m">0</span> or <span class="m">12</span> <span class="o">(</span><span class="k">for</span> half day retrievals<span class="o">)</span>
620                         <span class="o">(</span>default: None<span class="o">)</span>
621   --step STEP           Forecast steps such as <span class="m">00</span>/to/48 <span class="o">(</span>default: None<span class="o">)</span>
622   --levelist LEVELIST   Vertical levels to be retrieved, e.g. <span class="m">30</span>/to/60
623                         <span class="o">(</span>default: None<span class="o">)</span>
624   --area AREA           area defined as north/west/south/east <span class="o">(</span>default: None<span class="o">)</span>
625   --debug DEBUG         debug mode - leave temporary files intact <span class="o">(</span>default:
626                         None<span class="o">)</span>
627   --oper OPER           operational mode - prepares dates with environment
628                         variables <span class="o">(</span>default: None<span class="o">)</span>
629   --request REQUEST     list all mars requests in file mars_requests.dat
630                         <span class="o">(</span>default: None<span class="o">)</span>
631   --public PUBLIC       public mode - retrieves the public datasets <span class="o">(</span>default:
632                         None<span class="o">)</span>
633   --rrint RRINT         Selection of old or new precipitation interpolation: <span class="m">0</span>
634                         - old method <span class="m">1</span> - new method <span class="o">(</span>additional subgrid
635                         points<span class="o">)</span> <span class="o">(</span>default: None<span class="o">)</span>
636   --inputdir INPUTDIR   Path to the temporary directory <span class="k">for</span> the retrieval grib
637                         files and other processing files. <span class="o">(</span>default: None<span class="o">)</span>
638   --outputdir OUTPUTDIR
639                         Path to the final directory where the final FLEXPART
640                         ready input files are stored. <span class="o">(</span>default: None<span class="o">)</span>
641   --ppid PPID           This is the specify parent process id of a single
642                         flex_extract run to identify the files. It is the
643                         second number in the GRIB files. <span class="o">(</span>default: None<span class="o">)</span>
644   --job_template JOB_TEMPLATE
645                         The job template file which are adapted to be
646                         submitted to the batch system on ECMWF server.
647                         <span class="o">(</span>default: job.temp<span class="o">)</span>
648   --queue QUEUE         The ECMWF server name <span class="k">for</span> submission of the job script
649                         to the batch system <span class="o">(</span>e.g. ecgate <span class="p">|</span> cca <span class="p">|</span> ccb<span class="o">)</span>
650                         <span class="o">(</span>default: None<span class="o">)</span>
651</pre></div>
652</div>
653<div class="toctree-wrapper compound">
654</div>
655</div>
656</div>
657
658
659           </div>
660           
661          </div>
662          <footer>
663 
664    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
665     
666        <a href="jobscript.html" class="btn btn-neutral float-right" title="The Jobscript job.ksh" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
667     
668     
669        <a href="fortran_makefile.html" class="btn btn-neutral float-left" title="The Fortran Makefile - CONVERT2" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
670     
671    </div>
672 
673
674  <hr/>
675
676  <div role="contentinfo">
677    <p>
678        &copy; Copyright 2019, Anne Philipp and Leopold Haimberger
679
680    </p>
681  </div>
682  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>.
683
684</footer>
685
686        </div>
687      </div>
688
689    </section>
690
691  </div>
692 
693
694
695  <script type="text/javascript">
696      jQuery(function () {
697          SphinxRtdTheme.Navigation.enable(true);
698      });
699  </script>
700
701 
702 
703   
704   
705
706</body>
707</html>
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG