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

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

updated online docu

  • Property mode set to 100644
File size: 33.4 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 type="text/javascript" src="../_static/jquery.js"></script>
25        <script type="text/javascript" src="../_static/underscore.js"></script>
26        <script type="text/javascript" src="../_static/doctools.js"></script>
27        <script type="text/javascript" src="../_static/language_data.js"></script>
28        <script async="async" type="text/javascript" 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#licence-agreement-for-public-datasets">Licence agreement 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="#prepare-local-environment">Prepare local environment</a></li>
103<li class="toctree-l4"><a class="reference internal" href="#test-local-environment">Test 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 these software packages
196and libraries, since the preparation of the extraction and the post-processing is done on the local machine:</p>
197<table border="1" class="docutils">
198<colgroup>
199<col width="74%" />
200<col width="26%" />
201</colgroup>
202<tbody valign="top">
203<tr class="row-odd"><td>Python part</td>
204<td>Fortran part</td>
205</tr>
206<tr class="row-even"><td><ul class="first last simple">
207<li><a class="reference external" href="https://www.python.org/downloads/">Python3</a></li>
208<li><a class="reference external" href="http://www.numpy.org/">numpy</a></li>
209<li><a class="reference external" href="https://genshi.edgewall.org/">genshi</a></li>
210<li><a class="reference external" href="https://packages.debian.org/sid/python3-eccodes">eccodes for python</a></li>
211<li><a class="reference external" href="https://confluence.ecmwf.int/display/WEBAPI/ECMWF+Web+API+Home">ecmwf-api-client</a> (everything except ERA5)</li>
212<li><a class="reference external" href="https://cds.climate.copernicus.eu/api-how-to">cdsapi</a> (just for ERA5)</li>
213</ul>
214</td>
215<td><ul class="first last simple">
216<li><a class="reference external" href="https://gcc.gnu.org/wiki/GFortran">gfortran</a></li>
217<li><a class="reference external" href="http://www.fftw.org">fftw3</a></li>
218<li><a class="reference external" href="https://software.ecmwf.int/wiki/display/ECC">eccodes</a></li>
219<li><a class="reference external" href="https://software.ecmwf.int/wiki/display/EMOS/Emoslib">emoslib</a></li>
220</ul>
221</td>
222</tr>
223</tbody>
224</table>
225</div>
226<div class="section" id="prepare-local-environment">
227<span id="ref-prep-local"></span><h2>Prepare local environment<a class="headerlink" href="#prepare-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 sytem (e. g. Ubuntu) system you may use the following commands (or equivalent commands of your preferred package manager):</span>
231<span class="c1"># (if not already available):</span>
232 apt-get install python3 <span class="o">(</span>usually already available on GNU/Linux systems<span class="o">)</span>
233 apt-get install python3-eccodes
234 apt-get install python3-genshi
235 apt-get install python3-numpy
236 apt-get install gfortran
237 apt-get install fftw3-dev
238 apt-get install libeccodes-dev
239 apt-get install libemos-dev
240<span class="c1"># Some of these packages will pull in further packages as dependencies. This is fine, and some are even needed by ``flex_extract&#39;&#39;.</span>
241
242
243<span class="c1"># As currently the CDS and ECMWF API packages are not available as Debian packages, they need to be installed outside of the Debian (Ubuntu etc.) package management system. The recommended way is:</span>
244 apt-get install pip
245 pip install cdsapi
246 pip install ecmwf-api-client
247</pre></div>
248</div>
249<div class="admonition note">
250<p class="first admonition-title">Note</p>
251<p>In case you would like to use Anaconda Python we recommend you follow the installation instructions of
252<a class="reference external" href="https://docs.anaconda.com/anaconda/install/linux/">Anaconda Python Installation for Linux</a> and then install the
253<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>
254<div class="last highlight-bash notranslate"><div class="highlight"><pre><span></span>conda install conda-forge::python-eccodes
255</pre></div>
256</div>
257</div>
258<p>The CDS API (cdsapi) is required for ERA5 data and the ECMWF Web API (ecmwf-api-client) for all other public datasets.</p>
259<div class="admonition note">
260<p class="first admonition-title">Note</p>
261<p class="last">Since <strong>public users</strong> currently don’t have access to the full <em>ERA5</em> dataset they can skip the installation of the <code class="docutils literal notranslate"><span class="pre">CDS</span> <span class="pre">API</span></code>.</p>
262</div>
263<p>Both user groups have to provide keys with their credentials for the Web API’s in their home directory. Therefore, follow these instructions:</p>
264<dl class="docutils">
265<dt>ECMWF Web API:</dt>
266<dd>Go to <a class="reference external" href="https://confluence.ecmwf.int//display/WEBAPI/Access+MARS">MARS access</a> website and log in with your credentials. Afterwards, on this site in section “Install ECMWF KEY” 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 <cite>.ecmwfapirc</cite> in your home directory).</dd>
267<dt>CDS API:</dt>
268<dd>Go to ‘CDS API registration’_ and register there too. Log in at the <a class="reference external" href="https://cds.climate.copernicus.eu/api-how-to">cdsapi</a> website and follow the instructions at section “Install the CDS API key” to save your credentials in a <cite>.cdsapirc</cite> file.</dd>
269</dl>
270</div>
271<div class="section" id="test-local-environment">
272<span id="ref-test-local"></span><h2>Test local environment<a class="headerlink" href="#test-local-environment" title="Permalink to this headline"></a></h2>
273<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. If there are no error messages, you succeeded in setting up the environment.</p>
274<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># check in python3 console</span>
275<span class="kn">import</span> <span class="nn">eccodes</span>
276<span class="kn">import</span> <span class="nn">genshi</span>
277<span class="kn">import</span> <span class="nn">numpy</span>
278<span class="kn">import</span> <span class="nn">cdsapi</span>
279<span class="kn">import</span> <span class="nn">ecmwfapi</span>
280</pre></div>
281</div>
282<div class="section" id="test-the-web-api-s">
283<h3>Test the Web API’s<a class="headerlink" href="#test-the-web-api-s" title="Permalink to this headline"></a></h3>
284<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>
285<div class="section" id="ecmwf-web-api">
286<h4>ECMWF Web API<a class="headerlink" href="#ecmwf-web-api" title="Permalink to this headline"></a></h4>
287<table border="1" class="docutils">
288<colgroup>
289<col width="50%" />
290<col width="50%" />
291</colgroup>
292<tbody valign="top">
293<tr class="row-odd"><td>Please use this piece of Python code for <strong>Member user</strong>:</td>
294<td>Please use this piece of Python code for <strong>Public user</strong>:</td>
295</tr>
296<tr class="row-even"><td><div class="first last 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>
297
298<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>
299
300<span class="n">server</span><span class="o">.</span><span class="n">retrieve</span><span class="p">({</span>
301    <span class="s1">&#39;stream&#39;</span>    <span class="p">:</span> <span class="s2">&quot;oper&quot;</span><span class="p">,</span>
302    <span class="s1">&#39;levtype&#39;</span>   <span class="p">:</span> <span class="s2">&quot;sfc&quot;</span><span class="p">,</span>
303    <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>
304    <span class="s1">&#39;dataset&#39;</span>   <span class="p">:</span> <span class="s2">&quot;interim&quot;</span><span class="p">,</span>
305    <span class="s1">&#39;step&#39;</span>      <span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
306    <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>
307    <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>
308    <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>
309    <span class="s1">&#39;type&#39;</span>      <span class="p">:</span> <span class="s2">&quot;an&quot;</span><span class="p">,</span>
310    <span class="s1">&#39;class&#39;</span>     <span class="p">:</span> <span class="s2">&quot;ei&quot;</span><span class="p">,</span>
311    <span class="s1">&#39;target&#39;</span>    <span class="p">:</span> <span class="s2">&quot;download_erainterim_ecmwfapi.grib&quot;</span>
312<span class="p">})</span>
313</pre></div>
314</div>
315</td>
316<td><div class="first last 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>
317
318<span class="n">server</span> <span class="o">=</span> <span class="n">ECMWFDataServer</span><span class="p">()</span>
319
320<span class="n">server</span><span class="o">.</span><span class="n">retrieve</span><span class="p">({</span>
321    <span class="s1">&#39;stream&#39;</span>    <span class="p">:</span> <span class="s2">&quot;enda&quot;</span><span class="p">,</span>
322    <span class="s1">&#39;levtype&#39;</span>   <span class="p">:</span> <span class="s2">&quot;sfc&quot;</span><span class="p">,</span>
323    <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>
324    <span class="s1">&#39;dataset&#39;</span>   <span class="p">:</span> <span class="s2">&quot;cera20c&quot;</span><span class="p">,</span>
325    <span class="s1">&#39;step&#39;</span>      <span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
326    <span class="s1">&#39;grid&#39;</span>      <span class="p">:</span> <span class="s2">&quot;1./1.&quot;</span><span class="p">,</span>
327    <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>
328    <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>
329    <span class="s1">&#39;type&#39;</span>      <span class="p">:</span> <span class="s2">&quot;an&quot;</span><span class="p">,</span>
330    <span class="s1">&#39;class&#39;</span>     <span class="p">:</span> <span class="s2">&quot;ep&quot;</span><span class="p">,</span>
331    <span class="s1">&#39;target&#39;</span>    <span class="p">:</span> <span class="s2">&quot;download_cera20c_ecmwfapi.grib&quot;</span>
332<span class="p">})</span>
333</pre></div>
334</div>
335</td>
336</tr>
337</tbody>
338</table>
339</div>
340<div class="section" id="cds-api">
341<h4>CDS API<a class="headerlink" href="#cds-api" title="Permalink to this headline"></a></h4>
342<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>
343<p>Please use this piece of Python code to retrieve a small sample of <em>ERA5</em> pressure levels:</p>
344<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">cdsapi</span>
345
346<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>
347
348<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>
349<span class="p">{</span>
350<span class="s2">&quot;variable&quot;</span><span class="p">:</span> <span class="s2">&quot;temperature&quot;</span><span class="p">,</span>
351<span class="s2">&quot;pressure_level&quot;</span><span class="p">:</span> <span class="s2">&quot;1000&quot;</span><span class="p">,</span>
352<span class="s2">&quot;product_type&quot;</span><span class="p">:</span> <span class="s2">&quot;reanalysis&quot;</span><span class="p">,</span>
353<span class="s2">&quot;year&quot;</span><span class="p">:</span> <span class="s2">&quot;2008&quot;</span><span class="p">,</span>
354<span class="s2">&quot;month&quot;</span><span class="p">:</span> <span class="s2">&quot;01&quot;</span><span class="p">,</span>
355<span class="s2">&quot;day&quot;</span><span class="p">:</span> <span class="s2">&quot;01&quot;</span><span class="p">,</span>
356<span class="s2">&quot;time&quot;</span><span class="p">:</span> <span class="s2">&quot;12:00&quot;</span><span class="p">,</span>
357<span class="s2">&quot;format&quot;</span><span class="p">:</span> <span class="s2">&quot;grib&quot;</span>
358<span class="p">},</span>
359<span class="s2">&quot;download_cdsapi.grib&quot;</span><span class="p">)</span>
360</pre></div>
361</div>
362<p>If you know that your CDS API works, you can try to extract some data from MARS.</p>
363<p>Please use this piece of Python code 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>
364<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">cdsapi</span>
365
366<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>
367
368<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>
369<span class="p">{</span>
370    <span class="s1">&#39;class&#39;</span>   <span class="p">:</span> <span class="s1">&#39;ea&#39;</span><span class="p">,</span>
371    <span class="s1">&#39;expver&#39;</span>  <span class="p">:</span> <span class="s1">&#39;1&#39;</span><span class="p">,</span>
372    <span class="s1">&#39;stream&#39;</span>  <span class="p">:</span> <span class="s1">&#39;oper&#39;</span><span class="p">,</span>
373    <span class="s1">&#39;type&#39;</span>    <span class="p">:</span> <span class="s1">&#39;fc&#39;</span><span class="p">,</span>
374    <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>
375    <span class="s1">&#39;param&#39;</span>   <span class="p">:</span> <span class="s1">&#39;130.128&#39;</span><span class="p">,</span>
376    <span class="s1">&#39;levtype&#39;</span> <span class="p">:</span> <span class="s1">&#39;ml&#39;</span><span class="p">,</span>
377    <span class="s1">&#39;levelist&#39;</span><span class="p">:</span> <span class="s1">&#39;135/to/137&#39;</span><span class="p">,</span>
378    <span class="s1">&#39;date&#39;</span>    <span class="p">:</span> <span class="s1">&#39;2013-01-01&#39;</span><span class="p">,</span>
379    <span class="s1">&#39;time&#39;</span>    <span class="p">:</span> <span class="s1">&#39;06/18&#39;</span><span class="p">,</span>
380    <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>
381    <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>
382    <span class="s1">&#39;format&#39;</span>  <span class="p">:</span> <span class="s1">&#39;grib&#39;</span><span class="p">,</span>
383<span class="p">},</span> <span class="s1">&#39;download_era5_cdsapi.grib&#39;</span><span class="p">)</span>
384</pre></div>
385</div>
386</div>
387</div>
388</div>
389<div class="section" id="local-installation">
390<span id="ref-install-local"></span><h2>Local installation<a class="headerlink" href="#local-installation" title="Permalink to this headline"></a></h2>
391<p>First prepare the Fortran <code class="docutils literal notranslate"><span class="pre">makefile</span></code> for your environment and set it in the <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code> script. (See section <span class="xref std std-ref">ref-convert</span> for information on the Fortran program.)
392<code class="docutils literal notranslate"><span class="pre">flex_extract</span></code> comes with two <code class="docutils literal notranslate"><span class="pre">makefiles</span></code> prepared for the <code class="docutils literal notranslate"><span class="pre">gfortran</span></code> and
393the <code class="docutils literal notranslate"><span class="pre">ifort</span></code> compiler. The <code class="docutils literal notranslate"><span class="pre">gfortran</span></code> version assumes that <code class="docutils literal notranslate"><span class="pre">eccodes</span></code> and <code class="docutils literal notranslate"><span class="pre">emoslib</span></code> are installed as distribution packages.</p>
394<blockquote>
395<div><ul class="simple">
396<li>makefile.local.gfortran</li>
397<li>makefile.local.ifort</li>
398</ul>
399</div></blockquote>
400<p>They can be found at <code class="docutils literal notranslate"><span class="pre">flex_extract_vX.X/Source/Fortran</span></code>, where
401<code class="docutils literal notranslate"><span class="pre">vX.X</span></code> should be substituted with the current version number.</p>
402<div class="admonition caution">
403<p class="first admonition-title">Caution</p>
404<p class="last">It is necessary to adapt <strong>ECCODES_INCLUDE_DIR</strong> and <strong>ECCODES_LIB</strong> in these
405<code class="docutils literal notranslate"><span class="pre">makefiles</span></code> if other than standard paths are used.</p>
406</div>
407<p>So starting from the root directory of <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code>,
408go 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
409choice to modify with an editor of your choice. We use the <code class="docutils literal notranslate"><span class="pre">nedit</span></code> in this case.</p>
410<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> flex_extract_vX.X/Source/Fortran
411nedit makefile.local.gfortran
412</pre></div>
413</div>
414<p>Edit the paths to the <code class="docutils literal notranslate"><span class="pre">eccodes</span></code> library on your local machine.</p>
415<div class="admonition caution">
416<p class="first admonition-title">Caution</p>
417<p>This can vary from system to system.
418It is suggested to use a command like</p>
419<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># for the ECCODES_INCLUDE_DIR path do:</span>
420$ dpkg -L libeccodes-dev <span class="p">|</span> grep eccodes.mod
421<span class="c1"># for the ECCODES_LIB path do:</span>
422$ dpkg -L libeccodes-dev <span class="p">|</span> grep libeccodes.so
423</pre></div>
424</div>
425<p class="last">to find out the path to the <code class="docutils literal notranslate"><span class="pre">eccodes</span></code> library.</p>
426</div>
427<p>Substitute these paths in the <code class="docutils literal notranslate"><span class="pre">makefile</span></code> for parameters <strong>ECCODES_INCLUDE_DIR</strong>
428and <strong>ECCODES_LIB</strong> and save it.</p>
429<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># these are the paths on a current Debian 10 Testing system (May 2019)</span>
430<span class="nv">ECCODES_INCLUDE_DIR</span><span class="o">=</span>/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/
431<span class="nv">ECCODES_LIB</span><span class="o">=</span> -L/usr/lib -leccodes_f90 -leccodes -lm
432</pre></div>
433</div>
434<p>The Fortran program called <code class="docutils literal notranslate"><span class="pre">CONVERT2</span></code> will be compiled during the
435installation 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>
436<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
437and adapt the installation parameters in the section labelled with
438“AVAILABLE COMMANDLINE ARGUMENTS TO SET” like shown below.</p>
439<div class="literal-block-wrapper docutils container" id="setup-sh">
440<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>
441<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>...
442<span class="c1"># -----------------------------------------------------------------</span>
443<span class="c1"># AVAILABLE COMMANDLINE ARGUMENTS TO SET</span>
444<span class="c1">#</span>
445<span class="c1"># THE USER HAS TO SPECIFY THESE PARAMETER</span>
446<span class="c1">#</span>
447<span class="nv">TARGET</span><span class="o">=</span><span class="s1">&#39;local&#39;</span>
448<span class="nv">MAKEFILE</span><span class="o">=</span><span class="s1">&#39;makefile.local.gfortran&#39;</span>
449<span class="nv">ECUID</span><span class="o">=</span>None
450<span class="nv">ECGID</span><span class="o">=</span>None
451<span class="nv">GATEWAY</span><span class="o">=</span>None
452<span class="nv">DESTINATION</span><span class="o">=</span>None
453<span class="nv">INSTALLDIR</span><span class="o">=</span>None
454<span class="nv">JOB_TEMPLATE</span><span class="o">=</span><span class="s1">&#39;job.template&#39;</span>
455<span class="nv">CONTROLFILE</span><span class="o">=</span><span class="s1">&#39;CONTROL_EA5&#39;</span>
456...
457</pre></div>
458</div>
459</div>
460<p>Afterwards, type:</p>
461<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ./setup.sh
462</pre></div>
463</div>
464<p>to start the installation. You should see the following standard output.</p>
465<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># Output of setup.sh</span>
466WARNING: installdir has not been specified
467flex_extract will be installed in here by compiling the Fortran <span class="nb">source</span> in /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/source/fortran
468Install flex_extract_v7.1 software at <span class="nb">local</span> in directory /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1
469
470Using makefile: Makefile.local.gfortran
471gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert<span class="o">=</span>big-endian  -c -g -O3 -fopenmp phgrreal.f
472gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert<span class="o">=</span>big-endian  -c -g -O3 -fopenmp grphreal.f
473gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert<span class="o">=</span>big-endian  -c -g -O3 -fopenmp ftrafo.f
474gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert<span class="o">=</span>big-endian  -c -O3 -fopenmp -I. -I/usr/local/gcc-4.9.3/grib_api-1.14.3/include -O3 rwGRIB2.f90
475gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert<span class="o">=</span>big-endian  -c -O3 -fopenmp -I. -I/usr/local/gcc-4.9.3/grib_api-1.14.3/include -O3 posnam.f
476gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert<span class="o">=</span>big-endian  -c -O3 -fopenmp -I. -I/usr/local/gcc-4.9.3/grib_api-1.14.3/include -O3 preconvert.f90
477gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert<span class="o">=</span>big-endian  -O3 -O3 -fopenmp -o ./CONVERT2 ftrafo.o phgrreal.o grphreal.o rwGRIB2.o posnam.o preconvert.o -L/usr/local/gcc-4.9.3/grib_api-1.14.3/lib -Bstatic  -lgrib_api_f77 -lgrib_api_f90 -lgrib_api -Bdynamic  -lm  -ljasper -lemosR64
478
479-rwxrwxr-x. <span class="m">1</span> philipa8 tmc <span class="m">282992</span> May <span class="m">23</span> <span class="m">22</span>:27 ./CONVERT2
480</pre></div>
481</div>
482</div>
483</div>
484
485
486           </div>
487           
488          </div>
489          <footer>
490 
491    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
492     
493        <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>
494     
495     
496        <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>
497     
498    </div>
499 
500
501  <hr/>
502
503  <div role="contentinfo">
504    <p>
505        &copy; Copyright 2019, Anne Philipp and Leopold Haimberger
506
507    </p>
508  </div>
509  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>.
510
511</footer>
512
513        </div>
514      </div>
515
516    </section>
517
518  </div>
519 
520
521
522  <script type="text/javascript">
523      jQuery(function () {
524          SphinxRtdTheme.Navigation.enable(true);
525      });
526  </script>
527
528 
529 
530   
531   
532
533</body>
534</html>
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG