source: flex_extract.git/Documentation/html/Installation/local.html @ 903ed4f

dev
Last change on this file since 903ed4f was 903ed4f, checked in by anphi <anne.philipp@…>, 4 years ago

spell correction

  • Property mode set to 100644
File size: 36.9 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>Local mode installation &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="Usage" href="../quick_start.html" />
42    <link rel="prev" title="Gateway mode installation" href="gateway.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 current"><a class="reference internal" href="../installation.html">Installation</a><ul class="current">
94<li class="toctree-l2"><a class="reference internal" href="../installation.html#registration-at-ecmwf">Registration at ECMWF</a></li>
95<li class="toctree-l2"><a class="reference internal" href="../installation.html#accept-licences-for-public-datasets">Accept licences for public datasets</a></li>
96<li class="toctree-l2"><a class="reference internal" href="../installation.html#download-flex-extract">Download <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code></a></li>
97<li class="toctree-l2"><a class="reference internal" href="../installation.html#dependencies">Dependencies</a></li>
98<li class="toctree-l2 current"><a class="reference internal" href="../installation.html#installation-of-flex-extract">Installation of <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code></a><ul class="current">
99<li class="toctree-l3"><a class="reference internal" href="remote.html">Remote mode installation</a></li>
100<li class="toctree-l3"><a class="reference internal" href="gateway.html">Gateway mode installation</a></li>
101<li class="toctree-l3 current"><a class="current reference internal" href="#">Local mode installation</a><ul>
102<li class="toctree-l4"><a class="reference internal" href="#local-mode-dependencies">Local mode - dependencies</a></li>
103<li class="toctree-l4"><a class="reference internal" href="#preparing-the-local-environment">Preparing the local environment</a></li>
104<li class="toctree-l4"><a class="reference internal" href="#testing-the-local-environment">Testing the local environment</a></li>
105<li class="toctree-l4"><a class="reference internal" href="#local-installation">Local installation</a></li>
106<li class="toctree-l4"><a class="reference internal" href="#local-system-installation">Local system installation</a></li>
107</ul>
108</li>
109</ul>
110</li>
111<li class="toctree-l2"><a class="reference internal" href="../installation.html#flex-extract-in-combination-with-flexpart"><code class="docutils literal notranslate"><span class="pre">Flex_extract</span></code> in combination with <code class="docutils literal notranslate"><span class="pre">FLEXPART</span></code></a></li>
112<li class="toctree-l2"><a class="reference internal" href="../installation.html#test-installation">Test installation</a></li>
113</ul>
114</li>
115<li class="toctree-l1"><a class="reference internal" href="../quick_start.html">Usage</a></li>
116<li class="toctree-l1"><a class="reference internal" href="../documentation.html">Code-Level Documentation</a></li>
117<li class="toctree-l1"><a class="reference internal" href="../evaluation.html">Evaluation</a></li>
118<li class="toctree-l1"><a class="reference internal" href="../dev_guide.html">Developer Guide</a></li>
119<li class="toctree-l1"><a class="reference internal" href="../changelog.html">Changelog</a></li>
120<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
121<li class="toctree-l1"><a class="reference internal" href="../Support/faq.html">FAQ - Frequently asked questions</a></li>
122<li class="toctree-l1"><a class="reference internal" href="../authors.html">Developer Team</a></li>
123</ul>
124
125           
126         
127        </div>
128      </div>
129    </nav>
130
131    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
132
133     
134      <nav class="wy-nav-top" aria-label="top navigation">
135       
136          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
137          <a href="../index.html">flex_extract</a>
138       
139      </nav>
140
141
142      <div class="wy-nav-content">
143       
144        <div class="rst-content">
145       
146         
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162<div role="navigation" aria-label="breadcrumbs navigation">
163
164  <ul class="wy-breadcrumbs">
165   
166      <li><a href="../index.html">Docs</a> &raquo;</li>
167       
168          <li><a href="../installation.html">Installation</a> &raquo;</li>
169       
170      <li>Local mode installation</li>
171   
172   
173      <li class="wy-breadcrumbs-aside">
174       
175           
176            <a href="../_sources/Installation/local.rst.txt" rel="nofollow"> View page source</a>
177         
178       
179      </li>
180   
181  </ul>
182
183 
184  <hr/>
185</div>
186          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
187           <div itemprop="articleBody">
188           
189  <div class="section" id="local-mode-installation">
190<h1>Local mode installation<a class="headerlink" href="#local-mode-installation" title="Permalink to this headline"></a></h1>
191<div class="toctree-wrapper compound">
192</div>
193<div class="section" id="local-mode-dependencies">
194<span id="ref-req-local"></span><span id="ref-local-mode"></span><h2>Local mode - dependencies<a class="headerlink" href="#local-mode-dependencies" title="Permalink to this headline"></a></h2>
195<p>The installation is the same for the access modes <strong>member</strong> and <strong>public</strong>.</p>
196<p>The environment on your local system has to provide the following software packages
197and libraries, since the preparation of the extraction and the post-processing is done on the local machine:</p>
198<table class="docutils align-default">
199<colgroup>
200<col style="width: 75%" />
201<col style="width: 25%" />
202</colgroup>
203<tbody>
204<tr class="row-odd"><td><p>Python code</p></td>
205<td><p>Fortran code</p></td>
206</tr>
207<tr class="row-even"><td><ul class="simple">
208<li><p><a class="reference external" href="https://www.python.org/">Python3</a></p></li>
209<li><p><a class="reference external" href="http://www.numpy.org/">numpy</a></p></li>
210<li><p><a class="reference external" href="https://genshi.edgewall.org/">genshi</a></p></li>
211<li><p><a class="reference external" href="https://pypi.org/project/eccodes/">eccodes for python</a></p></li>
212<li><p><a class="reference external" href="https://confluence.ecmwf.int/display/WEBAPI/ECMWF+Web+API+Home">ecmwf-api-client</a> (everything except ERA5)</p></li>
213<li><p><a class="reference external" href="https://cds.climate.copernicus.eu/api-how-to">cdsapi</a> (just for ERA5 and member user)</p></li>
214</ul>
215</td>
216<td><ul class="simple">
217<li><p><a class="reference external" href="https://gcc.gnu.org/wiki/GFortran">gfortran</a></p></li>
218<li><p><a class="reference external" href="http://www.fftw.org">fftw3</a></p></li>
219<li><p><a class="reference external" href="https://software.ecmwf.int/wiki/display/ECC">eccodes</a></p></li>
220<li><p><a class="reference external" href="https://software.ecmwf.int/wiki/display/EMOS/Emoslib">emoslib</a></p></li>
221</ul>
222</td>
223</tr>
224</tbody>
225</table>
226</div>
227<div class="section" id="preparing-the-local-environment">
228<span id="ref-prep-local"></span><h2>Preparing the local environment<a class="headerlink" href="#preparing-the-local-environment" title="Permalink to this headline"></a></h2>
229<p>The easiest way to install all required packages is to use the package management system of your Linux distribution which requires admin rights.
230The installation was tested on a <em>Debian GNU/Linux buster</em> and an <em>Ubuntu 18.04 Bionic Beaver</em> system.</p>
231<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># On a Debian or Debian-derived (e. g. Ubuntu) system,</span>
232<span class="c1"># you may use the following commands (or equivalent commands of your preferred package manager):</span>
233<span class="c1"># (if respective packages are not already available):</span>
234 apt-get install python3 <span class="o">(</span>usually already available on GNU/Linux systems<span class="o">)</span>
235 apt-get install python3-eccodes
236 apt-get install python3-genshi
237 apt-get install python3-numpy
238 apt-get install gfortran
239 apt-get install fftw3-dev
240 apt-get install libeccodes-dev
241 apt-get install libemos-dev
242<span class="c1"># Some of these packages will pull in further packages as dependencies.</span>
243<span class="c1"># This is fine, and some are even needed by ``flex_extract&#39;&#39;.</span>
244
245<span class="c1"># As currently the CDS and ECMWF API packages are not available as Debian packages,</span>
246<span class="c1"># they need to be installed outside of the Debian (Ubuntu etc.) package management system.</span>
247<span class="c1"># The recommended way is:</span>
248 apt-get install pip
249 pip install cdsapi
250 pip install ecmwf-api-client
251</pre></div>
252</div>
253<div class="admonition note">
254<p class="admonition-title">Note</p>
255<p>If you are using Anaconda Python, we recommend to follow the installation instructions of
256<a class="reference external" href="https://docs.anaconda.com/anaconda/install/linux/">Anaconda Python Installation for Linux</a>
257and then install the <code class="docutils literal notranslate"><span class="pre">eccodes</span></code> package from <code class="docutils literal notranslate"><span class="pre">conda</span></code> with:</p>
258<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>conda install conda-forge::python-eccodes
259</pre></div>
260</div>
261</div>
262<p>The CDS API (<code class="docutils literal notranslate"><span class="pre">cdsapi</span></code>) is required for ERA5 data and the ECMWF Web API (ecmwf-api-client) for all other public datasets.</p>
263<div class="admonition note">
264<p class="admonition-title">Note</p>
265<p>Since <strong>public users</strong> currently don’t have access to the full <em>ERA5</em> dataset, they can skip the installation of the CDS API.</p>
266</div>
267<p>Both user groups have to provide keys with their credentials for the Web APIs in their home directory, following these instructions:</p>
268<dl class="simple">
269<dt>ECMWF Web API:</dt><dd><p>Go to the <a class="reference external" href="https://confluence.ecmwf.int//display/WEBAPI/Access+MARS">MARS access</a> website and log in with your credentials. Afterwards, go to the section “Install ECMWF KEY”, where the key for the ECMWF Web API should be listed. Please follow the instructions in this section under 1 (save the key in a file <code class="docutils literal notranslate"><span class="pre">.ecmwfapirc</span></code> in your home directory).</p>
270</dd>
271<dt>CDS API:</dt><dd><p>Go to <a class="reference external" href="https://cds.climate.copernicus.eu/user/register">CDS API registration</a> and register there, too. Log in on the <a class="reference external" href="https://cds.climate.copernicus.eu/api-how-to">cdsapi</a> website and follow the instructions in the section “Install the CDS API key” to save your credentials in file <code class="docutils literal notranslate"><span class="pre">.cdsapirc</span></code>.</p>
272</dd>
273</dl>
274</div>
275<div class="section" id="testing-the-local-environment">
276<span id="ref-test-local"></span><h2>Testing the local environment<a class="headerlink" href="#testing-the-local-environment" title="Permalink to this headline"></a></h2>
277<p>Check the availability of the python packages by typing <code class="docutils literal notranslate"><span class="pre">python3</span></code> in a terminal window and run the <code class="docutils literal notranslate"><span class="pre">import</span></code> commands in the python shell:</p>
278<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># check in python3 console</span>
279<span class="kn">import</span> <span class="nn">eccodes</span>
280<span class="kn">import</span> <span class="nn">genshi</span>
281<span class="kn">import</span> <span class="nn">numpy</span>
282<span class="kn">import</span> <span class="nn">cdsapi</span>
283<span class="kn">import</span> <span class="nn">ecmwfapi</span>
284</pre></div>
285</div>
286<p>If there are no error messages, you succeeded in setting up the environment.</p>
287<div class="section" id="testing-the-web-apis">
288<h3>Testing the Web APIs<a class="headerlink" href="#testing-the-web-apis" title="Permalink to this headline"></a></h3>
289<p>You can start very simple test retrievals for both Web APIs to be sure that everything works. This is recommended to minimise the range of possible errors using <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code> later on.</p>
290<div class="section" id="ecmwf-web-api">
291<h4>ECMWF Web API<a class="headerlink" href="#ecmwf-web-api" title="Permalink to this headline"></a></h4>
292<table class="docutils align-default">
293<colgroup>
294<col style="width: 50%" />
295<col style="width: 50%" />
296</colgroup>
297<tbody>
298<tr class="row-odd"><td><p>Please use this Python code snippet as a <strong>Member user</strong>:</p></td>
299<td><p>Please use this Python code snippet as a <strong>Public user</strong>:</p></td>
300</tr>
301<tr class="row-even"><td><div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">ecmwfapi</span> <span class="kn">import</span> <span class="n">ECMWFService</span>
302
303<span class="n">server</span> <span class="o">=</span> <span class="n">ECMWFService</span><span class="p">(</span><span class="s1">&#39;mars&#39;</span><span class="p">)</span>
304
305<span class="n">server</span><span class="o">.</span><span class="n">retrieve</span><span class="p">({</span>
306    <span class="s1">&#39;stream&#39;</span>    <span class="p">:</span> <span class="s2">&quot;oper&quot;</span><span class="p">,</span>
307    <span class="s1">&#39;levtype&#39;</span>   <span class="p">:</span> <span class="s2">&quot;sfc&quot;</span><span class="p">,</span>
308    <span class="s1">&#39;param&#39;</span>     <span class="p">:</span> <span class="s2">&quot;165.128/166.128/167.128&quot;</span><span class="p">,</span>
309    <span class="s1">&#39;dataset&#39;</span>   <span class="p">:</span> <span class="s2">&quot;interim&quot;</span><span class="p">,</span>
310    <span class="s1">&#39;step&#39;</span>      <span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
311    <span class="s1">&#39;grid&#39;</span>      <span class="p">:</span> <span class="s2">&quot;0.75/0.75&quot;</span><span class="p">,</span>
312    <span class="s1">&#39;time&#39;</span>      <span class="p">:</span> <span class="s2">&quot;00/06/12/18&quot;</span><span class="p">,</span>
313    <span class="s1">&#39;date&#39;</span>      <span class="p">:</span> <span class="s2">&quot;2014-07-01/to/2014-07-31&quot;</span><span class="p">,</span>
314    <span class="s1">&#39;type&#39;</span>      <span class="p">:</span> <span class="s2">&quot;an&quot;</span><span class="p">,</span>
315    <span class="s1">&#39;class&#39;</span>     <span class="p">:</span> <span class="s2">&quot;ei&quot;</span><span class="p">,</span>
316    <span class="s1">&#39;target&#39;</span>    <span class="p">:</span> <span class="s2">&quot;download_erainterim_ecmwfapi.grib&quot;</span>
317<span class="p">})</span>
318</pre></div>
319</div>
320</td>
321<td><div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">ecmwfapi</span> <span class="kn">import</span> <span class="n">ECMWFDataServer</span>
322
323<span class="n">server</span> <span class="o">=</span> <span class="n">ECMWFDataServer</span><span class="p">()</span>
324
325<span class="n">server</span><span class="o">.</span><span class="n">retrieve</span><span class="p">({</span>
326    <span class="s1">&#39;stream&#39;</span>    <span class="p">:</span> <span class="s2">&quot;enda&quot;</span><span class="p">,</span>
327    <span class="s1">&#39;levtype&#39;</span>   <span class="p">:</span> <span class="s2">&quot;sfc&quot;</span><span class="p">,</span>
328    <span class="s1">&#39;param&#39;</span>     <span class="p">:</span> <span class="s2">&quot;165.128/166.128/167.128&quot;</span><span class="p">,</span>
329    <span class="s1">&#39;dataset&#39;</span>   <span class="p">:</span> <span class="s2">&quot;cera20c&quot;</span><span class="p">,</span>
330    <span class="s1">&#39;step&#39;</span>      <span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
331    <span class="s1">&#39;grid&#39;</span>      <span class="p">:</span> <span class="s2">&quot;1./1.&quot;</span><span class="p">,</span>
332    <span class="s1">&#39;time&#39;</span>      <span class="p">:</span> <span class="s2">&quot;00/06/12/18&quot;</span><span class="p">,</span>
333    <span class="s1">&#39;date&#39;</span>      <span class="p">:</span> <span class="s2">&quot;2000-07-01/to/2000-07-31&quot;</span><span class="p">,</span>
334    <span class="s1">&#39;type&#39;</span>      <span class="p">:</span> <span class="s2">&quot;an&quot;</span><span class="p">,</span>
335    <span class="s1">&#39;class&#39;</span>     <span class="p">:</span> <span class="s2">&quot;ep&quot;</span><span class="p">,</span>
336    <span class="s1">&#39;target&#39;</span>    <span class="p">:</span> <span class="s2">&quot;download_cera20c_ecmwfapi.grib&quot;</span>
337<span class="p">})</span>
338</pre></div>
339</div>
340</td>
341</tr>
342</tbody>
343</table>
344</div>
345<div class="section" id="cds-api">
346<h4>CDS API<a class="headerlink" href="#cds-api" title="Permalink to this headline"></a></h4>
347<p>Extraction of ERA5 data via CDS API might take time as currently there is a high demand for ERA5 data. Therefore, as a simple test for the API just retrieve pressure-level data (even if that is NOT what we need for FLEXPART), as they are stored on disk and don’t need to be retrieved from MARS (which is the time-consuming action):</p>
348<p>Please use the following Python code snippet to retrieve a small sample of <em>ERA5</em> pressure level data:</p>
349<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">cdsapi</span>
350
351<span class="n">c</span> <span class="o">=</span> <span class="n">cdsapi</span><span class="o">.</span><span class="n">Client</span><span class="p">()</span>
352
353<span class="n">c</span><span class="o">.</span><span class="n">retrieve</span><span class="p">(</span><span class="s2">&quot;reanalysis-era5-pressure-levels&quot;</span><span class="p">,</span>
354<span class="p">{</span>
355<span class="s2">&quot;variable&quot;</span><span class="p">:</span> <span class="s2">&quot;temperature&quot;</span><span class="p">,</span>
356<span class="s2">&quot;pressure_level&quot;</span><span class="p">:</span> <span class="s2">&quot;1000&quot;</span><span class="p">,</span>
357<span class="s2">&quot;product_type&quot;</span><span class="p">:</span> <span class="s2">&quot;reanalysis&quot;</span><span class="p">,</span>
358<span class="s2">&quot;year&quot;</span><span class="p">:</span> <span class="s2">&quot;2008&quot;</span><span class="p">,</span>
359<span class="s2">&quot;month&quot;</span><span class="p">:</span> <span class="s2">&quot;01&quot;</span><span class="p">,</span>
360<span class="s2">&quot;day&quot;</span><span class="p">:</span> <span class="s2">&quot;01&quot;</span><span class="p">,</span>
361<span class="s2">&quot;time&quot;</span><span class="p">:</span> <span class="s2">&quot;12:00&quot;</span><span class="p">,</span>
362<span class="s2">&quot;format&quot;</span><span class="p">:</span> <span class="s2">&quot;grib&quot;</span>
363<span class="p">},</span>
364<span class="s2">&quot;download_cdsapi.grib&quot;</span><span class="p">)</span>
365</pre></div>
366</div>
367<p>If you know that your CDS API works, you can try to extract some data from MARS.</p>
368<p>Please use the following Python code snippet to retrieve a small <em>ERA5</em> data sample as a <strong>member-state user</strong>! The <strong>Public user</strong> do not have access to the full <em>ERA5</em> dataset!</p>
369<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">cdsapi</span>
370
371<span class="n">c</span> <span class="o">=</span> <span class="n">cdsapi</span><span class="o">.</span><span class="n">Client</span><span class="p">()</span>
372
373<span class="n">c</span><span class="o">.</span><span class="n">retrieve</span><span class="p">(</span><span class="s1">&#39;reanalysis-era5-complete&#39;</span><span class="p">,</span>
374<span class="p">{</span>
375    <span class="s1">&#39;class&#39;</span>   <span class="p">:</span> <span class="s1">&#39;ea&#39;</span><span class="p">,</span>
376    <span class="s1">&#39;expver&#39;</span>  <span class="p">:</span> <span class="s1">&#39;1&#39;</span><span class="p">,</span>
377    <span class="s1">&#39;stream&#39;</span>  <span class="p">:</span> <span class="s1">&#39;oper&#39;</span><span class="p">,</span>
378    <span class="s1">&#39;type&#39;</span>    <span class="p">:</span> <span class="s1">&#39;fc&#39;</span><span class="p">,</span>
379    <span class="s1">&#39;step&#39;</span>    <span class="p">:</span> <span class="s1">&#39;3/to/12/by/3&#39;</span><span class="p">,</span>
380    <span class="s1">&#39;param&#39;</span>   <span class="p">:</span> <span class="s1">&#39;130.128&#39;</span><span class="p">,</span>
381    <span class="s1">&#39;levtype&#39;</span> <span class="p">:</span> <span class="s1">&#39;ml&#39;</span><span class="p">,</span>
382    <span class="s1">&#39;levelist&#39;</span><span class="p">:</span> <span class="s1">&#39;135/to/137&#39;</span><span class="p">,</span>
383    <span class="s1">&#39;date&#39;</span>    <span class="p">:</span> <span class="s1">&#39;2013-01-01&#39;</span><span class="p">,</span>
384    <span class="s1">&#39;time&#39;</span>    <span class="p">:</span> <span class="s1">&#39;06/18&#39;</span><span class="p">,</span>
385    <span class="s1">&#39;area&#39;</span>    <span class="p">:</span> <span class="s1">&#39;50/-5/40/5&#39;</span><span class="p">,</span>
386    <span class="s1">&#39;grid&#39;</span>    <span class="p">:</span> <span class="s1">&#39;1.0/1.0&#39;</span><span class="p">,</span>
387    <span class="s1">&#39;format&#39;</span>  <span class="p">:</span> <span class="s1">&#39;grib&#39;</span><span class="p">,</span>
388<span class="p">},</span> <span class="s1">&#39;download_era5_cdsapi.grib&#39;</span><span class="p">)</span>
389</pre></div>
390</div>
391</div>
392</div>
393</div>
394<div class="section" id="local-installation">
395<span id="ref-install-local"></span><h2>Local installation<a class="headerlink" href="#local-installation" title="Permalink to this headline"></a></h2>
396<p>The Fortran program called <code class="docutils literal notranslate"><span class="pre">calc_etadot</span></code> will be compiled during the
397installation process. A suitable makefile (<code class="docutils literal notranslate"><span class="pre">makefile_local_gfortran</span></code>) for the compilation is set by default.
398This may be overwritten by the <code class="docutils literal notranslate"><span class="pre">MAKEFILE</span></code> parameter in <code class="docutils literal notranslate"><span class="pre">setup_local.sh</span></code>.</p>
399<p>However, you may have to adapt the makefile for your environment (the current default makefile works on Debian stretch and similar GNU/Linux distributions). If you use a new name for it, you will have to insert it into <code class="docutils literal notranslate"><span class="pre">setup_local.sh</span></code>
400For details on the makefile and how to adapt them, see <a class="reference internal" href="../Documentation/Input/fortran_makefile.html#ref-convert"><span class="std std-ref">Fortran Makefile</span></a>.</p>
401<p>In the root directory of <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code>, open the <code class="docutils literal notranslate"><span class="pre">setup_local.sh</span></code> script
402with an editor and adapt the installation parameters in the section labelled with
403“AVAILABLE COMMANDLINE ARGUMENTS TO SET” as shown below:</p>
404<div class="literal-block-wrapper docutils container" id="setup-local-sh">
405<div class="code-block-caption"><span class="caption-text">‘Example settings for a local installation.’</span><a class="headerlink" href="#setup-local-sh" title="Permalink to this code"></a></div>
406<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>...
407<span class="c1"># -----------------------------------------------------------------</span>
408<span class="c1"># AVAILABLE COMMANDLINE ARGUMENTS TO SET</span>
409<span class="c1">#</span>
410<span class="c1"># THE USER HAS TO SPECIFY THESE PARAMETER</span>
411<span class="c1">#</span>
412<span class="nv">TARGET</span><span class="o">=</span><span class="s1">&#39;local&#39;</span>
413<span class="nv">MAKEFILE</span><span class="o">=</span>&lt;name_of_your_makefile&gt;
414<span class="nv">ECUID</span><span class="o">=</span>None
415<span class="nv">ECGID</span><span class="o">=</span>None
416<span class="nv">GATEWAY</span><span class="o">=</span>None
417<span class="nv">DESTINATION</span><span class="o">=</span>None
418<span class="nv">INSTALLDIR</span><span class="o">=</span>None
419<span class="nv">SYSINSTALLDIR</span><span class="o">=</span>None
420<span class="nv">JOB_TEMPLATE</span><span class="o">=</span><span class="s1">&#39;&#39;</span>
421<span class="nv">CONTROLFILE</span><span class="o">=</span><span class="s1">&#39;CONTROL_EA5&#39;</span>
422...
423</pre></div>
424</div>
425</div>
426<p>Afterwards, type:</p>
427<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ./setup_local.sh
428</pre></div>
429</div>
430<p>to start the installation. You should see the following standard output.</p>
431<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># Output of setup_local.sh</span>
432WARNING: installdir has not been specified
433flex_extract will be installed in here by compiling the Fortran <span class="nb">source</span> in &lt;path-to-flex_extract&gt;/flex_extract_v7.1/Source/Fortran
434Install flex_extract_v7.1 software at <span class="nb">local</span> in directory &lt;path-to-flex_extract&gt;/flex_extract_v7.1
435
436Using makefile: makefile_local_gfortran
437gfortran   -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c ./rwgrib2.f90
438gfortran   -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c ./phgrreal.f90
439gfortran   -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c ./grphreal.f90
440gfortran   -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c ./ftrafo.f90
441gfortran   -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c ./calc_etadot.f90
442gfortran   -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c ./posnam.f90
443gfortran  rwgrib2.o calc_etadot.o ftrafo.o grphreal.o posnam.o phgrreal.o -o calc_etadot_fast.out  -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper -lemosR64 -fopenmp
444ln -sf calc_etadot_fast.out calc_etadot
445
446lrwxrwxrwx. <span class="m">1</span> &lt;username&gt; tmc <span class="m">20</span> Aug <span class="m">12</span>  <span class="m">10</span>:59 ./calc_etadot -&gt; calc_etadot_fast.out
447</pre></div>
448</div>
449</div>
450<div class="section" id="local-system-installation">
451<h2>Local system installation<a class="headerlink" href="#local-system-installation" title="Permalink to this headline"></a></h2>
452<p>There is also the possibility to separate the software executables from the user application files. For doing so, the <code class="docutils literal notranslate"><span class="pre">TARGET</span></code> parameter can be set to “syslocal” and the additional parameter <code class="docutils literal notranslate"><span class="pre">SYSINSTALLDIR</span></code> in the <code class="docutils literal notranslate"><span class="pre">setup_local.sh</span></code> has to be specified. This new path will contain the Fortran and Python executables of <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code>. If you chose to set a system path for this, please start the script as root.
453The user directory for <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code>, which basically consists of everything except the <code class="docutils literal notranslate"><span class="pre">Source</span></code> directory, will be installed into <code class="docutils literal notranslate"><span class="pre">INSTALLDIR</span></code>.
454In this installation mode, an extra (hidden) <code class="docutils literal notranslate"><span class="pre">.setup.rc</span></code> file will be generated in the <code class="docutils literal notranslate"><span class="pre">Run</span></code> directory. It contains the necessary settings for running the local system mode.</p>
455<p>Despite the change in the <code class="docutils literal notranslate"><span class="pre">TARGET</span></code> parameter, the meaning of <code class="docutils literal notranslate"><span class="pre">INSTALLDIR</span></code> and the additional <code class="docutils literal notranslate"><span class="pre">SYSINSTALLDIR</span></code>, the steps for installation are the same as in the local installation mentioned above. For example, modify the <code class="docutils literal notranslate"><span class="pre">setup_local.sh</span></code> file as follows:</p>
456<div class="literal-block-wrapper docutils container" id="id1">
457<div class="code-block-caption"><span class="caption-text">‘Example settings for a local system installation.’</span><a class="headerlink" href="#id1" title="Permalink to this code"></a></div>
458<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>...
459<span class="c1"># -----------------------------------------------------------------</span>
460<span class="c1"># AVAILABLE COMMANDLINE ARGUMENTS TO SET</span>
461<span class="c1">#</span>
462<span class="c1"># THE USER HAS TO SPECIFY THESE PARAMETER</span>
463<span class="c1">#</span>
464<span class="nv">TARGET</span><span class="o">=</span><span class="s1">&#39;syslocal&#39;</span>
465<span class="nv">MAKEFILE</span><span class="o">=</span>&lt;name_of_your_makefile&gt;
466<span class="nv">ECUID</span><span class="o">=</span>None
467<span class="nv">ECGID</span><span class="o">=</span>None
468<span class="nv">GATEWAY</span><span class="o">=</span>None
469<span class="nv">DESTINATION</span><span class="o">=</span>None
470<span class="nv">INSTALLDIR</span><span class="o">=</span><span class="nv">$HOME</span>
471<span class="nv">SYSINSTALLDIR</span><span class="o">=</span>/usr/bin/
472<span class="nv">JOB_TEMPLATE</span><span class="o">=</span><span class="s1">&#39;&#39;</span>
473<span class="nv">CONTROLFILE</span><span class="o">=</span><span class="s1">&#39;CONTROL_EA5&#39;</span>
474...
475</pre></div>
476</div>
477</div>
478<p>Afterwards, type:</p>
479<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo ./setup_local.sh
480</pre></div>
481</div>
482<p>to start the installation. You should see the following standard output.</p>
483<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>Flex_extract will be installed in &lt;<span class="nv">$HOME</span>&gt;
484Install flex_extract_v7.1.2 software as syslocal in directory /usr/bin/flex_extract_v7.1.2
485
486Using makefile: makefile_local_gfortran
487/usr/local/bin/gfortran   -O3 -march<span class="o">=</span>native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -I. -I/usr/local/include/ -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c     ./rwgrib2.f90
488/usr/local/bin/gfortran   -O3 -march<span class="o">=</span>native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -I. -I/usr/local/include/ -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c     ./phgrreal.f90
489/usr/local/bin/gfortran   -O3 -march<span class="o">=</span>native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -I. -I/usr/local/include/ -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c     ./grphreal.f90
490/usr/local/bin/gfortran   -O3 -march<span class="o">=</span>native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -I. -I/usr/local/include/ -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c     ./ftrafo.f90
491/usr/local/bin/gfortran   -O3 -march<span class="o">=</span>native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -I. -I/usr/local/include/ -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c     ./calc_etadot.f90
492/usr/local/bin/gfortran   -O3 -march<span class="o">=</span>native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -I. -I/usr/local/include/ -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c     ./posnam.f90
493/usr/local/bin/gfortran  rwgrib2.o calc_etadot.o ftrafo.o grphreal.o posnam.o phgrreal.o -o calc_etadot_fast.out  -O3 -march<span class="o">=</span>native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -fopenmp
494ln -sf calc_etadot_fast.out calc_etadot
495
496lrwxrwxrwx. <span class="m">1</span> &lt;username&gt; tmc <span class="m">20</span> <span class="m">27</span>. Okt <span class="m">23</span>:25 ./calc_etadot -&gt; calc_etadot_fast.out
497SUCCESS: INSTALLATION FINISHED!
498</pre></div>
499</div>
500<p>You can now change into the user directory specified in <code class="docutils literal notranslate"><span class="pre">INSTALLDIR</span></code> and find a <code class="docutils literal notranslate"><span class="pre">flex_extract_vX.X</span></code> directory there.</p>
501</div>
502</div>
503
504
505           </div>
506           
507          </div>
508          <footer>
509 
510    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
511     
512        <a href="../quick_start.html" class="btn btn-neutral float-right" title="Usage" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
513     
514     
515        <a href="gateway.html" class="btn btn-neutral float-left" title="Gateway mode installation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
516     
517    </div>
518 
519
520  <hr/>
521
522  <div role="contentinfo">
523    <p>
524        &copy; Copyright 2020, Anne Philipp, Leopold Haimberger and Petra Seibert
525
526    </p>
527  </div>
528  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>.
529
530</footer>
531
532        </div>
533      </div>
534
535    </section>
536
537  </div>
538 
539
540
541  <script type="text/javascript">
542      jQuery(function () {
543          SphinxRtdTheme.Navigation.enable(true);
544      });
545  </script>
546
547 
548 
549   
550   
551
552</body>
553</html>
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG