Index: Source/Python/Classes/ControlFile.py
===================================================================
--- Source/Python/Classes/ControlFile.py	(revision b9ce98cd480cdd790b9c4371fc7e87a1d8e3eb40)
+++ Source/Python/Classes/ControlFile.py	(revision 0540bd0a86f9c95077ae8ffbb0ee2b7acd98cf07)
@@ -23,4 +23,7 @@
 #   August 2020 - Leopold Haimberger
 #        - added a class parameter for system installation path
+#   October 2022 - Anne Tipka (previously Philipp)
+#        - added class parameter for packingType (compression) of grib messages
+#        - added class parameter for event trigger for time critical jobs
 #
 # @License:
@@ -332,4 +335,11 @@
         Switch to select the calculation of extra ensemble members for the
         ELDA stream. It doubles the amount of retrieved ensemble members.
+
+    eventid : int
+        Id for one of the events for time critical jobs 1 at ECMWF servers.
+
+    eventjobname : str
+        The name the ecaccess-job-submit command will be given.
+        This is how the job will be recognized in the list of jobs.
 
     logicals : list of str
@@ -426,4 +436,6 @@
         self.rrint = 0
         self.doubleelda = 0
+        self.eventid = None
+        self.eventjobname = ''
 
         self.logicals = ['gauss', 'omega', 'omegadiff', 'eta', 'etadiff',
Index: Source/Python/Mods/tools.py
===================================================================
--- Source/Python/Mods/tools.py	(revision 73d2e4ed353763fc81c09d50cd8be52baa799fcf)
+++ Source/Python/Mods/tools.py	(revision 0540bd0a86f9c95077ae8ffbb0ee2b7acd98cf07)
@@ -705,5 +705,5 @@
     return job_id.decode()
 
-def submit_job_to_ecserver(target, jobname):
+def submit_job_to_ecserver(target, jobfile):
     '''Uses ecaccess-job-submit command to submit a job to the ECMWF server.
 
@@ -719,5 +719,5 @@
         The target where the file should be sent to, e.g. the queue.
 
-    jobname : str
+    jobfile : str
         The name of the jobfile to be submitted to the ECMWF server.
 
@@ -730,5 +730,62 @@
     try:
         job_id = subprocess.check_output(['ecaccess-job-submit', '-queueName',
-                                          target, jobname])
+                                          target, jobfile])
+
+    except subprocess.CalledProcessError as e:
+        print('... ERROR CODE: ' + str(e.returncode))
+        print('... ERROR MESSAGE:\n \t ' + str(e))
+
+        print('\n... Do you have a valid ecaccess certification key?')
+        sys.exit('... ecaccess-job-submit FAILED!')
+    except OSError as e:
+        print('... ERROR CODE: ' + str(e.errno))
+        print('... ERROR MESSAGE:\n \t ' + str(e.strerror))
+
+        print('\n... Most likely the ECACCESS library is not available!')
+        sys.exit('... ecaccess-job-submit FAILED!')
+
+    return job_id.decode()
+
+def submit_eventjob_to_ecserver(target, jobfile, eventid, jobname, ecuid):
+    '''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 : str
+        The target where the file should be sent to, e.g. the queue.
+
+    jobfile : str
+        The name of the jobfile to be submitted to the ECMWF server.
+
+    eventid : int
+        The id number from an event listed by ECMWF through ecaccess-event-list.
+
+    jobname : str
+        The name of the job, helps to distingush between jobs.
+        Will be shown in the queue and list of jobs.
+
+    ecuid : str
+        The user id on ECMWF server.
+
+    Return
+    ------
+    job_id : int
+        The id number of the job as a reference at the ECMWF server.
+    '''
+
+    try:
+        job_id = subprocess.check_output(['ecaccess-job-submit',
+                                          '-queueName', target, '-jobName', jobname,
+                                          '-onStart', '-onSuccess', '-onFailure',
+                                          '-onRetry', '-retryCount', '5',
+                                          '-mailTo', ecuid,
+                                          '-eventIds', eventid,
+                                          jobfile])
 
     except subprocess.CalledProcessError as e:
Index: Source/Python/submit.py
===================================================================
--- Source/Python/submit.py	(revision 47be2684fe371f11a0c120c7e0d78acf010722d3)
+++ Source/Python/submit.py	(revision 0540bd0a86f9c95077ae8ffbb0ee2b7acd98cf07)
@@ -202,5 +202,8 @@
         mk_jobscript(jtemplate, job_file, clist)
 
-        job_id = submit_job_to_ecserver(queue, job_file)
+        #job_id = submit_job_to_ecserver(queue, job_file)
+        job_id = submit_eventjob_to_ecserver(queue, c.eventjobname,
+                                             c.eventid, c.ecuid)
+
         print('The job id is: ' + str(job_id.strip()))
 
