source: flex_extract.git/Documentation/html/Documentation/Input/setup.html @ 08c9091

ctbtodev
Last change on this file since 08c9091 was 08c9091, checked in by Anne Philipp <anne.philipp@…>, 4 years ago

updated online docu (rm tabs)

  • Property mode set to 100644
File size: 30.7 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, 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.</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>JOB_TEMPLATE</p></td>
278<td><p>String</p></td>
279<td><p>installscript.template</p></td>
280<td><p>installscript.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&#39;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-2020.</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">&#39;ecgate&#39;</span>
324<span class="nv">MAKEFILE</span><span class="o">=</span><span class="s1">&#39;makefile_ecgate&#39;</span>
325<span class="nv">ECUID</span><span class="o">=</span><span class="s1">&#39;&lt;username&gt;&#39;</span>
326<span class="nv">ECGID</span><span class="o">=</span><span class="s1">&#39;&lt;groupID&gt;&#39;</span>
327<span class="nv">GATEWAY</span><span class="o">=</span><span class="s1">&#39;&lt;gatewayname&gt;&#39;</span>
328<span class="nv">DESTINATION</span><span class="o">=</span><span class="s1">&#39;&lt;username&gt;@genericSftp&#39;</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">&#39;&#39;</span>
331<span class="nv">CONTROLFILE</span><span class="o">=</span><span class="s1">&#39;CONTROL_EA5&#39;</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">&quot;Source/Python/install.py&quot;</span>
340
341<span class="c1"># INITIALIZE EMPTY PARAMETERLIST</span>
342<span class="nv">parameterlist</span><span class="o">=</span><span class="s2">&quot;&quot;</span>
343
344<span class="c1"># CHECK IF ON ECMWF SERVER; </span>
345<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>
346<span class="c1"># LOAD PYTHON3 MODULE</span>
347  module load python3
348<span class="k">fi</span> 
349
350<span class="c1"># DEFAULT PARAMETERLIST</span>
351<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>
352  <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>
353<span class="k">else</span>
354  <span class="nb">echo</span> <span class="s2">&quot;ERROR: No installation target specified.&quot;</span>
355  <span class="nb">echo</span> <span class="s2">&quot;EXIT WITH ERROR&quot;</span>
356  <span class="nb">exit</span>
357<span class="k">fi</span>
358
359<span class="c1"># CHECK FOR MORE PARAMETER </span>
360<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>
361  <span class="c1"># check if necessary Parameters are set</span>
362  <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>
363    <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>
364    <span class="nb">echo</span> <span class="s2">&quot;EXIT WITH ERROR&quot;</span>
365    <span class="nb">exit</span>
366  <span class="k">else</span>
367    <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>
368  <span class="k">fi</span>
369  <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>
370    <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>
371  <span class="k">fi</span>
372<span class="k">fi</span>
373<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>
374  <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>
375<span class="k">fi</span>
376<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>
377  <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>
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">$JOB_TEMPLATE</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; --job_template=</span><span class="nv">$JOB_TEMPLATE</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">$CONTROLFILE</span><span class="s2">&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
383  <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>
384<span class="k">fi</span>
385
386<span class="c1"># -----------------------------------------------------------------</span>
387<span class="c1"># CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS</span>
388
389<span class="nv">$script</span> <span class="nv">$parameterlist</span>
390</pre></div>
391</div>
392</div>
393</div>
394<div class="section" id="usage-of-install-py-optional">
395<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>
396<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
397<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,
398we see again all possible command line parameters.</p>
399<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>install.py --help
400
401usage: 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>
402              <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>
403              <span class="o">[</span>--destination DESTINATION<span class="o">]</span> <span class="o">[</span>--installdir INSTALLDIR<span class="o">]</span>
404              <span class="o">[</span>--job_template JOB_TEMPLATE<span class="o">]</span> <span class="o">[</span>--controlfile CONTROLFILE<span class="o">]</span>
405
406Install flex_extract software locally or on ECMWF machines
407
408optional arguments:
409  -h, --help            show this <span class="nb">help</span> message and <span class="nb">exit</span>
410  --target INSTALL_TARGET
411                        Valid targets: <span class="nb">local</span> <span class="p">|</span> ecgate <span class="p">|</span> cca , the latter two
412                        are at ECMWF <span class="o">(</span>default: None<span class="o">)</span>
413  --makefile MAKEFILE   Name of makefile to compile the Fortran
414                        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,
415                        ecgate - makefile_ecgate, cca - makefile_cray<span class="o">)</span>
416  --ecuid ECUID         The user id at ECMWF. <span class="o">(</span>default: None<span class="o">)</span>
417  --ecgid ECGID         The group id at ECMWF. <span class="o">(</span>default: None<span class="o">)</span>
418  --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>
419  --destination DESTINATION
420                        The ecaccess association, e.g. myUser@genericSftp
421                        <span class="o">(</span>default: None<span class="o">)</span>
422  --installdir INSTALLDIR
423                        Root directory where flex_extract will be installed
424                        to. <span class="o">(</span>default: None<span class="o">)</span>
425  --job_template JOB_TEMPLATE
426                        The rudimentary template file to create a batch job
427                        template <span class="k">for</span> submission to ECMWF servers. <span class="o">(</span>default:
428                        job.template<span class="o">)</span>
429  --controlfile CONTROLFILE
430                        The file with all CONTROL parameters. <span class="o">(</span>default:
431                        CONTROL_EA5<span class="o">)</span>
432</pre></div>
433</div>
434<div class="toctree-wrapper compound">
435</div>
436</div>
437</div>
438
439
440           </div>
441           
442          </div>
443          <footer>
444 
445    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
446     
447        <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>
448     
449     
450        <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>
451     
452    </div>
453 
454
455  <hr/>
456
457  <div role="contentinfo">
458    <p>
459        &copy; Copyright 2020, Anne Philipp, Leopold Haimberger and Petra Seibert
460
461    </p>
462  </div>
463  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>.
464
465</footer>
466
467        </div>
468      </div>
469
470    </section>
471
472  </div>
473 
474
475
476  <script type="text/javascript">
477      jQuery(function () {
478          SphinxRtdTheme.Navigation.enable(true);
479      });
480  </script>
481
482 
483 
484   
485   
486
487</body>
488</html>
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG