Index: documentation/Sphinx/build/html/_modules/ControlFile.html
===================================================================
--- documentation/Sphinx/build/html/_modules/ControlFile.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_modules/ControlFile.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,790 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>ControlFile &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="index.html">Module code</a> &raquo;</li>
+        
+      <li>ControlFile</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for ControlFile</h1><div class="highlight"><pre>
+<span></span><span class="ch">#!/usr/bin/env python</span>
+<span class="c1"># -*- coding: utf-8 -*-</span>
+<span class="c1">#*******************************************************************************</span>
+<span class="c1"># @Author: Leopold Haimberger (University of Vienna)</span>
+<span class="c1">#</span>
+<span class="c1"># @Date: November 2015</span>
+<span class="c1">#</span>
+<span class="c1"># @Change History:</span>
+<span class="c1">#</span>
+<span class="c1">#   February 2018 - Anne Philipp (University of Vienna):</span>
+<span class="c1">#        - applied PEP8 style guide</span>
+<span class="c1">#        - added documentation</span>
+<span class="c1">#        - applied some minor modifications in programming style/structure</span>
+<span class="c1">#        - changed name of class Control to ControlFile for more</span>
+<span class="c1">#          self-explanation naming</span>
+<span class="c1">#        - outsource of class ControlFile</span>
+<span class="c1">#        - initialisation of class attributes ( to avoid high number of</span>
+<span class="c1">#          conditional statements and set default values )</span>
+<span class="c1">#        - divided assignment of attributes and the check of conditions</span>
+<span class="c1">#        - outsourced the commandline argument assignments to control attributes</span>
+<span class="c1">#</span>
+<span class="c1"># @License:</span>
+<span class="c1">#    (C) Copyright 2015-2018.</span>
+<span class="c1">#</span>
+<span class="c1">#    This software is licensed under the terms of the Apache Licence Version 2.0</span>
+<span class="c1">#    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Description:</span>
+<span class="c1">#    The CONTROL file is the steering part of the FLEXPART extraction</span>
+<span class="c1">#    software. All necessary parameters needed to retrieve the data fields</span>
+<span class="c1">#    from the MARS archive for driving FLEXPART are set in a CONTROL file.</span>
+<span class="c1">#    Some specific parameters like the start and end dates can be overwritten</span>
+<span class="c1">#    by the command line parameters, but in generel all parameters needed</span>
+<span class="c1">#    for a complete set of fields for FLEXPART can be set in the CONTROL file.</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Content:</span>
+<span class="c1">#    - __init__</span>
+<span class="c1">#    - __read_controlfile__</span>
+<span class="c1">#    - __str__</span>
+<span class="c1">#    - assign_args_to_control</span>
+<span class="c1">#    - assign_envs_to_control</span>
+<span class="c1">#    - check_conditions</span>
+<span class="c1">#    - check_install_conditions</span>
+<span class="c1">#    - to_list</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Attributes:</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="c1">#*******************************************************************************</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># MODULES</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">import</span> <span class="nn">re</span>
+<span class="kn">import</span> <span class="nn">sys</span>
+<span class="kn">import</span> <span class="nn">inspect</span>
+
+<span class="c1"># software specific classes and modules from flex_extract</span>
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../&#39;</span><span class="p">)</span>
+<span class="kn">import</span> <span class="nn">_config</span>
+<span class="kn">from</span> <span class="nn">mods.tools</span> <span class="k">import</span> <span class="n">my_error</span><span class="p">,</span> <span class="n">silent_remove</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># CLASS</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<div class="viewcode-block" id="ControlFile"><a class="viewcode-back" href="../api.html#ControlFile.ControlFile">[docs]</a><span class="k">class</span> <span class="nc">ControlFile</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;</span>
+<span class="sd">    Contains the information which are stored in the CONTROL files.</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filename</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Initialises the instance of ControlFile class and defines</span>
+<span class="sd">        all class attributes with default values. Afterwards calls</span>
+<span class="sd">        function __read_controlfile__ to read parameter from Control file.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        filename : :obj:`string`</span>
+<span class="sd">            Name of CONTROL file.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="c1"># list of all possible class attributes and their default values</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">controlfile</span> <span class="o">=</span> <span class="n">filename</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">start_date</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">end_date</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">date_chunk</span> <span class="o">=</span> <span class="mi">3</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">dtime</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">basetime</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">type</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">time</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">step</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">acctype</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">acctime</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">accmaxstep</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">marsclass</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">dataset</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">stream</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">number</span> <span class="o">=</span> <span class="s1">&#39;OFF&#39;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">expver</span> <span class="o">=</span> <span class="s1">&#39;1&#39;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">gaussian</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">grid</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">area</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">left</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">lower</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">upper</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">right</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">level</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">levelist</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">resol</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">gauss</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">accuracy</span> <span class="o">=</span> <span class="mi">24</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">omega</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">omegadiff</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">eta</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">etadiff</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">etapar</span> <span class="o">=</span> <span class="mi">77</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">dpdeta</span> <span class="o">=</span> <span class="mi">1</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">smooth</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">format</span> <span class="o">=</span> <span class="s1">&#39;GRIB1&#39;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">addpar</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">prefix</span> <span class="o">=</span> <span class="s1">&#39;EN&#39;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">cwc</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">wrf</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">ecfsdir</span> <span class="o">=</span> <span class="s1">&#39;ectmp:/$</span><span class="si">{USER}</span><span class="s1">/econdemand/&#39;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">mailfail</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;$</span><span class="si">{USER}</span><span class="s1">&#39;</span><span class="p">]</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">mailops</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;$</span><span class="si">{USER}</span><span class="s1">&#39;</span><span class="p">]</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">grib2flexpart</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">ecstorage</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">ectrans</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">inputdir</span> <span class="o">=</span> <span class="n">_config</span><span class="o">.</span><span class="n">PATH_INPUT_DIR</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">outputdir</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">ecmwfdatadir</span> <span class="o">=</span> <span class="n">_config</span><span class="o">.</span><span class="n">PATH_FLEXEXTRACT_DIR</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">exedir</span> <span class="o">=</span> <span class="n">_config</span><span class="o">.</span><span class="n">PATH_FORTRAN_SRC</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">flexpart_root_scripts</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">makefile</span> <span class="o">=</span> <span class="s1">&#39;Makefile.gfortran&#39;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">destination</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">gateway</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">ecuid</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">ecgid</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">install_target</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">debug</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">request</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">public</span> <span class="o">=</span> <span class="mi">0</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">logicals</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;gauss&#39;</span><span class="p">,</span> <span class="s1">&#39;omega&#39;</span><span class="p">,</span> <span class="s1">&#39;omegadiff&#39;</span><span class="p">,</span> <span class="s1">&#39;eta&#39;</span><span class="p">,</span> <span class="s1">&#39;etadiff&#39;</span><span class="p">,</span>
+                         <span class="s1">&#39;dpdeta&#39;</span><span class="p">,</span> <span class="s1">&#39;cwc&#39;</span><span class="p">,</span> <span class="s1">&#39;wrf&#39;</span><span class="p">,</span> <span class="s1">&#39;grib2flexpart&#39;</span><span class="p">,</span> <span class="s1">&#39;ecstorage&#39;</span><span class="p">,</span>
+                         <span class="s1">&#39;ectrans&#39;</span><span class="p">,</span> <span class="s1">&#39;debug&#39;</span><span class="p">,</span> <span class="s1">&#39;request&#39;</span><span class="p">,</span> <span class="s1">&#39;public&#39;</span><span class="p">]</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">__read_controlfile__</span><span class="p">()</span>
+
+        <span class="k">return</span>
+
+    <span class="k">def</span> <span class="nf">__read_controlfile__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Read CONTROL file and assign all CONTROL file variables.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="k">try</span><span class="p">:</span>
+            <span class="n">cfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_CONTROLFILES</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">controlfile</span><span class="p">)</span>
+            <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">cfile</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+                <span class="n">fdata</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+        <span class="k">except</span> <span class="ne">IOError</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Could not read CONTROL file &quot;&#39;</span> <span class="o">+</span> <span class="n">cfile</span> <span class="o">+</span> <span class="s1">&#39;&quot;&#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Either it does not exist or its syntax is wrong.&#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Try &quot;&#39;</span> <span class="o">+</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> \
+                      <span class="s1">&#39; -h&quot; to print usage information&#39;</span><span class="p">)</span>
+            <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
+
+        <span class="c1"># go through every line and store parameter</span>
+        <span class="k">for</span> <span class="n">ldata</span> <span class="ow">in</span> <span class="n">fdata</span><span class="p">:</span>
+            <span class="n">data</span> <span class="o">=</span> <span class="n">ldata</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
+            <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">data</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
+                <span class="k">if</span> <span class="s1">&#39;m_&#39;</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">():</span>
+                    <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">2</span><span class="p">:]</span>
+                <span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="s1">&#39;class&#39;</span><span class="p">:</span>
+                    <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;marsclass&#39;</span>
+                <span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="s1">&#39;day1&#39;</span><span class="p">:</span>
+                    <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;start_date&#39;</span>
+                <span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="s1">&#39;day2&#39;</span><span class="p">:</span>
+                    <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;end_date&#39;</span>
+                <span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="s1">&#39;addpar&#39;</span><span class="p">:</span>
+                    <span class="k">if</span> <span class="s1">&#39;/&#39;</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">]:</span>
+                        <span class="c1"># remove leading &#39;/&#39; sign from addpar content</span>
+                        <span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;/&#39;</span><span class="p">:</span>
+                            <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="mi">1</span><span class="p">:]</span>
+                        <span class="n">dd</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)</span>
+                        <span class="n">data</span> <span class="o">=</span> <span class="p">[</span><span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span>
+                        <span class="k">for</span> <span class="n">d</span> <span class="ow">in</span> <span class="n">dd</span><span class="p">:</span>
+                            <span class="n">data</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">d</span><span class="p">)</span>
+                <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">data</span><span class="p">)</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
+                    <span class="k">if</span> <span class="s1">&#39;$&#39;</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">]:</span>
+                        <span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">(),</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
+                        <span class="k">while</span> <span class="s1">&#39;$&#39;</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">]:</span>
+                            <span class="n">i</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="s1">&#39;$&#39;</span><span class="p">)</span>
+                            <span class="n">j</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="s1">&#39;{&#39;</span><span class="p">)</span>
+                            <span class="n">k</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="s1">&#39;}&#39;</span><span class="p">)</span>
+                            <span class="n">var</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getenv</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="n">j</span><span class="o">+</span><span class="mi">1</span><span class="p">:</span><span class="n">k</span><span class="p">])</span>
+                            <span class="k">if</span> <span class="n">var</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+                                <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">][:</span><span class="n">i</span><span class="p">]</span> <span class="o">+</span> <span class="n">var</span> <span class="o">+</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="n">k</span><span class="o">+</span><span class="mi">1</span><span class="p">:]</span>
+                            <span class="k">else</span><span class="p">:</span>
+                                <span class="n">my_error</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mailfail</span><span class="p">,</span>
+                                         <span class="s1">&#39;Could not find variable &#39;</span>
+                                         <span class="o">+</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="n">j</span><span class="o">+</span><span class="mi">1</span><span class="p">:</span><span class="n">k</span><span class="p">]</span> <span class="o">+</span> <span class="s1">&#39; while reading &#39;</span> <span class="o">+</span>
+                                         <span class="bp">self</span><span class="o">.</span><span class="n">controlfile</span><span class="p">)</span>
+                        <span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">+</span> <span class="s1">&#39;_expanded&#39;</span><span class="p">,</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
+                    <span class="k">else</span><span class="p">:</span>
+                        <span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">!=</span> <span class="s1">&#39;none&#39;</span><span class="p">:</span>
+                            <span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">(),</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
+                        <span class="k">else</span><span class="p">:</span>
+                            <span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">(),</span> <span class="kc">None</span><span class="p">)</span>
+                <span class="k">elif</span> <span class="nb">len</span><span class="p">(</span><span class="n">data</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">2</span><span class="p">:</span>
+                    <span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">(),</span> <span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">:]))</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="k">pass</span>
+
+        <span class="k">return</span>
+
+    <span class="k">def</span> <span class="nf">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Prepares a string which have all the ControlFile class attributes</span>
+<span class="sd">        with its associated values. Each attribute is printed in one line and</span>
+<span class="sd">        in alphabetical order.</span>
+
+<span class="sd">        Example</span>
+<span class="sd">        -------</span>
+<span class="sd">        &#39;age&#39;: 10</span>
+<span class="sd">        &#39;color&#39;: &#39;Spotted&#39;</span>
+<span class="sd">        &#39;kids&#39;: 0</span>
+<span class="sd">        &#39;legs&#39;: 2</span>
+<span class="sd">        &#39;name&#39;: &#39;Dog&#39;</span>
+<span class="sd">        &#39;smell&#39;: &#39;Alot&#39;</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+<span class="sd">        string</span>
+<span class="sd">            Single string of concatenated ControlFile class attributes</span>
+<span class="sd">            with their values</span>
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="kn">import</span> <span class="nn">collections</span>
+
+        <span class="n">attrs</span> <span class="o">=</span> <span class="nb">vars</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+        <span class="n">attrs</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">OrderedDict</span><span class="p">(</span><span class="nb">sorted</span><span class="p">(</span><span class="n">attrs</span><span class="o">.</span><span class="n">items</span><span class="p">()))</span>
+
+        <span class="k">return</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">item</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">attrs</span><span class="o">.</span><span class="n">items</span><span class="p">())</span>
+
+<div class="viewcode-block" id="ControlFile.assign_args_to_control"><a class="viewcode-back" href="../api.html#ControlFile.ControlFile.assign_args_to_control">[docs]</a>    <span class="k">def</span> <span class="nf">assign_args_to_control</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">args</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Overwrites the existing ControlFile instance attributes with</span>
+<span class="sd">        the command line arguments.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        args : :obj:`Namespace`</span>
+<span class="sd">            Contains the commandline arguments from script/program call.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="c1"># get dictionary of command line parameters and eliminate all</span>
+        <span class="c1"># parameters which are None (were not specified)</span>
+        <span class="n">args_dict</span> <span class="o">=</span> <span class="nb">vars</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
+        <span class="n">arguments</span> <span class="o">=</span> <span class="p">{</span><span class="n">k</span> <span class="p">:</span> <span class="n">args_dict</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">args_dict</span>
+                     <span class="k">if</span> <span class="n">args_dict</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">!=</span> <span class="kc">None</span><span class="p">}</span>
+
+        <span class="c1"># assign all passed command line arguments to ControlFile instance</span>
+        <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">arguments</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
+            <span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">k</span><span class="p">),</span> <span class="n">v</span><span class="p">)</span>
+
+        <span class="k">return</span></div>
+
+<div class="viewcode-block" id="ControlFile.assign_envs_to_control"><a class="viewcode-back" href="../api.html#ControlFile.ControlFile.assign_envs_to_control">[docs]</a>    <span class="k">def</span> <span class="nf">assign_envs_to_control</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">envs</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Assigns the ECMWF environment parameter.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        envs : :obj:`dictionary` of :obj:`strings`</span>
+<span class="sd">            Contains the ECMWF environment parameternames &quot;ECUID&quot;, &quot;ECGID&quot;,</span>
+<span class="sd">            &quot;DESTINATION&quot; and &quot;GATEWAY&quot; with its corresponding values.</span>
+<span class="sd">            They were read from the file &quot;ECMWF_ENV&quot;.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">envs</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
+            <span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">k</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">(),</span> <span class="nb">str</span><span class="p">(</span><span class="n">v</span><span class="p">))</span>
+
+        <span class="k">return</span></div>
+
+<div class="viewcode-block" id="ControlFile.check_conditions"><a class="viewcode-back" href="../api.html#ControlFile.ControlFile.check_conditions">[docs]</a>    <span class="k">def</span> <span class="nf">check_conditions</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">queue</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Checks a couple of necessary attributes and conditions,</span>
+<span class="sd">        such as if they exist and contain values.</span>
+<span class="sd">        Otherwise set default values.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        queue : :obj:`string`</span>
+<span class="sd">            Name of the queue if submitted to the ECMWF servers.</span>
+<span class="sd">            Used to check if ecuid, ecgid, gateway and destination</span>
+<span class="sd">            are set correctly and are not empty.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="kn">from</span> <span class="nn">mods.tools</span> <span class="k">import</span> <span class="n">my_error</span>
+        <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+
+        <span class="c1"># check for having at least a starting date</span>
+        <span class="c1"># otherwise program is not allowed to run</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">start_date</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;start_date specified neither in command line nor </span><span class="se">\</span>
+<span class="s1">                   in CONTROL file &#39;</span> <span class="o">+</span>  <span class="bp">self</span><span class="o">.</span><span class="n">controlfile</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Try &quot;&#39;</span> <span class="o">+</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span>
+                  <span class="s1">&#39; -h&quot; to print usage information&#39;</span><span class="p">)</span>
+            <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
+
+        <span class="c1"># retrieve just one day if end_date isn&#39;t set</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">end_date</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">end_date</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">start_date</span>
+
+        <span class="c1"># basetime has only two possible values</span>
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">basetime</span><span class="p">:</span>
+            <span class="k">if</span> <span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">basetime</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span> <span class="ow">and</span> <span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">basetime</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">12</span><span class="p">:</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Basetime has an invalid value!&#39;</span><span class="p">)</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Basetime = &#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">basetime</span><span class="p">))</span>
+                <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
+
+        <span class="c1"># assure consistency of levelist and level</span>
+        <span class="c1"># up-to-date available maximum level numbers at ECMWF, 05.10.2018</span>
+        <span class="n">max_level_list</span> <span class="o">=</span> <span class="p">[</span><span class="mi">16</span><span class="p">,</span> <span class="mi">19</span><span class="p">,</span> <span class="mi">31</span><span class="p">,</span> <span class="mi">40</span><span class="p">,</span> <span class="mi">50</span><span class="p">,</span> <span class="mi">60</span><span class="p">,</span> <span class="mi">62</span><span class="p">,</span> <span class="mi">91</span><span class="p">,</span> <span class="mi">137</span><span class="p">]</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">levelist</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">level</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Warning: neither levelist nor level </span><span class="se">\</span>
+<span class="s1">                               specified in CONTROL file&#39;</span><span class="p">)</span>
+            <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
+        <span class="k">elif</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">levelist</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">level</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">levelist</span> <span class="o">=</span> <span class="s1">&#39;1/to/&#39;</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">level</span>
+        <span class="k">elif</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">levelist</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">level</span><span class="p">)</span> <span class="ow">or</span> \
+             <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">levelist</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">level</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]):</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">level</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">levelist</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="k">pass</span>
+
+        <span class="c1"># check if max level is a valid level</span>
+        <span class="k">if</span> <span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">level</span><span class="p">)</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">max_level_list</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;ERROR: &#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;LEVEL must be the maximum level of a specified &#39;</span>
+                  <span class="s1">&#39;level list from ECMWF, e.g.&#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;[16, 19, 31, 40, 50, 60, 62, 91 or 137]&#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Check parameter &quot;LEVEL&quot; or the max level of &quot;LEVELIST&quot;!&#39;</span><span class="p">)</span>
+            <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
+
+        <span class="c1"># if area was provided (only from commandline)</span>
+        <span class="c1"># decompose area into its 4 components</span>
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">area</span><span class="p">:</span>
+            <span class="n">components</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">area</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)</span>
+            <span class="c1"># convert float to integer coordinates</span>
+            <span class="k">if</span> <span class="s1">&#39;.&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">area</span><span class="p">:</span>
+                <span class="n">components</span> <span class="o">=</span> <span class="p">[</span><span class="nb">str</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="nb">float</span><span class="p">(</span><span class="n">item</span><span class="p">)</span> <span class="o">*</span> <span class="mi">1000</span><span class="p">))</span>
+                              <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">item</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">components</span><span class="p">)]</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">upper</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">left</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">lower</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">right</span> <span class="o">=</span> <span class="n">components</span>
+
+        <span class="c1"># prepare step list if &quot;/&quot; signs are found</span>
+        <span class="k">if</span> <span class="s1">&#39;/&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="p">:</span>
+            <span class="n">steps</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)</span>
+            <span class="k">if</span> <span class="s1">&#39;to&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="ow">and</span> <span class="s1">&#39;by&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="o">.</span><span class="n">lower</span><span class="p">():</span>
+                <span class="n">ilist</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">steps</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span>
+                                  <span class="nb">int</span><span class="p">(</span><span class="n">steps</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span>
+                                  <span class="nb">int</span><span class="p">(</span><span class="n">steps</span><span class="p">[</span><span class="mi">4</span><span class="p">]))</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">step</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;</span><span class="si">{:0&gt;3}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">ilist</span><span class="p">]</span>
+            <span class="k">elif</span> <span class="s1">&#39;to&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="ow">and</span> <span class="s1">&#39;by&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="o">.</span><span class="n">lower</span><span class="p">():</span>
+                <span class="n">my_error</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mailfail</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">step</span> <span class="o">+</span> <span class="s1">&#39;:</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">+</span>
+                         <span class="s1">&#39;if &quot;to&quot; is used in steps parameter, </span><span class="se">\</span>
+<span class="s1">                         please use &quot;by&quot; as well&#39;</span><span class="p">)</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">step</span> <span class="o">=</span> <span class="n">steps</span>
+
+        <span class="c1"># if maxstep wasn&#39;t provided</span>
+        <span class="c1"># search for it in the &quot;step&quot; parameter</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">maxstep</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">=</span> <span class="mi">0</span>
+            <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="p">:</span>
+                <span class="k">if</span> <span class="nb">int</span><span class="p">(</span><span class="n">s</span><span class="p">)</span> <span class="o">&gt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">maxstep</span><span class="p">:</span>
+                    <span class="bp">self</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">maxstep</span><span class="p">)</span>
+
+        <span class="c1"># set root scripts since it is needed later on</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">flexpart_root_scripts</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">ecmwfdatadir</span>
+
+        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">outputdir</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">outputdir</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">inputdir</span>
+
+        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mailfail</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
+            <span class="k">if</span> <span class="s1">&#39;,&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mailfail</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">mailfail</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mailfail</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;,&#39;</span><span class="p">)</span>
+            <span class="k">elif</span> <span class="s1">&#39; &#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mailfail</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">mailfail</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mailfail</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">mailfail</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">mailfail</span><span class="p">]</span>
+
+        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mailops</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
+            <span class="k">if</span> <span class="s1">&#39;,&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mailops</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">mailops</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mailops</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;,&#39;</span><span class="p">)</span>
+            <span class="k">elif</span> <span class="s1">&#39; &#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mailops</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">mailops</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mailops</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">mailops</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">mailops</span><span class="p">]</span>
+
+        <span class="k">if</span> <span class="n">queue</span> <span class="ow">in</span> <span class="n">_config</span><span class="o">.</span><span class="n">QUEUES_LIST</span> <span class="ow">and</span> \
+           <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">gateway</span> <span class="ow">or</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">destination</span> <span class="ow">or</span> \
+           <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">ecuid</span> <span class="ow">or</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">ecgid</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">Environment variables GATEWAY, DESTINATION, ECUID and </span><span class="se">\</span>
+<span class="s1">                   ECGID were not set properly!&#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Please check for existence of file &quot;ECMWF_ENV&quot; in the </span><span class="se">\</span>
+<span class="s1">                   python directory!&#39;</span><span class="p">)</span>
+            <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">request</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
+            <span class="n">marsfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span>
+                                    <span class="n">_config</span><span class="o">.</span><span class="n">FILE_MARS_REQUESTS</span><span class="p">)</span>
+            <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">marsfile</span><span class="p">):</span>
+                <span class="n">silent_remove</span><span class="p">(</span><span class="n">marsfile</span><span class="p">)</span>
+
+        <span class="c1"># check all logical variables for data type</span>
+        <span class="c1"># if its a string change to integer</span>
+        <span class="k">for</span> <span class="n">var</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">logicals</span><span class="p">:</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">var</span><span class="p">),</span> <span class="nb">int</span><span class="p">):</span>
+                <span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">var</span><span class="p">,</span> <span class="nb">int</span><span class="p">(</span><span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">var</span><span class="p">)))</span>
+
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">public</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">dataset</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;ERROR: &#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;If public mars data wants to be retrieved, &#39;</span>
+                  <span class="s1">&#39;the &quot;dataset&quot;-parameter has to be set in the control file!&#39;</span><span class="p">)</span>
+            <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">type</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">type</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">type</span><span class="p">]</span>
+
+        <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">val</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">type</span><span class="p">):</span>
+            <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">type</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;AN&#39;</span> <span class="ow">and</span> <span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Analysis retrievals must have STEP = 0 (is set to 0)&#39;</span><span class="p">)</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">type</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span>
+
+        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">time</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">time</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">time</span><span class="p">]</span>
+
+        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">step</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">step</span><span class="p">]</span>
+
+        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">acctype</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;... Control paramter ACCTYPE was not defined.&#39;</span><span class="p">)</span>
+            <span class="k">try</span><span class="p">:</span>
+                <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">type</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">type</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">&#39;AN&#39;</span><span class="p">:</span>
+                    <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Use old setting by using TYPE[1] for flux forecast!&#39;</span><span class="p">)</span>
+                    <span class="bp">self</span><span class="o">.</span><span class="n">acctype</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">type</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
+            <span class="k">except</span><span class="p">:</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Use default value &quot;FC&quot; for flux forecast!&#39;</span><span class="p">)</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">acctype</span><span class="o">=</span><span class="s1">&#39;FC&#39;</span>
+
+        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">acctime</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;... Control paramter ACCTIME was not defined.&#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Use default value &quot;00/12&quot; for flux forecast!&#39;</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">acctime</span><span class="o">=</span><span class="s1">&#39;00/12&#39;</span>
+
+        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">accmaxstep</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;... Control paramter ACCMAXSTEP was not defined.&#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Use default value &quot;12&quot; for flux forecast!&#39;</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">accmaxstep</span><span class="o">=</span><span class="s1">&#39;12&#39;</span>
+
+        <span class="k">return</span></div>
+
+<div class="viewcode-block" id="ControlFile.check_install_conditions"><a class="viewcode-back" href="../api.html#ControlFile.ControlFile.check_install_conditions">[docs]</a>    <span class="k">def</span> <span class="nf">check_install_conditions</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Checks a couple of necessary attributes and conditions</span>
+<span class="sd">        for the installation such as if they exist and contain values.</span>
+<span class="sd">        Otherwise set default values.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">install_target</span> <span class="ow">and</span> \
+           <span class="bp">self</span><span class="o">.</span><span class="n">install_target</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">&#39;local&#39;</span><span class="p">,</span> <span class="s1">&#39;ecgate&#39;</span><span class="p">,</span> <span class="s1">&#39;cca&#39;</span><span class="p">]:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;ERROR: unknown or missing installation target &#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;target: &#39;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">install_target</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;please specify correct installation target &#39;</span> <span class="o">+</span>
+                  <span class="s1">&#39;(local | ecgate | cca)&#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;use -h or --help for help&#39;</span><span class="p">)</span>
+            <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">install_target</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">install_target</span> <span class="o">!=</span> <span class="s1">&#39;local&#39;</span><span class="p">:</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">ecgid</span> <span class="ow">or</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">ecuid</span> <span class="ow">or</span> \
+               <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">gateway</span> <span class="ow">or</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">destination</span><span class="p">:</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Please enter your ECMWF user id and group id as well &#39;</span> <span class="o">+</span>
+                      <span class="s1">&#39;as the </span><span class="se">\n</span><span class="s1">name of the local gateway and the ectrans &#39;</span> <span class="o">+</span>
+                      <span class="s1">&#39;destination &#39;</span><span class="p">)</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;with command line options --ecuid --ecgid </span><span class="se">\</span>
+<span class="s1">                       --gateway --destination&#39;</span><span class="p">)</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Try &quot;&#39;</span> <span class="o">+</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> \
+                      <span class="s1">&#39; -h&quot; to print usage information&#39;</span><span class="p">)</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Please consult ecaccess documentation or ECMWF user </span><span class="se">\</span>
+<span class="s1">                       support for further details&#39;</span><span class="p">)</span>
+                <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
+
+            <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">flexpart_root_scripts</span> <span class="o">=</span> <span class="s1">&#39;$</span><span class="si">{HOME}</span><span class="s1">&#39;</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">flexpart_root_scripts</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">flexpart_root_scripts</span>
+        <span class="k">else</span><span class="p">:</span> <span class="c1"># local</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">flexpart_root_scripts</span> <span class="o">=</span> <span class="n">_config</span><span class="o">.</span><span class="n">PATH_FLEXEXTRACT_DIR</span>
+
+        <span class="k">return</span></div>
+
+<div class="viewcode-block" id="ControlFile.to_list"><a class="viewcode-back" href="../api.html#ControlFile.ControlFile.to_list">[docs]</a>    <span class="k">def</span> <span class="nf">to_list</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Just generates a list of strings containing the attributes and</span>
+<span class="sd">        assigned values except the attributes &quot;_expanded&quot;, &quot;exedir&quot;,</span>
+<span class="sd">        &quot;ecmwfdatadir&quot; and &quot;flexpart_root_scripts&quot;.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+<span class="sd">        l : :obj:`list`</span>
+<span class="sd">            A sorted list of the all ControlFile class attributes with</span>
+<span class="sd">            their values except the attributes &quot;_expanded&quot;, &quot;exedir&quot;,</span>
+<span class="sd">            &quot;ecmwfdatadir&quot; and &quot;flexpart_root_scripts&quot;.</span>
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="kn">import</span> <span class="nn">collections</span>
+
+        <span class="n">attrs</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">OrderedDict</span><span class="p">(</span><span class="nb">sorted</span><span class="p">(</span><span class="nb">vars</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span><span class="o">.</span><span class="n">items</span><span class="p">()))</span>
+
+        <span class="n">l</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+
+        <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">attrs</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
+            <span class="k">if</span> <span class="s1">&#39;_expanded&#39;</span> <span class="ow">in</span> <span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">]:</span>
+                <span class="k">pass</span>
+            <span class="k">elif</span> <span class="s1">&#39;exedir&#39;</span> <span class="ow">in</span> <span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">]:</span>
+                <span class="k">pass</span>
+            <span class="k">elif</span> <span class="s1">&#39;flexpart_root_scripts&#39;</span> <span class="ow">in</span> <span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">]:</span>
+                <span class="k">pass</span>
+            <span class="k">elif</span> <span class="s1">&#39;ecmwfdatadir&#39;</span> <span class="ow">in</span> <span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">]:</span>
+                <span class="k">pass</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">item</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="nb">list</span><span class="p">):</span>
+                    <span class="n">stot</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>
+                    <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="n">item</span><span class="p">[</span><span class="mi">1</span><span class="p">]:</span>
+                        <span class="n">stot</span> <span class="o">+=</span> <span class="n">s</span> <span class="o">+</span> <span class="s1">&#39; &#39;</span>
+
+                    <span class="n">l</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">stot</span><span class="p">))</span>
+                <span class="k">else</span><span class="p">:</span>
+                    <span class="n">l</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">item</span><span class="p">)</span>
+
+        <span class="k">return</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">l</span><span class="p">)</span></div></div>
+
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/_modules/EcFlexpart.html
===================================================================
--- documentation/Sphinx/build/html/_modules/EcFlexpart.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_modules/EcFlexpart.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,1510 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>EcFlexpart &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="index.html">Module code</a> &raquo;</li>
+        
+      <li>EcFlexpart</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for EcFlexpart</h1><div class="highlight"><pre>
+<span></span><span class="ch">#!/usr/bin/env python</span>
+<span class="c1"># -*- coding: utf-8 -*-</span>
+<span class="c1">#*******************************************************************************</span>
+<span class="c1"># @Author: Anne Fouilloux (University of Oslo)</span>
+<span class="c1">#</span>
+<span class="c1"># @Date: October 2014</span>
+<span class="c1">#</span>
+<span class="c1"># @Change History:</span>
+<span class="c1">#</span>
+<span class="c1">#    November 2015 - Leopold Haimberger (University of Vienna):</span>
+<span class="c1">#        - extended with class Control</span>
+<span class="c1">#        - removed functions mkdir_p, daterange, years_between, months_between</span>
+<span class="c1">#        - added functions darain, dapoly, to_param_id, init128, normal_exit,</span>
+<span class="c1">#          my_error, clean_up, install_args_and_control,</span>
+<span class="c1">#          interpret_args_and_control,</span>
+<span class="c1">#        - removed function __del__ in class EIFLexpart</span>
+<span class="c1">#        - added the following functions in EIFlexpart:</span>
+<span class="c1">#            - create_namelist</span>
+<span class="c1">#            - process_output</span>
+<span class="c1">#            - deacc_fluxes</span>
+<span class="c1">#        - modified existing EIFlexpart - functions for the use in</span>
+<span class="c1">#          flex_extract</span>
+<span class="c1">#        - retrieve also longer term forecasts, not only analyses and</span>
+<span class="c1">#          short term forecast data</span>
+<span class="c1">#        - added conversion into GRIB2</span>
+<span class="c1">#        - added conversion into .fp format for faster execution of FLEXPART</span>
+<span class="c1">#          (see https://www.flexpart.eu/wiki/FpCtbtoWo4FpFormat)</span>
+<span class="c1">#</span>
+<span class="c1">#    February 2018 - Anne Philipp (University of Vienna):</span>
+<span class="c1">#        - applied PEP8 style guide</span>
+<span class="c1">#        - added documentation</span>
+<span class="c1">#        - removed function getFlexpartTime in class EcFlexpart</span>
+<span class="c1">#        - outsourced class ControlFile</span>
+<span class="c1">#        - outsourced class MarsRetrieval</span>
+<span class="c1">#        - changed class name from EIFlexpart to EcFlexpart</span>
+<span class="c1">#        - applied minor code changes (style)</span>
+<span class="c1">#        - removed &quot;dead code&quot; , e.g. retrieval of Q since it is not needed</span>
+<span class="c1">#        - removed &quot;times&quot; parameter from retrieve-method since it is not used</span>
+<span class="c1">#        - seperated function &quot;retrieve&quot; into smaller functions (less code</span>
+<span class="c1">#          duplication, easier testing)</span>
+<span class="c1">#</span>
+<span class="c1"># @License:</span>
+<span class="c1">#    (C) Copyright 2014-2018.</span>
+<span class="c1">#</span>
+<span class="c1">#    This software is licensed under the terms of the Apache Licence Version 2.0</span>
+<span class="c1">#    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Description:</span>
+<span class="c1">#    FLEXPART needs grib files in a specifc format. All necessary data fields</span>
+<span class="c1">#    for one time step are stored in a single file. The class represents an</span>
+<span class="c1">#    instance with all the parameter and settings necessary for retrieving</span>
+<span class="c1">#    MARS data and modifing them so they are fitting FLEXPART need. The class</span>
+<span class="c1">#    is able to disaggregate the fluxes and convert grid types to the one needed</span>
+<span class="c1">#    by FLEXPART, therefore using the FORTRAN program.</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Content:</span>
+<span class="c1">#    - __init__</span>
+<span class="c1">#    - write_namelist</span>
+<span class="c1">#    - retrieve</span>
+<span class="c1">#    - process_output</span>
+<span class="c1">#    - create</span>
+<span class="c1">#    - deacc_fluxes</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Attributes:</span>
+<span class="c1">#</span>
+<span class="c1">#  TODO</span>
+<span class="c1">#</span>
+<span class="c1">#*******************************************************************************</span>
+<span class="c1">#pylint: disable=unsupported-assignment-operation</span>
+<span class="c1"># this is disabled because for this specific case its an error in pylint</span>
+<span class="c1">#pylint: disable=consider-using-enumerate</span>
+<span class="c1"># this is not useful in this case</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># MODULES</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">import</span> <span class="nn">sys</span>
+<span class="kn">import</span> <span class="nn">glob</span>
+<span class="kn">import</span> <span class="nn">shutil</span>
+<span class="kn">import</span> <span class="nn">subprocess</span>
+<span class="kn">from</span> <span class="nn">datetime</span> <span class="k">import</span> <span class="n">datetime</span><span class="p">,</span> <span class="n">timedelta</span>
+<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+
+<span class="kn">from</span> <span class="nn">gribapi</span> <span class="k">import</span> <span class="p">(</span><span class="n">grib_set</span><span class="p">,</span> <span class="n">grib_index_select</span><span class="p">,</span> <span class="n">grib_new_from_index</span><span class="p">,</span> <span class="n">grib_get</span><span class="p">,</span>
+                     <span class="n">grib_write</span><span class="p">,</span> <span class="n">grib_get_values</span><span class="p">,</span> <span class="n">grib_set_values</span><span class="p">,</span> <span class="n">grib_release</span><span class="p">,</span>
+                     <span class="n">grib_index_release</span><span class="p">,</span> <span class="n">grib_index_get</span><span class="p">)</span>
+
+<span class="c1"># from eccodes import (codes_index_select, codes_new_from_index, codes_get,</span>
+                     <span class="c1"># codes_get_values, codes_set_values, codes_set,</span>
+                     <span class="c1"># codes_write, codes_release, codes_new_from_index,</span>
+                     <span class="c1"># codes_index_release, codes_index_get)</span>
+
+<span class="c1"># software specific classes and modules from flex_extract</span>
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../&#39;</span><span class="p">)</span>
+<span class="kn">import</span> <span class="nn">_config</span>
+<span class="kn">from</span> <span class="nn">GribTools</span> <span class="k">import</span> <span class="n">GribTools</span>
+<span class="kn">from</span> <span class="nn">mods.tools</span> <span class="k">import</span> <span class="p">(</span><span class="n">init128</span><span class="p">,</span> <span class="n">to_param_id</span><span class="p">,</span> <span class="n">silent_remove</span><span class="p">,</span> <span class="n">product</span><span class="p">,</span>
+                        <span class="n">my_error</span><span class="p">,</span> <span class="n">make_dir</span><span class="p">)</span>
+<span class="kn">from</span> <span class="nn">MarsRetrieval</span> <span class="k">import</span> <span class="n">MarsRetrieval</span>
+<span class="kn">import</span> <span class="nn">mods.disaggregation</span> <span class="k">as</span> <span class="nn">disaggregation</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># CLASS</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<div class="viewcode-block" id="EcFlexpart"><a class="viewcode-back" href="../api.html#EcFlexpart.EcFlexpart">[docs]</a><span class="k">class</span> <span class="nc">EcFlexpart</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;</span>
+<span class="sd">    Class to retrieve FLEXPART specific ECMWF data.</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="c1"># --------------------------------------------------------------------------</span>
+    <span class="c1"># CLASS FUNCTIONS</span>
+    <span class="c1"># --------------------------------------------------------------------------</span>
+    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">fluxes</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Creates an object/instance of EcFlexpart with the associated</span>
+<span class="sd">        settings of its attributes for the retrieval.</span>
+
+<span class="sd">        Parameters:</span>
+<span class="sd">        -----------</span>
+<span class="sd">        c : :obj:`ControlFile`</span>
+<span class="sd">            Contains all the parameters of CONTROL file and</span>
+<span class="sd">            command line.</span>
+
+<span class="sd">        fluxes : :obj:`boolean`, optional</span>
+<span class="sd">            Decides if the flux parameter settings are stored or</span>
+<span class="sd">            the rest of the parameter list.</span>
+<span class="sd">            Default value is False.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="c1"># set a counter for the number of mars requests generated</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">mreq_count</span> <span class="o">=</span> <span class="mi">0</span>
+
+        <span class="c1"># different mars types for retrieving data for flexpart</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">types</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
+
+        <span class="c1"># Pure forecast mode</span>
+        <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">&gt;</span> <span class="nb">len</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">type</span><span class="p">)</span> <span class="ow">and</span> <span class="s1">&#39;AN&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">c</span><span class="o">.</span><span class="n">type</span><span class="p">:</span>
+            <span class="n">c</span><span class="o">.</span><span class="n">type</span> <span class="o">=</span> <span class="p">[</span><span class="n">c</span><span class="o">.</span><span class="n">type</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span>
+            <span class="n">c</span><span class="o">.</span><span class="n">step</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;</span><span class="si">{:0&gt;3}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">step</span><span class="p">[</span><span class="mi">0</span><span class="p">]))]</span>
+            <span class="n">c</span><span class="o">.</span><span class="n">time</span> <span class="o">=</span> <span class="p">[</span><span class="n">c</span><span class="o">.</span><span class="n">time</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span>
+            <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">+</span> <span class="mi">1</span><span class="p">):</span>
+                <span class="n">c</span><span class="o">.</span><span class="n">type</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">type</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
+                <span class="n">c</span><span class="o">.</span><span class="n">step</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;</span><span class="si">{:0&gt;3}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">i</span><span class="p">))</span>
+                <span class="n">c</span><span class="o">.</span><span class="n">time</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">time</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">inputdir</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">inputdir</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">dataset</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">dataset</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">basetime</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">basetime</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">dtime</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">dtime</span>
+        <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="k">if</span> <span class="n">fluxes</span> <span class="ow">and</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">&lt;=</span> <span class="mi">24</span><span class="p">:</span>
+            <span class="c1"># no forecast beyond one day is needed!</span>
+            <span class="c1"># Thus, prepare flux data manually as usual</span>
+            <span class="c1"># with only forecast fields with start times at 00/12</span>
+            <span class="c1"># (but without 00/12 fields since these are</span>
+            <span class="c1"># the initialisation times of the flux fields</span>
+            <span class="c1"># and therefore are zero all the time)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">[</span><span class="nb">str</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">acctype</span><span class="p">)]</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;times&#39;</span><span class="p">:</span> <span class="nb">str</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">acctime</span><span class="p">),</span>
+                                          <span class="s1">&#39;steps&#39;</span><span class="p">:</span> <span class="s1">&#39;</span><span class="si">{}</span><span class="s1">/to/</span><span class="si">{}</span><span class="s1">/by/</span><span class="si">{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                                              <span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">accmaxstep</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">)}</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="k">for</span> <span class="n">ty</span><span class="p">,</span> <span class="n">st</span><span class="p">,</span> <span class="n">ti</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">type</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">step</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">time</span><span class="p">):</span>
+                <span class="n">btlist</span> <span class="o">=</span> <span class="nb">range</span><span class="p">(</span><span class="mi">24</span><span class="p">)</span>
+                <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">basetime</span> <span class="o">==</span> <span class="s1">&#39;12&#39;</span><span class="p">:</span>
+                    <span class="n">btlist</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">11</span><span class="p">,</span> <span class="mi">12</span><span class="p">]</span>
+                <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">basetime</span> <span class="o">==</span> <span class="s1">&#39;00&#39;</span><span class="p">:</span>
+                    <span class="n">btlist</span> <span class="o">=</span> <span class="p">[</span><span class="mi">13</span><span class="p">,</span> <span class="mi">14</span><span class="p">,</span> <span class="mi">15</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="mi">17</span><span class="p">,</span> <span class="mi">18</span><span class="p">,</span> <span class="mi">19</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="mi">21</span><span class="p">,</span> <span class="mi">22</span><span class="p">,</span> <span class="mi">23</span><span class="p">,</span> <span class="mi">0</span><span class="p">]</span>
+
+                <span class="k">if</span> <span class="p">((</span><span class="n">ty</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">==</span> <span class="s1">&#39;AN&#39;</span> <span class="ow">and</span> <span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">time</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">%</span> <span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">))</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="ow">or</span>
+                    <span class="p">(</span><span class="n">ty</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">!=</span> <span class="s1">&#39;AN&#39;</span> <span class="ow">and</span> <span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">step</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">%</span> <span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">))</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">and</span>
+                     <span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">step</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">%</span> <span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">))</span> <span class="p">)</span> <span class="ow">and</span> \
+                    <span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">time</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="ow">in</span> <span class="n">btlist</span> <span class="ow">or</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">&gt;</span> <span class="mi">24</span><span class="p">):</span>
+
+                    <span class="k">if</span> <span class="n">ty</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
+                        <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">[</span><span class="n">ty</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;times&#39;</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="s1">&#39;steps&#39;</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">}</span>
+
+                    <span class="k">if</span> <span class="n">ti</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">[</span><span class="n">ty</span><span class="p">][</span><span class="s1">&#39;times&#39;</span><span class="p">]:</span>
+                        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">[</span><span class="n">ty</span><span class="p">][</span><span class="s1">&#39;times&#39;</span><span class="p">]:</span>
+                            <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">[</span><span class="n">ty</span><span class="p">][</span><span class="s1">&#39;times&#39;</span><span class="p">]</span> <span class="o">+=</span> <span class="s1">&#39;/&#39;</span>
+                        <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">[</span><span class="n">ty</span><span class="p">][</span><span class="s1">&#39;times&#39;</span><span class="p">]</span> <span class="o">+=</span> <span class="n">ti</span>
+
+                    <span class="k">if</span> <span class="n">st</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">[</span><span class="n">ty</span><span class="p">][</span><span class="s1">&#39;steps&#39;</span><span class="p">]:</span>
+                        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">[</span><span class="n">ty</span><span class="p">][</span><span class="s1">&#39;steps&#39;</span><span class="p">]:</span>
+                            <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">[</span><span class="n">ty</span><span class="p">][</span><span class="s1">&#39;steps&#39;</span><span class="p">]</span> <span class="o">+=</span> <span class="s1">&#39;/&#39;</span>
+                        <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">[</span><span class="n">ty</span><span class="p">][</span><span class="s1">&#39;steps&#39;</span><span class="p">]</span> <span class="o">+=</span> <span class="n">st</span>
+                <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">marsclass</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">marsclass</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">stream</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">stream</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">number</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">number</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">resol</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">resol</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">accuracy</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">accuracy</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">level</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">level</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">expver</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">expver</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">levelist</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">levelist</span>
+        <span class="c1"># for gaussian grid retrieval</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">glevelist</span> <span class="o">=</span> <span class="s1">&#39;1/to/&#39;</span> <span class="o">+</span> <span class="n">c</span><span class="o">.</span><span class="n">level</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">gaussian</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">gaussian</span>
+
+        <span class="k">if</span> <span class="s1">&#39;N&#39;</span> <span class="ow">in</span> <span class="n">c</span><span class="o">.</span><span class="n">grid</span><span class="p">:</span>  <span class="c1"># Gaussian output grid</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">grid</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">grid</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">area</span> <span class="o">=</span> <span class="s1">&#39;G&#39;</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">grid</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">{}</span><span class="s1">/</span><span class="si">{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">grid</span><span class="p">)</span> <span class="o">/</span> <span class="mf">1000.</span><span class="p">,</span> <span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">grid</span><span class="p">)</span> <span class="o">/</span> <span class="mf">1000.</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">area</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">{}</span><span class="s1">/</span><span class="si">{}</span><span class="s1">/</span><span class="si">{}</span><span class="s1">/</span><span class="si">{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">upper</span><span class="p">)</span> <span class="o">/</span> <span class="mf">1000.</span><span class="p">,</span>
+                                             <span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">left</span><span class="p">)</span> <span class="o">/</span> <span class="mf">1000.</span><span class="p">,</span>
+                                             <span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">lower</span><span class="p">)</span> <span class="o">/</span> <span class="mf">1000.</span><span class="p">,</span>
+                                             <span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">right</span><span class="p">)</span> <span class="o">/</span> <span class="mf">1000.</span><span class="p">)</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">outputfilelist</span> <span class="o">=</span> <span class="p">[]</span>
+
+
+        <span class="c1"># Now comes the nasty part that deals with the different</span>
+        <span class="c1"># scenarios we have:</span>
+        <span class="c1"># 1) Calculation of etadot on</span>
+        <span class="c1">#    a) Gaussian grid</span>
+        <span class="c1">#    b) Output grid</span>
+        <span class="c1">#    c) Output grid using parameter 77 retrieved from MARS</span>
+        <span class="c1"># 3) Calculation/Retrieval of omega</span>
+        <span class="c1"># 4) Download also data for WRF</span>
+
+        <span class="c1"># Different grids need different retrievals</span>
+        <span class="c1"># SH = Spherical Harmonics, GG = Gaussian Grid,</span>
+        <span class="c1"># OG = Output Grid, ML = MultiLevel, SL = SingleLevel</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">params</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;SH__ML&#39;</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="s1">&#39;SH__SL&#39;</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">,</span>
+                       <span class="s1">&#39;GG__ML&#39;</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="s1">&#39;GG__SL&#39;</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">,</span>
+                       <span class="s1">&#39;OG__ML&#39;</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="s1">&#39;OG__SL&#39;</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">,</span>
+                       <span class="s1">&#39;OG_OROLSM_SL&#39;</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="s1">&#39;OG_acc_SL&#39;</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">}</span>
+        <span class="c1"># the self.params dictionary stores a list of</span>
+        <span class="c1"># [param, levtype, levelist, grid] per key</span>
+
+        <span class="k">if</span> <span class="n">fluxes</span> <span class="ow">is</span> <span class="kc">False</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;SH__SL&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;LNSP&#39;</span><span class="p">,</span> <span class="s1">&#39;ML&#39;</span><span class="p">,</span> <span class="s1">&#39;1&#39;</span><span class="p">,</span> <span class="s1">&#39;OFF&#39;</span><span class="p">]</span>
+            <span class="c1">#                        &quot;SD/MSL/TCC/10U/10V/2T/2D/129/172&quot;</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG__SL&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;141/151/164/165/166/167/168/129/172&quot;</span><span class="p">,</span> \
+                                     <span class="s1">&#39;SFC&#39;</span><span class="p">,</span> <span class="s1">&#39;1&#39;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid</span><span class="p">]</span>
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">addpar</span><span class="p">:</span>
+                <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">addpar</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;/&#39;</span><span class="p">:</span>
+                    <span class="n">c</span><span class="o">.</span><span class="n">addpar</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">addpar</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG__SL&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">+=</span> <span class="s1">&#39;/&#39;</span> <span class="o">+</span> <span class="s1">&#39;/&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">addpar</span><span class="p">)</span>
+
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">marsclass</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">==</span> <span class="s1">&#39;EA&#39;</span> <span class="ow">or</span> <span class="n">c</span><span class="o">.</span><span class="n">marsclass</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">==</span> <span class="s1">&#39;EP&#39;</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG_OROLSM__SL&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;160/27/28/244&quot;</span><span class="p">,</span>
+                                                <span class="s1">&#39;SFC&#39;</span><span class="p">,</span> <span class="s1">&#39;1&#39;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid</span><span class="p">]</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG_OROLSM__SL&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;160/27/28/173&quot;</span><span class="p">,</span> \
+                                                <span class="s1">&#39;SFC&#39;</span><span class="p">,</span> <span class="s1">&#39;1&#39;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid</span><span class="p">]</span>
+
+            <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG__ML&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;T/Q&#39;</span><span class="p">,</span> <span class="s1">&#39;ML&#39;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">levelist</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid</span><span class="p">]</span>
+
+            <span class="c1">#if c.gauss == &#39;0&#39; and c.eta == &#39;1&#39;:</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">c</span><span class="o">.</span><span class="n">gauss</span> <span class="ow">and</span> <span class="n">c</span><span class="o">.</span><span class="n">eta</span><span class="p">:</span>
+                <span class="c1"># the simplest case</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG__ML&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">+=</span> <span class="s1">&#39;/U/V/77&#39;</span>
+            <span class="c1">#elif c.gauss == &#39;0&#39; and c.eta == &#39;0&#39;:</span>
+            <span class="k">elif</span> <span class="ow">not</span> <span class="n">c</span><span class="o">.</span><span class="n">gauss</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">c</span><span class="o">.</span><span class="n">eta</span><span class="p">:</span>
+            <span class="c1"># this is not recommended (inaccurate)</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG__ML&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">+=</span> <span class="s1">&#39;/U/V&#39;</span>
+            <span class="c1">#elif c.gauss == &#39;1&#39; and c.eta == &#39;0&#39;:</span>
+            <span class="k">elif</span> <span class="n">c</span><span class="o">.</span><span class="n">gauss</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">c</span><span class="o">.</span><span class="n">eta</span><span class="p">:</span>
+                <span class="c1"># this is needed for data before 2008, or for reanalysis data</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;GG__SL&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;Q&#39;</span><span class="p">,</span> <span class="s1">&#39;ML&#39;</span><span class="p">,</span> <span class="s1">&#39;1&#39;</span><span class="p">,</span> \
+                                         <span class="s1">&#39;</span><span class="si">{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">((</span><span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">resol</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">/</span> <span class="mi">2</span><span class="p">)]</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;SH__ML&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;U/V/D&#39;</span><span class="p">,</span> <span class="s1">&#39;ML&#39;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">glevelist</span><span class="p">,</span> <span class="s1">&#39;OFF&#39;</span><span class="p">]</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Warning: This is a very costly parameter combination, </span><span class="se">\</span>
+<span class="s1">                      use only for debugging!&#39;</span><span class="p">)</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;GG__SL&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;Q&#39;</span><span class="p">,</span> <span class="s1">&#39;ML&#39;</span><span class="p">,</span> <span class="s1">&#39;1&#39;</span><span class="p">,</span> \
+                                         <span class="s1">&#39;</span><span class="si">{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">((</span><span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">resol</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">/</span> <span class="mi">2</span><span class="p">)]</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;GG__ML&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;U/V/D/77&#39;</span><span class="p">,</span> <span class="s1">&#39;ML&#39;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">glevelist</span><span class="p">,</span> \
+                                         <span class="s1">&#39;</span><span class="si">{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">((</span><span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">resol</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">/</span> <span class="mi">2</span><span class="p">)]</span>
+
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">omega</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG__ML&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">+=</span> <span class="s1">&#39;/W&#39;</span>
+
+            <span class="c1"># add cloud water content if necessary</span>
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">cwc</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG__ML&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">+=</span> <span class="s1">&#39;/CLWC/CIWC&#39;</span>
+
+            <span class="c1"># add vorticity and geopotential height for WRF if necessary</span>
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">wrf</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG__ML&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">+=</span> <span class="s1">&#39;/Z/VO&#39;</span>
+                <span class="k">if</span> <span class="s1">&#39;/D&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG__ML&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">]:</span>
+                    <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG__ML&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">+=</span> <span class="s1">&#39;/D&#39;</span>
+                <span class="c1">#wrf_sfc = &#39;sp/msl/skt/2t/10u/10v/2d/z/lsm/sst/ci/sd/stl1/ /</span>
+                <span class="c1">#           stl2/stl3/stl4/swvl1/swvl2/swvl3/swvl4&#39;.upper()</span>
+                <span class="n">wrf_sfc</span> <span class="o">=</span> <span class="s1">&#39;134/235/167/165/166/168/129/172/34/31/141/ </span><span class="se">\</span>
+<span class="s1">                           139/170/183/236/39/40/41/42&#39;</span>
+                <span class="n">lwrt_sfc</span> <span class="o">=</span> <span class="n">wrf_sfc</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)</span>
+                <span class="k">for</span> <span class="n">par</span> <span class="ow">in</span> <span class="n">lwrt_sfc</span><span class="p">:</span>
+                    <span class="k">if</span> <span class="n">par</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG__SL&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">]:</span>
+                        <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG__SL&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">+=</span> <span class="s1">&#39;/&#39;</span> <span class="o">+</span> <span class="n">par</span>
+
+        <span class="k">else</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG_acc_SL&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;LSP/CP/SSHF/EWSS/NSSS/SSR&quot;</span><span class="p">,</span> \
+                                        <span class="s1">&#39;SFC&#39;</span><span class="p">,</span> <span class="s1">&#39;1&#39;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid</span><span class="p">]</span>
+
+        <span class="k">return</span>
+
+
+    <span class="k">def</span> <span class="nf">_mk_targetname</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">ftype</span><span class="p">,</span> <span class="n">param</span><span class="p">,</span> <span class="n">date</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Creates the filename for the requested grib data to be stored in.</span>
+<span class="sd">        This name is passed as the &quot;target&quot; parameter in the request.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        ftype : :obj:`string`</span>
+<span class="sd">            Shortcut name of the type of the field. E.g. AN, FC, PF, ...</span>
+
+<span class="sd">        param : :obj:`string`</span>
+<span class="sd">            Shortcut of the grid type. E.g. SH__ML, SH__SL, GG__ML,</span>
+<span class="sd">            GG__SL, OG__ML, OG__SL, OG_OROLSM_SL, OG_acc_SL</span>
+
+<span class="sd">        date : :obj:`string`</span>
+<span class="sd">            The date period of the grib data to be stored in this file.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+<span class="sd">        targetname : :obj:`string`</span>
+<span class="sd">            The target filename for the grib data.</span>
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="n">targetname</span> <span class="o">=</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">inputdir</span> <span class="o">+</span> <span class="s1">&#39;/&#39;</span> <span class="o">+</span> <span class="n">ftype</span> <span class="o">+</span> <span class="n">param</span> <span class="o">+</span> <span class="s1">&#39;.&#39;</span> <span class="o">+</span> <span class="n">date</span> <span class="o">+</span> <span class="s1">&#39;.&#39;</span> <span class="o">+</span>
+                      <span class="nb">str</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">getppid</span><span class="p">())</span> <span class="o">+</span> <span class="s1">&#39;.&#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">getpid</span><span class="p">())</span> <span class="o">+</span> <span class="s1">&#39;.grb&#39;</span><span class="p">)</span>
+
+        <span class="k">return</span> <span class="n">targetname</span>
+
+
+    <span class="k">def</span> <span class="nf">_start_retrievement</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">par_dict</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Creates the Mars Retrieval and prints or submits the request</span>
+<span class="sd">        depending on the status of the request variable.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        request : :obj:`integer`</span>
+<span class="sd">            Selects the mode of retrieval.</span>
+<span class="sd">            0: Retrieves the data from ECMWF.</span>
+<span class="sd">            1: Prints the mars requests to an output file.</span>
+<span class="sd">            2: Retrieves the data and prints the mars request.</span>
+
+<span class="sd">        par_dict : :obj:`dictionary`</span>
+<span class="sd">            Contains all parameter which have to be set for creating the</span>
+<span class="sd">            Mars Retrievals. The parameter are:</span>
+<span class="sd">            marsclass, dataset, stream, type, levtype, levelist, resol,</span>
+<span class="sd">            gaussian, accuracy, grid, target, area, date, time, number,</span>
+<span class="sd">            step, expver, param</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="c1"># increase number of mars requests</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">mreq_count</span> <span class="o">+=</span> <span class="mi">1</span>
+
+        <span class="n">MR</span> <span class="o">=</span> <span class="n">MarsRetrieval</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">server</span><span class="p">,</span>
+                           <span class="bp">self</span><span class="o">.</span><span class="n">public</span><span class="p">,</span>
+                           <span class="n">marsclass</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;marsclass&#39;</span><span class="p">],</span>
+                           <span class="n">dataset</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;dataset&#39;</span><span class="p">],</span>
+                           <span class="n">stream</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;stream&#39;</span><span class="p">],</span>
+                           <span class="nb">type</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;type&#39;</span><span class="p">],</span>
+                           <span class="n">levtype</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;levtype&#39;</span><span class="p">],</span>
+                           <span class="n">levelist</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;levelist&#39;</span><span class="p">],</span>
+                           <span class="n">resol</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;resol&#39;</span><span class="p">],</span>
+                           <span class="n">gaussian</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;gaussian&#39;</span><span class="p">],</span>
+                           <span class="n">accuracy</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;accuracy&#39;</span><span class="p">],</span>
+                           <span class="n">grid</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;grid&#39;</span><span class="p">],</span>
+                           <span class="n">target</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;target&#39;</span><span class="p">],</span>
+                           <span class="n">area</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;area&#39;</span><span class="p">],</span>
+                           <span class="n">date</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">],</span>
+                           <span class="n">time</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;time&#39;</span><span class="p">],</span>
+                           <span class="n">number</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;number&#39;</span><span class="p">],</span>
+                           <span class="n">step</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;step&#39;</span><span class="p">],</span>
+                           <span class="n">expver</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;expver&#39;</span><span class="p">],</span>
+                           <span class="n">param</span><span class="o">=</span><span class="n">par_dict</span><span class="p">[</span><span class="s1">&#39;param&#39;</span><span class="p">])</span>
+
+        <span class="k">if</span> <span class="n">request</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
+            <span class="n">MR</span><span class="o">.</span><span class="n">display_info</span><span class="p">()</span>
+            <span class="n">MR</span><span class="o">.</span><span class="n">data_retrieve</span><span class="p">()</span>
+        <span class="k">elif</span> <span class="n">request</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
+            <span class="n">MR</span><span class="o">.</span><span class="n">print_infodata_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">mreq_count</span><span class="p">)</span>
+        <span class="k">elif</span> <span class="n">request</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
+            <span class="n">MR</span><span class="o">.</span><span class="n">print_infodata_csv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">mreq_count</span><span class="p">)</span>
+            <span class="n">MR</span><span class="o">.</span><span class="n">display_info</span><span class="p">()</span>
+            <span class="n">MR</span><span class="o">.</span><span class="n">data_retrieve</span><span class="p">()</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Failure&#39;</span><span class="p">)</span>
+
+        <span class="k">return</span>
+
+
+    <span class="k">def</span> <span class="nf">_mk_index_values</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inputdir</span><span class="p">,</span> <span class="n">inputfiles</span><span class="p">,</span> <span class="n">keys</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Creates an index file for a set of grib parameter keys.</span>
+<span class="sd">        The values from the index keys are returned in a list.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        keys : :obj:`dictionary`</span>
+<span class="sd">            List of parameter names which serves as index.</span>
+
+<span class="sd">        inputfiles : :obj:`UioFiles`</span>
+<span class="sd">            Contains a list of files.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+<span class="sd">        iid : :obj:`grib_index`</span>
+<span class="sd">            This is a grib specific index structure to access</span>
+<span class="sd">            messages in a file.</span>
+
+<span class="sd">        index_vals : :obj:`list`</span>
+<span class="sd">            Contains the values from the keys used for a distinct selection</span>
+<span class="sd">            of grib messages in processing  the grib files.</span>
+<span class="sd">            Content looks like e.g.:</span>
+<span class="sd">            index_vals[0]: (&#39;20171106&#39;, &#39;20171107&#39;, &#39;20171108&#39;) ; date</span>
+<span class="sd">            index_vals[1]: (&#39;0&#39;, &#39;1200&#39;, &#39;1800&#39;, &#39;600&#39;) ; time</span>
+<span class="sd">            index_vals[2]: (&#39;0&#39;, &#39;12&#39;, &#39;3&#39;, &#39;6&#39;, &#39;9&#39;) ; stepRange</span>
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="n">iid</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="n">index_keys</span> <span class="o">=</span> <span class="n">keys</span>
+
+        <span class="n">indexfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">inputdir</span><span class="p">,</span> <span class="n">_config</span><span class="o">.</span><span class="n">FILE_GRIB_INDEX</span><span class="p">)</span>
+        <span class="n">silent_remove</span><span class="p">(</span><span class="n">indexfile</span><span class="p">)</span>
+        <span class="n">grib</span> <span class="o">=</span> <span class="n">GribTools</span><span class="p">(</span><span class="n">inputfiles</span><span class="o">.</span><span class="n">files</span><span class="p">)</span>
+        <span class="c1"># creates new index file</span>
+        <span class="n">iid</span> <span class="o">=</span> <span class="n">grib</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="n">index_keys</span><span class="o">=</span><span class="n">index_keys</span><span class="p">,</span> <span class="n">index_file</span><span class="o">=</span><span class="n">indexfile</span><span class="p">)</span>
+
+        <span class="c1"># read the values of index keys</span>
+        <span class="n">index_vals</span> <span class="o">=</span> <span class="p">[]</span>
+        <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">index_keys</span><span class="p">:</span>
+            <span class="c1">#index_vals.append(grib_index_get(iid, key))</span>
+            <span class="c1">#print(index_vals[-1])</span>
+            <span class="n">key_vals</span> <span class="o">=</span> <span class="n">grib_index_get</span><span class="p">(</span><span class="n">iid</span><span class="p">,</span> <span class="n">key</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="n">key_vals</span><span class="p">)</span>
+            <span class="c1"># have to sort the steps for disaggregation,</span>
+            <span class="c1"># therefore convert to int first</span>
+            <span class="k">if</span> <span class="n">key</span> <span class="o">==</span> <span class="s1">&#39;step&#39;</span><span class="p">:</span>
+                <span class="n">key_vals</span> <span class="o">=</span> <span class="p">[</span><span class="nb">int</span><span class="p">(</span><span class="n">k</span><span class="p">)</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">key_vals</span><span class="p">]</span>
+                <span class="n">key_vals</span><span class="o">.</span><span class="n">sort</span><span class="p">()</span>
+                <span class="n">key_vals</span> <span class="o">=</span> <span class="p">[</span><span class="nb">str</span><span class="p">(</span><span class="n">k</span><span class="p">)</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">key_vals</span><span class="p">]</span>
+            <span class="n">index_vals</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">key_vals</span><span class="p">)</span>
+            <span class="c1"># index_vals looks for example like:</span>
+            <span class="c1"># index_vals[0]: (&#39;20171106&#39;, &#39;20171107&#39;, &#39;20171108&#39;) ; date</span>
+            <span class="c1"># index_vals[1]: (&#39;0&#39;, &#39;1200&#39;) ; time</span>
+            <span class="c1"># index_vals[2]: (3&#39;, &#39;6&#39;, &#39;9&#39;, &#39;12&#39;) ; stepRange</span>
+
+        <span class="k">return</span> <span class="n">iid</span><span class="p">,</span> <span class="n">index_vals</span>
+
+
+<div class="viewcode-block" id="EcFlexpart.retrieve"><a class="viewcode-back" href="../api.html#EcFlexpart.EcFlexpart.retrieve">[docs]</a>    <span class="k">def</span> <span class="nf">retrieve</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">server</span><span class="p">,</span> <span class="n">dates</span><span class="p">,</span> <span class="n">public</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">inputdir</span><span class="o">=</span><span class="s1">&#39;.&#39;</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Finalizing the retrieval information by setting final details</span>
+<span class="sd">        depending on grid type.</span>
+<span class="sd">        Prepares MARS retrievals per grid type and submits them.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        server : :obj:`ECMWFService` or :obj:`ECMWFDataServer`</span>
+<span class="sd">            The connection to the ECMWF server. This is different</span>
+<span class="sd">            for member state users which have full access and non</span>
+<span class="sd">            member state users which have only access to the public</span>
+<span class="sd">            data sets. The decision is made from command line argument</span>
+<span class="sd">            &quot;public&quot;; for public access its True (ECMWFDataServer)</span>
+<span class="sd">            for member state users its False (ECMWFService)</span>
+
+<span class="sd">        dates : :obj:`string`</span>
+<span class="sd">            Contains start and end date of the retrieval in the format</span>
+<span class="sd">            &quot;YYYYMMDD/to/YYYYMMDD&quot;</span>
+
+<span class="sd">        request : :obj:`integer`</span>
+<span class="sd">            Selects the mode of retrieval.</span>
+<span class="sd">            0: Retrieves the data from ECMWF.</span>
+<span class="sd">            1: Prints the mars requests to an output file.</span>
+<span class="sd">            2: Retrieves the data and prints the mars request.</span>
+
+<span class="sd">        inputdir : :obj:`string`, optional</span>
+<span class="sd">            Path to the directory where the retrieved data is about</span>
+<span class="sd">            to be stored. The default is the current directory (&#39;.&#39;).</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">dates</span> <span class="o">=</span> <span class="n">dates</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">server</span> <span class="o">=</span> <span class="n">server</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">public</span> <span class="o">=</span> <span class="n">public</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">inputdir</span> <span class="o">=</span> <span class="n">inputdir</span>
+        <span class="n">oro</span> <span class="o">=</span> <span class="kc">False</span>
+
+        <span class="c1"># define times with datetime module</span>
+        <span class="n">t12h</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="mi">12</span><span class="p">)</span>
+        <span class="n">t24h</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="mi">24</span><span class="p">)</span>
+
+        <span class="c1"># dictionary which contains all parameter for the mars request,</span>
+        <span class="c1"># entries with a &quot;None&quot; will change in different requests and will</span>
+        <span class="c1"># therefore be set in each request seperately</span>
+        <span class="n">retr_param_dict</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;marsclass&#39;</span><span class="p">:</span><span class="bp">self</span><span class="o">.</span><span class="n">marsclass</span><span class="p">,</span>
+                           <span class="s1">&#39;dataset&#39;</span><span class="p">:</span><span class="bp">self</span><span class="o">.</span><span class="n">dataset</span><span class="p">,</span>
+                           <span class="s1">&#39;stream&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span>
+                           <span class="s1">&#39;type&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span>
+                           <span class="s1">&#39;levtype&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span>
+                           <span class="s1">&#39;levelist&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span>
+                           <span class="s1">&#39;resol&#39;</span><span class="p">:</span><span class="bp">self</span><span class="o">.</span><span class="n">resol</span><span class="p">,</span>
+                           <span class="s1">&#39;gaussian&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span>
+                           <span class="s1">&#39;accuracy&#39;</span><span class="p">:</span><span class="bp">self</span><span class="o">.</span><span class="n">accuracy</span><span class="p">,</span>
+                           <span class="s1">&#39;grid&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span>
+                           <span class="s1">&#39;target&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span>
+                           <span class="s1">&#39;area&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span>
+                           <span class="s1">&#39;date&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span>
+                           <span class="s1">&#39;time&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span>
+                           <span class="s1">&#39;number&#39;</span><span class="p">:</span><span class="bp">self</span><span class="o">.</span><span class="n">number</span><span class="p">,</span>
+                           <span class="s1">&#39;step&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span>
+                           <span class="s1">&#39;expver&#39;</span><span class="p">:</span><span class="bp">self</span><span class="o">.</span><span class="n">expver</span><span class="p">,</span>
+                           <span class="s1">&#39;param&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">}</span>
+
+        <span class="k">for</span> <span class="n">ftype</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">:</span>
+            <span class="c1"># fk contains field types such as</span>
+            <span class="c1">#     [AN, FC, PF, CV]</span>
+            <span class="c1"># fv contains all of the items of the belonging key</span>
+            <span class="c1">#     [times, steps]</span>
+            <span class="k">for</span> <span class="n">pk</span><span class="p">,</span> <span class="n">pv</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
+                <span class="c1"># pk contains one of these keys of params</span>
+                <span class="c1">#     [SH__ML, SH__SL, GG__ML, GG__SL, OG__ML, OG__SL,</span>
+                <span class="c1">#      OG_OROLSM_SL, OG_acc_SL]</span>
+                <span class="c1"># pv contains all of the items of the belonging key</span>
+                <span class="c1">#     [param, levtype, levelist, grid]</span>
+                <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">pv</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span>
+                    <span class="k">continue</span>
+                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;type&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">ftype</span>
+                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;time&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">[</span><span class="n">ftype</span><span class="p">][</span><span class="s1">&#39;times&#39;</span><span class="p">]</span>
+                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;step&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">types</span><span class="p">[</span><span class="n">ftype</span><span class="p">][</span><span class="s1">&#39;steps&#39;</span><span class="p">]</span>
+                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">dates</span>
+                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;stream&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">stream</span>
+                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;target&#39;</span><span class="p">]</span> <span class="o">=</span> \
+                    <span class="bp">self</span><span class="o">.</span><span class="n">_mk_targetname</span><span class="p">(</span><span class="n">ftype</span><span class="p">,</span>
+                                        <span class="n">pk</span><span class="p">,</span>
+                                        <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">])</span>
+                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;param&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">pv</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
+                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;levtype&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">pv</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
+                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;levelist&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">pv</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
+                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;grid&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">pv</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span>
+                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;area&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">area</span>
+                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;gaussian&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">gaussian</span>
+
+                <span class="k">if</span> <span class="n">pk</span> <span class="o">==</span> <span class="s1">&#39;OG__SL&#39;</span><span class="p">:</span>
+                    <span class="k">pass</span>
+                <span class="k">if</span> <span class="n">pk</span> <span class="o">==</span> <span class="s1">&#39;OG_OROLSM__SL&#39;</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">oro</span><span class="p">:</span>
+                    <span class="n">oro</span> <span class="o">=</span> <span class="kc">True</span>
+                    <span class="c1"># in CERA20C (class EP) there is no stream &quot;OPER&quot;!</span>
+                    <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">marsclass</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">!=</span> <span class="s1">&#39;EP&#39;</span><span class="p">:</span>
+                        <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;stream&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;OPER&#39;</span>
+                    <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;type&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;AN&#39;</span>
+                    <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;time&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;00&#39;</span>
+                    <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;step&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;000&#39;</span>
+                    <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">dates</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
+                    <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;target&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_mk_targetname</span><span class="p">(</span><span class="s1">&#39;&#39;</span><span class="p">,</span>
+                                            <span class="n">pk</span><span class="p">,</span> <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">])</span>
+                <span class="k">elif</span> <span class="n">pk</span> <span class="o">==</span> <span class="s1">&#39;OG_OROLSM__SL&#39;</span> <span class="ow">and</span> <span class="n">oro</span><span class="p">:</span>
+                    <span class="k">continue</span>
+                <span class="k">if</span> <span class="n">pk</span> <span class="o">==</span> <span class="s1">&#39;GG__SL&#39;</span> <span class="ow">and</span> <span class="n">pv</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;Q&#39;</span><span class="p">:</span>
+                    <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;area&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
+                    <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;gaussian&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;reduced&#39;</span>
+
+    <span class="c1"># ------  on demand path  --------------------------------------------------</span>
+                <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">basetime</span><span class="p">:</span>
+                    <span class="c1"># ******* start retrievement</span>
+                    <span class="bp">self</span><span class="o">.</span><span class="n">_start_retrievement</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">retr_param_dict</span><span class="p">)</span>
+    <span class="c1"># ------  operational path  ------------------------------------------------</span>
+                <span class="k">else</span><span class="p">:</span>
+                    <span class="c1"># check if mars job requests fields beyond basetime.</span>
+                    <span class="c1"># if yes eliminate those fields since they may not</span>
+                    <span class="c1"># be accessible with user&#39;s credentials</span>
+
+                    <span class="n">enddate</span> <span class="o">=</span> <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
+                    <span class="n">elimit</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strptime</span><span class="p">(</span><span class="n">enddate</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">basetime</span><span class="p">,</span>
+                                               <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">%H&#39;</span><span class="p">)</span>
+
+                    <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">basetime</span> <span class="o">==</span> <span class="s1">&#39;12&#39;</span><span class="p">:</span>
+                        <span class="c1"># --------------  flux data ----------------------------</span>
+                        <span class="k">if</span> <span class="s1">&#39;acc&#39;</span> <span class="ow">in</span> <span class="n">pk</span><span class="p">:</span>
+
+                        <span class="c1"># Strategy:</span>
+                        <span class="c1"># if maxtime-elimit &gt;= 24h reduce date by 1,</span>
+                        <span class="c1"># if 12h &lt;= maxtime-elimit&lt;12h reduce time for last date</span>
+                        <span class="c1"># if maxtime-elimit&lt;12h reduce step for last time</span>
+                        <span class="c1"># A split of the MARS job into 2 is likely necessary.</span>
+
+
+                            <span class="n">startdate</span> <span class="o">=</span> <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
+                            <span class="n">enddate</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">elimit</span> <span class="o">-</span> <span class="n">t24h</span><span class="p">,</span><span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">&#39;</span><span class="p">)</span>
+                            <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;/&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">startdate</span><span class="p">,</span>
+                                                                <span class="s1">&#39;to&#39;</span><span class="p">,</span>
+                                                                <span class="n">enddate</span><span class="p">])</span>
+
+                            <span class="c1"># ******* start retrievement</span>
+                            <span class="bp">self</span><span class="o">.</span><span class="n">_start_retrievement</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">retr_param_dict</span><span class="p">)</span>
+
+                            <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">]</span> <span class="o">=</span> \
+                                <span class="n">datetime</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">elimit</span> <span class="o">-</span> <span class="n">t12h</span><span class="p">,</span> <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">&#39;</span><span class="p">)</span>
+                            <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;time&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;00&#39;</span>
+                            <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;target&#39;</span><span class="p">]</span> <span class="o">=</span> \
+                                <span class="bp">self</span><span class="o">.</span><span class="n">_mk_targetname</span><span class="p">(</span><span class="n">ftype</span><span class="p">,</span> <span class="n">pk</span><span class="p">,</span>
+                                                    <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">])</span>
+
+                            <span class="c1"># ******* start retrievement</span>
+                            <span class="bp">self</span><span class="o">.</span><span class="n">_start_retrievement</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">retr_param_dict</span><span class="p">)</span>
+
+                        <span class="c1"># --------------  non flux data ------------------------</span>
+                        <span class="k">else</span><span class="p">:</span>
+                            <span class="c1"># ******* start retrievement</span>
+                            <span class="bp">self</span><span class="o">.</span><span class="n">_start_retrievement</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">retr_param_dict</span><span class="p">)</span>
+
+                    <span class="k">else</span><span class="p">:</span> <span class="c1"># basetime = 0</span>
+                        <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">]</span> <span class="o">=</span> \
+                            <span class="n">datetime</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">elimit</span> <span class="o">-</span> <span class="n">t24h</span><span class="p">,</span> <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">&#39;</span><span class="p">)</span>
+
+                        <span class="n">timesave</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;time&#39;</span><span class="p">])</span>
+
+                        <span class="k">if</span> <span class="s1">&#39;/&#39;</span> <span class="ow">in</span> <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;time&#39;</span><span class="p">]:</span>
+                            <span class="n">times</span> <span class="o">=</span> <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;time&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)</span>
+                            <span class="n">steps</span> <span class="o">=</span> <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;step&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)</span>
+                            <span class="k">while</span> <span class="p">(</span><span class="n">pk</span> <span class="o">!=</span> <span class="s1">&#39;OG_OROLSM__SL&#39;</span> <span class="ow">and</span>
+                                   <span class="s1">&#39;acc&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">pk</span> <span class="ow">and</span>
+                                   <span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">times</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="o">+</span> <span class="nb">int</span><span class="p">(</span><span class="n">steps</span><span class="p">[</span><span class="mi">0</span><span class="p">]))</span> <span class="o">&lt;=</span> <span class="mi">12</span><span class="p">):</span>
+                                <span class="n">times</span> <span class="o">=</span> <span class="n">times</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
+
+                            <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">times</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
+                                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;time&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;/&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">times</span><span class="p">)</span>
+                            <span class="k">else</span><span class="p">:</span>
+                                <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;time&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">times</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
+
+                        <span class="c1"># ******* start retrievement</span>
+                        <span class="bp">self</span><span class="o">.</span><span class="n">_start_retrievement</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">retr_param_dict</span><span class="p">)</span>
+
+                        <span class="k">if</span> <span class="p">(</span><span class="n">pk</span> <span class="o">!=</span> <span class="s1">&#39;OG_OROLSM__SL&#39;</span> <span class="ow">and</span>
+                            <span class="nb">int</span><span class="p">(</span><span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;step&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">])</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">and</span>
+                            <span class="nb">int</span><span class="p">(</span><span class="n">timesave</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">])</span> <span class="o">==</span> <span class="mi">0</span><span class="p">):</span>
+
+                            <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">]</span> <span class="o">=</span> \
+                                <span class="n">datetime</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">elimit</span><span class="p">,</span> <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">&#39;</span><span class="p">)</span>
+                            <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;time&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;00&#39;</span>
+                            <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;step&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;000&#39;</span>
+                            <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;target&#39;</span><span class="p">]</span> <span class="o">=</span> \
+                                <span class="bp">self</span><span class="o">.</span><span class="n">_mk_targetname</span><span class="p">(</span><span class="n">ftype</span><span class="p">,</span> <span class="n">pk</span><span class="p">,</span>
+                                                    <span class="n">retr_param_dict</span><span class="p">[</span><span class="s1">&#39;date&#39;</span><span class="p">])</span>
+
+                            <span class="c1"># ******* start retrievement</span>
+                            <span class="bp">self</span><span class="o">.</span><span class="n">_start_retrievement</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">retr_param_dict</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="n">request</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">or</span> <span class="n">request</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;MARS retrieve done ... &#39;</span><span class="p">)</span>
+        <span class="k">elif</span> <span class="n">request</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;MARS request printed ...&#39;</span><span class="p">)</span>
+
+        <span class="k">return</span></div>
+
+
+<div class="viewcode-block" id="EcFlexpart.write_namelist"><a class="viewcode-back" href="../api.html#EcFlexpart.EcFlexpart.write_namelist">[docs]</a>    <span class="k">def</span> <span class="nf">write_namelist</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">c</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Creates a namelist file in the temporary directory and writes</span>
+<span class="sd">        the following values to it: maxl, maxb, mlevel,</span>
+<span class="sd">        mlevelist, mnauf, metapar, rlo0, rlo1, rla0, rla1,</span>
+<span class="sd">        momega, momegadiff, mgauss, msmooth, meta, metadiff, mdpdeta</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        c : :obj:`ControlFile`</span>
+<span class="sd">            Contains all the parameters of CONTROL file and</span>
+<span class="sd">            command line.</span>
+
+<span class="sd">        filename : :obj:`string`</span>
+<span class="sd">                Name of the namelist file.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="kn">from</span> <span class="nn">genshi.template.text</span> <span class="k">import</span> <span class="n">NewTextTemplate</span>
+        <span class="kn">from</span> <span class="nn">genshi.template</span> <span class="k">import</span>  <span class="n">TemplateLoader</span>
+
+        <span class="n">loader</span> <span class="o">=</span> <span class="n">TemplateLoader</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_TEMPLATES</span><span class="p">,</span> <span class="n">auto_reload</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
+        <span class="n">namelist_template</span> <span class="o">=</span> <span class="n">loader</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">TEMPFILE_NAMELIST</span><span class="p">,</span>
+                                       <span class="bp">cls</span><span class="o">=</span><span class="n">NewTextTemplate</span><span class="p">)</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">inputdir</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">inputdir</span>
+        <span class="n">area</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">asarray</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">area</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">))</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="nb">float</span><span class="p">)</span>
+        <span class="n">grid</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">asarray</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">))</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="nb">float</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="n">area</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">&gt;</span> <span class="n">area</span><span class="p">[</span><span class="mi">3</span><span class="p">]:</span>
+            <span class="n">area</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">-=</span> <span class="mi">360</span>
+        <span class="n">maxl</span> <span class="o">=</span> <span class="nb">int</span><span class="p">((</span><span class="n">area</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">-</span> <span class="n">area</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="o">/</span> <span class="n">grid</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="o">+</span> <span class="mi">1</span>
+        <span class="n">maxb</span> <span class="o">=</span> <span class="nb">int</span><span class="p">((</span><span class="n">area</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">-</span> <span class="n">area</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span> <span class="o">/</span> <span class="n">grid</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="o">+</span> <span class="mi">1</span>
+
+        <span class="n">stream</span> <span class="o">=</span> <span class="n">namelist_template</span><span class="o">.</span><span class="n">generate</span><span class="p">(</span>
+            <span class="n">maxl</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">maxl</span><span class="p">),</span>
+            <span class="n">maxb</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">maxb</span><span class="p">),</span>
+            <span class="n">mlevel</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">level</span><span class="p">),</span>
+            <span class="n">mlevelist</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">levelist</span><span class="p">),</span>
+            <span class="n">mnauf</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">resol</span><span class="p">),</span>
+            <span class="n">metapar</span> <span class="o">=</span> <span class="s1">&#39;77&#39;</span><span class="p">,</span>
+            <span class="n">rlo0</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">area</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span>
+            <span class="n">rlo1</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">area</span><span class="p">[</span><span class="mi">3</span><span class="p">]),</span>
+            <span class="n">rla0</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">area</span><span class="p">[</span><span class="mi">2</span><span class="p">]),</span>
+            <span class="n">rla1</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">area</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span>
+            <span class="n">momega</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">omega</span><span class="p">),</span>
+            <span class="n">momegadiff</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">omegadiff</span><span class="p">),</span>
+            <span class="n">mgauss</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">gauss</span><span class="p">),</span>
+            <span class="n">msmooth</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">smooth</span><span class="p">),</span>
+            <span class="n">meta</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">eta</span><span class="p">),</span>
+            <span class="n">metadiff</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">etadiff</span><span class="p">),</span>
+            <span class="n">mdpdeta</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dpdeta</span><span class="p">)</span>
+        <span class="p">)</span>
+
+        <span class="n">namelistfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="n">_config</span><span class="o">.</span><span class="n">FILE_NAMELIST</span><span class="p">)</span>
+
+        <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">namelistfile</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">stream</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="s1">&#39;text&#39;</span><span class="p">))</span>
+
+        <span class="k">return</span></div>
+
+
+<div class="viewcode-block" id="EcFlexpart.deacc_fluxes"><a class="viewcode-back" href="../api.html#EcFlexpart.EcFlexpart.deacc_fluxes">[docs]</a>    <span class="k">def</span> <span class="nf">deacc_fluxes</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inputfiles</span><span class="p">,</span> <span class="n">c</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Goes through all flux fields in ordered time and de-accumulate</span>
+<span class="sd">        the fields. Afterwards the fields are disaggregated in time.</span>
+<span class="sd">        Different versions of disaggregation is provided for rainfall</span>
+<span class="sd">        data (darain, modified linear) and the surface fluxes and</span>
+<span class="sd">        stress data (dapoly, cubic polynomial).</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        inputfiles : :obj:`UioFiles`</span>
+<span class="sd">            Contains a list of files.</span>
+
+<span class="sd">        c : :obj:`ControlFile`</span>
+<span class="sd">            Contains all the parameters of CONTROL file and</span>
+<span class="sd">            command line.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="n">table128</span> <span class="o">=</span> <span class="n">init128</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_GRIBTABLE</span><span class="p">)</span>
+        <span class="n">pars</span> <span class="o">=</span> <span class="n">to_param_id</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;OG_acc_SL&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">],</span> <span class="n">table128</span><span class="p">)</span>
+
+        <span class="n">iid</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="n">index_vals</span> <span class="o">=</span> <span class="kc">None</span>
+
+        <span class="c1"># get the values of the keys which are used for distinct access</span>
+        <span class="c1"># of grib messages via product</span>
+        <span class="n">index_keys</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;date&quot;</span><span class="p">,</span> <span class="s2">&quot;time&quot;</span><span class="p">,</span> <span class="s2">&quot;step&quot;</span><span class="p">]</span>
+        <span class="n">iid</span><span class="p">,</span> <span class="n">index_vals</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_mk_index_values</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span>
+                                                <span class="n">inputfiles</span><span class="p">,</span>
+                                                <span class="n">index_keys</span><span class="p">)</span>
+        <span class="c1"># index_vals looks like e.g.:</span>
+        <span class="c1"># index_vals[0]: (&#39;20171106&#39;, &#39;20171107&#39;, &#39;20171108&#39;) ; date</span>
+        <span class="c1"># index_vals[1]: (&#39;0&#39;, &#39;1200&#39;, &#39;1800&#39;, &#39;600&#39;) ; time</span>
+        <span class="c1"># index_vals[2]: (&#39;0&#39;, &#39;12&#39;, &#39;3&#39;, &#39;6&#39;, &#39;9&#39;) ; stepRange</span>
+
+        <span class="n">valsdict</span> <span class="o">=</span> <span class="p">{}</span>
+        <span class="n">svalsdict</span> <span class="o">=</span> <span class="p">{}</span>
+<span class="c1">#        stepsdict = {}</span>
+        <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">pars</span><span class="p">:</span>
+            <span class="n">valsdict</span><span class="p">[</span><span class="nb">str</span><span class="p">(</span><span class="n">p</span><span class="p">)]</span> <span class="o">=</span> <span class="p">[]</span>
+            <span class="n">svalsdict</span><span class="p">[</span><span class="nb">str</span><span class="p">(</span><span class="n">p</span><span class="p">)]</span> <span class="o">=</span> <span class="p">[]</span>
+<span class="c1">#            stepsdict[str(p)] = []</span>
+
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;maxstep: &#39;</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span><span class="p">)</span>
+
+        <span class="c1"># &quot;product&quot; genereates each possible combination between the</span>
+        <span class="c1"># values of the index keys</span>
+        <span class="k">for</span> <span class="n">prod</span> <span class="ow">in</span> <span class="n">product</span><span class="p">(</span><span class="o">*</span><span class="n">index_vals</span><span class="p">):</span>
+            <span class="c1"># e.g. prod = (&#39;20170505&#39;, &#39;0&#39;, &#39;12&#39;)</span>
+            <span class="c1">#             (  date    ,time, step)</span>
+
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;current product: &#39;</span><span class="p">,</span> <span class="n">prod</span><span class="p">)</span>
+
+            <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">index_keys</span><span class="p">)):</span>
+                <span class="n">grib_index_select</span><span class="p">(</span><span class="n">iid</span><span class="p">,</span> <span class="n">index_keys</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">prod</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
+
+            <span class="c1"># get first id from current product</span>
+            <span class="n">gid</span> <span class="o">=</span> <span class="n">grib_new_from_index</span><span class="p">(</span><span class="n">iid</span><span class="p">)</span>
+
+            <span class="c1"># if there is no data for this specific time combination / product</span>
+            <span class="c1"># skip the rest of the for loop and start with next timestep/product</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">gid</span><span class="p">:</span>
+                <span class="k">continue</span>
+
+            <span class="c1"># create correct timestamp from the three time informations</span>
+            <span class="n">cdate</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;date&#39;</span><span class="p">))</span>
+            <span class="n">ctime</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">{:0&gt;2}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;time&#39;</span><span class="p">)</span><span class="o">/</span><span class="mi">100</span><span class="p">)</span>
+            <span class="n">cstep</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">{:0&gt;3}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;step&#39;</span><span class="p">))</span>
+            <span class="n">t_date</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strptime</span><span class="p">(</span><span class="n">cdate</span> <span class="o">+</span> <span class="n">ctime</span><span class="p">,</span> <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">%H&#39;</span><span class="p">)</span>
+            <span class="n">t_dt</span> <span class="o">=</span> <span class="n">t_date</span> <span class="o">+</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">cstep</span><span class="p">))</span>
+            <span class="n">t_m1dt</span> <span class="o">=</span> <span class="n">t_date</span> <span class="o">+</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">cstep</span><span class="p">)</span><span class="o">-</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">))</span>
+            <span class="n">t_m2dt</span> <span class="o">=</span> <span class="n">t_date</span> <span class="o">+</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">cstep</span><span class="p">)</span><span class="o">-</span><span class="mi">2</span><span class="o">*</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">))</span>
+            <span class="n">t_enddate</span> <span class="o">=</span> <span class="kc">None</span>
+
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">&gt;</span> <span class="mi">12</span><span class="p">:</span>
+                <span class="n">fnout</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="s1">&#39;flux&#39;</span> <span class="o">+</span>
+                                     <span class="n">t_date</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">.%H&#39;</span><span class="p">)</span> <span class="o">+</span>
+                                     <span class="s1">&#39;.</span><span class="si">{:0&gt;3}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">step</span><span class="o">-</span><span class="mi">2</span><span class="o">*</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">)))</span>
+                <span class="n">gnout</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="s1">&#39;flux&#39;</span> <span class="o">+</span>
+                                     <span class="n">t_date</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">.%H&#39;</span><span class="p">)</span> <span class="o">+</span>
+                                     <span class="s1">&#39;.</span><span class="si">{:0&gt;3}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">step</span><span class="o">-</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">)))</span>
+                <span class="n">hnout</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="s1">&#39;flux&#39;</span> <span class="o">+</span>
+                                     <span class="n">t_date</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">.%H&#39;</span><span class="p">)</span> <span class="o">+</span>
+                                     <span class="s1">&#39;.</span><span class="si">{:0&gt;3}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">step</span><span class="p">))</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="n">fnout</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="s1">&#39;flux&#39;</span> <span class="o">+</span>
+                                     <span class="n">t_m2dt</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">%H&#39;</span><span class="p">))</span>
+                <span class="n">gnout</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="s1">&#39;flux&#39;</span> <span class="o">+</span>
+                                     <span class="n">t_m1dt</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">%H&#39;</span><span class="p">))</span>
+                <span class="n">hnout</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="s1">&#39;flux&#39;</span> <span class="o">+</span>
+                                     <span class="n">t_dt</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">%H&#39;</span><span class="p">))</span>
+
+            <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;outputfile = &quot;</span> <span class="o">+</span> <span class="n">fnout</span><span class="p">)</span>
+
+            <span class="c1"># read message for message and store relevant data fields</span>
+            <span class="c1"># data keywords are stored in pars</span>
+            <span class="k">while</span> <span class="mi">1</span><span class="p">:</span>
+                <span class="k">if</span> <span class="ow">not</span> <span class="n">gid</span><span class="p">:</span>
+                    <span class="k">break</span>
+                <span class="n">cparamId</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;paramId&#39;</span><span class="p">))</span>
+                <span class="n">step</span> <span class="o">=</span> <span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;step&#39;</span><span class="p">)</span>
+                <span class="n">time</span> <span class="o">=</span> <span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;time&#39;</span><span class="p">)</span>
+                <span class="n">ni</span> <span class="o">=</span> <span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;Ni&#39;</span><span class="p">)</span>
+                <span class="n">nj</span> <span class="o">=</span> <span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;Nj&#39;</span><span class="p">)</span>
+                <span class="k">if</span> <span class="n">cparamId</span> <span class="ow">in</span> <span class="n">valsdict</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
+                    <span class="n">values</span> <span class="o">=</span> <span class="n">grib_get_values</span><span class="p">(</span><span class="n">gid</span><span class="p">)</span>
+                    <span class="n">vdp</span> <span class="o">=</span> <span class="n">valsdict</span><span class="p">[</span><span class="n">cparamId</span><span class="p">]</span>
+                    <span class="n">svdp</span> <span class="o">=</span> <span class="n">svalsdict</span><span class="p">[</span><span class="n">cparamId</span><span class="p">]</span>
+ <span class="c1">#                   sd = stepsdict[cparamId]</span>
+
+                    <span class="k">if</span> <span class="n">cparamId</span> <span class="o">==</span> <span class="s1">&#39;142&#39;</span> <span class="ow">or</span> <span class="n">cparamId</span> <span class="o">==</span> <span class="s1">&#39;143&#39;</span><span class="p">:</span>
+                        <span class="n">fak</span> <span class="o">=</span> <span class="mf">1.</span> <span class="o">/</span> <span class="mf">1000.</span>
+                    <span class="k">else</span><span class="p">:</span>
+                        <span class="n">fak</span> <span class="o">=</span> <span class="mf">3600.</span>
+
+                    <span class="n">values</span> <span class="o">=</span> <span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">values</span><span class="p">,</span> <span class="p">(</span><span class="n">nj</span><span class="p">,</span> <span class="n">ni</span><span class="p">)))</span><span class="o">.</span><span class="n">flatten</span><span class="p">()</span> <span class="o">/</span> <span class="n">fak</span>
+                    <span class="n">vdp</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">values</span><span class="p">[:])</span>  <span class="c1"># save the accumulated values</span>
+                    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">marsclass</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">==</span> <span class="s1">&#39;EA&#39;</span> <span class="ow">or</span> \
+                       <span class="n">step</span> <span class="o">&lt;=</span> <span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">):</span>
+                        <span class="n">svdp</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">values</span><span class="p">[:]</span> <span class="o">/</span> <span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">))</span>
+                    <span class="k">else</span><span class="p">:</span>  <span class="c1"># deaccumulate values</span>
+                        <span class="n">svdp</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">vdp</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">-</span> <span class="n">vdp</span><span class="p">[</span><span class="o">-</span><span class="mi">2</span><span class="p">])</span> <span class="o">/</span> <span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">))</span>
+
+                    <span class="nb">print</span><span class="p">(</span><span class="n">cparamId</span><span class="p">,</span> <span class="n">time</span><span class="p">,</span> <span class="n">step</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">values</span><span class="p">),</span>
+                          <span class="n">values</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">np</span><span class="o">.</span><span class="n">std</span><span class="p">(</span><span class="n">values</span><span class="p">))</span>
+
+                    <span class="c1"># len(svdp) correspond to the time</span>
+                    <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">svdp</span><span class="p">)</span> <span class="o">&gt;=</span> <span class="mi">3</span><span class="p">:</span>
+                        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">svdp</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">3</span><span class="p">:</span>
+                            <span class="k">if</span> <span class="n">cparamId</span> <span class="o">==</span> <span class="s1">&#39;142&#39;</span> <span class="ow">or</span> <span class="n">cparamId</span> <span class="o">==</span> <span class="s1">&#39;143&#39;</span><span class="p">:</span>
+                                <span class="n">values</span> <span class="o">=</span> <span class="n">disaggregation</span><span class="o">.</span><span class="n">darain</span><span class="p">(</span><span class="n">svdp</span><span class="p">)</span>
+                            <span class="k">else</span><span class="p">:</span>
+                                <span class="n">values</span> <span class="o">=</span> <span class="n">disaggregation</span><span class="o">.</span><span class="n">dapoly</span><span class="p">(</span><span class="n">svdp</span><span class="p">)</span>
+
+                            <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">step</span> <span class="o">==</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="ow">and</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">&gt;</span> <span class="mi">12</span> \
+                                    <span class="ow">or</span> <span class="n">t_dt</span> <span class="o">==</span> <span class="n">t_enddate</span><span class="p">):</span>
+                                <span class="n">vdp</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
+                                <span class="n">svdp</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
+                        <span class="k">else</span><span class="p">:</span>
+                            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">&gt;</span> <span class="mi">12</span><span class="p">:</span>
+                                <span class="n">values</span> <span class="o">=</span> <span class="n">svdp</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
+                            <span class="k">else</span><span class="p">:</span>
+                                <span class="n">values</span> <span class="o">=</span> <span class="n">svdp</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
+
+                        <span class="n">grib_set_values</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">values</span><span class="p">)</span>
+
+                        <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">&gt;</span> <span class="mi">12</span><span class="p">:</span>
+                            <span class="n">grib_set</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;step&#39;</span><span class="p">,</span> <span class="nb">max</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">step</span><span class="o">-</span><span class="mi">2</span><span class="o">*</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">)))</span>
+                        <span class="k">else</span><span class="p">:</span>
+                            <span class="n">grib_set</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;step&#39;</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
+                            <span class="n">grib_set</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;time&#39;</span><span class="p">,</span> <span class="n">t_m2dt</span><span class="o">.</span><span class="n">hour</span><span class="o">*</span><span class="mi">100</span><span class="p">)</span>
+                            <span class="n">grib_set</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;date&#39;</span><span class="p">,</span> <span class="nb">int</span><span class="p">(</span><span class="n">t_m2dt</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">&#39;</span><span class="p">)))</span>
+
+                        <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">fnout</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f_handle</span><span class="p">:</span>
+                            <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">f_handle</span><span class="p">)</span>
+
+                        <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">basetime</span><span class="p">:</span>
+                            <span class="n">t_enddate</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strptime</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">end_date</span> <span class="o">+</span>
+                                                          <span class="n">c</span><span class="o">.</span><span class="n">basetime</span><span class="p">,</span>
+                                                          <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">%H&#39;</span><span class="p">)</span>
+                        <span class="k">else</span><span class="p">:</span>
+                            <span class="n">t_enddate</span> <span class="o">=</span> <span class="n">t_date</span> <span class="o">+</span> <span class="n">timedelta</span><span class="p">(</span><span class="mi">2</span><span class="o">*</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">))</span>
+
+                        <span class="c1"># squeeze out information of last two steps contained</span>
+                        <span class="c1"># in svdp</span>
+                        <span class="c1"># if step+int(c.dtime) == c.maxstep and c.maxstep&gt;12</span>
+                        <span class="c1"># or t_dt+timedelta(hours = int(c.dtime))</span>
+                        <span class="c1"># &gt;= t_enddate:</span>
+                        <span class="c1"># Note that svdp[0] has not been popped in this case</span>
+
+                        <span class="k">if</span> <span class="n">step</span> <span class="o">==</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="ow">and</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">&gt;</span> <span class="mi">12</span> <span class="ow">or</span> \
+                           <span class="n">t_dt</span> <span class="o">==</span> <span class="n">t_enddate</span><span class="p">:</span>
+
+                            <span class="n">values</span> <span class="o">=</span> <span class="n">svdp</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span>
+                            <span class="n">grib_set_values</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">values</span><span class="p">)</span>
+                            <span class="n">grib_set</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;step&#39;</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
+                            <span class="n">truedatetime</span> <span class="o">=</span> <span class="n">t_m2dt</span> <span class="o">+</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span>
+                                                              <span class="mi">2</span><span class="o">*</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">))</span>
+                            <span class="n">grib_set</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;time&#39;</span><span class="p">,</span> <span class="n">truedatetime</span><span class="o">.</span><span class="n">hour</span> <span class="o">*</span> <span class="mi">100</span><span class="p">)</span>
+                            <span class="n">grib_set</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;date&#39;</span><span class="p">,</span> <span class="n">truedatetime</span><span class="o">.</span><span class="n">year</span> <span class="o">*</span> <span class="mi">10000</span> <span class="o">+</span>
+                                      <span class="n">truedatetime</span><span class="o">.</span><span class="n">month</span> <span class="o">*</span> <span class="mi">100</span> <span class="o">+</span>
+                                      <span class="n">truedatetime</span><span class="o">.</span><span class="n">day</span><span class="p">)</span>
+                            <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">hnout</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">h_handle</span><span class="p">:</span>
+                                <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">h_handle</span><span class="p">)</span>
+
+                            <span class="c1">#values = (svdp[1]+svdp[2])/2.</span>
+                            <span class="k">if</span> <span class="n">cparamId</span> <span class="o">==</span> <span class="s1">&#39;142&#39;</span> <span class="ow">or</span> <span class="n">cparamId</span> <span class="o">==</span> <span class="s1">&#39;143&#39;</span><span class="p">:</span>
+                                <span class="n">values</span> <span class="o">=</span> <span class="n">disaggregation</span><span class="o">.</span><span class="n">darain</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="nb">reversed</span><span class="p">(</span><span class="n">svdp</span><span class="p">)))</span>
+                            <span class="k">else</span><span class="p">:</span>
+                                <span class="n">values</span> <span class="o">=</span> <span class="n">disaggregation</span><span class="o">.</span><span class="n">dapoly</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="nb">reversed</span><span class="p">(</span><span class="n">svdp</span><span class="p">)))</span>
+
+                            <span class="n">grib_set</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;step&#39;</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
+                            <span class="n">truedatetime</span> <span class="o">=</span> <span class="n">t_m2dt</span> <span class="o">+</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dtime</span><span class="p">))</span>
+                            <span class="n">grib_set</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;time&#39;</span><span class="p">,</span> <span class="n">truedatetime</span><span class="o">.</span><span class="n">hour</span> <span class="o">*</span> <span class="mi">100</span><span class="p">)</span>
+                            <span class="n">grib_set</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;date&#39;</span><span class="p">,</span> <span class="n">truedatetime</span><span class="o">.</span><span class="n">year</span> <span class="o">*</span> <span class="mi">10000</span> <span class="o">+</span>
+                                     <span class="n">truedatetime</span><span class="o">.</span><span class="n">month</span> <span class="o">*</span> <span class="mi">100</span> <span class="o">+</span>
+                                     <span class="n">truedatetime</span><span class="o">.</span><span class="n">day</span><span class="p">)</span>
+                            <span class="n">grib_set_values</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">values</span><span class="p">)</span>
+                            <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">gnout</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">g_handle</span><span class="p">:</span>
+                                <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">g_handle</span><span class="p">)</span>
+
+                <span class="n">grib_release</span><span class="p">(</span><span class="n">gid</span><span class="p">)</span>
+
+                <span class="n">gid</span> <span class="o">=</span> <span class="n">grib_new_from_index</span><span class="p">(</span><span class="n">iid</span><span class="p">)</span>
+
+        <span class="n">grib_index_release</span><span class="p">(</span><span class="n">iid</span><span class="p">)</span>
+
+        <span class="k">return</span></div>
+
+
+<div class="viewcode-block" id="EcFlexpart.create"><a class="viewcode-back" href="../api.html#EcFlexpart.EcFlexpart.create">[docs]</a>    <span class="k">def</span> <span class="nf">create</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inputfiles</span><span class="p">,</span> <span class="n">c</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;An index file will be created which depends on the combination</span>
+<span class="sd">        of &quot;date&quot;, &quot;time&quot; and &quot;stepRange&quot; values. This is used to iterate</span>
+<span class="sd">        over all messages in each grib file which were passed through the</span>
+<span class="sd">        parameter &quot;inputfiles&quot; to seperate specific parameters into fort.*</span>
+<span class="sd">        files. Afterwards the FORTRAN program is called to convert</span>
+<span class="sd">        the data fields all to the same grid and put them in one file</span>
+<span class="sd">        per unique time step (combination of &quot;date&quot;, &quot;time&quot; and</span>
+<span class="sd">        &quot;stepRange&quot;).</span>
+
+<span class="sd">        Note</span>
+<span class="sd">        ----</span>
+<span class="sd">        This method is based on the ECMWF example index.py</span>
+<span class="sd">        https://software.ecmwf.int/wiki/display/GRIB/index.py</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        inputfiles : :obj:`UioFiles`</span>
+<span class="sd">            Contains a list of files.</span>
+
+<span class="sd">        c : :obj:`ControlFile`</span>
+<span class="sd">            Contains all the parameters of CONTROL file and</span>
+<span class="sd">            command line.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">wrf</span><span class="p">:</span>
+            <span class="n">table128</span> <span class="o">=</span> <span class="n">init128</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_GRIBTABLE</span><span class="p">)</span>
+            <span class="n">wrfpars</span> <span class="o">=</span> <span class="n">to_param_id</span><span class="p">(</span><span class="s1">&#39;sp/mslp/skt/2t/10u/10v/2d/z/lsm/sst/ci/sd/</span><span class="se">\</span>
+<span class="s1">                                   stl1/stl2/stl3/stl4/swvl1/swvl2/swvl3/swvl4&#39;</span><span class="p">,</span>
+                                  <span class="n">table128</span><span class="p">)</span>
+
+        <span class="c1"># these numbers are indices for the temporary files &quot;fort.xx&quot;</span>
+        <span class="c1"># which are used to seperate the grib fields to,</span>
+        <span class="c1"># for the Fortran program input</span>
+        <span class="c1"># 10: U,V | 11: T | 12: lnsp | 13: D | 16: sfc fields</span>
+        <span class="c1"># 17: Q | 18: Q , gaussian| 19: w | 21: etadot | 22: clwc+ciwc</span>
+        <span class="n">fdict</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;10&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span> <span class="s1">&#39;11&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span> <span class="s1">&#39;12&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span> <span class="s1">&#39;13&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span> <span class="s1">&#39;16&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span>
+                 <span class="s1">&#39;17&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span> <span class="s1">&#39;18&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span> <span class="s1">&#39;19&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span> <span class="s1">&#39;21&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">,</span> <span class="s1">&#39;22&#39;</span><span class="p">:</span><span class="kc">None</span><span class="p">}</span>
+
+        <span class="n">iid</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="n">index_vals</span> <span class="o">=</span> <span class="kc">None</span>
+
+        <span class="c1"># get the values of the keys which are used for distinct access</span>
+        <span class="c1"># of grib messages via product</span>
+        <span class="n">index_keys</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;date&quot;</span><span class="p">,</span> <span class="s2">&quot;time&quot;</span><span class="p">,</span> <span class="s2">&quot;step&quot;</span><span class="p">]</span>
+        <span class="n">iid</span><span class="p">,</span> <span class="n">index_vals</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_mk_index_values</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span>
+                                                <span class="n">inputfiles</span><span class="p">,</span>
+                                                <span class="n">index_keys</span><span class="p">)</span>
+        <span class="c1"># index_vals looks like e.g.:</span>
+        <span class="c1"># index_vals[0]: (&#39;20171106&#39;, &#39;20171107&#39;, &#39;20171108&#39;) ; date</span>
+        <span class="c1"># index_vals[1]: (&#39;0&#39;, &#39;1200&#39;, &#39;1800&#39;, &#39;600&#39;) ; time</span>
+        <span class="c1"># index_vals[2]: (&#39;0&#39;, &#39;12&#39;, &#39;3&#39;, &#39;6&#39;, &#39;9&#39;) ; stepRange</span>
+
+        <span class="c1"># &quot;product&quot; genereates each possible combination between the</span>
+        <span class="c1"># values of the index keys</span>
+        <span class="k">for</span> <span class="n">prod</span> <span class="ow">in</span> <span class="n">product</span><span class="p">(</span><span class="o">*</span><span class="n">index_vals</span><span class="p">):</span>
+            <span class="c1"># e.g. prod = (&#39;20170505&#39;, &#39;0&#39;, &#39;12&#39;)</span>
+            <span class="c1">#             (  date    ,time, step)</span>
+
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;current product: &#39;</span><span class="p">,</span> <span class="n">prod</span><span class="p">)</span>
+
+            <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">index_keys</span><span class="p">)):</span>
+                <span class="n">grib_index_select</span><span class="p">(</span><span class="n">iid</span><span class="p">,</span> <span class="n">index_keys</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">prod</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
+
+            <span class="c1"># get first id from current product</span>
+            <span class="n">gid</span> <span class="o">=</span> <span class="n">grib_new_from_index</span><span class="p">(</span><span class="n">iid</span><span class="p">)</span>
+
+            <span class="c1"># if there is no data for this specific time combination / product</span>
+            <span class="c1"># skip the rest of the for loop and start with next timestep/product</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">gid</span><span class="p">:</span>
+                <span class="k">continue</span>
+
+            <span class="c1"># remove old fort.* files and open new ones</span>
+            <span class="c1"># they are just valid for a single product</span>
+            <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">fdict</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
+                <span class="n">fortfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="s1">&#39;fort.&#39;</span> <span class="o">+</span> <span class="n">k</span><span class="p">)</span>
+                <span class="n">silent_remove</span><span class="p">(</span><span class="n">fortfile</span><span class="p">)</span>
+                <span class="n">fdict</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">fortfile</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span>
+
+            <span class="c1"># create correct timestamp from the three time informations</span>
+            <span class="n">cdate</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;date&#39;</span><span class="p">))</span>
+            <span class="n">ctime</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">{:0&gt;2}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;time&#39;</span><span class="p">)</span><span class="o">/</span><span class="mi">100</span><span class="p">)</span>
+            <span class="n">cstep</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">{:0&gt;3}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;step&#39;</span><span class="p">))</span>
+            <span class="n">timestamp</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strptime</span><span class="p">(</span><span class="n">cdate</span> <span class="o">+</span> <span class="n">ctime</span><span class="p">,</span> <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">%H&#39;</span><span class="p">)</span>
+            <span class="n">timestamp</span> <span class="o">+=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">cstep</span><span class="p">))</span>
+            <span class="n">cdate_hour</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">timestamp</span><span class="p">,</span> <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">%H&#39;</span><span class="p">)</span>
+
+            <span class="c1"># if the timestamp is out of basetime start/end date period,</span>
+            <span class="c1"># skip this specific product</span>
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">basetime</span><span class="p">:</span>
+                <span class="n">start_time</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strptime</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">end_date</span> <span class="o">+</span> <span class="n">c</span><span class="o">.</span><span class="n">basetime</span><span class="p">,</span>
+                                                <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">%H&#39;</span><span class="p">)</span> <span class="o">-</span> <span class="n">time_delta</span>
+                <span class="n">end_time</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strptime</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">end_date</span> <span class="o">+</span> <span class="n">c</span><span class="o">.</span><span class="n">basetime</span><span class="p">,</span>
+                                             <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">%H&#39;</span><span class="p">)</span>
+                <span class="k">if</span> <span class="n">timestamp</span> <span class="o">&lt;</span> <span class="n">start_time</span> <span class="ow">or</span> <span class="n">timestamp</span> <span class="o">&gt;</span> <span class="n">end_time</span><span class="p">:</span>
+                    <span class="k">continue</span>
+
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">wrf</span><span class="p">:</span>
+                <span class="k">if</span> <span class="s1">&#39;olddate&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="nb">locals</span><span class="p">()</span> <span class="ow">or</span> <span class="n">cdate</span> <span class="o">!=</span> <span class="n">olddate</span><span class="p">:</span>
+                    <span class="n">fwrf</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">outputdir</span><span class="p">,</span>
+                                <span class="s1">&#39;WRF&#39;</span> <span class="o">+</span> <span class="n">cdate</span> <span class="o">+</span> <span class="s1">&#39;.&#39;</span> <span class="o">+</span> <span class="n">ctime</span> <span class="o">+</span> <span class="s1">&#39;.000.grb2&#39;</span><span class="p">),</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span>
+                    <span class="n">olddate</span> <span class="o">=</span> <span class="n">cdate</span><span class="p">[:]</span>
+
+            <span class="c1"># savedfields remembers which fields were already used.</span>
+            <span class="n">savedfields</span> <span class="o">=</span> <span class="p">[]</span>
+            <span class="c1"># sum of cloud liquid and ice water content</span>
+            <span class="n">scwc</span> <span class="o">=</span> <span class="kc">None</span>
+            <span class="k">while</span> <span class="mi">1</span><span class="p">:</span>
+                <span class="k">if</span> <span class="ow">not</span> <span class="n">gid</span><span class="p">:</span>
+                    <span class="k">break</span>
+                <span class="n">paramId</span> <span class="o">=</span> <span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;paramId&#39;</span><span class="p">)</span>
+                <span class="n">gridtype</span> <span class="o">=</span> <span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;gridType&#39;</span><span class="p">)</span>
+                <span class="n">levtype</span> <span class="o">=</span> <span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;typeOfLevel&#39;</span><span class="p">)</span>
+                <span class="k">if</span> <span class="n">paramId</span> <span class="o">==</span> <span class="mi">77</span><span class="p">:</span> <span class="c1"># ETADOT</span>
+                    <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fdict</span><span class="p">[</span><span class="s1">&#39;21&#39;</span><span class="p">])</span>
+                <span class="k">elif</span> <span class="n">paramId</span> <span class="o">==</span> <span class="mi">130</span><span class="p">:</span> <span class="c1"># T</span>
+                    <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fdict</span><span class="p">[</span><span class="s1">&#39;11&#39;</span><span class="p">])</span>
+                <span class="k">elif</span> <span class="n">paramId</span> <span class="o">==</span> <span class="mi">131</span> <span class="ow">or</span> <span class="n">paramId</span> <span class="o">==</span> <span class="mi">132</span><span class="p">:</span> <span class="c1"># U, V wind component</span>
+                    <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fdict</span><span class="p">[</span><span class="s1">&#39;10&#39;</span><span class="p">])</span>
+                <span class="k">elif</span> <span class="n">paramId</span> <span class="o">==</span> <span class="mi">133</span> <span class="ow">and</span> <span class="n">gridtype</span> <span class="o">!=</span> <span class="s1">&#39;reduced_gg&#39;</span><span class="p">:</span> <span class="c1"># Q</span>
+                    <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fdict</span><span class="p">[</span><span class="s1">&#39;17&#39;</span><span class="p">])</span>
+                <span class="k">elif</span> <span class="n">paramId</span> <span class="o">==</span> <span class="mi">133</span> <span class="ow">and</span> <span class="n">gridtype</span> <span class="o">==</span> <span class="s1">&#39;reduced_gg&#39;</span><span class="p">:</span> <span class="c1"># Q, gaussian</span>
+                    <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fdict</span><span class="p">[</span><span class="s1">&#39;18&#39;</span><span class="p">])</span>
+                <span class="k">elif</span> <span class="n">paramId</span> <span class="o">==</span> <span class="mi">135</span><span class="p">:</span> <span class="c1"># W</span>
+                    <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fdict</span><span class="p">[</span><span class="s1">&#39;19&#39;</span><span class="p">])</span>
+                <span class="k">elif</span> <span class="n">paramId</span> <span class="o">==</span> <span class="mi">152</span><span class="p">:</span> <span class="c1"># LNSP</span>
+                    <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fdict</span><span class="p">[</span><span class="s1">&#39;12&#39;</span><span class="p">])</span>
+                <span class="k">elif</span> <span class="n">paramId</span> <span class="o">==</span> <span class="mi">155</span> <span class="ow">and</span> <span class="n">gridtype</span> <span class="o">==</span> <span class="s1">&#39;sh&#39;</span><span class="p">:</span> <span class="c1"># D</span>
+                    <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fdict</span><span class="p">[</span><span class="s1">&#39;13&#39;</span><span class="p">])</span>
+                <span class="k">elif</span> <span class="n">paramId</span> <span class="o">==</span> <span class="mi">246</span> <span class="ow">or</span> <span class="n">paramId</span> <span class="o">==</span> <span class="mi">247</span><span class="p">:</span> <span class="c1"># CLWC, CIWC</span>
+                    <span class="c1"># sum cloud liquid water and ice</span>
+                    <span class="k">if</span> <span class="n">scwc</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
+                        <span class="n">scwc</span> <span class="o">=</span> <span class="n">grib_get_values</span><span class="p">(</span><span class="n">gid</span><span class="p">)</span>
+                    <span class="k">else</span><span class="p">:</span>
+                        <span class="n">scwc</span> <span class="o">+=</span> <span class="n">grib_get_values</span><span class="p">(</span><span class="n">gid</span><span class="p">)</span>
+                        <span class="n">grib_set_values</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">scwc</span><span class="p">)</span>
+                        <span class="n">grib_set</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="s1">&#39;paramId&#39;</span><span class="p">,</span> <span class="mi">201031</span><span class="p">)</span>
+                        <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fdict</span><span class="p">[</span><span class="s1">&#39;22&#39;</span><span class="p">])</span>
+                <span class="k">elif</span> <span class="n">c</span><span class="o">.</span><span class="n">wrf</span> <span class="ow">and</span> <span class="n">paramId</span> <span class="ow">in</span> <span class="p">[</span><span class="mi">129</span><span class="p">,</span> <span class="mi">138</span><span class="p">,</span> <span class="mi">155</span><span class="p">]</span> <span class="ow">and</span> \
+                      <span class="n">levtype</span> <span class="o">==</span> <span class="s1">&#39;hybrid&#39;</span><span class="p">:</span> <span class="c1"># Z, VO, D</span>
+                    <span class="c1"># do not do anything right now</span>
+                    <span class="c1"># these are specific parameter for WRF</span>
+                    <span class="k">pass</span>
+                <span class="k">else</span><span class="p">:</span>
+                    <span class="k">if</span> <span class="n">paramId</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">savedfields</span><span class="p">:</span>
+                        <span class="c1"># SD/MSL/TCC/10U/10V/2T/2D/Z/LSM/SDOR/CVL/CVH/SR</span>
+                        <span class="c1"># and all ADDPAR parameter</span>
+                        <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fdict</span><span class="p">[</span><span class="s1">&#39;16&#39;</span><span class="p">])</span>
+                        <span class="n">savedfields</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">paramId</span><span class="p">)</span>
+                    <span class="k">else</span><span class="p">:</span>
+                        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;duplicate &#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">paramId</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39; not written&#39;</span><span class="p">)</span>
+
+                <span class="k">try</span><span class="p">:</span>
+                    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">wrf</span><span class="p">:</span>
+                        <span class="c1"># model layer</span>
+                        <span class="k">if</span> <span class="n">levtype</span> <span class="o">==</span> <span class="s1">&#39;hybrid&#39;</span> <span class="ow">and</span> \
+                           <span class="n">paramId</span> <span class="ow">in</span> <span class="p">[</span><span class="mi">129</span><span class="p">,</span> <span class="mi">130</span><span class="p">,</span> <span class="mi">131</span><span class="p">,</span> <span class="mi">132</span><span class="p">,</span> <span class="mi">133</span><span class="p">,</span> <span class="mi">138</span><span class="p">,</span> <span class="mi">155</span><span class="p">]:</span>
+                            <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fwrf</span><span class="p">)</span>
+                        <span class="c1"># sfc layer</span>
+                        <span class="k">elif</span> <span class="n">paramId</span> <span class="ow">in</span> <span class="n">wrfpars</span><span class="p">:</span>
+                            <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fwrf</span><span class="p">)</span>
+                <span class="k">except</span> <span class="ne">AttributeError</span><span class="p">:</span>
+                    <span class="k">pass</span>
+
+                <span class="n">grib_release</span><span class="p">(</span><span class="n">gid</span><span class="p">)</span>
+                <span class="n">gid</span> <span class="o">=</span> <span class="n">grib_new_from_index</span><span class="p">(</span><span class="n">iid</span><span class="p">)</span>
+
+            <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">fdict</span><span class="o">.</span><span class="n">values</span><span class="p">():</span>
+                <span class="n">f</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+
+            <span class="c1"># call for Fortran program to convert e.g. reduced_gg grids to</span>
+            <span class="c1"># regular_ll and calculate detadot/dp</span>
+            <span class="n">pwd</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getcwd</span><span class="p">()</span>
+            <span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">)</span>
+            <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">stat</span><span class="p">(</span><span class="s1">&#39;fort.21&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">st_size</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">and</span> <span class="n">c</span><span class="o">.</span><span class="n">eta</span><span class="p">:</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Parameter 77 (etadot) is missing, most likely it is </span><span class="se">\</span>
+<span class="s1">                       not available for this type or date/time</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Check parameters CLASS, TYPE, STREAM, START_DATE</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+                <span class="n">my_error</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">mailfail</span><span class="p">,</span> <span class="s1">&#39;fort.21 is empty while parameter eta </span><span class="se">\</span>
+<span class="s1">                         is set to 1 in CONTROL file&#39;</span><span class="p">)</span>
+
+            <span class="c1"># Fortran program creates file fort.15 (with u,v,etadot,t,sp,q)</span>
+            <span class="n">p</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">check_call</span><span class="p">([</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
+                <span class="n">c</span><span class="o">.</span><span class="n">exedir</span><span class="p">,</span> <span class="n">_config</span><span class="o">.</span><span class="n">FORTRAN_EXECUTABLE</span><span class="p">)],</span> <span class="n">shell</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+            <span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">pwd</span><span class="p">)</span>
+
+            <span class="c1"># create name of final output file, e.g. EN13040500 (ENYYMMDDHH)</span>
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">&gt;</span> <span class="mi">12</span><span class="p">:</span>
+                <span class="n">suffix</span> <span class="o">=</span> <span class="n">cdate</span><span class="p">[</span><span class="mi">2</span><span class="p">:</span><span class="mi">8</span><span class="p">]</span> <span class="o">+</span> <span class="s1">&#39;.&#39;</span> <span class="o">+</span> <span class="n">ctime</span> <span class="o">+</span> <span class="s1">&#39;.&#39;</span> <span class="o">+</span> <span class="n">cstep</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="n">suffix</span> <span class="o">=</span> <span class="n">cdate_hour</span><span class="p">[</span><span class="mi">2</span><span class="p">:</span><span class="mi">10</span><span class="p">]</span>
+            <span class="n">fnout</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">prefix</span> <span class="o">+</span> <span class="n">suffix</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;outputfile = &quot;</span> <span class="o">+</span> <span class="n">fnout</span><span class="p">)</span>
+            <span class="c1"># collect for final processing</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">outputfilelist</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">fnout</span><span class="p">))</span>
+
+            <span class="c1"># create outputfile and copy all data from intermediate files</span>
+            <span class="c1"># to the outputfile (final GRIB input files for FLEXPART)</span>
+            <span class="n">orolsm</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">glob</span><span class="o">.</span><span class="n">glob</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span> <span class="o">+</span>
+                                        <span class="s1">&#39;/OG_OROLSM__SL.*.&#39;</span> <span class="o">+</span> <span class="n">c</span><span class="o">.</span><span class="n">ppid</span> <span class="o">+</span> <span class="s1">&#39;*&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">])</span>
+            <span class="n">fluxfile</span> <span class="o">=</span> <span class="s1">&#39;flux&#39;</span> <span class="o">+</span> <span class="n">cdate</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">2</span><span class="p">]</span> <span class="o">+</span> <span class="n">suffix</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">c</span><span class="o">.</span><span class="n">cwc</span><span class="p">:</span>
+                <span class="n">flist</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;fort.15&#39;</span><span class="p">,</span> <span class="n">fluxfile</span><span class="p">,</span> <span class="s1">&#39;fort.16&#39;</span><span class="p">,</span> <span class="n">orolsm</span><span class="p">]</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="n">flist</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;fort.15&#39;</span><span class="p">,</span> <span class="s1">&#39;fort.22&#39;</span><span class="p">,</span> <span class="n">fluxfile</span><span class="p">,</span> <span class="s1">&#39;fort.16&#39;</span><span class="p">,</span> <span class="n">orolsm</span><span class="p">]</span>
+
+            <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">fnout</span><span class="p">,</span> <span class="s1">&#39;wb&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">fout</span><span class="p">:</span>
+                <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">flist</span><span class="p">:</span>
+                    <span class="n">shutil</span><span class="o">.</span><span class="n">copyfileobj</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="n">f</span><span class="p">),</span> <span class="s1">&#39;rb&#39;</span><span class="p">),</span>
+                                       <span class="n">fout</span><span class="p">)</span>
+
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">omega</span><span class="p">:</span>
+                <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">outputdir</span><span class="p">,</span> <span class="s1">&#39;OMEGA&#39;</span><span class="p">),</span> <span class="s1">&#39;wb&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">fout</span><span class="p">:</span>
+                    <span class="n">shutil</span><span class="o">.</span><span class="n">copyfileobj</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="s1">&#39;fort.25&#39;</span><span class="p">),</span>
+                                            <span class="s1">&#39;rb&#39;</span><span class="p">),</span> <span class="n">fout</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">wrf</span><span class="p">:</span>
+            <span class="n">fwrf</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+
+        <span class="n">grib_index_release</span><span class="p">(</span><span class="n">iid</span><span class="p">)</span>
+
+        <span class="k">return</span></div>
+
+
+<div class="viewcode-block" id="EcFlexpart.process_output"><a class="viewcode-back" href="../api.html#EcFlexpart.EcFlexpart.process_output">[docs]</a>    <span class="k">def</span> <span class="nf">process_output</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">c</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;The grib files are postprocessed depending on the selection in</span>
+<span class="sd">        CONTROL file. The resulting files are moved to the output</span>
+<span class="sd">        directory if its not equal to the input directory.</span>
+<span class="sd">        The following modifications might be done if</span>
+<span class="sd">        properly switched in CONTROL file:</span>
+<span class="sd">        GRIB2 - Conversion to GRIB2</span>
+<span class="sd">        ECTRANS - Transfer of files to gateway server</span>
+<span class="sd">        ECSTORAGE - Storage at ECMWF server</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        c : :obj:`ControlFile`</span>
+<span class="sd">            Contains all the parameters of CONTROL file and</span>
+<span class="sd">            command line.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n\n</span><span class="s1">Postprocessing:</span><span class="se">\n</span><span class="s1"> Format: </span><span class="si">{}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">format</span><span class="p">))</span>
+
+        <span class="k">if</span> <span class="ow">not</span> <span class="n">c</span><span class="o">.</span><span class="n">ecapi</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;ecstorage: </span><span class="si">{}</span><span class="se">\n</span><span class="s1"> ecfsdir: </span><span class="si">{}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span>
+                  <span class="nb">format</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">ecstorage</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">ecfsdir</span><span class="p">))</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;ectrans: </span><span class="si">{}</span><span class="se">\n</span><span class="s1"> gateway: </span><span class="si">{}</span><span class="se">\n</span><span class="s1"> destination: </span><span class="si">{}</span><span class="se">\n</span><span class="s1"> &#39;</span>
+                  <span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">ectrans</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">gateway</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">destination</span><span class="p">))</span>
+
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Output filelist: &#39;</span><span class="p">)</span>
+        <span class="nb">print</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">outputfilelist</span><span class="p">)</span>
+
+        <span class="k">for</span> <span class="n">ofile</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">outputfilelist</span><span class="p">:</span>
+            <span class="n">ofile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="n">ofile</span><span class="p">)</span>
+
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">format</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="s1">&#39;grib2&#39;</span><span class="p">:</span>
+                <span class="n">p</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">check_call</span><span class="p">([</span><span class="s1">&#39;grib_set&#39;</span><span class="p">,</span> <span class="s1">&#39;-s&#39;</span><span class="p">,</span> <span class="s1">&#39;edition=2, </span><span class="se">\</span>
+<span class="s1">                                           productDefinitionTemplateNumber=8&#39;</span><span class="p">,</span>
+                                           <span class="n">ofile</span><span class="p">,</span> <span class="n">ofile</span> <span class="o">+</span> <span class="s1">&#39;_2&#39;</span><span class="p">])</span>
+                <span class="n">p</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">check_call</span><span class="p">([</span><span class="s1">&#39;mv&#39;</span><span class="p">,</span> <span class="n">ofile</span> <span class="o">+</span> <span class="s1">&#39;_2&#39;</span><span class="p">,</span> <span class="n">ofile</span><span class="p">])</span>
+
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">ectrans</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">c</span><span class="o">.</span><span class="n">ecapi</span><span class="p">:</span>
+                <span class="n">p</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">check_call</span><span class="p">([</span><span class="s1">&#39;ectrans&#39;</span><span class="p">,</span> <span class="s1">&#39;-overwrite&#39;</span><span class="p">,</span> <span class="s1">&#39;-gateway&#39;</span><span class="p">,</span>
+                                           <span class="n">c</span><span class="o">.</span><span class="n">gateway</span><span class="p">,</span> <span class="s1">&#39;-remote&#39;</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">destination</span><span class="p">,</span>
+                                           <span class="s1">&#39;-source&#39;</span><span class="p">,</span> <span class="n">ofile</span><span class="p">])</span>
+
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">ecstorage</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">c</span><span class="o">.</span><span class="n">ecapi</span><span class="p">:</span>
+                <span class="n">p</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">check_call</span><span class="p">([</span><span class="s1">&#39;ecp&#39;</span><span class="p">,</span> <span class="s1">&#39;-o&#39;</span><span class="p">,</span> <span class="n">ofile</span><span class="p">,</span>
+                                           <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expandvars</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">ecfsdir</span><span class="p">)])</span>
+
+            <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">outputdir</span> <span class="o">!=</span> <span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">:</span>
+                <span class="n">p</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">check_call</span><span class="p">([</span><span class="s1">&#39;mv&#39;</span><span class="p">,</span>
+                                           <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="n">ofile</span><span class="p">),</span>
+                                           <span class="n">c</span><span class="o">.</span><span class="n">outputdir</span><span class="p">])</span>
+
+        <span class="k">return</span></div>
+
+
+<div class="viewcode-block" id="EcFlexpart.prepare_fp_files"><a class="viewcode-back" href="../api.html#EcFlexpart.EcFlexpart.prepare_fp_files">[docs]</a>    <span class="k">def</span> <span class="nf">prepare_fp_files</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">c</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Conversion of GRIB files to FLEXPART binary format.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        c : :obj:`ControlFile`</span>
+<span class="sd">            Contains all the parameters of CONTROL file and</span>
+<span class="sd">            command line.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="c1"># generate AVAILABLE file</span>
+        <span class="c1"># Example of AVAILABLE file data:</span>
+        <span class="c1"># 20131107 000000      EN13110700              ON DISC</span>
+        <span class="n">clist</span> <span class="o">=</span> <span class="p">[]</span>
+        <span class="k">for</span> <span class="n">ofile</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">outputfilelist</span><span class="p">:</span>
+            <span class="n">fname</span> <span class="o">=</span> <span class="n">ofile</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)</span>
+            <span class="k">if</span> <span class="s1">&#39;.&#39;</span> <span class="ow">in</span> <span class="n">fname</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]:</span>
+                <span class="n">l</span> <span class="o">=</span> <span class="n">fname</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="p">)</span>
+                <span class="n">timestamp</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strptime</span><span class="p">(</span><span class="n">l</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="o">-</span><span class="mi">6</span><span class="p">:]</span> <span class="o">+</span> <span class="n">l</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span>
+                                              <span class="s1">&#39;%y%m</span><span class="si">%d</span><span class="s1">%H&#39;</span><span class="p">)</span>
+                <span class="n">timestamp</span> <span class="o">+=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">l</span><span class="p">[</span><span class="mi">2</span><span class="p">]))</span>
+                <span class="n">cdate</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">timestamp</span><span class="p">,</span> <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">&#39;</span><span class="p">)</span>
+                <span class="n">chms</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="n">timestamp</span><span class="p">,</span> <span class="s1">&#39;%H%M%S&#39;</span><span class="p">)</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="n">cdate</span> <span class="o">=</span> <span class="s1">&#39;20&#39;</span> <span class="o">+</span> <span class="n">fname</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">][</span><span class="o">-</span><span class="mi">8</span><span class="p">:</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span>
+                <span class="n">chms</span> <span class="o">=</span> <span class="n">fname</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">][</span><span class="o">-</span><span class="mi">2</span><span class="p">:]</span> <span class="o">+</span> <span class="s1">&#39;0000&#39;</span>
+            <span class="n">clist</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cdate</span> <span class="o">+</span> <span class="s1">&#39; &#39;</span> <span class="o">+</span> <span class="n">chms</span> <span class="o">+</span> <span class="s1">&#39; &#39;</span><span class="o">*</span><span class="mi">6</span> <span class="o">+</span>
+                         <span class="n">fname</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> <span class="s1">&#39; &#39;</span><span class="o">*</span><span class="mi">14</span> <span class="o">+</span> <span class="s1">&#39;ON DISC&#39;</span><span class="p">)</span>
+        <span class="n">clist</span><span class="o">.</span><span class="n">sort</span><span class="p">()</span>
+        <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">outputdir</span> <span class="o">+</span> <span class="s1">&#39;/&#39;</span> <span class="o">+</span> <span class="s1">&#39;AVAILABLE&#39;</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">clist</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+
+        <span class="c1"># generate pathnames file</span>
+        <span class="n">pwd</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">outputdir</span><span class="p">)</span>
+        <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">pwd</span> <span class="o">+</span> <span class="s1">&#39;/pathnames&#39;</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pwd</span> <span class="o">+</span> <span class="s1">&#39;/Options/</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pwd</span> <span class="o">+</span> <span class="s1">&#39;/</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pwd</span> <span class="o">+</span> <span class="s1">&#39;/</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pwd</span> <span class="o">+</span> <span class="s1">&#39;/AVAILABLE</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39; = == = == = == = == = == ==  = </span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+
+        <span class="c1"># create Options dir if necessary</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">pwd</span> <span class="o">+</span> <span class="s1">&#39;/Options&#39;</span><span class="p">):</span>
+            <span class="n">make_dir</span><span class="p">(</span><span class="n">pwd</span><span class="o">+</span><span class="s1">&#39;/Options&#39;</span><span class="p">)</span>
+
+        <span class="c1"># read template COMMAND file</span>
+        <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expandvars</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expanduser</span><span class="p">(</span>
+            <span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">))</span> <span class="o">+</span> <span class="s1">&#39;/../Options/COMMAND&#39;</span><span class="p">,</span> <span class="s1">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+            <span class="n">lflist</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+
+        <span class="c1"># find index of list where to put in the</span>
+        <span class="c1"># date and time information</span>
+        <span class="c1"># usually after the LDIRECT parameter</span>
+        <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="k">for</span> <span class="n">l</span> <span class="ow">in</span> <span class="n">lflist</span><span class="p">:</span>
+            <span class="k">if</span> <span class="s1">&#39;LDIRECT&#39;</span> <span class="ow">in</span> <span class="n">l</span><span class="o">.</span><span class="n">upper</span><span class="p">():</span>
+                <span class="k">break</span>
+            <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
+
+        <span class="c1"># insert the date and time information of run start and end</span>
+        <span class="c1"># into the list of lines of COMMAND file</span>
+        <span class="n">lflist</span> <span class="o">=</span> <span class="n">lflist</span><span class="p">[:</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> \
+                 <span class="p">[</span><span class="n">clist</span><span class="p">[</span><span class="mi">0</span><span class="p">][:</span><span class="mi">16</span><span class="p">],</span> <span class="n">clist</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">][:</span><span class="mi">16</span><span class="p">]]</span> <span class="o">+</span> \
+                 <span class="n">lflist</span><span class="p">[</span><span class="n">i</span><span class="o">+</span><span class="mi">3</span><span class="p">:]</span>
+
+        <span class="c1"># write the new COMMAND file</span>
+        <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">pwd</span> <span class="o">+</span> <span class="s1">&#39;/Options/COMMAND&#39;</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">g</span><span class="p">:</span>
+            <span class="n">g</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">lflist</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+
+        <span class="c1"># change to outputdir and start the grib2flexpart run</span>
+        <span class="c1"># afterwards switch back to the working dir</span>
+        <span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">outputdir</span><span class="p">)</span>
+        <span class="n">p</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">check_call</span><span class="p">([</span>
+            <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expandvars</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expanduser</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">))</span>
+            <span class="o">+</span> <span class="s1">&#39;/../FLEXPART_PROGRAM/grib2flexpart&#39;</span><span class="p">,</span> <span class="s1">&#39;useAvailable&#39;</span><span class="p">,</span> <span class="s1">&#39;.&#39;</span><span class="p">])</span>
+        <span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">pwd</span><span class="p">)</span>
+
+        <span class="k">return</span></div></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/_modules/GribTools.html
===================================================================
--- documentation/Sphinx/build/html/_modules/GribTools.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_modules/GribTools.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,535 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>GribTools &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="index.html">Module code</a> &raquo;</li>
+        
+      <li>GribTools</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for GribTools</h1><div class="highlight"><pre>
+<span></span><span class="ch">#!/usr/bin/env python</span>
+<span class="c1"># -*- coding: utf-8 -*-</span>
+<span class="c1">#*******************************************************************************</span>
+<span class="c1"># @Author: Anne Fouilloux (University of Oslo)</span>
+<span class="c1">#</span>
+<span class="c1"># @Date: July 2014</span>
+<span class="c1">#</span>
+<span class="c1"># @Change History:</span>
+<span class="c1">#   February 2018 - Anne Philipp (University of Vienna):</span>
+<span class="c1">#        - applied PEP8 style guide</span>
+<span class="c1">#        - added documentation</span>
+<span class="c1">#        - changed some naming</span>
+<span class="c1">#</span>
+<span class="c1"># @License:</span>
+<span class="c1">#    (C) Copyright 2014-2018.</span>
+<span class="c1">#</span>
+<span class="c1">#    This software is licensed under the terms of the Apache Licence Version 2.0</span>
+<span class="c1">#    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Description:</span>
+<span class="c1">#    The GRIB API provides all necessary tools to work directly with the</span>
+<span class="c1">#    grib files. Nevertheless, the GRIB API tools are very basic and are in</span>
+<span class="c1">#    direct connection with the grib files. This class provides some higher</span>
+<span class="c1">#    functions which apply a set of GRIB API tools together in the respective</span>
+<span class="c1">#    context. So, the class initially contains a list of grib files (their</span>
+<span class="c1">#    names) and the using program then applies the methods directly on the</span>
+<span class="c1">#    class objects without having to think about how the actual GRIB API</span>
+<span class="c1">#    tools have to be arranged.</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Content:</span>
+<span class="c1">#    - __init__</span>
+<span class="c1">#    - get_keys</span>
+<span class="c1">#    - set_keys</span>
+<span class="c1">#    - copy</span>
+<span class="c1">#    - index</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Attributes:</span>
+<span class="c1">#    - filenames</span>
+<span class="c1">#</span>
+<span class="c1">#*******************************************************************************</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># MODULES</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">from</span> <span class="nn">gribapi</span> <span class="k">import</span> <span class="n">grib_new_from_file</span><span class="p">,</span> <span class="n">grib_is_defined</span><span class="p">,</span> <span class="n">grib_get</span><span class="p">,</span> \
+     <span class="n">grib_release</span><span class="p">,</span> <span class="n">grib_set</span><span class="p">,</span> <span class="n">grib_write</span><span class="p">,</span> <span class="n">grib_index_read</span><span class="p">,</span> \
+     <span class="n">grib_index_new_from_file</span><span class="p">,</span> <span class="n">grib_index_add_file</span><span class="p">,</span>  \
+     <span class="n">grib_index_write</span>
+
+
+<span class="c1"># from eccodes import (codes_grib_new_from_file, codes_is_defined, codes_get,</span>
+                     <span class="c1"># codes_release, codes_set, codes_write, codes_index_read,</span>
+                     <span class="c1"># codes_index_new_from_file, codes_index_add_file,</span>
+                     <span class="c1"># codes_index_write)</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># CLASS</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<div class="viewcode-block" id="GribTools"><a class="viewcode-back" href="../api.html#GribTools.GribTools">[docs]</a><span class="k">class</span> <span class="nc">GribTools</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;</span>
+<span class="sd">    Class for GRIB utilities (new methods) based on GRIB API</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="c1"># --------------------------------------------------------------------------</span>
+    <span class="c1"># CLASS FUNCTIONS</span>
+    <span class="c1"># --------------------------------------------------------------------------</span>
+    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filenames</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Initialise an object of GribTools and assign a list of filenames.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        filenames : :obj:`list` of :obj:`strings`</span>
+<span class="sd">             A list of filenames.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">filenames</span> <span class="o">=</span> <span class="n">filenames</span>
+
+        <span class="k">return</span>
+
+
+<div class="viewcode-block" id="GribTools.get_keys"><a class="viewcode-back" href="../api.html#GribTools.GribTools.get_keys">[docs]</a>    <span class="k">def</span> <span class="nf">get_keys</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">keynames</span><span class="p">,</span> <span class="n">wherekeynames</span><span class="o">=</span><span class="p">[],</span> <span class="n">wherekeyvalues</span><span class="o">=</span><span class="p">[]):</span>
+        <span class="sd">&#39;&#39;&#39;Get keyvalues for a given list of keynames a where statement</span>
+<span class="sd">        can be given (list of key and list of values)</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        keynames : :obj:`list` of :obj:`string`</span>
+<span class="sd">            List of keynames.</span>
+
+<span class="sd">        wherekeynames : :obj:`list` of :obj:`string`, optional</span>
+<span class="sd">            Default value is an empty list.</span>
+
+<span class="sd">        wherekeyvalues : :obj:`list` of :obj:`string`, optional</span>
+<span class="sd">            Default value is an empty list.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+<span class="sd">        return_list : :obj:`list` of :obj:`string`</span>
+<span class="sd">            List of keyvalues for given keynames.</span>
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="n">fileid</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">filenames</span><span class="p">,</span> <span class="s1">&#39;r&#39;</span><span class="p">)</span>
+
+        <span class="n">return_list</span> <span class="o">=</span> <span class="p">[]</span>
+
+        <span class="k">while</span> <span class="mi">1</span><span class="p">:</span>
+            <span class="n">gid</span> <span class="o">=</span> <span class="n">grib_new_from_file</span><span class="p">(</span><span class="n">fileid</span><span class="p">)</span>
+
+            <span class="k">if</span> <span class="n">gid</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
+                <span class="k">break</span>
+
+            <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">wherekeynames</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">wherekeyvalues</span><span class="p">):</span>
+                <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;Number of key values and key names must be </span><span class="se">\</span>
+<span class="s2">                                 the same. Give a value for each keyname!&quot;</span><span class="p">)</span>
+
+            <span class="n">select</span> <span class="o">=</span> <span class="kc">True</span>
+            <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
+            <span class="k">for</span> <span class="n">wherekey</span> <span class="ow">in</span> <span class="n">wherekeynames</span><span class="p">:</span>
+                <span class="k">if</span> <span class="ow">not</span> <span class="n">grib_is_defined</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">wherekey</span><span class="p">):</span>
+                    <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;where key was not defined&quot;</span><span class="p">)</span>
+
+                <span class="n">select</span> <span class="o">=</span> <span class="p">(</span><span class="n">select</span> <span class="ow">and</span> <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">wherekeyvalues</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">==</span>
+                                      <span class="nb">str</span><span class="p">(</span><span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">wherekey</span><span class="p">))))</span>
+                <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
+
+            <span class="k">if</span> <span class="n">select</span><span class="p">:</span>
+                <span class="n">llist</span> <span class="o">=</span> <span class="p">[]</span>
+                <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">keynames</span><span class="p">:</span>
+                    <span class="n">llist</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span><span class="nb">str</span><span class="p">(</span><span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">key</span><span class="p">))])</span>
+                <span class="n">return_list</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">llist</span><span class="p">)</span>
+
+            <span class="n">grib_release</span><span class="p">(</span><span class="n">gid</span><span class="p">)</span>
+
+        <span class="n">fileid</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+
+        <span class="k">return</span> <span class="n">return_list</span></div>
+
+
+<div class="viewcode-block" id="GribTools.set_keys"><a class="viewcode-back" href="../api.html#GribTools.GribTools.set_keys">[docs]</a>    <span class="k">def</span> <span class="nf">set_keys</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">fromfile</span><span class="p">,</span> <span class="n">keynames</span><span class="p">,</span> <span class="n">keyvalues</span><span class="p">,</span> <span class="n">wherekeynames</span><span class="o">=</span><span class="p">[],</span>
+                 <span class="n">wherekeyvalues</span><span class="o">=</span><span class="p">[],</span> <span class="n">strict</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">filemode</span><span class="o">=</span><span class="s1">&#39;w&#39;</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Opens the file to read the grib messages and then write</span>
+<span class="sd">        them to a new output file. By default all messages are</span>
+<span class="sd">        written out. Also, the keyvalues of the passed list of</span>
+<span class="sd">        keynames are set or only those meeting the where statement.</span>
+<span class="sd">        (list of key and list of values).</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        fromfile : :obj:`string`</span>
+<span class="sd">            Filename of the input file to read the grib messages from.</span>
+
+<span class="sd">        keynames : :obj:`list` of :obj:`string`</span>
+<span class="sd">            List of keynames. Default is an empty list.</span>
+
+<span class="sd">        keyvalues : :obj:`list` of :obj:`string`</span>
+<span class="sd">            List of keynames. Default is an empty list.</span>
+
+<span class="sd">        wherekeynames : :obj:`list` of :obj:`string`, optional</span>
+<span class="sd">            Default value is an empty list.</span>
+
+<span class="sd">        wherekeyvalues : :obj:`list` of :obj:`string`, optional</span>
+<span class="sd">            Default value is an empty list.</span>
+
+<span class="sd">        strict : :obj:`boolean`, optional</span>
+<span class="sd">            Decides if everything from keynames and keyvalues</span>
+<span class="sd">            is written out the grib file (False) or only those</span>
+<span class="sd">            meeting the where statement (True). Default is False.</span>
+
+<span class="sd">        filemode : :obj:`string`, optional</span>
+<span class="sd">            Sets the mode for the output file. Default is &quot;w&quot;.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="n">fout</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">filenames</span><span class="p">,</span> <span class="n">filemode</span><span class="p">)</span>
+        <span class="n">fin</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">fromfile</span><span class="p">)</span>
+
+        <span class="k">while</span> <span class="mi">1</span><span class="p">:</span>
+            <span class="n">gid</span> <span class="o">=</span> <span class="n">grib_new_from_file</span><span class="p">(</span><span class="n">fin</span><span class="p">)</span>
+
+            <span class="k">if</span> <span class="n">gid</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
+                <span class="k">break</span>
+
+            <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">wherekeynames</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">wherekeyvalues</span><span class="p">):</span>
+                <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;Give a value for each keyname!&quot;</span><span class="p">)</span>
+
+            <span class="n">select</span> <span class="o">=</span> <span class="kc">True</span>
+            <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
+            <span class="k">for</span> <span class="n">wherekey</span> <span class="ow">in</span> <span class="n">wherekeynames</span><span class="p">:</span>
+                <span class="k">if</span> <span class="ow">not</span> <span class="n">grib_is_defined</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">wherekey</span><span class="p">):</span>
+                    <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;where Key was not defined&quot;</span><span class="p">)</span>
+
+                <span class="n">select</span> <span class="o">=</span> <span class="p">(</span><span class="n">select</span> <span class="ow">and</span> <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">wherekeyvalues</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">==</span>
+                                      <span class="nb">str</span><span class="p">(</span><span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">wherekey</span><span class="p">))))</span>
+                <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
+
+            <span class="k">if</span> <span class="n">select</span><span class="p">:</span>
+                <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
+                <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">keynames</span><span class="p">:</span>
+                    <span class="n">grib_set</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">keyvalues</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
+                    <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
+
+            <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fout</span><span class="p">)</span>
+
+            <span class="n">grib_release</span><span class="p">(</span><span class="n">gid</span><span class="p">)</span>
+
+        <span class="n">fin</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+        <span class="n">fout</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+
+        <span class="k">return</span></div>
+
+<div class="viewcode-block" id="GribTools.copy"><a class="viewcode-back" href="../api.html#GribTools.GribTools.copy">[docs]</a>    <span class="k">def</span> <span class="nf">copy</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filename_in</span><span class="p">,</span> <span class="n">selectWhere</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
+             <span class="n">keynames</span><span class="o">=</span><span class="p">[],</span> <span class="n">keyvalues</span><span class="o">=</span><span class="p">[],</span> <span class="n">filemode</span><span class="o">=</span><span class="s1">&#39;w&#39;</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Add the content of another input grib file to the objects file but</span>
+<span class="sd">        only messages corresponding to keys/values passed to the function.</span>
+<span class="sd">        The selectWhere switch decides if to copy the keys equal to (True) or</span>
+<span class="sd">        different to (False) the keynames/keyvalues list passed to the function.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        filename_in : :obj:`string`</span>
+<span class="sd">            Filename of the input file to read the grib messages from.</span>
+
+<span class="sd">        selectWhere : :obj:`boolean`, optional</span>
+<span class="sd">            Decides if to copy the keynames and values equal to (True) or</span>
+<span class="sd">            different to (False) the keynames/keyvalues list passed to the</span>
+<span class="sd">            function. Default is True.</span>
+
+<span class="sd">        keynames : :obj:`list` of :obj:`string`, optional</span>
+<span class="sd">            List of keynames. Default is an empty list.</span>
+
+<span class="sd">        keyvalues : :obj:`list` of :obj:`string`, optional</span>
+<span class="sd">            List of keynames. Default is an empty list.</span>
+
+<span class="sd">        filemode : :obj:`string`, optional</span>
+<span class="sd">            Sets the mode for the output file. Default is &quot;w&quot;.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="n">fin</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">filename_in</span><span class="p">)</span>
+        <span class="n">fout</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">filenames</span><span class="p">,</span> <span class="n">filemode</span><span class="p">)</span>
+
+        <span class="k">while</span> <span class="mi">1</span><span class="p">:</span>
+            <span class="n">gid</span> <span class="o">=</span> <span class="n">grib_new_from_file</span><span class="p">(</span><span class="n">fin</span><span class="p">)</span>
+
+            <span class="k">if</span> <span class="n">gid</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
+                <span class="k">break</span>
+
+            <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">keynames</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">keyvalues</span><span class="p">):</span>
+                <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;Give a value for each keyname!&quot;</span><span class="p">)</span>
+
+            <span class="n">select</span> <span class="o">=</span> <span class="kc">True</span>
+            <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
+            <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">keynames</span><span class="p">:</span>
+                <span class="k">if</span> <span class="ow">not</span> <span class="n">grib_is_defined</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">key</span><span class="p">):</span>
+                    <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;Key was not defined&quot;</span><span class="p">)</span>
+
+                <span class="k">if</span> <span class="n">selectWhere</span><span class="p">:</span>
+                    <span class="n">select</span> <span class="o">=</span> <span class="p">(</span><span class="n">select</span> <span class="ow">and</span> <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">keyvalues</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">==</span>
+                                          <span class="nb">str</span><span class="p">(</span><span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">key</span><span class="p">))))</span>
+                <span class="k">else</span><span class="p">:</span>
+                    <span class="n">select</span> <span class="o">=</span> <span class="p">(</span><span class="n">select</span> <span class="ow">and</span> <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">keyvalues</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">!=</span>
+                                          <span class="nb">str</span><span class="p">(</span><span class="n">grib_get</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">key</span><span class="p">))))</span>
+                <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
+
+            <span class="k">if</span> <span class="n">select</span><span class="p">:</span>
+                <span class="n">grib_write</span><span class="p">(</span><span class="n">gid</span><span class="p">,</span> <span class="n">fout</span><span class="p">)</span>
+
+            <span class="n">grib_release</span><span class="p">(</span><span class="n">gid</span><span class="p">)</span>
+
+        <span class="n">fin</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+        <span class="n">fout</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+
+        <span class="k">return</span></div>
+
+<div class="viewcode-block" id="GribTools.index"><a class="viewcode-back" href="../api.html#GribTools.GribTools.index">[docs]</a>    <span class="k">def</span> <span class="nf">index</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">index_keys</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;mars&quot;</span><span class="p">],</span> <span class="n">index_file</span><span class="o">=</span><span class="s2">&quot;my.idx&quot;</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Create index file from a list of files if it does not exist or</span>
+<span class="sd">        read an index file.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        index_keys: :obj:`list` of :obj:`string`, optional</span>
+<span class="sd">            Contains the list of key parameter names from</span>
+<span class="sd">            which the index is to be created.</span>
+<span class="sd">            Default is a list with a single entry string &quot;mars&quot;.</span>
+
+<span class="sd">        index_file: :obj:`string`, optional</span>
+<span class="sd">            Filename where the indices are stored.</span>
+<span class="sd">            Default is &quot;my.idx&quot;.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+<span class="sd">        iid: :obj:`integer`</span>
+<span class="sd">            Grib index id.</span>
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;... index will be done&quot;</span><span class="p">)</span>
+        <span class="n">iid</span> <span class="o">=</span> <span class="kc">None</span>
+
+        <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">index_file</span><span class="p">):</span>
+            <span class="n">iid</span> <span class="o">=</span> <span class="n">grib_index_read</span><span class="p">(</span><span class="n">index_file</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Use existing index file: </span><span class="si">%s</span><span class="s2"> &quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">index_file</span><span class="p">))</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="k">for</span> <span class="n">filename</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">filenames</span><span class="p">:</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Inputfile: </span><span class="si">%s</span><span class="s2"> &quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">filename</span><span class="p">))</span>
+                <span class="k">if</span> <span class="n">iid</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
+                    <span class="n">iid</span> <span class="o">=</span> <span class="n">grib_index_new_from_file</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">index_keys</span><span class="p">)</span>
+                <span class="k">else</span><span class="p">:</span>
+                    <span class="n">grib_index_add_file</span><span class="p">(</span><span class="n">iid</span><span class="p">,</span> <span class="n">filename</span><span class="p">)</span>
+
+            <span class="k">if</span> <span class="n">iid</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+                <span class="n">grib_index_write</span><span class="p">(</span><span class="n">iid</span><span class="p">,</span> <span class="n">index_file</span><span class="p">)</span>
+
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;... index done&#39;</span><span class="p">)</span>
+
+        <span class="k">return</span> <span class="n">iid</span></div></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/_modules/MarsRetrieval.html
===================================================================
--- documentation/Sphinx/build/html/_modules/MarsRetrieval.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_modules/MarsRetrieval.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,716 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>MarsRetrieval &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="index.html">Module code</a> &raquo;</li>
+        
+      <li>MarsRetrieval</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for MarsRetrieval</h1><div class="highlight"><pre>
+<span></span><span class="ch">#!/usr/bin/env python</span>
+<span class="c1"># -*- coding: utf-8 -*-</span>
+<span class="c1">#*******************************************************************************</span>
+<span class="c1"># @Author: Anne Fouilloux (University of Oslo)</span>
+<span class="c1">#</span>
+<span class="c1"># @Date: October 2014</span>
+<span class="c1">#</span>
+<span class="c1"># @Change History:</span>
+<span class="c1">#</span>
+<span class="c1">#   November 2015 - Leopold Haimberger (University of Vienna):</span>
+<span class="c1">#        - optimized display_info</span>
+<span class="c1">#        - optimized data_retrieve and seperate between python and shell</span>
+<span class="c1">#          script call</span>
+<span class="c1">#</span>
+<span class="c1">#   February 2018 - Anne Philipp (University of Vienna):</span>
+<span class="c1">#        - applied PEP8 style guide</span>
+<span class="c1">#        - added documentation</span>
+<span class="c1">#        - applied some minor modifications in programming style/structure</span>
+<span class="c1">#</span>
+<span class="c1"># @License:</span>
+<span class="c1">#    (C) Copyright 2015-2018.</span>
+<span class="c1">#</span>
+<span class="c1">#    This software is licensed under the terms of the Apache Licence Version 2.0</span>
+<span class="c1">#    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Description:</span>
+<span class="c1">#    A MARS revtrieval has a specific syntax with a selection of keywords and</span>
+<span class="c1">#    their corresponding values. This class provides the necessary functions</span>
+<span class="c1">#    by displaying the selected parameters and their values and the actual</span>
+<span class="c1">#    retrievement of the data through a mars request or a Python web api</span>
+<span class="c1">#    interface. The initialization already expects all the keyword values.</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Content:</span>
+<span class="c1">#    - __init__</span>
+<span class="c1">#    - display_info</span>
+<span class="c1">#    - data_retrieve</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Attributes:</span>
+<span class="c1">#    - server</span>
+<span class="c1">#    - marsclass</span>
+<span class="c1">#    - dtype</span>
+<span class="c1">#    - levtype</span>
+<span class="c1">#    - levelist</span>
+<span class="c1">#    - repres</span>
+<span class="c1">#    - date</span>
+<span class="c1">#    - resol</span>
+<span class="c1">#    - stream</span>
+<span class="c1">#    - area</span>
+<span class="c1">#    - time</span>
+<span class="c1">#    - step</span>
+<span class="c1">#    - expver</span>
+<span class="c1">#    - number</span>
+<span class="c1">#    - accuracy</span>
+<span class="c1">#    - grid</span>
+<span class="c1">#    - gaussian</span>
+<span class="c1">#    - target</span>
+<span class="c1">#    - param</span>
+<span class="c1">#</span>
+<span class="c1">#*******************************************************************************</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># MODULES</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">import</span> <span class="nn">sys</span>
+<span class="kn">import</span> <span class="nn">subprocess</span>
+
+<span class="c1"># software specific classes and modules from flex_extract</span>
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../&#39;</span><span class="p">)</span>
+<span class="kn">import</span> <span class="nn">_config</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># CLASS</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<div class="viewcode-block" id="MarsRetrieval"><a class="viewcode-back" href="../api.html#MarsRetrieval.MarsRetrieval">[docs]</a><span class="k">class</span> <span class="nc">MarsRetrieval</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Class for submitting MARS retrievals.</span>
+
+<span class="sd">    A description of MARS keywords/arguments and examples of their</span>
+<span class="sd">    values can be found here:</span>
+<span class="sd">    https://software.ecmwf.int/wiki/display/UDOC/\</span>
+<span class="sd">                   Identification+keywords#Identificationkeywords-class</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">server</span><span class="p">,</span> <span class="n">public</span><span class="p">,</span> <span class="n">marsclass</span><span class="o">=</span><span class="s2">&quot;ei&quot;</span><span class="p">,</span> <span class="n">dataset</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span>
+                 <span class="n">levtype</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">levelist</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">repres</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">date</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">resol</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span>
+                 <span class="n">stream</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">area</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">time</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">expver</span><span class="o">=</span><span class="s2">&quot;1&quot;</span><span class="p">,</span>
+                 <span class="n">number</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">accuracy</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">grid</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">gaussian</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span>
+                 <span class="n">param</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Initialises the instance of the MarsRetrieval class and</span>
+<span class="sd">        defines and assigns a set of the necessary retrieval parameters</span>
+<span class="sd">        for the FLEXPART input data.</span>
+<span class="sd">        A description of MARS keywords/arguments, their dependencies</span>
+<span class="sd">        on each other and examples of their values can be found here:</span>
+
+<span class="sd">        https://software.ecmwf.int/wiki/display/UDOC/MARS+keywords</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        server : :obj:`ECMWFService`</span>
+<span class="sd">            This is the connection to the ECMWF data servers.</span>
+<span class="sd">            It is needed for the pythonic access of ECMWF data.</span>
+
+<span class="sd">        public : :obj:`integer`</span>
+<span class="sd">            Decides which Web API version is used:</span>
+<span class="sd">            0: member-state users and full archive access</span>
+<span class="sd">            1: public access and limited access to the public server and</span>
+<span class="sd">               datasets. Needs the parameter dataset.</span>
+<span class="sd">            Default is &quot;0&quot; and for member-state users.</span>
+
+<span class="sd">        marsclass : :obj:`string`, optional</span>
+<span class="sd">            Characterisation of dataset. E.g. EI (ERA-Interim),</span>
+<span class="sd">            E4 (ERA40), OD (Operational archive), ea (ERA5).</span>
+<span class="sd">            Default is the ERA-Interim dataset &quot;ei&quot;.</span>
+
+<span class="sd">        dataset : :obj:`string`, optional</span>
+<span class="sd">            For public datasets there is the specific naming and parameter</span>
+<span class="sd">            dataset which has to be used to characterize the type of</span>
+<span class="sd">            data. Usually there is less data available, either in times,</span>
+<span class="sd">            domain or parameter.</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        type : :obj:`string`, optional</span>
+<span class="sd">            Determines the type of fields to be retrieved.</span>
+<span class="sd">            Selects between observations, images or fields.</span>
+<span class="sd">            Examples for fields: Analysis (an), Forecast (fc),</span>
+<span class="sd">            Perturbed Forecast (pf), Control Forecast (cf) and so on.</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        levtype : :obj:`string`, optional</span>
+<span class="sd">            Denotes type of level. Has a direct implication on valid</span>
+<span class="sd">            levelist values!</span>
+<span class="sd">            E.g. model level (ml), pressure level (pl), surface (sfc),</span>
+<span class="sd">            potential vorticity (pv), potential temperature (pt)</span>
+<span class="sd">            and depth (dp).</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        levelist : :obj:`string`, optional</span>
+<span class="sd">            Specifies the required levels. It has to have a valid</span>
+<span class="sd">            correspondence to the selected levtype.</span>
+<span class="sd">            Examples: model level: 1/to/137, pressure levels: 500/to/1000</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        repres : :obj:`string`, optional</span>
+<span class="sd">            Selects the representation of the archived data.</span>
+<span class="sd">            E.g. sh - spherical harmonics, gg - Gaussian grid,</span>
+<span class="sd">            ll - latitude/longitude, ...</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        date : :obj:`string`, optional</span>
+<span class="sd">            Specifies the Analysis date, the Forecast base date or</span>
+<span class="sd">            Observations date. Valid formats are:</span>
+<span class="sd">            Absolute as YYYY-MM-DD or YYYYMMDD.</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        resol : :obj:`string`, optional</span>
+<span class="sd">            Specifies the desired triangular truncation of retrieved data,</span>
+<span class="sd">            before carrying out any other selected post-processing.</span>
+<span class="sd">            The default is automatic truncation (auto), by which the lowest</span>
+<span class="sd">            resolution compatible with the value specified in grid is</span>
+<span class="sd">            automatically selected for the retrieval.</span>
+<span class="sd">            Users wanting to perform post-processing from full spectral</span>
+<span class="sd">            resolution should specify Archived Value (av).</span>
+<span class="sd">            The following are examples of existing resolutions found in</span>
+<span class="sd">            the archive: 63, 106, 159, 213, 255, 319, 399, 511, 799 or 1279.</span>
+<span class="sd">            This keyword has no meaning/effect if the archived data is</span>
+<span class="sd">            not in spherical harmonics representation.</span>
+<span class="sd">            The best selection can be found here:</span>
+<span class="sd">            https://software.ecmwf.int/wiki/display/UDOC/\</span>
+<span class="sd">                  Retrieve#Retrieve-Truncationbeforeinterpolation</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        stream : :obj:`string`, optional</span>
+<span class="sd">            Identifies the forecasting system used to generate the data.</span>
+<span class="sd">            E.g. oper (Atmospheric model), enfo (Ensemble forecats), ...</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        area : :obj:`string`, optional</span>
+<span class="sd">            Specifies the desired sub-area of data to be extracted.</span>
+<span class="sd">            Areas can be defined to wrap around the globe.</span>
+
+<span class="sd">            Latitude values must be given as signed numbers, with:</span>
+<span class="sd">                north latitudes (i.e. north of the equator)</span>
+<span class="sd">                    being positive (e.g: 40.5)</span>
+<span class="sd">                south latitutes (i.e. south of the equator)</span>
+<span class="sd">                    being negative (e.g: -50.5)</span>
+<span class="sd">            Longtitude values must be given as signed numbers, with:</span>
+<span class="sd">                east longitudes (i.e. east of the 0 degree meridian)</span>
+<span class="sd">                    being positive (e.g: 35.0)</span>
+<span class="sd">                west longitudes (i.e. west of the 0 degree meridian)</span>
+<span class="sd">                    being negative (e.g: -20.5)</span>
+
+<span class="sd">            E.g.: North/West/South/East</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        time : :obj:`string`, optional</span>
+<span class="sd">            Specifies the time of the data in hours and minutes.</span>
+<span class="sd">            Valid values depend on the type of data: Analysis time,</span>
+<span class="sd">            Forecast base time or First guess verification time</span>
+<span class="sd">            (all usually at synoptic hours: 00, 06, 12 and 18 ).</span>
+<span class="sd">            Observation time (any combination in hours and minutes is valid,</span>
+<span class="sd">            subject to data availability in the archive).</span>
+<span class="sd">            The syntax is HHMM or HH:MM. If MM is omitted it defaults to 00.</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        step : :obj:`string`, optional</span>
+<span class="sd">            Specifies the forecast time step from forecast base time.</span>
+<span class="sd">            Valid values are hours (HH) from forecast base time. It also</span>
+<span class="sd">            specifies the length of the forecast which verifies at</span>
+<span class="sd">            First Guess time.</span>
+<span class="sd">            E.g. 1/3/6-hourly</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        expver : :obj:`string`, optional</span>
+<span class="sd">            The version of the dataset. Each experiment is assigned a</span>
+<span class="sd">            unique code (version). Production data is assigned 1 or 2,</span>
+<span class="sd">            and experimental data in Operations 11, 12 ,...</span>
+<span class="sd">            Research or Member State&#39;s experiments have a four letter</span>
+<span class="sd">            experiment identifier.</span>
+<span class="sd">            Default is &quot;1&quot;.</span>
+
+<span class="sd">        number : :obj:`string`, optional</span>
+<span class="sd">            Selects the member in ensemble forecast run. (Only then it</span>
+<span class="sd">            is necessary.) It has a different meaning depending on</span>
+<span class="sd">            the type of data.</span>
+<span class="sd">            E.g. Perturbed Forecasts: specifies the Ensemble forecast member</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        accuracy : :obj:`string`, optional</span>
+<span class="sd">            Specifies the number of bits per value to be used in the</span>
+<span class="sd">            generated GRIB coded fields.</span>
+<span class="sd">            A positive integer may be given to specify the preferred number</span>
+<span class="sd">            of bits per packed value. This must not be greater than the</span>
+<span class="sd">            number of bits normally used for a Fortran integer on the</span>
+<span class="sd">            processor handling the request (typically 32 or 64 bit).</span>
+<span class="sd">            Within a compute request the accuracy of the original fields</span>
+<span class="sd">            can be passed to the result field by specifying accuracy=av.</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        grid : :obj:`string`, optional</span>
+<span class="sd">            Specifies the output grid which can be either a Gaussian grid</span>
+<span class="sd">            or a Latitude/Longitude grid. MARS requests specifying</span>
+<span class="sd">            grid=av will return the archived model grid.</span>
+
+<span class="sd">            Lat/Lon grid: The grid spacing needs to be an integer</span>
+<span class="sd">            fraction of 90 degrees e.g. grid = 0.5/0.5</span>
+
+<span class="sd">            Gaussian grid: specified by a letter denoting the type of</span>
+<span class="sd">            Gaussian grid followed by an integer (the grid number)</span>
+<span class="sd">            representing the number of lines between the Pole and Equator,</span>
+<span class="sd">            e.g.</span>
+<span class="sd">            grid = F160 - full (or regular) Gaussian grid with</span>
+<span class="sd">                   160 latitude lines between the pole and equator</span>
+<span class="sd">            grid = N320 - ECMWF original reduced Gaussian grid with</span>
+<span class="sd">                   320 latitude lines between the pole and equator,</span>
+<span class="sd">                   see Reduced Gaussian Grids for grid numbers used at ECMWF</span>
+<span class="sd">            grid = O640 - ECMWF octahedral (reduced) Gaussian grid with</span>
+<span class="sd">                   640 latitude lines between the pole and equator</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        gaussian : :obj:`string`, optional</span>
+<span class="sd">            This parameter is deprecated and should no longer be used.</span>
+<span class="sd">            Specifies the desired type of Gaussian grid for the output.</span>
+<span class="sd">            Valid Gaussian grids are quasi-regular (reduced) or regular.</span>
+<span class="sd">            Keyword gaussian can only be specified together with</span>
+<span class="sd">            keyword grid. Gaussian without grid has no effect.</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        target : :obj:`string`, optional</span>
+<span class="sd">            Specifies a file into which data is to be written after</span>
+<span class="sd">            retrieval or manipulation. Path names should always be</span>
+<span class="sd">            enclosed in double quotes. The MARS client supports automatic</span>
+<span class="sd">            generation of multiple target files using MARS keywords</span>
+<span class="sd">            enclosed in square brackets [ ].  If the environment variable</span>
+<span class="sd">            MARS_MULTITARGET_STRICT_FORMAT is set to 1 before calling mars,</span>
+<span class="sd">            the keyword values will be used in the filename as shown by</span>
+<span class="sd">            the ecCodes GRIB tool grib_ls -m, e.g. with</span>
+<span class="sd">            MARS_MULTITARGET_STRICT_FORMAT set to 1 the keywords time,</span>
+<span class="sd">            expver and param will be formatted as 0600, 0001 and 129.128</span>
+<span class="sd">            rather than 600, 1 and 129.</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        param : :obj:`string`, optional</span>
+<span class="sd">            Specifies the meteorological parameter.</span>
+<span class="sd">            The list of meteorological parameters in MARS is extensive.</span>
+<span class="sd">            Their availability is directly related to their meteorological</span>
+<span class="sd">            meaning and, therefore, the rest of directives specified</span>
+<span class="sd">            in the MARS request.</span>
+<span class="sd">            Meteorological parameters can be specified by their</span>
+<span class="sd">            GRIB code (param=130), their mnemonic (param=t) or</span>
+<span class="sd">            full name (param=temperature).</span>
+<span class="sd">            The list of parameter should be seperated by a &quot;/&quot;-sign.</span>
+<span class="sd">            E.g. 130/131/133</span>
+<span class="sd">            Default is an empty string.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">server</span> <span class="o">=</span> <span class="n">server</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">public</span> <span class="o">=</span> <span class="n">public</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">marsclass</span> <span class="o">=</span> <span class="n">marsclass</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">dataset</span> <span class="o">=</span> <span class="n">dataset</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">type</span> <span class="o">=</span> <span class="nb">type</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">levtype</span> <span class="o">=</span> <span class="n">levtype</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">levelist</span> <span class="o">=</span> <span class="n">levelist</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">repres</span> <span class="o">=</span> <span class="n">repres</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">date</span> <span class="o">=</span> <span class="n">date</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">resol</span> <span class="o">=</span> <span class="n">resol</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">stream</span> <span class="o">=</span> <span class="n">stream</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">area</span> <span class="o">=</span> <span class="n">area</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">time</span> <span class="o">=</span> <span class="n">time</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">step</span> <span class="o">=</span> <span class="n">step</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">expver</span> <span class="o">=</span> <span class="n">expver</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">number</span> <span class="o">=</span> <span class="n">number</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">accuracy</span> <span class="o">=</span> <span class="n">accuracy</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">grid</span> <span class="o">=</span> <span class="n">grid</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">gaussian</span> <span class="o">=</span> <span class="n">gaussian</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">target</span> <span class="o">=</span> <span class="n">target</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">param</span> <span class="o">=</span> <span class="n">param</span>
+
+        <span class="k">return</span>
+
+
+<div class="viewcode-block" id="MarsRetrieval.display_info"><a class="viewcode-back" href="../api.html#MarsRetrieval.MarsRetrieval.display_info">[docs]</a>    <span class="k">def</span> <span class="nf">display_info</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Prints all class attributes and their values to the</span>
+<span class="sd">        standard output.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="c1"># Get all class attributes and their values as a dictionary</span>
+        <span class="n">attrs</span> <span class="o">=</span> <span class="nb">vars</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+
+        <span class="c1"># iterate through all attributes and print them</span>
+        <span class="c1"># with their corresponding values</span>
+        <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">attrs</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
+            <span class="k">if</span> <span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">&#39;server&#39;</span><span class="p">,</span> <span class="s1">&#39;public&#39;</span><span class="p">]:</span>
+                <span class="k">pass</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="nb">print</span><span class="p">(</span><span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">+</span> <span class="s1">&#39;: &#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">item</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
+
+        <span class="k">return</span></div>
+
+
+<div class="viewcode-block" id="MarsRetrieval.print_info"><a class="viewcode-back" href="../api.html#MarsRetrieval.MarsRetrieval.print_info">[docs]</a>    <span class="k">def</span> <span class="nf">print_info</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inputdir</span><span class="p">,</span> <span class="n">request_number</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Prints all mars requests to an extra file for debugging and</span>
+<span class="sd">        information.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        inputdir : :obj:`string`</span>
+<span class="sd">            The path where all data from the retrievals are stored.</span>
+
+<span class="sd">        request_number : :obj:`integer`</span>
+<span class="sd">            Number of mars requests for flux and non-flux data.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="c1"># Get all class attributes and their values as a dictionary</span>
+        <span class="n">attrs</span> <span class="o">=</span> <span class="nb">vars</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+
+        <span class="c1"># open a file to store all requests to</span>
+        <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">inputdir</span><span class="p">,</span>
+                               <span class="n">_config</span><span class="o">.</span><span class="n">FILE_MARS_REQUESTS</span><span class="p">),</span> <span class="s1">&#39;a&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;mars_request #&#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">request_number</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+            <span class="c1"># iterate through all attributes and print them</span>
+            <span class="c1"># with their corresponding values</span>
+            <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">attrs</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
+                <span class="k">if</span> <span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">&#39;server&#39;</span><span class="p">,</span> <span class="s1">&#39;public&#39;</span><span class="p">]:</span>
+                    <span class="k">pass</span>
+                <span class="k">else</span><span class="p">:</span>
+                    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">+</span> <span class="s1">&#39;: &#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">item</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n\n</span><span class="s1">&#39;</span><span class="p">)</span>
+
+        <span class="k">return</span></div>
+
+
+<div class="viewcode-block" id="MarsRetrieval.print_infodata_csv"><a class="viewcode-back" href="../api.html#MarsRetrieval.MarsRetrieval.print_infodata_csv">[docs]</a>    <span class="k">def</span> <span class="nf">print_infodata_csv</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inputdir</span><span class="p">,</span> <span class="n">request_number</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Write all request parameter in alpabetical order into a &quot;csv&quot; file.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        inputdir : :obj:`string`</span>
+<span class="sd">            The path where all data from the retrievals are stored.</span>
+
+<span class="sd">        request_number : :obj:`integer`</span>
+<span class="sd">            Number of mars requests for flux and non-flux data.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="c1"># Get all class attributes and their values as a dictionary</span>
+        <span class="n">attrs</span> <span class="o">=</span> <span class="nb">vars</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+        <span class="k">del</span> <span class="n">attrs</span><span class="p">[</span><span class="s1">&#39;server&#39;</span><span class="p">]</span>
+        <span class="k">del</span> <span class="n">attrs</span><span class="p">[</span><span class="s1">&#39;public&#39;</span><span class="p">]</span>
+
+        <span class="c1"># open a file to store all requests to</span>
+        <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">inputdir</span><span class="p">,</span>
+                               <span class="n">_config</span><span class="o">.</span><span class="n">FILE_MARS_REQUESTS</span><span class="p">),</span> <span class="s1">&#39;a&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">request_number</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39;, &#39;</span><span class="p">)</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;, &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">attrs</span><span class="p">[</span><span class="n">key</span><span class="p">])</span>
+                              <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">attrs</span><span class="o">.</span><span class="n">iterkeys</span><span class="p">())))</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+
+        <span class="k">return</span></div>
+
+<div class="viewcode-block" id="MarsRetrieval.data_retrieve"><a class="viewcode-back" href="../api.html#MarsRetrieval.MarsRetrieval.data_retrieve">[docs]</a>    <span class="k">def</span> <span class="nf">data_retrieve</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Submits a MARS retrieval. Depending on the existence of</span>
+<span class="sd">        ECMWF Web-API it is submitted via Python or a</span>
+<span class="sd">        subprocess in the Shell. The parameter for the mars retrieval</span>
+<span class="sd">        are taken from the defined class attributes.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="c1"># Get all class attributes and their values as a dictionary</span>
+        <span class="n">attrs</span> <span class="o">=</span> <span class="nb">vars</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+
+        <span class="c1"># eliminate unnecessary attributes from the dictionary attrs</span>
+        <span class="k">del</span> <span class="n">attrs</span><span class="p">[</span><span class="s1">&#39;server&#39;</span><span class="p">]</span>
+        <span class="k">del</span> <span class="n">attrs</span><span class="p">[</span><span class="s1">&#39;public&#39;</span><span class="p">]</span>
+
+        <span class="c1"># exchange parameter name for marsclass</span>
+        <span class="n">mclass</span> <span class="o">=</span> <span class="n">attrs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;marsclass&#39;</span><span class="p">)</span>
+        <span class="k">del</span> <span class="n">attrs</span><span class="p">[</span><span class="s1">&#39;marsclass&#39;</span><span class="p">]</span>
+        <span class="n">attrs</span><span class="p">[</span><span class="s1">&#39;class&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">mclass</span>
+
+        <span class="c1"># prepare target variable as needed for the Web API mode</span>
+        <span class="c1"># within the dictionary for full access</span>
+        <span class="c1"># as a single variable for public access</span>
+        <span class="n">target</span> <span class="o">=</span> <span class="n">attrs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;target&#39;</span><span class="p">)</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">public</span><span class="p">):</span>
+            <span class="k">del</span> <span class="n">attrs</span><span class="p">[</span><span class="s1">&#39;target&#39;</span><span class="p">]</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;target: &#39;</span> <span class="o">+</span> <span class="n">target</span><span class="p">)</span>
+
+        <span class="c1"># find all keys without a value and convert all other values to strings</span>
+        <span class="n">empty_keys</span> <span class="o">=</span> <span class="p">[]</span>
+        <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">attrs</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
+            <span class="k">if</span> <span class="n">value</span> <span class="o">==</span> <span class="s1">&#39;&#39;</span><span class="p">:</span>
+                <span class="n">empty_keys</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">key</span><span class="p">))</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="n">attrs</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
+
+        <span class="c1"># delete all empty parameter from the dictionary</span>
+        <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">empty_keys</span><span class="p">:</span>
+            <span class="k">del</span> <span class="n">attrs</span><span class="p">[</span><span class="n">key</span><span class="p">]</span>
+
+        <span class="c1"># MARS request via Python script</span>
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">server</span><span class="p">:</span>
+            <span class="k">try</span><span class="p">:</span>
+                <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">public</span><span class="p">:</span>
+                    <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;RETRIEVE PUBLIC DATA!&#39;</span><span class="p">)</span>
+                    <span class="bp">self</span><span class="o">.</span><span class="n">server</span><span class="o">.</span><span class="n">retrieve</span><span class="p">(</span><span class="n">attrs</span><span class="p">)</span>
+                <span class="k">else</span><span class="p">:</span>
+                    <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;EXECUTE NON-PUBLIC RETRIEVAL!&#39;</span><span class="p">)</span>
+                    <span class="bp">self</span><span class="o">.</span><span class="n">server</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="n">attrs</span><span class="p">,</span> <span class="n">target</span><span class="p">)</span>
+            <span class="k">except</span><span class="p">:</span>
+                <span class="n">e</span> <span class="o">=</span> <span class="n">sys</span><span class="o">.</span><span class="n">exc_info</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;ERROR: &quot;</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;MARS Request failed!&#39;</span><span class="p">)</span>
+                <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">public</span> <span class="ow">and</span> <span class="n">os</span><span class="o">.</span><span class="n">stat</span><span class="p">(</span><span class="n">target</span><span class="p">)</span><span class="o">.</span><span class="n">st_size</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
+                    <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;MARS Request returned no data - &#39;</span>
+                          <span class="s1">&#39;please check request&#39;</span><span class="p">)</span>
+                    <span class="k">raise</span> <span class="ne">IOError</span>
+                <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">public</span> <span class="ow">and</span> <span class="n">os</span><span class="o">.</span><span class="n">stat</span><span class="p">(</span><span class="n">target</span><span class="p">)</span><span class="o">.</span><span class="n">st_size</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
+                    <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Public MARS Request returned no data - &#39;</span>
+                          <span class="s1">&#39;please check request&#39;</span><span class="p">)</span>
+                    <span class="k">raise</span> <span class="ne">IOError</span>
+                <span class="k">else</span><span class="p">:</span>
+                    <span class="k">raise</span> <span class="ne">IOError</span>
+        <span class="c1"># MARS request via extra process in shell</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">request_str</span> <span class="o">=</span> <span class="s1">&#39;ret&#39;</span>
+            <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">attrs</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
+                <span class="n">request_str</span> <span class="o">=</span> <span class="n">request_str</span> <span class="o">+</span> <span class="s1">&#39;,&#39;</span> <span class="o">+</span> <span class="n">key</span> <span class="o">+</span> <span class="s1">&#39;=&#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
+            <span class="n">request_str</span> <span class="o">+=</span> <span class="s1">&#39;,target=&quot;&#39;</span> <span class="o">+</span> <span class="n">target</span> <span class="o">+</span> <span class="s1">&#39;&quot;&#39;</span>
+            <span class="n">p</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">Popen</span><span class="p">([</span><span class="s1">&#39;mars&#39;</span><span class="p">],</span>
+                                 <span class="n">stdin</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span>
+                                 <span class="n">stdout</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span>
+                                 <span class="n">stderr</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span>
+                                 <span class="n">bufsize</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
+            <span class="n">pout</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">communicate</span><span class="p">(</span><span class="nb">input</span><span class="o">=</span><span class="n">request_str</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
+            <span class="nb">print</span><span class="p">(</span><span class="n">pout</span><span class="o">.</span><span class="n">decode</span><span class="p">())</span>
+
+            <span class="k">if</span> <span class="s1">&#39;Some errors reported&#39;</span> <span class="ow">in</span> <span class="n">pout</span><span class="o">.</span><span class="n">decode</span><span class="p">():</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;MARS Request failed - please check request&#39;</span><span class="p">)</span>
+                <span class="k">raise</span> <span class="ne">IOError</span>
+            <span class="k">elif</span> <span class="n">os</span><span class="o">.</span><span class="n">stat</span><span class="p">(</span><span class="n">target</span><span class="p">)</span><span class="o">.</span><span class="n">st_size</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;MARS Request returned no data - please check request&#39;</span><span class="p">)</span>
+                <span class="k">raise</span> <span class="ne">IOError</span>
+
+        <span class="k">return</span></div></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/_modules/UioFiles.html
===================================================================
--- documentation/Sphinx/build/html/_modules/UioFiles.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_modules/UioFiles.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,362 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>UioFiles &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="index.html">Module code</a> &raquo;</li>
+        
+      <li>UioFiles</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for UioFiles</h1><div class="highlight"><pre>
+<span></span><span class="ch">#!/usr/bin/env python</span>
+<span class="c1"># -*- coding: utf-8 -*-</span>
+<span class="c1">#*******************************************************************************</span>
+<span class="c1"># @Author: Anne Fouilloux (University of Oslo)</span>
+<span class="c1">#</span>
+<span class="c1"># @Date: October 2014</span>
+<span class="c1">#</span>
+<span class="c1"># @Change History:</span>
+<span class="c1">#</span>
+<span class="c1">#    November 2015 - Leopold Haimberger (University of Vienna):</span>
+<span class="c1">#        - modified method list_files to work with glob instead of listdir</span>
+<span class="c1">#        - added pattern search in method list_files</span>
+<span class="c1">#</span>
+<span class="c1">#    February 2018 - Anne Philipp (University of Vienna):</span>
+<span class="c1">#        - applied PEP8 style guide</span>
+<span class="c1">#        - added documentation</span>
+<span class="c1">#        - optimisation of method list_files since it didn&#39;t work correctly</span>
+<span class="c1">#          for sub directories</span>
+<span class="c1">#        - additional speed up of method list_files</span>
+<span class="c1">#        - modified the class so that it is initiated with a pattern instead</span>
+<span class="c1">#          of suffixes. Gives more precision in selection of files.</span>
+<span class="c1">#</span>
+<span class="c1"># @License:</span>
+<span class="c1">#    (C) Copyright 2014-2018.</span>
+<span class="c1">#</span>
+<span class="c1">#    This software is licensed under the terms of the Apache Licence Version 2.0</span>
+<span class="c1">#    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Decription:</span>
+<span class="c1">#    The class is for file manipulation. It is initiated with a regular</span>
+<span class="c1">#    expression pattern for this instance and can produce a list of Files</span>
+<span class="c1">#    from the given file pattern. These files can be deleted.</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Content:</span>
+<span class="c1">#    - __init__</span>
+<span class="c1">#    - __str__</span>
+<span class="c1">#    - __list_files__</span>
+<span class="c1">#    - delete_files</span>
+<span class="c1">#</span>
+<span class="c1"># @Class Attributes:</span>
+<span class="c1">#    - pattern</span>
+<span class="c1">#    - files</span>
+<span class="c1">#</span>
+<span class="c1">#*******************************************************************************</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># MODULES</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">import</span> <span class="nn">sys</span>
+<span class="kn">import</span> <span class="nn">fnmatch</span>
+
+<span class="c1"># software specific module from flex_extract</span>
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../&#39;</span><span class="p">)</span>
+<span class="c1">#import profiling</span>
+<span class="kn">from</span> <span class="nn">mods.tools</span> <span class="k">import</span> <span class="n">silent_remove</span><span class="p">,</span> <span class="n">get_list_as_string</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># CLASS</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+
+<div class="viewcode-block" id="UioFiles"><a class="viewcode-back" href="../api.html#UioFiles.UioFiles">[docs]</a><span class="k">class</span> <span class="nc">UioFiles</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Class to manipulate files. At initialisation it has the pattern</span>
+<span class="sd">    which stores a regular expression pattern for the files, the path</span>
+<span class="sd">    to the files and the files already.</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="c1"># --------------------------------------------------------------------------</span>
+    <span class="c1"># CLASS FUNCTIONS</span>
+    <span class="c1"># --------------------------------------------------------------------------</span>
+    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">path</span><span class="p">,</span> <span class="n">pattern</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Assignes a specific pattern for these files.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        path : :obj:`string`</span>
+<span class="sd">            Directory where to list the files.</span>
+
+<span class="sd">        pattern : :obj:`string`</span>
+<span class="sd">            Regular expression pattern. For example: &#39;\*.grb&#39;</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">path</span> <span class="o">=</span> <span class="n">path</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">pattern</span> <span class="o">=</span> <span class="n">pattern</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">files</span> <span class="o">=</span> <span class="p">[]</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">__list_files__</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">path</span><span class="p">)</span>
+
+        <span class="k">return</span>
+
+    <span class="c1">#@profiling.timefn</span>
+    <span class="k">def</span> <span class="nf">__list_files__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">path</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Lists all files in the directory with the matching</span>
+<span class="sd">        regular expression pattern.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+<span class="sd">        path : :obj:`string`</span>
+<span class="sd">            Path to the files.</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="c1"># Get the absolute path</span>
+        <span class="n">path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
+
+        <span class="c1"># get all files in the dir and subdir as absolut path</span>
+        <span class="k">for</span> <span class="n">root</span><span class="p">,</span> <span class="n">dirnames</span><span class="p">,</span> <span class="n">filenames</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">walk</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>
+            <span class="k">for</span> <span class="n">filename</span> <span class="ow">in</span> <span class="n">fnmatch</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">filenames</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">pattern</span><span class="p">):</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">files</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">root</span><span class="p">,</span> <span class="n">filename</span><span class="p">))</span>
+
+        <span class="k">return</span>
+
+    <span class="k">def</span> <span class="nf">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Converts the list of files into a single string.</span>
+<span class="sd">        The entries are sepereated by &quot;,&quot; sign.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+<span class="sd">        files_string : :obj:`string`</span>
+<span class="sd">            The content of the list as a single string.</span>
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="n">filenames</span> <span class="o">=</span> <span class="p">[</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">f</span><span class="p">)</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">files</span><span class="p">]</span>
+        <span class="n">files_string</span> <span class="o">=</span> <span class="n">get_list_as_string</span><span class="p">(</span><span class="n">filenames</span><span class="p">,</span> <span class="n">concatenate_sign</span><span class="o">=</span><span class="s1">&#39;, &#39;</span><span class="p">)</span>
+
+        <span class="k">return</span> <span class="n">files_string</span>
+
+<div class="viewcode-block" id="UioFiles.delete_files"><a class="viewcode-back" href="../api.html#UioFiles.UioFiles.delete_files">[docs]</a>    <span class="k">def</span> <span class="nf">delete_files</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Deletes the files.</span>
+
+<span class="sd">        Parameters</span>
+<span class="sd">        ----------</span>
+
+<span class="sd">        Return</span>
+<span class="sd">        ------</span>
+
+<span class="sd">        &#39;&#39;&#39;</span>
+
+        <span class="k">for</span> <span class="n">old_file</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">files</span><span class="p">:</span>
+            <span class="n">silent_remove</span><span class="p">(</span><span class="n">old_file</span><span class="p">)</span>
+
+        <span class="k">return</span></div></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/_modules/get_mars_data.html
===================================================================
--- documentation/Sphinx/build/html/_modules/get_mars_data.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_modules/get_mars_data.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,478 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>get_mars_data &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="index.html">Module code</a> &raquo;</li>
+        
+      <li>get_mars_data</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for get_mars_data</h1><div class="highlight"><pre>
+<span></span><span class="ch">#!/usr/bin/env python</span>
+<span class="c1"># -*- coding: utf-8 -*-</span>
+<span class="c1">#*******************************************************************************</span>
+<span class="c1"># @Author: Anne Fouilloux (University of Oslo)</span>
+<span class="c1">#</span>
+<span class="c1"># @Date: October 2014</span>
+<span class="c1">#</span>
+<span class="c1"># @Change History:</span>
+<span class="c1">#</span>
+<span class="c1">#    November 2015 - Leopold Haimberger (University of Vienna):</span>
+<span class="c1">#        - moved the getEIdata program into a function &quot;get_mars_data&quot;</span>
+<span class="c1">#        - moved the AgurmentParser into a seperate function</span>
+<span class="c1">#        - adatpted the function for the use in flex_extract</span>
+<span class="c1">#        - renamed file to get_mars_data</span>
+<span class="c1">#</span>
+<span class="c1">#    February 2018 - Anne Philipp (University of Vienna):</span>
+<span class="c1">#        - applied PEP8 style guide</span>
+<span class="c1">#        - added structured documentation</span>
+<span class="c1">#        - minor changes in programming style for consistence</span>
+<span class="c1">#        - added function main and moved function calls vom __main__ there</span>
+<span class="c1">#          (necessary for better documentation with docstrings for later</span>
+<span class="c1">#          online documentation)</span>
+<span class="c1">#        - use of UIFiles class for file selection and deletion</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="c1"># @License:</span>
+<span class="c1">#    (C) Copyright 2014-2018.</span>
+<span class="c1">#</span>
+<span class="c1">#    This software is licensed under the terms of the Apache Licence Version 2.0</span>
+<span class="c1">#    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.</span>
+<span class="c1">#</span>
+<span class="c1"># @Program Functionality:</span>
+<span class="c1">#    This program can be used as a module in the whole flex_extract process</span>
+<span class="c1">#    or can be run by itself to just extract MARS data from ECMWF. To do so,</span>
+<span class="c1">#    a couple of necessary parameters has to be passed with the program call.</span>
+<span class="c1">#    See documentation for more details.</span>
+<span class="c1">#</span>
+<span class="c1"># @Program Content:</span>
+<span class="c1">#    - main</span>
+<span class="c1">#    - get_mars_data</span>
+<span class="c1">#    - do_retrievement</span>
+<span class="c1">#</span>
+<span class="c1">#*******************************************************************************</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># MODULES</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">import</span> <span class="nn">sys</span>
+<span class="kn">import</span> <span class="nn">inspect</span>
+<span class="kn">from</span> <span class="nn">datetime</span> <span class="k">import</span> <span class="n">datetime</span><span class="p">,</span> <span class="n">timedelta</span>
+
+<span class="c1"># software specific classes and modules from flex_extract</span>
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span>
+    <span class="n">inspect</span><span class="o">.</span><span class="n">getfile</span><span class="p">(</span><span class="n">inspect</span><span class="o">.</span><span class="n">currentframe</span><span class="p">())))</span> <span class="o">+</span> <span class="s1">&#39;/../&#39;</span><span class="p">)</span>
+<span class="kn">import</span> <span class="nn">_config</span>
+<span class="kn">from</span> <span class="nn">tools</span> <span class="k">import</span> <span class="p">(</span><span class="n">my_error</span><span class="p">,</span> <span class="n">normal_exit</span><span class="p">,</span> <span class="n">get_cmdline_arguments</span><span class="p">,</span>
+                   <span class="n">read_ecenv</span><span class="p">,</span> <span class="n">make_dir</span><span class="p">)</span>
+<span class="kn">from</span> <span class="nn">classes.EcFlexpart</span> <span class="k">import</span> <span class="n">EcFlexpart</span>
+<span class="kn">from</span> <span class="nn">classes.UioFiles</span> <span class="k">import</span> <span class="n">UioFiles</span>
+
+<span class="k">try</span><span class="p">:</span>
+    <span class="n">ecapi</span> <span class="o">=</span> <span class="kc">True</span>
+    <span class="kn">import</span> <span class="nn">ecmwfapi</span>
+<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
+    <span class="n">ecapi</span> <span class="o">=</span> <span class="kc">False</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># FUNCTION</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<div class="viewcode-block" id="main"><a class="viewcode-back" href="../api.html#get_mars_data.main">[docs]</a><span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
+    <span class="sd">&#39;&#39;&#39;Controls the program to get data out of mars.</span>
+
+<span class="sd">    This is done if it is called directly from command line.</span>
+<span class="sd">    Then it also takes program call arguments and control file input.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="n">args</span> <span class="o">=</span> <span class="n">get_cmdline_arguments</span><span class="p">()</span>
+    <span class="n">c</span> <span class="o">=</span> <span class="n">ControlFile</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">controlfile</span><span class="p">)</span>
+
+    <span class="n">env_parameter</span> <span class="o">=</span> <span class="n">read_ecenv</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_ECMWF_ENV</span><span class="p">)</span>
+    <span class="n">c</span><span class="o">.</span><span class="n">assign_args_to_control</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
+    <span class="n">c</span><span class="o">.</span><span class="n">assign_envs_to_control</span><span class="p">(</span><span class="n">env_parameter</span><span class="p">)</span>
+    <span class="n">c</span><span class="o">.</span><span class="n">check_conditions</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">queue</span><span class="p">)</span>
+
+    <span class="n">get_mars_data</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
+    <span class="n">normal_exit</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">mailfail</span><span class="p">,</span> <span class="s1">&#39;Done!&#39;</span><span class="p">)</span>
+
+    <span class="k">return</span></div>
+
+<div class="viewcode-block" id="get_mars_data"><a class="viewcode-back" href="../api.html#get_mars_data.get_mars_data">[docs]</a><span class="k">def</span> <span class="nf">get_mars_data</span><span class="p">(</span><span class="n">c</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Retrieves the EC data needed for a FLEXPART simulation.</span>
+
+<span class="sd">    Start and end dates for retrieval period is set. Retrievals</span>
+<span class="sd">    are divided into smaller periods if necessary and datechunk parameter</span>
+<span class="sd">    is set.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    c : :obj:`ControlFile`</span>
+<span class="sd">        Contains all the parameters of CONTROL file and</span>
+<span class="sd">        command line.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">):</span>
+        <span class="n">make_dir</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">)</span>
+
+    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">request</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">or</span> <span class="n">c</span><span class="o">.</span><span class="n">request</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Retrieving EC data!&quot;</span><span class="p">)</span>
+    <span class="k">elif</span> <span class="n">c</span><span class="o">.</span><span class="n">request</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Printing mars requests!&quot;</span><span class="p">)</span>
+
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;start date </span><span class="si">%s</span><span class="s2"> &quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">start_date</span><span class="p">))</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;end date </span><span class="si">%s</span><span class="s2"> &quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">end_date</span><span class="p">))</span>
+
+    <span class="k">if</span> <span class="n">ecapi</span><span class="p">:</span>
+        <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">public</span><span class="p">:</span>
+            <span class="n">server</span> <span class="o">=</span> <span class="n">ecmwfapi</span><span class="o">.</span><span class="n">ECMWFDataServer</span><span class="p">()</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">server</span> <span class="o">=</span> <span class="n">ecmwfapi</span><span class="o">.</span><span class="n">ECMWFService</span><span class="p">(</span><span class="s2">&quot;mars&quot;</span><span class="p">)</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="n">server</span> <span class="o">=</span> <span class="kc">False</span>
+
+    <span class="n">c</span><span class="o">.</span><span class="n">ecapi</span> <span class="o">=</span> <span class="n">ecapi</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Using ECMWF WebAPI: &#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">ecapi</span><span class="p">))</span>
+
+    <span class="c1"># basetime geht rückwärts</span>
+
+    <span class="c1"># if basetime 00</span>
+    <span class="c1"># dann wird von 12 am vortag bis 00 am start tag geholt</span>
+    <span class="c1"># aber ohne 12 selbst sondern 12 + step</span>
+
+    <span class="c1"># if basetime 12</span>
+    <span class="c1"># dann wird von 00 + step bis 12 am start tag geholt</span>
+
+    <span class="c1"># purer forecast wird vorwärts bestimmt.</span>
+    <span class="c1"># purer forecast mode ist dann wenn  größer 24 stunden</span>
+    <span class="c1"># wie kann das noch festgestellt werden ????</span>
+    <span class="c1"># nur FC und steps mehr als 24 ?</span>
+    <span class="c1"># die einzige problematik beim reinen forecast ist die benennung der files!</span>
+    <span class="c1"># also sobald es Tagesüberschneidungen gibt</span>
+    <span class="c1"># allerdings ist das relevant und ersichtlich an den NICHT FLUSS DATEN</span>
+
+    <span class="n">start</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strptime</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">start_date</span><span class="p">,</span> <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">&#39;</span><span class="p">)</span>
+    <span class="n">end</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strptime</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">end_date</span><span class="p">,</span> <span class="s1">&#39;%Y%m</span><span class="si">%d</span><span class="s1">&#39;</span><span class="p">)</span>
+    <span class="c1"># time period for one single retrieval</span>
+    <span class="n">datechunk</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">days</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">date_chunk</span><span class="p">))</span>
+
+    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">basetime</span> <span class="o">==</span> <span class="s1">&#39;00&#39;</span><span class="p">:</span>
+        <span class="n">start</span> <span class="o">=</span> <span class="n">start</span> <span class="o">-</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">days</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
+
+    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">&lt;=</span> <span class="mi">24</span><span class="p">:</span>
+        <span class="n">startm1</span> <span class="o">=</span> <span class="n">start</span> <span class="o">-</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">days</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
+
+    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">basetime</span> <span class="o">==</span> <span class="s1">&#39;00&#39;</span> <span class="ow">or</span> <span class="n">c</span><span class="o">.</span><span class="n">basetime</span> <span class="o">==</span> <span class="s1">&#39;12&#39;</span><span class="p">:</span>
+        <span class="c1"># endp1 = end + timedelta(days=1)</span>
+        <span class="n">endp1</span> <span class="o">=</span> <span class="n">end</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="c1"># endp1 = end + timedelta(days=2)</span>
+        <span class="n">endp1</span> <span class="o">=</span> <span class="n">end</span> <span class="o">+</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">days</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
+
+    <span class="c1"># --------------  flux data ------------------------------------------------</span>
+    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">request</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">or</span> <span class="n">c</span><span class="o">.</span><span class="n">request</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;... removing old flux content of &#39;</span> <span class="o">+</span> <span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">)</span>
+        <span class="n">tobecleaned</span> <span class="o">=</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span>
+                               <span class="s1">&#39;*_acc_*.&#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">getppid</span><span class="p">())</span> <span class="o">+</span> <span class="s1">&#39;.*.grb&#39;</span><span class="p">)</span>
+        <span class="n">tobecleaned</span><span class="o">.</span><span class="n">delete_files</span><span class="p">()</span>
+
+    <span class="c1"># if forecast for maximum one day (upto 24h) are to be retrieved,</span>
+    <span class="c1"># collect accumulation data (flux data)</span>
+    <span class="c1"># with additional days in the beginning and at the end</span>
+    <span class="c1"># (used for complete disaggregation of original period)</span>
+    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">&lt;=</span> <span class="mi">24</span><span class="p">:</span>
+        <span class="n">do_retrievement</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">server</span><span class="p">,</span> <span class="n">startm1</span><span class="p">,</span> <span class="n">endp1</span><span class="p">,</span> <span class="n">datechunk</span><span class="p">,</span> <span class="n">fluxes</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+
+    <span class="c1"># if forecast data longer than 24h are to be retrieved,</span>
+    <span class="c1"># collect accumulation data (flux data)</span>
+    <span class="c1"># with the exact start and end date</span>
+    <span class="c1"># (disaggregation will be done for the</span>
+    <span class="c1"># exact time period with boundary conditions)</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="n">do_retrievement</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">server</span><span class="p">,</span> <span class="n">start</span><span class="p">,</span> <span class="n">end</span><span class="p">,</span> <span class="n">datechunk</span><span class="p">,</span> <span class="n">fluxes</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+
+    <span class="c1"># --------------  non flux data --------------------------------------------</span>
+    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">request</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">or</span> <span class="n">c</span><span class="o">.</span><span class="n">request</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;... removing old non flux content of &#39;</span> <span class="o">+</span> <span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">)</span>
+        <span class="n">tobecleaned</span> <span class="o">=</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span>
+                               <span class="s1">&#39;*__*.&#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">getppid</span><span class="p">())</span> <span class="o">+</span> <span class="s1">&#39;.*.grb&#39;</span><span class="p">)</span>
+        <span class="n">tobecleaned</span><span class="o">.</span><span class="n">delete_files</span><span class="p">()</span>
+
+    <span class="n">do_retrievement</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">server</span><span class="p">,</span> <span class="n">start</span><span class="p">,</span> <span class="n">end</span><span class="p">,</span> <span class="n">datechunk</span><span class="p">,</span> <span class="n">fluxes</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
+
+    <span class="k">return</span></div>
+
+<div class="viewcode-block" id="do_retrievement"><a class="viewcode-back" href="../api.html#get_mars_data.do_retrievement">[docs]</a><span class="k">def</span> <span class="nf">do_retrievement</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">server</span><span class="p">,</span> <span class="n">start</span><span class="p">,</span> <span class="n">end</span><span class="p">,</span> <span class="n">delta_t</span><span class="p">,</span> <span class="n">fluxes</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Divides the complete retrieval period in smaller chunks and</span>
+<span class="sd">    retrieves the data from MARS.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    c : :obj:`ControlFile`</span>
+<span class="sd">        Contains all the parameters of CONTROL file and</span>
+<span class="sd">        command line.</span>
+
+<span class="sd">    server : :obj:`ECMWFService`</span>
+<span class="sd">            The server connection to ECMWF.</span>
+
+<span class="sd">    start : :obj:`datetime`</span>
+<span class="sd">        The start date of the retrieval.</span>
+
+<span class="sd">    end : :obj:`datetime`</span>
+<span class="sd">        The end date of the retrieval.</span>
+
+<span class="sd">    delta_t : :obj:`datetime`</span>
+<span class="sd">        Delta_t + 1 is the maximal time period of a single</span>
+<span class="sd">        retrieval.</span>
+
+<span class="sd">    fluxes : :obj:`boolean`, optional</span>
+<span class="sd">        Decides if the flux parameters are to be retrieved or</span>
+<span class="sd">        the rest of the parameter list.</span>
+<span class="sd">        Default value is False.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="c1"># since actual day also counts as one day,</span>
+    <span class="c1"># we only need to add datechunk - 1 days to retrieval</span>
+    <span class="c1"># for a period</span>
+    <span class="n">delta_t_m1</span> <span class="o">=</span> <span class="n">delta_t</span> <span class="o">-</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">days</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
+
+    <span class="n">day</span> <span class="o">=</span> <span class="n">start</span>
+    <span class="k">while</span> <span class="n">day</span> <span class="o">&lt;=</span> <span class="n">end</span><span class="p">:</span>
+        <span class="n">flexpart</span> <span class="o">=</span> <span class="n">EcFlexpart</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">fluxes</span><span class="p">)</span>
+        <span class="n">tmpday</span> <span class="o">=</span> <span class="n">day</span> <span class="o">+</span> <span class="n">delta_t_m1</span>
+        <span class="k">if</span> <span class="n">tmpday</span> <span class="o">&lt;</span> <span class="n">end</span><span class="p">:</span>
+            <span class="n">dates</span> <span class="o">=</span> <span class="n">day</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&quot;%Y%m</span><span class="si">%d</span><span class="s2">&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;/to/&quot;</span> <span class="o">+</span> \
+                    <span class="n">tmpday</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&quot;%Y%m</span><span class="si">%d</span><span class="s2">&quot;</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">dates</span> <span class="o">=</span> <span class="n">day</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&quot;%Y%m</span><span class="si">%d</span><span class="s2">&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;/to/&quot;</span> <span class="o">+</span> \
+                    <span class="n">end</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&quot;%Y%m</span><span class="si">%d</span><span class="s2">&quot;</span><span class="p">)</span>
+
+        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;... retrieve &quot;</span> <span class="o">+</span> <span class="n">dates</span> <span class="o">+</span> <span class="s2">&quot; in dir &quot;</span> <span class="o">+</span> <span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">)</span>
+
+        <span class="k">try</span><span class="p">:</span>
+            <span class="n">flexpart</span><span class="o">.</span><span class="n">retrieve</span><span class="p">(</span><span class="n">server</span><span class="p">,</span> <span class="n">dates</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">public</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">request</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">)</span>
+        <span class="k">except</span> <span class="ne">IOError</span><span class="p">:</span>
+            <span class="n">my_error</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">mailfail</span><span class="p">,</span> <span class="s1">&#39;MARS request failed&#39;</span><span class="p">)</span>
+
+        <span class="n">day</span> <span class="o">+=</span> <span class="n">delta_t</span>
+
+    <span class="k">return</span></div>
+
+<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
+    <span class="n">main</span><span class="p">()</span>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/_modules/index.html
===================================================================
--- documentation/Sphinx/build/html/_modules/index.html	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/_modules/index.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -150,5 +150,14 @@
             
   <h1>All modules for which code is available</h1>
-<ul><li><a href="disaggregation.html">disaggregation</a></li>
+<ul><li><a href="ControlFile.html">ControlFile</a></li>
+<li><a href="EcFlexpart.html">EcFlexpart</a></li>
+<li><a href="GribTools.html">GribTools</a></li>
+<li><a href="MarsRetrieval.html">MarsRetrieval</a></li>
+<li><a href="UioFiles.html">UioFiles</a></li>
+<li><a href="disaggregation.html">disaggregation</a></li>
+<li><a href="get_mars_data.html">get_mars_data</a></li>
+<li><a href="install.html">install</a></li>
+<li><a href="prepare_flexpart.html">prepare_flexpart</a></li>
+<li><a href="submit.html">submit</a></li>
 <li><a href="tools.html">tools</a></li>
 </ul>
Index: documentation/Sphinx/build/html/_modules/install.html
===================================================================
--- documentation/Sphinx/build/html/_modules/install.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_modules/install.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,746 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>install &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="index.html">Module code</a> &raquo;</li>
+        
+      <li>install</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for install</h1><div class="highlight"><pre>
+<span></span><span class="ch">#!/usr/bin/env python</span>
+<span class="c1"># -*- coding: utf-8 -*-</span>
+<span class="c1">#*******************************************************************************</span>
+<span class="c1"># @Author: Leopold Haimberger (University of Vienna)</span>
+<span class="c1">#</span>
+<span class="c1"># @Date: November 2015</span>
+<span class="c1">#</span>
+<span class="c1"># @Change History:</span>
+<span class="c1">#</span>
+<span class="c1">#    February 2018 - Anne Philipp (University of Vienna):</span>
+<span class="c1">#        - applied PEP8 style guide</span>
+<span class="c1">#        - added documentation</span>
+<span class="c1">#        - moved install_args_and_control in here</span>
+<span class="c1">#        - splitted code in smaller functions</span>
+<span class="c1">#        - delete convert build files in here instead of compile job script</span>
+<span class="c1">#        - changed static path names to Variables from config file</span>
+<span class="c1">#</span>
+<span class="c1"># @License:</span>
+<span class="c1">#    (C) Copyright 2015-2018.</span>
+<span class="c1">#</span>
+<span class="c1">#    This software is licensed under the terms of the Apache Licence Version 2.0</span>
+<span class="c1">#    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.</span>
+<span class="c1">#</span>
+<span class="c1"># @Program Functionality:</span>
+<span class="c1">#    Depending on the selected installation environment (locally or on the</span>
+<span class="c1">#    ECMWF server ecgate or cca) the program extracts the commandline</span>
+<span class="c1">#    arguments and the CONTROL file parameter and prepares the corresponding</span>
+<span class="c1">#    environment. The necessary files are collected in a tar-ball and placed</span>
+<span class="c1">#    at the target location. There its untared, the environment variables will</span>
+<span class="c1">#    be set and the Fortran code will be compiled. If the ECMWF environment is</span>
+<span class="c1">#    selected a job script is prepared and submitted for the remaining</span>
+<span class="c1">#    configurations after putting the tar-ball to the target ECMWF server.</span>
+<span class="c1">#</span>
+<span class="c1"># @Program Content:</span>
+<span class="c1">#    - main</span>
+<span class="c1">#    - get_install_cmdline_arguments</span>
+<span class="c1">#    - install_via_gateway</span>
+<span class="c1">#    - mk_tarball</span>
+<span class="c1">#    - un_tarball</span>
+<span class="c1">#    - mk_env_vars</span>
+<span class="c1">#    - mk_compilejob</span>
+<span class="c1">#    - mk_job_template</span>
+<span class="c1">#    - delete_convert_build</span>
+<span class="c1">#    - make_convert_build</span>
+<span class="c1">#</span>
+<span class="c1">#*******************************************************************************</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># MODULES</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">import</span> <span class="nn">sys</span>
+<span class="kn">import</span> <span class="nn">glob</span>
+<span class="kn">import</span> <span class="nn">subprocess</span>
+<span class="kn">import</span> <span class="nn">inspect</span>
+<span class="kn">from</span> <span class="nn">argparse</span> <span class="k">import</span> <span class="n">ArgumentParser</span><span class="p">,</span> <span class="n">ArgumentDefaultsHelpFormatter</span>
+
+<span class="c1"># software specific classes and modules from flex_extract</span>
+<span class="kn">import</span> <span class="nn">_config</span>
+<span class="kn">from</span> <span class="nn">classes.ControlFile</span> <span class="k">import</span> <span class="n">ControlFile</span>
+<span class="kn">from</span> <span class="nn">classes.UioFiles</span> <span class="k">import</span> <span class="n">UioFiles</span>
+<span class="kn">from</span> <span class="nn">mods.tools</span> <span class="k">import</span> <span class="n">make_dir</span><span class="p">,</span> <span class="n">put_file_to_ecserver</span><span class="p">,</span> <span class="n">submit_job_to_ecserver</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># FUNCTIONS</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<div class="viewcode-block" id="main"><a class="viewcode-back" href="../api.html#install.main">[docs]</a><span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
+    <span class="sd">&#39;&#39;&#39;Controls the installation process. Calls the installation function</span>
+<span class="sd">    if target is specified.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="n">args</span> <span class="o">=</span> <span class="n">get_install_cmdline_arguments</span><span class="p">()</span>
+    <span class="n">c</span> <span class="o">=</span> <span class="n">ControlFile</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">controlfile</span><span class="p">)</span>
+    <span class="n">c</span><span class="o">.</span><span class="n">assign_args_to_control</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
+    <span class="n">c</span><span class="o">.</span><span class="n">check_install_conditions</span><span class="p">()</span>
+
+    <span class="n">install_via_gateway</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
+
+    <span class="k">return</span></div>
+
+<div class="viewcode-block" id="get_install_cmdline_arguments"><a class="viewcode-back" href="../api.html#install.get_install_cmdline_arguments">[docs]</a><span class="k">def</span> <span class="nf">get_install_cmdline_arguments</span><span class="p">():</span>
+    <span class="sd">&#39;&#39;&#39;Decomposes the command line arguments and assigns them to variables.</span>
+<span class="sd">    Apply default values for non mentioned arguments.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+<span class="sd">    args : :obj:`Namespace`</span>
+<span class="sd">        Contains the commandline arguments from script/program call.</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">parser</span> <span class="o">=</span> <span class="n">ArgumentParser</span><span class="p">(</span><span class="n">description</span><span class="o">=</span><span class="s1">&#39;Install flex_extract software locally or </span><span class="se">\</span>
+<span class="s1">                            on ECMWF machines&#39;</span><span class="p">,</span>
+                            <span class="n">formatter_class</span><span class="o">=</span><span class="n">ArgumentDefaultsHelpFormatter</span><span class="p">)</span>
+
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s1">&#39;--target&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s1">&#39;install_target&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s2">&quot;Valid targets: local | ecgate | cca , </span><span class="se">\</span>
+<span class="s2">                        the latter two are at ECMWF&quot;</span><span class="p">)</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--makefile&quot;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s2">&quot;makefile&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s1">&#39;Name of Makefile to use for compiling CONVERT2&#39;</span><span class="p">)</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--ecuid&quot;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s2">&quot;ecuid&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s1">&#39;user id at ECMWF&#39;</span><span class="p">)</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--ecgid&quot;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s2">&quot;ecgid&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s1">&#39;group id at ECMWF&#39;</span><span class="p">)</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--gateway&quot;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s2">&quot;gateway&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s1">&#39;name of local gateway server&#39;</span><span class="p">)</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--destination&quot;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s2">&quot;destination&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s1">&#39;ecaccess destination, e.g. leo@genericSftp&#39;</span><span class="p">)</span>
+
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--flexpart_root_scripts&quot;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s2">&quot;flexpart_root_scripts&quot;</span><span class="p">,</span>
+                        <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s2">&quot;FLEXPART root directory on ECMWF </span><span class="se">\</span>
+<span class="s2">                        servers (to find grib2flexpart and COMMAND file)</span><span class="se">\n\</span>
+<span class="s2">                        Normally flex_extract resides in the scripts directory </span><span class="se">\</span>
+<span class="s2">                        of the FLEXPART distribution.&quot;</span><span class="p">)</span>
+
+    <span class="c1"># arguments for job submission to ECMWF, only needed by submit.py</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--job_template&quot;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s1">&#39;job_template&#39;</span><span class="p">,</span>
+                        <span class="n">default</span><span class="o">=</span><span class="s2">&quot;job.temp.o&quot;</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s2">&quot;job template file for submission to ECMWF&quot;</span><span class="p">)</span>
+
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--controlfile&quot;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s2">&quot;controlfile&quot;</span><span class="p">,</span>
+                        <span class="n">default</span><span class="o">=</span><span class="s1">&#39;CONTROL.temp&#39;</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s2">&quot;file with CONTROL parameters&quot;</span><span class="p">)</span>
+
+    <span class="n">args</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">()</span>
+
+    <span class="k">return</span> <span class="n">args</span></div>
+
+
+<div class="viewcode-block" id="install_via_gateway"><a class="viewcode-back" href="../api.html#install.install_via_gateway">[docs]</a><span class="k">def</span> <span class="nf">install_via_gateway</span><span class="p">(</span><span class="n">c</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Perform the actual installation on local machine or prepare data</span>
+<span class="sd">    transfer to remote gate and submit a job script which will</span>
+<span class="sd">    install everything on the remote gate.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    c : :obj:`ControlFile`</span>
+<span class="sd">        Contains all the parameters of CONTROL file and</span>
+<span class="sd">        command line.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="kn">import</span> <span class="nn">tarfile</span>
+
+    <span class="n">ecd</span> <span class="o">=</span> <span class="n">_config</span><span class="o">.</span><span class="n">PATH_FLEXEXTRACT_DIR</span>
+    <span class="n">tarball_name</span> <span class="o">=</span> <span class="n">_config</span><span class="o">.</span><span class="n">FLEXEXTRACT_DIRNAME</span> <span class="o">+</span> <span class="s1">&#39;.tar&#39;</span>
+    <span class="n">tar_file</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">ecd</span><span class="p">,</span> <span class="n">tarball_name</span><span class="p">)</span>
+
+    <span class="n">target_dirname</span> <span class="o">=</span> <span class="n">_config</span><span class="o">.</span><span class="n">FLEXEXTRACT_DIRNAME</span>
+    <span class="n">fortran_executable</span> <span class="o">=</span> <span class="n">_config</span><span class="o">.</span><span class="n">FORTRAN_EXECUTABLE</span>
+
+    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">install_target</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">!=</span> <span class="s1">&#39;local&#39;</span><span class="p">:</span> <span class="c1"># ecgate or cca</span>
+
+        <span class="n">mk_compilejob</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">makefile</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">install_target</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">ecuid</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">ecgid</span><span class="p">,</span>
+                      <span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">)</span>
+
+        <span class="n">mk_job_template</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">ecuid</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">ecgid</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">gateway</span><span class="p">,</span>
+                        <span class="n">c</span><span class="o">.</span><span class="n">destination</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">)</span>
+
+        <span class="n">mk_env_vars</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">ecuid</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">ecgid</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">gateway</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">destination</span><span class="p">)</span>
+
+        <span class="n">mk_tarball</span><span class="p">(</span><span class="n">tar_file</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">install_target</span><span class="p">)</span>
+
+        <span class="n">put_file_to_ecserver</span><span class="p">(</span><span class="n">ecd</span><span class="p">,</span> <span class="n">tarball_name</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">install_target</span><span class="p">,</span>
+                             <span class="n">c</span><span class="o">.</span><span class="n">ecuid</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">ecgid</span><span class="p">)</span>
+
+        <span class="n">submit_job_to_ecserver</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">install_target</span><span class="p">,</span>
+                               <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_REL_JOBSCRIPTS</span><span class="p">,</span>
+                                            <span class="n">_config</span><span class="o">.</span><span class="n">FILE_INSTALL_COMPILEJOB</span><span class="p">))</span>
+
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;job compilation script has been submitted to ecgate for &#39;</span> <span class="o">+</span>
+              <span class="s1">&#39;installation in &#39;</span> <span class="o">+</span> <span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span> <span class="o">+</span>
+               <span class="s1">&#39;/&#39;</span> <span class="o">+</span> <span class="n">target_dirname</span><span class="p">)</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;You should get an email with subject &quot;flexcompile&quot; within &#39;</span> <span class="o">+</span>
+              <span class="s1">&#39;the next few minutes!&#39;</span><span class="p">)</span>
+
+    <span class="k">else</span><span class="p">:</span> <span class="c1">#local</span>
+        <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span> <span class="o">==</span> <span class="n">_config</span><span class="o">.</span><span class="n">PATH_FLEXEXTRACT_DIR</span> <span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;WARNING: FLEXPART_ROOT_SCRIPTS has not been specified&#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;flex_extract will be installed in here by compiling the &#39;</span> <span class="o">+</span>
+                  <span class="s1">&#39;Fortran source in &#39;</span> <span class="o">+</span> <span class="n">_config</span><span class="o">.</span><span class="n">PATH_FORTRAN_SRC</span><span class="p">)</span>
+            <span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_FORTRAN_SRC</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span> <span class="c1"># creates the target working directory for flex_extract</span>
+            <span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expandvars</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expanduser</span><span class="p">(</span>
+                                        <span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">))</span>
+            <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">ecd</span><span class="p">)</span> <span class="o">!=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">):</span>
+                <span class="n">mk_tarball</span><span class="p">(</span><span class="n">tar_file</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">install_target</span><span class="p">)</span>
+                <span class="n">make_dir</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">,</span>
+                                      <span class="n">target_dirname</span><span class="p">))</span>
+                <span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">,</span>
+                                      <span class="n">target_dirname</span><span class="p">))</span>
+                <span class="n">un_tarball</span><span class="p">(</span><span class="n">tar_file</span><span class="p">)</span>
+                <span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">,</span>
+                                      <span class="n">target_dirname</span><span class="p">,</span>
+                                      <span class="n">_config</span><span class="o">.</span><span class="n">PATH_REL_FORTRAN_SRC</span><span class="p">))</span>
+
+        <span class="c1"># Create Fortran executable - CONVERT2</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Install &#39;</span> <span class="o">+</span> <span class="n">target_dirname</span> <span class="o">+</span> <span class="s1">&#39; software at &#39;</span> <span class="o">+</span>
+              <span class="n">c</span><span class="o">.</span><span class="n">install_target</span> <span class="o">+</span> <span class="s1">&#39; in directory &#39;</span> <span class="o">+</span>
+              <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">flexpart_root_scripts</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+
+        <span class="n">delete_convert_build</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="p">)</span>
+        <span class="n">make_convert_build</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">makefile</span><span class="p">)</span>
+
+        <span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">ecd</span><span class="p">)</span>
+        <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">tar_file</span><span class="p">):</span>
+            <span class="n">os</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="n">tar_file</span><span class="p">)</span>
+
+    <span class="k">return</span></div>
+
+<div class="viewcode-block" id="mk_tarball"><a class="viewcode-back" href="../api.html#install.mk_tarball">[docs]</a><span class="k">def</span> <span class="nf">mk_tarball</span><span class="p">(</span><span class="n">tarball_path</span><span class="p">,</span> <span class="n">target</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Creates a tarball with all necessary files which need to be sent to the</span>
+<span class="sd">    installation directory.</span>
+<span class="sd">    It does not matter if this is local or remote.</span>
+<span class="sd">    Collects all python files, the Fortran source and makefiles,</span>
+<span class="sd">    the ECMWF_ENV file, the CONTROL files as well as the</span>
+<span class="sd">    template files.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    tarball_path : :obj:`string`</span>
+<span class="sd">        The complete path to the tar file which will contain all</span>
+<span class="sd">        relevant data for flex_extract.</span>
+
+<span class="sd">    target : :obj:`string`</span>
+<span class="sd">        The queue where the job is submitted to.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="kn">import</span> <span class="nn">tarfile</span>
+    <span class="kn">from</span> <span class="nn">glob</span> <span class="k">import</span> <span class="n">glob</span>
+
+    <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Create tarball ...&#39;</span><span class="p">)</span>
+
+    <span class="c1"># change to FLEXEXTRACT directory so that the tar can contain</span>
+    <span class="c1"># relative pathes to the files and directories</span>
+    <span class="n">ecd</span> <span class="o">=</span> <span class="n">_config</span><span class="o">.</span><span class="n">PATH_FLEXEXTRACT_DIR</span> <span class="o">+</span> <span class="s1">&#39;/&#39;</span>
+    <span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">ecd</span><span class="p">)</span>
+
+    <span class="c1"># get lists of the files to be added to the tar file</span>
+    <span class="k">if</span> <span class="n">target</span> <span class="o">==</span> <span class="s1">&#39;local&#39;</span><span class="p">:</span>
+        <span class="n">ECMWF_ENV_FILE</span> <span class="o">=</span> <span class="p">[]</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="n">ECMWF_ENV_FILE</span> <span class="o">=</span> <span class="p">[</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_REL_ECMWF_ENV</span><span class="p">]</span>
+
+    <span class="n">pyfiles</span> <span class="o">=</span> <span class="p">[</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">relpath</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">ecd</span><span class="p">)</span>
+               <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_LOCAL_PYTHON</span><span class="p">,</span> <span class="s1">&#39;*py&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">files</span><span class="p">]</span>
+    <span class="n">controlfiles</span> <span class="o">=</span> <span class="p">[</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">relpath</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">ecd</span><span class="p">)</span>
+                    <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_CONTROLFILES</span><span class="p">,</span>
+                                      <span class="s1">&#39;CONTROL*&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">files</span><span class="p">]</span>
+    <span class="n">tempfiles</span> <span class="o">=</span> <span class="p">[</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">relpath</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">ecd</span><span class="p">)</span>
+                 <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_TEMPLATES</span> <span class="p">,</span> <span class="s1">&#39;*&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">files</span><span class="p">]</span>
+    <span class="n">ffiles</span> <span class="o">=</span> <span class="p">[</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">relpath</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">ecd</span><span class="p">)</span>
+              <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_FORTRAN_SRC</span><span class="p">,</span> <span class="s1">&#39;*.f*&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">files</span><span class="p">]</span>
+    <span class="n">hfiles</span> <span class="o">=</span> <span class="p">[</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">relpath</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">ecd</span><span class="p">)</span>
+              <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_FORTRAN_SRC</span><span class="p">,</span> <span class="s1">&#39;*.h&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">files</span><span class="p">]</span>
+    <span class="n">makefiles</span> <span class="o">=</span> <span class="p">[</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">relpath</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">ecd</span><span class="p">)</span>
+                 <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_FORTRAN_SRC</span><span class="p">,</span> <span class="s1">&#39;Makefile*&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">files</span><span class="p">]</span>
+
+    <span class="c1"># concatenate single lists to one for a better looping</span>
+    <span class="n">filelist</span> <span class="o">=</span> <span class="n">pyfiles</span> <span class="o">+</span> <span class="n">controlfiles</span> <span class="o">+</span> <span class="n">tempfiles</span> <span class="o">+</span> <span class="n">ffiles</span> <span class="o">+</span> <span class="n">hfiles</span> <span class="o">+</span> \
+               <span class="n">makefiles</span> <span class="o">+</span> <span class="n">ECMWF_ENV_FILE</span>
+
+    <span class="c1"># create installation tar-file</span>
+    <span class="k">try</span><span class="p">:</span>
+        <span class="k">with</span> <span class="n">tarfile</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="n">tarball_path</span><span class="p">,</span> <span class="s2">&quot;w:gz&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">tar_handle</span><span class="p">:</span>
+            <span class="k">for</span> <span class="n">file</span> <span class="ow">in</span> <span class="n">filelist</span><span class="p">:</span>
+                <span class="n">tar_handle</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">file</span><span class="p">)</span>
+
+    <span class="k">except</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">CalledProcessError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;... ERROR CODE:</span><span class="se">\n</span><span class="s1"> ... &#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">returncode</span><span class="p">))</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;... ERROR MESSAGE:</span><span class="se">\n</span><span class="s1"> ... &#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
+
+        <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="s1">&#39;... could not make installation tar ball!&#39;</span><span class="p">)</span>
+
+    <span class="k">return</span></div>
+
+
+<div class="viewcode-block" id="un_tarball"><a class="viewcode-back" href="../api.html#install.un_tarball">[docs]</a><span class="k">def</span> <span class="nf">un_tarball</span><span class="p">(</span><span class="n">tarball_path</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Extracts the given tarball into current directory.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    tarball_path : :obj:`string`</span>
+<span class="sd">        The complete path to the tar file which will contain all</span>
+<span class="sd">        relevant data for flex_extract.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="kn">import</span> <span class="nn">tarfile</span>
+
+    <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Untar ...&#39;</span><span class="p">)</span>
+
+    <span class="k">with</span> <span class="n">tarfile</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="n">tarball_path</span><span class="p">)</span> <span class="k">as</span> <span class="n">tar_handle</span><span class="p">:</span>
+        <span class="n">tar_handle</span><span class="o">.</span><span class="n">extractall</span><span class="p">()</span>
+
+    <span class="k">return</span></div>
+
+<div class="viewcode-block" id="mk_env_vars"><a class="viewcode-back" href="../api.html#install.mk_env_vars">[docs]</a><span class="k">def</span> <span class="nf">mk_env_vars</span><span class="p">(</span><span class="n">ecuid</span><span class="p">,</span> <span class="n">ecgid</span><span class="p">,</span> <span class="n">gateway</span><span class="p">,</span> <span class="n">destination</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Creates a file named ECMWF_ENV which contains the</span>
+<span class="sd">    necessary environmental variables at ECMWF servers.</span>
+<span class="sd">    It is based on the template ECMWF_ENV.template.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    ecuid : :obj:`string`</span>
+<span class="sd">        The user id on ECMWF server.</span>
+
+<span class="sd">    ecgid : :obj:`string`</span>
+<span class="sd">        The group id on ECMWF server.</span>
+
+<span class="sd">    gateway : :obj:`string`</span>
+<span class="sd">        The gateway server the user is using.</span>
+
+<span class="sd">    destination : :obj:`string`</span>
+<span class="sd">        The remote destination which is used to transfer files</span>
+<span class="sd">        from ECMWF server to local gateway server.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="kn">from</span> <span class="nn">genshi.template.text</span> <span class="k">import</span> <span class="n">NewTextTemplate</span>
+    <span class="kn">from</span> <span class="nn">genshi.template</span> <span class="k">import</span>  <span class="n">TemplateLoader</span>
+
+    <span class="n">loader</span> <span class="o">=</span> <span class="n">TemplateLoader</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_TEMPLATES</span><span class="p">,</span> <span class="n">auto_reload</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
+    <span class="n">ecmwfvars_template</span> <span class="o">=</span> <span class="n">loader</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">TEMPFILE_USER_ENVVARS</span><span class="p">,</span>
+                                     <span class="bp">cls</span><span class="o">=</span><span class="n">NewTextTemplate</span><span class="p">)</span>
+
+    <span class="n">stream</span> <span class="o">=</span> <span class="n">ecmwfvars_template</span><span class="o">.</span><span class="n">generate</span><span class="p">(</span><span class="n">user_name</span> <span class="o">=</span> <span class="n">ecuid</span><span class="p">,</span>
+                                       <span class="n">user_group</span> <span class="o">=</span> <span class="n">ecgid</span><span class="p">,</span>
+                                       <span class="n">gateway_name</span> <span class="o">=</span> <span class="n">gateway</span><span class="p">,</span>
+                                       <span class="n">destination_name</span> <span class="o">=</span> <span class="n">destination</span>
+                                       <span class="p">)</span>
+
+    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_ECMWF_ENV</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+        <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">stream</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="s1">&#39;text&#39;</span><span class="p">))</span>
+
+    <span class="k">return</span></div>
+
+<div class="viewcode-block" id="mk_compilejob"><a class="viewcode-back" href="../api.html#install.mk_compilejob">[docs]</a><span class="k">def</span> <span class="nf">mk_compilejob</span><span class="p">(</span><span class="n">makefile</span><span class="p">,</span> <span class="n">target</span><span class="p">,</span> <span class="n">ecuid</span><span class="p">,</span> <span class="n">ecgid</span><span class="p">,</span> <span class="n">fp_root</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Modifies the original job template file so that it is specified</span>
+<span class="sd">    for the user and the environment were it will be applied. Result</span>
+<span class="sd">    is stored in a new file &quot;job.temp&quot; in the python directory.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    makefile : :obj:`string`</span>
+<span class="sd">        Name of the makefile which should be used to compile FORTRAN</span>
+<span class="sd">        CONVERT2 program.</span>
+
+<span class="sd">    target : :obj:`string`</span>
+<span class="sd">        The target where the installation should be done, e.g. the queue.</span>
+
+<span class="sd">    ecuid : :obj:`string`</span>
+<span class="sd">        The user id on ECMWF server.</span>
+
+<span class="sd">    ecgid : :obj:`string`</span>
+<span class="sd">        The group id on ECMWF server.</span>
+
+<span class="sd">    fp_root : :obj:`string`</span>
+<span class="sd">       Path to the root directory of FLEXPART environment or flex_extract</span>
+<span class="sd">       environment.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="kn">from</span> <span class="nn">genshi.template.text</span> <span class="k">import</span> <span class="n">NewTextTemplate</span>
+    <span class="kn">from</span> <span class="nn">genshi.template</span> <span class="k">import</span>  <span class="n">TemplateLoader</span>
+
+    <span class="n">loader</span> <span class="o">=</span> <span class="n">TemplateLoader</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_TEMPLATES</span><span class="p">,</span> <span class="n">auto_reload</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
+    <span class="n">compile_template</span> <span class="o">=</span> <span class="n">loader</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">TEMPFILE_INSTALL_COMPILEJOB</span><span class="p">,</span>
+                                   <span class="bp">cls</span><span class="o">=</span><span class="n">NewTextTemplate</span><span class="p">)</span>
+
+    <span class="k">if</span> <span class="n">fp_root</span> <span class="o">==</span> <span class="s1">&#39;../&#39;</span><span class="p">:</span>
+        <span class="n">fp_root</span> <span class="o">=</span> <span class="s1">&#39;$HOME&#39;</span>
+
+    <span class="n">stream</span> <span class="o">=</span> <span class="n">compile_template</span><span class="o">.</span><span class="n">generate</span><span class="p">(</span>
+        <span class="n">usergroup</span> <span class="o">=</span> <span class="n">ecgid</span><span class="p">,</span>
+        <span class="n">username</span> <span class="o">=</span> <span class="n">ecuid</span><span class="p">,</span>
+        <span class="n">version_number</span> <span class="o">=</span> <span class="n">_config</span><span class="o">.</span><span class="n">_VERSION_STR</span><span class="p">,</span>
+        <span class="n">fp_root_scripts</span> <span class="o">=</span> <span class="n">fp_root</span><span class="p">,</span>
+        <span class="n">makefile</span> <span class="o">=</span> <span class="n">makefile</span><span class="p">,</span>
+        <span class="n">fortran_program</span> <span class="o">=</span> <span class="n">_config</span><span class="o">.</span><span class="n">FORTRAN_EXECUTABLE</span>
+    <span class="p">)</span>
+
+    <span class="n">compilejob</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_JOBSCRIPTS</span><span class="p">,</span>
+                              <span class="n">_config</span><span class="o">.</span><span class="n">FILE_INSTALL_COMPILEJOB</span><span class="p">)</span>
+
+    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">compilejob</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+        <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">stream</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="s1">&#39;text&#39;</span><span class="p">))</span>
+
+    <span class="k">return</span></div>
+
+<div class="viewcode-block" id="mk_job_template"><a class="viewcode-back" href="../api.html#install.mk_job_template">[docs]</a><span class="k">def</span> <span class="nf">mk_job_template</span><span class="p">(</span><span class="n">ecuid</span><span class="p">,</span> <span class="n">ecgid</span><span class="p">,</span> <span class="n">gateway</span><span class="p">,</span> <span class="n">destination</span><span class="p">,</span> <span class="n">fp_root</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Modifies the original job template file so that it is specified</span>
+<span class="sd">    for the user and the environment were it will be applied. Result</span>
+<span class="sd">    is stored in a new file.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    ecuid : :obj:`string`</span>
+<span class="sd">        The user id on ECMWF server.</span>
+
+<span class="sd">    ecgid : :obj:`string`</span>
+<span class="sd">        The group id on ECMWF server.</span>
+
+<span class="sd">    gateway : :obj:`string`</span>
+<span class="sd">        The gateway server the user is using.</span>
+
+<span class="sd">    destination : :obj:`string`</span>
+<span class="sd">        The remote destination which is used to transfer files</span>
+<span class="sd">        from ECMWF server to local gateway server.</span>
+
+<span class="sd">    fp_root : :obj:`string`</span>
+<span class="sd">       Path to the root directory of FLEXPART environment or flex_extract</span>
+<span class="sd">       environment.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="kn">from</span> <span class="nn">genshi.template.text</span> <span class="k">import</span> <span class="n">NewTextTemplate</span>
+    <span class="kn">from</span> <span class="nn">genshi.template</span> <span class="k">import</span>  <span class="n">TemplateLoader</span>
+
+    <span class="n">loader</span> <span class="o">=</span> <span class="n">TemplateLoader</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_TEMPLATES</span><span class="p">,</span> <span class="n">auto_reload</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
+    <span class="n">compile_template</span> <span class="o">=</span> <span class="n">loader</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">TEMPFILE_INSTALL_JOB</span><span class="p">,</span>
+                                   <span class="bp">cls</span><span class="o">=</span><span class="n">NewTextTemplate</span><span class="p">)</span>
+
+    <span class="n">fp_root_path_to_python</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">fp_root</span><span class="p">,</span>
+                                          <span class="n">_config</span><span class="o">.</span><span class="n">FLEXEXTRACT_DIRNAME</span><span class="p">,</span>
+                                          <span class="n">_config</span><span class="o">.</span><span class="n">PATH_REL_PYTHON</span><span class="p">)</span>
+
+    <span class="n">stream</span> <span class="o">=</span> <span class="n">compile_template</span><span class="o">.</span><span class="n">generate</span><span class="p">(</span>
+        <span class="n">usergroup</span> <span class="o">=</span> <span class="n">ecgid</span><span class="p">,</span>
+        <span class="n">username</span> <span class="o">=</span> <span class="n">ecuid</span><span class="p">,</span>
+        <span class="n">version_number</span> <span class="o">=</span> <span class="n">_config</span><span class="o">.</span><span class="n">_VERSION_STR</span><span class="p">,</span>
+        <span class="n">fp_root_path</span> <span class="o">=</span> <span class="n">fp_root_path_to_python</span><span class="p">,</span>
+    <span class="p">)</span>
+
+    <span class="n">tempjobfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_TEMPLATES</span><span class="p">,</span>
+                               <span class="n">_config</span><span class="o">.</span><span class="n">TEMPFILE_JOB</span><span class="p">)</span>
+
+    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">tempjobfile</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+        <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">stream</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="s1">&#39;text&#39;</span><span class="p">))</span>
+
+    <span class="k">return</span></div>
+
+<div class="viewcode-block" id="delete_convert_build"><a class="viewcode-back" href="../api.html#install.delete_convert_build">[docs]</a><span class="k">def</span> <span class="nf">delete_convert_build</span><span class="p">(</span><span class="n">src_path</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Clean up the Fortran source directory and remove all</span>
+<span class="sd">    build files (e.g. \*.o, \*.mod and CONVERT2)</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    src_path : :obj:`string`</span>
+<span class="sd">        Path to the fortran source directory.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="n">modfiles</span> <span class="o">=</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">src_path</span><span class="p">,</span> <span class="s1">&#39;*.mod&#39;</span><span class="p">)</span>
+    <span class="n">objfiles</span> <span class="o">=</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">src_path</span><span class="p">,</span> <span class="s1">&#39;*.o&#39;</span><span class="p">)</span>
+    <span class="n">exefile</span> <span class="o">=</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">src_path</span><span class="p">,</span> <span class="n">_config</span><span class="o">.</span><span class="n">FORTRAN_EXECUTABLE</span><span class="p">)</span>
+
+    <span class="n">modfiles</span><span class="o">.</span><span class="n">delete_files</span><span class="p">()</span>
+    <span class="n">objfiles</span><span class="o">.</span><span class="n">delete_files</span><span class="p">()</span>
+    <span class="n">exefile</span><span class="o">.</span><span class="n">delete_files</span><span class="p">()</span>
+
+    <span class="k">return</span></div>
+
+<div class="viewcode-block" id="make_convert_build"><a class="viewcode-back" href="../api.html#install.make_convert_build">[docs]</a><span class="k">def</span> <span class="nf">make_convert_build</span><span class="p">(</span><span class="n">src_path</span><span class="p">,</span> <span class="n">makefile</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Compiles the Fortran code and generates the executable.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    src_path : :obj:`string`</span>
+<span class="sd">        Path to the fortran source directory.</span>
+
+<span class="sd">    makefile : :obj:`string`</span>
+<span class="sd">        The name of the makefile which should be used.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="k">try</span><span class="p">:</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Using makefile: &#39;</span> <span class="o">+</span> <span class="n">makefile</span><span class="p">)</span>
+        <span class="n">p</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">Popen</span><span class="p">([</span><span class="s1">&#39;make&#39;</span><span class="p">,</span> <span class="s1">&#39;-f&#39;</span><span class="p">,</span>
+                              <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">src_path</span><span class="p">,</span> <span class="n">makefile</span><span class="p">)],</span>
+                             <span class="n">stdin</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span>
+                             <span class="n">stdout</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span>
+                             <span class="n">stderr</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span>
+                             <span class="n">bufsize</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
+        <span class="n">pout</span><span class="p">,</span> <span class="n">perr</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">communicate</span><span class="p">()</span>
+        <span class="nb">print</span><span class="p">(</span><span class="n">pout</span><span class="p">)</span>
+        <span class="k">if</span> <span class="n">p</span><span class="o">.</span><span class="n">returncode</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="n">perr</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Please edit &#39;</span> <span class="o">+</span> <span class="n">makefile</span> <span class="o">+</span>
+                  <span class="s1">&#39; or try another Makefile in the src directory.&#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Most likely GRIB_API_INCLUDE_DIR, GRIB_API_LIB &#39;</span>
+                  <span class="s1">&#39;and EMOSLIB must be adapted.&#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Available Makefiles:&#39;</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="n">UioFiles</span><span class="p">(</span><span class="n">src_path</span><span class="p">,</span> <span class="s1">&#39;Makefile*&#39;</span><span class="p">))</span>
+            <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="s1">&#39;Compilation failed!&#39;</span><span class="p">)</span>
+    <span class="k">except</span> <span class="ne">ValueError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;ERROR: Makefile call failed:&#39;</span><span class="p">)</span>
+        <span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="n">subprocess</span><span class="o">.</span><span class="n">check_call</span><span class="p">([</span><span class="s1">&#39;ls&#39;</span><span class="p">,</span> <span class="s1">&#39;-l&#39;</span><span class="p">,</span>
+                               <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">src_path</span><span class="p">,</span>
+                                            <span class="n">_config</span><span class="o">.</span><span class="n">FORTRAN_EXECUTABLE</span><span class="p">)])</span>
+
+    <span class="k">return</span></div>
+
+
+<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
+    <span class="n">main</span><span class="p">()</span>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/_modules/prepare_flexpart.html
===================================================================
--- documentation/Sphinx/build/html/_modules/prepare_flexpart.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_modules/prepare_flexpart.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,401 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>prepare_flexpart &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="index.html">Module code</a> &raquo;</li>
+        
+      <li>prepare_flexpart</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for prepare_flexpart</h1><div class="highlight"><pre>
+<span></span><span class="ch">#!/usr/bin/env python</span>
+<span class="c1"># -*- coding: utf-8 -*-</span>
+<span class="c1">#*******************************************************************************</span>
+<span class="c1"># @Author: Anne Fouilloux (University of Oslo)</span>
+<span class="c1">#</span>
+<span class="c1"># @Date: October 2014</span>
+<span class="c1">#</span>
+<span class="c1"># @Change History:</span>
+<span class="c1">#</span>
+<span class="c1">#    November 2015 - Leopold Haimberger (University of Vienna):</span>
+<span class="c1">#        - using the WebAPI also for general MARS retrievals</span>
+<span class="c1">#        - job submission on ecgate and cca</span>
+<span class="c1">#        - job templates suitable for twice daily operational dissemination</span>
+<span class="c1">#        - dividing retrievals of longer periods into digestable chunks</span>
+<span class="c1">#        - retrieve also longer term forecasts, not only analyses and</span>
+<span class="c1">#          short term forecast data</span>
+<span class="c1">#        - conversion into GRIB2</span>
+<span class="c1">#        - conversion into .fp format for faster execution of FLEXPART</span>
+<span class="c1">#</span>
+<span class="c1">#    February 2018 - Anne Philipp (University of Vienna):</span>
+<span class="c1">#        - applied PEP8 style guide</span>
+<span class="c1">#        - added documentation</span>
+<span class="c1">#        - minor changes in programming style for consistence</span>
+<span class="c1">#        - BUG: removed call of clean_up-Function after call of</span>
+<span class="c1">#               prepareFlexpart in main since it is already called in</span>
+<span class="c1">#               prepareFlexpart at the end!</span>
+<span class="c1">#        - created function main and moved the two function calls for</span>
+<span class="c1">#          arguments and prepare_flexpart into it</span>
+<span class="c1">#</span>
+<span class="c1"># @License:</span>
+<span class="c1">#    (C) Copyright 2014-2018.</span>
+<span class="c1">#</span>
+<span class="c1">#    This software is licensed under the terms of the Apache Licence Version 2.0</span>
+<span class="c1">#    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.</span>
+<span class="c1">#</span>
+<span class="c1"># @Program Functionality:</span>
+<span class="c1">#    This program prepares the final version of the grib files which are</span>
+<span class="c1">#    then used by FLEXPART. It converts the bunch of grib files extracted</span>
+<span class="c1">#    via get_mars_data by doing for example the necessary conversion to get</span>
+<span class="c1">#    consistent grids or the disaggregation of flux data. Finally, the</span>
+<span class="c1">#    program combines the data fields in files per available hour with the</span>
+<span class="c1">#    naming convention xxYYMMDDHH, where xx should be 2 arbitrary letters</span>
+<span class="c1">#    (mostly xx is chosen to be &quot;EN&quot;).</span>
+<span class="c1">#</span>
+<span class="c1"># @Program Content:</span>
+<span class="c1">#    - main</span>
+<span class="c1">#    - prepare_flexpart</span>
+<span class="c1">#</span>
+<span class="c1">#*******************************************************************************</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># MODULES</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="kn">import</span> <span class="nn">datetime</span>
+<span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">import</span> <span class="nn">inspect</span>
+<span class="kn">import</span> <span class="nn">sys</span>
+<span class="kn">import</span> <span class="nn">socket</span>
+
+<span class="c1"># software specific classes and modules from flex_extract</span>
+
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span>
+    <span class="n">inspect</span><span class="o">.</span><span class="n">getfile</span><span class="p">(</span><span class="n">inspect</span><span class="o">.</span><span class="n">currentframe</span><span class="p">())))</span> <span class="o">+</span> <span class="s1">&#39;/../&#39;</span><span class="p">)</span>
+<span class="kn">import</span> <span class="nn">_config</span>
+<span class="kn">from</span> <span class="nn">classes.UioFiles</span> <span class="k">import</span> <span class="n">UioFiles</span>
+<span class="kn">from</span> <span class="nn">classes.ControlFile</span> <span class="k">import</span> <span class="n">ControlFile</span>
+<span class="kn">from</span> <span class="nn">tools</span> <span class="k">import</span> <span class="n">clean_up</span><span class="p">,</span> <span class="n">get_cmdline_arguments</span><span class="p">,</span> <span class="n">read_ecenv</span><span class="p">,</span> <span class="n">make_dir</span>
+<span class="kn">from</span> <span class="nn">classes.EcFlexpart</span> <span class="k">import</span> <span class="n">EcFlexpart</span>
+
+<span class="n">ecapi</span> <span class="o">=</span> <span class="s1">&#39;ecmwf&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">socket</span><span class="o">.</span><span class="n">gethostname</span><span class="p">()</span>
+<span class="k">try</span><span class="p">:</span>
+    <span class="k">if</span> <span class="n">ecapi</span><span class="p">:</span>
+        <span class="kn">import</span> <span class="nn">ecmwfapi</span>
+<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
+    <span class="n">ecapi</span> <span class="o">=</span> <span class="kc">False</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># FUNCTION</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<div class="viewcode-block" id="main"><a class="viewcode-back" href="../api.html#prepare_flexpart.main">[docs]</a><span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
+    <span class="sd">&#39;&#39;&#39;Controls the program to prepare flexpart input files from mars data.</span>
+
+<span class="sd">    This is done if it is called directly from command line.</span>
+<span class="sd">    Then it also takes program call arguments and control file input.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="n">args</span> <span class="o">=</span> <span class="n">get_cmdline_arguments</span><span class="p">()</span>
+    <span class="n">c</span> <span class="o">=</span> <span class="n">ControlFile</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">controlfile</span><span class="p">)</span>
+
+    <span class="n">env_parameter</span> <span class="o">=</span> <span class="n">read_ecenv</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_ECMWF_ENV</span><span class="p">)</span>
+    <span class="n">c</span><span class="o">.</span><span class="n">assign_args_to_control</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
+    <span class="n">c</span><span class="o">.</span><span class="n">assign_envs_to_control</span><span class="p">(</span><span class="n">env_parameter</span><span class="p">)</span>
+    <span class="n">c</span><span class="o">.</span><span class="n">check_conditions</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">queue</span><span class="p">)</span>
+
+    <span class="n">prepare_flexpart</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">ppid</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
+
+    <span class="k">return</span></div>
+
+<div class="viewcode-block" id="prepare_flexpart"><a class="viewcode-back" href="../api.html#prepare_flexpart.prepare_flexpart">[docs]</a><span class="k">def</span> <span class="nf">prepare_flexpart</span><span class="p">(</span><span class="n">ppid</span><span class="p">,</span> <span class="n">c</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Converts the mars data into flexpart ready input files.</span>
+
+<span class="sd">    Specific data fields are converted to a different grid and the flux</span>
+<span class="sd">    data are going to be disaggregated. The data fields are collected by</span>
+<span class="sd">    hour and stored in a file with a specific FLEXPART relevant naming</span>
+<span class="sd">    convention.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    ppid : :obj:`int`</span>
+<span class="sd">        Contains the ppid number of the current ECMWF job. It will be None if</span>
+<span class="sd">        the method was called within this module.</span>
+
+<span class="sd">    c : :obj:`ControlFile`</span>
+<span class="sd">        Contains all the parameters of CONTROL file and</span>
+<span class="sd">        command line.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="k">if</span> <span class="ow">not</span> <span class="n">ppid</span><span class="p">:</span>
+        <span class="n">c</span><span class="o">.</span><span class="n">ppid</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">getppid</span><span class="p">())</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="n">c</span><span class="o">.</span><span class="n">ppid</span> <span class="o">=</span> <span class="n">ppid</span>
+
+    <span class="n">c</span><span class="o">.</span><span class="n">ecapi</span> <span class="o">=</span> <span class="n">ecapi</span>
+
+    <span class="c1"># create the start and end date</span>
+    <span class="n">start</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">date</span><span class="p">(</span><span class="n">year</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">start_date</span><span class="p">[:</span><span class="mi">4</span><span class="p">]),</span>
+                          <span class="n">month</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">start_date</span><span class="p">[</span><span class="mi">4</span><span class="p">:</span><span class="mi">6</span><span class="p">]),</span>
+                          <span class="n">day</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">start_date</span><span class="p">[</span><span class="mi">6</span><span class="p">:]))</span>
+
+    <span class="n">end</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">date</span><span class="p">(</span><span class="n">year</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">end_date</span><span class="p">[:</span><span class="mi">4</span><span class="p">]),</span>
+                        <span class="n">month</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">end_date</span><span class="p">[</span><span class="mi">4</span><span class="p">:</span><span class="mi">6</span><span class="p">]),</span>
+                        <span class="n">day</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">end_date</span><span class="p">[</span><span class="mi">6</span><span class="p">:]))</span>
+
+    <span class="c1"># assign starting date minus 1 day</span>
+    <span class="c1"># since for basetime 00 we need the 12 hours upfront</span>
+    <span class="c1"># (the day before from 12 UTC to current day 00 UTC)</span>
+    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">basetime</span> <span class="o">==</span> <span class="s1">&#39;00&#39;</span><span class="p">:</span>
+        <span class="n">start</span> <span class="o">=</span> <span class="n">start</span> <span class="o">-</span> <span class="n">datetime</span><span class="o">.</span><span class="n">timedelta</span><span class="p">(</span><span class="n">days</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
+
+    <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Prepare &#39;</span> <span class="o">+</span> <span class="n">start</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&quot;%Y%m</span><span class="si">%d</span><span class="s2">&quot;</span><span class="p">)</span> <span class="o">+</span>
+           <span class="s2">&quot;/to/&quot;</span> <span class="o">+</span> <span class="n">end</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&quot;%Y%m</span><span class="si">%d</span><span class="s2">&quot;</span><span class="p">))</span>
+
+    <span class="c1"># create output dir if necessary</span>
+    <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">outputdir</span><span class="p">):</span>
+        <span class="n">make_dir</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">outputdir</span><span class="p">)</span>
+
+    <span class="c1"># get all files with flux data to be deaccumulated</span>
+    <span class="n">inputfiles</span> <span class="o">=</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="s1">&#39;*OG_acc_SL*.&#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">ppid</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39;.*&#39;</span><span class="p">)</span>
+
+    <span class="c1"># deaccumulate the flux data</span>
+    <span class="n">flexpart</span> <span class="o">=</span> <span class="n">EcFlexpart</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">fluxes</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+    <span class="n">flexpart</span><span class="o">.</span><span class="n">write_namelist</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
+    <span class="n">flexpart</span><span class="o">.</span><span class="n">deacc_fluxes</span><span class="p">(</span><span class="n">inputfiles</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
+
+    <span class="c1"># get a list of all files from the root inputdir</span>
+    <span class="n">inputfiles</span> <span class="o">=</span> <span class="n">UioFiles</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">,</span> <span class="s1">&#39;????__??.*&#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">ppid</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39;.*&#39;</span><span class="p">)</span>
+
+    <span class="c1"># produce FLEXPART-ready GRIB files and process them -</span>
+    <span class="c1"># copy/transfer/interpolate them or make them GRIB2</span>
+    <span class="n">flexpart</span> <span class="o">=</span> <span class="n">EcFlexpart</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">fluxes</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
+    <span class="n">flexpart</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="n">inputfiles</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
+    <span class="n">flexpart</span><span class="o">.</span><span class="n">process_output</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
+    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">grib2flexpart</span><span class="p">:</span>
+        <span class="c1"># prepare environment for a FLEXPART run</span>
+        <span class="c1"># to convert grib to flexpart binary format</span>
+        <span class="n">flexpart</span><span class="o">.</span><span class="n">prepare_fp_files</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
+
+    <span class="c1"># check if in debugging mode, then store all files</span>
+    <span class="c1"># otherwise delete temporary files</span>
+    <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">debug</span><span class="p">:</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">Temporary files left intact&#39;</span><span class="p">)</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="n">clean_up</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
+
+    <span class="k">return</span></div>
+
+<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
+    <span class="n">main</span><span class="p">()</span>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/_modules/submit.html
===================================================================
--- documentation/Sphinx/build/html/_modules/submit.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_modules/submit.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,395 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>submit &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="index.html">Module code</a> &raquo;</li>
+        
+      <li>submit</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for submit</h1><div class="highlight"><pre>
+<span></span><span class="ch">#!/usr/bin/env python</span>
+<span class="c1"># -*- coding: utf-8 -*-</span>
+<span class="c1">#*******************************************************************************</span>
+<span class="c1"># @Author: Anne Fouilloux (University of Oslo)</span>
+<span class="c1">#</span>
+<span class="c1"># @Date: October 2014</span>
+<span class="c1">#</span>
+<span class="c1"># @Change History:</span>
+<span class="c1">#</span>
+<span class="c1">#    November 2015 - Leopold Haimberger (University of Vienna):</span>
+<span class="c1">#        - job submission on ecgate and cca</span>
+<span class="c1">#        - job templates suitable for twice daily operational dissemination</span>
+<span class="c1">#</span>
+<span class="c1">#    February 2018 - Anne Philipp (University of Vienna):</span>
+<span class="c1">#        - applied PEP8 style guide</span>
+<span class="c1">#        - added documentation</span>
+<span class="c1">#        - minor changes in programming style (for consistence)</span>
+<span class="c1">#        - changed path names to variables from config file</span>
+<span class="c1">#        - added option for writing mars requests to extra file</span>
+<span class="c1">#          additionally,as option without submitting the mars jobs</span>
+<span class="c1">#</span>
+<span class="c1"># @License:</span>
+<span class="c1">#    (C) Copyright 2014-2018.</span>
+<span class="c1">#</span>
+<span class="c1">#    This software is licensed under the terms of the Apache Licence Version 2.0</span>
+<span class="c1">#    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.</span>
+<span class="c1">#</span>
+<span class="c1"># @Program Functionality:</span>
+<span class="c1">#    This program is the main program of flex_extract and controls the</span>
+<span class="c1">#    program flow.</span>
+<span class="c1">#    If it is supposed to work locally then it works through the necessary</span>
+<span class="c1">#    functions get_mars_data and prepareFlexpart. Otherwise it prepares</span>
+<span class="c1">#    a shell job script which will do the necessary work on the</span>
+<span class="c1">#    ECMWF server and is submitted via ecaccess-job-submit.</span>
+<span class="c1">#</span>
+<span class="c1"># @Program Content:</span>
+<span class="c1">#    - main</span>
+<span class="c1">#    - submit</span>
+<span class="c1">#</span>
+<span class="c1">#*******************************************************************************</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># MODULES</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">import</span> <span class="nn">sys</span>
+<span class="kn">import</span> <span class="nn">subprocess</span>
+<span class="kn">import</span> <span class="nn">inspect</span>
+<span class="kn">import</span> <span class="nn">collections</span>
+
+<span class="c1"># software specific classes and modules from flex_extract</span>
+<span class="kn">import</span> <span class="nn">_config</span>
+<span class="kn">from</span> <span class="nn">mods.tools</span> <span class="k">import</span> <span class="p">(</span><span class="n">normal_exit</span><span class="p">,</span> <span class="n">get_cmdline_arguments</span><span class="p">,</span>
+                        <span class="n">submit_job_to_ecserver</span><span class="p">,</span> <span class="n">read_ecenv</span><span class="p">)</span>
+<span class="kn">from</span> <span class="nn">mods.get_mars_data</span> <span class="k">import</span> <span class="n">get_mars_data</span>
+<span class="kn">from</span> <span class="nn">mods.prepare_flexpart</span> <span class="k">import</span> <span class="n">prepare_flexpart</span>
+<span class="kn">from</span> <span class="nn">classes.ControlFile</span> <span class="k">import</span> <span class="n">ControlFile</span>
+
+<span class="c1"># ------------------------------------------------------------------------------</span>
+<span class="c1"># FUNCTIONS</span>
+<span class="c1"># ------------------------------------------------------------------------------</span>
+
+<div class="viewcode-block" id="main"><a class="viewcode-back" href="../api.html#submit.main">[docs]</a><span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
+    <span class="sd">&#39;&#39;&#39;Get the arguments from script call and from CONTROL file.</span>
+<span class="sd">    Decides from the argument &quot;queue&quot; if the local version</span>
+<span class="sd">    is done &quot;queue=None&quot; or the gateway version with &quot;queue=ecgate&quot;</span>
+<span class="sd">    or &quot;queue=cca&quot;.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="n">args</span> <span class="o">=</span> <span class="n">get_cmdline_arguments</span><span class="p">()</span>
+    <span class="n">c</span> <span class="o">=</span> <span class="n">ControlFile</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">controlfile</span><span class="p">)</span>
+
+    <span class="n">env_parameter</span> <span class="o">=</span> <span class="n">read_ecenv</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_ECMWF_ENV</span><span class="p">)</span>
+    <span class="n">c</span><span class="o">.</span><span class="n">assign_args_to_control</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
+    <span class="n">c</span><span class="o">.</span><span class="n">assign_envs_to_control</span><span class="p">(</span><span class="n">env_parameter</span><span class="p">)</span>
+    <span class="n">c</span><span class="o">.</span><span class="n">check_conditions</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">queue</span><span class="p">)</span>
+
+    <span class="c1"># on local side</span>
+    <span class="c1"># on ECMWF server this would also be the local side</span>
+    <span class="n">called_from_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getcwd</span><span class="p">()</span>
+    <span class="k">if</span> <span class="n">args</span><span class="o">.</span><span class="n">queue</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
+        <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">&#39;/&#39;</span><span class="p">:</span>
+            <span class="n">c</span><span class="o">.</span><span class="n">inputdir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">called_from_dir</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">inputdir</span><span class="p">)</span>
+        <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">outputdir</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">&#39;/&#39;</span><span class="p">:</span>
+            <span class="n">c</span><span class="o">.</span><span class="n">outputdir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">called_from_dir</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">outputdir</span><span class="p">)</span>
+        <span class="n">get_mars_data</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
+        <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">request</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">or</span> <span class="n">c</span><span class="o">.</span><span class="n">request</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
+            <span class="n">prepare_flexpart</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">ppid</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
+            <span class="n">normal_exit</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">mailfail</span><span class="p">,</span> <span class="s1">&#39;FLEX_EXTRACT IS DONE!&#39;</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">normal_exit</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">mailfail</span><span class="p">,</span> <span class="s1">&#39;PRINTING MARS_REQUESTS DONE!&#39;</span><span class="p">)</span>
+    <span class="c1"># send files to ECMWF server and install there</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="n">submit</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">job_template</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">args</span><span class="o">.</span><span class="n">queue</span><span class="p">)</span>
+
+    <span class="k">return</span></div>
+
+<div class="viewcode-block" id="submit"><a class="viewcode-back" href="../api.html#submit.submit">[docs]</a><span class="k">def</span> <span class="nf">submit</span><span class="p">(</span><span class="n">jtemplate</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">queue</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Prepares the job script and submit it to the specified queue.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    jtemplate : :obj:`string`</span>
+<span class="sd">        Job template file from sub-directory &quot;_templates&quot; for</span>
+<span class="sd">        submission to ECMWF. It contains all necessary</span>
+<span class="sd">        module and variable settings for the ECMWF environment as well as</span>
+<span class="sd">        the job call and mail report instructions.</span>
+<span class="sd">        Default is &quot;job.temp&quot;.</span>
+
+<span class="sd">    c : :obj:`ControlFile`</span>
+<span class="sd">        Contains all the parameters of CONTROL file and</span>
+<span class="sd">        command line.</span>
+
+<span class="sd">    queue : :obj:`string`</span>
+<span class="sd">        Name of queue for submission to ECMWF (e.g. ecgate or cca )</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="c1"># read template file and get index for CONTROL input</span>
+    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_TEMPLATES</span><span class="p">,</span> <span class="n">jtemplate</span><span class="p">))</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+        <span class="n">lftext</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+    <span class="n">insert_point</span> <span class="o">=</span> <span class="n">lftext</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="s1">&#39;EOF&#39;</span><span class="p">)</span>
+
+    <span class="k">if</span> <span class="ow">not</span> <span class="n">c</span><span class="o">.</span><span class="n">basetime</span><span class="p">:</span>
+    <span class="c1"># --------- create on demand job script ------------------------------------</span>
+        <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span> <span class="o">&gt;</span> <span class="mi">24</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;---- Pure forecast mode! ----&#39;</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;---- On-demand mode! ----&#39;</span><span class="p">)</span>
+        <span class="n">job_file</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_JOBSCRIPTS</span><span class="p">,</span>
+                                <span class="n">jtemplate</span><span class="p">[:</span><span class="o">-</span><span class="mi">4</span><span class="p">]</span> <span class="o">+</span> <span class="s1">&#39;ksh&#39;</span><span class="p">)</span>
+        <span class="n">clist</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">to_list</span><span class="p">()</span>
+
+        <span class="n">lftextondemand</span> <span class="o">=</span> <span class="n">lftext</span><span class="p">[:</span><span class="n">insert_point</span><span class="p">]</span> <span class="o">+</span> <span class="n">clist</span> <span class="o">+</span> <span class="n">lftext</span><span class="p">[</span><span class="n">insert_point</span><span class="p">:]</span>
+
+        <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">job_file</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">lftextondemand</span><span class="p">))</span>
+
+        <span class="n">submit_job_to_ecserver</span><span class="p">(</span><span class="n">queue</span><span class="p">,</span> <span class="n">job_file</span><span class="p">)</span>
+
+    <span class="k">else</span><span class="p">:</span>
+    <span class="c1"># --------- create operational job script ----------------------------------</span>
+        <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;---- Operational mode! ----&#39;</span><span class="p">)</span>
+        <span class="n">job_file</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">_config</span><span class="o">.</span><span class="n">PATH_JOBSCRIPTS</span><span class="p">,</span>
+                                <span class="n">jtemplate</span><span class="p">[:</span><span class="o">-</span><span class="mi">5</span><span class="p">]</span> <span class="o">+</span> <span class="s1">&#39;oper.ksh&#39;</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">maxstep</span><span class="p">:</span>
+            <span class="n">mt</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">maxstep</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">mt</span> <span class="o">=</span> <span class="mi">0</span>
+
+        <span class="n">c</span><span class="o">.</span><span class="n">start_date</span> <span class="o">=</span> <span class="s1">&#39;$</span><span class="si">{MSJ_YEAR}</span><span class="s1">$</span><span class="si">{MSJ_MONTH}</span><span class="s1">$</span><span class="si">{MSJ_DAY}</span><span class="s1">&#39;</span>
+        <span class="n">c</span><span class="o">.</span><span class="n">end_date</span> <span class="o">=</span> <span class="s1">&#39;$</span><span class="si">{MSJ_YEAR}</span><span class="s1">$</span><span class="si">{MSJ_MONTH}</span><span class="s1">$</span><span class="si">{MSJ_DAY}</span><span class="s1">&#39;</span>
+        <span class="n">c</span><span class="o">.</span><span class="n">base_time</span> <span class="o">=</span> <span class="s1">&#39;$</span><span class="si">{MSJ_BASETIME}</span><span class="s1">&#39;</span>
+        <span class="k">if</span> <span class="n">mt</span> <span class="o">&gt;</span> <span class="mi">24</span><span class="p">:</span>
+            <span class="n">c</span><span class="o">.</span><span class="n">time</span> <span class="o">=</span> <span class="s1">&#39;$</span><span class="si">{MSJ_BASETIME}</span><span class="s1"> </span><span class="si">{MSJ_BASETIME}</span><span class="s1">&#39;</span>
+
+        <span class="n">colist</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">to_list</span><span class="p">()</span>
+
+        <span class="n">lftextoper</span> <span class="o">=</span> <span class="n">lftext</span><span class="p">[:</span><span class="n">insert_point</span><span class="p">]</span> <span class="o">+</span> <span class="n">colist</span> <span class="o">+</span> <span class="n">lftext</span><span class="p">[</span><span class="n">insert_point</span> <span class="o">+</span> <span class="mi">2</span><span class="p">:]</span>
+
+        <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">job_file</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">lftextoper</span><span class="p">))</span>
+
+        <span class="n">submit_job_to_ecserver</span><span class="p">(</span><span class="n">queue</span><span class="p">,</span> <span class="n">job_file</span><span class="p">)</span>
+
+    <span class="c1"># --------------------------------------------------------------------------</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;You should get an email with subject flex.hostname.pid&#39;</span><span class="p">)</span>
+
+    <span class="k">return</span></div>
+
+<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
+    <span class="n">main</span><span class="p">()</span>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/_modules/tools.html
===================================================================
--- documentation/Sphinx/build/html/_modules/tools.html	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/_modules/tools.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -213,18 +213,18 @@
 <span class="c1"># ------------------------------------------------------------------------------</span>
 
-<div class="viewcode-block" id="none_or_str"><a class="viewcode-back" href="../code.html#tools.none_or_str">[docs]</a><span class="k">def</span> <span class="nf">none_or_str</span><span class="p">(</span><span class="n">value</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Converts the input string into pythons None-type if the string</span>
-<span class="sd">        contains &quot;None&quot;.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        value: string</span>
-<span class="sd">            String to be checked for the &quot;None&quot; word.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        None or value:</span>
-<span class="sd">            Return depends on the content of the input value. If it was &quot;None&quot;,</span>
-<span class="sd">            then the python type None is returned. Otherwise the string itself.</span>
+<div class="viewcode-block" id="none_or_str"><a class="viewcode-back" href="../api.html#tools.none_or_str">[docs]</a><span class="k">def</span> <span class="nf">none_or_str</span><span class="p">(</span><span class="n">value</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Converts the input string into pythons None-type if the string</span>
+<span class="sd">    contains string &quot;None&quot;.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    value : :obj:`string`</span>
+<span class="sd">        String to be checked for the &quot;None&quot; word.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+<span class="sd">    None or value:</span>
+<span class="sd">        Return depends on the content of the input value. If it was &quot;None&quot;,</span>
+<span class="sd">        then the python type None is returned. Otherwise the string itself.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
     <span class="k">if</span> <span class="n">value</span> <span class="o">==</span> <span class="s1">&#39;None&#39;</span><span class="p">:</span>
@@ -232,19 +232,19 @@
     <span class="k">return</span> <span class="n">value</span></div>
 
-<div class="viewcode-block" id="none_or_int"><a class="viewcode-back" href="../code.html#tools.none_or_int">[docs]</a><span class="k">def</span> <span class="nf">none_or_int</span><span class="p">(</span><span class="n">value</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Converts the input string into pythons None-type if the string</span>
-<span class="sd">        contains &quot;None&quot;. Otherwise it is converted to an integer value.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        value: string</span>
-<span class="sd">            String to be checked for the &quot;None&quot; word.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        None or int(value):</span>
-<span class="sd">            Return depends on the content of the input value. If it was &quot;None&quot;,</span>
-<span class="sd">            then the python type None is returned. Otherwise the string is</span>
-<span class="sd">            converted into an integer value.</span>
+<div class="viewcode-block" id="none_or_int"><a class="viewcode-back" href="../api.html#tools.none_or_int">[docs]</a><span class="k">def</span> <span class="nf">none_or_int</span><span class="p">(</span><span class="n">value</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Converts the input string into pythons None-type if the string</span>
+<span class="sd">    contains string &quot;None&quot;. Otherwise it is converted to an integer value.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    value : :obj:`string`</span>
+<span class="sd">        String to be checked for the &quot;None&quot; word.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+<span class="sd">    None or int(value):</span>
+<span class="sd">        Return depends on the content of the input value. If it was &quot;None&quot;,</span>
+<span class="sd">        then the python type None is returned. Otherwise the string is</span>
+<span class="sd">        converted into an integer value.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
     <span class="k">if</span> <span class="n">value</span> <span class="o">==</span> <span class="s1">&#39;None&#39;</span><span class="p">:</span>
@@ -252,16 +252,15 @@
     <span class="k">return</span> <span class="nb">int</span><span class="p">(</span><span class="n">value</span><span class="p">)</span></div>
 
-<div class="viewcode-block" id="get_cmdline_arguments"><a class="viewcode-back" href="../code.html#tools.get_cmdline_arguments">[docs]</a><span class="k">def</span> <span class="nf">get_cmdline_arguments</span><span class="p">():</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Decomposes the command line arguments and assigns them to variables.</span>
-<span class="sd">        Apply default values for non mentioned arguments.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        &lt;nothing&gt;</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        args: instance of ArgumentParser</span>
-<span class="sd">            Contains the commandline arguments from script/program call.</span>
+<div class="viewcode-block" id="get_cmdline_arguments"><a class="viewcode-back" href="../api.html#tools.get_cmdline_arguments">[docs]</a><span class="k">def</span> <span class="nf">get_cmdline_arguments</span><span class="p">():</span>
+    <span class="sd">&#39;&#39;&#39;Decomposes the command line arguments and assigns them to variables.</span>
+<span class="sd">    Apply default values for non mentioned arguments.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+<span class="sd">    args : :obj:`Namespace`</span>
+<span class="sd">        Contains the commandline arguments from script/program call.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
 
@@ -342,18 +341,18 @@
     <span class="k">return</span> <span class="n">args</span></div>
 
-<div class="viewcode-block" id="read_ecenv"><a class="viewcode-back" href="../code.html#tools.read_ecenv">[docs]</a><span class="k">def</span> <span class="nf">read_ecenv</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Reads the file into a dictionary where the key values are the parameter</span>
-<span class="sd">        names.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        filename: string</span>
-<span class="sd">            Path to file where the ECMWV environment parameters are stored.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        envs: dict</span>
-<span class="sd">            Contains the environment parameter ecuid, ecgid, gateway</span>
-<span class="sd">            and destination for ECMWF server environments.</span>
+<div class="viewcode-block" id="read_ecenv"><a class="viewcode-back" href="../api.html#tools.read_ecenv">[docs]</a><span class="k">def</span> <span class="nf">read_ecenv</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Reads the file into a dictionary where the key values are the parameter</span>
+<span class="sd">    names.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    filename : :obj:`string`</span>
+<span class="sd">        Path to file where the ECMWF environment parameters are stored.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+<span class="sd">    envs : :obj:`dictionary`</span>
+<span class="sd">        Contains the environment parameter ecuid, ecgid, gateway</span>
+<span class="sd">        and destination for ECMWF server environments.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
     <span class="n">envs</span><span class="o">=</span> <span class="p">{}</span>
@@ -366,19 +365,16 @@
     <span class="k">return</span> <span class="n">envs</span></div>
 
-<div class="viewcode-block" id="clean_up"><a class="viewcode-back" href="../code.html#tools.clean_up">[docs]</a><span class="k">def</span> <span class="nf">clean_up</span><span class="p">(</span><span class="n">c</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Remove all files from intermediate directory</span>
-<span class="sd">        (inputdir from CONTROL file).</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        c: instance of class ControlFile</span>
-<span class="sd">            Contains all the parameters of CONTROL file and</span>
-<span class="sd">            command line.</span>
-<span class="sd">            For more information about format and content of the parameter</span>
-<span class="sd">            see documentation.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        &lt;nothing&gt;</span>
+<div class="viewcode-block" id="clean_up"><a class="viewcode-back" href="../api.html#tools.clean_up">[docs]</a><span class="k">def</span> <span class="nf">clean_up</span><span class="p">(</span><span class="n">c</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Remove all files from intermediate directory (inputdir).</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    c : :obj:`ControlFile`</span>
+<span class="sd">        Contains all the parameters of CONTROL file and</span>
+<span class="sd">        command line.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
 <span class="sd">    &#39;&#39;&#39;</span>
 
@@ -397,21 +393,21 @@
 
 
-<div class="viewcode-block" id="my_error"><a class="viewcode-back" href="../code.html#tools.my_error">[docs]</a><span class="k">def</span> <span class="nf">my_error</span><span class="p">(</span><span class="n">users</span><span class="p">,</span> <span class="n">message</span><span class="o">=</span><span class="s1">&#39;ERROR&#39;</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Prints a specified error message which can be passed to the function</span>
-<span class="sd">        before exiting the program.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        user: list of strings</span>
-<span class="sd">            Contains all email addresses which should be notified.</span>
-<span class="sd">            It might also contain just the ecmwf user name which wil trigger</span>
-<span class="sd">            mailing to the associated email address for this user.</span>
-
-<span class="sd">        message: string, optional</span>
-<span class="sd">            Error message. Default value is &quot;ERROR&quot;.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        &lt;nothing&gt;</span>
+<div class="viewcode-block" id="my_error"><a class="viewcode-back" href="../api.html#tools.my_error">[docs]</a><span class="k">def</span> <span class="nf">my_error</span><span class="p">(</span><span class="n">users</span><span class="p">,</span> <span class="n">message</span><span class="o">=</span><span class="s1">&#39;ERROR&#39;</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Prints a specified error message which can be passed to the function</span>
+<span class="sd">    before exiting the program.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    user : :obj:`list` of :obj:`string`</span>
+<span class="sd">        Contains all email addresses which should be notified.</span>
+<span class="sd">        It might also contain just the ecmwf user name which wil trigger</span>
+<span class="sd">        mailing to the associated email address for this user.</span>
+
+<span class="sd">    message : :obj:`string`, optional</span>
+<span class="sd">        Error message. Default value is &quot;ERROR&quot;.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
 <span class="sd">    &#39;&#39;&#39;</span>
 
@@ -443,20 +439,19 @@
 
 
-<div class="viewcode-block" id="normal_exit"><a class="viewcode-back" href="../code.html#tools.normal_exit">[docs]</a><span class="k">def</span> <span class="nf">normal_exit</span><span class="p">(</span><span class="n">users</span><span class="p">,</span> <span class="n">message</span><span class="o">=</span><span class="s1">&#39;Done!&#39;</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Prints a specific exit message which can be passed to the function.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        user: list of strings</span>
-<span class="sd">            Contains all email addresses which should be notified.</span>
-<span class="sd">            It might also contain just the ecmwf user name which wil trigger</span>
-<span class="sd">            mailing to the associated email address for this user.</span>
-
-<span class="sd">        message: string, optional</span>
-<span class="sd">            Message for exiting program. Default value is &quot;Done!&quot;.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        &lt;nothing&gt;</span>
+<div class="viewcode-block" id="normal_exit"><a class="viewcode-back" href="../api.html#tools.normal_exit">[docs]</a><span class="k">def</span> <span class="nf">normal_exit</span><span class="p">(</span><span class="n">users</span><span class="p">,</span> <span class="n">message</span><span class="o">=</span><span class="s1">&#39;Done!&#39;</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Prints a specific exit message which can be passed to the function.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    user : :obj:`list` of :obj:`string`</span>
+<span class="sd">        Contains all email addresses which should be notified.</span>
+<span class="sd">        It might also contain just the ecmwf user name which wil trigger</span>
+<span class="sd">        mailing to the associated email address for this user.</span>
+
+<span class="sd">    message : :obj:`string`, optional</span>
+<span class="sd">        Message for exiting program. Default value is &quot;Done!&quot;.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
 
 <span class="sd">    &#39;&#39;&#39;</span>
@@ -485,29 +480,33 @@
 
 
-<div class="viewcode-block" id="product"><a class="viewcode-back" href="../code.html#tools.product">[docs]</a><span class="k">def</span> <span class="nf">product</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        This method is taken from an example at the ECMWF wiki website.</span>
-<span class="sd">        https://software.ecmwf.int/wiki/display/GRIB/index.py; 2018-03-16</span>
-
-<span class="sd">        This method combines the single characters of the passed arguments</span>
-<span class="sd">        with each other. So that each character of each argument value</span>
-<span class="sd">        will be combined with each character of the other arguments as a tuple.</span>
-
-<span class="sd">        Example:</span>
-<span class="sd">        product(&#39;ABCD&#39;, &#39;xy&#39;) --&gt; Ax Ay Bx By Cx Cy Dx Dy</span>
-<span class="sd">        product(range(2), repeat = 3) --&gt; 000 001 010 011 100 101 110 111</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        *args: tuple</span>
-<span class="sd">            Positional arguments (arbitrary number).</span>
-
-<span class="sd">        **kwds: dictionary</span>
-<span class="sd">            Contains all the keyword arguments from *args.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        prod: tuple</span>
-<span class="sd">            Return will be done with &quot;yield&quot;. A tuple of combined arguments.</span>
-<span class="sd">            See example in description above.</span>
+<div class="viewcode-block" id="product"><a class="viewcode-back" href="../api.html#tools.product">[docs]</a><span class="k">def</span> <span class="nf">product</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;This method combines the single characters of the passed arguments</span>
+<span class="sd">    with each other. So that each character of each argument value</span>
+<span class="sd">    will be combined with each character of the other arguments as a tuple.</span>
+
+<span class="sd">    Note</span>
+<span class="sd">    ----</span>
+<span class="sd">    This method is taken from an example at the ECMWF wiki website.</span>
+<span class="sd">    https://software.ecmwf.int/wiki/display/GRIB/index.py; 2018-03-16</span>
+
+<span class="sd">    Example</span>
+<span class="sd">    -------</span>
+<span class="sd">    product(&#39;ABCD&#39;, &#39;xy&#39;) --&gt; Ax Ay Bx By Cx Cy Dx Dy</span>
+
+<span class="sd">    product(range(2), repeat = 3) --&gt; 000 001 010 011 100 101 110 111</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    \*args : :obj:`tuple`</span>
+<span class="sd">        Positional arguments (arbitrary number).</span>
+
+<span class="sd">    \*\*kwds : :obj:`dictionary`</span>
+<span class="sd">        Contains all the keyword arguments from \*args.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+<span class="sd">    prod : :obj:`tuple`</span>
+<span class="sd">        Return will be done with &quot;yield&quot;. A tuple of combined arguments.</span>
+<span class="sd">        See example in description above.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
     <span class="n">pools</span> <span class="o">=</span> <span class="nb">map</span><span class="p">(</span><span class="nb">tuple</span><span class="p">,</span> <span class="n">args</span><span class="p">)</span> <span class="o">*</span> <span class="n">kwds</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;repeat&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
@@ -521,16 +520,16 @@
 
 
-<div class="viewcode-block" id="silent_remove"><a class="viewcode-back" href="../code.html#tools.silent_remove">[docs]</a><span class="k">def</span> <span class="nf">silent_remove</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Remove file if it exists.</span>
-<span class="sd">        The function does not fail if the file does not exist.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        filename: string</span>
-<span class="sd">            The name of the file to be removed without notification.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        &lt;nothing&gt;</span>
+<div class="viewcode-block" id="silent_remove"><a class="viewcode-back" href="../api.html#tools.silent_remove">[docs]</a><span class="k">def</span> <span class="nf">silent_remove</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Remove file if it exists.</span>
+<span class="sd">    The function does not fail if the file does not exist.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    filename : :obj:`string`</span>
+<span class="sd">        The name of the file to be removed without notification.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
 <span class="sd">    &#39;&#39;&#39;</span>
     <span class="k">try</span><span class="p">:</span>
@@ -544,18 +543,18 @@
 
 
-<div class="viewcode-block" id="init128"><a class="viewcode-back" href="../code.html#tools.init128">[docs]</a><span class="k">def</span> <span class="nf">init128</span><span class="p">(</span><span class="n">filepath</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Opens and reads the grib file with table 128 information.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        filepath: string</span>
-<span class="sd">            Path to file of ECMWF grib table number 128.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        table128: dictionary</span>
-<span class="sd">            Contains the ECMWF grib table 128 information.</span>
-<span class="sd">            The key is the parameter number and the value is the</span>
-<span class="sd">            short name of the parameter.</span>
+<div class="viewcode-block" id="init128"><a class="viewcode-back" href="../api.html#tools.init128">[docs]</a><span class="k">def</span> <span class="nf">init128</span><span class="p">(</span><span class="n">filepath</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Opens and reads the grib file with table 128 information.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    filepath : :obj:`string`</span>
+<span class="sd">        Path to file of ECMWF grib table number 128.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+<span class="sd">    table128 : :obj:`dictionary`</span>
+<span class="sd">        Contains the ECMWF grib table 128 information.</span>
+<span class="sd">        The key is the parameter number and the value is the</span>
+<span class="sd">        short name of the parameter.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
     <span class="n">table128</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
@@ -569,26 +568,25 @@
 
 
-<div class="viewcode-block" id="to_param_id"><a class="viewcode-back" href="../code.html#tools.to_param_id">[docs]</a><span class="k">def</span> <span class="nf">to_param_id</span><span class="p">(</span><span class="n">pars</span><span class="p">,</span> <span class="n">table</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Transform parameter names to parameter ids</span>
-<span class="sd">        with ECMWF grib table 128.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        pars: string</span>
-<span class="sd">            Addpar argument from CONTROL file in the format of</span>
-<span class="sd">            parameter names instead of ids. The parameter short</span>
-<span class="sd">            names are sepearted with &quot;/&quot; and they are passed as</span>
-<span class="sd">            one single string.</span>
-
-<span class="sd">        table: dictionary</span>
-<span class="sd">            Contains the ECMWF grib table 128 information.</span>
-<span class="sd">            The key is the parameter number and the value is the</span>
-<span class="sd">            short name of the parameter.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        ipar: list of integer</span>
-<span class="sd">            List of addpar parameters from CONTROL file transformed to</span>
-<span class="sd">            parameter ids in the format of integer.</span>
+<div class="viewcode-block" id="to_param_id"><a class="viewcode-back" href="../api.html#tools.to_param_id">[docs]</a><span class="k">def</span> <span class="nf">to_param_id</span><span class="p">(</span><span class="n">pars</span><span class="p">,</span> <span class="n">table</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Transform parameter names to parameter ids with ECMWF grib table 128.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    pars : :obj:`string`</span>
+<span class="sd">        Addpar argument from CONTROL file in the format of</span>
+<span class="sd">        parameter names instead of ids. The parameter short</span>
+<span class="sd">        names are sepearted with &quot;/&quot; and they are passed as</span>
+<span class="sd">        one single string.</span>
+
+<span class="sd">    table : :obj:`dictionary`</span>
+<span class="sd">        Contains the ECMWF grib table 128 information.</span>
+<span class="sd">        The key is the parameter number and the value is the</span>
+<span class="sd">        short name of the parameter.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+<span class="sd">    ipar : :obj:`list` of :obj:`integer`</span>
+<span class="sd">        List of addpar parameters from CONTROL file transformed to</span>
+<span class="sd">        parameter ids in the format of integer.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
     <span class="n">cpar</span> <span class="o">=</span> <span class="n">pars</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)</span>
@@ -604,20 +602,20 @@
     <span class="k">return</span> <span class="n">ipar</span></div>
 
-<div class="viewcode-block" id="get_list_as_string"><a class="viewcode-back" href="../code.html#tools.get_list_as_string">[docs]</a><span class="k">def</span> <span class="nf">get_list_as_string</span><span class="p">(</span><span class="n">list_obj</span><span class="p">,</span> <span class="n">concatenate_sign</span><span class="o">=</span><span class="s1">&#39;, &#39;</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Converts a list of arbitrary content into a single string.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        list_obj: list</span>
-<span class="sd">            A list with arbitrary content.</span>
-
-<span class="sd">        concatenate_sign: string, optional</span>
-<span class="sd">            A string which is used to concatenate the single</span>
-<span class="sd">            list elements. Default value is &quot;, &quot;.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        str_of_list: string</span>
-<span class="sd">            The content of the list as a single string.</span>
+<div class="viewcode-block" id="get_list_as_string"><a class="viewcode-back" href="../api.html#tools.get_list_as_string">[docs]</a><span class="k">def</span> <span class="nf">get_list_as_string</span><span class="p">(</span><span class="n">list_obj</span><span class="p">,</span> <span class="n">concatenate_sign</span><span class="o">=</span><span class="s1">&#39;, &#39;</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Converts a list of arbitrary content into a single string.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    list_obj : :obj:`list`</span>
+<span class="sd">        A list with arbitrary content.</span>
+
+<span class="sd">    concatenate_sign : :obj:`string`, optional</span>
+<span class="sd">        A string which is used to concatenate the single</span>
+<span class="sd">        list elements. Default value is &quot;, &quot;.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+<span class="sd">    str_of_list : :obj:`string`</span>
+<span class="sd">        The content of the list as a single string.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
 
@@ -626,16 +624,16 @@
     <span class="k">return</span> <span class="n">str_of_list</span></div>
 
-<div class="viewcode-block" id="make_dir"><a class="viewcode-back" href="../code.html#tools.make_dir">[docs]</a><span class="k">def</span> <span class="nf">make_dir</span><span class="p">(</span><span class="n">directory</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Creates a directory and gives a warning if the directory</span>
-<span class="sd">        already exists. The program stops only if there is another problem.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        directory: string</span>
-<span class="sd">            The directory name including the path which should be created.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        &lt;nothing&gt;</span>
+<div class="viewcode-block" id="make_dir"><a class="viewcode-back" href="../api.html#tools.make_dir">[docs]</a><span class="k">def</span> <span class="nf">make_dir</span><span class="p">(</span><span class="n">directory</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Creates a directory and gives a warning if the directory</span>
+<span class="sd">    already exists. The program stops only if there is another problem.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    directory : :obj:`string`</span>
+<span class="sd">        The directory name including the path which should be created.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+
 <span class="sd">    &#39;&#39;&#39;</span>
     <span class="k">try</span><span class="p">:</span>
@@ -650,34 +648,35 @@
     <span class="k">return</span></div>
 
-<div class="viewcode-block" id="put_file_to_ecserver"><a class="viewcode-back" href="../code.html#tools.put_file_to_ecserver">[docs]</a><span class="k">def</span> <span class="nf">put_file_to_ecserver</span><span class="p">(</span><span class="n">ecd</span><span class="p">,</span> <span class="n">filename</span><span class="p">,</span> <span class="n">target</span><span class="p">,</span> <span class="n">ecuid</span><span class="p">,</span> <span class="n">ecgid</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Uses the ecaccess-file-put command to send a file to the ECMWF servers.</span>
-
-<span class="sd">        NOTE:</span>
-<span class="sd">        The return value is just for testing reasons. It does not have</span>
-<span class="sd">        to be used from the calling function since the whole error handling</span>
-<span class="sd">        is done in here.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        ecd: string</span>
-<span class="sd">            The path were the file is stored.</span>
-
-<span class="sd">        filename: string</span>
-<span class="sd">            The name of the file to send to the ECMWF server.</span>
-
-<span class="sd">        target: string</span>
-<span class="sd">            The target queue where the file should be sent to.</span>
-
-<span class="sd">        ecuid: string</span>
-<span class="sd">            The user id on ECMWF server.</span>
-
-<span class="sd">        ecgid: string</span>
-<span class="sd">            The group id on ECMWF server.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        rcode: string</span>
-<span class="sd">            Resulting code of command execution. If successful the string</span>
-<span class="sd">            will be empty.</span>
+<div class="viewcode-block" id="put_file_to_ecserver"><a class="viewcode-back" href="../api.html#tools.put_file_to_ecserver">[docs]</a><span class="k">def</span> <span class="nf">put_file_to_ecserver</span><span class="p">(</span><span class="n">ecd</span><span class="p">,</span> <span class="n">filename</span><span class="p">,</span> <span class="n">target</span><span class="p">,</span> <span class="n">ecuid</span><span class="p">,</span> <span class="n">ecgid</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Uses the ecaccess-file-put command to send a file to the ECMWF servers.</span>
+
+<span class="sd">    Note</span>
+<span class="sd">    ----</span>
+<span class="sd">    The return value is just for testing reasons. It does not have</span>
+<span class="sd">    to be used from the calling function since the whole error handling</span>
+<span class="sd">    is done in here.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    ecd : :obj:`string`</span>
+<span class="sd">        The path were the file is stored.</span>
+
+<span class="sd">    filename : :obj:`string`</span>
+<span class="sd">        The name of the file to send to the ECMWF server.</span>
+
+<span class="sd">    target : :obj:`string`</span>
+<span class="sd">        The target queue where the file should be sent to.</span>
+
+<span class="sd">    ecuid : :obj:`string`</span>
+<span class="sd">        The user id on ECMWF server.</span>
+
+<span class="sd">    ecgid : :obj:`string`</span>
+<span class="sd">        The group id on ECMWF server.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+<span class="sd">    rcode : :obj:`string`</span>
+<span class="sd">        Resulting code of command execution. If successful the string</span>
+<span class="sd">        will be empty.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
 
@@ -698,26 +697,27 @@
     <span class="k">return</span> <span class="n">rcode</span></div>
 
-<div class="viewcode-block" id="submit_job_to_ecserver"><a class="viewcode-back" href="../code.html#tools.submit_job_to_ecserver">[docs]</a><span class="k">def</span> <span class="nf">submit_job_to_ecserver</span><span class="p">(</span><span class="n">target</span><span class="p">,</span> <span class="n">jobname</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;</span>
-<span class="sd">    @Description:</span>
-<span class="sd">        Uses ecaccess-job-submit command to submit a job to the ECMWF server.</span>
-
-<span class="sd">        NOTE:</span>
-<span class="sd">        The return value is just for testing reasons. It does not have</span>
-<span class="sd">        to be used from the calling function since the whole error handling</span>
-<span class="sd">        is done in here.</span>
-
-<span class="sd">    @Input:</span>
-<span class="sd">        target: string</span>
-<span class="sd">            The target where the file should be sent to, e.g. the queue.</span>
-
-<span class="sd">        jobname: string</span>
-<span class="sd">            The name of the jobfile to be submitted to the ECMWF server.</span>
-
-<span class="sd">    @Return:</span>
-<span class="sd">        rcode: string</span>
-<span class="sd">            Resulting code of command execution. If successful the string</span>
-<span class="sd">            will contain an integer number, representing the id of the job</span>
-<span class="sd">            at the ecmwf server.</span>
+<div class="viewcode-block" id="submit_job_to_ecserver"><a class="viewcode-back" href="../api.html#tools.submit_job_to_ecserver">[docs]</a><span class="k">def</span> <span class="nf">submit_job_to_ecserver</span><span class="p">(</span><span class="n">target</span><span class="p">,</span> <span class="n">jobname</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Uses ecaccess-job-submit command to submit a job to the ECMWF server.</span>
+
+<span class="sd">    Note</span>
+<span class="sd">    ----</span>
+<span class="sd">    The return value is just for testing reasons. It does not have</span>
+<span class="sd">    to be used from the calling function since the whole error handling</span>
+<span class="sd">    is done in here.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    target : :obj:`string`</span>
+<span class="sd">        The target where the file should be sent to, e.g. the queue.</span>
+
+<span class="sd">    jobname : :obj:`string`</span>
+<span class="sd">        The name of the jobfile to be submitted to the ECMWF server.</span>
+
+<span class="sd">    Return</span>
+<span class="sd">    ------</span>
+<span class="sd">    rcode : :obj:`string`</span>
+<span class="sd">        Resulting code of command execution. If successful the string</span>
+<span class="sd">        will contain an integer number, representing the id of the job</span>
+<span class="sd">        at the ecmwf server.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
 
Index: documentation/Sphinx/build/html/_sources/api.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/api.rst.txt	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/_sources/api.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -2,4 +2,81 @@
 ============================
 
+.. contents::
+    :local:
+    
+Porgrams
+--------
+
+install
+*******
+
+.. automodule:: install
+    :members:
+    
+submit
+******
+
+.. automodule:: submit
+    :members:
+    
+Classes
+-------
+
+ControlFile
+***********
+
+.. automodule:: ControlFile
+    :members:
+    
+EcFlexpart
+**********
+
+.. automodule:: EcFlexpart
+    :members:
+    
+GribTools
+*********
+
+.. automodule:: GribTools
+    :members:
+
+MarsRetrieval
+*************
+
+.. automodule:: MarsRetrieval
+    :members:
+
+UioFiles
+********
+
+.. automodule:: UioFiles
+    :members:
+
+
+
+Modules
+-------
+
+get_mars_data
+*************
+
+.. automodule:: get_mars_data
+    :members:
+ 
+prepare_flexpart
+****************
+
+.. automodule:: prepare_flexpart
+    :members:    
+    
+tools
+*****
+
+.. automodule:: tools
+    :members:
+
+disaggregation
+**************    
+    
 .. automodule:: disaggregation
     :members:
Index: documentation/Sphinx/build/html/_sources/downloads.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/downloads.rst.txt	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/_sources/downloads.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -5,2 +5,11 @@
  
     UNDER CONSTRUCTION
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    downloads/tar_balls
+    downloads/git_repo
+    downloads/history_changes
+    
Index: documentation/Sphinx/build/html/_sources/downloads/git_repo.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/downloads/git_repo.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/downloads/git_repo.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+Git Repository 
+==============
+
+  UNDER CONSTRUCTION
Index: documentation/Sphinx/build/html/_sources/downloads/history_changes.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/downloads/history_changes.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/downloads/history_changes.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+History of Changes
+==================
+
+   UNDER CONSTRUCTION
Index: documentation/Sphinx/build/html/_sources/downloads/tar_balls.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/downloads/tar_balls.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/downloads/tar_balls.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+Download tar-balls
+==================
+
+  UNDER CONSTRUCTION
Index: documentation/Sphinx/build/html/_sources/index.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/index.rst.txt	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/_sources/index.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -4,6 +4,17 @@
    contain the root `toctree` directive.
 
-Welcome to flex_extract's documentation!
-========================================
+Welcome to flex_extract's user documentation!
+=============================================
+
+flex_extract is a software to retrieve meteorological fields from the European Centre for Medium-Range Weather Forecasts (ECMWF) Mars archive to server as input files for the FLEXTRA/FLEXPART Atmospheric Transport Modelling system. 
+
+
+.. The scripts can be 1) executed locally using the ECMWF WebMARS interface, or 2) on the ECMWF member
+.. state gateway server or HPC facility using the ecaccess software package. As another option the scripts can 3)
+.. also be triggered using ecflow scheduling software used by ECMWF for data dissemination.
+
+All required second party software and libraries used within flex_extract is open source and free of charge. 
+
+
 .. raw:: html
 
@@ -87,5 +98,5 @@
 
 .. toctree::
-   :maxdepth: 2
+   :maxdepth: 3
    :caption: Table of Contents:
 
Index: documentation/Sphinx/build/html/_sources/installation.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/installation.rst.txt	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/_sources/installation.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -1,6 +1,15 @@
 Installation
 ============
-
-Describe installation process flex_extract ....
  
     UNDER CONSTRUCTION
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    installation/requirements
+    installation/oper_modes
+    installation/test_install
+
+
+    
Index: documentation/Sphinx/build/html/_sources/installation/oper_modes.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/installation/oper_modes.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/installation/oper_modes.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,6 @@
+Operating modes
+===============
+
+ 
+    UNDER CONSTRUCTION
+    
Index: documentation/Sphinx/build/html/_sources/installation/requirements.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/installation/requirements.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/installation/requirements.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,6 @@
+Requirements
+============
+
+ 
+    UNDER CONSTRUCTION
+    
Index: documentation/Sphinx/build/html/_sources/installation/test_install.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/installation/test_install.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/installation/test_install.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,5 @@
+Installation test
+=================
+
+    UNDER CONSTRUCTION
+    
Index: documentation/Sphinx/build/html/_sources/oper_modes.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/oper_modes.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/oper_modes.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,6 @@
+Operating modes
+===============
+
+ 
+    UNDER CONSTRUCTION
+    
Index: documentation/Sphinx/build/html/_sources/program_structure.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/program_structure.rst.txt	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/_sources/program_structure.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -5,2 +5,10 @@
  
     UNDER CONSTRUCTION
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    program_structure/prog_overview
+    program_structure/prog_components
+    program_structure/prog_flow
Index: documentation/Sphinx/build/html/_sources/program_structure/prog_components.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/program_structure/prog_components.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/program_structure/prog_components.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,5 @@
+Program Components
+==================
+
+ 
+    UNDER CONSTRUCTION
Index: documentation/Sphinx/build/html/_sources/program_structure/prog_flow.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/program_structure/prog_flow.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/program_structure/prog_flow.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,5 @@
+Program Flow
+================
+
+ 
+    UNDER CONSTRUCTION
Index: documentation/Sphinx/build/html/_sources/program_structure/prog_overview.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/program_structure/prog_overview.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/program_structure/prog_overview.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,5 @@
+Program Overview
+================
+
+ 
+    UNDER CONSTRUCTION
Index: documentation/Sphinx/build/html/_sources/requirements.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/requirements.rst.txt	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/_sources/requirements.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -2,5 +2,5 @@
 ============
 
-Describe the requirements to use flex_extract ....
  
     UNDER CONSTRUCTION
+    
Index: documentation/Sphinx/build/html/_sources/support.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/support.rst.txt	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/_sources/support.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -2,5 +2,15 @@
 =======
 
-Describe support options ....
  
     UNDER CONSTRUCTION
+    
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    support/ticket_system
+    support/mailing_list
+    support/known_bugs_issues
+    support/faq
+        
Index: documentation/Sphinx/build/html/_sources/support/faq.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/support/faq.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/support/faq.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+FAQ - Frequently asked questions
+================================
+
+  UNDER CONSTRUCTION
Index: documentation/Sphinx/build/html/_sources/support/known_bugs_issues.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/support/known_bugs_issues.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/support/known_bugs_issues.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+Known Bugs and Issues
+=====================
+
+  UNDER CONSTRUCTION
Index: documentation/Sphinx/build/html/_sources/support/mailing_list.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/support/mailing_list.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/support/mailing_list.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+Mailing Lists
+=============
+
+   UNDER CONSTRUCTION
Index: documentation/Sphinx/build/html/_sources/support/ticket_system.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/support/ticket_system.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/support/ticket_system.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+Ticket System
+=============
+  
+   UNDER CONSTRUCTION
Index: documentation/Sphinx/build/html/_sources/test_install.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/test_install.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/test_install.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,5 @@
+Installation test
+=================
+
+    UNDER CONSTRUCTION
+    
Index: documentation/Sphinx/build/html/_sources/user_guide.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/user_guide.rst.txt	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/_sources/user_guide.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -1,6 +1,12 @@
 User Guide
 ==========
-
-Describe using flex_extract ....
  
     UNDER CONSTRUCTION
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    user_guide/how_to
+    user_guide/control_templates
+    
Index: documentation/Sphinx/build/html/_sources/user_guide/control_templates.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/user_guide/control_templates.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/user_guide/control_templates.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+CONTROL-file templates
+======================
+
+   UNDER CONSTRUCTION
Index: documentation/Sphinx/build/html/_sources/user_guide/how_to.rst.txt
===================================================================
--- documentation/Sphinx/build/html/_sources/user_guide/how_to.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/_sources/user_guide/how_to.rst.txt	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+How to use flex_extract
+=======================
+
+   UNDER CONSTRUCTION
Index: documentation/Sphinx/build/html/api.html
===================================================================
--- documentation/Sphinx/build/html/api.html	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/api.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -30,5 +30,5 @@
     <link rel="search" title="Search" href="search.html" />
     <link rel="next" title="Support" href="support.html" />
-    <link rel="prev" title="User Guide" href="user_guide.html" /> 
+    <link rel="prev" title="CONTROL-file templates" href="user_guide/control_templates.html" /> 
 
   
@@ -89,5 +89,27 @@
 <li class="toctree-l1"><a class="reference internal" href="program_structure.html">Program Structure</a></li>
 <li class="toctree-l1"><a class="reference internal" href="user_guide.html">User Guide</a></li>
-<li class="toctree-l1 current"><a class="current reference internal" href="#">Auto Generated Documentation</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Auto Generated Documentation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#porgrams">Porgrams</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#module-install">install</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#module-submit">submit</a></li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="#classes">Classes</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#module-ControlFile">ControlFile</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#module-EcFlexpart">EcFlexpart</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#module-GribTools">GribTools</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#module-MarsRetrieval">MarsRetrieval</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#module-UioFiles">UioFiles</a></li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="#modules">Modules</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#module-get_mars_data">get_mars_data</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#module-prepare_flexpart">prepare_flexpart</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#module-tools">tools</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#module-disaggregation">disaggregation</a></li>
+</ul>
+</li>
+</ul>
+</li>
 <li class="toctree-l1"><a class="reference internal" href="support.html">Support</a></li>
 </ul>
@@ -155,6 +177,1139 @@
            <div itemprop="articleBody">
             
-  <div class="section" id="module-disaggregation">
-<span id="auto-generated-documentation"></span><h1>Auto Generated Documentation<a class="headerlink" href="#module-disaggregation" title="Permalink to this headline">¶</a></h1>
+  <div class="section" id="auto-generated-documentation">
+<h1>Auto Generated Documentation<a class="headerlink" href="#auto-generated-documentation" title="Permalink to this headline">¶</a></h1>
+<div class="contents local topic" id="contents">
+<ul class="simple">
+<li><a class="reference internal" href="#porgrams" id="id1">Porgrams</a><ul>
+<li><a class="reference internal" href="#module-install" id="id2">install</a></li>
+<li><a class="reference internal" href="#module-submit" id="id3">submit</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#classes" id="id4">Classes</a><ul>
+<li><a class="reference internal" href="#module-ControlFile" id="id5">ControlFile</a></li>
+<li><a class="reference internal" href="#module-EcFlexpart" id="id6">EcFlexpart</a></li>
+<li><a class="reference internal" href="#module-GribTools" id="id7">GribTools</a></li>
+<li><a class="reference internal" href="#module-MarsRetrieval" id="id8">MarsRetrieval</a></li>
+<li><a class="reference internal" href="#module-UioFiles" id="id9">UioFiles</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#modules" id="id10">Modules</a><ul>
+<li><a class="reference internal" href="#module-get_mars_data" id="id11">get_mars_data</a></li>
+<li><a class="reference internal" href="#module-prepare_flexpart" id="id12">prepare_flexpart</a></li>
+<li><a class="reference internal" href="#module-tools" id="id13">tools</a></li>
+<li><a class="reference internal" href="#module-disaggregation" id="id14">disaggregation</a></li>
+</ul>
+</li>
+</ul>
+</div>
+<div class="section" id="porgrams">
+<h2><a class="toc-backref" href="#id1">Porgrams</a><a class="headerlink" href="#porgrams" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="module-install">
+<span id="install"></span><h3><a class="toc-backref" href="#id2">install</a><a class="headerlink" href="#module-install" title="Permalink to this headline">¶</a></h3>
+<dl class="function">
+<dt id="install.delete_convert_build">
+<code class="descclassname">install.</code><code class="descname">delete_convert_build</code><span class="sig-paren">(</span><em>src_path</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#delete_convert_build"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.delete_convert_build" title="Permalink to this definition">¶</a></dt>
+<dd><p>Clean up the Fortran source directory and remove all
+build files (e.g. *.o, *.mod and CONVERT2)</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>src_path</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Path to the fortran source directory.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="install.get_install_cmdline_arguments">
+<code class="descclassname">install.</code><code class="descname">get_install_cmdline_arguments</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#get_install_cmdline_arguments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.get_install_cmdline_arguments" title="Permalink to this definition">¶</a></dt>
+<dd><p>Decomposes the command line arguments and assigns them to variables.
+Apply default values for non mentioned arguments.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>args</strong> – Contains the commandline arguments from script/program call.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Namespace</span></code></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="install.install_via_gateway">
+<code class="descclassname">install.</code><code class="descname">install_via_gateway</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#install_via_gateway"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.install_via_gateway" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform the actual installation on local machine or prepare data
+transfer to remote gate and submit a job script which will
+install everything on the remote gate.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and
+command line.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="install.main">
+<code class="descclassname">install.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.main" title="Permalink to this definition">¶</a></dt>
+<dd><p>Controls the installation process. Calls the installation function
+if target is specified.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="install.make_convert_build">
+<code class="descclassname">install.</code><code class="descname">make_convert_build</code><span class="sig-paren">(</span><em>src_path</em>, <em>makefile</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#make_convert_build"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.make_convert_build" title="Permalink to this definition">¶</a></dt>
+<dd><p>Compiles the Fortran code and generates the executable.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>src_path</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Path to the fortran source directory.</li>
+<li><strong>makefile</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The name of the makefile which should be used.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="install.mk_compilejob">
+<code class="descclassname">install.</code><code class="descname">mk_compilejob</code><span class="sig-paren">(</span><em>makefile</em>, <em>target</em>, <em>ecuid</em>, <em>ecgid</em>, <em>fp_root</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#mk_compilejob"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_compilejob" title="Permalink to this definition">¶</a></dt>
+<dd><p>Modifies the original job template file so that it is specified
+for the user and the environment were it will be applied. Result
+is stored in a new file “job.temp” in the python directory.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>makefile</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Name of the makefile which should be used to compile FORTRAN
+CONVERT2 program.</li>
+<li><strong>target</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The target where the installation should be done, e.g. the queue.</li>
+<li><strong>ecuid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The user id on ECMWF server.</li>
+<li><strong>ecgid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The group id on ECMWF server.</li>
+<li><strong>fp_root</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Path to the root directory of FLEXPART environment or flex_extract
+environment.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="install.mk_env_vars">
+<code class="descclassname">install.</code><code class="descname">mk_env_vars</code><span class="sig-paren">(</span><em>ecuid</em>, <em>ecgid</em>, <em>gateway</em>, <em>destination</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#mk_env_vars"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_env_vars" title="Permalink to this definition">¶</a></dt>
+<dd><p>Creates a file named ECMWF_ENV which contains the
+necessary environmental variables at ECMWF servers.
+It is based on the template ECMWF_ENV.template.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ecuid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The user id on ECMWF server.</li>
+<li><strong>ecgid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The group id on ECMWF server.</li>
+<li><strong>gateway</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The gateway server the user is using.</li>
+<li><strong>destination</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The remote destination which is used to transfer files
+from ECMWF server to local gateway server.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="install.mk_job_template">
+<code class="descclassname">install.</code><code class="descname">mk_job_template</code><span class="sig-paren">(</span><em>ecuid</em>, <em>ecgid</em>, <em>gateway</em>, <em>destination</em>, <em>fp_root</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#mk_job_template"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_job_template" title="Permalink to this definition">¶</a></dt>
+<dd><p>Modifies the original job template file so that it is specified
+for the user and the environment were it will be applied. Result
+is stored in a new file.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ecuid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The user id on ECMWF server.</li>
+<li><strong>ecgid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The group id on ECMWF server.</li>
+<li><strong>gateway</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The gateway server the user is using.</li>
+<li><strong>destination</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The remote destination which is used to transfer files
+from ECMWF server to local gateway server.</li>
+<li><strong>fp_root</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Path to the root directory of FLEXPART environment or flex_extract
+environment.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="install.mk_tarball">
+<code class="descclassname">install.</code><code class="descname">mk_tarball</code><span class="sig-paren">(</span><em>tarball_path</em>, <em>target</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#mk_tarball"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.mk_tarball" title="Permalink to this definition">¶</a></dt>
+<dd><p>Creates a tarball with all necessary files which need to be sent to the
+installation directory.
+It does not matter if this is local or remote.
+Collects all python files, the Fortran source and makefiles,
+the ECMWF_ENV file, the CONTROL files as well as the
+template files.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>tarball_path</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The complete path to the tar file which will contain all
+relevant data for flex_extract.</li>
+<li><strong>target</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The queue where the job is submitted to.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="install.un_tarball">
+<code class="descclassname">install.</code><code class="descname">un_tarball</code><span class="sig-paren">(</span><em>tarball_path</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/install.html#un_tarball"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#install.un_tarball" title="Permalink to this definition">¶</a></dt>
+<dd><p>Extracts the given tarball into current directory.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>tarball_path</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The complete path to the tar file which will contain all
+relevant data for flex_extract.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="module-submit">
+<span id="submit"></span><h3><a class="toc-backref" href="#id3">submit</a><a class="headerlink" href="#module-submit" title="Permalink to this headline">¶</a></h3>
+<dl class="function">
+<dt id="submit.main">
+<code class="descclassname">submit.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/submit.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#submit.main" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get the arguments from script call and from CONTROL file.
+Decides from the argument “queue” if the local version
+is done “queue=None” or the gateway version with “queue=ecgate”
+or “queue=cca”.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="submit.submit">
+<code class="descclassname">submit.</code><code class="descname">submit</code><span class="sig-paren">(</span><em>jtemplate</em>, <em>c</em>, <em>queue</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/submit.html#submit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#submit.submit" title="Permalink to this definition">¶</a></dt>
+<dd><p>Prepares the job script and submit it to the specified queue.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>jtemplate</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Job template file from sub-directory “_templates” for
+submission to ECMWF. It contains all necessary
+module and variable settings for the ECMWF environment as well as
+the job call and mail report instructions.
+Default is “job.temp”.</li>
+<li><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and
+command line.</li>
+<li><strong>queue</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Name of queue for submission to ECMWF (e.g. ecgate or cca )</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+</div>
+<div class="section" id="classes">
+<h2><a class="toc-backref" href="#id4">Classes</a><a class="headerlink" href="#classes" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="module-ControlFile">
+<span id="controlfile"></span><h3><a class="toc-backref" href="#id5">ControlFile</a><a class="headerlink" href="#module-ControlFile" title="Permalink to this headline">¶</a></h3>
+<dl class="class">
+<dt id="ControlFile.ControlFile">
+<em class="property">class </em><code class="descclassname">ControlFile.</code><code class="descname">ControlFile</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ControlFile.html#ControlFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile" title="Permalink to this definition">¶</a></dt>
+<dd><p>Contains the information which are stored in the CONTROL files.</p>
+<dl class="method">
+<dt id="ControlFile.ControlFile.assign_args_to_control">
+<code class="descname">assign_args_to_control</code><span class="sig-paren">(</span><em>args</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ControlFile.html#ControlFile.assign_args_to_control"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.assign_args_to_control" title="Permalink to this definition">¶</a></dt>
+<dd><p>Overwrites the existing ControlFile instance attributes with
+the command line arguments.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>args</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">Namespace</span></code>) – Contains the commandline arguments from script/program call.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="ControlFile.ControlFile.assign_envs_to_control">
+<code class="descname">assign_envs_to_control</code><span class="sig-paren">(</span><em>envs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ControlFile.html#ControlFile.assign_envs_to_control"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.assign_envs_to_control" title="Permalink to this definition">¶</a></dt>
+<dd><p>Assigns the ECMWF environment parameter.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>envs</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">dictionary</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">strings</span></code>) – Contains the ECMWF environment parameternames “ECUID”, “ECGID”,
+“DESTINATION” and “GATEWAY” with its corresponding values.
+They were read from the file “ECMWF_ENV”.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="ControlFile.ControlFile.check_conditions">
+<code class="descname">check_conditions</code><span class="sig-paren">(</span><em>queue</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ControlFile.html#ControlFile.check_conditions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.check_conditions" title="Permalink to this definition">¶</a></dt>
+<dd><p>Checks a couple of necessary attributes and conditions,
+such as if they exist and contain values.
+Otherwise set default values.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>queue</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Name of the queue if submitted to the ECMWF servers.
+Used to check if ecuid, ecgid, gateway and destination
+are set correctly and are not empty.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="ControlFile.ControlFile.check_install_conditions">
+<code class="descname">check_install_conditions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/ControlFile.html#ControlFile.check_install_conditions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.check_install_conditions" title="Permalink to this definition">¶</a></dt>
+<dd><p>Checks a couple of necessary attributes and conditions
+for the installation such as if they exist and contain values.
+Otherwise set default values.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="ControlFile.ControlFile.to_list">
+<code class="descname">to_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/ControlFile.html#ControlFile.to_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ControlFile.ControlFile.to_list" title="Permalink to this definition">¶</a></dt>
+<dd><p>Just generates a list of strings containing the attributes and
+assigned values except the attributes “_expanded”, “exedir”,
+“ecmwfdatadir” and “flexpart_root_scripts”.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>l</strong> – A sorted list of the all ControlFile class attributes with
+their values except the attributes “_expanded”, “exedir”,
+“ecmwfdatadir” and “flexpart_root_scripts”.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="module-EcFlexpart">
+<span id="ecflexpart"></span><h3><a class="toc-backref" href="#id6">EcFlexpart</a><a class="headerlink" href="#module-EcFlexpart" title="Permalink to this headline">¶</a></h3>
+<dl class="class">
+<dt id="EcFlexpart.EcFlexpart">
+<em class="property">class </em><code class="descclassname">EcFlexpart.</code><code class="descname">EcFlexpart</code><span class="sig-paren">(</span><em>c</em>, <em>fluxes=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart" title="Permalink to this definition">¶</a></dt>
+<dd><p>Class to retrieve FLEXPART specific ECMWF data.</p>
+<dl class="method">
+<dt id="EcFlexpart.EcFlexpart.create">
+<code class="descname">create</code><span class="sig-paren">(</span><em>inputfiles</em>, <em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.create"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.create" title="Permalink to this definition">¶</a></dt>
+<dd><p>An index file will be created which depends on the combination
+of “date”, “time” and “stepRange” values. This is used to iterate
+over all messages in each grib file which were passed through the
+parameter “inputfiles” to seperate specific parameters into fort.*
+files. Afterwards the FORTRAN program is called to convert
+the data fields all to the same grid and put them in one file
+per unique time step (combination of “date”, “time” and
+“stepRange”).</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">This method is based on the ECMWF example index.py
+<a class="reference external" href="https://software.ecmwf.int/wiki/display/GRIB/index.py">https://software.ecmwf.int/wiki/display/GRIB/index.py</a></p>
+</div>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>inputfiles</strong> (<a class="reference internal" href="#module-UioFiles" title="UioFiles"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UioFiles</span></code></a>) – Contains a list of files.</li>
+<li><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and
+command line.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="EcFlexpart.EcFlexpart.deacc_fluxes">
+<code class="descname">deacc_fluxes</code><span class="sig-paren">(</span><em>inputfiles</em>, <em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.deacc_fluxes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.deacc_fluxes" title="Permalink to this definition">¶</a></dt>
+<dd><p>Goes through all flux fields in ordered time and de-accumulate
+the fields. Afterwards the fields are disaggregated in time.
+Different versions of disaggregation is provided for rainfall
+data (darain, modified linear) and the surface fluxes and
+stress data (dapoly, cubic polynomial).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>inputfiles</strong> (<a class="reference internal" href="#module-UioFiles" title="UioFiles"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UioFiles</span></code></a>) – Contains a list of files.</li>
+<li><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and
+command line.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="EcFlexpart.EcFlexpart.prepare_fp_files">
+<code class="descname">prepare_fp_files</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.prepare_fp_files"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.prepare_fp_files" title="Permalink to this definition">¶</a></dt>
+<dd><p>Conversion of GRIB files to FLEXPART binary format.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and
+command line.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="EcFlexpart.EcFlexpart.process_output">
+<code class="descname">process_output</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.process_output"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.process_output" title="Permalink to this definition">¶</a></dt>
+<dd><p>The grib files are postprocessed depending on the selection in
+CONTROL file. The resulting files are moved to the output
+directory if its not equal to the input directory.
+The following modifications might be done if
+properly switched in CONTROL file:
+GRIB2 - Conversion to GRIB2
+ECTRANS - Transfer of files to gateway server
+ECSTORAGE - Storage at ECMWF server</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and
+command line.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="EcFlexpart.EcFlexpart.retrieve">
+<code class="descname">retrieve</code><span class="sig-paren">(</span><em>server</em>, <em>dates</em>, <em>public</em>, <em>request</em>, <em>inputdir='.'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.retrieve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.retrieve" title="Permalink to this definition">¶</a></dt>
+<dd><p>Finalizing the retrieval information by setting final details
+depending on grid type.
+Prepares MARS retrievals per grid type and submits them.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>server</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">ECMWFService</span></code> or <code class="xref py py-obj docutils literal notranslate"><span class="pre">ECMWFDataServer</span></code>) – The connection to the ECMWF server. This is different
+for member state users which have full access and non
+member state users which have only access to the public
+data sets. The decision is made from command line argument
+“public”; for public access its True (ECMWFDataServer)
+for member state users its False (ECMWFService)</li>
+<li><strong>dates</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Contains start and end date of the retrieval in the format
+“YYYYMMDD/to/YYYYMMDD”</li>
+<li><strong>request</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">integer</span></code>) – Selects the mode of retrieval.
+0: Retrieves the data from ECMWF.
+1: Prints the mars requests to an output file.
+2: Retrieves the data and prints the mars request.</li>
+<li><strong>inputdir</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Path to the directory where the retrieved data is about
+to be stored. The default is the current directory (‘.’).</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="EcFlexpart.EcFlexpart.write_namelist">
+<code class="descname">write_namelist</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EcFlexpart.html#EcFlexpart.write_namelist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EcFlexpart.EcFlexpart.write_namelist" title="Permalink to this definition">¶</a></dt>
+<dd><p>Creates a namelist file in the temporary directory and writes
+the following values to it: maxl, maxb, mlevel,
+mlevelist, mnauf, metapar, rlo0, rlo1, rla0, rla1,
+momega, momegadiff, mgauss, msmooth, meta, metadiff, mdpdeta</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and
+command line.</li>
+<li><strong>filename</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Name of the namelist file.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="module-GribTools">
+<span id="gribtools"></span><h3><a class="toc-backref" href="#id7">GribTools</a><a class="headerlink" href="#module-GribTools" title="Permalink to this headline">¶</a></h3>
+<dl class="class">
+<dt id="GribTools.GribTools">
+<em class="property">class </em><code class="descclassname">GribTools.</code><code class="descname">GribTools</code><span class="sig-paren">(</span><em>filenames</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/GribTools.html#GribTools"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribTools.GribTools" title="Permalink to this definition">¶</a></dt>
+<dd><p>Class for GRIB utilities (new methods) based on GRIB API</p>
+<dl class="method">
+<dt id="GribTools.GribTools.copy">
+<code class="descname">copy</code><span class="sig-paren">(</span><em>filename_in</em>, <em>selectWhere=True</em>, <em>keynames=[]</em>, <em>keyvalues=[]</em>, <em>filemode='w'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/GribTools.html#GribTools.copy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribTools.GribTools.copy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Add the content of another input grib file to the objects file but
+only messages corresponding to keys/values passed to the function.
+The selectWhere switch decides if to copy the keys equal to (True) or
+different to (False) the keynames/keyvalues list passed to the function.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>filename_in</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Filename of the input file to read the grib messages from.</li>
+<li><strong>selectWhere</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">boolean</span></code>, optional) – Decides if to copy the keynames and values equal to (True) or
+different to (False) the keynames/keyvalues list passed to the
+function. Default is True.</li>
+<li><strong>keynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – List of keynames. Default is an empty list.</li>
+<li><strong>keyvalues</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – List of keynames. Default is an empty list.</li>
+<li><strong>filemode</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Sets the mode for the output file. Default is “w”.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="GribTools.GribTools.get_keys">
+<code class="descname">get_keys</code><span class="sig-paren">(</span><em>keynames</em>, <em>wherekeynames=[]</em>, <em>wherekeyvalues=[]</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/GribTools.html#GribTools.get_keys"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribTools.GribTools.get_keys" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get keyvalues for a given list of keynames a where statement
+can be given (list of key and list of values)</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>keynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – List of keynames.</li>
+<li><strong>wherekeynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Default value is an empty list.</li>
+<li><strong>wherekeyvalues</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Default value is an empty list.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>return_list</strong> – List of keyvalues for given keynames.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="GribTools.GribTools.index">
+<code class="descname">index</code><span class="sig-paren">(</span><em>index_keys=['mars'], index_file='my.idx'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/GribTools.html#GribTools.index"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribTools.GribTools.index" title="Permalink to this definition">¶</a></dt>
+<dd><p>Create index file from a list of files if it does not exist or
+read an index file.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>index_keys</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Contains the list of key parameter names from
+which the index is to be created.
+Default is a list with a single entry string “mars”.</li>
+<li><strong>index_file</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Filename where the indices are stored.
+Default is “my.idx”.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>iid</strong> – Grib index id.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">integer</span></code></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="GribTools.GribTools.set_keys">
+<code class="descname">set_keys</code><span class="sig-paren">(</span><em>fromfile</em>, <em>keynames</em>, <em>keyvalues</em>, <em>wherekeynames=[]</em>, <em>wherekeyvalues=[]</em>, <em>strict=False</em>, <em>filemode='w'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/GribTools.html#GribTools.set_keys"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GribTools.GribTools.set_keys" title="Permalink to this definition">¶</a></dt>
+<dd><p>Opens the file to read the grib messages and then write
+them to a new output file. By default all messages are
+written out. Also, the keyvalues of the passed list of
+keynames are set or only those meeting the where statement.
+(list of key and list of values).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>fromfile</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Filename of the input file to read the grib messages from.</li>
+<li><strong>keynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – List of keynames. Default is an empty list.</li>
+<li><strong>keyvalues</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – List of keynames. Default is an empty list.</li>
+<li><strong>wherekeynames</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Default value is an empty list.</li>
+<li><strong>wherekeyvalues</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Default value is an empty list.</li>
+<li><strong>strict</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">boolean</span></code>, optional) – Decides if everything from keynames and keyvalues
+is written out the grib file (False) or only those
+meeting the where statement (True). Default is False.</li>
+<li><strong>filemode</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Sets the mode for the output file. Default is “w”.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="module-MarsRetrieval">
+<span id="marsretrieval"></span><h3><a class="toc-backref" href="#id8">MarsRetrieval</a><a class="headerlink" href="#module-MarsRetrieval" title="Permalink to this headline">¶</a></h3>
+<dl class="class">
+<dt id="MarsRetrieval.MarsRetrieval">
+<em class="property">class </em><code class="descclassname">MarsRetrieval.</code><code class="descname">MarsRetrieval</code><span class="sig-paren">(</span><em>server</em>, <em>public</em>, <em>marsclass='ei'</em>, <em>dataset=''</em>, <em>type=''</em>, <em>levtype=''</em>, <em>levelist=''</em>, <em>repres=''</em>, <em>date=''</em>, <em>resol=''</em>, <em>stream=''</em>, <em>area=''</em>, <em>time=''</em>, <em>step=''</em>, <em>expver='1'</em>, <em>number=''</em>, <em>accuracy=''</em>, <em>grid=''</em>, <em>gaussian=''</em>, <em>target=''</em>, <em>param=''</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/MarsRetrieval.html#MarsRetrieval"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval" title="Permalink to this definition">¶</a></dt>
+<dd><p>Class for submitting MARS retrievals.</p>
+<p>A description of MARS keywords/arguments and examples of their
+values can be found here:
+<a class="reference external" href="https://software.ecmwf.int/wiki/display/UDOC/">https://software.ecmwf.int/wiki/display/UDOC/</a>                   Identification+keywords#Identificationkeywords-class</p>
+<dl class="method">
+<dt id="MarsRetrieval.MarsRetrieval.data_retrieve">
+<code class="descname">data_retrieve</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/MarsRetrieval.html#MarsRetrieval.data_retrieve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.data_retrieve" title="Permalink to this definition">¶</a></dt>
+<dd><p>Submits a MARS retrieval. Depending on the existence of
+ECMWF Web-API it is submitted via Python or a
+subprocess in the Shell. The parameter for the mars retrieval
+are taken from the defined class attributes.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="MarsRetrieval.MarsRetrieval.display_info">
+<code class="descname">display_info</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/MarsRetrieval.html#MarsRetrieval.display_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.display_info" title="Permalink to this definition">¶</a></dt>
+<dd><p>Prints all class attributes and their values to the
+standard output.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="MarsRetrieval.MarsRetrieval.print_info">
+<code class="descname">print_info</code><span class="sig-paren">(</span><em>inputdir</em>, <em>request_number</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/MarsRetrieval.html#MarsRetrieval.print_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.print_info" title="Permalink to this definition">¶</a></dt>
+<dd><p>Prints all mars requests to an extra file for debugging and
+information.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>inputdir</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The path where all data from the retrievals are stored.</li>
+<li><strong>request_number</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">integer</span></code>) – Number of mars requests for flux and non-flux data.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="MarsRetrieval.MarsRetrieval.print_infodata_csv">
+<code class="descname">print_infodata_csv</code><span class="sig-paren">(</span><em>inputdir</em>, <em>request_number</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/MarsRetrieval.html#MarsRetrieval.print_infodata_csv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#MarsRetrieval.MarsRetrieval.print_infodata_csv" title="Permalink to this definition">¶</a></dt>
+<dd><p>Write all request parameter in alpabetical order into a “csv” file.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>inputdir</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The path where all data from the retrievals are stored.</li>
+<li><strong>request_number</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">integer</span></code>) – Number of mars requests for flux and non-flux data.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="module-UioFiles">
+<span id="uiofiles"></span><h3><a class="toc-backref" href="#id9">UioFiles</a><a class="headerlink" href="#module-UioFiles" title="Permalink to this headline">¶</a></h3>
+<dl class="class">
+<dt id="UioFiles.UioFiles">
+<em class="property">class </em><code class="descclassname">UioFiles.</code><code class="descname">UioFiles</code><span class="sig-paren">(</span><em>path</em>, <em>pattern</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/UioFiles.html#UioFiles"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#UioFiles.UioFiles" title="Permalink to this definition">¶</a></dt>
+<dd><p>Class to manipulate files. At initialisation it has the pattern
+which stores a regular expression pattern for the files, the path
+to the files and the files already.</p>
+<dl class="method">
+<dt id="UioFiles.UioFiles.delete_files">
+<code class="descname">delete_files</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/UioFiles.html#UioFiles.delete_files"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#UioFiles.UioFiles.delete_files" title="Permalink to this definition">¶</a></dt>
+<dd><p>Deletes the files.</p>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+</div>
+<div class="section" id="modules">
+<h2><a class="toc-backref" href="#id10">Modules</a><a class="headerlink" href="#modules" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="module-get_mars_data">
+<span id="get-mars-data"></span><h3><a class="toc-backref" href="#id11">get_mars_data</a><a class="headerlink" href="#module-get_mars_data" title="Permalink to this headline">¶</a></h3>
+<dl class="function">
+<dt id="get_mars_data.do_retrievement">
+<code class="descclassname">get_mars_data.</code><code class="descname">do_retrievement</code><span class="sig-paren">(</span><em>c</em>, <em>server</em>, <em>start</em>, <em>end</em>, <em>delta_t</em>, <em>fluxes=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/get_mars_data.html#do_retrievement"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.do_retrievement" title="Permalink to this definition">¶</a></dt>
+<dd><p>Divides the complete retrieval period in smaller chunks and
+retrieves the data from MARS.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and
+command line.</li>
+<li><strong>server</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">ECMWFService</span></code>) – The server connection to ECMWF.</li>
+<li><strong>start</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">datetime</span></code>) – The start date of the retrieval.</li>
+<li><strong>end</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">datetime</span></code>) – The end date of the retrieval.</li>
+<li><strong>delta_t</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">datetime</span></code>) – Delta_t + 1 is the maximal time period of a single
+retrieval.</li>
+<li><strong>fluxes</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">boolean</span></code>, optional) – Decides if the flux parameters are to be retrieved or
+the rest of the parameter list.
+Default value is False.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="get_mars_data.get_mars_data">
+<code class="descclassname">get_mars_data.</code><code class="descname">get_mars_data</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/get_mars_data.html#get_mars_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.get_mars_data" title="Permalink to this definition">¶</a></dt>
+<dd><p>Retrieves the EC data needed for a FLEXPART simulation.</p>
+<p>Start and end dates for retrieval period is set. Retrievals
+are divided into smaller periods if necessary and datechunk parameter
+is set.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and
+command line.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="get_mars_data.main">
+<code class="descclassname">get_mars_data.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/get_mars_data.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#get_mars_data.main" title="Permalink to this definition">¶</a></dt>
+<dd><p>Controls the program to get data out of mars.</p>
+<p>This is done if it is called directly from command line.
+Then it also takes program call arguments and control file input.</p>
+</dd></dl>
+
+</div>
+<div class="section" id="module-prepare_flexpart">
+<span id="prepare-flexpart"></span><h3><a class="toc-backref" href="#id12">prepare_flexpart</a><a class="headerlink" href="#module-prepare_flexpart" title="Permalink to this headline">¶</a></h3>
+<dl class="function">
+<dt id="prepare_flexpart.main">
+<code class="descclassname">prepare_flexpart.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/prepare_flexpart.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#prepare_flexpart.main" title="Permalink to this definition">¶</a></dt>
+<dd><p>Controls the program to prepare flexpart input files from mars data.</p>
+<p>This is done if it is called directly from command line.
+Then it also takes program call arguments and control file input.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="prepare_flexpart.prepare_flexpart">
+<code class="descclassname">prepare_flexpart.</code><code class="descname">prepare_flexpart</code><span class="sig-paren">(</span><em>ppid</em>, <em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/prepare_flexpart.html#prepare_flexpart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#prepare_flexpart.prepare_flexpart" title="Permalink to this definition">¶</a></dt>
+<dd><p>Converts the mars data into flexpart ready input files.</p>
+<p>Specific data fields are converted to a different grid and the flux
+data are going to be disaggregated. The data fields are collected by
+hour and stored in a file with a specific FLEXPART relevant naming
+convention.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ppid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">int</span></code>) – Contains the ppid number of the current ECMWF job. It will be None if
+the method was called within this module.</li>
+<li><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and
+command line.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="module-tools">
+<span id="tools"></span><h3><a class="toc-backref" href="#id13">tools</a><a class="headerlink" href="#module-tools" title="Permalink to this headline">¶</a></h3>
+<dl class="function">
+<dt id="tools.clean_up">
+<code class="descclassname">tools.</code><code class="descname">clean_up</code><span class="sig-paren">(</span><em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#clean_up"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.clean_up" title="Permalink to this definition">¶</a></dt>
+<dd><p>Remove all files from intermediate directory (inputdir).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c</strong> (<a class="reference internal" href="#module-ControlFile" title="ControlFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ControlFile</span></code></a>) – Contains all the parameters of CONTROL file and
+command line.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.get_cmdline_arguments">
+<code class="descclassname">tools.</code><code class="descname">get_cmdline_arguments</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#get_cmdline_arguments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.get_cmdline_arguments" title="Permalink to this definition">¶</a></dt>
+<dd><p>Decomposes the command line arguments and assigns them to variables.
+Apply default values for non mentioned arguments.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>args</strong> – Contains the commandline arguments from script/program call.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Namespace</span></code></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.get_list_as_string">
+<code class="descclassname">tools.</code><code class="descname">get_list_as_string</code><span class="sig-paren">(</span><em>list_obj</em>, <em>concatenate_sign='</em>, <em>'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#get_list_as_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.get_list_as_string" title="Permalink to this definition">¶</a></dt>
+<dd><p>Converts a list of arbitrary content into a single string.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>list_obj</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code>) – A list with arbitrary content.</li>
+<li><strong>concatenate_sign</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – A string which is used to concatenate the single
+list elements. Default value is “, “.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>str_of_list</strong> – The content of the list as a single string.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.init128">
+<code class="descclassname">tools.</code><code class="descname">init128</code><span class="sig-paren">(</span><em>filepath</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#init128"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.init128" title="Permalink to this definition">¶</a></dt>
+<dd><p>Opens and reads the grib file with table 128 information.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filepath</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Path to file of ECMWF grib table number 128.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>table128</strong> – Contains the ECMWF grib table 128 information.
+The key is the parameter number and the value is the
+short name of the parameter.</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dictionary</span></code></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.make_dir">
+<code class="descclassname">tools.</code><code class="descname">make_dir</code><span class="sig-paren">(</span><em>directory</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#make_dir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.make_dir" title="Permalink to this definition">¶</a></dt>
+<dd><p>Creates a directory and gives a warning if the directory
+already exists. The program stops only if there is another problem.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>directory</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The directory name including the path which should be created.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.my_error">
+<code class="descclassname">tools.</code><code class="descname">my_error</code><span class="sig-paren">(</span><em>users</em>, <em>message='ERROR'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#my_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.my_error" title="Permalink to this definition">¶</a></dt>
+<dd><p>Prints a specified error message which can be passed to the function
+before exiting the program.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>user</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Contains all email addresses which should be notified.
+It might also contain just the ecmwf user name which wil trigger
+mailing to the associated email address for this user.</li>
+<li><strong>message</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Error message. Default value is “ERROR”.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.none_or_int">
+<code class="descclassname">tools.</code><code class="descname">none_or_int</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#none_or_int"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.none_or_int" title="Permalink to this definition">¶</a></dt>
+<dd><p>Converts the input string into pythons None-type if the string
+contains string “None”. Otherwise it is converted to an integer value.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – String to be checked for the “None” word.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Return depends on the content of the input value. If it was “None”,
+then the python type None is returned. Otherwise the string is
+converted into an integer value.</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None or int(value)</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.none_or_str">
+<code class="descclassname">tools.</code><code class="descname">none_or_str</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#none_or_str"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.none_or_str" title="Permalink to this definition">¶</a></dt>
+<dd><p>Converts the input string into pythons None-type if the string
+contains string “None”.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – String to be checked for the “None” word.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Return depends on the content of the input value. If it was “None”,
+then the python type None is returned. Otherwise the string itself.</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None or value</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.normal_exit">
+<code class="descclassname">tools.</code><code class="descname">normal_exit</code><span class="sig-paren">(</span><em>users</em>, <em>message='Done!'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#normal_exit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.normal_exit" title="Permalink to this definition">¶</a></dt>
+<dd><p>Prints a specific exit message which can be passed to the function.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>user</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Contains all email addresses which should be notified.
+It might also contain just the ecmwf user name which wil trigger
+mailing to the associated email address for this user.</li>
+<li><strong>message</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>, optional) – Message for exiting program. Default value is “Done!”.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.product">
+<code class="descclassname">tools.</code><code class="descname">product</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwds</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#product"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.product" title="Permalink to this definition">¶</a></dt>
+<dd><p>This method combines the single characters of the passed arguments
+with each other. So that each character of each argument value
+will be combined with each character of the other arguments as a tuple.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">This method is taken from an example at the ECMWF wiki website.
+<a class="reference external" href="https://software.ecmwf.int/wiki/display/GRIB/index.py">https://software.ecmwf.int/wiki/display/GRIB/index.py</a>; 2018-03-16</p>
+</div>
+<p class="rubric">Example</p>
+<p>product(‘ABCD’, ‘xy’) –&gt; Ax Ay Bx By Cx Cy Dx Dy</p>
+<p>product(range(2), repeat = 3) –&gt; 000 001 010 011 100 101 110 111</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>*args</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">tuple</span></code>) – Positional arguments (arbitrary number).</li>
+<li><strong>**kwds</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">dictionary</span></code>) – Contains all the keyword arguments from *args.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>prod</strong> – Return will be done with “yield”. A tuple of combined arguments.
+See example in description above.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tuple</span></code></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.put_file_to_ecserver">
+<code class="descclassname">tools.</code><code class="descname">put_file_to_ecserver</code><span class="sig-paren">(</span><em>ecd</em>, <em>filename</em>, <em>target</em>, <em>ecuid</em>, <em>ecgid</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#put_file_to_ecserver"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.put_file_to_ecserver" title="Permalink to this definition">¶</a></dt>
+<dd><p>Uses the ecaccess-file-put command to send a file to the ECMWF servers.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">The return value is just for testing reasons. It does not have
+to be used from the calling function since the whole error handling
+is done in here.</p>
+</div>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>ecd</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The path were the file is stored.</li>
+<li><strong>filename</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The name of the file to send to the ECMWF server.</li>
+<li><strong>target</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The target queue where the file should be sent to.</li>
+<li><strong>ecuid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The user id on ECMWF server.</li>
+<li><strong>ecgid</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The group id on ECMWF server.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>rcode</strong> – Resulting code of command execution. If successful the string
+will be empty.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.read_ecenv">
+<code class="descclassname">tools.</code><code class="descname">read_ecenv</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#read_ecenv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.read_ecenv" title="Permalink to this definition">¶</a></dt>
+<dd><p>Reads the file into a dictionary where the key values are the parameter
+names.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Path to file where the ECMWF environment parameters are stored.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>envs</strong> – Contains the environment parameter ecuid, ecgid, gateway
+and destination for ECMWF server environments.</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dictionary</span></code></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.silent_remove">
+<code class="descclassname">tools.</code><code class="descname">silent_remove</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#silent_remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.silent_remove" title="Permalink to this definition">¶</a></dt>
+<dd><p>Remove file if it exists.
+The function does not fail if the file does not exist.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The name of the file to be removed without notification.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.submit_job_to_ecserver">
+<code class="descclassname">tools.</code><code class="descname">submit_job_to_ecserver</code><span class="sig-paren">(</span><em>target</em>, <em>jobname</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#submit_job_to_ecserver"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.submit_job_to_ecserver" title="Permalink to this definition">¶</a></dt>
+<dd><p>Uses ecaccess-job-submit command to submit a job to the ECMWF server.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">The return value is just for testing reasons. It does not have
+to be used from the calling function since the whole error handling
+is done in here.</p>
+</div>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>target</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The target where the file should be sent to, e.g. the queue.</li>
+<li><strong>jobname</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – The name of the jobfile to be submitted to the ECMWF server.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>rcode</strong> – Resulting code of command execution. If successful the string
+will contain an integer number, representing the id of the job
+at the ecmwf server.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="tools.to_param_id">
+<code class="descclassname">tools.</code><code class="descname">to_param_id</code><span class="sig-paren">(</span><em>pars</em>, <em>table</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tools.html#to_param_id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#tools.to_param_id" title="Permalink to this definition">¶</a></dt>
+<dd><p>Transform parameter names to parameter ids with ECMWF grib table 128.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>pars</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">string</span></code>) – Addpar argument from CONTROL file in the format of
+parameter names instead of ids. The parameter short
+names are sepearted with “/” and they are passed as
+one single string.</li>
+<li><strong>table</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">dictionary</span></code>) – Contains the ECMWF grib table 128 information.
+The key is the parameter number and the value is the
+short name of the parameter.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>ipar</strong> – List of addpar parameters from CONTROL file transformed to
+parameter ids in the format of integer.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">integer</span></code></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="module-disaggregation">
+<span id="disaggregation"></span><h3><a class="toc-backref" href="#id14">disaggregation</a><a class="headerlink" href="#module-disaggregation" title="Permalink to this headline">¶</a></h3>
 <dl class="function">
 <dt id="disaggregation.IA3">
@@ -274,4 +1429,6 @@
 
 </div>
+</div>
+</div>
 
 
@@ -286,5 +1443,5 @@
       
       
-        <a href="user_guide.html" class="btn btn-neutral" title="User Guide" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+        <a href="user_guide/control_templates.html" class="btn btn-neutral" title="CONTROL-file templates" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
       
     </div>
Index: documentation/Sphinx/build/html/downloads.html
===================================================================
--- documentation/Sphinx/build/html/downloads.html	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/downloads.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -29,6 +29,6 @@
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="Installation" href="installation.html" />
-    <link rel="prev" title="Welcome to flex_extract’s documentation!" href="index.html" /> 
+    <link rel="next" title="Download tar-balls" href="downloads/tar_balls.html" />
+    <link rel="prev" title="Welcome to flex_extract’s user documentation!" href="index.html" /> 
 
   
@@ -85,5 +85,10 @@
               <p class="caption"><span class="caption-text">Table of Contents:</span></p>
 <ul class="current">
-<li class="toctree-l1 current"><a class="current reference internal" href="#">Downloads</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Downloads</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="downloads/tar_balls.html">Download tar-balls</a></li>
+<li class="toctree-l2"><a class="reference internal" href="downloads/git_repo.html">Git Repository</a></li>
+<li class="toctree-l2"><a class="reference internal" href="downloads/history_changes.html">History of Changes</a></li>
+</ul>
+</li>
 <li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="program_structure.html">Program Structure</a></li>
@@ -160,4 +165,6 @@
 <blockquote>
 <div>UNDER CONSTRUCTION</div></blockquote>
+<div class="toctree-wrapper compound">
+</div>
 </div>
 
@@ -170,8 +177,8 @@
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="installation.html" class="btn btn-neutral float-right" title="Installation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
-      
-      
-        <a href="index.html" class="btn btn-neutral" title="Welcome to flex_extract’s documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+        <a href="downloads/tar_balls.html" class="btn btn-neutral float-right" title="Download tar-balls" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="index.html" class="btn btn-neutral" title="Welcome to flex_extract’s user documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
       
     </div>
Index: documentation/Sphinx/build/html/downloads/git_repo.html
===================================================================
--- documentation/Sphinx/build/html/downloads/git_repo.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/downloads/git_repo.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,236 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Git Repository &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="History of Changes" href="history_changes.html" />
+    <link rel="prev" title="Download tar-balls" href="tar_balls.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1 current"><a class="reference internal" href="../downloads.html">Downloads</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="tar_balls.html">Download tar-balls</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Git Repository</a></li>
+<li class="toctree-l2"><a class="reference internal" href="history_changes.html">History of Changes</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../downloads.html">Downloads</a> &raquo;</li>
+        
+      <li>Git Repository</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/downloads/git_repo.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="git-repository">
+<h1>Git Repository<a class="headerlink" href="#git-repository" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="history_changes.html" class="btn btn-neutral float-right" title="History of Changes" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="tar_balls.html" class="btn btn-neutral" title="Download tar-balls" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/downloads/history_changes.html
===================================================================
--- documentation/Sphinx/build/html/downloads/history_changes.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/downloads/history_changes.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,236 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>History of Changes &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="Installation" href="../installation.html" />
+    <link rel="prev" title="Git Repository" href="git_repo.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1 current"><a class="reference internal" href="../downloads.html">Downloads</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="tar_balls.html">Download tar-balls</a></li>
+<li class="toctree-l2"><a class="reference internal" href="git_repo.html">Git Repository</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">History of Changes</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../downloads.html">Downloads</a> &raquo;</li>
+        
+      <li>History of Changes</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/downloads/history_changes.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="history-of-changes">
+<h1>History of Changes<a class="headerlink" href="#history-of-changes" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="../installation.html" class="btn btn-neutral float-right" title="Installation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="git_repo.html" class="btn btn-neutral" title="Git Repository" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/downloads/tar_balls.html
===================================================================
--- documentation/Sphinx/build/html/downloads/tar_balls.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/downloads/tar_balls.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,236 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Download tar-balls &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="Git Repository" href="git_repo.html" />
+    <link rel="prev" title="Downloads" href="../downloads.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1 current"><a class="reference internal" href="../downloads.html">Downloads</a><ul class="current">
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Download tar-balls</a></li>
+<li class="toctree-l2"><a class="reference internal" href="git_repo.html">Git Repository</a></li>
+<li class="toctree-l2"><a class="reference internal" href="history_changes.html">History of Changes</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../downloads.html">Downloads</a> &raquo;</li>
+        
+      <li>Download tar-balls</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/downloads/tar_balls.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="download-tar-balls">
+<h1>Download tar-balls<a class="headerlink" href="#download-tar-balls" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="git_repo.html" class="btn btn-neutral float-right" title="Git Repository" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="../downloads.html" class="btn btn-neutral" title="Downloads" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/genindex.html
===================================================================
--- documentation/Sphinx/build/html/genindex.html	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/genindex.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -156,8 +156,56 @@
 
 <div class="genindex-jumpbox">
- <a href="#D"><strong>D</strong></a>
+ <a href="#A"><strong>A</strong></a>
+ | <a href="#C"><strong>C</strong></a>
+ | <a href="#D"><strong>D</strong></a>
+ | <a href="#E"><strong>E</strong></a>
+ | <a href="#G"><strong>G</strong></a>
  | <a href="#I"><strong>I</strong></a>
+ | <a href="#M"><strong>M</strong></a>
+ | <a href="#N"><strong>N</strong></a>
+ | <a href="#P"><strong>P</strong></a>
+ | <a href="#R"><strong>R</strong></a>
+ | <a href="#S"><strong>S</strong></a>
+ | <a href="#T"><strong>T</strong></a>
+ | <a href="#U"><strong>U</strong></a>
+ | <a href="#W"><strong>W</strong></a>
  
 </div>
+<h2 id="A">A</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#ControlFile.ControlFile.assign_args_to_control">assign_args_to_control() (ControlFile.ControlFile method)</a>
+</li>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#ControlFile.ControlFile.assign_envs_to_control">assign_envs_to_control() (ControlFile.ControlFile method)</a>
+</li>
+  </ul></td>
+</tr></table>
+
+<h2 id="C">C</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#ControlFile.ControlFile.check_conditions">check_conditions() (ControlFile.ControlFile method)</a>
+</li>
+      <li><a href="api.html#ControlFile.ControlFile.check_install_conditions">check_install_conditions() (ControlFile.ControlFile method)</a>
+</li>
+      <li><a href="api.html#tools.clean_up">clean_up() (in module tools)</a>
+</li>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#ControlFile.ControlFile">ControlFile (class in ControlFile)</a>
+
+      <ul>
+        <li><a href="api.html#module-ControlFile">(module)</a>
+</li>
+      </ul></li>
+      <li><a href="api.html#GribTools.GribTools.copy">copy() (GribTools.GribTools method)</a>
+</li>
+      <li><a href="api.html#EcFlexpart.EcFlexpart.create">create() (EcFlexpart.EcFlexpart method)</a>
+</li>
+  </ul></td>
+</tr></table>
+
 <h2 id="D">D</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
@@ -165,10 +213,60 @@
       <li><a href="api.html#disaggregation.dapoly">dapoly() (in module disaggregation)</a>
 </li>
-  </ul></td>
-  <td style="width: 33%; vertical-align: top;"><ul>
       <li><a href="api.html#disaggregation.darain">darain() (in module disaggregation)</a>
 </li>
+      <li><a href="api.html#MarsRetrieval.MarsRetrieval.data_retrieve">data_retrieve() (MarsRetrieval.MarsRetrieval method)</a>
+</li>
+      <li><a href="api.html#EcFlexpart.EcFlexpart.deacc_fluxes">deacc_fluxes() (EcFlexpart.EcFlexpart method)</a>
+</li>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#install.delete_convert_build">delete_convert_build() (in module install)</a>
+</li>
+      <li><a href="api.html#UioFiles.UioFiles.delete_files">delete_files() (UioFiles.UioFiles method)</a>
+</li>
       <li><a href="api.html#module-disaggregation">disaggregation (module)</a>
 </li>
+      <li><a href="api.html#MarsRetrieval.MarsRetrieval.display_info">display_info() (MarsRetrieval.MarsRetrieval method)</a>
+</li>
+      <li><a href="api.html#get_mars_data.do_retrievement">do_retrievement() (in module get_mars_data)</a>
+</li>
+  </ul></td>
+</tr></table>
+
+<h2 id="E">E</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#EcFlexpart.EcFlexpart">EcFlexpart (class in EcFlexpart)</a>
+
+      <ul>
+        <li><a href="api.html#module-EcFlexpart">(module)</a>
+</li>
+      </ul></li>
+  </ul></td>
+</tr></table>
+
+<h2 id="G">G</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#tools.get_cmdline_arguments">get_cmdline_arguments() (in module tools)</a>
+</li>
+      <li><a href="api.html#install.get_install_cmdline_arguments">get_install_cmdline_arguments() (in module install)</a>
+</li>
+      <li><a href="api.html#GribTools.GribTools.get_keys">get_keys() (GribTools.GribTools method)</a>
+</li>
+      <li><a href="api.html#tools.get_list_as_string">get_list_as_string() (in module tools)</a>
+</li>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#module-get_mars_data">get_mars_data (module)</a>
+</li>
+      <li><a href="api.html#get_mars_data.get_mars_data">get_mars_data() (in module get_mars_data)</a>
+</li>
+      <li><a href="api.html#GribTools.GribTools">GribTools (class in GribTools)</a>
+
+      <ul>
+        <li><a href="api.html#module-GribTools">(module)</a>
+</li>
+      </ul></li>
   </ul></td>
 </tr></table>
@@ -178,4 +276,158 @@
   <td style="width: 33%; vertical-align: top;"><ul>
       <li><a href="api.html#disaggregation.IA3">IA3() (in module disaggregation)</a>
+</li>
+      <li><a href="api.html#GribTools.GribTools.index">index() (GribTools.GribTools method)</a>
+</li>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#tools.init128">init128() (in module tools)</a>
+</li>
+      <li><a href="api.html#module-install">install (module)</a>
+</li>
+      <li><a href="api.html#install.install_via_gateway">install_via_gateway() (in module install)</a>
+</li>
+  </ul></td>
+</tr></table>
+
+<h2 id="M">M</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#get_mars_data.main">main() (in module get_mars_data)</a>
+
+      <ul>
+        <li><a href="api.html#install.main">(in module install)</a>
+</li>
+        <li><a href="api.html#prepare_flexpart.main">(in module prepare_flexpart)</a>
+</li>
+        <li><a href="api.html#submit.main">(in module submit)</a>
+</li>
+      </ul></li>
+      <li><a href="api.html#install.make_convert_build">make_convert_build() (in module install)</a>
+</li>
+      <li><a href="api.html#tools.make_dir">make_dir() (in module tools)</a>
+</li>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#MarsRetrieval.MarsRetrieval">MarsRetrieval (class in MarsRetrieval)</a>
+
+      <ul>
+        <li><a href="api.html#module-MarsRetrieval">(module)</a>
+</li>
+      </ul></li>
+      <li><a href="api.html#install.mk_compilejob">mk_compilejob() (in module install)</a>
+</li>
+      <li><a href="api.html#install.mk_env_vars">mk_env_vars() (in module install)</a>
+</li>
+      <li><a href="api.html#install.mk_job_template">mk_job_template() (in module install)</a>
+</li>
+      <li><a href="api.html#install.mk_tarball">mk_tarball() (in module install)</a>
+</li>
+      <li><a href="api.html#tools.my_error">my_error() (in module tools)</a>
+</li>
+  </ul></td>
+</tr></table>
+
+<h2 id="N">N</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#tools.none_or_int">none_or_int() (in module tools)</a>
+</li>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#tools.none_or_str">none_or_str() (in module tools)</a>
+</li>
+      <li><a href="api.html#tools.normal_exit">normal_exit() (in module tools)</a>
+</li>
+  </ul></td>
+</tr></table>
+
+<h2 id="P">P</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#module-prepare_flexpart">prepare_flexpart (module)</a>
+</li>
+      <li><a href="api.html#prepare_flexpart.prepare_flexpart">prepare_flexpart() (in module prepare_flexpart)</a>
+</li>
+      <li><a href="api.html#EcFlexpart.EcFlexpart.prepare_fp_files">prepare_fp_files() (EcFlexpart.EcFlexpart method)</a>
+</li>
+      <li><a href="api.html#MarsRetrieval.MarsRetrieval.print_info">print_info() (MarsRetrieval.MarsRetrieval method)</a>
+</li>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#MarsRetrieval.MarsRetrieval.print_infodata_csv">print_infodata_csv() (MarsRetrieval.MarsRetrieval method)</a>
+</li>
+      <li><a href="api.html#EcFlexpart.EcFlexpart.process_output">process_output() (EcFlexpart.EcFlexpart method)</a>
+</li>
+      <li><a href="api.html#tools.product">product() (in module tools)</a>
+</li>
+      <li><a href="api.html#tools.put_file_to_ecserver">put_file_to_ecserver() (in module tools)</a>
+</li>
+  </ul></td>
+</tr></table>
+
+<h2 id="R">R</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#tools.read_ecenv">read_ecenv() (in module tools)</a>
+</li>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#EcFlexpart.EcFlexpart.retrieve">retrieve() (EcFlexpart.EcFlexpart method)</a>
+</li>
+  </ul></td>
+</tr></table>
+
+<h2 id="S">S</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#GribTools.GribTools.set_keys">set_keys() (GribTools.GribTools method)</a>
+</li>
+      <li><a href="api.html#tools.silent_remove">silent_remove() (in module tools)</a>
+</li>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#module-submit">submit (module)</a>
+</li>
+      <li><a href="api.html#submit.submit">submit() (in module submit)</a>
+</li>
+      <li><a href="api.html#tools.submit_job_to_ecserver">submit_job_to_ecserver() (in module tools)</a>
+</li>
+  </ul></td>
+</tr></table>
+
+<h2 id="T">T</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#ControlFile.ControlFile.to_list">to_list() (ControlFile.ControlFile method)</a>
+</li>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#tools.to_param_id">to_param_id() (in module tools)</a>
+</li>
+      <li><a href="api.html#module-tools">tools (module)</a>
+</li>
+  </ul></td>
+</tr></table>
+
+<h2 id="U">U</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#UioFiles.UioFiles">UioFiles (class in UioFiles)</a>
+
+      <ul>
+        <li><a href="api.html#module-UioFiles">(module)</a>
+</li>
+      </ul></li>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#install.un_tarball">un_tarball() (in module install)</a>
+</li>
+  </ul></td>
+</tr></table>
+
+<h2 id="W">W</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="api.html#EcFlexpart.EcFlexpart.write_namelist">write_namelist() (EcFlexpart.EcFlexpart method)</a>
 </li>
   </ul></td>
Index: documentation/Sphinx/build/html/index.html
===================================================================
--- documentation/Sphinx/build/html/index.html	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/index.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -9,5 +9,5 @@
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Welcome to flex_extract’s documentation! &mdash; flex_extract 7.1 alpha documentation</title>
+  <title>Welcome to flex_extract’s user documentation! &mdash; flex_extract 7.1 alpha documentation</title>
   
 
@@ -135,5 +135,5 @@
       <li><a href="#">Docs</a> &raquo;</li>
         
-      <li>Welcome to flex_extract’s documentation!</li>
+      <li>Welcome to flex_extract’s user documentation!</li>
     
     
@@ -154,6 +154,8 @@
            <div itemprop="articleBody">
             
-  <div class="section" id="welcome-to-flex-extract-s-documentation">
-<h1>Welcome to flex_extract’s documentation!<a class="headerlink" href="#welcome-to-flex-extract-s-documentation" title="Permalink to this headline">¶</a></h1>
+  <div class="section" id="welcome-to-flex-extract-s-user-documentation">
+<h1>Welcome to flex_extract’s user documentation!<a class="headerlink" href="#welcome-to-flex-extract-s-user-documentation" title="Permalink to this headline">¶</a></h1>
+<p>flex_extract is a software to retrieve meteorological fields from the European Centre for Medium-Range Weather Forecasts (ECMWF) Mars archive to server as input files for the FLEXTRA/FLEXPART Atmospheric Transport Modelling system.</p>
+<p>All required second party software and libraries used within flex_extract is open source and free of charge.</p>
 <table style="width:100%;">
   <tr>
@@ -239,5 +241,27 @@
 <li class="toctree-l1"><a class="reference internal" href="program_structure.html">Program Structure</a></li>
 <li class="toctree-l1"><a class="reference internal" href="user_guide.html">User Guide</a></li>
-<li class="toctree-l1"><a class="reference internal" href="api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="api.html">Auto Generated Documentation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="api.html#porgrams">Porgrams</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="api.html#module-install">install</a></li>
+<li class="toctree-l3"><a class="reference internal" href="api.html#module-submit">submit</a></li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="api.html#classes">Classes</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="api.html#module-ControlFile">ControlFile</a></li>
+<li class="toctree-l3"><a class="reference internal" href="api.html#module-EcFlexpart">EcFlexpart</a></li>
+<li class="toctree-l3"><a class="reference internal" href="api.html#module-GribTools">GribTools</a></li>
+<li class="toctree-l3"><a class="reference internal" href="api.html#module-MarsRetrieval">MarsRetrieval</a></li>
+<li class="toctree-l3"><a class="reference internal" href="api.html#module-UioFiles">UioFiles</a></li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="api.html#modules">Modules</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="api.html#module-get_mars_data">get_mars_data</a></li>
+<li class="toctree-l3"><a class="reference internal" href="api.html#module-prepare_flexpart">prepare_flexpart</a></li>
+<li class="toctree-l3"><a class="reference internal" href="api.html#module-tools">tools</a></li>
+<li class="toctree-l3"><a class="reference internal" href="api.html#module-disaggregation">disaggregation</a></li>
+</ul>
+</li>
+</ul>
+</li>
 <li class="toctree-l1"><a class="reference internal" href="support.html">Support</a></li>
 </ul>
Index: documentation/Sphinx/build/html/installation.html
===================================================================
--- documentation/Sphinx/build/html/installation.html	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/installation.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -29,6 +29,6 @@
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="Usage" href="usage.html" />
-    <link rel="prev" title="Requirements" href="requirements.html" /> 
+    <link rel="next" title="Requirements" href="installation/requirements.html" />
+    <link rel="prev" title="Downloads" href="downloads.html" /> 
 
   
@@ -83,10 +83,17 @@
             
             
-              <p class="caption"><span class="caption-text">Contents:</span></p>
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
 <ul class="current">
-<li class="toctree-l1"><a class="reference internal" href="requirements.html">Requirements</a></li>
-<li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a></li>
-<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage</a></li>
-<li class="toctree-l1"><a class="reference internal" href="API.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="downloads.html">Downloads</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="installation/requirements.html">Requirements</a></li>
+<li class="toctree-l2"><a class="reference internal" href="installation/oper_modes.html">Operating modes</a></li>
+<li class="toctree-l2"><a class="reference internal" href="installation/test_install.html">Installation test</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="support.html">Support</a></li>
 </ul>
 
@@ -155,7 +162,8 @@
   <div class="section" id="installation">
 <h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
-<p>Describe installation process flex_extract ….</p>
 <blockquote>
 <div>UNDER CONSTRUCTION</div></blockquote>
+<div class="toctree-wrapper compound">
+</div>
 </div>
 
@@ -168,8 +176,8 @@
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="usage.html" class="btn btn-neutral float-right" title="Usage" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
-      
-      
-        <a href="requirements.html" class="btn btn-neutral" title="Requirements" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+        <a href="installation/requirements.html" class="btn btn-neutral float-right" title="Requirements" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="downloads.html" class="btn btn-neutral" title="Downloads" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
       
     </div>
Index: documentation/Sphinx/build/html/installation/oper_modes.html
===================================================================
--- documentation/Sphinx/build/html/installation/oper_modes.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/installation/oper_modes.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,236 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Operating modes &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="Installation test" href="test_install.html" />
+    <link rel="prev" title="Requirements" href="requirements.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="../installation.html">Installation</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="requirements.html">Requirements</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Operating modes</a></li>
+<li class="toctree-l2"><a class="reference internal" href="test_install.html">Installation test</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../installation.html">Installation</a> &raquo;</li>
+        
+      <li>Operating modes</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/installation/oper_modes.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="operating-modes">
+<h1>Operating modes<a class="headerlink" href="#operating-modes" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="test_install.html" class="btn btn-neutral float-right" title="Installation test" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="requirements.html" class="btn btn-neutral" title="Requirements" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/installation/requirements.html
===================================================================
--- documentation/Sphinx/build/html/installation/requirements.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/installation/requirements.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,236 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Requirements &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="Operating modes" href="oper_modes.html" />
+    <link rel="prev" title="Installation" href="../installation.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="../installation.html">Installation</a><ul class="current">
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Requirements</a></li>
+<li class="toctree-l2"><a class="reference internal" href="oper_modes.html">Operating modes</a></li>
+<li class="toctree-l2"><a class="reference internal" href="test_install.html">Installation test</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../installation.html">Installation</a> &raquo;</li>
+        
+      <li>Requirements</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/installation/requirements.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="requirements">
+<h1>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="oper_modes.html" class="btn btn-neutral float-right" title="Operating modes" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="../installation.html" class="btn btn-neutral" title="Installation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/installation/test_install.html
===================================================================
--- documentation/Sphinx/build/html/installation/test_install.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/installation/test_install.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,236 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Installation test &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="Program Structure" href="../program_structure.html" />
+    <link rel="prev" title="Operating modes" href="oper_modes.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="../installation.html">Installation</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="requirements.html">Requirements</a></li>
+<li class="toctree-l2"><a class="reference internal" href="oper_modes.html">Operating modes</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Installation test</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../installation.html">Installation</a> &raquo;</li>
+        
+      <li>Installation test</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/installation/test_install.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="installation-test">
+<h1>Installation test<a class="headerlink" href="#installation-test" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="../program_structure.html" class="btn btn-neutral float-right" title="Program Structure" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="oper_modes.html" class="btn btn-neutral" title="Operating modes" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/oper_modes.html
===================================================================
--- documentation/Sphinx/build/html/oper_modes.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/oper_modes.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,236 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Operating modes &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Installation test" href="test_install.html" />
+    <link rel="prev" title="Requirements" href="requirements.html" /> 
+
+  
+  <script src="_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="downloads.html">Downloads</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="installation.html">Installation</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="requirements.html">Requirements</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Operating modes</a></li>
+<li class="toctree-l2"><a class="reference internal" href="test_install.html">Installation test</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="installation.html">Installation</a> &raquo;</li>
+        
+      <li>Operating modes</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="_sources/oper_modes.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="operating-modes">
+<h1>Operating modes<a class="headerlink" href="#operating-modes" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="test_install.html" class="btn btn-neutral float-right" title="Installation test" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="requirements.html" class="btn btn-neutral" title="Requirements" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'./',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="_static/jquery.js"></script>
+      <script type="text/javascript" src="_static/underscore.js"></script>
+      <script type="text/javascript" src="_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/program_structure.html
===================================================================
--- documentation/Sphinx/build/html/program_structure.html	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/program_structure.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -29,6 +29,6 @@
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="User Guide" href="user_guide.html" />
-    <link rel="prev" title="Installation" href="installation.html" /> 
+    <link rel="next" title="Program Overview" href="program_structure/prog_overview.html" />
+    <link rel="prev" title="Installation test" href="installation/test_install.html" /> 
 
   
@@ -87,5 +87,10 @@
 <li class="toctree-l1"><a class="reference internal" href="downloads.html">Downloads</a></li>
 <li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
-<li class="toctree-l1 current"><a class="current reference internal" href="#">Program Structure</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Program Structure</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="program_structure/prog_overview.html">Program Overview</a></li>
+<li class="toctree-l2"><a class="reference internal" href="program_structure/prog_components.html">Program Components</a></li>
+<li class="toctree-l2"><a class="reference internal" href="program_structure/prog_flow.html">Program Flow</a></li>
+</ul>
+</li>
 <li class="toctree-l1"><a class="reference internal" href="user_guide.html">User Guide</a></li>
 <li class="toctree-l1"><a class="reference internal" href="api.html">Auto Generated Documentation</a></li>
@@ -160,4 +165,6 @@
 <blockquote>
 <div>UNDER CONSTRUCTION</div></blockquote>
+<div class="toctree-wrapper compound">
+</div>
 </div>
 
@@ -170,8 +177,8 @@
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="user_guide.html" class="btn btn-neutral float-right" title="User Guide" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
-      
-      
-        <a href="installation.html" class="btn btn-neutral" title="Installation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+        <a href="program_structure/prog_overview.html" class="btn btn-neutral float-right" title="Program Overview" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="installation/test_install.html" class="btn btn-neutral" title="Installation test" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
       
     </div>
Index: documentation/Sphinx/build/html/program_structure/prog_components.html
===================================================================
--- documentation/Sphinx/build/html/program_structure/prog_components.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/program_structure/prog_components.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,236 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Program Components &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="Program Flow" href="prog_flow.html" />
+    <link rel="prev" title="Program Overview" href="prog_overview.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="../program_structure.html">Program Structure</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="prog_overview.html">Program Overview</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Program Components</a></li>
+<li class="toctree-l2"><a class="reference internal" href="prog_flow.html">Program Flow</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../program_structure.html">Program Structure</a> &raquo;</li>
+        
+      <li>Program Components</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/program_structure/prog_components.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="program-components">
+<h1>Program Components<a class="headerlink" href="#program-components" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="prog_flow.html" class="btn btn-neutral float-right" title="Program Flow" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="prog_overview.html" class="btn btn-neutral" title="Program Overview" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/program_structure/prog_flow.html
===================================================================
--- documentation/Sphinx/build/html/program_structure/prog_flow.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/program_structure/prog_flow.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,236 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Program Flow &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="User Guide" href="../user_guide.html" />
+    <link rel="prev" title="Program Components" href="prog_components.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="../program_structure.html">Program Structure</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="prog_overview.html">Program Overview</a></li>
+<li class="toctree-l2"><a class="reference internal" href="prog_components.html">Program Components</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Program Flow</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../program_structure.html">Program Structure</a> &raquo;</li>
+        
+      <li>Program Flow</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/program_structure/prog_flow.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="program-flow">
+<h1>Program Flow<a class="headerlink" href="#program-flow" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="../user_guide.html" class="btn btn-neutral float-right" title="User Guide" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="prog_components.html" class="btn btn-neutral" title="Program Components" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/program_structure/prog_overview.html
===================================================================
--- documentation/Sphinx/build/html/program_structure/prog_overview.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/program_structure/prog_overview.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,236 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Program Overview &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="Program Components" href="prog_components.html" />
+    <link rel="prev" title="Program Structure" href="../program_structure.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="../program_structure.html">Program Structure</a><ul class="current">
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Program Overview</a></li>
+<li class="toctree-l2"><a class="reference internal" href="prog_components.html">Program Components</a></li>
+<li class="toctree-l2"><a class="reference internal" href="prog_flow.html">Program Flow</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../program_structure.html">Program Structure</a> &raquo;</li>
+        
+      <li>Program Overview</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/program_structure/prog_overview.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="program-overview">
+<h1>Program Overview<a class="headerlink" href="#program-overview" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="prog_components.html" class="btn btn-neutral float-right" title="Program Components" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="../program_structure.html" class="btn btn-neutral" title="Program Structure" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/py-modindex.html
===================================================================
--- documentation/Sphinx/build/html/py-modindex.html	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/py-modindex.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -160,8 +160,25 @@
 
    <div class="modindex-jumpbox">
-   <a href="#cap-d"><strong>d</strong></a>
+   <a href="#cap-c"><strong>c</strong></a> | 
+   <a href="#cap-d"><strong>d</strong></a> | 
+   <a href="#cap-e"><strong>e</strong></a> | 
+   <a href="#cap-g"><strong>g</strong></a> | 
+   <a href="#cap-i"><strong>i</strong></a> | 
+   <a href="#cap-m"><strong>m</strong></a> | 
+   <a href="#cap-p"><strong>p</strong></a> | 
+   <a href="#cap-s"><strong>s</strong></a> | 
+   <a href="#cap-t"><strong>t</strong></a> | 
+   <a href="#cap-u"><strong>u</strong></a>
    </div>
 
    <table class="indextable modindextable">
+     <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
+     <tr class="cap" id="cap-c"><td></td><td>
+       <strong>c</strong></td><td></td></tr>
+     <tr>
+       <td></td>
+       <td>
+       <a href="api.html#module-ControlFile"><code class="xref">ControlFile</code></a></td><td>
+       <em></em></td></tr>
      <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
      <tr class="cap" id="cap-d"><td></td><td>
@@ -171,4 +188,73 @@
        <td>
        <a href="api.html#module-disaggregation"><code class="xref">disaggregation</code></a></td><td>
+       <em></em></td></tr>
+     <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
+     <tr class="cap" id="cap-e"><td></td><td>
+       <strong>e</strong></td><td></td></tr>
+     <tr>
+       <td></td>
+       <td>
+       <a href="api.html#module-EcFlexpart"><code class="xref">EcFlexpart</code></a></td><td>
+       <em></em></td></tr>
+     <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
+     <tr class="cap" id="cap-g"><td></td><td>
+       <strong>g</strong></td><td></td></tr>
+     <tr>
+       <td></td>
+       <td>
+       <a href="api.html#module-get_mars_data"><code class="xref">get_mars_data</code></a></td><td>
+       <em></em></td></tr>
+     <tr>
+       <td></td>
+       <td>
+       <a href="api.html#module-GribTools"><code class="xref">GribTools</code></a></td><td>
+       <em></em></td></tr>
+     <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
+     <tr class="cap" id="cap-i"><td></td><td>
+       <strong>i</strong></td><td></td></tr>
+     <tr>
+       <td></td>
+       <td>
+       <a href="api.html#module-install"><code class="xref">install</code></a></td><td>
+       <em></em></td></tr>
+     <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
+     <tr class="cap" id="cap-m"><td></td><td>
+       <strong>m</strong></td><td></td></tr>
+     <tr>
+       <td></td>
+       <td>
+       <a href="api.html#module-MarsRetrieval"><code class="xref">MarsRetrieval</code></a></td><td>
+       <em></em></td></tr>
+     <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
+     <tr class="cap" id="cap-p"><td></td><td>
+       <strong>p</strong></td><td></td></tr>
+     <tr>
+       <td></td>
+       <td>
+       <a href="api.html#module-prepare_flexpart"><code class="xref">prepare_flexpart</code></a></td><td>
+       <em></em></td></tr>
+     <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
+     <tr class="cap" id="cap-s"><td></td><td>
+       <strong>s</strong></td><td></td></tr>
+     <tr>
+       <td></td>
+       <td>
+       <a href="api.html#module-submit"><code class="xref">submit</code></a></td><td>
+       <em></em></td></tr>
+     <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
+     <tr class="cap" id="cap-t"><td></td><td>
+       <strong>t</strong></td><td></td></tr>
+     <tr>
+       <td></td>
+       <td>
+       <a href="api.html#module-tools"><code class="xref">tools</code></a></td><td>
+       <em></em></td></tr>
+     <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
+     <tr class="cap" id="cap-u"><td></td><td>
+       <strong>u</strong></td><td></td></tr>
+     <tr>
+       <td></td>
+       <td>
+       <a href="api.html#module-UioFiles"><code class="xref">UioFiles</code></a></td><td>
        <em></em></td></tr>
    </table>
Index: documentation/Sphinx/build/html/requirements.html
===================================================================
--- documentation/Sphinx/build/html/requirements.html	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/requirements.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -29,6 +29,6 @@
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="Installation" href="installation.html" />
-    <link rel="prev" title="Welcome to flex_extract’s documentation!" href="index.html" /> 
+    <link rel="next" title="Operating modes" href="oper_modes.html" />
+    <link rel="prev" title="Installation" href="installation.html" /> 
 
   
@@ -83,10 +83,17 @@
             
             
-              <p class="caption"><span class="caption-text">Contents:</span></p>
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
 <ul class="current">
-<li class="toctree-l1 current"><a class="current reference internal" href="#">Requirements</a></li>
-<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
-<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage</a></li>
-<li class="toctree-l1"><a class="reference internal" href="API.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="downloads.html">Downloads</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="installation.html">Installation</a><ul class="current">
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Requirements</a></li>
+<li class="toctree-l2"><a class="reference internal" href="oper_modes.html">Operating modes</a></li>
+<li class="toctree-l2"><a class="reference internal" href="test_install.html">Installation test</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="support.html">Support</a></li>
 </ul>
 
@@ -133,4 +140,6 @@
     
       <li><a href="index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="installation.html">Installation</a> &raquo;</li>
         
       <li>Requirements</li>
@@ -155,5 +164,4 @@
   <div class="section" id="requirements">
 <h1>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h1>
-<p>Describe the requirements to use flex_extract ….</p>
 <blockquote>
 <div>UNDER CONSTRUCTION</div></blockquote>
@@ -168,8 +176,8 @@
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="installation.html" class="btn btn-neutral float-right" title="Installation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
-      
-      
-        <a href="index.html" class="btn btn-neutral" title="Welcome to flex_extract’s documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+        <a href="oper_modes.html" class="btn btn-neutral float-right" title="Operating modes" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="installation.html" class="btn btn-neutral" title="Installation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
       
     </div>
Index: documentation/Sphinx/build/html/searchindex.js
===================================================================
--- documentation/Sphinx/build/html/searchindex.js	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/searchindex.js	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -1,1 +1,1 @@
-Search.setIndex({docnames:["api","downloads","index","installation","program_structure","requirements","support","user_guide"],envversion:54,filenames:["api.rst","downloads.rst","index.rst","installation.rst","program_structure.rst","requirements.rst","support.rst","user_guide.rst"],objects:{"":{disaggregation:[0,0,0,"-"]},disaggregation:{IA3:[0,1,1,""],dapoly:[0,1,1,""],darain:[0,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:function"},terms:{"class":[],"default":[],"float":0,"function":[],"int":[],"new":0,"return":0,"short":[],For:0,Its:0,The:0,Uses:[],abcd:[],about:[],abov:[],accumlu:0,accumul:0,adapt:0,adaptaion:[],adding:0,addit:0,addition:0,addpar:[],address:[],advanc:0,afterward:0,algorithm:0,alist:0,all:0,alreadi:[],also:[],ann:0,anoth:[],api:2,appli:0,applic:0,arbitrari:[],arcad:[],arg:[],argument:[],argumentpars:[],arrai:0,array_t1:0,array_t2:0,array_t3:0,array_t4:0,articl:0,assign:[],associ:0,asteroid:[],attribut:0,author:0,auto:2,ball:2,base:0,beck:0,befor:[],book:[],box:0,bug:2,call:[],can:[],central:0,chang:2,changehistori:[],charact:[],check:[],clean_up:[],code:[],coin:[],collect:[],combin:[],command:[],commandlin:[],common:0,complet:0,compon:2,concaten:[],concatenate_sign:[],conserv:0,construct:[1,2,3,4,5,6,7],contain:[],content:2,control:2,controlfil:[],convert:[],copi:0,copyright:0,creat:[],creativ:0,creativecommon:0,cubic:0,dapoli:0,darain:0,data:0,date:[],deaccumul:0,decompos:[],depend:[],describ:[1,3,4,5,6,7],descript:[],destin:[],develop:0,dict:[],dictionari:[],differ:2,dimens:0,dimension:0,directori:[],disaggreg:0,disaggregationreg:[],dispers:0,displai:[],doc:[],doe:[],done:0,download:2,draw:[],dure:0,each:0,ecaccess:[],ecd:[],ecflexpart:[],ecgid:[],ecmwf:0,ecmwv:[],ecuid:[],element:[],email:[],empti:[],env:[],environ:[],equal:0,error:[],exampl:[],execut:[],exist:[],exit:[],extens:0,fail:[],faq:2,field:0,file:[],filenam:[],filepath:[],filter:0,flex_extract:[1,3,4,5,7],flexpart:0,flow:2,flux:0,format:[],fortran:0,from:0,full:[],gatewai:[],gener:2,geometr:0,geoscientif:0,get:[],get_cmdline_argu:[],get_list_as_str:[],git:2,github:[],give:[],given:[],grib:[],grid:0,group:[],guid:2,haimberg:0,handl:[],have:0,help:[],here:2,histori:2,hittmeir:0,horizont:0,how:2,http:0,ia3:0,ids:[],improv:0,includ:[],index:2,inform:0,init128:[],input:0,inputdir:[],instal:2,instanc:[],instead:[],integ:[],integr:0,intermedi:[],intern:0,interpol:0,interv:0,ipar:[],issu:2,itself:[],jame:0,job:[],jobfil:[],jobnam:[],june:0,just:[],keep:0,kei:[],keyword:[],known:2,kwd:[],lagrangian:0,learn:[],length:0,leopold:0,letter:0,licens:[0,2],line:[],linear:0,linux:[],list:[0,2],list_obj:[],mac:[],mail:2,make_dir:[],march:0,mean:0,mention:[],messag:[],method:[],might:[],migrat:0,mode:2,model:0,modifi:0,modul:2,monoton:0,more:0,mountain:0,my_error:[],name:[],neg:0,nfield:0,non:0,none:[],none_or_int:[],none_or_str:[],normal_exit:[],note:[],noth:[],notif:[],notifi:[],novemb:0,number:[],obj:[],one:2,onli:[],open:[],oper:2,option:[1,6],org:0,origin:0,originla:[],other:[],otherwis:[],output:0,overview:2,page:2,par:[],paramet:0,particl:0,pass:[],path:[],petra:0,philipp:0,point:0,polynomi:0,posit:[],primit:[],print:[],problem:[],process:3,prod:[],product:[],program:2,properti:0,pure:[],put:2,put_file_to_ecserv:[],python:0,quantiti:0,queue:[],quick:[],rainfal:0,rang:[],raw:0,rcode:[],read:[],read_ecenv:[],reason:[],reconstruct:0,refer:0,releas:[],remov:[],repeat:[],replac:[],repositori:2,repres:[],requir:2,rest:[],result:[],sabin:0,sampl:0,scheme:0,script:[],search:2,second:[],see:0,seibert:0,send:0,sent:[],sepeart:[],seri:0,server:[],should:[],silent_remov:[],sinc:[],singl:[],size:[],smasher:[],softwar:[],solut:0,sourc:0,specif:[],specifi:[],sprite:[],stop:[],store:[],str_of_list:[],string:[],structur:2,subgrid:0,submit:[],submit_job_to_ecserv:[],success:[],support:2,system:2,tabl:[],table128:[],taken:[],tar:2,target:[],templat:2,test:2,text:2,thei:[],them:[],thi:0,three:0,ticket:2,time:0,timeseri:0,timespan:0,to_param_id:[],tool:[],transform:[],trigger:[],tupl:[],two:0,type:0,under:[0,1,3,4,5,6,7],univers:0,usa:0,usag:[],use:[2,5],used:0,user:2,using:[0,7],valu:0,variabl:[],vienna:0,view:0,visit:0,warn:[],websit:[],were:[],where:[],which:[0,2],whole:[],wiki:[],wil:[],window:[],within:0,without:[],word:[],work:0,yield:[]},titles:["Auto Generated Documentation","Downloads","Welcome to flex_extract\u2019s documentation!","Installation","Program Structure","Requirements","Support","User Guide"],titleterms:{auto:0,document:[0,2],download:1,flex_extract:2,gener:0,guid:7,indic:2,instal:3,program:4,pure:[],requir:5,rest:[],structur:4,support:6,tabl:2,usag:[],user:7,welcom:2}})
+Search.setIndex({docnames:["api","downloads","downloads/git_repo","downloads/history_changes","downloads/tar_balls","index","installation","installation/oper_modes","installation/requirements","installation/test_install","program_structure","program_structure/prog_components","program_structure/prog_flow","program_structure/prog_overview","support","support/faq","support/known_bugs_issues","support/mailing_list","support/ticket_system","user_guide","user_guide/control_templates","user_guide/how_to"],envversion:54,filenames:["api.rst","downloads.rst","downloads/git_repo.rst","downloads/history_changes.rst","downloads/tar_balls.rst","index.rst","installation.rst","installation/oper_modes.rst","installation/requirements.rst","installation/test_install.rst","program_structure.rst","program_structure/prog_components.rst","program_structure/prog_flow.rst","program_structure/prog_overview.rst","support.rst","support/faq.rst","support/known_bugs_issues.rst","support/mailing_list.rst","support/ticket_system.rst","user_guide.rst","user_guide/control_templates.rst","user_guide/how_to.rst"],objects:{"":{ControlFile:[0,0,0,"-"],EcFlexpart:[0,0,0,"-"],GribTools:[0,0,0,"-"],MarsRetrieval:[0,0,0,"-"],UioFiles:[0,0,0,"-"],disaggregation:[0,0,0,"-"],get_mars_data:[0,0,0,"-"],install:[0,0,0,"-"],prepare_flexpart:[0,0,0,"-"],submit:[0,0,0,"-"],tools:[0,0,0,"-"]},"ControlFile.ControlFile":{assign_args_to_control:[0,2,1,""],assign_envs_to_control:[0,2,1,""],check_conditions:[0,2,1,""],check_install_conditions:[0,2,1,""],to_list:[0,2,1,""]},"EcFlexpart.EcFlexpart":{create:[0,2,1,""],deacc_fluxes:[0,2,1,""],prepare_fp_files:[0,2,1,""],process_output:[0,2,1,""],retrieve:[0,2,1,""],write_namelist:[0,2,1,""]},"GribTools.GribTools":{copy:[0,2,1,""],get_keys:[0,2,1,""],index:[0,2,1,""],set_keys:[0,2,1,""]},"MarsRetrieval.MarsRetrieval":{data_retrieve:[0,2,1,""],display_info:[0,2,1,""],print_info:[0,2,1,""],print_infodata_csv:[0,2,1,""]},"UioFiles.UioFiles":{delete_files:[0,2,1,""]},ControlFile:{ControlFile:[0,1,1,""]},EcFlexpart:{EcFlexpart:[0,1,1,""]},GribTools:{GribTools:[0,1,1,""]},MarsRetrieval:{MarsRetrieval:[0,1,1,""]},UioFiles:{UioFiles:[0,1,1,""]},disaggregation:{IA3:[0,3,1,""],dapoly:[0,3,1,""],darain:[0,3,1,""]},get_mars_data:{do_retrievement:[0,3,1,""],get_mars_data:[0,3,1,""],main:[0,3,1,""]},install:{delete_convert_build:[0,3,1,""],get_install_cmdline_arguments:[0,3,1,""],install_via_gateway:[0,3,1,""],main:[0,3,1,""],make_convert_build:[0,3,1,""],mk_compilejob:[0,3,1,""],mk_env_vars:[0,3,1,""],mk_job_template:[0,3,1,""],mk_tarball:[0,3,1,""],un_tarball:[0,3,1,""]},prepare_flexpart:{main:[0,3,1,""],prepare_flexpart:[0,3,1,""]},submit:{main:[0,3,1,""],submit:[0,3,1,""]},tools:{clean_up:[0,3,1,""],get_cmdline_arguments:[0,3,1,""],get_list_as_string:[0,3,1,""],init128:[0,3,1,""],make_dir:[0,3,1,""],my_error:[0,3,1,""],none_or_int:[0,3,1,""],none_or_str:[0,3,1,""],normal_exit:[0,3,1,""],product:[0,3,1,""],put_file_to_ecserver:[0,3,1,""],read_ecenv:[0,3,1,""],silent_remove:[0,3,1,""],submit_job_to_ecserver:[0,3,1,""],to_param_id:[0,3,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function"},terms:{"boolean":0,"class":5,"default":0,"final":0,"float":0,"function":0,"int":0,"new":0,"public":0,"return":0,"short":0,"switch":0,"true":0,For:0,Its:0,The:0,Then:0,Used:0,Uses:0,_expand:0,_templat:0,abcd:0,about:0,abov:0,access:0,accumlu:0,accumul:0,accuraci:0,actual:0,adapt:0,adaptaion:[],add:0,adding:0,addit:0,addition:0,addpar:0,address:0,advanc:0,afterward:0,algorithm:0,alist:0,all:[0,5],alpabet:0,alreadi:0,also:0,ann:0,anoth:0,api:[0,5],appli:0,applic:0,arbitrari:0,arcad:[],archiv:5,area:0,arg:0,argument:0,argumentpars:[],arrai:0,array_t1:0,array_t2:0,array_t3:0,array_t4:0,articl:0,assign:0,assign_args_to_control:0,assign_envs_to_control:0,associ:0,asteroid:[],atmospher:5,attribut:0,author:0,auto:5,ball:5,base:0,beck:0,befor:0,binari:0,book:[],box:0,bug:5,build:0,call:0,can:0,cca:0,centr:5,central:0,chang:5,changehistori:[],charact:0,charg:5,check:0,check_condit:0,check_install_condit:0,chunk:0,clean:0,clean_up:0,code:0,coin:[],collect:0,combin:0,command:0,commandlin:0,common:0,compil:0,complet:0,compon:5,concaten:0,concatenate_sign:0,condit:0,connect:0,conserv:0,construct:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],contain:0,content:[0,5],control:[0,5],controlfil:5,convent:0,convers:0,convert2:0,convert:0,copi:0,copyright:0,correctli:0,correspond:0,coupl:0,creat:0,creativ:0,creativecommon:0,csv:0,cubic:0,current:0,dapoli:0,darain:0,data:0,data_retriev:0,dataset:0,date:0,datechunk:0,datetim:0,deacc_flux:0,deaccumul:0,debug:0,decid:0,decis:0,decompos:0,defin:0,delet:0,delete_convert_build:0,delete_fil:0,delta_t:0,depend:0,describ:[1,10],descript:0,destin:0,detail:0,develop:0,dict:[],dictionari:0,differ:[0,5],dimens:0,dimension:0,directli:0,directori:0,disaggreg:5,disaggregationreg:[],dispers:0,displai:0,display_info:0,divid:0,do_retriev:0,doc:[],doe:0,done:0,download:5,draw:[],dure:0,each:0,ecaccess:0,ecd:0,ecflexpart:5,ecgat:0,ecgid:0,ecmwf:[0,5],ecmwf_env:0,ecmwfdatadir:0,ecmwfdataserv:0,ecmwfservic:0,ecmwv:[],ecstorag:0,ectran:0,ecuid:0,element:0,email:0,empti:0,end:0,entri:0,env:0,environ:0,environment:0,equal:0,error:0,european:5,everyth:0,exampl:0,except:0,execut:0,exedir:0,exist:0,exit:0,express:0,expver:0,extens:0,extra:0,extract:0,fail:0,fals:0,faq:5,field:[0,5],file:[0,5],filemod:0,filenam:0,filename_in:0,filepath:0,filter:0,flex_extract:[0,1,10],flexpart:[0,5],flexpart_root_script:0,flextra:5,flow:5,flux:0,follow:0,forecast:5,format:0,fort:0,fortran:0,found:0,fp_root:0,free:5,from:[0,5],fromfil:0,full:0,gate:0,gatewai:0,gaussian:0,gener:5,geometr:0,geoscientif:0,get:0,get_cmdline_argu:0,get_install_cmdline_argu:0,get_kei:0,get_list_as_str:0,get_mars_data:5,git:5,github:[],give:0,given:0,goe:0,going:0,grib2:0,grib:0,gribtool:5,grid:0,group:0,guid:5,haimberg:0,handl:0,has:0,have:0,help:[],here:[0,5],histori:5,hittmeir:0,horizont:0,hour:0,how:5,http:0,ia3:0,identif:0,identificationkeyword:0,ids:0,idx:0,iid:0,improv:0,includ:0,index:[0,5],index_fil:0,index_kei:0,indic:0,inform:0,init128:0,initialis:0,input:[0,5],inputdir:0,inputfil:0,instal:5,install_via_gatewai:0,instanc:0,instead:0,instruct:0,integ:0,integr:0,intermedi:0,intern:0,interpol:0,interv:0,ipar:0,issu:5,iter:0,its:0,itself:0,jame:0,job:0,jobfil:0,jobnam:0,jtemplat:0,june:0,just:0,keep:0,kei:0,keynam:0,keyvalu:0,keyword:0,known:5,kwd:0,lagrangian:0,learn:[],length:0,leopold:0,letter:0,levelist:0,levtyp:0,librari:5,licens:[0,5],line:0,linear:0,linux:[],list:[0,5],list_obj:0,local:0,mac:[],machin:0,made:0,mail:[0,5],main:0,make_convert_build:0,make_dir:0,makefil:0,manipul:0,mar:[0,5],march:0,marsclass:0,marsretriev:5,matter:0,maxb:0,maxim:0,maxl:0,mdpdeta:0,mean:0,medium:5,meet:0,member:0,mention:0,messag:0,meta:0,metadiff:0,metapar:0,meteorolog:5,method:0,mgauss:0,might:0,migrat:0,mk_compilejob:0,mk_env_var:0,mk_job_templ:0,mk_tarbal:0,mlevel:0,mlevelist:0,mnauf:0,mod:0,mode:[0,5],model:[0,5],modif:0,modifi:0,modul:5,momega:0,momegadiff:0,monoton:0,more:0,mountain:0,move:0,msmooth:0,my_error:0,name:0,namelist:0,namespac:0,necessari:0,need:0,neg:0,nfield:0,non:0,none:0,none_or_int:0,none_or_str:0,normal_exit:0,note:[],noth:[],notif:0,notifi:0,novemb:0,number:0,obj:[],object:0,one:[0,5],onli:0,open:[0,5],oper:5,option:[0,1],order:0,org:0,origin:0,originla:[],other:0,otherwis:0,out:0,output:0,over:0,overview:5,overwrit:0,page:5,par:0,param:0,paramet:0,parameternam:0,parti:5,particl:0,pass:0,path:0,pattern:0,per:0,perform:0,period:0,petra:0,philipp:0,point:0,polynomi:0,porgram:5,posit:0,postprocess:0,ppid:0,prepar:0,prepare_flexpart:5,prepare_fp_fil:0,primit:[],print:0,print_info:0,print_infodata_csv:0,problem:0,process:0,process_output:0,prod:0,product:0,program:[0,5],properli:0,properti:0,provid:0,pure:[],put:[0,5],put_file_to_ecserv:0,python:0,quantiti:0,queue:0,quick:[],rainfal:0,rang:[0,5],raw:0,rcode:0,read:0,read_ecenv:0,readi:0,reason:0,reconstruct:0,refer:0,regular:0,releas:[],relev:0,remot:0,remov:0,repeat:0,replac:[],report:0,repositori:5,repr:0,repres:0,request:0,request_numb:0,requir:5,resol:0,rest:0,result:0,retriev:[0,5],return_list:0,rla0:0,rla1:0,rlo0:0,rlo1:0,root:0,sabin:0,same:0,sampl:0,scheme:0,script:0,search:5,second:5,see:0,seibert:0,select:0,selectwher:0,send:0,sent:0,sepeart:0,seper:0,seri:0,server:[0,5],set:0,set_kei:0,shell:0,should:0,silent_remov:0,simul:0,sinc:0,singl:0,size:[],smaller:0,smasher:[],softwar:[0,5],solut:0,some:[],sort:0,sourc:[0,5],specif:0,specifi:0,sprite:[],src_path:0,standard:0,start:0,state:0,statement:0,step:0,steprang:0,stop:0,storag:0,store:0,str_of_list:0,stream:0,stress:0,strict:0,string:0,structur:5,sub:0,subgrid:0,submiss:0,submit:5,submit_job_to_ecserv:0,subprocess:0,success:0,support:5,surfac:0,system:5,tabl:0,table128:0,take:0,taken:0,tar:[0,5],tarbal:0,tarball_path:0,target:0,temp:0,templat:[0,5],temporari:0,test:[0,5],text:5,thei:0,them:0,thi:0,those:0,three:0,through:0,ticket:5,time:0,timeseri:0,timespan:0,to_list:0,to_param_id:0,tool:5,transfer:0,transform:0,transport:5,trigger:0,tupl:0,two:0,type:0,udoc:0,uiofil:5,un_tarbal:0,under:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],uniqu:0,univers:0,usa:0,usag:[],use:5,used:[0,5],user:0,using:0,util:0,valu:0,variabl:0,version:0,via:0,vienna:0,view:0,visit:0,warn:0,weather:5,web:0,websit:0,well:0,were:0,what:[],where:0,wherekeynam:0,wherekeyvalu:0,which:[0,5],whole:0,wiki:0,wil:0,window:[],within:[0,5],without:0,word:0,work:0,write:0,write_namelist:0,written:0,yield:0,yyyymmdd:0},titles:["Auto Generated Documentation","Downloads","Git Repository","History of Changes","Download tar-balls","Welcome to flex_extract\u2019s user documentation!","Installation","Operating modes","Requirements","Installation test","Program Structure","Program Components","Program Flow","Program Overview","Support","FAQ - Frequently asked questions","Known Bugs and Issues","Mailing Lists","Ticket System","User Guide","CONTROL-file templates","How to use flex_extract"],titleterms:{"class":0,ask:15,auto:0,ball:4,bug:16,chang:3,compon:11,content:[],control:20,controlfil:0,disaggreg:0,document:[0,5],download:[1,4],ecflexpart:0,faq:15,file:20,flex_extract:[5,21],flow:12,frequent:15,gener:0,get_mars_data:0,git:2,gribtool:0,guid:19,histori:3,how:21,indic:5,instal:[0,6,9],issu:16,known:16,list:17,mail:17,marsretriev:0,mode:7,modul:0,oper:7,overview:13,porgram:0,prepare_flexpart:0,program:[10,11,12,13],pure:[],question:15,repositori:2,requir:8,rest:[],structur:10,submit:0,support:14,system:18,tabl:5,tar:4,templat:20,test:9,ticket:18,tool:0,uiofil:0,usag:[],use:21,user:[5,19],welcom:5}})
Index: documentation/Sphinx/build/html/support.html
===================================================================
--- documentation/Sphinx/build/html/support.html	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/support.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -29,4 +29,5 @@
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Ticket System" href="support/ticket_system.html" />
     <link rel="prev" title="Auto Generated Documentation" href="api.html" /> 
 
@@ -89,5 +90,11 @@
 <li class="toctree-l1"><a class="reference internal" href="user_guide.html">User Guide</a></li>
 <li class="toctree-l1"><a class="reference internal" href="api.html">Auto Generated Documentation</a></li>
-<li class="toctree-l1 current"><a class="current reference internal" href="#">Support</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Support</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="support/ticket_system.html">Ticket System</a></li>
+<li class="toctree-l2"><a class="reference internal" href="support/mailing_list.html">Mailing Lists</a></li>
+<li class="toctree-l2"><a class="reference internal" href="support/known_bugs_issues.html">Known Bugs and Issues</a></li>
+<li class="toctree-l2"><a class="reference internal" href="support/faq.html">FAQ - Frequently asked questions</a></li>
+</ul>
+</li>
 </ul>
 
@@ -156,7 +163,8 @@
   <div class="section" id="support">
 <h1>Support<a class="headerlink" href="#support" title="Permalink to this headline">¶</a></h1>
-<p>Describe support options ….</p>
 <blockquote>
 <div>UNDER CONSTRUCTION</div></blockquote>
+<div class="toctree-wrapper compound">
+</div>
 </div>
 
@@ -168,4 +176,6 @@
   
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="support/ticket_system.html" class="btn btn-neutral float-right" title="Ticket System" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
       
       
Index: documentation/Sphinx/build/html/support/faq.html
===================================================================
--- documentation/Sphinx/build/html/support/faq.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/support/faq.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,234 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>FAQ - Frequently asked questions &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="prev" title="Known Bugs and Issues" href="known_bugs_issues.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="../support.html">Support</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="ticket_system.html">Ticket System</a></li>
+<li class="toctree-l2"><a class="reference internal" href="mailing_list.html">Mailing Lists</a></li>
+<li class="toctree-l2"><a class="reference internal" href="known_bugs_issues.html">Known Bugs and Issues</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">FAQ - Frequently asked questions</a></li>
+</ul>
+</li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../support.html">Support</a> &raquo;</li>
+        
+      <li>FAQ - Frequently asked questions</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/support/faq.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="faq-frequently-asked-questions">
+<h1>FAQ - Frequently asked questions<a class="headerlink" href="#faq-frequently-asked-questions" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+      
+        <a href="known_bugs_issues.html" class="btn btn-neutral" title="Known Bugs and Issues" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/support/known_bugs_issues.html
===================================================================
--- documentation/Sphinx/build/html/support/known_bugs_issues.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/support/known_bugs_issues.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,237 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Known Bugs and Issues &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="FAQ - Frequently asked questions" href="faq.html" />
+    <link rel="prev" title="Mailing Lists" href="mailing_list.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="../support.html">Support</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="ticket_system.html">Ticket System</a></li>
+<li class="toctree-l2"><a class="reference internal" href="mailing_list.html">Mailing Lists</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Known Bugs and Issues</a></li>
+<li class="toctree-l2"><a class="reference internal" href="faq.html">FAQ - Frequently asked questions</a></li>
+</ul>
+</li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../support.html">Support</a> &raquo;</li>
+        
+      <li>Known Bugs and Issues</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/support/known_bugs_issues.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="known-bugs-and-issues">
+<h1>Known Bugs and Issues<a class="headerlink" href="#known-bugs-and-issues" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="faq.html" class="btn btn-neutral float-right" title="FAQ - Frequently asked questions" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="mailing_list.html" class="btn btn-neutral" title="Mailing Lists" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/support/mailing_list.html
===================================================================
--- documentation/Sphinx/build/html/support/mailing_list.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/support/mailing_list.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,237 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Mailing Lists &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="Known Bugs and Issues" href="known_bugs_issues.html" />
+    <link rel="prev" title="Ticket System" href="ticket_system.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="../support.html">Support</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="ticket_system.html">Ticket System</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Mailing Lists</a></li>
+<li class="toctree-l2"><a class="reference internal" href="known_bugs_issues.html">Known Bugs and Issues</a></li>
+<li class="toctree-l2"><a class="reference internal" href="faq.html">FAQ - Frequently asked questions</a></li>
+</ul>
+</li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../support.html">Support</a> &raquo;</li>
+        
+      <li>Mailing Lists</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/support/mailing_list.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="mailing-lists">
+<h1>Mailing Lists<a class="headerlink" href="#mailing-lists" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="known_bugs_issues.html" class="btn btn-neutral float-right" title="Known Bugs and Issues" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="ticket_system.html" class="btn btn-neutral" title="Ticket System" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/support/ticket_system.html
===================================================================
--- documentation/Sphinx/build/html/support/ticket_system.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/support/ticket_system.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,237 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Ticket System &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="Mailing Lists" href="mailing_list.html" />
+    <link rel="prev" title="Support" href="../support.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="../support.html">Support</a><ul class="current">
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Ticket System</a></li>
+<li class="toctree-l2"><a class="reference internal" href="mailing_list.html">Mailing Lists</a></li>
+<li class="toctree-l2"><a class="reference internal" href="known_bugs_issues.html">Known Bugs and Issues</a></li>
+<li class="toctree-l2"><a class="reference internal" href="faq.html">FAQ - Frequently asked questions</a></li>
+</ul>
+</li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../support.html">Support</a> &raquo;</li>
+        
+      <li>Ticket System</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/support/ticket_system.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="ticket-system">
+<h1>Ticket System<a class="headerlink" href="#ticket-system" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="mailing_list.html" class="btn btn-neutral float-right" title="Mailing Lists" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="../support.html" class="btn btn-neutral" title="Support" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/test_install.html
===================================================================
--- documentation/Sphinx/build/html/test_install.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/test_install.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,236 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Installation test &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Program Structure" href="program_structure.html" />
+    <link rel="prev" title="Operating modes" href="oper_modes.html" /> 
+
+  
+  <script src="_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="downloads.html">Downloads</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="installation.html">Installation</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="requirements.html">Requirements</a></li>
+<li class="toctree-l2"><a class="reference internal" href="oper_modes.html">Operating modes</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Installation test</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="program_structure.html">Program Structure</a></li>
+<li class="toctree-l1"><a class="reference internal" href="user_guide.html">User Guide</a></li>
+<li class="toctree-l1"><a class="reference internal" href="api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="installation.html">Installation</a> &raquo;</li>
+        
+      <li>Installation test</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="_sources/test_install.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="installation-test">
+<h1>Installation test<a class="headerlink" href="#installation-test" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="program_structure.html" class="btn btn-neutral float-right" title="Program Structure" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="oper_modes.html" class="btn btn-neutral" title="Operating modes" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'./',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="_static/jquery.js"></script>
+      <script type="text/javascript" src="_static/underscore.js"></script>
+      <script type="text/javascript" src="_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/user_guide.html
===================================================================
--- documentation/Sphinx/build/html/user_guide.html	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/build/html/user_guide.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -29,6 +29,6 @@
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="Auto Generated Documentation" href="api.html" />
-    <link rel="prev" title="Program Structure" href="program_structure.html" /> 
+    <link rel="next" title="How to use flex_extract" href="user_guide/how_to.html" />
+    <link rel="prev" title="Program Flow" href="program_structure/prog_flow.html" /> 
 
   
@@ -88,5 +88,9 @@
 <li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="program_structure.html">Program Structure</a></li>
-<li class="toctree-l1 current"><a class="current reference internal" href="#">User Guide</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">User Guide</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="user_guide/how_to.html">How to use flex_extract</a></li>
+<li class="toctree-l2"><a class="reference internal" href="user_guide/control_templates.html">CONTROL-file templates</a></li>
+</ul>
+</li>
 <li class="toctree-l1"><a class="reference internal" href="api.html">Auto Generated Documentation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="support.html">Support</a></li>
@@ -157,7 +161,8 @@
   <div class="section" id="user-guide">
 <h1>User Guide<a class="headerlink" href="#user-guide" title="Permalink to this headline">¶</a></h1>
-<p>Describe using flex_extract ….</p>
 <blockquote>
 <div>UNDER CONSTRUCTION</div></blockquote>
+<div class="toctree-wrapper compound">
+</div>
 </div>
 
@@ -170,8 +175,8 @@
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="api.html" class="btn btn-neutral float-right" title="Auto Generated Documentation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
-      
-      
-        <a href="program_structure.html" class="btn btn-neutral" title="Program Structure" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+        <a href="user_guide/how_to.html" class="btn btn-neutral float-right" title="How to use flex_extract" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="program_structure/prog_flow.html" class="btn btn-neutral" title="Program Flow" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
       
     </div>
Index: documentation/Sphinx/build/html/user_guide/control_templates.html
===================================================================
--- documentation/Sphinx/build/html/user_guide/control_templates.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/user_guide/control_templates.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,235 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>CONTROL-file templates &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="Auto Generated Documentation" href="../api.html" />
+    <link rel="prev" title="How to use flex_extract" href="how_to.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="../user_guide.html">User Guide</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="how_to.html">How to use flex_extract</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">CONTROL-file templates</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../user_guide.html">User Guide</a> &raquo;</li>
+        
+      <li>CONTROL-file templates</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/user_guide/control_templates.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="control-file-templates">
+<h1>CONTROL-file templates<a class="headerlink" href="#control-file-templates" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="../api.html" class="btn btn-neutral float-right" title="Auto Generated Documentation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="how_to.html" class="btn btn-neutral" title="How to use flex_extract" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/build/html/user_guide/how_to.html
===================================================================
--- documentation/Sphinx/build/html/user_guide/how_to.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/build/html/user_guide/how_to.html	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,235 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>How to use flex_extract &mdash; flex_extract 7.1 alpha documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="CONTROL-file templates" href="control_templates.html" />
+    <link rel="prev" title="User Guide" href="../user_guide.html" /> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search">
+          
+
+          
+            <a href="../index.html" class="icon icon-home"> flex_extract
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                7.1
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Downloads</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../program_structure.html">Program Structure</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="../user_guide.html">User Guide</a><ul class="current">
+<li class="toctree-l2 current"><a class="current reference internal" href="#">How to use flex_extract</a></li>
+<li class="toctree-l2"><a class="reference internal" href="control_templates.html">CONTROL-file templates</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../api.html">Auto Generated Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">flex_extract</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../user_guide.html">User Guide</a> &raquo;</li>
+        
+      <li>How to use flex_extract</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="../_sources/user_guide/how_to.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="how-to-use-flex-extract">
+<h1>How to use flex_extract<a class="headerlink" href="#how-to-use-flex-extract" title="Permalink to this headline">¶</a></h1>
+<blockquote>
+<div>UNDER CONSTRUCTION</div></blockquote>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="control_templates.html" class="btn btn-neutral float-right" title="CONTROL-file templates" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="../user_guide.html" class="btn btn-neutral" title="User Guide" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2018, Anne Philipp and Leopold Haimberger.
+
+    </p>
+  </div>
+  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>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'7.1 alpha',
+            LANGUAGE:'None',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true,
+            SOURCELINK_SUFFIX: '.txt'
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+
+  
+
+  <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
Index: documentation/Sphinx/source/api.rst
===================================================================
--- documentation/Sphinx/source/api.rst	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/source/api.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -2,4 +2,81 @@
 ============================
 
+.. contents::
+    :local:
+    
+Porgrams
+--------
+
+install
+*******
+
+.. automodule:: install
+    :members:
+    
+submit
+******
+
+.. automodule:: submit
+    :members:
+    
+Classes
+-------
+
+ControlFile
+***********
+
+.. automodule:: ControlFile
+    :members:
+    
+EcFlexpart
+**********
+
+.. automodule:: EcFlexpart
+    :members:
+    
+GribTools
+*********
+
+.. automodule:: GribTools
+    :members:
+
+MarsRetrieval
+*************
+
+.. automodule:: MarsRetrieval
+    :members:
+
+UioFiles
+********
+
+.. automodule:: UioFiles
+    :members:
+
+
+
+Modules
+-------
+
+get_mars_data
+*************
+
+.. automodule:: get_mars_data
+    :members:
+ 
+prepare_flexpart
+****************
+
+.. automodule:: prepare_flexpart
+    :members:    
+    
+tools
+*****
+
+.. automodule:: tools
+    :members:
+
+disaggregation
+**************    
+    
 .. automodule:: disaggregation
     :members:
Index: documentation/Sphinx/source/downloads.rst
===================================================================
--- documentation/Sphinx/source/downloads.rst	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/source/downloads.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -5,2 +5,11 @@
  
     UNDER CONSTRUCTION
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    downloads/tar_balls
+    downloads/git_repo
+    downloads/history_changes
+    
Index: documentation/Sphinx/source/downloads/git_repo.rst
===================================================================
--- documentation/Sphinx/source/downloads/git_repo.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/downloads/git_repo.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+Git Repository 
+==============
+
+  UNDER CONSTRUCTION
Index: documentation/Sphinx/source/downloads/history_changes.rst
===================================================================
--- documentation/Sphinx/source/downloads/history_changes.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/downloads/history_changes.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+History of Changes
+==================
+
+   UNDER CONSTRUCTION
Index: documentation/Sphinx/source/downloads/tar_balls.rst
===================================================================
--- documentation/Sphinx/source/downloads/tar_balls.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/downloads/tar_balls.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+Download tar-balls
+==================
+
+  UNDER CONSTRUCTION
Index: documentation/Sphinx/source/index.rst
===================================================================
--- documentation/Sphinx/source/index.rst	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/source/index.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -4,6 +4,16 @@
    contain the root `toctree` directive.
 
-Welcome to flex_extract's documentation!
-========================================
+Welcome to flex_extract's user documentation!
+=============================================
+
+flex_extract is a software to retrieve meteorological fields from the European Centre for Medium-Range Weather Forecasts (ECMWF) Mars archive to server as input files for the FLEXTRA/FLEXPART Atmospheric Transport Modelling system. 
+
+
+.. The scripts can be 1) executed locally using the ECMWF WebMARS interface, or 2) on the ECMWF member
+.. state gateway server or HPC facility using the ecaccess software package. As another option the scripts can 3)
+.. also be triggered using ecflow scheduling software used by ECMWF for data dissemination.
+
+All required second party software and libraries used within flex_extract is open source and free of charge. 
+
 .. raw:: html
 
@@ -87,5 +97,5 @@
 
 .. toctree::
-   :maxdepth: 2
+   :maxdepth: 3
    :caption: Table of Contents:
 
Index: documentation/Sphinx/source/installation.rst
===================================================================
--- documentation/Sphinx/source/installation.rst	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/source/installation.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -1,6 +1,15 @@
 Installation
 ============
-
-Describe installation process flex_extract ....
  
     UNDER CONSTRUCTION
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    installation/requirements
+    installation/oper_modes
+    installation/test_install
+
+
+    
Index: documentation/Sphinx/source/installation/oper_modes.rst
===================================================================
--- documentation/Sphinx/source/installation/oper_modes.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/installation/oper_modes.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,6 @@
+Operating modes
+===============
+
+ 
+    UNDER CONSTRUCTION
+    
Index: documentation/Sphinx/source/installation/requirements.rst
===================================================================
--- documentation/Sphinx/source/installation/requirements.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/installation/requirements.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,6 @@
+Requirements
+============
+
+ 
+    UNDER CONSTRUCTION
+    
Index: documentation/Sphinx/source/installation/test_install.rst
===================================================================
--- documentation/Sphinx/source/installation/test_install.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/installation/test_install.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,5 @@
+Installation test
+=================
+
+    UNDER CONSTRUCTION
+    
Index: documentation/Sphinx/source/program_structure.rst
===================================================================
--- documentation/Sphinx/source/program_structure.rst	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/source/program_structure.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -5,2 +5,10 @@
  
     UNDER CONSTRUCTION
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    program_structure/prog_overview
+    program_structure/prog_components
+    program_structure/prog_flow
Index: documentation/Sphinx/source/program_structure/prog_components.rst
===================================================================
--- documentation/Sphinx/source/program_structure/prog_components.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/program_structure/prog_components.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,5 @@
+Program Components
+==================
+
+ 
+    UNDER CONSTRUCTION
Index: documentation/Sphinx/source/program_structure/prog_flow.rst
===================================================================
--- documentation/Sphinx/source/program_structure/prog_flow.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/program_structure/prog_flow.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,5 @@
+Program Flow
+================
+
+ 
+    UNDER CONSTRUCTION
Index: documentation/Sphinx/source/program_structure/prog_overview.rst
===================================================================
--- documentation/Sphinx/source/program_structure/prog_overview.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/program_structure/prog_overview.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,5 @@
+Program Overview
+================
+
+ 
+    UNDER CONSTRUCTION
Index: documentation/Sphinx/source/requirements.rst
===================================================================
--- documentation/Sphinx/source/requirements.rst	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ 	(revision )
@@ -1,6 +1,0 @@
-Requirements
-============
-
-Describe the requirements to use flex_extract ....
- 
-    UNDER CONSTRUCTION
Index: documentation/Sphinx/source/support.rst
===================================================================
--- documentation/Sphinx/source/support.rst	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/source/support.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -2,5 +2,15 @@
 =======
 
-Describe support options ....
  
     UNDER CONSTRUCTION
+    
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    support/ticket_system
+    support/mailing_list
+    support/known_bugs_issues
+    support/faq
+        
Index: documentation/Sphinx/source/support/faq.rst
===================================================================
--- documentation/Sphinx/source/support/faq.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/support/faq.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+FAQ - Frequently asked questions
+================================
+
+  UNDER CONSTRUCTION
Index: documentation/Sphinx/source/support/known_bugs_issues.rst
===================================================================
--- documentation/Sphinx/source/support/known_bugs_issues.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/support/known_bugs_issues.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+Known Bugs and Issues
+=====================
+
+  UNDER CONSTRUCTION
Index: documentation/Sphinx/source/support/mailing_list.rst
===================================================================
--- documentation/Sphinx/source/support/mailing_list.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/support/mailing_list.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+Mailing Lists
+=============
+
+   UNDER CONSTRUCTION
Index: documentation/Sphinx/source/support/ticket_system.rst
===================================================================
--- documentation/Sphinx/source/support/ticket_system.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/support/ticket_system.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+Ticket System
+=============
+  
+   UNDER CONSTRUCTION
Index: documentation/Sphinx/source/user_guide.rst
===================================================================
--- documentation/Sphinx/source/user_guide.rst	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ documentation/Sphinx/source/user_guide.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -1,6 +1,12 @@
 User Guide
 ==========
-
-Describe using flex_extract ....
  
     UNDER CONSTRUCTION
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    user_guide/how_to
+    user_guide/control_templates
+    
Index: documentation/Sphinx/source/user_guide/control_templates.rst
===================================================================
--- documentation/Sphinx/source/user_guide/control_templates.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/user_guide/control_templates.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+CONTROL-file templates
+======================
+
+   UNDER CONSTRUCTION
Index: documentation/Sphinx/source/user_guide/how_to.rst
===================================================================
--- documentation/Sphinx/source/user_guide/how_to.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
+++ documentation/Sphinx/source/user_guide/how_to.rst	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -0,0 +1,4 @@
+How to use flex_extract
+=======================
+
+   UNDER CONSTRUCTION
