Index: source/python/install.py
===================================================================
--- source/python/install.py	(revision 1eca806b724ef5852246ed35f22c55f67144a045)
+++ source/python/install.py	(revision 6f951ca0346aa6a2c3e11ee62df85214a290d838)
@@ -14,35 +14,48 @@
 #        - splitted code in smaller functions
 #        - delete convert build files in here instead of compile job script
-#        - changed static path names to Variables from config file
+#        - changed static path names to variables from config file
+#        - splitted install function into several smaller pieces
+#        - use of tarfile package in python
 #
 # @License:
-#    (C) Copyright 2015-2018.
+#    (C) Copyright 2014-2019.
+#    Anne Philipp, Leopold Haimberger
 #
-#    This software is licensed under the terms of the Apache Licence Version 2.0
-#    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
+#    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.
 #
-# @Program Functionality:
-#    Depending on the selected installation environment (locally or on the
-#    ECMWF server ecgate or cca) the program extracts the commandline
-#    arguments and the CONTROL file parameter and prepares the corresponding
-#    environment. The necessary files are collected in a tar-ball and placed
-#    at the target location. There its untared, the environment variables will
-#    be set and the Fortran code will be compiled. If the ECMWF environment is
-#    selected a job script is prepared and submitted for the remaining
-#    configurations after putting the tar-ball to the target ECMWF server.
-#
-# @Program Content:
-#    - main
-#    - get_install_cmdline_args
-#    - install_via_gateway
-#    - mk_tarball
-#    - un_tarball
-#    - mk_env_vars
-#    - mk_compilejob
-#    - mk_job_template
-#    - del_convert_build
-#    - mk_convert_build
+# @Methods:
+#    main
+#    get_install_cmdline_args
+#    install_via_gateway
+#    check_install_conditions
+#    mk_tarball
+#    un_tarball
+#    mk_env_vars
+#    mk_compilejob
+#    mk_job_template
+#    del_convert_build
+#    mk_convert_build
 #
 #*******************************************************************************
+'''This script installs the flex_extract program.
+
+Depending on the selected installation environment (locally or on the
+ECMWF server ecgate or cca) the program extracts the commandline
+arguments and the CONTROL file parameter and prepares the corresponding
+environment.
+The necessary files are collected in a tar-ball and placed
+at the target location. There its untared, the environment variables will
+be set and the Fortran code will be compiled.
+If the ECMWF environment is selected a job script is prepared and submitted
+for the remaining configurations after putting the tar-ball to the
+target ECMWF server.
+
+Type: install.py --help
+to get information about command line parameters.
+Read the documentation for usage instructions.
+'''
 
 # ------------------------------------------------------------------------------
@@ -96,5 +109,5 @@
     Return
     ------
-    args : :obj:`Namespace`
+    args : Namespace
         Contains the commandline arguments from script/program call.
     '''
@@ -144,5 +157,5 @@
     Parameters
     ----------
-    c : :obj:`ControlFile`
+    c : ControlFile
         Contains all the parameters of CONTROL file and
         command line.
@@ -229,5 +242,5 @@
     Parameters
     ----------
-    c : :obj:`ControlFile`
+    c : ControlFile
         Contains all the parameters of CONTROL file and
         command line.
@@ -283,9 +296,9 @@
     Parameters
     ----------
-    tarball_path : :obj:`string`
+    tarball_path : str
         The complete path to the tar file which will contain all
         relevant data for flex_extract.
 
-    target : :obj:`string`
+    target : str
         The queue where the job is submitted to.
 
@@ -374,5 +387,5 @@
     Parameters
     ----------
-    tarball_path : :obj:`string`
+    tarball_path : str
         The complete path to the tar file which will contain all
         relevant data for flex_extract.
@@ -407,14 +420,14 @@
     Parameters
     ----------
-    ecuid : :obj:`string`
+    ecuid : str
         The user id on ECMWF server.
 
-    ecgid : :obj:`string`
+    ecgid : str
         The group id on ECMWF server.
 
-    gateway : :obj:`string`
+    gateway : str
         The gateway server the user is using.
 
-    destination : :obj:`string`
+    destination : str
         The remote destination which is used to transfer files
         from ECMWF server to local gateway server.
@@ -469,18 +482,18 @@
     Parameters
     ----------
-    makefile : :obj:`string`
+    makefile : str
         Name of the makefile which should be used to compile FORTRAN
         CONVERT2 program.
 
-    target : :obj:`string`
+    target : str
         The target where the installation should be done, e.g. the queue.
 
-    ecuid : :obj:`string`
+    ecuid : str
         The user id on ECMWF server.
 
-    ecgid : :obj:`string`
+    ecgid : str
         The group id on ECMWF server.
 
-    fp_root : :obj:`string`
+    fp_root : str
        Path to the root directory of FLEXPART environment or flex_extract
        environment.
@@ -544,18 +557,18 @@
     Parameters
     ----------
-    ecuid : :obj:`string`
+    ecuid : str
         The user id on ECMWF server.
 
-    ecgid : :obj:`string`
+    ecgid : str
         The group id on ECMWF server.
 
-    gateway : :obj:`string`
+    gateway : str
         The gateway server the user is using.
 
-    destination : :obj:`string`
+    destination : str
         The remote destination which is used to transfer files
         from ECMWF server to local gateway server.
 
-    fp_root : :obj:`string`
+    fp_root : str
        Path to the root directory of FLEXPART environment or flex_extract
        environment.
@@ -622,5 +635,5 @@
     Parameters
     ----------
-    src_path : :obj:`string`
+    src_path : str
         Path to the fortran source directory.
 
@@ -645,8 +658,8 @@
     Parameters
     ----------
-    src_path : :obj:`string`
+    src_path : str
         Path to the fortran source directory.
 
-    makefile : :obj:`string`
+    makefile : str
         The name of the makefile which should be used.
 
