source: flex_extract.git/Documentation/html/Installation/local.html @ 30f7911

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

reviewed installation section of online documentation; minor corrections

  • Property mode set to 100644
File size: 33.7 KB
Line 
1
2
3<!DOCTYPE html>
4<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
5<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
6<head>
7  <meta charset="utf-8">
8 
9  <meta name="viewport" content="width=device-width, initial-scale=1.0">
10 
11  <title>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#environment-requirements">Environment requirements</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-environment-requirements">Local environment requirements</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-environment-requirements">
193<span id="ref-req-local"></span><span id="ref-local-mode"></span><h2>Local environment requirements<a class="headerlink" href="#local-environment-requirements" title="Permalink to this headline"></a></h2>
194<p>For the local access modes <strong>member</strong> and <strong>public</strong> there is no difference in
195the installation process.</p>
196<p>The environment on your local system has to provide these software packages
197and libraries, since all extraction and preparation is done at the local system:</p>
198<table border="1" class="docutils">
199<colgroup>
200<col width="74%" />
201<col width="26%" />
202</colgroup>
203<tbody valign="top">
204<tr class="row-odd"><td>Python part</td>
205<td>Fortran part</td>
206</tr>
207<tr class="row-even"><td><ul class="first last simple">
208<li><a class="reference external" href="https://www.python.org/downloads/">Python3</a></li>
209<li><a class="reference external" href="http://www.numpy.org/">numpy</a></li>
210<li><a class="reference external" href="https://genshi.edgewall.org/">genshi</a></li>
211<li><a class="reference external" href="https://packages.debian.org/sid/python3-eccodes">eccodes for python</a></li>
212<li><a class="reference external" href="https://confluence.ecmwf.int/display/WEBAPI/ECMWF+Web+API+Home">ecmwf-api-client</a> (everything except ERA5)</li>
213<li><a class="reference external" href="https://cds.climate.copernicus.eu/api-how-to">cdsapi</a> (just for ERA5)</li>
214</ul>
215</td>
216<td><ul class="first last simple">
217<li><a class="reference external" href="https://gcc.gnu.org/wiki/GFortran">gfortran</a></li>
218<li><a class="reference external" href="http://www.fftw.org">fftw3</a></li>
219<li><a class="reference external" href="https://software.ecmwf.int/wiki/display/ECC">eccodes</a></li>
220<li><a class="reference external" href="https://software.ecmwf.int/wiki/display/EMOS/Emoslib">emoslib</a></li>
221</ul>
222</td>
223</tr>
224</tbody>
225</table>
226</div>
227<div class="section" id="prepare-local-environment">
228<span id="ref-prep-local"></span><h2>Prepare local environment<a class="headerlink" href="#prepare-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. To do so, it is necessary to use a user with admin rights.
230The installation was tested on a <em>Debian GNU/Linux buster/sid</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 Linux Debian or Ubuntu system do</span>
232<span class="c1"># (if not already available):</span>
233apt-get install python3 <span class="o">(</span>usually available on normal Linux systems<span class="o">)</span>
234apt-get install pip
235apt-get install gfortran
236apt-get install fftw3-dev
237apt-get install libeccodes-dev
238apt-get install libemos-dev
239apt-get install python3-eccodes
240apt-get install genshi
241apt-get install numpy
242pip install cdsapi
243pip install ecmwf-api-client
244</pre></div>
245</div>
246<div class="admonition note">
247<p class="first admonition-title">Note</p>
248<p>In case you would like to use Anaconda Python we recommend you follow the installation instructions of
249<a class="reference external" href="https://docs.anaconda.com/anaconda/install/linux/">Anaconda Python Installation for Linux</a> and then install the
250<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>
251<div class="last highlight-bash notranslate"><div class="highlight"><pre><span></span>conda install conda-forge::python-eccodes
252</pre></div>
253</div>
254</div>
255<p>The CDS API (cdsapi) and the ECMWF Web API (ecmwf-api-client) have both to be installed since ERA5 can only be retrieved with the <code class="docutils literal notranslate"><span class="pre">CDS</span> <span class="pre">API</span></code> and all other datasets with the <code class="docutils literal notranslate"><span class="pre">ECMWF</span> <span class="pre">Web</span> <span class="pre">API</span></code>.</p>
256<div class="admonition note">
257<p class="first admonition-title">Note</p>
258<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>
259</div>
260<p>Both user groups have to provide key’s with their credentials for the Web API’s in their home directory. Therefore, follow these instructions:</p>
261<dl class="docutils">
262<dt>ECMWF Web API:</dt>
263<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 point 1 (save the key in a file <cite>.ecmwfapirc</cite> in your home directory).</dd>
264<dt>CDS API:</dt>
265<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>
266</dl>
267</div>
268<div class="section" id="test-local-environment">
269<span id="ref-test-local"></span><h2>Test local environment<a class="headerlink" href="#test-local-environment" title="Permalink to this headline"></a></h2>
270<p>Check the availability of the system packages with <code class="docutils literal notranslate"><span class="pre">dpkg</span> <span class="pre">-s</span> <span class="pre">&lt;package-name&gt;</span> <span class="pre">|</span>&#160; <span class="pre">grep</span> <span class="pre">Status</span></code> or <code class="docutils literal notranslate"><span class="pre">rpm</span> <span class="pre">-q</span> <span class="pre">&lt;package_name&gt;</span></code>, depending on your system. For example:</p>
271<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ dpkg -s libeccodes-dev <span class="p">|</span>  grep Status
272<span class="c1"># or</span>
273$ rpm -q libeccodes-dev
274</pre></div>
275</div>
276<p>Afterwards, check the availability of the python packages by typing <code class="docutils literal notranslate"><span class="pre">python3</span></code> in
277a 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>
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<div class="section" id="test-the-web-api-s">
287<h3>Test the Web API’s<a class="headerlink" href="#test-the-web-api-s" title="Permalink to this headline"></a></h3>
288<p>You can start very simple test retrievals for both Web API’s to be sure that everything works. This is recommended to minimize the range of possible errors using <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code> later on.</p>
289<div class="section" id="ecmwf-web-api">
290<h4>ECMWF Web API<a class="headerlink" href="#ecmwf-web-api" title="Permalink to this headline"></a></h4>
291<table border="1" class="docutils">
292<colgroup>
293<col width="50%" />
294<col width="50%" />
295</colgroup>
296<tbody valign="top">
297<tr class="row-odd"><td>Please use this piece of python code for <strong>Member user</strong>:</td>
298<td>Please use this piece of python code for <strong>Public user</strong>:</td>
299</tr>
300<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>
301
302<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>
303
304<span class="n">server</span><span class="o">.</span><span class="n">retrieve</span><span class="p">({</span>
305    <span class="s1">&#39;stream&#39;</span>    <span class="p">:</span> <span class="s2">&quot;oper&quot;</span><span class="p">,</span>
306    <span class="s1">&#39;levtype&#39;</span>   <span class="p">:</span> <span class="s2">&quot;sfc&quot;</span><span class="p">,</span>
307    <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>
308    <span class="s1">&#39;dataset&#39;</span>   <span class="p">:</span> <span class="s2">&quot;interim&quot;</span><span class="p">,</span>
309    <span class="s1">&#39;step&#39;</span>      <span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
310    <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>
311    <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>
312    <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>
313    <span class="s1">&#39;type&#39;</span>      <span class="p">:</span> <span class="s2">&quot;an&quot;</span><span class="p">,</span>
314    <span class="s1">&#39;class&#39;</span>     <span class="p">:</span> <span class="s2">&quot;ei&quot;</span><span class="p">,</span>
315    <span class="s1">&#39;target&#39;</span>    <span class="p">:</span> <span class="s2">&quot;download_erainterim_ecmwfapi.grib&quot;</span>
316<span class="p">})</span>
317</pre></div>
318</div>
319</td>
320<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>
321
322<span class="n">server</span> <span class="o">=</span> <span class="n">ECMWFDataServer</span><span class="p">()</span>
323
324<span class="n">server</span><span class="o">.</span><span class="n">retrieve</span><span class="p">({</span>
325    <span class="s1">&#39;stream&#39;</span>    <span class="p">:</span> <span class="s2">&quot;enda&quot;</span><span class="p">,</span>
326    <span class="s1">&#39;levtype&#39;</span>   <span class="p">:</span> <span class="s2">&quot;sfc&quot;</span><span class="p">,</span>
327    <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>
328    <span class="s1">&#39;dataset&#39;</span>   <span class="p">:</span> <span class="s2">&quot;cera20c&quot;</span><span class="p">,</span>
329    <span class="s1">&#39;step&#39;</span>      <span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
330    <span class="s1">&#39;grid&#39;</span>      <span class="p">:</span> <span class="s2">&quot;1./1.&quot;</span><span class="p">,</span>
331    <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>
332    <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>
333    <span class="s1">&#39;type&#39;</span>      <span class="p">:</span> <span class="s2">&quot;an&quot;</span><span class="p">,</span>
334    <span class="s1">&#39;class&#39;</span>     <span class="p">:</span> <span class="s2">&quot;ep&quot;</span><span class="p">,</span>
335    <span class="s1">&#39;target&#39;</span>    <span class="p">:</span> <span class="s2">&quot;download_cera20c_ecmwfapi.grib&quot;</span>
336<span class="p">})</span>
337</pre></div>
338</div>
339</td>
340</tr>
341</tbody>
342</table>
343</div>
344<div class="section" id="cds-api">
345<h4>CDS API<a class="headerlink" href="#cds-api" title="Permalink to this headline"></a></h4>
346<p>Since ERA5 extraction with CDS API might take some time due to the very high number of requests, you can start by retrieving some online stored pressure levels (not from MARS). This is usually much faster and gives a quick result to find out if the web API works:</p>
347<p>Please use this piece of python code to retrieve a small sample of <em>ERA5</em> pressure levels:</p>
348<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">cdsapi</span>
349
350<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>
351
352<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>
353<span class="p">{</span>
354<span class="s2">&quot;variable&quot;</span><span class="p">:</span> <span class="s2">&quot;temperature&quot;</span><span class="p">,</span>
355<span class="s2">&quot;pressure_level&quot;</span><span class="p">:</span> <span class="s2">&quot;1000&quot;</span><span class="p">,</span>
356<span class="s2">&quot;product_type&quot;</span><span class="p">:</span> <span class="s2">&quot;reanalysis&quot;</span><span class="p">,</span>
357<span class="s2">&quot;year&quot;</span><span class="p">:</span> <span class="s2">&quot;2008&quot;</span><span class="p">,</span>
358<span class="s2">&quot;month&quot;</span><span class="p">:</span> <span class="s2">&quot;01&quot;</span><span class="p">,</span>
359<span class="s2">&quot;day&quot;</span><span class="p">:</span> <span class="s2">&quot;01&quot;</span><span class="p">,</span>
360<span class="s2">&quot;time&quot;</span><span class="p">:</span> <span class="s2">&quot;12:00&quot;</span><span class="p">,</span>
361<span class="s2">&quot;format&quot;</span><span class="p">:</span> <span class="s2">&quot;grib&quot;</span>
362<span class="p">},</span>
363<span class="s2">&quot;download_cdsapi.grib&quot;</span><span class="p">)</span>
364</pre></div>
365</div>
366<p>Afterwards, when you know that the CDS API generally works, you can try to extract some
367data from the MARS archive. From the latest experience we know that this can take a while.</p>
368<p>Please use this piece of python code to retrieve a small <em>ERA5</em> data sample as a <strong>member user</strong>! The <strong>public user</strong> doesn’t 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 prepare the Fortran <code class="docutils literal notranslate"><span class="pre">Makefile</span></code> for your environment and set it
397in 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
398the Fortran program.)
399<code class="docutils literal notranslate"><span class="pre">flex_extract</span></code> has already two <code class="docutils literal notranslate"><span class="pre">Makefiles</span></code> prepared for te <code class="docutils literal notranslate"><span class="pre">gfortran</span></code> and
400the <code class="docutils literal notranslate"><span class="pre">ifort</span></code> compiler:</p>
401<blockquote>
402<div><ul class="simple">
403<li>Makefile.local.gfortran</li>
404<li>Makefile.local.ifort</li>
405</ul>
406</div></blockquote>
407<p>They can be found in the path <code class="docutils literal notranslate"><span class="pre">flex_extract_vX.X/source/fortran</span></code>, where
408<code class="docutils literal notranslate"><span class="pre">vX.X</span></code> should be substituted with the current version number.</p>
409<div class="admonition caution">
410<p class="first admonition-title">Caution</p>
411<p class="last">It is necessary to adapt <strong>ECCODES_INCLUDE_DIR</strong> and <strong>ECCODES_LIB</strong> in these
412<code class="docutils literal notranslate"><span class="pre">Makefiles</span></code>.</p>
413</div>
414<p>So starting from the root directory of <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code>,
415go 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
416choice 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>
417<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> flex_extract_vX.X/source/fortran
418nedit Makefile.local.gfortran
419</pre></div>
420</div>
421<p>Edit the pathes to the <code class="docutils literal notranslate"><span class="pre">eccodes</span></code> library on your local machine.</p>
422<div class="admonition caution">
423<p class="first admonition-title">Caution</p>
424<p>This can vary from system to system.
425It is suggested to use a command like</p>
426<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># for the ECCODES_INCLUDE_DIR path do:</span>
427$ dpkg -L libeccodes-dev <span class="p">|</span> grep eccodes.mod
428<span class="c1"># for the ECCODES_LIB path do:</span>
429$ dpkg -L libeccodes-dev <span class="p">|</span> grep libeccodes.so
430</pre></div>
431</div>
432<p class="last">to find out the path to the <code class="docutils literal notranslate"><span class="pre">eccodes</span></code> library.</p>
433</div>
434<p>Substitute these paths in the <code class="docutils literal notranslate"><span class="pre">Makefile</span></code> for parameters <strong>ECCODES_INCLUDE_DIR</strong>
435and <strong>ECCODES_LIB</strong> and save it.</p>
436<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>
437<span class="nv">ECCODES_INCLUDE_DIR</span><span class="o">=</span>/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/
438<span class="nv">ECCODES_LIB</span><span class="o">=</span> -L/usr/lib -leccodes_f90 -leccodes -lm
439</pre></div>
440</div>
441<p>The Fortran program called <code class="docutils literal notranslate"><span class="pre">CONVERT2</span></code> will be compiled during the
442installation process to get an executable. Therefore the <code class="docutils literal notranslate"><span class="pre">Makefile</span></code>
443has to be set in the <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code> script.</p>
444<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
445and adapt the installation parameters in the section labelled with
446“AVAILABLE COMMANDLINE ARGUMENTS TO SET” like shown below.</p>
447<div class="literal-block-wrapper docutils container" id="setup-sh">
448<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>
449<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>...
450<span class="c1"># -----------------------------------------------------------------</span>
451<span class="c1"># AVAILABLE COMMANDLINE ARGUMENTS TO SET</span>
452<span class="c1">#</span>
453<span class="c1"># THE USER HAS TO SPECIFY THESE PARAMETER</span>
454<span class="c1">#</span>
455<span class="nv">TARGET</span><span class="o">=</span><span class="s1">&#39;local&#39;</span>
456<span class="nv">MAKEFILE</span><span class="o">=</span><span class="s1">&#39;Makefile.local.gfortran&#39;</span>
457<span class="nv">ECUID</span><span class="o">=</span>None
458<span class="nv">ECGID</span><span class="o">=</span>None
459<span class="nv">GATEWAY</span><span class="o">=</span>None
460<span class="nv">DESTINATION</span><span class="o">=</span>None
461<span class="nv">INSTALLDIR</span><span class="o">=</span>None
462<span class="nv">JOB_TEMPLATE</span><span class="o">=</span><span class="s1">&#39;job.template&#39;</span>
463<span class="nv">CONTROLFILE</span><span class="o">=</span><span class="s1">&#39;CONTROL_EA5&#39;</span>
464...
465</pre></div>
466</div>
467</div>
468<p>Afterwards, type:</p>
469<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ./setup.sh
470</pre></div>
471</div>
472<p>to start the installation. You should see the following output at the command line.</p>
473<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># Output of setup.sh</span>
474WARNING: installdir has not been specified
475flex_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
476Install flex_extract_v7.1 software at <span class="nb">local</span> in directory /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1
477
478Using makefile: Makefile.local.gfortran
479gfortran   -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
480gfortran   -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
481gfortran   -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
482gfortran   -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
483gfortran   -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
484gfortran   -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
485gfortran   -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
486
487-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
488</pre></div>
489</div>
490</div>
491</div>
492
493
494           </div>
495           
496          </div>
497          <footer>
498 
499    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
500     
501        <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>
502     
503     
504        <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>
505     
506    </div>
507 
508
509  <hr/>
510
511  <div role="contentinfo">
512    <p>
513        &copy; Copyright 2019, Anne Philipp and Leopold Haimberger
514
515    </p>
516  </div>
517  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>.
518
519</footer>
520
521        </div>
522      </div>
523
524    </section>
525
526  </div>
527 
528
529
530  <script type="text/javascript">
531      jQuery(function () {
532          SphinxRtdTheme.Navigation.enable(true);
533      });
534  </script>
535
536 
537 
538   
539   
540
541</body>
542</html>
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG