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 — flex_extract 7.1.2 documentation</title> |
---|
12 | |
---|
13 | |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | <script type="text/javascript" src="../_static/js/modernizr.min.js"></script> |
---|
21 | |
---|
22 | |
---|
23 | <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> |
---|
24 | <script src="../_static/jquery.js"></script> |
---|
25 | <script src="../_static/underscore.js"></script> |
---|
26 | <script src="../_static/doctools.js"></script> |
---|
27 | <script src="../_static/language_data.js"></script> |
---|
28 | <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> |
---|
29 | |
---|
30 | <script type="text/javascript" src="../_static/js/theme.js"></script> |
---|
31 | |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> |
---|
36 | <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> |
---|
37 | <link rel="stylesheet" href="../_static/css/custom.css" type="text/css" /> |
---|
38 | <link rel="stylesheet" href="../_static/css/theme_overrides.css" type="text/css" /> |
---|
39 | <link rel="index" title="Index" href="../genindex.html" /> |
---|
40 | <link rel="search" title="Search" href="../search.html" /> |
---|
41 | <link rel="next" title="Usage" href="../quick_start.html" /> |
---|
42 | <link rel="prev" title="Gateway mode installation" href="gateway.html" /> |
---|
43 | </head> |
---|
44 | |
---|
45 | <body class="wy-body-for-nav"> |
---|
46 | |
---|
47 | |
---|
48 | <div class="wy-grid-for-nav"> |
---|
49 | |
---|
50 | <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
---|
51 | <div class="wy-side-scroll"> |
---|
52 | <div class="wy-side-nav-search" > |
---|
53 | |
---|
54 | |
---|
55 | |
---|
56 | <a href="../index.html" class="icon icon-home"> flex_extract |
---|
57 | |
---|
58 | |
---|
59 | |
---|
60 | </a> |
---|
61 | |
---|
62 | |
---|
63 | |
---|
64 | |
---|
65 | <div class="version"> |
---|
66 | 7.1.2 |
---|
67 | </div> |
---|
68 | |
---|
69 | |
---|
70 | |
---|
71 | |
---|
72 | <div role="search"> |
---|
73 | <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> |
---|
74 | <input type="text" name="q" placeholder="Search docs" /> |
---|
75 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
76 | <input type="hidden" name="area" value="default" /> |
---|
77 | </form> |
---|
78 | </div> |
---|
79 | |
---|
80 | |
---|
81 | </div> |
---|
82 | |
---|
83 | <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
---|
84 | |
---|
85 | |
---|
86 | |
---|
87 | |
---|
88 | |
---|
89 | |
---|
90 | <p class="caption"><span class="caption-text">Table of Contents:</span></p> |
---|
91 | <ul class="current"> |
---|
92 | <li class="toctree-l1"><a class="reference internal" href="../ecmwf_data.html">ECMWF Data</a></li> |
---|
93 | <li class="toctree-l1 current"><a class="reference internal" href="../installation.html">Installation</a><ul class="current"> |
---|
94 | <li class="toctree-l2"><a class="reference internal" href="../installation.html#registration-at-ecmwf">Registration at ECMWF</a></li> |
---|
95 | <li class="toctree-l2"><a class="reference internal" href="../installation.html#accept-licences-for-public-datasets">Accept licences for public datasets</a></li> |
---|
96 | <li class="toctree-l2"><a class="reference internal" href="../installation.html#download-flex-extract">Download <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code></a></li> |
---|
97 | <li class="toctree-l2"><a class="reference internal" href="../installation.html#dependencies">Dependencies</a></li> |
---|
98 | <li class="toctree-l2 current"><a class="reference internal" href="../installation.html#installation-of-flex-extract">Installation of <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code></a><ul class="current"> |
---|
99 | <li class="toctree-l3"><a class="reference internal" href="remote.html">Remote mode installation</a></li> |
---|
100 | <li class="toctree-l3"><a class="reference internal" href="gateway.html">Gateway mode installation</a></li> |
---|
101 | <li class="toctree-l3 current"><a class="current reference internal" href="#">Local mode installation</a><ul> |
---|
102 | <li class="toctree-l4"><a class="reference internal" href="#local-mode-dependencies">Local mode - dependencies</a></li> |
---|
103 | <li class="toctree-l4"><a class="reference internal" href="#preparing-the-local-environment">Preparing the local environment</a></li> |
---|
104 | <li class="toctree-l4"><a class="reference internal" href="#testing-the-local-environment">Testing the local environment</a></li> |
---|
105 | <li class="toctree-l4"><a class="reference internal" href="#local-installation">Local installation</a></li> |
---|
106 | </ul> |
---|
107 | </li> |
---|
108 | </ul> |
---|
109 | </li> |
---|
110 | <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> |
---|
111 | <li class="toctree-l2"><a class="reference internal" href="../installation.html#test-installation">Test installation</a></li> |
---|
112 | </ul> |
---|
113 | </li> |
---|
114 | <li class="toctree-l1"><a class="reference internal" href="../quick_start.html">Usage</a></li> |
---|
115 | <li class="toctree-l1"><a class="reference internal" href="../documentation.html">Code-Level 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> »</li> |
---|
166 | |
---|
167 | <li><a href="../installation.html">Installation</a> »</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 |
---|
196 | and 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: 75%" /> |
---|
200 | <col style="width: 25%" /> |
---|
201 | </colgroup> |
---|
202 | <tbody> |
---|
203 | <tr class="row-odd"><td><p>Python code</p></td> |
---|
204 | <td><p>Fortran code</p></td> |
---|
205 | </tr> |
---|
206 | <tr class="row-even"><td><ul class="simple"> |
---|
207 | <li><p><a class="reference external" href="https://www.python.org/">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://pypi.org/project/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 | </ul> |
---|
214 | </td> |
---|
215 | <td><ul class="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 | </ul> |
---|
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. |
---|
229 | The 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''.</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> |
---|
256 | and 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:</p> |
---|
277 | <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># check in python3 console</span> |
---|
278 | <span class="kn">import</span> <span class="nn">eccodes</span> |
---|
279 | <span class="kn">import</span> <span class="nn">genshi</span> |
---|
280 | <span class="kn">import</span> <span class="nn">numpy</span> |
---|
281 | <span class="kn">import</span> <span class="nn">cdsapi</span> |
---|
282 | <span class="kn">import</span> <span class="nn">ecmwfapi</span> |
---|
283 | </pre></div> |
---|
284 | </div> |
---|
285 | <p>If there are no error messages, you succeeded in setting up the environment.</p> |
---|
286 | <div class="section" id="testing-the-web-apis"> |
---|
287 | <h3>Testing the Web APIs<a class="headerlink" href="#testing-the-web-apis" title="Permalink to this headline">¶</a></h3> |
---|
288 | <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> |
---|
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 class="docutils align-default"> |
---|
292 | <colgroup> |
---|
293 | <col style="width: 50%" /> |
---|
294 | <col style="width: 50%" /> |
---|
295 | </colgroup> |
---|
296 | <tbody> |
---|
297 | <tr class="row-odd"><td><p>Please use this Python code snippet as a <strong>Member user</strong>:</p></td> |
---|
298 | <td><p>Please use this Python code snippet as a <strong>Public user</strong>:</p></td> |
---|
299 | </tr> |
---|
300 | <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> |
---|
301 | |
---|
302 | <span class="n">server</span> <span class="o">=</span> <span class="n">ECMWFService</span><span class="p">(</span><span class="s1">'mars'</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">'stream'</span> <span class="p">:</span> <span class="s2">"oper"</span><span class="p">,</span> |
---|
306 | <span class="s1">'levtype'</span> <span class="p">:</span> <span class="s2">"sfc"</span><span class="p">,</span> |
---|
307 | <span class="s1">'param'</span> <span class="p">:</span> <span class="s2">"165.128/166.128/167.128"</span><span class="p">,</span> |
---|
308 | <span class="s1">'dataset'</span> <span class="p">:</span> <span class="s2">"interim"</span><span class="p">,</span> |
---|
309 | <span class="s1">'step'</span> <span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span> |
---|
310 | <span class="s1">'grid'</span> <span class="p">:</span> <span class="s2">"0.75/0.75"</span><span class="p">,</span> |
---|
311 | <span class="s1">'time'</span> <span class="p">:</span> <span class="s2">"00/06/12/18"</span><span class="p">,</span> |
---|
312 | <span class="s1">'date'</span> <span class="p">:</span> <span class="s2">"2014-07-01/to/2014-07-31"</span><span class="p">,</span> |
---|
313 | <span class="s1">'type'</span> <span class="p">:</span> <span class="s2">"an"</span><span class="p">,</span> |
---|
314 | <span class="s1">'class'</span> <span class="p">:</span> <span class="s2">"ei"</span><span class="p">,</span> |
---|
315 | <span class="s1">'target'</span> <span class="p">:</span> <span class="s2">"download_erainterim_ecmwfapi.grib"</span> |
---|
316 | <span class="p">})</span> |
---|
317 | </pre></div> |
---|
318 | </div> |
---|
319 | </td> |
---|
320 | <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> |
---|
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">'stream'</span> <span class="p">:</span> <span class="s2">"enda"</span><span class="p">,</span> |
---|
326 | <span class="s1">'levtype'</span> <span class="p">:</span> <span class="s2">"sfc"</span><span class="p">,</span> |
---|
327 | <span class="s1">'param'</span> <span class="p">:</span> <span class="s2">"165.128/166.128/167.128"</span><span class="p">,</span> |
---|
328 | <span class="s1">'dataset'</span> <span class="p">:</span> <span class="s2">"cera20c"</span><span class="p">,</span> |
---|
329 | <span class="s1">'step'</span> <span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span> |
---|
330 | <span class="s1">'grid'</span> <span class="p">:</span> <span class="s2">"1./1."</span><span class="p">,</span> |
---|
331 | <span class="s1">'time'</span> <span class="p">:</span> <span class="s2">"00/06/12/18"</span><span class="p">,</span> |
---|
332 | <span class="s1">'date'</span> <span class="p">:</span> <span class="s2">"2000-07-01/to/2000-07-31"</span><span class="p">,</span> |
---|
333 | <span class="s1">'type'</span> <span class="p">:</span> <span class="s2">"an"</span><span class="p">,</span> |
---|
334 | <span class="s1">'class'</span> <span class="p">:</span> <span class="s2">"ep"</span><span class="p">,</span> |
---|
335 | <span class="s1">'target'</span> <span class="p">:</span> <span class="s2">"download_cera20c_ecmwfapi.grib"</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>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> |
---|
347 | <p>Please use the following Python code snippet to retrieve a small sample of <em>ERA5</em> pressure level data:</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">"reanalysis-era5-pressure-levels"</span><span class="p">,</span> |
---|
353 | <span class="p">{</span> |
---|
354 | <span class="s2">"variable"</span><span class="p">:</span> <span class="s2">"temperature"</span><span class="p">,</span> |
---|
355 | <span class="s2">"pressure_level"</span><span class="p">:</span> <span class="s2">"1000"</span><span class="p">,</span> |
---|
356 | <span class="s2">"product_type"</span><span class="p">:</span> <span class="s2">"reanalysis"</span><span class="p">,</span> |
---|
357 | <span class="s2">"year"</span><span class="p">:</span> <span class="s2">"2008"</span><span class="p">,</span> |
---|
358 | <span class="s2">"month"</span><span class="p">:</span> <span class="s2">"01"</span><span class="p">,</span> |
---|
359 | <span class="s2">"day"</span><span class="p">:</span> <span class="s2">"01"</span><span class="p">,</span> |
---|
360 | <span class="s2">"time"</span><span class="p">:</span> <span class="s2">"12:00"</span><span class="p">,</span> |
---|
361 | <span class="s2">"format"</span><span class="p">:</span> <span class="s2">"grib"</span> |
---|
362 | <span class="p">},</span> |
---|
363 | <span class="s2">"download_cdsapi.grib"</span><span class="p">)</span> |
---|
364 | </pre></div> |
---|
365 | </div> |
---|
366 | <p>If you know that your CDS API works, you can try to extract some data from MARS.</p> |
---|
367 | <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> |
---|
368 | <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">cdsapi</span> |
---|
369 | |
---|
370 | <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> |
---|
371 | |
---|
372 | <span class="n">c</span><span class="o">.</span><span class="n">retrieve</span><span class="p">(</span><span class="s1">'reanalysis-era5-complete'</span><span class="p">,</span> |
---|
373 | <span class="p">{</span> |
---|
374 | <span class="s1">'class'</span> <span class="p">:</span> <span class="s1">'ea'</span><span class="p">,</span> |
---|
375 | <span class="s1">'expver'</span> <span class="p">:</span> <span class="s1">'1'</span><span class="p">,</span> |
---|
376 | <span class="s1">'stream'</span> <span class="p">:</span> <span class="s1">'oper'</span><span class="p">,</span> |
---|
377 | <span class="s1">'type'</span> <span class="p">:</span> <span class="s1">'fc'</span><span class="p">,</span> |
---|
378 | <span class="s1">'step'</span> <span class="p">:</span> <span class="s1">'3/to/12/by/3'</span><span class="p">,</span> |
---|
379 | <span class="s1">'param'</span> <span class="p">:</span> <span class="s1">'130.128'</span><span class="p">,</span> |
---|
380 | <span class="s1">'levtype'</span> <span class="p">:</span> <span class="s1">'ml'</span><span class="p">,</span> |
---|
381 | <span class="s1">'levelist'</span><span class="p">:</span> <span class="s1">'135/to/137'</span><span class="p">,</span> |
---|
382 | <span class="s1">'date'</span> <span class="p">:</span> <span class="s1">'2013-01-01'</span><span class="p">,</span> |
---|
383 | <span class="s1">'time'</span> <span class="p">:</span> <span class="s1">'06/18'</span><span class="p">,</span> |
---|
384 | <span class="s1">'area'</span> <span class="p">:</span> <span class="s1">'50/-5/40/5'</span><span class="p">,</span> |
---|
385 | <span class="s1">'grid'</span> <span class="p">:</span> <span class="s1">'1.0/1.0'</span><span class="p">,</span> |
---|
386 | <span class="s1">'format'</span> <span class="p">:</span> <span class="s1">'grib'</span><span class="p">,</span> |
---|
387 | <span class="p">},</span> <span class="s1">'download_era5_cdsapi.grib'</span><span class="p">)</span> |
---|
388 | </pre></div> |
---|
389 | </div> |
---|
390 | </div> |
---|
391 | </div> |
---|
392 | </div> |
---|
393 | <div class="section" id="local-installation"> |
---|
394 | <span id="ref-install-local"></span><h2>Local installation<a class="headerlink" href="#local-installation" title="Permalink to this headline">¶</a></h2> |
---|
395 | <p>The Fortran program called <code class="docutils literal notranslate"><span class="pre">calc_etadot</span></code> will be compiled during the |
---|
396 | installation process. A suitable makefile (<code class="docutils literal notranslate"><span class="pre">makefile_local_gfortran</span></code>) for the compilation is set by default. |
---|
397 | This may be overwritten by the <code class="docutils literal notranslate"><span class="pre">MAKEFILE</span></code> parameter in <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code>.</p> |
---|
398 | <p>However, you may have to adapt the makefile for your environment (the current default makefile works on Debian stretch and similar GNU/Linux distributions). If you use a new name for it, you will have to insert it into <code class="docutils literal notranslate"><span class="pre">setup.sh</span></code> |
---|
399 | For details on the makefile and how to adapt them, see <a class="reference internal" href="../Documentation/Input/fortran_makefile.html#ref-convert"><span class="std std-ref">Fortran Makefile</span></a>.</p> |
---|
400 | <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 |
---|
401 | with an editor and adapt the installation parameters in the section labelled with |
---|
402 | “AVAILABLE COMMANDLINE ARGUMENTS TO SET” as shown below:</p> |
---|
403 | <div class="literal-block-wrapper docutils container" id="setup-sh"> |
---|
404 | <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> |
---|
405 | <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>... |
---|
406 | <span class="c1"># -----------------------------------------------------------------</span> |
---|
407 | <span class="c1"># AVAILABLE COMMANDLINE ARGUMENTS TO SET</span> |
---|
408 | <span class="c1">#</span> |
---|
409 | <span class="c1"># THE USER HAS TO SPECIFY THESE PARAMETER</span> |
---|
410 | <span class="c1">#</span> |
---|
411 | <span class="nv">TARGET</span><span class="o">=</span><span class="s1">'local'</span> |
---|
412 | <span class="nv">MAKEFILE</span><span class="o">=</span><name_of_your_makefile> |
---|
413 | <span class="nv">ECUID</span><span class="o">=</span>None |
---|
414 | <span class="nv">ECGID</span><span class="o">=</span>None |
---|
415 | <span class="nv">GATEWAY</span><span class="o">=</span>None |
---|
416 | <span class="nv">DESTINATION</span><span class="o">=</span>None |
---|
417 | <span class="nv">INSTALLDIR</span><span class="o">=</span>None |
---|
418 | <span class="nv">JOB_TEMPLATE</span><span class="o">=</span><span class="s1">''</span> |
---|
419 | <span class="nv">CONTROLFILE</span><span class="o">=</span><span class="s1">'CONTROL_EA5'</span> |
---|
420 | ... |
---|
421 | </pre></div> |
---|
422 | </div> |
---|
423 | </div> |
---|
424 | <p>Afterwards, type:</p> |
---|
425 | <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ./setup.sh |
---|
426 | </pre></div> |
---|
427 | </div> |
---|
428 | <p>to start the installation. You should see the following standard output.</p> |
---|
429 | <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># Output of setup.sh</span> |
---|
430 | WARNING: installdir has not been specified |
---|
431 | flex_extract will be installed in here by compiling the Fortran <span class="nb">source</span> in <path-to-flex_extract>/flex_extract_v7.1/Source/Fortran |
---|
432 | Install flex_extract_v7.1 software at <span class="nb">local</span> in directory <path-to-flex_extract>/flex_extract_v7.1 |
---|
433 | |
---|
434 | Using makefile: makefile_local_gfortran |
---|
435 | 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 |
---|
436 | 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 |
---|
437 | 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 |
---|
438 | 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 |
---|
439 | 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 |
---|
440 | 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 |
---|
441 | 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 |
---|
442 | ln -sf calc_etadot_fast.out calc_etadot |
---|
443 | |
---|
444 | lrwxrwxrwx. <span class="m">1</span> <username> tmc <span class="m">20</span> <span class="m">15</span>. Mär <span class="m">13</span>:31 ./calc_etadot -> calc_etadot_fast.out |
---|
445 | </pre></div> |
---|
446 | </div> |
---|
447 | </div> |
---|
448 | </div> |
---|
449 | |
---|
450 | |
---|
451 | </div> |
---|
452 | |
---|
453 | </div> |
---|
454 | <footer> |
---|
455 | |
---|
456 | <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
---|
457 | |
---|
458 | <a href="../quick_start.html" class="btn btn-neutral float-right" title="Usage" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
---|
459 | |
---|
460 | |
---|
461 | <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> |
---|
462 | |
---|
463 | </div> |
---|
464 | |
---|
465 | |
---|
466 | <hr/> |
---|
467 | |
---|
468 | <div role="contentinfo"> |
---|
469 | <p> |
---|
470 | © Copyright 2020, Anne Philipp, Leopold Haimberger and Petra Seibert |
---|
471 | |
---|
472 | </p> |
---|
473 | </div> |
---|
474 | 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>. |
---|
475 | |
---|
476 | </footer> |
---|
477 | |
---|
478 | </div> |
---|
479 | </div> |
---|
480 | |
---|
481 | </section> |
---|
482 | |
---|
483 | </div> |
---|
484 | |
---|
485 | |
---|
486 | |
---|
487 | <script type="text/javascript"> |
---|
488 | jQuery(function () { |
---|
489 | SphinxRtdTheme.Navigation.enable(true); |
---|
490 | }); |
---|
491 | </script> |
---|
492 | |
---|
493 | |
---|
494 | |
---|
495 | |
---|
496 | |
---|
497 | |
---|
498 | </body> |
---|
499 | </html> |
---|