source: flex_extract.git/Documentation/html/Installation/local.html @ a9d33f6

ctbtodev
Last change on this file since a9d33f6 was 5920b7f, checked in by anphi <anne.philipp@…>, 4 years ago

New compilation of Sphinx after extensive review in language/content/understanding

  • Property mode set to 100644
File size: 32.5 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 alpha documentation</title>
12 
13
14 
15 
16 
17 
18
19 
20  <script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
21 
22   
23      <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
24        <script src="../_static/jquery.js"></script>
25        <script src="../_static/underscore.js"></script>
26        <script src="../_static/doctools.js"></script>
27        <script src="../_static/language_data.js"></script>
28        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
29   
30    <script type="text/javascript" src="../_static/js/theme.js"></script>
31
32   
33
34 
35  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
36  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
37  <link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />
38  <link rel="stylesheet" href="../_static/css/theme_overrides.css" type="text/css" />
39    <link rel="index" title="Index" href="../genindex.html" />
40    <link rel="search" title="Search" href="../search.html" />
41    <link rel="next" title="Quick Start" 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
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 current"><a class="reference internal" href="../installation.html">Installation</a><ul class="current">
93<li class="toctree-l2"><a class="reference internal" href="../installation.html#registration-at-ecmwf">Registration at ECMWF</a></li>
94<li class="toctree-l2"><a class="reference internal" href="../installation.html#accept-licences-for-public-datasets">Accept licences for public datasets</a></li>
95<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>
96<li class="toctree-l2"><a class="reference internal" href="../installation.html#dependencies">Dependencies</a></li>
97<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">
98<li class="toctree-l3"><a class="reference internal" href="remote.html">Remote mode installation</a></li>
99<li class="toctree-l3"><a class="reference internal" href="gateway.html">Gateway mode installation</a></li>
100<li class="toctree-l3 current"><a class="current reference internal" href="#">Local mode installation</a><ul>
101<li class="toctree-l4"><a class="reference internal" href="#local-mode-dependencies">Local mode - dependencies</a></li>
102<li class="toctree-l4"><a class="reference internal" href="#preparing-the-local-environment">Preparing the local environment</a></li>
103<li class="toctree-l4"><a class="reference internal" href="#testing-the-local-environment">Testing the local environment</a></li>
104<li class="toctree-l4"><a class="reference internal" href="#local-installation">Local installation</a></li>
105</ul>
106</li>
107</ul>
108</li>
109<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>
110<li class="toctree-l2"><a class="reference internal" href="../installation.html#test-installation">Test installation</a></li>
111</ul>
112</li>
113<li class="toctree-l1"><a class="reference internal" href="../quick_start.html">Quick Start</a></li>
114<li class="toctree-l1"><a class="reference internal" href="../ecmwf_data.html">ECMWF Data</a></li>
115<li class="toctree-l1"><a class="reference internal" href="../documentation.html">Documentation</a></li>
116<li class="toctree-l1"><a class="reference internal" href="../evaluation.html">Evaluation</a></li>
117<li class="toctree-l1"><a class="reference internal" href="../dev_guide.html">Developer Guide</a></li>
118<li class="toctree-l1"><a class="reference internal" href="../changelog.html">Changelog</a></li>
119<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
120<li class="toctree-l1"><a class="reference internal" href="../Support/faq.html">FAQ - Frequently asked questions</a></li>
121<li class="toctree-l1"><a class="reference internal" href="../authors.html">Developer Team</a></li>
122</ul>
123
124           
125         
126        </div>
127      </div>
128    </nav>
129
130    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
131
132     
133      <nav class="wy-nav-top" aria-label="top navigation">
134       
135          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
136          <a href="../index.html">flex_extract</a>
137       
138      </nav>
139
140
141      <div class="wy-nav-content">
142       
143        <div class="rst-content">
144       
145         
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161<div role="navigation" aria-label="breadcrumbs navigation">
162
163  <ul class="wy-breadcrumbs">
164   
165      <li><a href="../index.html">Docs</a> &raquo;</li>
166       
167          <li><a href="../installation.html">Installation</a> &raquo;</li>
168       
169      <li>Local mode installation</li>
170   
171   
172      <li class="wy-breadcrumbs-aside">
173       
174           
175            <a href="../_sources/Installation/local.rst.txt" rel="nofollow"> View page source</a>
176         
177       
178      </li>
179   
180  </ul>
181
182 
183  <hr/>
184</div>
185          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
186           <div itemprop="articleBody">
187           
188  <div class="section" id="local-mode-installation">
189<h1>Local mode installation<a class="headerlink" href="#local-mode-installation" title="Permalink to this headline"></a></h1>
190<div class="toctree-wrapper compound">
191</div>
192<div class="section" id="local-mode-dependencies">
193<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>
194<p>The installation is the same for the access modes <strong>member</strong> and <strong>public</strong>.</p>
195<p>The environment on your local system has to provide the following software packages
196and libraries, since the preparation of the extraction and the post-processing is done on the local machine:</p>
197<table class="docutils align-default">
198<colgroup>
199<col style="width: 74%" />
200<col style="width: 26%" />
201</colgroup>
202<tbody>
203<tr class="row-odd"><td><p>Python part</p></td>
204<td><p>Fortran part</p></td>
205</tr>
206<tr class="row-even"><td><ol class="arabic simple">
207<li><p><a class="reference external" href="https://www.python.org/downloads/">Python3</a></p></li>
208<li><p><a class="reference external" href="http://www.numpy.org/">numpy</a></p></li>
209<li><p><a class="reference external" href="https://genshi.edgewall.org/">genshi</a></p></li>
210<li><p><a class="reference external" href="https://packages.debian.org/sid/python3-eccodes">eccodes for python</a></p></li>
211<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>
212<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>
213</ol>
214</td>
215<td><ol class="arabic simple">
216<li><p><a class="reference external" href="https://gcc.gnu.org/wiki/GFortran">gfortran</a></p></li>
217<li><p><a class="reference external" href="http://www.fftw.org">fftw3</a></p></li>
218<li><p><a class="reference external" href="https://software.ecmwf.int/wiki/display/ECC">eccodes</a></p></li>
219<li><p><a class="reference external" href="https://software.ecmwf.int/wiki/display/EMOS/Emoslib">emoslib</a></p></li>
220</ol>
221</td>
222</tr>
223</tbody>
224</table>
225</div>
226<div class="section" id="preparing-the-local-environment">
227<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>
228<p>The easiest way to install all required packages is to use the package management system of your Linux distribution which requires admin rights.
229The installation was tested on a <em>Debian GNU/Linux buster</em> and an <em>Ubuntu 18.04 Bionic Beaver</em> system.</p>
230<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>
231<span class="c1"># you may use the following commands (or equivalent commands of your preferred package manager):</span>
232<span class="c1"># (if respective packages are not already available):</span>
233 apt-get install python3 <span class="o">(</span>usually already available on GNU/Linux systems<span class="o">)</span>
234 apt-get install python3-eccodes
235 apt-get install python3-genshi
236 apt-get install python3-numpy
237 apt-get install gfortran
238 apt-get install fftw3-dev
239 apt-get install libeccodes-dev
240 apt-get install libemos-dev
241<span class="c1"># Some of these packages will pull in further packages as dependencies.</span>
242<span class="c1"># This is fine, and some are even needed by ``flex_extract&#39;&#39;.</span>
243
244<span class="c1"># As currently the CDS and ECMWF API packages are not available as Debian packages,</span>
245<span class="c1"># they need to be installed outside of the Debian (Ubuntu etc.) package management system.</span>
246<span class="c1"># The recommended way is:</span>
247 apt-get install pip
248 pip install cdsapi
249 pip install ecmwf-api-client
250</pre></div>
251</div>
252<div class="admonition note">
253<p class="admonition-title">Note</p>
254<p>If you are using Anaconda Python, we recommend to follow the installation instructions of
255<a class="reference external" href="https://docs.anaconda.com/anaconda/install/linux/">Anaconda Python Installation for Linux</a>
256and 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>
257<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>conda install conda-forge::python-eccodes
258</pre></div>
259</div>
260</div>
261<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>
262<div class="admonition note">
263<p class="admonition-title">Note</p>
264<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>
265</div>
266<p>Both user groups have to provide keys with their credentials for the Web APIs in their home directory, following these instructions:</p>
267<dl class="simple">
268<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>
269</dd>
270<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>
271</dd>
272</dl>
273</div>
274<div class="section" id="testing-the-local-environment">
275<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>
276<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:
277.. code-block:: python</p>
278<blockquote>
279<div><p># check in python3 console
280import eccodes
281import genshi
282import numpy
283import cdsapi
284import ecmwfapi</p>
285</div></blockquote>
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>First, adapt the Fortran <code class="docutils literal notranslate"><span class="pre">makefile</span></code> for your environment (if necessary) and insert it into <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code> script (see <a class="reference internal" href="../Documentation/Input/fortran_makefile.html#ref-convert"><span class="std std-ref">Fortran Makefile</span></a> for more information).
397They can be found at <code class="docutils literal notranslate"><span class="pre">flex_extract_vX.X/Source/Fortran/</span></code>, where <code class="docutils literal notranslate"><span class="pre">vX.X</span></code> should be substituted by the current flex_extract version number.</p>
398<div class="admonition caution">
399<p class="admonition-title">Caution</p>
400<p>It is necessary to adapt <strong>ECCODES_INCLUDE_DIR</strong> and <strong>ECCODES_LIB</strong> in these
401<code class="docutils literal notranslate"><span class="pre">makefiles</span></code> if other than standard paths are used.</p>
402</div>
403<p>Thus, go to the <code class="docutils literal notranslate"><span class="pre">Fortran</span></code> source directory and open the <code class="docutils literal notranslate"><span class="pre">makefile</span></code> of your
404choice, and check / modify with an editor of your choice:</p>
405<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> flex_extract_vX.X/Source/Fortran
406nedit makefile_fast
407</pre></div>
408</div>
409<p>Set the paths to the <code class="docutils literal notranslate"><span class="pre">eccodes</span></code> library on your local machine, if necessary.</p>
410<div class="admonition caution">
411<p class="admonition-title">Caution</p>
412<p>This can vary from system to system.
413It is suggested to use a command like</p>
414<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># for the ECCODES_INCLUDE_DIR path do:</span>
415$ dpkg -L libeccodes-dev <span class="p">|</span> grep eccodes.mod
416<span class="c1"># for the ECCODES_LIB path do:</span>
417$ dpkg -L libeccodes-dev <span class="p">|</span> grep libeccodes.so
418</pre></div>
419</div>
420<p>to find out the path to the <code class="docutils literal notranslate"><span class="pre">eccodes</span></code> library.</p>
421</div>
422<p>Assign these paths to the parameters <strong>ECCODES_INCLUDE_DIR</strong>
423and <strong>ECCODES_LIB</strong> in the makefile, and save it.</p>
424<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># these are the paths on Debian Buster:</span>
425<span class="nv">ECCODES_INCLUDE_DIR</span><span class="o">=</span>/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/
426<span class="nv">ECCODES_LIB</span><span class="o">=</span> -L/usr/lib -leccodes_f90 -leccodes -lm
427</pre></div>
428</div>
429<p>The Fortran program called <code class="docutils literal notranslate"><span class="pre">calc_etadot</span></code> will be compiled during the
430installation process. Therefore, the name of the <code class="docutils literal notranslate"><span class="pre">makefile</span></code> to be used needs to be given in  <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code>.</p>
431<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.sh</span></code> script
432with an editor and adapt the installation parameters in the section labelled with
433“AVAILABLE COMMANDLINE ARGUMENTS TO SET” as shown below:</p>
434<div class="literal-block-wrapper docutils container" id="setup-sh">
435<div class="code-block-caption"><span class="caption-text">‘Example settings for a local installation.’</span><a class="headerlink" href="#setup-sh" title="Permalink to this code"></a></div>
436<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>...
437<span class="c1"># -----------------------------------------------------------------</span>
438<span class="c1"># AVAILABLE COMMANDLINE ARGUMENTS TO SET</span>
439<span class="c1">#</span>
440<span class="c1"># THE USER HAS TO SPECIFY THESE PARAMETER</span>
441<span class="c1">#</span>
442<span class="nv">TARGET</span><span class="o">=</span><span class="s1">&#39;local&#39;</span>
443<span class="nv">MAKEFILE</span><span class="o">=</span><span class="s1">&#39;makefile_fast&#39;</span>
444<span class="nv">ECUID</span><span class="o">=</span>None
445<span class="nv">ECGID</span><span class="o">=</span>None
446<span class="nv">GATEWAY</span><span class="o">=</span>None
447<span class="nv">DESTINATION</span><span class="o">=</span>None
448<span class="nv">INSTALLDIR</span><span class="o">=</span>None
449<span class="nv">JOB_TEMPLATE</span><span class="o">=</span><span class="s1">&#39;job.template&#39;</span>
450<span class="nv">CONTROLFILE</span><span class="o">=</span><span class="s1">&#39;CONTROL_EA5&#39;</span>
451...
452</pre></div>
453</div>
454</div>
455<p>Afterwards, type:</p>
456<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ./setup.sh
457</pre></div>
458</div>
459<p>to start the installation. You should see the following standard output.</p>
460<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># Output of setup.sh</span>
461    WARNING: installdir has not been specified
462    flex_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
463    Install flex_extract_v7.1 software at <span class="nb">local</span> in directory &lt;path-to-flex_extract&gt;/flex_extract_v7.1
464
465    Using makefile: makefile_fast
466    gfortran   -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c     ./rwgrib2.f90
467    gfortran   -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c     ./phgrreal.f90
468    gfortran   -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c     ./grphreal.f90
469    gfortran   -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c     ./ftrafo.f90
470    gfortran   -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c     ./calc_etadot.f90
471    gfortran   -O3 -march<span class="o">=</span>native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert<span class="o">=</span>big-endian   -c     ./posnam.f90
472    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 -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper -lemosR64 -fopenmp
473    ln -sf calc_etadot_fast.out calc_etadot
474
475    lrwxrwxrwx. <span class="m">1</span> &lt;username&gt; tmc <span class="m">20</span> <span class="m">15</span>. Mär <span class="m">13</span>:31 ./calc_etadot -&gt; calc_etadot_fast.out
476</pre></div>
477</div>
478</div>
479</div>
480
481
482           </div>
483           
484          </div>
485          <footer>
486 
487    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
488     
489        <a href="../quick_start.html" class="btn btn-neutral float-right" title="Quick Start" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
490     
491     
492        <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>
493     
494    </div>
495 
496
497  <hr/>
498
499  <div role="contentinfo">
500    <p>
501        &copy; Copyright 2020, Anne Philipp and Leopold Haimberger
502
503    </p>
504  </div>
505  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>.
506
507</footer>
508
509        </div>
510      </div>
511
512    </section>
513
514  </div>
515 
516
517
518  <script type="text/javascript">
519      jQuery(function () {
520          SphinxRtdTheme.Navigation.enable(true);
521      });
522  </script>
523
524 
525 
526   
527   
528
529</body>
530</html>
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG