Index: source/python/mods/tools.py
===================================================================
--- source/python/mods/tools.py	(revision 5bad6ecd8c2b5597cc84f56143c36adc3ad18530)
+++ source/python/mods/tools.py	(revision 274f9efe4b8438ab5238967e39adc200c624b56e)
@@ -61,17 +61,17 @@
 
 def none_or_str(value):
-    '''
-    @Description:
-        Converts the input string into pythons None-type if the string
-        contains "None".
-
-    @Input:
-        value: string
-            String to be checked for the "None" word.
-
-    @Return:
-        None or value:
-            Return depends on the content of the input value. If it was "None",
-            then the python type None is returned. Otherwise the string itself.
+    '''Converts the input string into pythons None-type if the string
+    contains string "None".
+
+    Parameters
+    ----------
+    value : :obj:`string`
+        String to be checked for the "None" word.
+
+    Return
+    ------
+    None or value:
+        Return depends on the content of the input value. If it was "None",
+        then the python type None is returned. Otherwise the string itself.
     '''
     if value == 'None':
@@ -80,18 +80,18 @@
 
 def none_or_int(value):
-    '''
-    @Description:
-        Converts the input string into pythons None-type if the string
-        contains "None". Otherwise it is converted to an integer value.
-
-    @Input:
-        value: string
-            String to be checked for the "None" word.
-
-    @Return:
-        None or int(value):
-            Return depends on the content of the input value. If it was "None",
-            then the python type None is returned. Otherwise the string is
-            converted into an integer value.
+    '''Converts the input string into pythons None-type if the string
+    contains string "None". Otherwise it is converted to an integer value.
+
+    Parameters
+    ----------
+    value : :obj:`string`
+        String to be checked for the "None" word.
+
+    Return
+    ------
+    None or int(value):
+        Return depends on the content of the input value. If it was "None",
+        then the python type None is returned. Otherwise the string is
+        converted into an integer value.
     '''
     if value == 'None':
@@ -100,15 +100,14 @@
 
 def get_cmdline_arguments():
-    '''
-    @Description:
-        Decomposes the command line arguments and assigns them to variables.
-        Apply default values for non mentioned arguments.
-
-    @Input:
-        <nothing>
-
-    @Return:
-        args: instance of ArgumentParser
-            Contains the commandline arguments from script/program call.
+    '''Decomposes the command line arguments and assigns them to variables.
+    Apply default values for non mentioned arguments.
+
+    Parameters
+    ----------
+
+    Return
+    ------
+    args : :obj:`Namespace`
+        Contains the commandline arguments from script/program call.
     '''
 
@@ -190,17 +189,17 @@
 
 def read_ecenv(filename):
-    '''
-    @Description:
-        Reads the file into a dictionary where the key values are the parameter
-        names.
-
-    @Input:
-        filename: string
-            Path to file where the ECMWV environment parameters are stored.
-
-    @Return:
-        envs: dict
-            Contains the environment parameter ecuid, ecgid, gateway
-            and destination for ECMWF server environments.
+    '''Reads the file into a dictionary where the key values are the parameter
+    names.
+
+    Parameters
+    ----------
+    filename : :obj:`string`
+        Path to file where the ECMWF environment parameters are stored.
+
+    Return
+    ------
+    envs : :obj:`dictionary`
+        Contains the environment parameter ecuid, ecgid, gateway
+        and destination for ECMWF server environments.
     '''
     envs= {}
@@ -214,18 +213,15 @@
 
 def clean_up(c):
-    '''
-    @Description:
-        Remove all files from intermediate directory
-        (inputdir from CONTROL file).
-
-    @Input:
-        c: instance of class ControlFile
-            Contains all the parameters of CONTROL file and
-            command line.
-            For more information about format and content of the parameter
-            see documentation.
-
-    @Return:
-        <nothing>
+    '''Remove all files from intermediate directory (inputdir).
+
+    Parameters
+    ----------
+    c : :obj:`ControlFile`
+        Contains all the parameters of CONTROL file and
+        command line.
+
+    Return
+    ------
+
     '''
 
@@ -245,20 +241,20 @@
 
 def my_error(users, message='ERROR'):
-    '''
-    @Description:
-        Prints a specified error message which can be passed to the function
-        before exiting the program.
-
-    @Input:
-        user: list of strings
-            Contains all email addresses which should be notified.
-            It might also contain just the ecmwf user name which wil trigger
-            mailing to the associated email address for this user.
-
-        message: string, optional
-            Error message. Default value is "ERROR".
-
-    @Return:
-        <nothing>
+    '''Prints a specified error message which can be passed to the function
+    before exiting the program.
+
+    Parameters
+    ----------
+    user : :obj:`list` of :obj:`string`
+        Contains all email addresses which should be notified.
+        It might also contain just the ecmwf user name which wil trigger
+        mailing to the associated email address for this user.
+
+    message : :obj:`string`, optional
+        Error message. Default value is "ERROR".
+
+    Return
+    ------
+
     '''
 
@@ -291,19 +287,18 @@
 
 def normal_exit(users, message='Done!'):
-    '''
-    @Description:
-        Prints a specific exit message which can be passed to the function.
-
-    @Input:
-        user: list of strings
-            Contains all email addresses which should be notified.
-            It might also contain just the ecmwf user name which wil trigger
-            mailing to the associated email address for this user.
-
-        message: string, optional
-            Message for exiting program. Default value is "Done!".
-
-    @Return:
-        <nothing>
+    '''Prints a specific exit message which can be passed to the function.
+
+    Parameters
+    ----------
+    user : :obj:`list` of :obj:`string`
+        Contains all email addresses which should be notified.
+        It might also contain just the ecmwf user name which wil trigger
+        mailing to the associated email address for this user.
+
+    message : :obj:`string`, optional
+        Message for exiting program. Default value is "Done!".
+
+    Return
+    ------
 
     '''
@@ -333,28 +328,32 @@
 
 def product(*args, **kwds):
-    '''
-    @Description:
-        This method is taken from an example at the ECMWF wiki website.
-        https://software.ecmwf.int/wiki/display/GRIB/index.py; 2018-03-16
-
-        This method combines the single characters of the passed arguments
-        with each other. So that each character of each argument value
-        will be combined with each character of the other arguments as a tuple.
-
-        Example:
-        product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy
-        product(range(2), repeat = 3) --> 000 001 010 011 100 101 110 111
-
-    @Input:
-        *args: tuple
-            Positional arguments (arbitrary number).
-
-        **kwds: dictionary
-            Contains all the keyword arguments from *args.
-
-    @Return:
-        prod: tuple
-            Return will be done with "yield". A tuple of combined arguments.
-            See example in description above.
+    '''This method combines the single characters of the passed arguments
+    with each other. So that each character of each argument value
+    will be combined with each character of the other arguments as a tuple.
+
+    Note
+    ----
+    This method is taken from an example at the ECMWF wiki website.
+    https://software.ecmwf.int/wiki/display/GRIB/index.py; 2018-03-16
+
+    Example
+    -------
+    product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy
+
+    product(range(2), repeat = 3) --> 000 001 010 011 100 101 110 111
+
+    Parameters
+    ----------
+    \*args : :obj:`tuple`
+        Positional arguments (arbitrary number).
+
+    \*\*kwds : :obj:`dictionary`
+        Contains all the keyword arguments from \*args.
+
+    Return
+    ------
+    prod : :obj:`tuple`
+        Return will be done with "yield". A tuple of combined arguments.
+        See example in description above.
     '''
     pools = map(tuple, args) * kwds.get('repeat', 1)
@@ -369,15 +368,15 @@
 
 def silent_remove(filename):
-    '''
-    @Description:
-        Remove file if it exists.
-        The function does not fail if the file does not exist.
-
-    @Input:
-        filename: string
-            The name of the file to be removed without notification.
-
-    @Return:
-        <nothing>
+    '''Remove file if it exists.
+    The function does not fail if the file does not exist.
+
+    Parameters
+    ----------
+    filename : :obj:`string`
+        The name of the file to be removed without notification.
+
+    Return
+    ------
+
     '''
     try:
@@ -392,17 +391,17 @@
 
 def init128(filepath):
-    '''
-    @Description:
-        Opens and reads the grib file with table 128 information.
-
-    @Input:
-        filepath: string
-            Path to file of ECMWF grib table number 128.
-
-    @Return:
-        table128: dictionary
-            Contains the ECMWF grib table 128 information.
-            The key is the parameter number and the value is the
-            short name of the parameter.
+    '''Opens and reads the grib file with table 128 information.
+
+    Parameters
+    ----------
+    filepath : :obj:`string`
+        Path to file of ECMWF grib table number 128.
+
+    Return
+    ------
+    table128 : :obj:`dictionary`
+        Contains the ECMWF grib table 128 information.
+        The key is the parameter number and the value is the
+        short name of the parameter.
     '''
     table128 = dict()
@@ -417,25 +416,24 @@
 
 def to_param_id(pars, table):
-    '''
-    @Description:
-        Transform parameter names to parameter ids
-        with ECMWF grib table 128.
-
-    @Input:
-        pars: string
-            Addpar argument from CONTROL file in the format of
-            parameter names instead of ids. The parameter short
-            names are sepearted with "/" and they are passed as
-            one single string.
-
-        table: dictionary
-            Contains the ECMWF grib table 128 information.
-            The key is the parameter number and the value is the
-            short name of the parameter.
-
-    @Return:
-        ipar: list of integer
-            List of addpar parameters from CONTROL file transformed to
-            parameter ids in the format of integer.
+    '''Transform parameter names to parameter ids with ECMWF grib table 128.
+
+    Parameters
+    ----------
+    pars : :obj:`string`
+        Addpar argument from CONTROL file in the format of
+        parameter names instead of ids. The parameter short
+        names are sepearted with "/" and they are passed as
+        one single string.
+
+    table : :obj:`dictionary`
+        Contains the ECMWF grib table 128 information.
+        The key is the parameter number and the value is the
+        short name of the parameter.
+
+    Return
+    ------
+    ipar : :obj:`list` of :obj:`integer`
+        List of addpar parameters from CONTROL file transformed to
+        parameter ids in the format of integer.
     '''
     cpar = pars.upper().split('/')
@@ -452,19 +450,19 @@
 
 def get_list_as_string(list_obj, concatenate_sign=', '):
-    '''
-    @Description:
-        Converts a list of arbitrary content into a single string.
-
-    @Input:
-        list_obj: list
-            A list with arbitrary content.
-
-        concatenate_sign: string, optional
-            A string which is used to concatenate the single
-            list elements. Default value is ", ".
-
-    @Return:
-        str_of_list: string
-            The content of the list as a single string.
+    '''Converts a list of arbitrary content into a single string.
+
+    Parameters
+    ----------
+    list_obj : :obj:`list`
+        A list with arbitrary content.
+
+    concatenate_sign : :obj:`string`, optional
+        A string which is used to concatenate the single
+        list elements. Default value is ", ".
+
+    Return
+    ------
+    str_of_list : :obj:`string`
+        The content of the list as a single string.
     '''
 
@@ -474,15 +472,15 @@
 
 def make_dir(directory):
-    '''
-    @Description:
-        Creates a directory and gives a warning if the directory
-        already exists. The program stops only if there is another problem.
-
-    @Input:
-        directory: string
-            The directory name including the path which should be created.
-
-    @Return:
-        <nothing>
+    '''Creates a directory and gives a warning if the directory
+    already exists. The program stops only if there is another problem.
+
+    Parameters
+    ----------
+    directory : :obj:`string`
+        The directory name including the path which should be created.
+
+    Return
+    ------
+
     '''
     try:
@@ -498,33 +496,34 @@
 
 def put_file_to_ecserver(ecd, filename, target, ecuid, ecgid):
-    '''
-    @Description:
-        Uses the ecaccess-file-put command to send a file to the ECMWF servers.
-
-        NOTE:
-        The return value is just for testing reasons. It does not have
-        to be used from the calling function since the whole error handling
-        is done in here.
-
-    @Input:
-        ecd: string
-            The path were the file is stored.
-
-        filename: string
-            The name of the file to send to the ECMWF server.
-
-        target: string
-            The target queue where the file should be sent to.
-
-        ecuid: string
-            The user id on ECMWF server.
-
-        ecgid: string
-            The group id on ECMWF server.
-
-    @Return:
-        rcode: string
-            Resulting code of command execution. If successful the string
-            will be empty.
+    '''Uses the ecaccess-file-put command to send a file to the ECMWF servers.
+
+    Note
+    ----
+    The return value is just for testing reasons. It does not have
+    to be used from the calling function since the whole error handling
+    is done in here.
+
+    Parameters
+    ----------
+    ecd : :obj:`string`
+        The path were the file is stored.
+
+    filename : :obj:`string`
+        The name of the file to send to the ECMWF server.
+
+    target : :obj:`string`
+        The target queue where the file should be sent to.
+
+    ecuid : :obj:`string`
+        The user id on ECMWF server.
+
+    ecgid : :obj:`string`
+        The group id on ECMWF server.
+
+    Return
+    ------
+    rcode : :obj:`string`
+        Resulting code of command execution. If successful the string
+        will be empty.
     '''
 
@@ -546,25 +545,26 @@
 
 def submit_job_to_ecserver(target, jobname):
-    '''
-    @Description:
-        Uses ecaccess-job-submit command to submit a job to the ECMWF server.
-
-        NOTE:
-        The return value is just for testing reasons. It does not have
-        to be used from the calling function since the whole error handling
-        is done in here.
-
-    @Input:
-        target: string
-            The target where the file should be sent to, e.g. the queue.
-
-        jobname: string
-            The name of the jobfile to be submitted to the ECMWF server.
-
-    @Return:
-        rcode: string
-            Resulting code of command execution. If successful the string
-            will contain an integer number, representing the id of the job
-            at the ecmwf server.
+    '''Uses ecaccess-job-submit command to submit a job to the ECMWF server.
+
+    Note
+    ----
+    The return value is just for testing reasons. It does not have
+    to be used from the calling function since the whole error handling
+    is done in here.
+
+    Parameters
+    ----------
+    target : :obj:`string`
+        The target where the file should be sent to, e.g. the queue.
+
+    jobname : :obj:`string`
+        The name of the jobfile to be submitted to the ECMWF server.
+
+    Return
+    ------
+    rcode : :obj:`string`
+        Resulting code of command execution. If successful the string
+        will contain an integer number, representing the id of the job
+        at the ecmwf server.
     '''
 
