Index: python/FlexpartTools.py
===================================================================
--- python/FlexpartTools.py	(revision 68f5e1c301020f1c8cbbf9a1db2f37ed5c8f2ca3)
+++ python/FlexpartTools.py	(revision 51f985321699a54b8e5acd7d1975955e45948717)
@@ -98,4 +98,7 @@
                         help="Public mode - retrieves the public datasets")
 
+    parser.add_argument("--request", dest="request", default=0,
+                        help="list all mars request in file mars_requests.dat \
+                        and skip submission to mars")
 
     args = parser.parse_args()
@@ -188,4 +191,13 @@
     if args.flexpart_root_scripts!=None:
         c.flexpart_root_scripts=args.flexpart_root_scripts
+
+    # set request attribute to control file
+    if args.request != '0':
+        c.request=args.request
+
+    if c.request != '0':
+        marsfile = os.path.join(c.inputdir, 'mars_request.csv')
+        if os.path.isfile(marsfile):
+            os.remove(marsfile)
 
     return args,c
@@ -564,5 +576,6 @@
                     self.type[i] = 0
 
-
+            if not hasattr(self,'request'):
+                self.request='0'
 
         return
@@ -642,4 +655,36 @@
         return
 
+    def print_infodata_csv(self, inputdir, request_number):
+        '''
+        @Description:
+            Write all request parameter in alpabetical order into a "csv" file.
+
+        @Input:
+            self: instance of MarsRetrieval
+                For description see class documentation.
+
+            inputdir: string
+                The path where all data from the retrievals are stored.
+
+            request_number: integer
+                Number of mars requests for flux and non-flux data.
+
+        @Return:
+            <nothing>
+        '''
+
+        # Get all class attributes and their values as a dictionary
+        attrs = vars(self)
+        del attrs['server']
+
+        # open a file to store all requests to
+        with open(os.path.join(inputdir, 'mars_request.csv'), 'a') as f:
+            f.write(str(request_number) + ', ')
+            f.write(', '.join(str(attrs[key])
+                        for key in sorted(attrs.iterkeys())))
+            f.write('\n')
+
+        return
+
     def dataRetrieve(self):
         attrs=vars(self).copy()
@@ -709,6 +754,8 @@
 
     def __init__(self,c,fluxes=False):
-# different mars types for retrieving reanalysis data for flexpart
-
+        # different mars types for retrieving reanalysis data for flexpart
+
+        # set a counter for the number of mars requests generated
+        self.mreq_count = 0
         self.types=dict()
         try:
@@ -912,5 +959,5 @@
 
 
-    def retrieve(self, server, public, dates,times, inputdir=''):
+    def retrieve(self, server, public, dates, request, times, inputdir=''):
         self.dates=dates
         self.server=server
@@ -971,4 +1018,6 @@
 
                 if self.basetime==None:
+                    # increase number of mars requests
+                    self.mreq_count += 1
                     MR= MARSretrieval(self.server, self.public, dataset=self.dataset, marsclass=self.marsclass, stream=mfstream,
                                       type=mftype, levtype=pv[1], levelist=pv[2],resol=self.resol, gaussian=gaussian,
@@ -976,6 +1025,13 @@
                                   date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0])
 
-                    MR.displayInfo()
-                    MR.dataRetrieve()
+                    if request == "0":
+                        MR.display_info()
+                        MR.data_retrieve()
+                    elif request == "1":
+                        MR.print_infodata_csv(self.inputdir, self.mreq_count)
+                    elif request == "2":
+                        MR.print_infodata_csv(self.inputdir, self.mreq_count)
+                        MR.display_info()
+                        MR.data_retrieve()
 # The whole else section is only necessary for operational scripts. It could be removed
                 else: # check if mars job requests fields beyond basetime. If yes eliminate those fields since they may not
@@ -1001,5 +1057,6 @@
                             maxtime=elimit-datetime.timedelta(hours=24)
                             mfdate='/'.join(('/'.join(mfdate.split('/')[:-1]),datetime.datetime.strftime(maxtime,'%Y%m%d')))
-
+                            # increase number of mars requests
+                            self.mreq_count += 1
                             MR= MARSretrieval(self.server, self.public, dataset=self.dataset, marsclass=self.marsclass, stream=self.stream,
                                               type=mftype, levtype=pv[1], levelist=pv[2],resol=self.resol, gaussian=gaussian,
@@ -1007,6 +1064,13 @@
                                                 date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0])
 
-                            MR.displayInfo()
-                            MR.dataRetrieve()
+                            if request == "0":
+                                MR.display_info()
+                                MR.data_retrieve()
+                            elif request == "1":
+                                MR.print_infodata_csv(self.inputdir, self.mreq_count)
+                            elif request == "2":
+                                MR.print_infodata_csv(self.inputdir, self.mreq_count)
+                                MR.display_info()
+                                MR.data_retrieve()
 
                             maxtime=elimit-datetime.timedelta(hours=12)
@@ -1014,13 +1078,22 @@
                             mftime='00'
                             mftarget=self.inputdir+"/"+ftype+pk+'.'+mfdate+'.'+str(os.getppid())+'.'+str(os.getpid())+".grb"
-
+                            # increase number of mars requests
+                            self.mreq_count += 1
                             MR= MARSretrieval(self.server, self.public, dataset=self.dataset, marsclass=self.marsclass, stream=self.stream,
                                               type=mftype, levtype=pv[1], levelist=pv[2],resol=self.resol, gaussian=gaussian,
                                                 accuracy=self.accuracy,grid=pv[3],target=mftarget,area=area,
                                                 date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0])
-
-                            MR.displayInfo()
-                            MR.dataRetrieve()
+                            if request == "0":
+                                MR.display_info()
+                                MR.data_retrieve()
+                            elif request == "1":
+                                MR.print_infodata_csv(self.inputdir, self.mreq_count)
+                            elif request == "2":
+                                MR.print_infodata_csv(self.inputdir, self.mreq_count)
+                                MR.display_info()
+                                MR.data_retrieve()
                         else:
+                            # increase number of mars requests
+                            self.mreq_count += 1
                             MR= MARSretrieval(self.server, self.public, dataset=self.dataset, marsclass=self.marsclass, stream=self.stream,
                                               type=mftype, levtype=pv[1], levelist=pv[2],resol=self.resol, gaussian=gaussian,
@@ -1028,6 +1101,13 @@
                                                 date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0])
 
-                            MR.displayInfo()
-                            MR.dataRetrieve()
+                            if request == "0":
+                                MR.display_info()
+                                MR.data_retrieve()
+                            elif request == "1":
+                                MR.print_infodata_csv(self.inputdir, self.mreq_count)
+                            elif request == "2":
+                                MR.print_infodata_csv(self.inputdir, self.mreq_count)
+                                MR.display_info()
+                                MR.data_retrieve()
                     else:
                         maxtime=elimit-datetime.timedelta(hours=24)
@@ -1044,5 +1124,6 @@
                                 else:
                                     mftime=times[0]
-
+                        # increase number of mars requests
+                        self.mreq_count += 1
                         MR= MARSretrieval(self.server, self.public, dataset=self.dataset, marsclass=self.marsclass, stream=self.stream,
                                           type=mftype, levtype=pv[1], levelist=pv[2],resol=self.resol, gaussian=gaussian,
@@ -1050,6 +1131,13 @@
                                       date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0])
 
-                        MR.displayInfo()
-                        MR.dataRetrieve()
+                        if request == "0":
+                            MR.display_info()
+                            MR.data_retrieve()
+                        elif request == "1":
+                            MR.print_infodata_csv(self.inputdir, self.mreq_count)
+                        elif request == "2":
+                            MR.print_infodata_csv(self.inputdir, self.mreq_count)
+                            MR.display_info()
+                            MR.data_retrieve()
 
                         if int(mftimesave.split('/')[0])==0 and int(mfstep.split('/')[0])==0 and pk!='OG_OROLSM__SL':
@@ -1058,5 +1146,6 @@
                             mfstep='000'
                             mftarget=self.inputdir+"/"+ftype+pk+'.'+mfdate+'.'+str(os.getppid())+'.'+str(os.getpid())+".grb"
-
+                            # increase number of mars requests
+                            self.mreq_count += 1
                             MR= MARSretrieval(self.server, self.public, dataset=self.dataset, marsclass=self.marsclass, stream=self.stream,
                                               type=mftype, levtype=pv[1], levelist=pv[2],resol=self.resol, gaussian=gaussian,
@@ -1064,10 +1153,19 @@
                                           date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0])
 
-                            MR.displayInfo()
-                            MR.dataRetrieve()
-
-
-
-        print "MARS retrieve done... "
+                            if request == "0":
+                                MR.display_info()
+                                MR.data_retrieve()
+                            elif request == "1":
+                                MR.print_infodata_csv(self.inputdir, self.mreq_count)
+                            elif request == "2":
+                                MR.print_infodata_csv(self.inputdir, self.mreq_count)
+                                MR.display_info()
+                                MR.data_retrieve()
+
+
+        if request == "0" or request == "2":
+            print('MARS retrieve done ... ')
+        elif request == "1":
+            print('MARS request printed ...')
 
     def getFlexpartTime(self, type,step, time):
Index: python/getMARSdata.py
===================================================================
--- python/getMARSdata.py	(revision e18f4b5f53f063ab746e1307bdd3162d31cb3e8a)
+++ python/getMARSdata.py	(revision 51f985321699a54b8e5acd7d1975955e45948717)
@@ -60,4 +60,9 @@
     print "start date %s "%(c.start_date)
     print "end date %s "%(c.end_date)
+    
+    if c.request == '0' or c.request == '2':
+        print("Retrieving EC data!")
+    elif c.request == '1':
+        print("Printing mars requests!")
 
     if ecapi:
@@ -91,8 +96,9 @@
 
     datechunk=datetime.timedelta(days=int(c.date_chunk))
-    print 'removing content of '+c.inputdir
-    tobecleaned=glob.glob(c.inputdir+'/*_acc_*.'+str(os.getppid())+'.*.grb')
-    for f in tobecleaned:
-        os.remove(f)
+    if c.request == '0' or c.request == '2':
+        print 'removing content of '+c.inputdir
+        tobecleaned=glob.glob(c.inputdir+'/*_acc_*.'+str(os.getppid())+'.*.grb')
+        for f in tobecleaned:
+            os.remove(f)
 
     times=None
@@ -109,5 +115,5 @@
             print "retrieve " + dates + " in dir " + c.inputdir
             try:
-                flexpart.retrieve(server, c.public, dates, times, c.inputdir)
+                flexpart.retrieve(server, c.public, dates, c.request, times, c.inputdir)
             except IOError:
                 myerror(c,'MARS request failed')
@@ -125,12 +131,14 @@
 
             print "retrieve " + dates + " in dir " + c.inputdir
-            flexpart.retrieve(server, c.public, dates, times, c.inputdir)
+            flexpart.retrieve(server, c.public, dates, c.request, times, c.inputdir)
             day+=datechunk
 
 
-
-    tobecleaned=glob.glob(c.inputdir+'/*__*.'+str(os.getppid())+'.*.grb')
-    for f in tobecleaned:
-        os.remove(f)
+    if c.request == '0' or c.request == '2':
+        print 'removing content of '+c.inputdir
+        tobecleaned=glob.glob(c.inputdir+'/*__*.'+str(os.getppid())+'.*.grb')
+        for f in tobecleaned:
+            os.remove(f)
+	    
     day=start
     times=None
@@ -145,5 +153,5 @@
         print "retrieve " + dates + " in dir " + c.inputdir
 
-        flexpart.retrieve(server, c.public, dates, times, c.inputdir)
+        flexpart.retrieve(server, c.public, dates, c.request, times, c.inputdir)
         day+=datechunk
 
Index: python/submit.py
===================================================================
--- python/submit.py	(revision e18f4b5f53f063ab746e1307bdd3162d31cb3e8a)
+++ python/submit.py	(revision 51f985321699a54b8e5acd7d1975955e45948717)
@@ -56,6 +56,9 @@
             c.outputdir=os.path.join(calledfromdir,c.outputdir)
         getMARSdata(args,c)
-        prepareFLEXPART(args,c)
-        normalexit(c)
+	if c.request == '0' or c.request == '2':
+            prepareFLEXPART(args,c)
+            normalexit(c)
+        else:
+            normalexit(c)
     else:
         submit(args.job_template,c,args.queue)
