source: flex_extract.git/Documentation/html/Documentation/Input/setup.html @ 47be2684

ctbtodev
Last change on this file since 47be2684 was 47be2684, checked in by Leopold Haimberger <leopold.haimberger@…>, 4 years ago

Adaptations to allow for a system installation with separate user and system path. Updated documentation

  • Property mode set to 100644
File size: 31.6 KB
Line 
1
2
3<!DOCTYPE html>
4<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
5<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
6<head>
7  <meta charset="utf-8">
8 
9  <meta name="viewport" content="width=device-width, initial-scale=1.0">
10 
11  <title>The installation script - setup.sh &mdash; flex_extract 7.1.2 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 &amp; 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.2
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 &amp; 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> &raquo;</li>
172       
173          <li><a href="../../documentation.html">Code-Level Documentation</a> &raquo;</li>
174       
175          <li><a href="../input.html">Control &amp; input data</a> &raquo;</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>.
199It 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, syslocal, ecgate, cca, ccb</p></td>
238<td><p>None</p></td>
239<td><p>Defines the flex_extract application mode to be used.  Local = local mode; ecgate = Remote or Gateway mode, cca or ccb = Remote or Gateway mode (HPC). Whether the local mode is for public or member state users doesn’t matter here. Syslocal = seperates the executables and user application files during installation. Paths are selectable through INSTALLDIR and SYSINSTALLDIR</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&#64;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. It will always be $HOME on ECMWF servers and if not set for the local mode, it will be the current flex_extract root path on local servers. </p></td>
276</tr>
277<tr class="row-odd"><td><p>SYSINSTALLDIR</p></td>
278<td><p>String</p></td>
279<td><p>a full path </p></td>
280<td><p>None</p></td>
281<td><p>This will be the same as INSTALLDIR if TARGET=local. Otherwise, the executable files are stored in this path. If it is choosen to be in a system path, don’t forget to start the script with admin rights. </p></td>
282</tr>
283<tr class="row-even"><td><p>JOB_TEMPLATE</p></td>
284<td><p>String</p></td>
285<td><p>installscript.template</p></td>
286<td><p>installscript.template</p></td>
287<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>
288</tr>
289<tr class="row-odd"><td><p>CONTROLFILE</p></td>
290<td><p>String</p></td>
291<td><p>any CONTROL file</p></td>
292<td><p>CONTROL_EA5</p></td>
293<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>
294</tr>
295</tbody>
296</table>
297</div>
298<div class="section" id="content-of-setup-sh">
299<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>
300<div class="literal-block-wrapper docutils container" id="id3">
301<div class="code-block-caption"><span class="caption-text">setup.sh</span><a class="headerlink" href="#id3" title="Permalink to this code"></a></div>
302<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/bin/bash</span>
303<span class="c1">#</span>
304<span class="c1"># @Author: Anne Philipp</span>
305<span class="c1">#</span>
306<span class="c1"># @Date: September, 10 2018</span>
307<span class="c1">#</span>
308<span class="c1"># @Description: </span>
309<span class="c1">#    This file defines the flex_extract&#39;s available installation</span>
310<span class="c1">#    parameters and puts them together for the call of the actual </span>
311<span class="c1">#    python installation script. It also does some checks to </span>
312<span class="c1">#    guarantee necessary parameters were set.</span>
313<span class="c1">#</span>
314<span class="c1"># @Licence:</span>
315<span class="c1">#    (C) Copyright 2014-2020.</span>
316<span class="c1">#</span>
317<span class="c1">#    SPDX-License-Identifier: CC-BY-4.0</span>
318<span class="c1">#</span>
319<span class="c1">#    This work is licensed under the Creative Commons Attribution 4.0</span>
320<span class="c1">#    International License. To view a copy of this license, visit</span>
321<span class="c1">#    http://creativecommons.org/licenses/by/4.0/ or send a letter to</span>
322<span class="c1">#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.</span>
323<span class="c1">#</span>
324<span class="c1"># -----------------------------------------------------------------</span>
325<span class="c1"># AVAILABLE COMMANDLINE ARGUMENTS TO SET</span>
326<span class="c1">#</span>
327<span class="c1"># THE USER HAS TO SPECIFY THESE PARAMETERS</span>
328<span class="c1">#</span>
329<span class="nv">TARGET</span><span class="o">=</span><span class="s1">&#39;ecgate&#39;</span>
330<span class="nv">MAKEFILE</span><span class="o">=</span><span class="s1">&#39;makefile_ecgate&#39;</span>
331<span class="nv">ECUID</span><span class="o">=</span><span class="s1">&#39;&lt;username&gt;&#39;</span>
332<span class="nv">ECGID</span><span class="o">=</span><span class="s1">&#39;&lt;groupID&gt;&#39;</span>
333<span class="nv">GATEWAY</span><span class="o">=</span><span class="s1">&#39;&lt;gatewayname&gt;&#39;</span>
334<span class="nv">DESTINATION</span><span class="o">=</span><span class="s1">&#39;&lt;username&gt;@genericSftp&#39;</span>
335<span class="nv">INSTALLDIR</span><span class="o">=</span>None
336<span class="nv">JOB_TEMPLATE</span><span class="o">=</span><span class="s1">&#39;&#39;</span>
337<span class="nv">CONTROLFILE</span><span class="o">=</span><span class="s1">&#39;CONTROL_EA5&#39;</span>
338<span class="c1"># -----------------------------------------------------------------</span>
339<span class="c1">#</span>
340<span class="c1"># AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!</span>
341<span class="c1">#</span>
342<span class="c1"># -----------------------------------------------------------------</span>
343
344<span class="c1"># PATH TO INSTALLATION SCRIPT</span>
345<span class="nv">script</span><span class="o">=</span><span class="s2">&quot;Source/Python/install.py&quot;</span>
346
347<span class="c1"># INITIALIZE EMPTY PARAMETERLIST</span>
348<span class="nv">parameterlist</span><span class="o">=</span><span class="s2">&quot;&quot;</span>
349
350<span class="c1"># CHECK IF ON ECMWF SERVER; </span>
351<span class="k">if</span> <span class="o">[[</span> <span class="nv">$HOST</span> <span class="o">==</span> *<span class="s2">&quot;ecgb&quot;</span>* <span class="o">]]</span> <span class="o">||</span> <span class="o">[[</span> <span class="nv">$HOST</span> <span class="o">==</span> *<span class="s2">&quot;cca&quot;</span>* <span class="o">]]</span> <span class="o">||</span> <span class="o">[[</span> <span class="nv">$HOST</span> <span class="o">==</span> *<span class="s2">&quot;ccb&quot;</span>* <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
352<span class="c1"># LOAD PYTHON3 MODULE</span>
353  module load python3
354<span class="k">fi</span> 
355
356<span class="c1"># DEFAULT PARAMETERLIST</span>
357<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$TARGET</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
358  <span class="nv">parameterlist</span><span class="o">=</span><span class="s2">&quot; --target=</span><span class="nv">$TARGET</span><span class="s2">&quot;</span>
359<span class="k">else</span>
360  <span class="nb">echo</span> <span class="s2">&quot;ERROR: No installation target specified.&quot;</span>
361  <span class="nb">echo</span> <span class="s2">&quot;EXIT WITH ERROR&quot;</span>
362  <span class="nb">exit</span>
363<span class="k">fi</span>
364
365<span class="c1"># CHECK FOR MORE PARAMETER </span>
366<span class="k">if</span> <span class="o">[</span> <span class="s2">&quot;</span><span class="nv">$TARGET</span><span class="s2">&quot;</span> <span class="o">==</span> <span class="s2">&quot;ecgate&quot;</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> <span class="s2">&quot;</span><span class="nv">$TARGET</span><span class="s2">&quot;</span> <span class="o">==</span> <span class="s2">&quot;cca&quot;</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> <span class="s2">&quot;</span><span class="nv">$TARGET</span><span class="s2">&quot;</span> <span class="o">==</span> <span class="s2">&quot;ccb&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
367  <span class="c1"># check if necessary Parameters are set</span>
368  <span class="k">if</span> <span class="o">[</span> -z <span class="s2">&quot;</span><span class="nv">$ECUID</span><span class="s2">&quot;</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> -z <span class="s2">&quot;</span><span class="nv">$ECGID</span><span class="s2">&quot;</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> <span class="s2">&quot;</span><span class="nv">$ECUID</span><span class="s2">&quot;</span> <span class="o">==</span> <span class="s2">&quot;&lt;username&gt;&quot;</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> <span class="s2">&quot;</span><span class="nv">$ECGID</span><span class="s2">&quot;</span> <span class="o">==</span> <span class="s2">&quot;&lt;groupID&gt;&quot;</span> <span class="o">]</span> <span class="p">;</span> <span class="k">then</span>
369    <span class="nb">echo</span> <span class="s2">&quot;ERROR: At least one of the following parameters are not properly set: ECUID or ECGID!&quot;</span>
370    <span class="nb">echo</span> <span class="s2">&quot;EXIT WITH ERROR&quot;</span>
371    <span class="nb">exit</span>
372  <span class="k">else</span>
373    <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --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">&quot;</span>
374  <span class="k">fi</span>
375  <span class="k">if</span> <span class="o">[</span> -z <span class="s2">&quot;</span><span class="nv">$GATEWAY</span><span class="s2">&quot;</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> -z <span class="s2">&quot;</span><span class="nv">$DESTINATION</span><span class="s2">&quot;</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> <span class="s2">&quot;</span><span class="nv">$GATEWAY</span><span class="s2">&quot;</span> <span class="o">==</span> <span class="s2">&quot;&lt;gatewayname&gt;&quot;</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> <span class="s2">&quot;</span><span class="nv">$DESTINATION</span><span class="s2">&quot;</span> <span class="o">==</span> <span class="s2">&quot;&lt;username&gt;@genericSftp&quot;</span> <span class="o">]</span> <span class="p">;</span> <span class="k">then</span>
376    <span class="nb">echo</span> <span class="s2">&quot;WARNING: Not setting parameters GATEWAY and DESTINATION means there will be no file transfer to local gateway server.&quot;</span>
377  <span class="k">fi</span>
378<span class="k">fi</span>
379<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$MAKEFILE</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
380  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --makefile=</span><span class="nv">$MAKEFILE</span><span class="s2">&quot;</span>
381<span class="k">fi</span>
382<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$FLEXPARTDIR</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> <span class="c1"># not empty</span>
383  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --flexpartdir=</span><span class="nv">$FLEXPARTDIR</span><span class="s2">&quot;</span>
384<span class="k">fi</span>
385<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$JOB_TEMPLATE</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
386  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --job_template=</span><span class="nv">$JOB_TEMPLATE</span><span class="s2">&quot;</span>
387<span class="k">fi</span>
388<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;</span><span class="nv">$CONTROLFILE</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
389  <span class="nv">parameterlist</span><span class="o">+=</span><span class="s2">&quot; --controlfile=</span><span class="nv">$CONTROLFILE</span><span class="s2">&quot;</span>
390<span class="k">fi</span>
391
392<span class="c1"># -----------------------------------------------------------------</span>
393<span class="c1"># CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS</span>
394
395<span class="nv">$script</span> <span class="nv">$parameterlist</span>
396</pre></div>
397</div>
398</div>
399</div>
400<div class="section" id="usage-of-install-py-optional">
401<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>
402<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
403<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,
404we see again all possible command line parameters.</p>
405<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>install.py --help
406
407usage: 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>
408              <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>
409              <span class="o">[</span>--destination DESTINATION<span class="o">]</span> <span class="o">[</span>--installdir INSTALLDIR<span class="o">]</span>
410              <span class="o">[</span>--sysinstalldir SYSINSTALLDIR<span class="o">]</span>
411              <span class="o">[</span>--job_template JOB_TEMPLATE<span class="o">]</span> <span class="o">[</span>--controlfile CONTROLFILE<span class="o">]</span>
412
413Install flex_extract software locally or on ECMWF machines
414
415optional arguments:
416  -h, --help            show this <span class="nb">help</span> message and <span class="nb">exit</span>
417  --target INSTALL_TARGET
418                        Valid targets: syslocal <span class="p">|</span> <span class="nb">local</span> <span class="p">|</span> ecgate <span class="p">|</span> cca , the latter two
419                        are at ECMWF <span class="o">(</span>default: None<span class="o">)</span>
420  --makefile MAKEFILE   Name of makefile to compile the Fortran
421                        code. <span class="o">(</span>default depends on <span class="sb">`</span>target<span class="sb">`</span>: <span class="nb">local</span> - makefile_local_gfortran,
422                        ecgate - makefile_ecgate, cca - makefile_cray<span class="o">)</span>
423  --ecuid ECUID         The user id at ECMWF. <span class="o">(</span>default: None<span class="o">)</span>
424  --ecgid ECGID         The group id at ECMWF. <span class="o">(</span>default: None<span class="o">)</span>
425  --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>
426  --destination DESTINATION
427                        The ecaccess association, e.g. myUser@genericSftp
428                        <span class="o">(</span>default: None<span class="o">)</span>
429  --installdir INSTALLDIR
430                        Root directory where flex_extract will be installed
431                        to. <span class="o">(</span>default: None<span class="o">)</span>
432  --sysinstalldir SYSINSTALLDIR
433                        System installation path<span class="p">;</span> where executables are
434                        stored. <span class="o">(</span>default: None<span class="o">)</span>
435  --job_template JOB_TEMPLATE
436                        The rudimentary template file to create a batch job
437                        template <span class="k">for</span> submission to ECMWF servers. <span class="o">(</span>default:
438                        job.template<span class="o">)</span>
439  --controlfile CONTROLFILE
440                        The file with all CONTROL parameters. <span class="o">(</span>default:
441                        CONTROL_EA5<span class="o">)</span>
442</pre></div>
443</div>
444<div class="toctree-wrapper compound">
445</div>
446</div>
447</div>
448
449
450           </div>
451           
452          </div>
453          <footer>
454 
455    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
456     
457        <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>
458     
459     
460        <a href="../input.html" class="btn btn-neutral float-left" title="Control &amp; input data" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
461     
462    </div>
463 
464
465  <hr/>
466
467  <div role="contentinfo">
468    <p>
469        &copy; Copyright 2020, Anne Philipp, Leopold Haimberger and Petra Seibert
470
471    </p>
472  </div>
473  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>.
474
475</footer>
476
477        </div>
478      </div>
479
480    </section>
481
482  </div>
483 
484
485
486  <script type="text/javascript">
487      jQuery(function () {
488          SphinxRtdTheme.Navigation.enable(true);
489      });
490  </script>
491
492 
493 
494   
495   
496
497</body>
498</html>
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG