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 — flex_extract 7.1.1 documentation</title> |
---|
12 | |
---|
13 | |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | <script type="text/javascript" src="../../_static/js/modernizr.min.js"></script> |
---|
21 | |
---|
22 | |
---|
23 | <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script> |
---|
24 | <script src="../../_static/jquery.js"></script> |
---|
25 | <script src="../../_static/underscore.js"></script> |
---|
26 | <script src="../../_static/doctools.js"></script> |
---|
27 | <script src="../../_static/language_data.js"></script> |
---|
28 | <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> |
---|
29 | |
---|
30 | <script type="text/javascript" src="../../_static/js/theme.js"></script> |
---|
31 | |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" /> |
---|
36 | <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> |
---|
37 | <link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" /> |
---|
38 | <link rel="stylesheet" href="../../_static/css/theme_overrides.css" type="text/css" /> |
---|
39 | <link rel="index" title="Index" href="../../genindex.html" /> |
---|
40 | <link rel="search" title="Search" href="../../search.html" /> |
---|
41 | <link rel="next" title="The job script job.ksh" href="jobscript.html" /> |
---|
42 | <link rel="prev" title="The Fortran makefile for calc_etadot" 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.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="../../ecmwf_data.html">ECMWF Data</a></li> |
---|
93 | <li class="toctree-l1"><a class="reference internal" href="../../installation.html">Installation</a></li> |
---|
94 | <li class="toctree-l1"><a class="reference internal" href="../../quick_start.html">Usage</a></li> |
---|
95 | <li class="toctree-l1 current"><a class="reference internal" href="../../documentation.html">Code-Level Documentation</a><ul class="current"> |
---|
96 | <li class="toctree-l2"><a class="reference internal" href="../overview.html">Overview</a></li> |
---|
97 | <li class="toctree-l2 current"><a class="reference internal" href="../input.html">Control & 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 job script <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 for <code class="docutils literal notranslate"><span class="pre">calc_etadot</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-parameters">Submission parameters</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 job script <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 wind</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> »</li> |
---|
172 | |
---|
173 | <li><a href="../../documentation.html">Code-Level Documentation</a> »</li> |
---|
174 | |
---|
175 | <li><a href="../input.html">Control & input data</a> »</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 wrapper script for the top-level Python script <code class="docutils literal notranslate"><span class="pre">submit.py</span></code>. |
---|
199 | The 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 (or 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, |
---|
201 | the command line parameters, and the so-called <code class="docutils literal notranslate"><span class="pre">ECMWF_ENV</span></code> file. Command line parameters will override parameters specified in the <code class="docutils literal notranslate"><span class="pre">CONTROL</span></code> file.</p> |
---|
202 | <p>Based on this 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 job script to an ECMWF server and retrieve the data there, and at the end sends the files to the local system.</p> |
---|
203 | <div class="section" id="submission-parameters"> |
---|
204 | <h2>Submission parameters<a class="headerlink" href="#submission-parameters" title="Permalink to this headline">¶</a></h2> |
---|
205 | <table class="docutils align-default" id="id1"> |
---|
206 | <caption><span class="caption-text">Parameters for submission</span><a class="headerlink" href="#id1" title="Permalink to this table">¶</a></caption> |
---|
207 | <colgroup> |
---|
208 | <col style="width: 12%" /> |
---|
209 | <col style="width: 9%" /> |
---|
210 | <col style="width: 9%" /> |
---|
211 | <col style="width: 9%" /> |
---|
212 | <col style="width: 27%" /> |
---|
213 | <col style="width: 33%" /> |
---|
214 | </colgroup> |
---|
215 | <thead> |
---|
216 | <tr class="row-odd"><th class="head"><p>PARAMETER</p></th> |
---|
217 | <th class="head"><p>Datatype</p></th> |
---|
218 | <th class="head"><p>Possible values</p></th> |
---|
219 | <th class="head"><p>Default</p></th> |
---|
220 | <th class="head"><p>Description</p></th> |
---|
221 | <th class="head"><p>Specifics / Conditions</p></th> |
---|
222 | </tr> |
---|
223 | </thead> |
---|
224 | <tbody> |
---|
225 | <tr class="row-even"><td><p>START_DATE</p></td> |
---|
226 | <td><p>String YYYYMMDD</p></td> |
---|
227 | <td><p>depends on dataset</p></td> |
---|
228 | <td><p>None</p></td> |
---|
229 | <td><p>The first day of the retrieval period.</p></td> |
---|
230 | <td><p>If END_DATE is set, START_DATE must be greater than END_DATE.</p></td> |
---|
231 | </tr> |
---|
232 | <tr class="row-odd"><td><p>END_DATE</p></td> |
---|
233 | <td><p>String YYYYMMDD</p></td> |
---|
234 | <td><p>depends on dataset</p></td> |
---|
235 | <td><p>None</p></td> |
---|
236 | <td><p>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></td> |
---|
237 | <td><p>Doesn’t have to be set. If set, it has to be greater or equal than START_DATE.</p></td> |
---|
238 | </tr> |
---|
239 | <tr class="row-even"><td><p>DATE_CHUNK</p></td> |
---|
240 | <td><p>Integer</p></td> |
---|
241 | <td><p>depends on resolution</p></td> |
---|
242 | <td><p>3</p></td> |
---|
243 | <td><p>Maximum number of days retrieved within one MARS request. </p></td> |
---|
244 | <td><p>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></td> |
---|
245 | </tr> |
---|
246 | <tr class="row-odd"><td><p>JOB_CHUNK</p></td> |
---|
247 | <td><p>Integer</p></td> |
---|
248 | <td><p>depends on resolution</p></td> |
---|
249 | <td><p>None</p></td> |
---|
250 | <td><p># of days to be retrieved within a single job</p></td> |
---|
251 | <td><p>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></td> |
---|
252 | </tr> |
---|
253 | <tr class="row-even"><td><p>CONTROLFILE</p></td> |
---|
254 | <td><p>String</p></td> |
---|
255 | <td><p>any CONTROL file</p></td> |
---|
256 | <td><p>CONTROL_EA5</p></td> |
---|
257 | <td><p>The file with all CONTROL parameters.</p></td> |
---|
258 | <td><p></p></td> |
---|
259 | </tr> |
---|
260 | <tr class="row-odd"><td><p>BASETIME</p></td> |
---|
261 | <td><p>Integer</p></td> |
---|
262 | <td><p>[0; 12]</p></td> |
---|
263 | <td><p>None</p></td> |
---|
264 | <td><p>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></td> |
---|
265 | <td><p>Can be set to 00 or 12 only.</p></td> |
---|
266 | </tr> |
---|
267 | <tr class="row-even"><td><p>STEP</p></td> |
---|
268 | <td><p>list of String [xx xx … xx] or as String [x/to/x]</p></td> |
---|
269 | <td><p>[00 - max available STEP in data set]</p></td> |
---|
270 | <td><p>None</p></td> |
---|
271 | <td><p>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></td> |
---|
272 | <td><p>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></td> |
---|
273 | </tr> |
---|
274 | <tr class="row-odd"><td><p>LEVELIST</p></td> |
---|
275 | <td><p>String [start/to/end]</p></td> |
---|
276 | <td><p>1/to/137; depends on dataset</p></td> |
---|
277 | <td><p>None</p></td> |
---|
278 | <td><p>List of vertical levels for MARS request. It can be a subset of levels but it has to include the maximum level (end).</p></td> |
---|
279 | <td><p>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></td> |
---|
280 | </tr> |
---|
281 | <tr class="row-even"><td><p>AREA</p></td> |
---|
282 | <td><p>Double [f/f/f/f]</p></td> |
---|
283 | <td><p>any float within lat and lon boundaries</p></td> |
---|
284 | <td><p>‘’</p></td> |
---|
285 | <td><p>Area defined as north/west/south/east</p></td> |
---|
286 | <td><p></p></td> |
---|
287 | </tr> |
---|
288 | <tr class="row-odd"><td><p>DEBUG</p></td> |
---|
289 | <td><p>Integer</p></td> |
---|
290 | <td><p>[0,1]</p></td> |
---|
291 | <td><p>0</p></td> |
---|
292 | <td><p>Debug mode - leave temporary files intact</p></td> |
---|
293 | <td><p>Usually only the final FLEXPART inputfiles are saved.</p></td> |
---|
294 | </tr> |
---|
295 | <tr class="row-even"><td><p>OPER</p></td> |
---|
296 | <td><p>Integer</p></td> |
---|
297 | <td><p>[0,1]</p></td> |
---|
298 | <td><p>0</p></td> |
---|
299 | <td><p>Operational mode - prepares dates with environment variables</p></td> |
---|
300 | <td><p></p></td> |
---|
301 | </tr> |
---|
302 | <tr class="row-odd"><td><p>REQUEST</p></td> |
---|
303 | <td><p>Integer</p></td> |
---|
304 | <td><p>[0,1,2]</p></td> |
---|
305 | <td><p>0</p></td> |
---|
306 | <td><p>List all mars requests with its specifc values in file mars_requests.dat</p></td> |
---|
307 | <td><p>Very useful for documentation or debugging reasons.</p></td> |
---|
308 | </tr> |
---|
309 | <tr class="row-even"><td><p>PUBLIC</p></td> |
---|
310 | <td><p>Integer</p></td> |
---|
311 | <td><p>[0,1]</p></td> |
---|
312 | <td><p>0</p></td> |
---|
313 | <td><p>Public mode - retrieves the public datasets</p></td> |
---|
314 | <td><p>IMPORTANT: This is necessary to select for each PUBLIC user!</p></td> |
---|
315 | </tr> |
---|
316 | <tr class="row-odd"><td><p>RRINT</p></td> |
---|
317 | <td><p>Integer</p></td> |
---|
318 | <td><p>[0,1]</p></td> |
---|
319 | <td><p>0</p></td> |
---|
320 | <td><p>Selection of old or new precipitation interpolation ; |
---|
321 | 0 - old method; |
---|
322 | 1 - new method (additional subgrid points)</p></td> |
---|
323 | <td><p>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></td> |
---|
324 | </tr> |
---|
325 | <tr class="row-even"><td><p>INPUTDIR</p></td> |
---|
326 | <td><p>String</p></td> |
---|
327 | <td><p>any path</p></td> |
---|
328 | <td><p>None</p></td> |
---|
329 | <td><p>Path to the temporary directory for the retrieval grib files and other processing files.</p></td> |
---|
330 | <td><p>The temporary directory will be created if it does not already exist.</p></td> |
---|
331 | </tr> |
---|
332 | <tr class="row-odd"><td><p>OUTPUTDIR</p></td> |
---|
333 | <td><p>String</p></td> |
---|
334 | <td><p>any path</p></td> |
---|
335 | <td><p>None</p></td> |
---|
336 | <td><p>Path to the final directory where the final FLEXPART ready input files are stored.</p></td> |
---|
337 | <td><p>The final output directory will be created if it does not already exist.</p></td> |
---|
338 | </tr> |
---|
339 | <tr class="row-even"><td><p>PPID</p></td> |
---|
340 | <td><p>Integer</p></td> |
---|
341 | <td><p></p></td> |
---|
342 | <td><p>None</p></td> |
---|
343 | <td><p>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></td> |
---|
344 | <td><p>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></td> |
---|
345 | </tr> |
---|
346 | <tr class="row-odd"><td><p>JOB_TEMPLATE</p></td> |
---|
347 | <td><p>String</p></td> |
---|
348 | <td><p>job.temp</p></td> |
---|
349 | <td><p>job.temp</p></td> |
---|
350 | <td><p>The job template file which are adapted to be submitted to the batch system on ECMWF server.</p></td> |
---|
351 | <td><p></p></td> |
---|
352 | </tr> |
---|
353 | <tr class="row-even"><td><p>QUEUE</p></td> |
---|
354 | <td><p>String</p></td> |
---|
355 | <td><p>ecgate, cca, ccb</p></td> |
---|
356 | <td><p>None</p></td> |
---|
357 | <td><p>The ECMWF server name for submission of the job script to the batch system.</p></td> |
---|
358 | <td><p></p></td> |
---|
359 | </tr> |
---|
360 | </tbody> |
---|
361 | </table> |
---|
362 | </div> |
---|
363 | <div class="section" id="content-of-run-sh"> |
---|
364 | <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> |
---|
365 | <div class="literal-block-wrapper docutils container" id="id2"> |
---|
366 | <div class="code-block-caption"><span class="caption-text">run.sh</span><a class="headerlink" href="#id2" title="Permalink to this code">¶</a></div> |
---|
367 | <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/bin/bash</span> |
---|
368 | <span class="c1">#</span> |
---|
369 | <span class="c1"># @Author: Anne Philipp</span> |
---|
370 | <span class="c1">#</span> |
---|
371 | <span class="c1"># @Date: October, 4 2018</span> |
---|
372 | <span class="c1">#</span> |
---|
373 | <span class="c1"># @Description: </span> |
---|
374 | <span class="c1"># This script defines the available command-line parameters</span> |
---|
375 | <span class="c1"># for running flex_extract and combines them for the execution </span> |
---|
376 | <span class="c1"># of the Python program. It also does some checks to </span> |
---|
377 | <span class="c1"># guarantee necessary parameters were set and consistent.</span> |
---|
378 | <span class="c1">#</span> |
---|
379 | <span class="c1"># @Licence:</span> |
---|
380 | <span class="c1"># (C) Copyright 2014-2019.</span> |
---|
381 | <span class="c1">#</span> |
---|
382 | <span class="c1"># SPDX-License-Identifier: CC-BY-4.0</span> |
---|
383 | <span class="c1">#</span> |
---|
384 | <span class="c1"># This work is licensed under the Creative Commons Attribution 4.0</span> |
---|
385 | <span class="c1"># International License. To view a copy of this license, visit</span> |
---|
386 | <span class="c1"># http://creativecommons.org/licenses/by/4.0/ or send a letter to</span> |
---|
387 | <span class="c1"># Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.</span> |
---|
388 | <span class="c1">#</span> |
---|
389 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
390 | <span class="c1"># AVAILABLE COMMANDLINE ARGUMENTS TO SET</span> |
---|
391 | <span class="c1"># </span> |
---|
392 | <span class="c1"># THE USER HAS TO SPECIFY THESE PARAMETERS:</span> |
---|
393 | |
---|
394 | <span class="nv">QUEUE</span><span class="o">=</span><span class="s1">'ecgate'</span> |
---|
395 | <span class="nv">START_DATE</span><span class="o">=</span>None |
---|
396 | <span class="nv">END_DATE</span><span class="o">=</span>None |
---|
397 | <span class="nv">DATE_CHUNK</span><span class="o">=</span>None |
---|
398 | <span class="nv">JOB_CHUNK</span><span class="o">=</span><span class="m">3</span> |
---|
399 | <span class="nv">BASETIME</span><span class="o">=</span>None |
---|
400 | <span class="nv">STEP</span><span class="o">=</span>None |
---|
401 | <span class="nv">LEVELIST</span><span class="o">=</span>None |
---|
402 | <span class="nv">AREA</span><span class="o">=</span>None |
---|
403 | <span class="nv">INPUTDIR</span><span class="o">=</span>None |
---|
404 | <span class="nv">OUTPUTDIR</span><span class="o">=</span>None |
---|
405 | <span class="nv">PP_ID</span><span class="o">=</span>None |
---|
406 | <span class="nv">JOB_TEMPLATE</span><span class="o">=</span><span class="s1">'job.temp'</span> |
---|
407 | <span class="nv">CONTROLFILE</span><span class="o">=</span><span class="s1">'CONTROL_EA5'</span> |
---|
408 | <span class="nv">DEBUG</span><span class="o">=</span><span class="m">0</span> |
---|
409 | <span class="nv">REQUEST</span><span class="o">=</span><span class="m">2</span> |
---|
410 | <span class="nv">PUBLIC</span><span class="o">=</span><span class="m">0</span> |
---|
411 | |
---|
412 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
413 | <span class="c1">#</span> |
---|
414 | <span class="c1"># AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!</span> |
---|
415 | <span class="c1">#</span> |
---|
416 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
417 | |
---|
418 | <span class="c1"># PATH TO SUBMISSION SCRIPT</span> |
---|
419 | <span class="nv">pyscript</span><span class="o">=</span>../Source/Python/submit.py |
---|
420 | |
---|
421 | <span class="c1"># INITIALIZE EMPTY PARAMETERLIST</span> |
---|
422 | <span class="nv">parameterlist</span><span class="o">=</span><span class="s2">""</span> |
---|
423 | |
---|
424 | <span class="c1"># CHECK FOR MORE PARAMETER </span> |
---|
425 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$START_DATE</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
426 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --start_date=</span><span class="nv">$START_DATE</span><span class="s2">"</span> |
---|
427 | <span class="k">fi</span> |
---|
428 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$END_DATE</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
429 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --end_date=</span><span class="nv">$END_DATE</span><span class="s2">"</span> |
---|
430 | <span class="k">fi</span> |
---|
431 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$DATE_CHUNK</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
432 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --date_chunk=</span><span class="nv">$DATE_CHUNK</span><span class="s2">"</span> |
---|
433 | <span class="k">fi</span> |
---|
434 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$JOB_CHUNK</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
435 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --job_chunk=</span><span class="nv">$JOB_CHUNK</span><span class="s2">"</span> |
---|
436 | <span class="k">fi</span> |
---|
437 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$BASETIME</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
438 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --basetime=</span><span class="nv">$BASETIME</span><span class="s2">"</span> |
---|
439 | <span class="k">fi</span> |
---|
440 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$STEP</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
441 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --step=</span><span class="nv">$STEP</span><span class="s2">"</span> |
---|
442 | <span class="k">fi</span> |
---|
443 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$LEVELIST</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
444 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --levelist=</span><span class="nv">$LEVELIST</span><span class="s2">"</span> |
---|
445 | <span class="k">fi</span> |
---|
446 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$AREA</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
447 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --area=</span><span class="nv">$AREA</span><span class="s2">"</span> |
---|
448 | <span class="k">fi</span> |
---|
449 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$INPUTDIR</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
450 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --inputdir=</span><span class="nv">$INPUTDIR</span><span class="s2">"</span> |
---|
451 | <span class="k">fi</span> |
---|
452 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$OUTPUTDIR</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
453 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --outputdir=</span><span class="nv">$OUTPUTDIR</span><span class="s2">"</span> |
---|
454 | <span class="k">fi</span> |
---|
455 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$PP_ID</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
456 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --ppid=</span><span class="nv">$PP_ID</span><span class="s2">"</span> |
---|
457 | <span class="k">fi</span> |
---|
458 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$JOB_TEMPLATE</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
459 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --job_template=</span><span class="nv">$JOB_TEMPLATE</span><span class="s2">"</span> |
---|
460 | <span class="k">fi</span> |
---|
461 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$QUEUE</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
462 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --queue=</span><span class="nv">$QUEUE</span><span class="s2">"</span> |
---|
463 | <span class="k">fi</span> |
---|
464 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$CONTROLFILE</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
465 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --controlfile=</span><span class="nv">$CONTROLFILE</span><span class="s2">"</span> |
---|
466 | <span class="k">fi</span> |
---|
467 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$DEBUG</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
468 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --debug=</span><span class="nv">$DEBUG</span><span class="s2">"</span> |
---|
469 | <span class="k">fi</span> |
---|
470 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$REQUEST</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
471 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --request=</span><span class="nv">$REQUEST</span><span class="s2">"</span> |
---|
472 | <span class="k">fi</span> |
---|
473 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$PUBLIC</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
474 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --public=</span><span class="nv">$PUBLIC</span><span class="s2">"</span> |
---|
475 | <span class="k">fi</span> |
---|
476 | |
---|
477 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
478 | <span class="c1"># CALL SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS</span> |
---|
479 | |
---|
480 | <span class="nv">$pyscript</span> <span class="nv">$parameterlist</span> |
---|
481 | </pre></div> |
---|
482 | </div> |
---|
483 | </div> |
---|
484 | </div> |
---|
485 | <div class="section" id="usage-of-submit-py-optional"> |
---|
486 | <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> |
---|
487 | <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 wrapper shell script <code class="docutils literal notranslate"><span class="pre">run.sh</span></code>. This top-level script is located in |
---|
488 | <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 |
---|
489 | we see again all possible command line parameters.</p> |
---|
490 | <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>submit.py --help |
---|
491 | |
---|
492 | usage: 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> |
---|
493 | <span class="o">[</span>--date_chunk DATE_CHUNK<span class="o">]</span> <span class="o">[</span>--job_chunk JOB_CHUNK<span class="o">]</span> |
---|
494 | <span class="o">[</span>--controlfile CONTROLFILE<span class="o">]</span> <span class="o">[</span>--basetime BASETIME<span class="o">]</span> |
---|
495 | <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> |
---|
496 | <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> |
---|
497 | <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> |
---|
498 | <span class="o">[</span>--outputdir OUTPUTDIR<span class="o">]</span> <span class="o">[</span>--ppid PPID<span class="o">]</span> |
---|
499 | <span class="o">[</span>--job_template JOB_TEMPLATE<span class="o">]</span> <span class="o">[</span>--queue QUEUE<span class="o">]</span> |
---|
500 | |
---|
501 | Retrieve FLEXPART input from ECMWF MARS archive |
---|
502 | |
---|
503 | optional arguments: |
---|
504 | -h, --help show this <span class="nb">help</span> message and <span class="nb">exit</span> |
---|
505 | --start_date START_DATE |
---|
506 | start date YYYYMMDD <span class="o">(</span>default: None<span class="o">)</span> |
---|
507 | --end_date END_DATE end_date YYYYMMDD <span class="o">(</span>default: None<span class="o">)</span> |
---|
508 | --date_chunk DATE_CHUNK |
---|
509 | <span class="c1"># of days to be retrieved at once (default: None)</span> |
---|
510 | --job_chunk JOB_CHUNK |
---|
511 | <span class="c1"># of days to be retrieved within a single job</span> |
---|
512 | <span class="o">(</span>default: None<span class="o">)</span> |
---|
513 | --controlfile CONTROLFILE |
---|
514 | The file with all CONTROL parameters. <span class="o">(</span>default: |
---|
515 | CONTROL_EA5<span class="o">)</span> |
---|
516 | --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> |
---|
517 | <span class="o">(</span>default: None<span class="o">)</span> |
---|
518 | --step STEP Forecast steps such as <span class="m">00</span>/to/48 <span class="o">(</span>default: None<span class="o">)</span> |
---|
519 | --levelist LEVELIST Vertical levels to be retrieved, e.g. <span class="m">30</span>/to/60 |
---|
520 | <span class="o">(</span>default: None<span class="o">)</span> |
---|
521 | --area AREA area defined as north/west/south/east <span class="o">(</span>default: None<span class="o">)</span> |
---|
522 | --debug DEBUG debug mode - leave temporary files intact <span class="o">(</span>default: |
---|
523 | None<span class="o">)</span> |
---|
524 | --oper OPER operational mode - prepares dates with environment |
---|
525 | variables <span class="o">(</span>default: None<span class="o">)</span> |
---|
526 | --request REQUEST list all mars requests in file mars_requests.dat |
---|
527 | <span class="o">(</span>default: None<span class="o">)</span> |
---|
528 | --public PUBLIC public mode - retrieves the public datasets <span class="o">(</span>default: |
---|
529 | None<span class="o">)</span> |
---|
530 | --rrint RRINT Selection of old or new precipitation interpolation: <span class="m">0</span> |
---|
531 | - old method <span class="m">1</span> - new method <span class="o">(</span>additional subgrid |
---|
532 | points<span class="o">)</span> <span class="o">(</span>default: None<span class="o">)</span> |
---|
533 | --inputdir INPUTDIR Path to the temporary directory <span class="k">for</span> the retrieval grib |
---|
534 | files and other processing files. <span class="o">(</span>default: None<span class="o">)</span> |
---|
535 | --outputdir OUTPUTDIR |
---|
536 | Path to the final directory where the final FLEXPART |
---|
537 | ready input files are stored. <span class="o">(</span>default: None<span class="o">)</span> |
---|
538 | --ppid PPID This is the specify parent process id of a single |
---|
539 | flex_extract run to identify the files. It is the |
---|
540 | second number in the GRIB files. <span class="o">(</span>default: None<span class="o">)</span> |
---|
541 | --job_template JOB_TEMPLATE |
---|
542 | The job template file which are adapted to be |
---|
543 | submitted to the batch system on ECMWF server. |
---|
544 | <span class="o">(</span>default: job.temp<span class="o">)</span> |
---|
545 | --queue QUEUE The ECMWF server name <span class="k">for</span> submission of the job script |
---|
546 | 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> |
---|
547 | <span class="o">(</span>default: None<span class="o">)</span> |
---|
548 | </pre></div> |
---|
549 | </div> |
---|
550 | <div class="toctree-wrapper compound"> |
---|
551 | </div> |
---|
552 | </div> |
---|
553 | </div> |
---|
554 | |
---|
555 | |
---|
556 | </div> |
---|
557 | |
---|
558 | </div> |
---|
559 | <footer> |
---|
560 | |
---|
561 | <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
---|
562 | |
---|
563 | <a href="jobscript.html" class="btn btn-neutral float-right" title="The job script job.ksh" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
---|
564 | |
---|
565 | |
---|
566 | <a href="fortran_makefile.html" class="btn btn-neutral float-left" title="The Fortran makefile for calc_etadot" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> |
---|
567 | |
---|
568 | </div> |
---|
569 | |
---|
570 | |
---|
571 | <hr/> |
---|
572 | |
---|
573 | <div role="contentinfo"> |
---|
574 | <p> |
---|
575 | © Copyright 2020, Anne Philipp, Leopold Haimberger and Petra Seibert |
---|
576 | |
---|
577 | </p> |
---|
578 | </div> |
---|
579 | 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>. |
---|
580 | |
---|
581 | </footer> |
---|
582 | |
---|
583 | </div> |
---|
584 | </div> |
---|
585 | |
---|
586 | </section> |
---|
587 | |
---|
588 | </div> |
---|
589 | |
---|
590 | |
---|
591 | |
---|
592 | <script type="text/javascript"> |
---|
593 | jQuery(function () { |
---|
594 | SphinxRtdTheme.Navigation.enable(true); |
---|
595 | }); |
---|
596 | </script> |
---|
597 | |
---|
598 | |
---|
599 | |
---|
600 | |
---|
601 | |
---|
602 | |
---|
603 | </body> |
---|
604 | </html> |
---|