Index: for_developers/Sphinx/Makefile
===================================================================
--- for_developers/Sphinx/Makefile	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/Makefile	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,20 @@
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+SPHINXPROJ    = flex_extract
+SOURCEDIR     = source
+BUILDDIR      = ../../documentation
+
+# Put it first so that "make" without argument is like "make help".
+help:
+	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile
+	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Index: for_developers/Sphinx/source/.idea/encodings.xml
===================================================================
--- for_developers/Sphinx/source/.idea/encodings.xml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/.idea/encodings.xml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
+</project>
Index: for_developers/Sphinx/source/.idea/libraries/R_User_Library.xml
===================================================================
--- for_developers/Sphinx/source/.idea/libraries/R_User_Library.xml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/.idea/libraries/R_User_Library.xml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,6 @@
+<component name="libraryTable">
+  <library name="R User Library">
+    <CLASSES />
+    <SOURCES />
+  </library>
+</component>
Index: for_developers/Sphinx/source/.idea/misc.xml
===================================================================
--- for_developers/Sphinx/source/.idea/misc.xml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/.idea/misc.xml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" />
+</project>
Index: for_developers/Sphinx/source/.idea/modules.xml
===================================================================
--- for_developers/Sphinx/source/.idea/modules.xml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/.idea/modules.xml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/source.iml" filepath="$PROJECT_DIR$/.idea/source.iml" />
+    </modules>
+  </component>
+</project>
Index: for_developers/Sphinx/source/.idea/source.iml
===================================================================
--- for_developers/Sphinx/source/.idea/source.iml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/.idea/source.iml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="PYTHON_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="R User Library" level="project" />
+    <orderEntry type="library" name="R Skeletons" level="application" />
+  </component>
+  <component name="TestRunnerService">
+    <option name="PROJECT_TEST_RUNNER" value="Unittests" />
+  </component>
+</module>
Index: for_developers/Sphinx/source/.idea/vcs.xml
===================================================================
--- for_developers/Sphinx/source/.idea/vcs.xml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/.idea/vcs.xml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
+  </component>
+</project>
Index: for_developers/Sphinx/source/.idea/workspace.xml
===================================================================
--- for_developers/Sphinx/source/.idea/workspace.xml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/.idea/workspace.xml	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ChangeListManager">
+    <list default="true" id="2a15728f-bfbe-476a-b119-bc85c479ce08" name="Default Changelist" comment="">
+      <change beforePath="$PROJECT_DIR$/../../../README.md" beforeDir="false" afterPath="$PROJECT_DIR$/../../../README.md" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/conf.py" beforeDir="false" afterPath="$PROJECT_DIR$/conf.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/index.rst" beforeDir="false" afterPath="$PROJECT_DIR$/index.rst" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/program_structure/prog_overview.rst" beforeDir="false" afterPath="$PROJECT_DIR$/program_structure/prog_overview.rst" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../for_developers/CONTROLparameter.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/../../../for_developers/CONTROLparameter.xlsx" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../run/control/CONTROL_CERA.testgrid" beforeDir="false" afterPath="$PROJECT_DIR$/../../../run/control/CONTROL_CERA.testgrid" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../run/control/CONTROL_EA5.newgrid" beforeDir="false" afterPath="$PROJECT_DIR$/../../../run/control/CONTROL_EA5.newgrid" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../run/control/CONTROL_EA5.testgrid" beforeDir="false" afterPath="$PROJECT_DIR$/../../../run/control/CONTROL_EA5.testgrid" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../run/control/CONTROL_FC.pure.36hours.testgrid" beforeDir="false" afterPath="$PROJECT_DIR$/../../../run/control/CONTROL_FC.pure.36hours.testgrid" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../run/run.sh" beforeDir="false" afterPath="$PROJECT_DIR$/../../../run/run.sh" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../run/run_local.sh" beforeDir="false" afterPath="$PROJECT_DIR$/../../../run/run_local.sh" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../source/fortran/Makefile.gfortran" beforeDir="false" afterPath="$PROJECT_DIR$/../../../source/fortran/Makefile.gfortran" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../source/fortran/Makefile.local.gfortran" beforeDir="false" afterPath="$PROJECT_DIR$/../../../source/fortran/Makefile.local.gfortran" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../source/fortran/Makefile.local.ifort" beforeDir="false" afterPath="$PROJECT_DIR$/../../../source/fortran/Makefile.local.ifort" afterDir="false" />
+    </list>
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="FileEditorManager">
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/index.rst">
+          <provider selected="true" editor-type-id="restructured-text-editor" />
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/../../../README.md">
+          <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+            <state split_layout="SPLIT">
+              <first_editor relative-caret-position="631">
+                <caret line="492" column="177" selection-start-line="492" selection-start-column="132" selection-end-line="492" selection-end-column="181" />
+                <folding>
+                  <element signature="e#11390#11416#0" />
+                  <element signature="e#18917#18937#0" />
+                  <element signature="e#19186#19204#0" />
+                </folding>
+              </first_editor>
+              <second_editor />
+            </state>
+          </provider>
+        </entry>
+      </file>
+    </leaf>
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../.." />
+  </component>
+  <component name="IdeDocumentHistory">
+    <option name="CHANGED_PATHS">
+      <list>
+        <option value="$PROJECT_DIR$/../../../README.md" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectFrameBounds" extendedState="1">
+    <option name="x" value="1680" />
+    <option name="y" value="60" />
+    <option name="width" value="1920" />
+    <option name="height" value="1113" />
+  </component>
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
+  <component name="ProjectView">
+    <navigator proportions="" version="1">
+      <foldersAlwaysOnTop value="true" />
+    </navigator>
+    <panes>
+      <pane id="ProjectPane">
+        <subPane>
+          <expand>
+            <path>
+              <item name="source" type="b2602c69:ProjectViewProjectNode" />
+              <item name="source" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="source" type="b2602c69:ProjectViewProjectNode" />
+              <item name="source" type="462c0819:PsiDirectoryNode" />
+              <item name="_static" type="462c0819:PsiDirectoryNode" />
+            </path>
+          </expand>
+          <select />
+        </subPane>
+      </pane>
+      <pane id="Scope" />
+    </panes>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+    <property name="settings.editor.selected.configurable" value="File.Encoding" />
+  </component>
+  <component name="RunDashboard">
+    <option name="ruleStates">
+      <list>
+        <RuleState>
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
+        </RuleState>
+        <RuleState>
+          <option name="name" value="StatusDashboardGroupingRule" />
+        </RuleState>
+      </list>
+    </option>
+  </component>
+  <component name="SvnConfiguration">
+    <configuration />
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="2a15728f-bfbe-476a-b119-bc85c479ce08" name="Default Changelist" comment="" />
+      <created>1551958821849</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1551958821849</updated>
+    </task>
+    <servers />
+  </component>
+  <component name="TodoView">
+    <todo-panel id="selected-file">
+      <is-autoscroll-to-source value="true" />
+    </todo-panel>
+    <todo-panel id="all">
+      <are-packages-shown value="true" />
+      <is-autoscroll-to-source value="true" />
+    </todo-panel>
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="1680" y="60" width="1920" height="1113" extended-state="0" />
+    <editor active="true" />
+    <layout>
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.046375267" />
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
+      <window_info id="Favorites" order="2" side_tool="true" />
+      <window_info anchor="bottom" id="Message" order="0" />
+      <window_info anchor="bottom" id="Find" order="1" />
+      <window_info anchor="bottom" id="Run" order="2" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
+      <window_info anchor="bottom" id="TODO" order="6" weight="0.32936078" />
+      <window_info anchor="bottom" id="Version Control" order="7" weight="0.32936078" />
+      <window_info anchor="bottom" id="Terminal" order="8" />
+      <window_info anchor="bottom" id="Event Log" order="9" side_tool="true" weight="0.030120483" />
+      <window_info anchor="bottom" id="Python Console" order="10" />
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
+      <window_info anchor="right" id="R Graphics" order="3" />
+      <window_info anchor="right" id="R Packages" order="4" />
+    </layout>
+  </component>
+  <component name="editorHistoryManager">
+    <entry file="file://$PROJECT_DIR$/index.rst">
+      <provider selected="true" editor-type-id="restructured-text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/../../../README.md">
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+        <state split_layout="SPLIT">
+          <first_editor relative-caret-position="631">
+            <caret line="492" column="177" selection-start-line="492" selection-start-column="132" selection-end-line="492" selection-end-column="181" />
+            <folding>
+              <element signature="e#11390#11416#0" />
+              <element signature="e#18917#18937#0" />
+              <element signature="e#19186#19204#0" />
+            </folding>
+          </first_editor>
+          <second_editor />
+        </state>
+      </provider>
+    </entry>
+  </component>
+</project>
Index: for_developers/Sphinx/source/Developers/gen_docu.rst
===================================================================
--- for_developers/Sphinx/source/Developers/gen_docu.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Developers/gen_docu.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,34 @@
+********************
+Update Documentation
+********************
+
+UNDER CONSTRUCTION
+
+Additional Software
+===================
+
+Developers working on ``flex_extract`` should make extensive use of the prepared test cases, unit tests and update the documentation. For this, some additional software is necessary:
+
+- pylint
+- pytest
+- mock
+- graphviz
+- sphinx
+
+
+
+Online-documentation with Sphinx
+================================
+
+Use the scriot ``gen_docu.sh`` to generate an update of the online documentation of the python component.
+
+It uses ``pyreverse`` to generate a class and a package diagram with graphviz and overwrites the old files in the developers directory. 
+``pyreverse`` creates ``dot`` files and with the ``dot`` program of the ``graphviz`` software the ``png`` files are created. Everything happens in the Python source directory before moving them finally to the ``for_developers`` directory. The Sphinx source code has a ``_files`` directory which contains links to these ``png`` files and therefore they should not be renamed.  
+
+
+
+
+
+.. toctree::
+    :hidden:
+    :maxdepth: 2
Index: for_developers/Sphinx/source/Documentation/Input/control.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/Input/control.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/Input/control.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,63 @@
+================
+The CONTROL file
+================
+    
+  
+
+.. MARS user documentation				https://confluence.ecmwf.int/display/UDOC/MARS+user+documentation
+.. MARS keywords and explanation				https://confluence.ecmwf.int/display/UDOC/MARS+keywords
+ 
+ 
+This file is an input file for :literal:`flex_extract's` main script :literal:`submit.py`.
+It contains the controlling parameters :literal:`flex_extract` needs to decide on dataset specifications,
+handling of the retrieved data and general bahaviour. The naming convention is usually (but not necessary):
+
+   :literal:`CONTROL_<Dataset>[.optionalIndications]`
+
+The tested datasets are the operational dataset and the re-analysis datasets CERA-20C, ERA5 and ERA-Interim.
+The optional extra indications for the re-analysis datasets mark the files for *public users* 
+and *global* domain. For the operational datasets (*OD*) the file names contain also information of
+the stream, the field type for forecasts, the method for extracting the vertical coordinate and other 
+things like time or horizontal resolution.
+
+
+Format of CONTROL files
+----------------------------------
+
+The parameters can be sorted in any order with one parameter per line. 
+Comments are started with a '#' - sign. Some of these parameters can be overruled by the command line
+parameters given to the :literal:`submit.py` script. 
+All parameters have default values. Only those parameters which have to be changed
+must be listed in the :literal:`CONTROL` files. 
+
+Example CONTROL files
+--------------------------------
+
+A number of example files can be found in the directory :literal:`flex_extract_vX.X/run/control/`.
+They can be used as a template for adaptations and understand what's possible to 
+retrieve from ECMWF's archive.
+For each main dataset there is an example and additionally some variances in resolution, type of field
+or type of retrieving the vertical coordinate. 
+
+
+ 
+ 
+CONTROL file
+------------
+The file :literal:`CONTROL.documentation` documents the available parameters
+in grouped sections with their default values. In :doc:`control_params` you can find a more
+detailed description with additional hints, possible values and some useful information about
+the setting of these parameters.
+
+.. literalinclude:: ../../../../../run/control/CONTROL.documentation 
+   :language: bash
+   :caption: CONTROL.documentation
+    
+
+
+
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
Index: for_developers/Sphinx/source/Documentation/Input/control_params.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/Input/control_params.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/Input/control_params.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,122 @@
+======================
+The CONTROL parameters
+======================
+    
+    
+.. _ref-control-user:
+
+User Section
+************
+    
+.. csv-table::
+   :file: ../../_files/CONTROLparameter-user.csv
+   :header-rows: 1
+   :widths: auto 
+
+.. _ref-control-general:
+    
+General Section
+***************
+
+.. csv-table::
+   :file: ../../_files/CONTROLparameter-general.csv
+   :header-rows: 1
+   :widths: auto 
+   
+.. _ref-control-time:
+   
+Time Section
+************
+   
+.. csv-table:: 
+   :file: ../../_files/CONTROLparameter-time.csv
+   :header-rows: 1
+   :widths: auto        
+    
+
+.. _ref-control-data:
+   
+Data Section
+************
+   
+.. csv-table:: 
+   :file: ../../_files/CONTROLparameter-data.csv
+   :header-rows: 1
+   :widths: auto   
+   
+   
+.. _ref-control-datafield:
+   
+Data field Section
+******************
+    
+.. csv-table:: 
+   :file: ../../_files/CONTROLparameter-datafields.csv
+   :header-rows: 1
+   :widths: auto     
+   
+   
+.. _ref-control-fluxdata:
+   
+Flux data Section
+*****************
+
+.. csv-table:: 
+   :file: ../../_files/CONTROLparameter-fluxdata.csv
+   :header-rows: 1
+   :widths: auto
+
+ 
+ .. _ref-control-domain:
+   
+Domain Section
+**************
+   
+.. csv-table:: 
+   :file: ../../_files/CONTROLparameter-domain.csv
+   :header-rows: 1
+   :widths: auto     
+   
+   
+         
+ .. _ref-control-verticalwind:
+   
+Vertical wind Section
+*********************
+   
+.. csv-table:: 
+   :file: ../../_files/CONTROLparameter-verticalwind.csv
+   :header-rows: 1
+   :widths: auto  
+ 
+ 
+.. _ref-control-adddata:
+   
+Additional data Section
+***********************
+   
+.. csv-table:: 
+   :file: ../../_files/CONTROLparameter-adddata.csv
+   :header-rows: 1
+   :widths: auto   
+ 
+  
+.. _ref-control-flexpart:
+   
+Flexpart Section
+****************
+   
+.. csv-table:: 
+   :file: ../../_files/CONTROLparameter-flexpart.csv
+   :header-rows: 1
+   :widths: auto  
+   
+   
+   
+   
+   
+       
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
Index: for_developers/Sphinx/source/Documentation/Input/fortran_makefile.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/Input/fortran_makefile.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/Input/fortran_makefile.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,71 @@
+**********************************
+The Fortran Program - ``CONVERT2``
+**********************************
+
+.. _ref-convert:
+
+One of ``flex_extract``'s components is a Fortran program called ``CONVERT2``.
+This will be compiled during the installation process to get an executable. ``flex_extract`` 
+has a couple of makefiles prepared which are listed in the following. 
+
+
+| **Remote/Gateway mode**: 
+| Files to be used as they are!
+    
+    | **Makefile.gfortran**
+    | For the use on ECMWF's server **ecgate**.
+
+    | **Makefile.CRAY**
+    | For the use on ECMWF's server **cca/ccb**. 
+    
+| **Local mode**
+| It is necessary to adapt **ECCODES_INCLUDE_DIR** and **ECCODES_LIB**
+ 
+    | **Makefile.local.gfortran**
+    | For the use with gfortran compiler.
+
+    | **Makefile.local.ifort**
+    | For the use with ifort compiler.
+
+They can be found in the path ``flex_extract_vX.X/source/fortran``, where
+``vX.X`` should be substituted with the current version number.
+
+So starting from the root directory of ``flex_extract``, 
+go to the ``Fortran`` source directory and open the ``Makefile`` of your 
+choice to modify with an editor of your choice. We use the ``nedit`` in this case.
+So far, we tested ``flex_extract`` with a ``gfortran`` and an ``ifort`` compiler.  
+
+.. code-block:: bash 
+
+   $ cd flex_extract_vX.X/source/fortran
+   $ nedit Makefile.local.gfortran
+
+
+Edit the pathes to the ``eccodes`` library on your local machine. 
+
+.. caution::
+   This can vary from system to system. 
+   It is suggested to use a command like 
+
+   .. code-block:: bash
+
+      # for the ECCODES_INCLUDE_DIR path do:
+      $ dpkg -L libeccodes-dev | grep eccodes.mod
+      # for the ECCODES_LIB path do:
+      $ dpkg -L libeccodes-dev | grep libeccodes.so
+      
+   to find out the path to the ``eccodes`` library.
+   
+Substitute these paths in the ``Makefile`` for parameters **ECCODES_INCLUDE_DIR**
+and **ECCODES_LIB** and save it.
+
+.. code-block:: bash
+
+   # these are the paths on a current Debian Testing system (May 2019)
+   ECCODES_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/
+   ECCODES_LIB= -L/usr/lib -leccodes_f90 -leccodes -lm  
+   
+   
+.. toctree::
+    :hidden:
+    :maxdepth: 2
Index: for_developers/Sphinx/source/Documentation/Input/setup.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/Input/setup.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/Input/setup.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,27 @@
+**************************************
+The Installation Script - ``setup.sh``
+**************************************
+
+.. _ref-setup:
+
+
+The installation script ``setup.sh`` prepares the call of the Python 
+installation script (``install.py``) with its necessary command line arguments. 
+The ``setup.sh`` script is located in the root directory of ``flex_extract`` and has a 
+section labelled with "AVAILABLE COMMANDLINE ARGUMENTS TO SET" which
+contains the available command line parameters for ``install.py``. The user has to adapt these
+parameters for his personal use. The parameters are listed and described in the following table.
+The script also does some checks to guarantee necessary parameters were set.
+   
+.. csv-table:: 
+   :file: ../../_files/InstallationParameters.csv
+   :header-rows: 1
+   :widths: auto   
+
+After the installation some tests can be conducted. 
+They are described in section :ref:`ref-testinstallfe`.
+
+
+.. toctree::
+    :hidden:
+    :maxdepth: 2
Index: for_developers/Sphinx/source/Documentation/Overview/app_modes.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/Overview/app_modes.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/Overview/app_modes.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,47 @@
+*****************
+Application Modes
+*****************
+
+.. role:: underline
+    :class: underline
+        
+.. _member state: https://www.ecmwf.int/en/about/who-we-are/member-states 
+.. _instructions: https://apps.ecmwf.int/registration/
+
+    
+.. _ref-app-modes:
+
+Arising from the two user groups described in :doc:`../../Ecmwf/access`, ``flex_extract`` has 4 different :underline:`user application modes`:
+
+.. _ref-remote-des:
+
+  1. Remote (member)
+      In the **Remote mode** the user works directly on ECMWF Linux member state server, such as ``ecgate`` or ``cca``. The software will be installed in the ``$HOME`` directory. The user does not need to install any of the additional third-party libraries mentioned in :ref:`ref-requirements` as ECMWF provides everything with environment modules. The module selection will be done automatically in ``flex_extract``. 
+      
+.. _gateway:
+      
+  2. Gateway (member)
+      The **Gateway mode** can be used if a local member state gateway server is in place. Then the job scripts can be submitted to the ECMWF Linux member state server via the ECMWF web access tool ``ecaccess``. The installation script of ``flex_extract`` must be executed at the local gateway server such that the software will be installed in the ``$HOME`` directory at the ECMWF server and some extra setup is done in the local ``flex_extract`` directory at the local gateway server. For more information about establishing a gateway server please see section ???. For the **Gateway mode** the necessary environment has to be established which is described in :ref:`ref-local-prep`.
+
+.. _local:
+      
+  3. Local member
+      Scripts are installed and executed on a local machine, either in the current ``flex_extract`` directory or in a path given to the installation script. Under this scenario a software environment similar to that at ECMWF is required. Additionally, Web API's have to be installed to access ECMWF server. The complete installation process is described in :ref:`ref-local-prep`.
+      
+  4. Local public
+      Scripts are installed and executed on a local machine, either in the current ``flex_extract`` directory or in a path given to the installation script. Under this scenario a software environment similar to that at ECMWF is required. Additionally, Web API's have to be installed to access ECMWF server. The complete installation process is described in :ref:`ref-local-prep`. In this case a direct registration at ECMWF is necessary and the user has to accept a specific license agreement for each dataset he/she intends to retrieve. 
+      
+      
+An overview is sketched in figure :ref:`ref-fig-marsaccess`.
+
+.. _ref-fig-marsaccess:
+
+.. figure:: ../../_static/Diagramm_MarsAccess2.png
+
+   Application modes 
+
+
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
Index: for_developers/Sphinx/source/Documentation/Overview/convert.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/Overview/convert.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/Overview/convert.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,7 @@
+=======
+CONVERT
+=======
+
+ 
+    UNDER CONSTRUCTION
+    
Index: for_developers/Sphinx/source/Documentation/Overview/prog_flow.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/Overview/prog_flow.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/Overview/prog_flow.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,5 @@
+Program Flow
+================
+
+ 
+    UNDER CONSTRUCTION
Index: for_developers/Sphinx/source/Documentation/api.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/api.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/api.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,82 @@
+Auto Generated Documentation
+============================
+
+.. contents::
+    :local:
+    
+Porgrams
+--------
+
+install
+*******
+
+.. automodule:: install
+    :members:
+    
+submit
+******
+
+.. automodule:: submit
+    :members:
+    
+Classes
+-------
+
+ControlFile
+***********
+
+.. automodule:: ControlFile
+    :members:
+    
+EcFlexpart
+**********
+
+.. automodule:: EcFlexpart
+    :members:
+    
+GribUtil
+*********
+
+.. automodule:: GribUtil
+    :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: for_developers/Sphinx/source/Documentation/disagg.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/disagg.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/disagg.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,11 @@
+===========================
+Disaggregation of Flux Data
+===========================
+    
+    UNDER CONSTRUCTION    
+        
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    
Index: for_developers/Sphinx/source/Documentation/input.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/input.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/input.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,12 @@
+====================
+Control & Input Data
+====================
+        
+    UNDER CONSTRUCTION
+        
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    Input/control
+    Input/control_params
Index: for_developers/Sphinx/source/Documentation/output.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/output.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/output.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,10 @@
+===========
+Output Data
+===========
+    
+    UNDER CONSTRUCTION
+        
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
Index: for_developers/Sphinx/source/Documentation/overview.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/overview.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/overview.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,19 @@
+========
+Overview
+========
+        
+    UNDER CONSTRUCTION    
+    
+    
+    
+The system retrieves the data from the European Centre for
+Medium-Range Weather Forecasts (ECMWF) situated in Reading, United Kingdom.
+
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    Overview/app_modes
+    Overview/prog_flow
+    Overview/convert
Index: for_developers/Sphinx/source/Documentation/vertco.rst
===================================================================
--- for_developers/Sphinx/source/Documentation/vertco.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Documentation/vertco.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,10 @@
+===================
+Vertical Coordinate
+===================
+    
+    UNDER CONSTRUCTION
+        
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
Index: for_developers/Sphinx/source/Ecmwf/access.rst
===================================================================
--- for_developers/Sphinx/source/Ecmwf/access.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Ecmwf/access.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,21 @@
+************
+Access Modes
+************
+
+.. _public datasets: https://confluence.ecmwf.int/display/WEBAPI/Available+ECMWF+Public+Datasets
+.. _Computing Representative: https://www.ecmwf.int/en/about/contact-us/computing-representatives
+
+Access to the ECMWF Mars archive is divided into two groups: **member state** users and **public** users.
+
+**Member state user**: 
+    This access mode allows the user to work directly on the ECMWF Linux Member State Servers or via a Web Access Toolkit ``ecaccess`` through a local Member State Gateway Server. This enables the user to have direct and full access to the Mars archive. There might be some limitations in user rights such as the declined access to the latest forecasts. This has to be discussed with the `Computing Representative`_. This user group is also able to work from their local facilities without a gateway server in the same way a **public** user would. The only difference is the method of Web API which is automatically selected by ``flex_extract``.
+    
+
+**Public user**: 
+    This access mode allows every user to access the ECMWF `public datasets`_ from their local facilities. ``Flex_extract`` is able (tested for the use with ``FLEXPART``) to extract the re-analysis datasets such as ERA5, ERA-Interim and CERA-20C. The main difference to the **member state user** is the method of access with the Web API and the availability of data. For example, in ERA-Interim there is only a 6-hourly temporal resolution instead of 3 hours. The access method is selected by providing the command line argument "public=1" and providing the Mars keyword "dataset" in the ``CONTROL`` file. Also, the user has to explicitly accept the license of the dataset to be retrieved. This can be done as described in the installation process at section :ref:`ref-licence`.   
+        
+For information on how to register see :ref:`ref-registration`. 
+
+.. toctree::
+    :hidden:
+    :maxdepth: 2
Index: for_developers/Sphinx/source/Ecmwf/ec-links.rst
===================================================================
--- for_developers/Sphinx/source/Ecmwf/ec-links.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Ecmwf/ec-links.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,106 @@
+################################
+Link Collection for Quick finder
+################################
+
+
+ECMWF - General Overview   
+    `ECMWF Home <https://www.ecmwf.int/>`_
+    
+    `ECMWF Training <https://www.ecmwf.int/en/learning>`_
+    
+    `General User Documentation <https://software.ecmwf.int/wiki/display/UDOC/User+Documentation>`_
+    
+    `Software Support <https://confluence.ecmwf.int/display/SUP>`_
+
+MARS
+    `MARS user documentation <https://confluence.ecmwf.int//display/UDOC/MARS+user+documentation>`_
+    
+    `MARS Keywords <https://software.ecmwf.int/wiki/display/UDOC/MARS+keywords>`_
+    
+    `MARS Content <https://confluence.ecmwf.int/display/UDOC/MARS+content>`_
+    
+    `MARS Actions <https://confluence.ecmwf.int/display/UDOC/MARS+actions>`_
+  
+Registration
+    `Contact of Computing Representative's <https://www.ecmwf.int/en/about/contact-us/computing-representatives>`_
+
+    `Public registration for ECMWF Web API <https://software.ecmwf.int/wiki/display/WEBAPI/Access+MARS>`_
+        
+    `CDS Registration <https://cds.climate.copernicus.eu/user/register>`_
+
+Available Member State Datasets
+    `Web Interface for accessing member state datasets <http://apps.ecmwf.int/archive-catalogue/>`_
+    
+    `Available datasets for member state users <https://www.ecmwf.int/en/forecasts/datasets>`_
+    
+Available Public Datasets
+    `Web Interface for accessing public datasets <http://apps.ecmwf.int/datasets/>`_
+    
+    `ECMWF's public datasets <https://confluence.ecmwf.int/display/WEBAPI/Available+ECMWF+Public+Datasets>`_
+    
+    `Public dataset Licences <https://software.ecmwf.int/wiki/display/WEBAPI/Available+ECMWF+Public+Datasets>`_
+    
+    `ERA5 public dataset Licence <https://cds.climate.copernicus.eu/cdsapp#!/search?type=dataset>`_
+
+
+Datasets
+    Overview
+        `What is climate reanalysis <https://www.ecmwf.int/en/research/climate-reanalysis>`_
+
+    ERA-Interim
+        `What is ERA-Interim <https://confluence.ecmwf.int/display/CKB/What+is+ERA-Interim>`_
+        
+        `ERA-Interim documentation <https://www.ecmwf.int/en/elibrary/8174-era-interim-archive-version-20>`_
+    
+        `ERA-Interim dataset <https://www.ecmwf.int/en/forecasts/datasets/archive-datasets/reanalysis-datasets/era-interim>`_
+    
+    CERA-20C
+        `What is CERA-20C <https://software.ecmwf.int/wiki/display/CKB/What+is+CERA-20C>`_
+        
+        `CERA-20C documentation <https://www.ecmwf.int/en/forecasts/datasets/archive-datasets/reanalysis-datasets/cera-20c>`_
+    
+    ERA5
+        `What is ERA5 <https://software.ecmwf.int/wiki/display/CKB/What+is+ERA5>`_
+        
+        `What are the changes from ERA-Interim to ERA5 <https://confluence.ecmwf.int/pages/viewpage.action?pageId=74764925>`_
+        
+        `How to download ERA5 via Climate Data Store <https://confluence.ecmwf.int/display/CKB/How+to+download+ERA5>`_
+        
+        `How to migrate from ECMWF Web API to CDS API <https://confluence.ecmwf.int/display/CKB/How+to+migrate+from+ECMWF+Web+API+to+CDS+API>`_
+        
+        `ERA5 Documentation <https://software.ecmwf.int/wiki/display/CKB/ERA5+data+documentation>`_
+        
+
+Third Party Libraries
+    `ECMWF Web API Home <https://software.ecmwf.int/wiki/display/WEBAPI/ECMWF+Web+API+Home>`_
+
+    `Building ECMWF software with gfortran <https://software.ecmwf.int/wiki/display/SUP/2015/05/11/Building+ECMWF+software+with+gfortran>`_
+    
+    `FFTW <http://www.fftw.org>`_
+    
+    `EMOSLIB <https://software.ecmwf.int/wiki/display/EMOS/Emoslib>`_
+        
+    `ECcodes <https://software.ecmwf.int/wiki/display/ECC>`_
+    
+    `C3S ERA5: Web API to  CDS API <https://confluence.ecmwf.int/display/CKB/C3S+ERA5%3A+Web+API+to+CDS+API>`_
+    
+    `ECaccess Documentation <https://confluence.ecmwf.int/display/ECAC/ECaccess+Home>`_
+
+Plotting GRIB fields:
+    `Example Python script to plot GRIB files <https://software.ecmwf.int/wiki/display/CKB/How+to+plot+GRIB+files+with+Python+and+matplotlib>`_
+    
+
+Scientific Information
+    `Octahedral reduced Gaussian Grid <https://confluence.ecmwf.int/display/FCST/Introducing+the+octahedral+reduced+Gaussian+grid>`_
+    
+    `Precipitation <https://www.ecmwf.int/en/newsletter/147/meteorology/use-high-density-observations-precipitation-verification>`_
+
+
+Troubleshooting
+    `ECMWF Web API Troubleshooting <https://confluence.ecmwf.int/display/WEBAPI/Web-API+Troubleshooting>`_
+
+
+
+.. toctree::
+    :hidden:
+    :maxdepth: 2
Index: for_developers/Sphinx/source/Ecmwf/hintsecmwf.rst
===================================================================
--- for_developers/Sphinx/source/Ecmwf/hintsecmwf.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Ecmwf/hintsecmwf.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,25 @@
+##################################
+Hints to specify dataset retrieval
+##################################
+
+.. contents::
+    :local:
+
+
+
+How can I find out what data is available?
+==========================================
+
+Go to the `Web Interface for accessing member state datasets <http://apps.ecmwf.int/archive-catalogue/>`_
+and click yourself through the steps to define your set of data and see what is available to you.
+
+For public users there is  the `Web Interface for accessing public datasets <http://apps.ecmwf.int/datasets/>`_.
+
+
+
+
+
+
+.. toctree::
+    :hidden:
+    :maxdepth: 2
Index: for_developers/Sphinx/source/Ecmwf/msdata.rst
===================================================================
--- for_developers/Sphinx/source/Ecmwf/msdata.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Ecmwf/msdata.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,22 @@
+#########################################
+Available Datasets for Member State users
+#########################################
+
+
+
+Model level data
+================
+
+.. figure:: ../_files/ECMWF_FPparameter_ml.png
+
+
+Surface level data
+==================
+
+.. figure:: ../_files/ECMWF_FPparameter_sfc-0.png
+.. figure:: ../_files/ECMWF_FPparameter_sfc-1.png
+
+
+.. toctree::
+    :hidden:
+    :maxdepth: 2
Index: for_developers/Sphinx/source/Ecmwf/pubdata.rst
===================================================================
--- for_developers/Sphinx/source/Ecmwf/pubdata.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Ecmwf/pubdata.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,9 @@
+Available Datasets for Public users
+***********************************
+
+  IN PREPARATION
+
+
+.. toctree::
+    :hidden:
+    :maxdepth: 2
Index: for_developers/Sphinx/source/Evaluation/metrics.rst
===================================================================
--- for_developers/Sphinx/source/Evaluation/metrics.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Evaluation/metrics.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,8 @@
+Metrics
+=======
+
+.. csv-table: TTEST 
+..   :file: metrics_7.1.csv
+..   :widths: 1,1,1,1,1,1
+..   :header-rows: 1
+
Index: for_developers/Sphinx/source/Support/faq.rst
===================================================================
--- for_developers/Sphinx/source/Support/faq.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Support/faq.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,38 @@
+################################
+FAQ - Frequently asked questions
+################################
+
+.. contents::
+    :local:
+    
+    
+
+What can I do if I can't install the third party libraries from distribution packages?
+======================================================================================
+
+This can be the case if the user does not have admin rights. 
+It is possible to install the necessary libraries locally from source. 
+For this case you should follow the following steps:
+
+Installation hints:
+    1. `Read Emoslib installation instructions <https://software.ecmwf.int/wiki/display/EMOS/Emoslib>`_
+    2. `Read ECMWF blog about gfortran <https://software.ecmwf.int/wiki/display/SUP/2015/05/11/Building+ECMWF+software+with+gfortran>`_
+    3. `Install FFTW <http://www.fftw.org>`_
+    4. `Install EMOSLIB <https://software.ecmwf.int/wiki/display/EMOS/Emoslib>`_ (2 times make! one without any options and one with single precision option)
+    5. `Install ECCODES <https://software.ecmwf.int/wiki/display/ECC>`_
+    6. Register at Mars (:ref:`ref-registration`)
+    7. Install Web API's `CDS API <https://cds.climate.copernicus.eu/api-how-to>`_ and `ECMWF Web API <https://confluence.ecmwf.int/display/WEBAPI/ECMWF+Web+API+Home>`_
+    8. Check LD_LIBRARY_PATH environment variable if it contains all paths to the libs
+    9. Check available python packages (e.g. import eccodes / import grib_api / import ecmwfapi)
+    10. Start test retrieval (:ref:`ref-test-local`)
+    11. Install ``flex_extract`` (:doc:`../installation`)
+
+.. caution::
+    - use the same compiler and compiler version all the time
+    - don't forget to set all Library paths in the LD_LIBRARY_PATH environment variable
+    - adapt the ``flex_extract`` makefile
+
+
+.. toctree::
+    :hidden:
+    :maxdepth: 2
Index: for_developers/Sphinx/source/Support/known_bugs_issues.rst
===================================================================
--- for_developers/Sphinx/source/Support/known_bugs_issues.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/Support/known_bugs_issues.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,4 @@
+Known Bugs and Issues
+=====================
+
+ 
Index: for_developers/Sphinx/source/_files/CONTROLparameter-adddata.csv
===================================================================
--- for_developers/Sphinx/source/_files/CONTROLparameter-adddata.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/CONTROLparameter-adddata.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/CONTROLparameter-adddata.csv
Index: for_developers/Sphinx/source/_files/CONTROLparameter-data.csv
===================================================================
--- for_developers/Sphinx/source/_files/CONTROLparameter-data.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/CONTROLparameter-data.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/CONTROLparameter-data.csv
Index: for_developers/Sphinx/source/_files/CONTROLparameter-datafields.csv
===================================================================
--- for_developers/Sphinx/source/_files/CONTROLparameter-datafields.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/CONTROLparameter-datafields.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/CONTROLparameter-datafields.csv
Index: for_developers/Sphinx/source/_files/CONTROLparameter-domain.csv
===================================================================
--- for_developers/Sphinx/source/_files/CONTROLparameter-domain.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/CONTROLparameter-domain.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/CONTROLparameter-domain.csv
Index: for_developers/Sphinx/source/_files/CONTROLparameter-flexpart.csv
===================================================================
--- for_developers/Sphinx/source/_files/CONTROLparameter-flexpart.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/CONTROLparameter-flexpart.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/CONTROLparameter-flexpart.csv
Index: for_developers/Sphinx/source/_files/CONTROLparameter-fluxdata.csv
===================================================================
--- for_developers/Sphinx/source/_files/CONTROLparameter-fluxdata.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/CONTROLparameter-fluxdata.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/CONTROLparameter-fluxdata.csv
Index: for_developers/Sphinx/source/_files/CONTROLparameter-general.csv
===================================================================
--- for_developers/Sphinx/source/_files/CONTROLparameter-general.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/CONTROLparameter-general.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/CONTROLparameter-general.csv
Index: for_developers/Sphinx/source/_files/CONTROLparameter-time.csv
===================================================================
--- for_developers/Sphinx/source/_files/CONTROLparameter-time.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/CONTROLparameter-time.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/CONTROLparameter-time.csv
Index: for_developers/Sphinx/source/_files/CONTROLparameter-user.csv
===================================================================
--- for_developers/Sphinx/source/_files/CONTROLparameter-user.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/CONTROLparameter-user.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/CONTROLparameter-user.csv
Index: for_developers/Sphinx/source/_files/CONTROLparameter-verticalwind.csv
===================================================================
--- for_developers/Sphinx/source/_files/CONTROLparameter-verticalwind.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/CONTROLparameter-verticalwind.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/CONTROLparameter-verticalwind.csv
Index: for_developers/Sphinx/source/_files/ECMWF_FPparameter-sfc.csv
===================================================================
--- for_developers/Sphinx/source/_files/ECMWF_FPparameter-sfc.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/ECMWF_FPparameter-sfc.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/ECMWF_FPparameter-sfc.csv
Index: for_developers/Sphinx/source/_files/InstallationParameters.csv
===================================================================
--- for_developers/Sphinx/source/_files/InstallationParameters.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/InstallationParameters.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/InstallationParameter-csv.csv
Index: for_developers/Sphinx/source/_files/SubmitParameters.csv
===================================================================
--- for_developers/Sphinx/source/_files/SubmitParameters.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/SubmitParameters.csv	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/SubmitParameters.csv
Index: for_developers/Sphinx/source/_files/packages.png
===================================================================
--- for_developers/Sphinx/source/_files/packages.png	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_files/packages.png	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,1 @@
+../../../../for_developers/packages.png
Index: for_developers/Sphinx/source/_static/css/custom.css
===================================================================
--- for_developers/Sphinx/source/_static/css/custom.css	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_static/css/custom.css	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,7 @@
+.underline {
+  text-decoration: underline;
+}
+
+.wy-nav-content {
+    max-width: 1000px !important;
+}
Index: for_developers/Sphinx/source/_static/css/theme_overrides.css
===================================================================
--- for_developers/Sphinx/source/_static/css/theme_overrides.css	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/_static/css/theme_overrides.css	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,11 @@
+/* override table width restrictions */
+@media screen and (min-width: 767px) {
+
+   .wy-table-responsive table td {
+      /* !important prevents the common CSS stylesheets from overriding
+         this as on RTD they are loaded after this stylesheet */
+      white-space: normal !important;
+   }
+
+
+}
Index: for_developers/Sphinx/source/authors.rst
===================================================================
--- for_developers/Sphinx/source/authors.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/authors.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,24 @@
+**************
+Developer Team
+**************
+
+| MSc. Anne Philipp
+| Department of Meteorology and Geophysics /
+| Aerosol Physics and Environmental physics
+| University of Vienna 
+| Althanstraße 14 / UZA II
+| 1090 Vienna, Austria
+| mail: anne.philipp [at] univie.ac.at
+ 
+
+
+| Leopold Haimberger 
+| University of Vienna
+
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+
+    
Index: for_developers/Sphinx/source/changelog.rst
===================================================================
--- for_developers/Sphinx/source/changelog.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/changelog.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,87 @@
+Changelog
+=========
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+  
+.. _CDS API: https://cds.climate.copernicus.eu/api-how-to
+.. _ECMWF Web API: https://confluence.ecmwf.int/display/WEBAPI/ECMWF+Web+API+Home
+.. _new algorithm: https://www.geosci-model-dev.net/11/2503/2018/
+    
+.. _ref-v71: 
+   
+Release v7.1
+------------
+New Features
+############
+
+   * first set of UNIT tests
+   * first set of regression tests   
+   * structured documentation with Sphinx
+   * local retrieval via `CDS API`_ for ERA 5 data
+   * simplified installation process
+   * disaggregation of precipitation with a `new algorithm`_
+   
+Changes
+#######
+   * upgraded to Python3
+   * applied PEP8 style guide
+   * use of genshi templates 
+   * modularization of python source code
+   * upgrade from grib_api to ecCodes
+   * completely revised/refactored python section
+   * restructured program directories
+
+.. _ref-v704:
+   
+Release v7.0.4
+--------------
+New Features
+############
+
+    * Ensemble retrieval for ENFO and ELDA stream (ZAMG specific with extra synthesized ensembles for ELDA stream)
+ 
+Bug fixes
+#########
+ 
+    * diverse problems with ERA 5 retrieval 
+    * diverse problems with CERA-20C retrieval
+    * BASETIME retrieval option
+    * `CONVERT2` FORTRAN program: initialise fields to 0.
+      (introduced initialization of :literal:`field` variable in the Fortran program
+      with :literal:`field=0.` in file :literal:`rwGRIB2.f90` to avoid getting unreasonable large numbers.)
+
+.. _ref-v703:
+   
+Release v7.0.3
+--------------
+New Features
+############
+
+    * output of mars requests to an extra file (debugging and documentation)
+    * CERA-20C download
+    * ERA 5 download
+    * public user interface with `ECMWF Web API`_
+    * use of `ECMWF Web API`_ for local retrieval version
+   
+.. _ref-v702:
+   
+Release v7.0.2
+--------------
+New Features
+############
+
+    * Python based version
+    
+Changes
+#######
+
+    * korn shell scripts were substituted by python scripts
+
+.. _ref-v60:
+    
+Release v0.1 - v6.0
+-------------------
+
+    * old version which should no longer be used anymore        
Index: for_developers/Sphinx/source/conf.py
===================================================================
--- for_developers/Sphinx/source/conf.py	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/conf.py	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,196 @@
+# -*- coding: utf-8 -*-
+#
+# Configuration file for the Sphinx documentation builder.
+#
+# This file does only contain a selection of the most common options. For a
+# full list see the documentation:
+# http://www.sphinx-doc.org/en/master/config
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+import os
+import sys
+sys.path.insert(0, os.path.abspath('../../../source/python'))
+sys.path.insert(0, os.path.abspath('../../../source/python/mods'))
+sys.path.insert(0, os.path.abspath('../../../source/python/classes'))
+
+
+
+# -- Project information -----------------------------------------------------
+
+project = u'flex_extract'
+copyright = u'2019, Anne Philipp and Leopold Haimberger'
+author = u'Anne Philipp and Leopold Haimberger'
+
+# The short X.Y version
+version = u'7.1'
+# The full version, including alpha/beta/rc tags
+release = u'7.1 alpha'
+
+
+# -- General configuration ---------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+    'sphinx.ext.napoleon',
+    'sphinx.ext.autodoc',
+    'sphinx.ext.autosectionlabel',
+    'sphinx.ext.todo',
+    'sphinx.ext.coverage',
+    'sphinx.ext.mathjax',
+    'sphinx.ext.ifconfig',
+    'sphinx.ext.viewcode',
+    'sphinx.ext.githubpages',
+#    'sphinx_pyreverse',
+    'sphinx-jsonschema',
+    'sphinx.ext.intersphinx'
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+#
+# source_suffix = ['.rst', '.md']
+source_suffix = ['.rst', '.md', '.txt']
+
+# The master toctree document.
+master_doc = 'index'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path .
+exclude_patterns = []
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'sphinx_rtd_theme'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#
+html_theme_options = {
+     'display_version': True,
+     'titles_only': False,
+}
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Custom sidebar templates, must be a dictionary that maps document names
+# to template names.
+#
+# The default sidebars (for documents that don't match any pattern) are
+# defined by theme itself.  Builtin themes are using these templates by
+# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
+# 'searchbox.html']``.
+#
+# html_sidebars = {}
+
+
+# -- Options for HTMLHelp output ---------------------------------------------
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'flex_extractdoc'
+
+
+# -- Options for LaTeX output ------------------------------------------------
+
+latex_elements = {
+    # The paper size ('letterpaper' or 'a4paper').
+    #
+    'papersize': 'a4paper',
+
+    # The font size ('10pt', '11pt' or '12pt').
+    #
+    'pointsize': '12pt',
+
+    # Additional stuff for the LaTeX preamble.
+    #
+    # 'preamble': '',
+
+    # Latex figure (float) alignment
+    #
+    'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+    (master_doc, 'flex_extract.tex', u'flex\\_extract Documentation',
+     u'Anne Philipp and Leopold Haimberger', 'manual'),
+]
+
+
+# -- Options for manual page output ------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    (master_doc, 'flex_extract', u'flex_extract Documentation',
+     [author], 1)
+]
+
+
+# -- Options for Texinfo output ----------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+    (master_doc, 'flex_extract', u'flex_extract Documentation',
+     author, 'flex_extract', 'One line description of project.',
+     'Miscellaneous'),
+]
+
+
+# -- Extension configuration -------------------------------------------------
+
+html_context = {
+    'css_files': ['_static/css/custom.css',
+                  '_static/css/theme_overrides.css'
+                 ],
+}
+
+# -- Options for todo extension ----------------------------------------------
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = True
+
+
+# -- Add extra css -----------------------------------------------------------
+def setup(app):
+    app.add_stylesheet('css/custom.css')
+
+
+
+
Index: for_developers/Sphinx/source/dev_guide.rst
===================================================================
--- for_developers/Sphinx/source/dev_guide.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/dev_guide.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,14 @@
+Developer Guide
+===============
+ 
+    UNDER CONSTRUCTION
+    
+    
+.. repository (how /who manages the code, where to get)
+    
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+
+    Developers/gen_docu
Index: for_developers/Sphinx/source/documentation.rst
===================================================================
--- for_developers/Sphinx/source/documentation.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/documentation.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,99 @@
+=============
+Documentation
+=============
+        
+    Overview
+      - What is ``flex_extract``?
+      
+        - general overview
+        - motivation, aim
+        - directory structure
+        
+      - Software components
+        complete component structure (table or diagram)
+        
+        - Python package
+        
+          - Package diagram
+          - Files and modules as table with information about unit tests
+          - Api
+          
+        - Fortran program - CONVERT2
+        
+          - Package diagram
+          - Api
+          
+        - Wrapping shell-scripts
+        
+      - Dependencies
+      - General context (for who?, Usecases, work tree)
+      - Access to ECMWF
+      - Application modes
+      - Call tree
+      - Sequence diagram
+    
+    Control & Input Data
+      - Controlling files
+      
+        - setup.sh (explain input parameters)            
+        - job scripts
+        - compile job
+        - run[_local].sh
+        
+      - Input Data
+      
+        - CONTROL files
+        
+          - The CONTROL file
+          - CONTROL parameters
+          - Examples
+          - Changes and its downward compatibilities (eg M _ /grid)
+          
+        - ECMWF_ENV file
+        - Templates
+        
+    Output Data
+      - mars request file
+      - Mars grib files
+      - flux files
+      - index.idx
+      - CONTROL (neu)
+      - fort files
+      - EN* files
+      
+        - Usual  output
+        - Output for pure forecast
+        - Output for ensemble members
+        - Output for new precipitation disaggregation
+    
+    Disaggregation
+      - What is disaggregation?
+      - Why do we need it/ which fields?
+      - Method for precipitation
+      
+        - Old method
+        - New method
+        - Differences in resulting Gribfiles
+        
+      - Method for rest fields
+    
+    Vertical Coordinate
+      - Methods (GAUSS, ETA, OMEGA)
+      - CONVERT (Petra)
+    
+    Auto Generated Documentation
+      - Python
+      - Fortran
+
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+    Documentation/overview
+    Documentation/input
+    Documentation/output
+    Documentation/disagg
+    Documentation/vertco
+    Documentation/api
+  
Index: for_developers/Sphinx/source/ecmwf_data.rst
===================================================================
--- for_developers/Sphinx/source/ecmwf_data.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/ecmwf_data.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,43 @@
+**********
+ECMWF Data
+**********
+    
+.. _ECMWF: http://www.ecmwf.int
+.. _Member States: https://www.ecmwf.int/en/about/who-we-are/member-states
+
+
+The European Centre for Medium-Range Weather Forecasts (`ECMWF`_), based in Reading, UK, is an independent intergovernmental organisation supported by 34 states. It is both a research institute and a full time operational service. It produces global numerical weather predictions and some other data which is fully available to the national meteorological services in the `Member States`_, Co-operating States and the broader community. Especially, the published re-analysis datasets are made available to the public with some limits in specific datasets.
+
+The amount and structure of the available data from ECMWF is very complex. The operational data changes regularly in time and spatial resolution, physics and parameter. This has to be taken into account carefully and each user has to investigate his dataset of interest carefully before selecting and retrieving it with ``flex_extract``.
+The re-analysis datasets are consistent in all the above mentioned topics over their whole period but they have each their own specialities which makes treatment with ``flex_extract`` special in some way. For example, they have different starting times for their forecasts or different parameter availability. They also have differences in time and spatial resolution and most importantly for ``flex_extract`` they are different in the way of providing the vertical coordinate. 
+
+There is much to learn from ECMWF and their datasets and data handling and this might be confusing at first. We therefore collected the most important information for ``flex_extract`` users. In the following sections the user can use them to get to know enough to understand how ``flex_extract`` is best used and to select the parameters of the ``CONTROL`` files. 
+
+
+:doc:`Ecmwf/access`
+    Description of available access methods to the ECMWF data.
+
+:doc:`Ecmwf/msdata`
+    Information about available data and parameters for member state users which can be retrieved with ``flex_extract``
+
+:doc:`Ecmwf/pubdata`
+    Information about available data and parameters for the public datasets which can be retrieved with ``flex_extract``
+
+:doc:`Ecmwf/hintsecmwf`
+    Collection of hints to best find information to define the dataset for retrievement and
+    to define the ``CONTROL`` files.
+
+:doc:`Ecmwf/ec-links`
+    Link collection for additional and useful information as well as references to specific dataset publications.
+
+
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+
+    Ecmwf/access
+    Ecmwf/msdata
+    Ecmwf/pubdata
+    Ecmwf/hintsecmwf
+    Ecmwf/ec-links
+    
Index: for_developers/Sphinx/source/evaluation.rst
===================================================================
--- for_developers/Sphinx/source/evaluation.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/evaluation.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,42 @@
+Evaluation
+==========
+
+    UNDER CONSTRUCTION
+    
+    
+    
+Tests
+- unit tests
+  - table with all files and their functions and which already have unit tests
+- regression tests
+- performance
+- test runs with control files
+
+Metriken
+- list all of them
+
+
+Coverage
+- test coverage?! 
+- documentation coverage
+
+Static Analysis
+- pylint
+- pyreverse
+- radon
+    
+Performance analysis:
+-	Whole software
+-	Disaggregation
+-	Convert2
+-   prepare_flexpart
+-	Andere komponenten
+
+    
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+..    evaluation/code
+    
Index: for_developers/Sphinx/source/first_steps.rst
===================================================================
--- for_developers/Sphinx/source/first_steps.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/first_steps.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,14 @@
+First Steps
+===========
+ 
+    UNDER CONSTRUCTION
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+    
+..    user_guide/oper_modes
+..    user_guide/ecmwf
+..    user_guide/how_to
+..    user_guide/control_templates
+    
Index: for_developers/Sphinx/source/index.rst
===================================================================
--- for_developers/Sphinx/source/index.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/index.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,159 @@
+.. flex_extract documentation master file, created by
+   sphinx-quickstart on Wed Oct 17 18:39:05 2018.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+========================================================
+Welcome to :literal:`flex_extract's` user documentation!
+========================================================
+
+:literal:`flex_extract` is an open-source software to retrieve meteorological fields from the European Centre for Medium-Range Weather Forecasts (ECMWF) Mars archive to serve 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 third-party software and libraries required by :literal:`flex_extract` are open source and free of charge. 
+
+.. raw:: html
+
+    <table style="width:100%;">
+      <tr>
+        <td style="width:30%;height:150px;">
+          <div style="width:100%;height:60px;margin-left:20%;position:relative;">
+            <img style="position:absolute;height:90%;vertical-align:bottom;" src="_static/install_icon.png">
+          </div>
+          <h2><a href="installation.html">Installation</a></h2>
+          <ul>
+            <li><a href="installation.html#ref-requirements">Environment requirements</a></li>
+            <li><a href="installation.html#ref-download">Download flex_extract</a></li>
+            <li><a href="installation.html#ref-install-fe">Install flex_extract</a></li>
+          </ul>
+        </td>          
+        <td style="width:30%;height:150px;">
+          <div style="width:100%;height:60px;margin-left:20%;position:relative;">
+            <img style="position:absolute;height:90%;vertical-align:bottom;" src="">
+          </div>
+          <h2><a href="ecmwf_data.html">ECMWF data</a></h2>
+          <ul>
+            <li><a href="ecmwf_data.html">Overview</a></li>
+            <li><a href="Ecmwf/access.html">Access Modes</a></li>
+            <li><a href="Ecmwf/ec-links.html">Link Collection</a></li>
+          </ul>
+        </td>
+        <td style="width:30%;height:150px;">
+          <div style="width:100%;height:60px;margin-left:20%;position:relative;">
+            <img style="position:absolute;height:90%;vertical-align:bottom;" src="_static/prog_icon.png">
+          </div>
+          <h2><a href="documentation.html">Documentation</a></h2>
+          <ul>
+            <li><a href="">Content</a></li>
+            <li><a href="">Configuration</a></li>
+            <li><a href="">Tutorials</a></li>
+          </ul>
+        </td>
+      </tr>
+      <tr>   
+        <td style="width:30%;height:150px;">
+          <div style="width:100%;height:60px;margin-left:20%;position:relative;">
+            <img style="position:absolute;height:90%;vertical-align:bottom;" src="_static/guide_icon.png">
+          </div>
+          <h2><a href="first_steps.html">First Steps</a></h2>
+          <ul>
+            <li><a href="">...</a></li>
+            <li><a href="">...</a></li>
+            <li><a href="">...</a></li>
+          </ul>
+        </td>  
+        <td style="width:30%;height:150px;">
+          <div style="width:100%;height:60px;margin-left:20%;position:relative;">
+            <img style="position:absolute;height:90%;vertical-align:bottom;" src="">
+          </div>
+          <h2><a href="evaluation.html">Evaluation</a></h2>
+          <ul>
+            <li><a href="">Code</a></li>
+            <li><a href="">Functionality</a></li>
+            <li><a href="">Regression</a></li>
+          </ul>
+        </td> 
+        <td style="width:30%;height:150px;">
+          <div style="width:100%;height:60px;margin-left:20%;position:relative;">
+            <img style="position:absolute;height:90%;vertical-align:bottom;" src="_static/guide_icon.png">
+          </div>
+          <h2><a href="dev_guide.html">Developer</a></h2>
+          <ul>
+            <li><a href="">...</a></li>
+            <li><a href="">...</a></li>
+            <li><a href="">...</a></li>
+          </ul>
+        </td>
+      </tr>
+      </table>
+      <table style="width:100%;">
+      <tr>
+        <td style="width:15%">
+        </td>
+        <td style="width:30%;height:150px;">
+          <div style="width:100%;height:60px;margin-left:10%;position:relative;">
+            <img style="position:absolute;height:90%;vertical-align:bottom;" src="_static/change_icon.png">
+          </div>
+          <h2><a href="changelog.html">Changelog</a></h2>
+          <ul>
+            <li><a href="changelog.html#ref-v71">v7.1</a></li>
+            <li><a href="changelog.html#ref-v704">v7.0.4</a></li>
+            <li><a href="changelog.html#ref-v703">v7.0.3</a></li>
+            <li><a href="changelog.html#ref-v60">v6</a></li>
+          </ul>
+        </td>        
+        <td style="width:30%;height:150px;">
+          <div style="width:100%;height:60px;margin-left:10%;position:relative;">
+          <img style="position:absolute;height:100%;vertical-align:bottom;" src="_static/help_icon.png">
+          </div>
+          <h2><a href="support.html">Support</a></h2>
+          <ul>
+            <li><a href="support.html#ref-ticket-system">Ticket system</a></li>
+            <li><a href="support.html#ref-mailing-list">Mailing list</a></li>
+            <li><a href="Support/known_bugs_issues.html">Known bugs or issues</a></li>
+            <li><a href="Support/faq.html">FAQ</a></li>
+          </ul>
+        </td>
+        <td style="width:10%">
+        </td>
+      </tr>
+    </table>
+    <p></p>
+    
+.. note::
+ 
+   .. figure:: _static/cc-by-40.png
+     :width: 100px
+     
+   This work is licensed under the Creative Commons Attribution 4.0
+   International License. To view a copy of this license, visit
+   http://creativecommons.org/licenses/by/4.0/ or send a letter to
+   Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
+
+.. toctree::
+   :maxdepth: 3
+   :caption: Table of Contents:
+
+   installation
+   first_steps
+   ecmwf_data
+   documentation
+   evaluation
+   dev_guide
+   changelog
+   support
+   Support/faq
+   authors
+   
+
+.. Indices and tables
+.. ==================
+
+.. * :ref:`genindex`
+.. * :ref:`modindex`
+.. * :ref:`search`
+
Index: for_developers/Sphinx/source/installation.rst
===================================================================
--- for_developers/Sphinx/source/installation.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/installation.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,940 @@
+************
+Installation
+************
+
+.. role:: underline
+    :class: underline
+    
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+     
+.. _Python 3: https://docs.python.org/3/
+.. _Python3: https://www.python.org/downloads/
+.. _Anaconda Python3: https://www.anaconda.com/distribution/#download-section
+
+.. _numpy: http://www.numpy.org/
+.. _ecmwf-api-client: https://confluence.ecmwf.int/display/WEBAPI/ECMWF+Web+API+Home
+.. _cdsapi: https://cds.climate.copernicus.eu/api-how-to
+.. _genshi: https://genshi.edgewall.org/
+.. _eccodes for python: https://packages.debian.org/sid/python3-eccodes 
+.. _eccodes for conda: https://anaconda.org/conda-forge/eccodes
+.. _gfortran: https://gcc.gnu.org/wiki/GFortran
+.. _fftw3: http://www.fftw.org
+.. _eccodes: https://software.ecmwf.int/wiki/display/ECC
+.. _emoslib: https://software.ecmwf.int/wiki/display/EMOS/Emoslib
+.. _member state: https://www.ecmwf.int/en/about/who-we-are/member-states 
+.. _registration form: https://apps.ecmwf.int/registration/
+.. _CDS API registration: https://cds.climate.copernicus.eu/user/register
+.. _ECMWF ectrans site: https://confluence.ecmwf.int/display/ECAC/Unattended+file+transfer+-+ectrans
+.. _ECaccess Presentation: https://confluence.ecmwf.int/download/attachments/45759146/ECaccess.pdf
+.. _ECMWF's instructions on gateway server: https://confluence.ecmwf.int/display/ECAC/ECaccess+Home
+.. _Computing Representative: https://www.ecmwf.int/en/about/contact-us/computing-representatives
+.. _MARS access: https://confluence.ecmwf.int//display/WEBAPI/Access+MARS
+
+.. _download section: https://www.flexpart.eu/downloads
+
+
+
+``flex_extract`` is a software package which contains a mix of Python and Shell scripts as well as a Fortran program. These components rely on a couple of third party libraries which need to be prepared first before starting the installation process. For now, the software is only tested for a Linux/Unix environment. Feel free to try it out on other platforms.
+
+Start with the decision of which `user group <Ecmwf/access>`_ you belong to and follow the instructions at :ref:`ref-registration` to get an account at ECMWF. Considering your user group and the method of applying ``flex_extract`` there appear to be 4 application modes:  
+
+- Remote (for member state users only) :ref:`[installation]<ref-remote-mode>`
+- Gateway (for member state users only) :ref:`[installation]<ref-gateway-mode>`
+- Local member :ref:`[installation]<ref-local-mode>`
+- Local public :ref:`[installation]<ref-local-mode>`
+
+More information can be found in :doc:`Documentation/Overview/app_modes`.
+
+.. note::
+
+   If you encounter any problems in the installation process, you can ask for :doc:`support`.
+
+
+
+
+
+.. _ref-registration:
+
+Registration at ECMWF
+=====================
+
+Decide which user group you belong to and follow the instructions for registration:
+
+**Member state user**: 
+    To get a member-state user account, users have to be a resident of a `member state`_. In that case, you can contact your `Computing Representative`_ for granting access. If you would like to use the local application mode to retrieve **ERA5** data you'd have to register at the `Copernicus Climate Data Store <https://cds.climate.copernicus.eu/user/register>`_ also.
+
+**Public user**: 
+    To be able to download all intended public datasets with ``flex_extract`` such as **ERA-Interim**, **CERA-20C** and **ERA5**, the public user has to create 2 accounts. 
+    At first, registration at the ECMWF website by filling out this `registration form`_ is needed to be able to retrieve *ERA-Interim* and *CERA-20C* data. For the retrievement of *ERA5* a registration at the `Copernicus Climate Data Store <https://cds.climate.copernicus.eu/user/register>`_ is needed in addition.
+    
+    
+    
+    
+    
+    
+.. _ref-licence:
+    
+Agree on Licences for Public Datasets
+=====================================
+
+Each public dataset which is intended to be downloaded by ``flex_extract`` has its own licence which has to be accepted, regardless of the user group. 
+
+For the *ERA-Interim* and *CERA-20C* datasets this can be done at the ECMWF website `Available ECMWF Public Datasets <https://confluence.ecmwf.int/display/WEBAPI/Available+ECMWF+Public+Datasets>`_. Log in and follow the licence links on the right side for each dataset and accept it.
+    
+For the *ERA5* dataset this has to be done at the `Climate Data Store (CDS) website <https://cds.climate.copernicus.eu/cdsapp#!/search?type=dataset>`_. Log in with your credentials and then select on the left panel the product type "Reanalysis" for finding *ERA5* datasets. Then follow the link of a title with *ERA5* (anyone) to the full dataset record, click on tab "Download data" and scroll down. There is a section "Terms of use" where you have to click the :underline:`Accept terms` button.    
+
+   
+
+
+
+
+.. _ref-download:
+
+Download ``flex_extract``
+=========================
+
+There are 2 options to download ``flex_extract``:
+
+tar ball
+    You can download the latest prepared release tar ball from the `download section`_ 
+    of our ``FLEXPART`` community website and then untar the file. Substitute
+    the **<ID>** in the ``wget`` command with the ID-number of the ``flex_extract`` 
+    release tar ball in the list of downloads at the community website. 
+    
+    
+    .. code-block:: bash
+       
+       wget https://www.flexpart.eu/downloads/<ID>
+       tar -xvf <flex_extract_vX.X.tar>
+
+git repo    
+    Or you can clone the current release version from our git repository master branch.
+
+    .. code-block:: bash
+
+       $ git clone https://www.flexpart.eu/gitmob/flexpart
+
+
+
+
+
+.. _ref-requirements: 
+ 
+Environment Requirements
+========================
+
+This is a list of the general environment requirements for ``flex_extract``.
+What is required exactly for each application mode will be described in the specifc installation section. 
+
+    
+To run the python part of ``flex_extract`` a `Python 3`_ environment is needed.
+We tested ``flex_extract`` with a normal Linux Python package distribution and Anaconda Python. 
+Except for `Python3`_ all are python packages which can be installed via ``pip``.
+
+* `Python3`_ or `Anaconda Python3`_
+* `numpy`_
+* `ecmwf-api-client`_ (Web Interface to ECMWF servers for datasets except ERA5)
+* `cdsapi`_ (Web Interface to `C3S <https://climate.copernicus.eu/>`_ servers for ERA5)
+* `genshi`_
+* `eccodes for python`_  
+ 
+For the Fortran part of ``flex_extract`` we need the following distribution packages: 
+ 
+* `gfortran`_
+* `fftw3`_
+* `eccodes`_
+* `emoslib`_
+
+
+
+
+
+
+.. _ref-install-fe:
+
+Installation of ``flex_extract``
+================================
+
+The actual installation of ``flex_extract`` will be done by executing a `Shell` script called ``setup.sh``.
+It defines some parameters and calls a Python script by giving the parameters as command line arguments.
+More information on the script and its parameters can be found at :doc:`Documentation/Input/setup`. 
+
+For each application mode installation section we describe the requirements for the explicit 
+environment and how it is installed, test if it works and how the actual ``flex_extract``
+installation has to be done. At the users local side not all software has to be present for ``flex_extract``.
+
+
+
+
+
+
+.. _ref-remote-mode: 
+
+Remote Mode
+-----------
+
+.. _ref-req-remote: 
+ 
+Remote Environment Requirements
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The environment for ``flex_extract`` on ECMWF servers has to provide these 
+software packages and libraries:
+    
++---------------------------+-----------------+
+|  Python part              | Fortran part    |
++---------------------------+-----------------+
+| * `Python3`_              | * `gfortran`_   |
+| * `numpy`_                | * `fftw3`_      |
+| * `genshi`_               | * `eccodes`_    |
+| * `eccodes for python`_   | * `emoslib`_    |
++---------------------------+-----------------+
+
+
+.. _ref-prep-remote:
+
+Prepare Remote Environment
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 
+The environment on the ECMWF server (such as *ecgate* or *cca*) is already 
+prepared. ECMWF server provide all libraries via a module system which is 
+going to be selected by ``flex_extract`` automatically.
+
+
+.. _ref-install-remote:
+
+Remote Installation
+^^^^^^^^^^^^^^^^^^^
+
+First, log in on one of the ECMWF Linux server, such as *ecgate* or *cca/ccb*. 
+Substitute *<ecuid>* with your ECMWF user name:
+
+.. code-block:: bash
+   
+   ssh -X <ecuid>@ecaccess.ecmwf.int
+
+This will lead to the following output on the command line, asking for your 
+password:
+   
+.. code-block:: bash
+
+   Authorized access only.
+
+   ***************************************************************
+      For further information, read the ECaccess documentation at:
+
+      https://software.ecmwf.int/wiki/display/ECAC/ECaccess+Home
+
+      You can also use ECaccess to load & download files from your
+      EChome, ECscratch or ECfs directories using the ECaccess FTP
+      server:
+
+      ftp://uid@ecaccess.ecmwf.int/
+
+      Please note you must use your UID and ActivID code to login!
+   ***************************************************************
+
+   <ecuid>@131.130.157.5's password: ***
+   Select hostname (ecgate, cca, ccb) [ecgate]: ecgate
+
+   [<ecuid>@ecgb11 ~]$ 
+   
+   
+Then, copy the ``flex_extract`` tar ball (from section :ref:`ref-download`) 
+to the ``$HOME`` directory of the ECMWF Linux server via ``scp``.
+Substitute the *<localuser>* and *<server.edu>* placeholders with your credentials. 
+Untar the file and change into the ``flex_extract`` root directory. 
+
+.. code-block:: bash
+
+   scp <localuser>@<server.edu>:/path/to/tarfile/flex_extract_vX.X.tar.gz  $HOME/
+   cd $HOME
+   tar xvf flex_extract_vX.X.tar.gz
+   cd flex_extract_vX.X
+   
+
+On these ECMWF servers, it is not necessary to prepare the environment or the 
+``Makefile`` for the Fortran program (``CONVERT2``) as described above. 
+All third party libraries are available from a module system. The ``Makefile``
+is optimized for ECMWF servers and the compilation 
+script ``compilejob.ksh``, which will be submitted by ``flex_extract`` to the 
+batch job queue at ECMWF, does load all relevant modules from the ECMWF's module system. 
+
+So there is just the need to execute the ``setup.sh`` script from the 
+``flex_extract`` root directory for installation. 
+Before executing it, it is necessary to adapt some parameters from ``setup.sh``
+described in :ref:`ref-setup`. 
+
+Open ``setup.sh`` with your editor and adapt the values:  
+
++----------------------------------------------+----------------------------------------------+   
+|   Take this for target = **ectrans**         |  Take this for target = **cca**              | 
++----------------------------------------------+----------------------------------------------+
+| .. code-block:: bash                         | .. code-block:: bash                         | 
+|                                              |                                              | 
+|   ...                                        |   ...                                        |     
+|   # -----------------------------------------|   # -----------------------------------------|
+|   # AVAILABLE COMMANDLINE ARGUMENTS TO SET   |   # AVAILABLE COMMANDLINE ARGUMENTS TO SET   |
+|   #                                          |   #                                          |  
+|   # THE USER HAS TO SPECIFY THESE PARAMETER  |   # THE USER HAS TO SPECIFY THESE PARAMETER  | 
+|   #                                          |   #                                          |
+|   TARGET='ecgate'                            |   TARGET='cca'                               |
+|   MAKEFILE='Makefile.gfortran'               |   MAKEFILE='Makefile.CRAY'                   |  
+|   ECUID='uid'                                |   ECUID='uid'                                |  
+|   ECGID='gid'                                |   ECGID='gid'                                |
+|   GATEWAY=None                               |   GATEWAY=None                               |
+|   DESTINATION=None                           |   DESTINATION=None                           | 
+|   INSTALLDIR=None                            |   INSTALLDIR=''                              | 
+|   JOB_TEMPLATE='job.template'                |   JOB_TEMPLATE='job.template'                |
+|   CONTROLFILE='CONTROL_EA5'                  |   CONTROLFILE='CONTROL_EA5'                  | 
+|   ...                                        |   ...                                        |    
++----------------------------------------------+----------------------------------------------+
+
+:underline:`Please substitute the values of ECUID and ECGID
+with your own credentials and settings.`
+
+.. note::
+
+   If a local gateway server is available the transfer of files could be done
+   via the ``ECaccess`` commands. Therefore a valid *GATEWAY* and *DESTINATION*
+   have to be present and should be set in the ``setup.sh`` file. 
+
+
+Afterwards, type:
+
+.. code-block:: bash
+
+   module load python3   
+   ./setup.sh
+   
+to start the installation. You should see the following output at the command line. 
+    
+    
+.. code-block:: bash
+
+   # Output of setup.sh
+   Create tarball ...
+   Job compilation script has been submitted to ecgate for installation in ${HOME}/flex_extract_vX.X
+   You should get an email with subject "flexcompile" within the next few minutes!
+
+    
+The email content should look like this with a "SUCCESS" statement in the last line:
+
+.. code-block:: bash
+
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -g -O3 -fopenmp phgrreal.f
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -g -O3 -fopenmp grphreal.f
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -g -O3 -fopenmp ftrafo.f
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -O3 -I. -I/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/include -g rwGRIB2.f90
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -O3 -I. -I/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/include -g posnam.f
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -O3 -I. -I/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/include -g preconvert.f90
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -g -O3 -o ./CONVERT2 ftrafo.o phgrreal.o grphreal.o rwGRIB2.o posnam.o preconvert.o -L/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/lib -Wl,-rpath,/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/lib -leccodes_f90 -leccodes -ljasper -lpthread -L/usr/local/apps/jasper/1.900.1/LP64/lib -ljasper -lm -L/usr/local/apps/libemos/000455/GNU/6.3.0/lib  -Wl,-rpath,/usr/local/apps/libemos/000455/GNU/6.3.0/lib  -lemos.R64.D64.I32 -L/usr/local/apps/fftw/3.3.4/GNU/6.3.0/lib -Wl,-rpath,/usr/local/apps/fftw/3.3.4/GNU/6.3.0/lib -lfftw3   
+    -rwxr-x---. 1 USER at 353134 May 23 12:27 CONVERT2
+    SUCCESS!    
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.. _ref-gateway-mode:
+
+Gateway Mode
+------------
+
+
+.. _ref-req-gateway: 
+ 
+Gateway Environment Requirements
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The environment on your local system has to provide these software packages
+and libraries, since ``flex_extract`` does only prepare the job script and send
+it to the ECMWF servers:
+    
+* `Python3`_ or `Anaconda Python3`_
+* `numpy`_
+* `genshi`_
+ 
+
+.. _ref-prep-gateway:
+
+Prepare Gateway Environment
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The easiest way to install all required packages is to use the package management system of your Linux distribution. To do so, it is necessary to use a user with admin rights.
+The installation was tested on a *Debian GNU/Linux buster/sid* and an *Ubuntu 18.04 Bionic Beaver* system.
+
+.. code-block:: sh
+
+   # On a Linux Debian or Ubuntu system do
+   # (if not already available):
+   sudo apt -PV install python3
+   sudo apt -PV install pip
+   pip install genshi
+   pip install numpy
+
+
+.. _ref-test-gateway:
+
+Test Gateway Environment
+^^^^^^^^^^^^^^^^^^^^^^^^
+ 
+Check the availability of the python packages by typing ``python3`` in
+a terminal window and run the ``import`` commands in the python shell. 
+If there are no error messages, you succeeded in setting up the environment.
+
+.. code-block:: python
+    
+   # check in python3 console
+   import genshi
+   import numpy
+ 
+
+
+.. _ref-install-gateway:
+
+Gateway Installation
+^^^^^^^^^^^^^^^^^^^^
+
+In this mode, access to the ECMWF computing and archiving facilities is enabled through an ECaccess gateway server on a local member state server. The ECaccess framework is necessary to interactively submit jobs to the ECMWF batch system and to transfer files between ECMWF and local gateway server. 
+
+Please see `ECMWF's instructions on gateway server`_ to establish the gateway server if not already in place.
+Additionally, to be able to use the Ecaccess file transfer service **ectrans** please also create an association. 
+The easiest way is to visit the ECaccess Member State Gateway website (e.g. msgatway.ecmwf.int) and follow the instructions in the short `ECaccess Presentation`_ (page 17 ff.). Additional documentation can be found on the `ECMWF ectrans site`_.
+
+After everything is set up you have to create an *ecaccess certificate* to be able to send and receive files from and to the ECMWF server. You can do this by using the ``ecaccess-certificate-create`` command on the gateway server. You will be prompted for your ECMWF member state user name and a password (which will be usually generated by a Token). This certificate has to be re-newed periodically (every 7 days). 
+
+.. code-block:: bash
+   
+   $ ecaccess-certificate-create
+   Please enter your user-id: example_username
+   Your passcode: ***
+   
+``Flex_extract`` will be run on an ECMWF server which makes the setup the same as for the **remote mode**. In the ``setup.sh`` script :ref:`[ref] <ref-setup>`, select the ``Makefile.gfortran`` for the ``CONVERT2`` Fortran program and the ECMWF server (*target*) you would like to use. 
+The job script, send to the job queue via the ECaccess software, selects again automatically the correct libraries from the module system. For enableing the file transfer you have to set the *ECUID*, *ECGID*, *GATEWAY* and *DESTINATION* parameter values.
+ 
+
+.. code-block:: bash
+    :caption: 'Example settings for a gateway installation.'
+    :name: setup.sh
+    
+    # -----------------------------------------------------------------
+    # AVAILABLE COMMANDLINE ARGUMENTS TO SET
+    #
+    # THE USER HAS TO SPECIFY THESE PARAMETER
+    #
+    TARGET='ecgate'
+    MAKEFILE='Makefile.gfortran'
+    ECUID='uid'
+    ECGID='gid'
+    GATEWAY='server.example.edu'
+    DESTINATION='example@genericSftp'
+    INSTALLDIR=None
+    JOB_TEMPLATE='job.template'
+    CONTROLFILE='CONTROL_EA5'
+
+
+Afterwards, type:
+
+.. code-block:: bash
+
+   $ ./setup.sh
+   
+to start the installation. You should see the following output at the command line. 
+    
+    
+.. code-block:: bash
+
+   # Output of setup.sh
+   Create tarball ...
+   Job compilation script has been submitted to ecgate for installation in ${HOME}/flex_extract_vX.X
+   You should get an email with subject "flexcompile" within the next few minutes!
+
+    
+The email content should look like this with a "SUCCESS" statement in the last line:
+
+.. code-block:: bash
+
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -g -O3 -fopenmp phgrreal.f
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -g -O3 -fopenmp grphreal.f
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -g -O3 -fopenmp ftrafo.f
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -O3 -I. -I/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/include -g rwGRIB2.f90
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -O3 -I. -I/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/include -g posnam.f
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -O3 -I. -I/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/include -g preconvert.f90
+    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -g -O3 -o ./CONVERT2 ftrafo.o phgrreal.o grphreal.o rwGRIB2.o posnam.o preconvert.o -L/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/lib -Wl,-rpath,/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/lib -leccodes_f90 -leccodes -ljasper -lpthread -L/usr/local/apps/jasper/1.900.1/LP64/lib -ljasper -lm -L/usr/local/apps/libemos/000455/GNU/6.3.0/lib  -Wl,-rpath,/usr/local/apps/libemos/000455/GNU/6.3.0/lib  -lemos.R64.D64.I32 -L/usr/local/apps/fftw/3.3.4/GNU/6.3.0/lib -Wl,-rpath,/usr/local/apps/fftw/3.3.4/GNU/6.3.0/lib -lfftw3   
+    -rwxr-x---. 1 USER at 353134 May 23 12:27 CONVERT2
+    SUCCESS!    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+.. _ref-local-mode:
+
+Local Mode
+----------
+
+
+
+.. _ref-req-local: 
+ 
+Local Environment Requirements
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+For the local access modes **member** and **public** there is no difference in 
+the installation process.
+
+The environment on your local system has to provide these software packages
+and libraries, since all extraction and preparation is done at the local system:
+
++------------------------------------------------+-----------------+
+|  Python part                                   | Fortran part    |
++------------------------------------------------+-----------------+
+| * `Python3`_                                   | * `gfortran`_   |
+| * `numpy`_                                     | * `fftw3`_      |
+| * `genshi`_                                    | * `eccodes`_    |
+| * `eccodes for python`_                        | * `emoslib`_    |
+| * `ecmwf-api-client`_ (everything except ERA5) |                 |
+| * `cdsapi`_ (just for ERA5)                    |                 |
++------------------------------------------------+-----------------+
+
+
+.. _ref-prep-local:
+
+Prepare Local Environment
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The easiest way to install all required packages is to use the package management system of your Linux distribution. To do so, it is necessary to use a user with admin rights.
+The installation was tested on a *Debian GNU/Linux buster/sid* and an *Ubuntu 18.04 Bionic Beaver* system.
+
+.. code-block:: sh
+
+   # On a Linux Debian or Ubuntu system do
+   # (if not already available):
+   sudo apt -PV install python3
+   sudo apt -PV install pip
+   sudo apt -PV install gfortran
+   sudo apt -PV install fftw3-dev 
+   sudo apt -PV install libeccodes-dev
+   sudo apt -PV install libemos-dev 
+   sudo apt -PV install python3-eccodes
+   pip install genshi
+   pip install numpy
+   pip install cdsapi 
+   pip install ecmwf-api-client 
+
+.. note::
+
+    In case you would like to use Anaconda Python we recommend you follow the installation instructions of 
+    `Anaconda Python Installation for Linux <https://docs.anaconda.com/anaconda/install/linux/>`_ and then install the
+    ``eccodes`` package from ``conda`` with:
+
+    .. code-block:: bash
+
+       conda install conda-forge::python-eccodes
+
+
+The CDS API (cdsapi) and the ECMWF Web API (ecmwf-api-client) have both to be installed since ERA5 can only be retrieved with the ``CDS API`` and all other datasets with the ``ECMWF Web API``.     
+       
+Both user groups have to provide key's with their credentials for the Web API's in their home directory. Therefore, follow these instructions:
+   
+ECMWF Web API:
+   Go to `MARS access`_ website and log in with your credentials. Afterwards, on this site in section "Install ECMWF KEY" the key for the ECMWF Web API should be listed. Please follow the instructions in this section under point 1 (save the key in a file `.ecmwfapirc` in your home directory). 
+     
+CDS API:
+   Go to 'CDS API registration'_ and register there too. Log in at the `cdsapi`_ website and follow the instructions at section "Install the CDS API key" to save your credentials in a `.cdsapirc` file.
+     
+
+.. _ref-test-local:
+   
+Test Local Environment
+^^^^^^^^^^^^^^^^^^^^^^
+
+Check the availability of the system packages with ``dpkg -s <package-name> |  grep Status`` or ``rpm -q <package_name>``, depending on your system. For example: 
+
+.. code-block:: sh
+
+   $ dpkg -s libeccodes-dev |  grep Status
+   # or
+   $ rpm -q libeccodes-dev
+ 
+Afterwards, check the availability of the python packages by typing ``python3`` in
+a terminal window and run the ``import`` commands in the python shell. If there are no error messages, you succeeded in setting up the environment.
+
+.. code-block:: python
+    
+   # check in python3 console
+   import eccodes
+   import genshi
+   import numpy
+   import cdsapi
+   import ecmwfapi
+   
+
+
+Test the Web API's
+""""""""""""""""""
+
+You can start very simple test retrievals for both Web API's to be sure that everything works. This is recommended to minimize the range of possible errors using ``flex_extract`` later on.
+
+ECMWF Web API
+"""""""""""""
+
+**Member user**
+    Please use this piece of python code:
+
+    .. code-block:: python
+
+        from ecmwfapi import ECMWFService
+            
+        server = ECMWFService('mars')
+            
+        server.retrieve({
+            'stream'    : "oper",
+            'levtype'   : "sfc",
+            'param'     : "165.128/166.128/167.128",
+            'dataset'   : "interim",
+            'step'      : "0",
+            'grid'      : "0.75/0.75",
+            'time'      : "00/06/12/18",
+            'date'      : "2014-07-01/to/2014-07-31",
+            'type'      : "an",
+            'class'     : "ei",
+            'target'    : "download_erainterim_ecmwfapi.grib"
+        })
+
+
+**Public user**
+    Please use this piece of python code: 
+
+    .. code-block:: python
+
+        from ecmwfapi import ECMWFDataServer
+            
+        server = ECMWFDataServer()
+            
+        server.retrieve({
+            'stream'    : "enda",
+            'levtype'   : "sfc",
+            'param'     : "165.128/166.128/167.128",
+            'dataset'   : "cera20c",
+            'step'      : "0",
+            'grid'      : "1./1.",
+            'time'      : "00/06/12/18",
+            'date'      : "2000-07-01/to/2000-07-31",
+            'type'      : "an",
+            'class'     : "ep",
+            'target'    : "download_cera20c_ecmwfapi.grib"
+        })
+    
+CDS API 
+"""""""
+
+Since ERA5 extraction with CDS API might take some time due to the very high number of requests, you can start by retrieving some online stored pressure levels (not from MARS). This is usually much faster and gives a quick result to find out if the web API works:
+
+**All users**
+    Please use this piece of python code:
+    
+    .. code-block:: python
+
+        import cdsapi
+        
+        c = cdsapi.Client()
+        
+        c.retrieve("reanalysis-era5-pressure-levels",
+        {
+        "variable": "temperature",
+        "pressure_level": "1000",
+        "product_type": "reanalysis",
+        "year": "2008",
+        "month": "01",
+        "day": "01",
+        "time": "12:00",
+        "format": "grib"
+        },
+        "download_cdsapi.grib")
+
+
+Afterwards, when you know that the CDS API generally works, you can try to extract some
+data from the MARS archive. From the latest experience this can take a while.    
+
+**Member user**
+    Please use this piece of python code:
+    
+    .. code-block:: python
+
+       import cdsapi
+       
+       c = cdsapi.Client()
+       
+       c.retrieve('reanalysis-era5-complete',
+       {
+           'class'   : 'ea',
+           'expver'  : '1',
+           'stream'  : 'oper',
+           'type'    : 'fc',
+           'step'    : '3/to/12/by/3',
+           'param'   : '130.128',
+           'levtype' : 'ml',
+           'levelist': '135/to/137',
+           'date'    : '2013-01-01',
+           'time'    : '06/18',
+           'area'    : '50/-5/40/5',
+           'grid'    : '1.0/1.0', 
+           'format'  : 'grib',
+       }, 'download_era5_cdsapi.grib')
+
+
+**Public user**
+    Please use this piece of python code: 
+
+    .. code-block:: python
+
+       import cdsapi
+       
+       c = cdsapi.Client()
+       
+       c.retrieve('reanalysis-era5-complete',
+       {
+           'class'   : 'ea',
+           'dataset' : 'era5',
+           'expver'  : '1',
+           'stream'  : 'oper',
+           'type'    : 'fc',
+           'step'    : '3/to/12/by/3',
+           'param'   : '130.128',
+           'levtype' : 'ml',
+           'levelist': '135/to/137',
+           'date'    : '2013-01-01',
+           'time'    : '06/18',
+           'area'    : '50/-5/40/5',
+           'grid'    : '1.0/1.0', 
+           'format'  : 'grib',
+       }, 'download_era5_cdsapi.grib')
+
+
+
+
+
+
+.. _ref-install-local:
+
+Local Installation
+^^^^^^^^^^^^^^^^^^
+
+First prepare the Fortran ``Makefile`` for your environment and set it
+in the ``setup.sh`` script. (See section :ref:`ref-convert` for information on 
+the Fortran program.)
+``flex_extract`` has already two ``Makefiles`` prepared for te ``gfortran`` and 
+the ``ifort`` compiler:
+
+ *Makefile.local.gfortran
+ *Makefile.local.ifort
+
+They can be found in the path ``flex_extract_vX.X/source/fortran``, where
+``vX.X`` should be substituted with the current version number.
+
+.. caution::   
+   It is necessary to adapt **ECCODES_INCLUDE_DIR** and **ECCODES_LIB** in these
+   ``Makefiles``.
+
+
+So starting from the root directory of ``flex_extract``, 
+go to the ``Fortran`` source directory and open the ``Makefile`` of your 
+choice to modify with an editor of your choice. We use the ``nedit`` in this case.
+
+.. code-block:: bash 
+
+   cd flex_extract_vX.X/source/fortran
+   nedit Makefile.local.gfortran
+
+Edit the pathes to the ``eccodes`` library on your local machine. 
+
+.. caution::
+   This can vary from system to system. 
+   It is suggested to use a command like 
+
+   .. code-block:: bash
+
+      # for the ECCODES_INCLUDE_DIR path do:
+      $ dpkg -L libeccodes-dev | grep eccodes.mod
+      # for the ECCODES_LIB path do:
+      $ dpkg -L libeccodes-dev | grep libeccodes.so
+      
+   to find out the path to the ``eccodes`` library.
+   
+Substitute these paths in the ``Makefile`` for parameters **ECCODES_INCLUDE_DIR**
+and **ECCODES_LIB** and save it.
+
+.. code-block:: bash
+
+   # these are the paths on a current Debian 10 Testing system (May 2019)
+   ECCODES_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/
+   ECCODES_LIB= -L/usr/lib -leccodes_f90 -leccodes -lm  
+   
+    
+The Fortran program called ``CONVERT2`` will be compiled during the 
+installation process to get an executable. Therefore the ``Makefile``
+has to be set in the ``setup.sh`` script.
+
+In the root directory of ``flex_extract``, open the ``setup.sh`` script 
+and adapt the installation parameters in the section labelled with 
+"AVAILABLE COMMANDLINE ARGUMENTS TO SET" like shown below.
+
+
+.. code-block:: bash
+   :caption: 'Example settings for a local installation.'
+   :name: setup.sh
+   
+   ...
+   # -----------------------------------------------------------------
+   # AVAILABLE COMMANDLINE ARGUMENTS TO SET
+   #
+   # THE USER HAS TO SPECIFY THESE PARAMETER
+   #
+   TARGET='local'
+   MAKEFILE='Makefile.local.gfortran'
+   ECUID=None
+   ECGID=None
+   GATEWAY=None
+   DESTINATION=None
+   INSTALLDIR=None
+   JOB_TEMPLATE='job.template'
+   CONTROLFILE='CONTROL_EA5'
+   ...
+
+
+Afterwards, type:
+
+.. code-block:: bash
+
+   $ ./setup.sh
+   
+to start the installation. You should see the following output at the command line. 
+    
+    
+.. code-block:: bash
+
+   # Output of setup.sh   
+   WARNING: installdir has not been specified
+   flex_extract will be installed in here by compiling the Fortran source in /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/source/fortran
+   Install flex_extract_v7.1 software at local in directory /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1
+
+   Using makefile: Makefile.local.gfortran
+   gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -g -O3 -fopenmp phgrreal.f
+   gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -g -O3 -fopenmp grphreal.f
+   gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -g -O3 -fopenmp ftrafo.f
+   gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -O3 -fopenmp -I. -I/usr/local/gcc-4.9.3/grib_api-1.14.3/include -O3 rwGRIB2.f90
+   gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -O3 -fopenmp -I. -I/usr/local/gcc-4.9.3/grib_api-1.14.3/include -O3 posnam.f
+   gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -O3 -fopenmp -I. -I/usr/local/gcc-4.9.3/grib_api-1.14.3/include -O3 preconvert.f90
+   gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -O3 -O3 -fopenmp -o ./CONVERT2 ftrafo.o phgrreal.o grphreal.o rwGRIB2.o posnam.o preconvert.o -L/usr/local/gcc-4.9.3/grib_api-1.14.3/lib -Bstatic  -lgrib_api_f77 -lgrib_api_f90 -lgrib_api -Bdynamic  -lm  -ljasper -lemosR64
+
+   -rwxrwxr-x. 1 philipa8 tmc 282992 May 23 22:27 ./CONVERT2
+
+
+
+
+
+
+``Flex_extract`` in combination with ``FLEXPART``
+=================================================
+
+Some users might like to incorporate ``flex_extract`` directly into the ``FLEXPART``
+distribution. Then the installation path has to be changed by setting the parameter
+`installdir` in the ``setup.sh`` file to the ``script`` directory in the ``FLEXPART`` root directoy. 
+
+
+
+
+
+
+
+
+
+.. _ref-testinstallfe:
+
+Test installation
+=================
+
+Fortran program test
+--------------------
+
+To check if the compilation of the Fortran program ``CONVERT2`` was successful
+a quick program call on a minimal prepared dataset can be done.
+
+For this, go from the ``flex_extract`` root directory to the test 
+directory and call the executable of the Fortran program.
+
+.. note:: 
+   Remember that you might have to log in at the ECMWF server if you used the installation for the **remote** or **gateway** mode. There you find the ``flex_extract`` root directory in your ``$HOME`` directory.
+
+.. code-block:: bash
+   
+   cd test/Installation/Convert
+   # call the Fortran progam without arguments
+   ../../../source/fortran/CONVERT2
+
+The installation was successfull if it showed the following output:
+
+.. code-block:: bash
+
+    readspectral:            1  records read
+    readlatlon:            8  records read
+   STATISTICS:  98842.4598 98709.7359  5120.5385
+    readlatlon:            4  records read
+    readlatlon:            4  records read
+    readlatlon:            4  records read
+   SUCCESSFULLY FINISHED CONVERT_PRE: CONGRATULATIONS
+
+Now go back to the root directoy:
+
+.. code-block:: bash
+   
+   $ cd ../../../
+   
+
+Mars request test
+-----------------
+
+    IN PREPARATION ...
+
+Full test
+---------
+
+    IN PREPARATION ...
+
+    
Index: for_developers/Sphinx/source/support.rst
===================================================================
--- for_developers/Sphinx/source/support.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
+++ for_developers/Sphinx/source/support.rst	(revision 41c9dbc9816a48a73dd439140ea7f56de10d8f43)
@@ -0,0 +1,65 @@
+Support
+=======
+.. toctree::
+   :hidden:
+   :maxdepth: 2
+    
+   
+.. contents::
+   :local:
+   :depth: 2
+
+.. _ref-ticket-system:  
+
+Ticket system
+-------------
+.. _ticket system: https://www.flexpart.eu/report/1
+
+The community website http://flexpart.eu contains a 
+`ticket system`_ which can be used to report any issue or a proposition for a new feature.
+
+The tickets can be viewed by anyone, to create a ticket a registration is necessary. Since the automatic registration is unavailable, please send an email to the ``flexpart.eu[at]zamg.ac.at`` and you will receive your credentials (with some delay).  
+
+
+.. _ref-mailing-list:
+
+Mailing list
+------------
+
+The mailing list is mainly for the ``FLEXPART`` users to ask questions or share experiences regarding the whole ``FLEXPART`` process with the community. This can be a lot faster than asking only the developers for help. Since ``flex_extract`` is a preprocessor to ``FLEXPART`` this is the right place to ask for help.
+
+Additionally, from time to time, there will be announcements for all FLEXPART users, such as new release versions of ``FLEXPART`` or ``flex_extract``. 
+
+Just write a mail to: ``flexpart[at]lists.univie.ac.at``
+
+
+.. _ref-reporting:
+
+Reporting an issue
+------------------
+
+To properly report a problem or bug, please provide as much information as possible.
+This includes:
+
+* the flex_extract version
+* a flex_extract log file (output of submit.py script)
+* the CONTROL file
+* the commandline arguments or run(_local).sh settings and 
+* a description of the environment you used (Unix/Linux version, library version, application mode, etc.). 
+
+
+.. _ref-known-issues:
+
+Known bugs and issues
+---------------------
+A collection of reported and detected bugs and issues with solutions can be found :doc:`here <Support/known_bugs_issues>`.
+
+
+.. _ref-faq:
+
+FAQ
+---
+A list of frequently asked questions and hints for the application of ``flex_extract`` can be found :doc:`here <Support/faq>`.
+    
+
+    
