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 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 compilation job script 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-parameters">Installation parameters</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 job script <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 for <code class="docutils literal notranslate"><span class="pre">calc_etadot</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 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">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> 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 the necessary operations to prepare the application environment selected. This includes:</p> |
---|
200 | <ul class="simple"> |
---|
201 | <li><p>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)</p></li> |
---|
202 | <li><p>preparation of a compilation Korn-shell script (in <strong>remote</strong> and <strong>gateway</strong> mode)</p></li> |
---|
203 | <li><p>preparation of a job template with user credentials (in <strong>remote</strong> and <strong>gateway</strong> mode)</p></li> |
---|
204 | <li><p>create a tarball of all necessary files</p></li> |
---|
205 | <li><p>copying the tarball to the target location (depending on application mode and installation path)</p></li> |
---|
206 | <li><p>submit the compilation script to the batch queue at ECMWF servers (in <strong>remote</strong> and <strong>gateway</strong> mode) or just untar the tarball at target location (<strong>local mode</strong>)</p></li> |
---|
207 | <li><p>compilation of the Fortran program <code class="docutils literal notranslate"><span class="pre">calc_etadot</span></code></p></li> |
---|
208 | </ul> |
---|
209 | <p>The Python installation script <code class="docutils literal notranslate"><span class="pre">install.py</span></code> has several command line arguments defined in <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code>, in the section labelled “<em>AVAILABLE COMMANDLINE ARGUMENTS TO SET</em>”. The user has to adapt these parameters according to his/her personal needs. The parameters are listed and described in <a class="reference internal" href="#ref-instparams"><span class="std std-ref">Installation parameters</span></a>. The script also does some checks to guarantee that the 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 files and scripts involved 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 align-default" 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. Trapezoids are input files with the light blue area being the template files. Round-edge orange boxes are executable files which start the installation process and read the input files. Rectangular green boxes are output files. Light green files are needed only 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-parameters"> |
---|
216 | <span id="ref-instparams"></span><h2>Installation parameters<a class="headerlink" href="#installation-parameters" title="Permalink to this headline">¶</a></h2> |
---|
217 | <table class="docutils align-default" 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 style="width: 9%" /> |
---|
221 | <col style="width: 7%" /> |
---|
222 | <col style="width: 15%" /> |
---|
223 | <col style="width: 11%" /> |
---|
224 | <col style="width: 57%" /> |
---|
225 | </colgroup> |
---|
226 | <thead> |
---|
227 | <tr class="row-odd"><th class="head"><p>Parameter</p></th> |
---|
228 | <th class="head"><p>Format</p></th> |
---|
229 | <th class="head"><p>Possible values</p></th> |
---|
230 | <th class="head"><p>Default</p></th> |
---|
231 | <th class="head"><p>Description</p></th> |
---|
232 | </tr> |
---|
233 | </thead> |
---|
234 | <tbody> |
---|
235 | <tr class="row-even"><td><p>TARGET</p></td> |
---|
236 | <td><p>String</p></td> |
---|
237 | <td><p>local, ecgate, cca</p></td> |
---|
238 | <td><p>None</p></td> |
---|
239 | <td><p>Defines the flex_extract application mode to be used. Local = local mode; egate = Remote or Gateway mode, cca = Remote or Gateway mode (HPC). Whether the local mode is for public or member state users doesn’t matter here.</p></td> |
---|
240 | </tr> |
---|
241 | <tr class="row-odd"><td><p>MAKEFILE</p></td> |
---|
242 | <td><p>String</p></td> |
---|
243 | <td><p>any makefile present in the Fortran source directory</p></td> |
---|
244 | <td><p>None</p></td> |
---|
245 | <td><p>Name of the makefile in source/fortran directory to be used for compiling the Fortran program. </p></td> |
---|
246 | </tr> |
---|
247 | <tr class="row-even"><td><p>ECUID</p></td> |
---|
248 | <td><p>String</p></td> |
---|
249 | <td><p>e.g. “myecname”</p></td> |
---|
250 | <td><p>None</p></td> |
---|
251 | <td><p>The user name (not Linux uid!) at ECMWF. Necessary for access to ECMWF server. (Remote and Gateway mode) </p></td> |
---|
252 | </tr> |
---|
253 | <tr class="row-odd"><td><p>ECGID</p></td> |
---|
254 | <td><p>String</p></td> |
---|
255 | <td><p>e.g. “mygroupname”</p></td> |
---|
256 | <td><p>None</p></td> |
---|
257 | <td><p>The group name (not Linux gid!) at ECMWF. Necessary for access to ECMWF server. (Remote and Gateway mode)</p></td> |
---|
258 | </tr> |
---|
259 | <tr class="row-even"><td><p>GATEWAY</p></td> |
---|
260 | <td><p>String</p></td> |
---|
261 | <td><p>any server adress</p></td> |
---|
262 | <td><p>None</p></td> |
---|
263 | <td><p>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></td> |
---|
264 | </tr> |
---|
265 | <tr class="row-odd"><td><p>DESTINATION</p></td> |
---|
266 | <td><p>String</p></td> |
---|
267 | <td><p>any destination which is stored at local gateway server</p></td> |
---|
268 | <td><p>None</p></td> |
---|
269 | <td><p>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></td> |
---|
270 | </tr> |
---|
271 | <tr class="row-even"><td><p>INSTALLDIR</p></td> |
---|
272 | <td><p>String</p></td> |
---|
273 | <td><p>a full path </p></td> |
---|
274 | <td><p>$HOME on ECMWF server and current flex_extract root path on local machine</p></td> |
---|
275 | <td><p>Root path where flex_extract should be installed. If it is not set, it will be $HOME on ECMWF servers and to the current flex_extract root path on local servers. </p></td> |
---|
276 | </tr> |
---|
277 | <tr class="row-odd"><td><p>JOB_TEMPLATE</p></td> |
---|
278 | <td><p>String</p></td> |
---|
279 | <td><p>job.template</p></td> |
---|
280 | <td><p>job.template</p></td> |
---|
281 | <td><p>The rudimentary template file to create a batch job template for submission to ECMWF servers. Should not be changed because it is already optimised for ECMWF servers. (Remote and Gateway mode)</p></td> |
---|
282 | </tr> |
---|
283 | <tr class="row-even"><td><p>CONTROLFILE</p></td> |
---|
284 | <td><p>String</p></td> |
---|
285 | <td><p>any CONTROL file</p></td> |
---|
286 | <td><p>CONTROL_EA5</p></td> |
---|
287 | <td><p>File containing all CONTROL parameters. Any CONTROL file may be used. Due to interval process it is just necessary that there is a CONTROL file in place which can be opend. </p></td> |
---|
288 | </tr> |
---|
289 | </tbody> |
---|
290 | </table> |
---|
291 | </div> |
---|
292 | <div class="section" id="content-of-setup-sh"> |
---|
293 | <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> |
---|
294 | <div class="literal-block-wrapper docutils container" id="id3"> |
---|
295 | <div class="code-block-caption"><span class="caption-text">setup.sh</span><a class="headerlink" href="#id3" title="Permalink to this code">¶</a></div> |
---|
296 | <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/bin/bash</span> |
---|
297 | <span class="c1">#</span> |
---|
298 | <span class="c1"># @Author: Anne Philipp</span> |
---|
299 | <span class="c1">#</span> |
---|
300 | <span class="c1"># @Date: September, 10 2018</span> |
---|
301 | <span class="c1">#</span> |
---|
302 | <span class="c1"># @Description: </span> |
---|
303 | <span class="c1"># This file defines the flex_extract's available installation</span> |
---|
304 | <span class="c1"># parameters and puts them together for the call of the actual </span> |
---|
305 | <span class="c1"># python installation script. It also does some checks to </span> |
---|
306 | <span class="c1"># guarantee necessary parameters were set.</span> |
---|
307 | <span class="c1">#</span> |
---|
308 | <span class="c1"># @Licence:</span> |
---|
309 | <span class="c1"># (C) Copyright 2014-2019.</span> |
---|
310 | <span class="c1">#</span> |
---|
311 | <span class="c1"># SPDX-License-Identifier: CC-BY-4.0</span> |
---|
312 | <span class="c1">#</span> |
---|
313 | <span class="c1"># This work is licensed under the Creative Commons Attribution 4.0</span> |
---|
314 | <span class="c1"># International License. To view a copy of this license, visit</span> |
---|
315 | <span class="c1"># http://creativecommons.org/licenses/by/4.0/ or send a letter to</span> |
---|
316 | <span class="c1"># Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.</span> |
---|
317 | <span class="c1">#</span> |
---|
318 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
319 | <span class="c1"># AVAILABLE COMMANDLINE ARGUMENTS TO SET</span> |
---|
320 | <span class="c1">#</span> |
---|
321 | <span class="c1"># THE USER HAS TO SPECIFY THESE PARAMETERS</span> |
---|
322 | <span class="c1">#</span> |
---|
323 | <span class="nv">TARGET</span><span class="o">=</span><span class="s1">'ecgate'</span> |
---|
324 | <span class="nv">MAKEFILE</span><span class="o">=</span><span class="s1">'makefile_ecgate'</span> |
---|
325 | <span class="nv">ECUID</span><span class="o">=</span><span class="s1">'<username>'</span> |
---|
326 | <span class="nv">ECGID</span><span class="o">=</span><span class="s1">'<groupID>'</span> |
---|
327 | <span class="nv">GATEWAY</span><span class="o">=</span><span class="s1">'<gatewayname>'</span> |
---|
328 | <span class="nv">DESTINATION</span><span class="o">=</span><span class="s1">'<username>@genericSftp'</span> |
---|
329 | <span class="nv">INSTALLDIR</span><span class="o">=</span>None |
---|
330 | <span class="nv">JOB_TEMPLATE</span><span class="o">=</span><span class="s1">''</span> |
---|
331 | <span class="nv">CONTROLFILE</span><span class="o">=</span><span class="s1">'CONTROL_EA5'</span> |
---|
332 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
333 | <span class="c1">#</span> |
---|
334 | <span class="c1"># AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!</span> |
---|
335 | <span class="c1">#</span> |
---|
336 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
337 | |
---|
338 | <span class="c1"># PATH TO INSTALLATION SCRIPT</span> |
---|
339 | <span class="nv">script</span><span class="o">=</span><span class="s2">"Source/Python/install.py"</span> |
---|
340 | |
---|
341 | <span class="c1"># INITIALIZE EMPTY PARAMETERLIST</span> |
---|
342 | <span class="nv">parameterlist</span><span class="o">=</span><span class="s2">""</span> |
---|
343 | |
---|
344 | <span class="c1"># DEFAULT PARAMETERLIST</span> |
---|
345 | <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> |
---|
346 | <span class="nv">parameterlist</span><span class="o">=</span><span class="s2">" --target=</span><span class="nv">$TARGET</span><span class="s2">"</span> |
---|
347 | <span class="k">else</span> |
---|
348 | <span class="nb">echo</span> <span class="s2">"ERROR: No installation target specified."</span> |
---|
349 | <span class="nb">echo</span> <span class="s2">"EXIT WITH ERROR"</span> |
---|
350 | <span class="nb">exit</span> |
---|
351 | <span class="k">fi</span> |
---|
352 | |
---|
353 | <span class="c1"># CHECK FOR MORE PARAMETER </span> |
---|
354 | <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> |
---|
355 | <span class="c1"># check if necessary Parameters are set</span> |
---|
356 | <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> <span class="s2">"</span><span class="nv">$ECUID</span><span class="s2">"</span> <span class="o">==</span> <span class="s2">"<username>"</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$ECGID</span><span class="s2">"</span> <span class="o">==</span> <span class="s2">"<groupID>"</span> <span class="o">]</span> <span class="p">;</span> <span class="k">then</span> |
---|
357 | <span class="nb">echo</span> <span class="s2">"ERROR: At least one of the following parameters are not properly set: ECUID or ECGID!"</span> |
---|
358 | <span class="nb">echo</span> <span class="s2">"EXIT WITH ERROR"</span> |
---|
359 | <span class="nb">exit</span> |
---|
360 | <span class="k">else</span> |
---|
361 | <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> |
---|
362 | <span class="k">fi</span> |
---|
363 | <span class="k">if</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="o">||</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$GATEWAY</span><span class="s2">"</span> <span class="o">==</span> <span class="s2">"<gatewayname>"</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$DESTINATION</span><span class="s2">"</span> <span class="o">==</span> <span class="s2">"<username>@genericSftp"</span> <span class="o">]</span> <span class="p">;</span> <span class="k">then</span> |
---|
364 | <span class="nb">echo</span> <span class="s2">"WARNING: Not setting parameters GATEWAY and DESTINATION means there will be no file transfer to local gateway server."</span> |
---|
365 | <span class="k">fi</span> |
---|
366 | <span class="k">fi</span> |
---|
367 | <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> |
---|
368 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --makefile=</span><span class="nv">$MAKEFILE</span><span class="s2">"</span> |
---|
369 | <span class="k">fi</span> |
---|
370 | <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> |
---|
371 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --flexpartdir=</span><span class="nv">$FLEXPARTDIR</span><span class="s2">"</span> |
---|
372 | <span class="k">fi</span> |
---|
373 | <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> |
---|
374 | <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> |
---|
375 | <span class="k">fi</span> |
---|
376 | <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> |
---|
377 | <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">" --controlfile=</span><span class="nv">$CONTROLFILE</span><span class="s2">"</span> |
---|
378 | <span class="k">fi</span> |
---|
379 | |
---|
380 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
381 | <span class="c1"># CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS</span> |
---|
382 | |
---|
383 | <span class="nv">$script</span> <span class="nv">$parameterlist</span> |
---|
384 | </pre></div> |
---|
385 | </div> |
---|
386 | </div> |
---|
387 | </div> |
---|
388 | <div class="section" id="usage-of-install-py-optional"> |
---|
389 | <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> |
---|
390 | <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 the command line by using the <code class="docutils literal notranslate"><span class="pre">install.py</span></code> script instead of the wrapper shell script <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code>. This top-level script is located in |
---|
391 | <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, |
---|
392 | we see again all possible command line parameters.</p> |
---|
393 | <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>install.py --help |
---|
394 | |
---|
395 | 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> |
---|
396 | <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> |
---|
397 | <span class="o">[</span>--destination DESTINATION<span class="o">]</span> <span class="o">[</span>--installdir INSTALLDIR<span class="o">]</span> |
---|
398 | <span class="o">[</span>--job_template JOB_TEMPLATE<span class="o">]</span> <span class="o">[</span>--controlfile CONTROLFILE<span class="o">]</span> |
---|
399 | |
---|
400 | Install flex_extract software locally or on ECMWF machines |
---|
401 | |
---|
402 | optional arguments: |
---|
403 | -h, --help show this <span class="nb">help</span> message and <span class="nb">exit</span> |
---|
404 | --target INSTALL_TARGET |
---|
405 | Valid targets: <span class="nb">local</span> <span class="p">|</span> ecgate <span class="p">|</span> cca , the latter two |
---|
406 | are at ECMWF <span class="o">(</span>default: None<span class="o">)</span> |
---|
407 | --makefile MAKEFILE Name of Makefile to use <span class="k">for</span> compiling the Fortran |
---|
408 | program <span class="o">(</span>default: None<span class="o">)</span> |
---|
409 | --ecuid ECUID The user id at ECMWF. <span class="o">(</span>default: None<span class="o">)</span> |
---|
410 | --ecgid ECGID The group id at ECMWF. <span class="o">(</span>default: None<span class="o">)</span> |
---|
411 | --gateway GATEWAY The IP name <span class="o">(</span>or IP address<span class="o">)</span> of the <span class="nb">local</span> gateway server. <span class="o">(</span>default: None<span class="o">)</span> |
---|
412 | --destination DESTINATION |
---|
413 | The ecaccess association, e.g. myUser@genericSftp |
---|
414 | <span class="o">(</span>default: None<span class="o">)</span> |
---|
415 | --installdir INSTALLDIR |
---|
416 | Root directory where flex_extract will be installed |
---|
417 | to. <span class="o">(</span>default: None<span class="o">)</span> |
---|
418 | --job_template JOB_TEMPLATE |
---|
419 | The rudimentary template file to create a batch job |
---|
420 | template <span class="k">for</span> submission to ECMWF servers. <span class="o">(</span>default: |
---|
421 | job.template<span class="o">)</span> |
---|
422 | --controlfile CONTROLFILE |
---|
423 | The file with all CONTROL parameters. <span class="o">(</span>default: |
---|
424 | CONTROL_EA5<span class="o">)</span> |
---|
425 | </pre></div> |
---|
426 | </div> |
---|
427 | <div class="toctree-wrapper compound"> |
---|
428 | </div> |
---|
429 | </div> |
---|
430 | </div> |
---|
431 | |
---|
432 | |
---|
433 | </div> |
---|
434 | |
---|
435 | </div> |
---|
436 | <footer> |
---|
437 | |
---|
438 | <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
---|
439 | |
---|
440 | <a href="compilejob.html" class="btn btn-neutral float-right" title="The compilation job script compilejob.ksh" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
---|
441 | |
---|
442 | |
---|
443 | <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> |
---|
444 | |
---|
445 | </div> |
---|
446 | |
---|
447 | |
---|
448 | <hr/> |
---|
449 | |
---|
450 | <div role="contentinfo"> |
---|
451 | <p> |
---|
452 | © Copyright 2020, Anne Philipp and Leopold Haimberger |
---|
453 | |
---|
454 | </p> |
---|
455 | </div> |
---|
456 | 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>. |
---|
457 | |
---|
458 | </footer> |
---|
459 | |
---|
460 | </div> |
---|
461 | </div> |
---|
462 | |
---|
463 | </section> |
---|
464 | |
---|
465 | </div> |
---|
466 | |
---|
467 | |
---|
468 | |
---|
469 | <script type="text/javascript"> |
---|
470 | jQuery(function () { |
---|
471 | SphinxRtdTheme.Navigation.enable(true); |
---|
472 | }); |
---|
473 | </script> |
---|
474 | |
---|
475 | |
---|
476 | |
---|
477 | |
---|
478 | |
---|
479 | |
---|
480 | </body> |
---|
481 | </html> |
---|