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 Installation Script - setup.sh — 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 Compilation Jobscript compilejob.ksh" href="compilejob.html" /> |
---|
42 | <link rel="prev" title="Control & Input Data" href="../input.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 & Input Data</a><ul class="current"> |
---|
98 | <li class="toctree-l3 current"><a class="current reference internal" href="#">The Installation Script - <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code></a><ul> |
---|
99 | <li class="toctree-l4"><a class="reference internal" href="#installation-parameter">Installation Parameter</a></li> |
---|
100 | <li class="toctree-l4"><a class="reference internal" href="#content-of-setup-sh">Content of <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code></a></li> |
---|
101 | <li class="toctree-l4"><a class="reference internal" href="#usage-of-install-py-optional">Usage of <code class="docutils literal notranslate"><span class="pre">install.py</span></code> (optional)</a></li> |
---|
102 | </ul> |
---|
103 | </li> |
---|
104 | <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> |
---|
105 | <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> |
---|
106 | <li class="toctree-l3"><a class="reference internal" href="run.html">The executable Script - <code class="docutils literal notranslate"><span class="pre">run.sh</span></code></a></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> »</li> |
---|
172 | |
---|
173 | <li><a href="../../documentation.html">Documentation</a> »</li> |
---|
174 | |
---|
175 | <li><a href="../input.html">Control & Input Data</a> »</li> |
---|
176 | |
---|
177 | <li>The Installation Script - <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code></li> |
---|
178 | |
---|
179 | |
---|
180 | <li class="wy-breadcrumbs-aside"> |
---|
181 | |
---|
182 | |
---|
183 | <a href="../../_sources/Documentation/Input/setup.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-installation-script-setup-sh"> |
---|
197 | <h1>The Installation Script - <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code><a class="headerlink" href="#the-installation-script-setup-sh" title="Permalink to this headline">¶</a></h1> |
---|
198 | <p>The installation of <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code> is done by the Shell script <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code> which is located in the root directory of <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code>. |
---|
199 | It calls the top-level Python script <code class="docutils literal notranslate"><span class="pre">install.py</span></code> which does all necessary operations to prepare the selected application environment. This includes:</p> |
---|
200 | <ul class="simple"> |
---|
201 | <li>preparing the file <code class="docutils literal notranslate"><span class="pre">ECMWF_ENV</span></code> with the user credentials for member state access to ECMWF servers (in <strong>remote</strong> and <strong>gateway</strong> mode)</li> |
---|
202 | <li>preparation of a compilation Korn-shell script (in <strong>remote</strong> and <strong>gateway</strong> mode)</li> |
---|
203 | <li>preparation of a job template with user credentials (in <strong>remote</strong> and <strong>gateway</strong> mode)</li> |
---|
204 | <li>create a tar-ball of all necessary files</li> |
---|
205 | <li>copying tar-ball to target location (depending on application mode and installation path)</li> |
---|
206 | <li>submit compilation script to batch queue at ECMWF servers (in <strong>remote</strong> and <strong>gateway</strong> mode) or just untar tar-ball at target location (<strong>local mode</strong>)</li> |
---|
207 | <li>compilation of the FORTRAN90 program <code class="docutils literal notranslate"><span class="pre">CONVERT2</span></code></li> |
---|
208 | </ul> |
---|
209 | <p>The Python installation script <code class="docutils literal notranslate"><span class="pre">install.py</span></code> has a couple of command line arguments which are defined in <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code> in the section labelled with “<em>AVAILABLE COMMANDLINE ARGUMENTS TO SET</em>”. The user has to adapt these parameters for his personal use. The parameters are listed and described in <a class="reference internal" href="#ref-instparams"><span class="std std-ref">Installation Parameter</span></a>. The script also does some checks to guarantee necessary parameters were set.</p> |
---|
210 | <p>After the installation process, some tests can be conducted. They are described in section <a class="reference internal" href="../../installation.html#ref-testinstallfe"><span class="std std-ref">Test installation</span></a>.</p> |
---|
211 | <p>The following diagram sketches the involved files and scripts in the installation process:</p> |
---|
212 | <div><img height="440" id="ref-install-blockdiag" src="../../_images/blockdiag-f0a58657deb31f0c134ffed39d9be96f0d278617.png" width="1600" /></div><div class="figure" id="id1"> |
---|
213 | <div><img height="120" src="../../_images/blockdiag-c5183a0da960384d172e76fcbb0cc6765f0b1945.png" width="832" /></div><p class="caption"><span class="caption-text">Diagram of data flow during the installation process. The trapezoids are input files with the light blue area being the template files. The edge-rounded, orange boxes are the executable files which start the installation process and reads the input files. The rectangular, green boxes are the output files. The light green files are files which are only needed in the remota and gateway mode.</span><a class="headerlink" href="#id1" title="Permalink to this image">¶</a></p> |
---|
214 | </div> |
---|
215 | <div class="section" id="installation-parameter"> |
---|
216 | <span id="ref-instparams"></span><h2>Installation Parameter<a class="headerlink" href="#installation-parameter" title="Permalink to this headline">¶</a></h2> |
---|
217 | <table border="1" class="docutils" id="id2"> |
---|
218 | <caption><span class="caption-text">Parameter for Installation</span><a class="headerlink" href="#id2" title="Permalink to this table">¶</a></caption> |
---|
219 | <colgroup> |
---|
220 | <col width="10%" /> |
---|
221 | <col width="5%" /> |
---|
222 | <col width="15%" /> |
---|
223 | <col width="11%" /> |
---|
224 | <col width="58%" /> |
---|
225 | </colgroup> |
---|
226 | <thead valign="bottom"> |
---|
227 | <tr class="row-odd"><th class="head">Parameter</th> |
---|
228 | <th class="head">Format</th> |
---|
229 | <th class="head">Possible value range</th> |
---|
230 | <th class="head">Default</th> |
---|
231 | <th class="head">Description</th> |
---|
232 | </tr> |
---|
233 | </thead> |
---|
234 | <tbody valign="top"> |
---|
235 | <tr class="row-even"><td><p class="first last">TARGET</p> |
---|
236 | </td> |
---|
237 | <td><p class="first last">String</p> |
---|
238 | </td> |
---|
239 | <td><p class="first last">local, ecgate, cca</p> |
---|
240 | </td> |
---|
241 | <td><p class="first last">None</p> |
---|
242 | </td> |
---|
243 | <td><p class="first last">Defines which flex_extract application mode will be used. Local = local mode; egate = Remote or Gateway mode, cca = Remote or Gateway mode. Wether the local mode is for public or member state users doesn’t matter during the installation process.</p> |
---|
244 | </td> |
---|
245 | </tr> |
---|
246 | <tr class="row-odd"><td><p class="first last">MAKEFILE</p> |
---|
247 | </td> |
---|
248 | <td><p class="first last">String</p> |
---|
249 | </td> |
---|
250 | <td><p class="first last">any Makefile present, according to environment</p> |
---|
251 | </td> |
---|
252 | <td><p class="first last">Makefile.gfortran</p> |
---|
253 | </td> |
---|
254 | <td><p class="first last">Name of the makefile in source/fortran directory to be used for compiling the Fortran program. “Makefile.gfortran” has the configuration for the ecgate environment. For local server versions there are templates “Makefile.local.gfortran” and “Makefile.local.ifort” which have to be adapted (pathes to the eccodes library) by the user.</p> |
---|
255 | </td> |
---|
256 | </tr> |
---|
257 | <tr class="row-even"><td><p class="first last">ECUID</p> |
---|
258 | </td> |
---|
259 | <td><p class="first last">String</p> |
---|
260 | </td> |
---|
261 | <td><p class="first last">e.g. “ecname”</p> |
---|
262 | </td> |
---|
263 | <td><p class="first last">None</p> |
---|
264 | </td> |
---|
265 | <td><p class="first last">The user id at ECMWF. Necessary for access to ECMWF server. (Remote and Gateway mode) </p> |
---|
266 | </td> |
---|
267 | </tr> |
---|
268 | <tr class="row-odd"><td><p class="first last">ECGID</p> |
---|
269 | </td> |
---|
270 | <td><p class="first last">String</p> |
---|
271 | </td> |
---|
272 | <td><p class="first last">e.g. “groupname”</p> |
---|
273 | </td> |
---|
274 | <td><p class="first last">None</p> |
---|
275 | </td> |
---|
276 | <td><p class="first last">The group id at ECMWF. Necessary for access to ECMWF server. (Remote and Gateway mode)</p> |
---|
277 | </td> |
---|
278 | </tr> |
---|
279 | <tr class="row-even"><td><p class="first last">GATEWAY</p> |
---|
280 | </td> |
---|
281 | <td><p class="first last">String</p> |
---|
282 | </td> |
---|
283 | <td><p class="first last">any server adress</p> |
---|
284 | </td> |
---|
285 | <td><p class="first last">None</p> |
---|
286 | </td> |
---|
287 | <td><p class="first last">The name of the local gateway server. Necessary for transfering files from the ECMWF servers to the local member state gateway server. (Gateway mode)</p> |
---|
288 | </td> |
---|
289 | </tr> |
---|
290 | <tr class="row-odd"><td><p class="first last">DESTINATION</p> |
---|
291 | </td> |
---|
292 | <td><p class="first last">String</p> |
---|
293 | </td> |
---|
294 | <td><p class="first last">any destination which is stored at local gateway server</p> |
---|
295 | </td> |
---|
296 | <td><p class="first last">None</p> |
---|
297 | </td> |
---|
298 | <td><p class="first last">The ecaccess association, e.g. myUser@genericSftp. Used for transfering files from the ECMWF servers to the local member state gateway server. (Gateway mode)</p> |
---|
299 | </td> |
---|
300 | </tr> |
---|
301 | <tr class="row-even"><td><p class="first last">INSTALLDIR</p> |
---|
302 | </td> |
---|
303 | <td><p class="first last">String</p> |
---|
304 | </td> |
---|
305 | <td><p class="first last">a full path </p> |
---|
306 | </td> |
---|
307 | <td><p class="first last">$HOME on ECMWF server and current flex_extract root path on local server</p> |
---|
308 | </td> |
---|
309 | <td><p class="first last">Root path where flex_extract should be installed. If it is not set it will be set to $HOME on ECMWF server and set to the current flex_extract root path on local servers. </p> |
---|
310 | </td> |
---|
311 | </tr> |
---|
312 | <tr class="row-odd"><td><p class="first last">JOB_TEMPLATE</p> |
---|
313 | </td> |
---|
314 | <td><p class="first last">String</p> |
---|
315 | </td> |
---|
316 | <td><p class="first last">job.template</p> |
---|
317 | </td> |
---|
318 | <td><p class="first last">job.template</p> |
---|
319 | </td> |
---|
320 | <td><p class="first last">The rudimentary template file to create a batch job template for submission to ECMWF servers. Should not be changed since it is optimized for ECMWF server. (Remote and Gateway mode)</p> |
---|
321 | </td> |
---|
322 | </tr> |
---|
323 | <tr class="row-even"><td><p class="first last">CONTROLFILE</p> |
---|
324 | </td> |
---|
325 | <td><p class="first last">String</p> |
---|
326 | </td> |
---|
327 | <td><p class="first last">any CONTROL file</p> |
---|
328 | </td> |
---|
329 | <td><p class="first last">CONTROL_EA5</p> |
---|
330 | </td> |
---|
331 | <td><p class="first last">The file with all CONTROL parameters. It does not matter which CONTROL file is used. Due to interval process it is just necessary that there is a CONTROL file in place which can be opend. </p> |
---|
332 | </td> |
---|
333 | </tr> |
---|
334 | </tbody> |
---|
335 | </table> |
---|
336 | </div> |
---|
337 | <div class="section" id="content-of-setup-sh"> |
---|
338 | <h2>Content of <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code><a class="headerlink" href="#content-of-setup-sh" title="Permalink to this headline">¶</a></h2> |
---|
339 | <div class="literal-block-wrapper docutils container" id="id3"> |
---|
340 | <div class="code-block-caption"><span class="caption-text">setup.sh</span><a class="headerlink" href="#id3" title="Permalink to this code">¶</a></div> |
---|
341 | <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/bin/bash</span> |
---|
342 | <span class="c1">#</span> |
---|
343 | <span class="c1"># @Author: Anne Philipp</span> |
---|
344 | <span class="c1">#</span> |
---|
345 | <span class="c1"># @Date: September, 10 2018</span> |
---|
346 | <span class="c1">#</span> |
---|
347 | <span class="c1"># @Description: </span> |
---|
348 | <span class="c1"># This file defines the flex_extract's available installation</span> |
---|
349 | <span class="c1"># parameters and puts them together for the call of the actual </span> |
---|
350 | <span class="c1"># python installation script. It also does some checks to </span> |
---|
351 | <span class="c1"># guarantee necessary parameters were set.</span> |
---|
352 | <span class="c1">#</span> |
---|
353 | <span class="c1"># @Licence:</span> |
---|
354 | <span class="c1"># (C) Copyright 2014-2019.</span> |
---|
355 | <span class="c1">#</span> |
---|
356 | <span class="c1"># SPDX-License-Identifier: CC-BY-4.0</span> |
---|
357 | <span class="c1">#</span> |
---|
358 | <span class="c1"># This work is licensed under the Creative Commons Attribution 4.0</span> |
---|
359 | <span class="c1"># International License. To view a copy of this license, visit</span> |
---|
360 | <span class="c1"># http://creativecommons.org/licenses/by/4.0/ or send a letter to</span> |
---|
361 | <span class="c1"># Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.</span> |
---|
362 | <span class="c1">#</span> |
---|
363 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
364 | <span class="c1"># AVAILABLE COMMANDLINE ARGUMENTS TO SET</span> |
---|
365 | <span class="c1">#</span> |
---|
366 | <span class="c1"># THE USER HAS TO SPECIFY THESE PARAMETERS</span> |
---|
367 | <span class="c1">#</span> |
---|
368 | <span class="nv">TARGET</span><span class="o">=</span><span class="s1">'ecgate'</span> |
---|
369 | <span class="nv">MAKEFILE</span><span class="o">=</span><span class="s1">'makefile.eccodes'</span> |
---|
370 | <span class="nv">ECUID</span><span class="o">=</span><span class="s1">'km4a'</span> |
---|
371 | <span class="nv">ECGID</span><span class="o">=</span><span class="s1">'at'</span> |
---|
372 | <span class="nv">GATEWAY</span><span class="o">=</span><span class="s1">'srvx8.img.univie.ac.at'</span> |
---|
373 | <span class="nv">DESTINATION</span><span class="o">=</span><span class="s1">'annep@genericSftp'</span> |
---|
374 | <span class="nv">INSTALLDIR</span><span class="o">=</span>None |
---|
375 | <span class="nv">JOB_TEMPLATE</span><span class="o">=</span><span class="s1">''</span> |
---|
376 | <span class="nv">CONTROLFILE</span><span class="o">=</span><span class="s1">'CONTROL_EA5'</span> |
---|
377 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
378 | <span class="c1">#</span> |
---|
379 | <span class="c1"># AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!</span> |
---|
380 | <span class="c1">#</span> |
---|
381 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
382 | |
---|
383 | <span class="c1"># PATH TO INSTALLATION SCRIPT</span> |
---|
384 | <span class="nv">script</span><span class="o">=</span><span class="s2">"Source/Python/install.py"</span> |
---|
385 | |
---|
386 | <span class="c1"># INITIALIZE EMPTY PARAMETERLIST</span> |
---|
387 | <span class="nv">parameterlist</span><span class="o">=</span><span class="s2">""</span> |
---|
388 | |
---|
389 | <span class="c1"># DEFAULT PARAMETERLIST</span> |
---|
390 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$TARGET</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
391 | <span class="nv">parameterlist</span><span class="o">=</span><span class="s2">" --target=</span><span class="nv">$TARGET</span><span class="s2">"</span> |
---|
392 | <span class="k">else</span> |
---|
393 | <span class="nb">echo</span> <span class="s2">"ERROR: No installation target specified."</span> |
---|
394 | <span class="nb">echo</span> <span class="s2">"EXIT WITH ERROR"</span> |
---|
395 | <span class="nb">exit</span> |
---|
396 | <span class="k">fi</span> |
---|
397 | |
---|
398 | <span class="c1"># CHECK FOR MORE PARAMETER </span> |
---|
399 | <span class="k">if</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$TARGET</span><span class="s2">"</span> <span class="o">==</span> <span class="s2">"ecgate"</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$TARGET</span><span class="s2">"</span> <span class="o">==</span> <span class="s2">"cca"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
400 | <span class="c1"># check if necessary Parameters are set</span> |
---|
401 | <span class="k">if</span> <span class="o">[</span> -z <span class="s2">"</span><span class="nv">$ECUID</span><span class="s2">"</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> -z <span class="s2">"</span><span class="nv">$ECGID</span><span class="s2">"</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> -z <span class="s2">"</span><span class="nv">$GATEWAY</span><span class="s2">"</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> -z <span class="s2">"</span><span class="nv">$DESTINATION</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
402 | <span class="nb">echo</span> <span class="s2">"ERROR: At least one of the following parameters are not set: ECUID, ECGID, GATEWAY, DESTINATION!"</span> |
---|
403 | <span class="nb">echo</span> <span class="s2">"EXIT WITH ERROR"</span> |
---|
404 | <span class="nb">exit</span> |
---|
405 | <span class="k">else</span> |
---|
406 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --ecuid=</span><span class="nv">$ECUID</span><span class="s2"> --ecgid=</span><span class="nv">$ECGID</span><span class="s2"> --gateway=</span><span class="nv">$GATEWAY</span><span class="s2"> --destination=</span><span class="nv">$DESTINATION</span><span class="s2">"</span> |
---|
407 | <span class="k">fi</span> |
---|
408 | <span class="k">fi</span> |
---|
409 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$MAKEFILE</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> |
---|
410 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --makefile=</span><span class="nv">$MAKEFILE</span><span class="s2">"</span> |
---|
411 | <span class="k">fi</span> |
---|
412 | <span class="k">if</span> <span class="o">[</span> -n <span class="s2">"</span><span class="nv">$FLEXPARTDIR</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> <span class="c1"># not empty</span> |
---|
413 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --flexpartdir=</span><span class="nv">$FLEXPARTDIR</span><span class="s2">"</span> |
---|
414 | <span class="k">fi</span> |
---|
415 | <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> |
---|
416 | <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> |
---|
417 | <span class="k">fi</span> |
---|
418 | <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> |
---|
419 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --controlfile=</span><span class="nv">$CONTROLFILE</span><span class="s2">"</span> |
---|
420 | <span class="k">fi</span> |
---|
421 | |
---|
422 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
423 | <span class="c1"># CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS</span> |
---|
424 | |
---|
425 | <span class="nv">$script</span> <span class="nv">$parameterlist</span> |
---|
426 | </pre></div> |
---|
427 | </div> |
---|
428 | </div> |
---|
429 | </div> |
---|
430 | <div class="section" id="usage-of-install-py-optional"> |
---|
431 | <span id="ref-install-script"></span><h2>Usage of <code class="docutils literal notranslate"><span class="pre">install.py</span></code> (optional)<a class="headerlink" href="#usage-of-install-py-optional" title="Permalink to this headline">¶</a></h2> |
---|
432 | <p>It is also possible to start the installation process of <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">install.py</span></code> script instead of the wrapping Shell script <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code>. This top-level script is located in |
---|
433 | <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 |
---|
434 | command line parameter.</p> |
---|
435 | <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>install.py --help |
---|
436 | |
---|
437 | usage: install.py <span class="o">[</span>-h<span class="o">]</span> <span class="o">[</span>--target INSTALL_TARGET<span class="o">]</span> <span class="o">[</span>--makefile MAKEFILE<span class="o">]</span> |
---|
438 | <span class="o">[</span>--ecuid ECUID<span class="o">]</span> <span class="o">[</span>--ecgid ECGID<span class="o">]</span> <span class="o">[</span>--gateway GATEWAY<span class="o">]</span> |
---|
439 | <span class="o">[</span>--destination DESTINATION<span class="o">]</span> <span class="o">[</span>--installdir INSTALLDIR<span class="o">]</span> |
---|
440 | <span class="o">[</span>--job_template JOB_TEMPLATE<span class="o">]</span> <span class="o">[</span>--controlfile CONTROLFILE<span class="o">]</span> |
---|
441 | |
---|
442 | Install flex_extract software locally or on ECMWF machines |
---|
443 | |
---|
444 | optional arguments: |
---|
445 | -h, --help show this <span class="nb">help</span> message and <span class="nb">exit</span> |
---|
446 | --target INSTALL_TARGET |
---|
447 | Valid targets: <span class="nb">local</span> <span class="p">|</span> ecgate <span class="p">|</span> cca , the latter two |
---|
448 | are at ECMWF <span class="o">(</span>default: None<span class="o">)</span> |
---|
449 | --makefile MAKEFILE Name of Makefile to use <span class="k">for</span> compiling the Fortran |
---|
450 | program <span class="o">(</span>default: None<span class="o">)</span> |
---|
451 | --ecuid ECUID The user id at ECMWF. <span class="o">(</span>default: None<span class="o">)</span> |
---|
452 | --ecgid ECGID The group id at ECMWF. <span class="o">(</span>default: None<span class="o">)</span> |
---|
453 | --gateway GATEWAY The name of the <span class="nb">local</span> gateway server. <span class="o">(</span>default: None<span class="o">)</span> |
---|
454 | --destination DESTINATION |
---|
455 | The ecaccess association, e.g. myUser@genericSftp |
---|
456 | <span class="o">(</span>default: None<span class="o">)</span> |
---|
457 | --installdir INSTALLDIR |
---|
458 | Root directory where flex_extract will be installed |
---|
459 | to. <span class="o">(</span>default: None<span class="o">)</span> |
---|
460 | --job_template JOB_TEMPLATE |
---|
461 | The rudimentary template file to create a batch job |
---|
462 | template <span class="k">for</span> submission to ECMWF servers. <span class="o">(</span>default: |
---|
463 | job.template<span class="o">)</span> |
---|
464 | --controlfile CONTROLFILE |
---|
465 | The file with all CONTROL parameters. <span class="o">(</span>default: |
---|
466 | CONTROL_EA5<span class="o">)</span> |
---|
467 | </pre></div> |
---|
468 | </div> |
---|
469 | <div class="toctree-wrapper compound"> |
---|
470 | </div> |
---|
471 | </div> |
---|
472 | </div> |
---|
473 | |
---|
474 | |
---|
475 | </div> |
---|
476 | |
---|
477 | </div> |
---|
478 | <footer> |
---|
479 | |
---|
480 | <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
---|
481 | |
---|
482 | <a href="compilejob.html" class="btn btn-neutral float-right" title="The Compilation Jobscript compilejob.ksh" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
---|
483 | |
---|
484 | |
---|
485 | <a href="../input.html" class="btn btn-neutral float-left" title="Control & Input Data" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> |
---|
486 | |
---|
487 | </div> |
---|
488 | |
---|
489 | |
---|
490 | <hr/> |
---|
491 | |
---|
492 | <div role="contentinfo"> |
---|
493 | <p> |
---|
494 | © Copyright 2019, Anne Philipp and Leopold Haimberger |
---|
495 | |
---|
496 | </p> |
---|
497 | </div> |
---|
498 | 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>. |
---|
499 | |
---|
500 | </footer> |
---|
501 | |
---|
502 | </div> |
---|
503 | </div> |
---|
504 | |
---|
505 | </section> |
---|
506 | |
---|
507 | </div> |
---|
508 | |
---|
509 | |
---|
510 | |
---|
511 | <script type="text/javascript"> |
---|
512 | jQuery(function () { |
---|
513 | SphinxRtdTheme.Navigation.enable(true); |
---|
514 | }); |
---|
515 | </script> |
---|
516 | |
---|
517 | |
---|
518 | |
---|
519 | |
---|
520 | |
---|
521 | |
---|
522 | </body> |
---|
523 | </html> |
---|