Index: lm/trunk/SCRIPTS/mrungui
===================================================================
--- /palm/trunk/SCRIPTS/mrungui	(revision 2412)
+++ 	(revision )
@@ -1,53 +1,0 @@
-#!/bin/bash
-
-#--------------------------------------------------------------------------------#
-# This file is part of PALM.
-#
-# PALM is free software: you can redistribute it and/or modify it under the terms
-# of the GNU General Public License as published by the Free Software Foundation,
-# either version 3 of the License, or (at your option) any later version.
-#
-# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# PALM. If not, see <http://www.gnu.org/licenses/>.
-#
-# Copyright 1997-2014  Leibniz Universitaet Hannover
-#--------------------------------------------------------------------------------#
-#
-# Current revisions:
-# -----------------
-# 
-# 
-# Former revisions:
-# -----------------
-# $Id$
-# Modified for python version of mrungui
-# 
-# 1842 2016-04-07 19:24:16Z raasch
-#
-# 1841 2016-04-07 19:14:06Z raasch
-# script now running under bash
-#
-# 1046 2012-11-09 14:38:45Z maronga
-# code put under GPL (PALM 3.9)
-#
-# 793 2011-12-12 15:15:24Z maronga
-# Initial revision
-#
-# Description:
-# ------------
-# Starting script for mrungui
-#------------------------------------------------------------------------------#
-
-if which mrungui.py >/dev/null; then
-   mrungui.py > /dev/null 2>&1
-else
-   echo "  +++ mrungui not found."
-fi
-
-
-
-
Index: lm/trunk/SCRIPTS/mrungui.py
===================================================================
--- /palm/trunk/SCRIPTS/mrungui.py	(revision 2412)
+++ 	(revision )
@@ -1,1227 +1,0 @@
-#!/usr/bin/python -B
-# -*- coding: utf-8 -*-
-#--------------------------------------------------------------------------------#
-# This file is part of PALM.
-#
-# PALM is free software: you can redistribute it and/or modify it under the terms
-# of the GNU General Public License as published by the Free Software Foundation,
-# either version 3 of the License, or (at your option) any later version.
-#
-# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# PALM. If not, see <http://www.gnu.org/licenses/>.
-#
-# Copyright 1997-2017  Leibniz Universitaet Hannover
-#--------------------------------------------------------------------------------#
-#
-# Current revisions:
-# -----------------
-# 
-# 
-# Former revisions:
-# -----------------
-# $Id$
-# Initial revision in python
-# 
-# 
-#
-# Description:
-# ------------
-# Graphical user interface for the mrun script.
-# @author Felix Gaschler
-# @author BjÃ¶rn Maronga (maronga@muk.uni-hannover.de)
-#
-# Instructions:
-# -------------
-#
-#------------------------------------------------------------------------------!
-
-import sys
-import subprocess
-from PyQt4 import QtCore, QtGui, uic
-from PyQt4.QtCore import QProcess
-from time import strftime
-import os
-
-
-# Determine PALM directories
-try: 
-   devnull = open(os.devnull, 'w')
-   out = subprocess.check_output("echo $PALM_BIN", shell=True, stderr=subprocess.STDOUT)
-   palm_bin = out.rstrip()
-   palm_dir = out.split("palm")[0] + "palm/" + out.split("palm")[1].split("/")[1]
-   out = None
-except:   
-   print "Error. $PALM_BIN is not set."
-   raise SystemExit
-
-
-mrunline = ""
-name_of_file = os.path.basename(__file__)
-
-mrungui_path = os.path.realpath(__file__)
-version_path = mrungui_path[:len(mrungui_path)-14-len(name_of_file)-1]
-
-Ui_MainWindow = uic.loadUiType("%s/mrungui_files/mainwindow.ui" % (palm_bin))[0]
-Ui_helpDialog = uic.loadUiType("%s/mrungui_files/help.ui" % (palm_bin))[0]
-Ui_aboutDialog = uic.loadUiType("%s/mrungui_files/about.ui" % (palm_bin))[0]
-
-class HelpDialog(QtGui.QDialog,Ui_helpDialog):
-    def __init__(self, parent=None):
-        super(HelpDialog,self).__init__()
-        self.setupUi(self)
-        
-class AboutDialog(QtGui.QDialog,Ui_aboutDialog):
-    def __init__(self, parent=None):
-        super(AboutDialog,self).__init__()
-        self.setupUi(self)        
-
-class Mainwindow(QtGui.QMainWindow, Ui_MainWindow):
-    def __init__(self, parent=None):
-        super(Mainwindow, self).__init__()
-        
-        self.setupUi(self)
-        self.recent_jobs(10)
-        commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
-        commandline.setText("")
-        
-        self.tabWidget.setCurrentIndex(0)  
-        
-        filename = "%s/.mrun.gui.default" % (version_path)  
-        if os.path.exists(filename):
-            pass
-        else:
-            return
-        
-        file = open(filename, "r")
-        if ( file is not None ):
-            # File opened successfully
-            mrunline = file.readline()
-            #if neue zeile zeichen
-            mrunline = mrunline[:len(mrunline)-1]
-            file.close() 
-
-        # In case a mrunline was found, load it to mainwindow
-        if ( mrunline != ""):
-            mrunline = mrunline[17:] 
-            commandline.setText(mrunline)
-            self.setup_gui(mrunline)
-                      
-        
-    # starts xterm with mrun commandline
-    #######################################
-    def startmrun(self):
-        mrunline = str(self.groupBox.findChild(QtGui.QLineEdit,"commandline").text())
-        userline = str(self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text())
-        
-        # Check for empty line
-        mrunline_save = mrunline;
-        if (userline != ""):
-            mrunline = "%s %s" % (mrunline,userline)
-        history_line = mrunline       
-        
-        # Disable the main window
-        self.tabWidget.setEnabled(False)
-        self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False)
-        self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("wait...")      
-        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText("Executing mrun in xterm...")        
-        
-        # Wait until all commands have been executed (ugly) ?
-        #for i in range(0,21):
-        #    qApp->processEvents()       
-        
-        # Start xterm as QProcess
-        mrun = QProcess()
-        mrun.setProcessChannelMode(QProcess.MergedChannels) # mergedChannels
-        mrun.setWorkingDirectory(version_path)
-    
-        geomet = self.frameGeometry()
-        
-        posx = geomet.x()+geomet.width()
-        posy = geomet.y()
-      
-        s = " -title \"Executing mrun...\" -fa \"Monospace\" -fs 11 -geometry \"80x38+%d+%d\" -e \"" % (posx,posy)
-        mrunline = "%s%s;echo -n '--> Press enter to continue...';read yesno\"</dev/stdin" % (s, mrunline.replace("\"","\'"))
-        
-        mString = "xterm %s" % (mrunline)
-        mrun.start(mString);
-    
-        if( mrun.waitForStarted() is False ):
-            return
-        
-        # Wait until mrun has finished or wait for 200 minutes
-        mrun.waitForFinished(3600000);        
-        
-        # Jobs has been submitted or aborted. Continuing...
-        # Save the mrun command to history file
-        filename = "%s/.mrun.history" % (version_path)
-        tmstamp = strftime("%Y/%m/%d %H:%M")
-    
-        file = open(filename,"a")
-        s = "%s %s\n" % (tmstamp,history_line)
-        file.write(s)
-        file.close()              
-        
-        # Enable main window again
-        self.tabWidget.setEnabled(True)
-        self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True)
-        self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("Start mrun") 
-        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(mrunline_save);
-        
-        # Reload recent jobs
-        self.recent_jobs(10)
-        
-        
-    # loads recent jobs 
-    ######################################
-    def recent_jobs(self, number):
-        fileDir = "%s/.mrun.history" % (version_path)
-        if os.path.exists(fileDir):
-            pass
-        else:
-            return
-        
-        file = open(fileDir,"r")
-        history = file.readlines()
-        tmphistory = list()
-        file.close();
-        j = 0;
-
-        list_jobname = self.group_job.findChild(QtGui.QListWidget,"list_jobname")
-        list_jobname.clear()
-
-        # Read history entries and append to recent job list
-        i=len(history)-1
-        count = 0
-        while i>=0 and count<10:
-            timestamp = history[i][:16]
-            listitem = history[i][17:len(history[i])-1]
-            listitem = filter(None,listitem.split(" -d"))[1]
-            listitem = filter(None,listitem.split(" -"))[0]
-            listitem = listitem.replace(" ","");
-            matchitems = list_jobname.findItems(listitem, QtCore.Qt.MatchExactly)
-
-            if ( len(matchitems) == 0 ):
-                list_jobname.addItem(listitem);
-                s = "%s (%s)" % (listitem,timestamp)
-                tmphistory.append(s);
-                count = count +1
-                j = j+1
-                
-            if ( j == number ):
-                break
-            i = i-1
-            
-        # Send to list
-        list_jobname.clear();
-        
-        i=0
-        while i<len(tmphistory):
-            list_jobname.addItem(tmphistory[i]);
-            i = i+1
-            
-
-    # Enables coupled settings
-    ###############################
-    def enable_coupled(self):
-        coupledState = self.group_job.findChild(QtGui.QComboBox, "drop_job").currentText()
-        group = self.group_execution.findChild(QtGui.QGroupBox, "group_coupled")
-        
-        if (coupledState == "Restart run (coupled atmosphere ocean)" or coupledState == "Initial run (coupled atmosphere ocean)"):
-            group.setEnabled(True)
-        else: 
-            group.setEnabled(False)
-            
-            
-    # select a job via "select"-button
-    ################################
-    def choosejob(self):
-        jobDir = "%s/JOBS" % (version_path)        
-
-        # Pick a job from dialog
-        filename = QtGui.QFileDialog.getExistingDirectory(self, "Open a folder", jobDir, QtGui.QFileDialog.ShowDirsOnly)
-        
-        # If a file was selected, load it into mainwindow
-        if ( filename != ""):
-	    jobname = os.path.basename(unicode(filename))
-            self.group_job.findChild(QtGui.QLineEdit,"line_jobname").setText(jobname)
-            self.group_job.findChild(QtGui.QListWidget,"list_jobname").clearSelection()
-
-            # Change mrunline accordingly
-            self.change_commandline("d","")
-            self.change_commandline("r","")
-            return
-        else:
-            return
-    
-        
-    # select a job via doubleclick from list
-    #################################
-    def choosejob_list(self):
-        #  Get selected item from list
-        list_jobname = self.group_job.findChild(QtGui.QListWidget,"list_jobname")
-        filename = str(list_jobname.currentItem().text())
-        itemint = list_jobname.currentRow()
-    
-        # Reload list
-        self.setupUi(self)
-        self.recent_jobs(10)
-    
-        # Set selected item to jobname
-        list_jobname.item(itemint).setSelected(True);
-    
-        timestamp = filename[len(filename)-17:][:16]
-        jobname = filename[:len(filename) - 19];
-    
-        fileDir = "%s/.mrun.history" % (version_path)
-        file = open(fileDir,"r")
-        history = file.readlines()
-        tmphistory = list()
-        file.close();        
-    
-        i = len(history)
-        while i>=1:
-            listitem = history[i-1][17:len(history[i-1])-1]
-            listitem = filter(None,listitem.split(" -d"))[1]
-            listitem = filter(None,listitem.split(" -"))[0]
-            listitem = listitem.replace(" ","");                
-
-            # Select command line with correct timestamp and jobname
-            if (history[i-1][:16] == timestamp and listitem == jobname):
-                mrunline = history[i-1]
-                mrunline = mrunline[17:]
-                mrunline = mrunline[:len(mrunline)-1]
-                self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(mrunline);
-                self.setup_gui(mrunline);
-                return
-            i = i-1
-                
-    # Change run identifer (initial, restart, coupled...)
-    ######################################################
-    def change_rc_list(self):
-        drop_job = self.group_job.findChild(QtGui.QComboBox,"drop_job").currentText()    
-        self.change_commandline("r","")
-    
-        # Enable PE distribution for atmosphere/ocean
-        if ( drop_job == "Restart run (coupled atmosphere ocean)" or drop_job == "Initial run (coupled atmosphere ocean)"):
-            drop_atmos = self.group_execution.findChild(QtGui.QLineEdit,"line_PE_atmos").text() 
-            drop_ocean = self.group_execution.findChild(QtGui.QLineEdit,"line_PE_ocean").text() 
-            s = "%s %s" % (drop_atmos,drop_ocean)
-            self.change_commandline("Y",s)
-    
-    
-        if ( drop_job == "Restart run" or drop_job == "Restart run (coupled atmosphere ocean)"):
-           self.change_commandline("d","")
-
-        # Check of ocean runs
-        else:
-            self.delete_commandline("Y")
-            if (drop_job == "Precursor run (ocean)"):
-                self.activate_flag("y")
-            else:
-                self.deactivate_flag("y")
-            
-    # changes commandline depending on parameters
-    ##########################################################      
-    def change_commandline(self, id_str, fwt_str):
-        fwt_str = str(fwt_str) 
-        initialize = False
-        mrunline = str(self.groupBox.findChild(QtGui.QLineEdit,"commandline").text())    
-        s = " -%s " % (id_str)
-        splitline = filter(None,mrunline.split(s))
-
-        if ( len(splitline) == 0 ):
-                splitline.append("mrun")
-                splitline.append(" ")
-                initialize = True
-
-        elif ( len(splitline) == 1 ):
-            splitline.append(" ")
-        
-        param = splitline[1].split("-")
-    
-        # Change in parameter "d" (jobname)
-        if (id_str == "d"):
-            filename = str(self.group_job.findChild(QtGui.QLineEdit,"line_jobname").text())
-            s = filename.split("JOBS/") 
-            param[0] = s[len(s)-1]
-     
-            if ( initialize == True ):#and self.group_runcontrol.isEnabled() == True ):
-                self.group_runcontrol.setEnabled(True)
-                self.group_execution.setEnabled(True)
-                self.group_job.findChild(QtGui.QComboBox,"drop_job").setEnabled(True)
-                self.group_advanced.setEnabled(True)
-                self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True) 
-                self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(True)
-            
-            elif ( param[0] == ""):            
-                self.group_runcontrol.setEnabled(False)
-                self.group_execution.setEnabled(False)
-                self.group_job.findChild(QtGui.QComboBox,"drop_job").setEnabled(False)
-                self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False) 
-                self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(False)
-                self.group_advanced.setEnabled(False)
-                self.delete_commandline("d")
-                self.change_commandline("r","remove")
-                self.group_job.findChild(QtGui.QLabel,"label_usercode").setText("")
-                return 1 
-            
-            else:
-                # Check if user code is available
-                usercode = "%s/USER_CODE/%s" % (version_path,param[0])
-                
-                if (os.path.exists(usercode) is True): 
-                    self.group_job.findChild(QtGui.QLabel,"label_usercode").setText("<font color='green'>User code found.</font>")
-               
-                else:               
-                    self.group_job.findChild(QtGui.QLabel,"label_usercode").setText("<font color='red'>Warning: no user code found!</font>")
-               
-
-                # Check if _pdf file is available, otherwise notice user
-                drop_job = self.group_job.findChild(QtGui.QComboBox,"drop_job").currentText()
-                if ( self.group_execution.findChild(QtGui.QCheckBox,"check_restarts").checkState() == 2 or 
-                     drop_job == "Restart run" or drop_job == "Restart run (coupled atmosphere ocean)"     ):
-
-                    jobname = self.group_job.findChild(QtGui.QLineEdit, "line_jobname").text()
-                    restartfile = "%s/JOBS/%s/INPUT/%s_p3df" % (version_path,jobname,jobname)
-
-                    if (os.path.exists(restartfile) == True):                  
-                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("")
-               
-
-                        if ( drop_job == "Restart run (coupled atmosphere ocean)" ):
-		            restartfileo = "%s/JOBS/%s/INPUT/%s_p3dof" % (version_path,jobname,jobname)
-                            if (os.path.exists(restartfileo) == True):                  
-                                self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("hooo")
-                  
-                            else:       
-                                self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3dof file found!</font>")   
-               
-                    else:       
-                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3df file found!</font>")
-         
-               
-                        
-                        
-                self.group_runcontrol.setEnabled(True)
-                self.group_execution.setEnabled(True)
-                self.drop_job.setEnabled(True)
-                self.group_advanced.setEnabled(True)
-                   
-                if ( self.group_advanced.findChild(QtGui.QLineEdit,"line_i").text() != "" or 
-                     self.group_advanced.findChild(QtGui.QLineEdit,"line_o").text() != "" ):                  
-                    change_commandline("r","remove")
-                    self.group_runcontrol.setEnabled(False)
-
-        # Change in parameter "r" (run control list)
-        elif (id_str == "r"): 
-            status_ts = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_ts").checkState()
-            status_pr = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_pr").checkState()
-            status_xy = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_xy").checkState()
-            status_xz = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_xz").checkState()
-            status_yz = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_yz").checkState()
-            status_3d = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_3d").checkState()
-            status_ma = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_ma").checkState()
-            status_sp = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_sp").checkState()
-            status_pts = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_pts").checkState()
-            status_prt = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_prt").checkState()
-    
-            drop_job = self.group_job.findChild(QtGui.QComboBox,"drop_job").currentText()
-            rc_flag = "#"
-    
-            if (drop_job == "Initial run"):
-                rc_flag = "#"
-            
-            elif (drop_job == "Restart run"):            
-                rc_flag = "f"
-            
-            elif (drop_job == "Precursor run (atmosphere)"):            
-                rc_flag = "#"
-            
-            elif (drop_job == "Precursor run (ocean)"):            
-                rc_flag = "o#"
-
-            elif (drop_job == "Initial run (coupled atmosphere ocean)"):            
-                rc_flag = "#"
-            
-            elif (drop_job == "Restart run (coupled atmosphere ocean)"):            
-                rc_flag = "f"
-            
-            param[0] = "\"d3%s" % (rc_flag)
-    
-            if (status_ts == 2):
-                param[0] = "%s ts%s" % (param[0],rc_flag)
-            
-            if (status_pr == 2):
-                param[0] = "%s pr%s" % (param[0],rc_flag)
-            
-            if (status_xy == 2):
-                param[0] = "%s xy%s" % (param[0],rc_flag)
-            
-            if (status_xz == 2):          
-                param[0] = "%s xz%s" % (param[0],rc_flag)
-            
-            if (status_yz == 2):    
-                param[0] = "%s yz%s" % (param[0],rc_flag)
-            
-            if (status_3d == 2):     
-                param[0] = "%s 3d%s" % (param[0],rc_flag)
-            
-            if (status_ma == 2):
-                param[0] = "%s ma%s" % (param[0],rc_flag)
-            
-            if (status_sp == 2):
-                param[0] = "%s sp%s" % (param[0],rc_flag)
-            
-            if (status_prt == 2):
-                param[0] = "%s prt%s" % (param[0],rc_flag)
-            
-            if (status_pts == 2):
-                param[0] = "%s pts%s" % (param[0],rc_flag)
-            
-    
-            if (drop_job == "Restart run (coupled atmosphere ocean)" or drop_job == "Initial run (coupled atmosphere ocean)"):
-                if (rc_flag == "#"):
-                   rc_flag = "o#"
-                else:
-                   rc_flag = "of"
-
-                param[0] = "%s d3%s" % (param[0],rc_flag)
-    
-                if (status_ts == 2):
-                    param[0] = "%s ts%s" % (param[0],rc_flag)
-                
-                if (status_pr == 2):                
-                    param[0] = "%s pr%s" % (param[0],rc_flag)
-                
-                if (status_xy == 2):
-                    param[0] = "%s xy%s" % (param[0],rc_flag)
-                
-                if (status_xz == 2):   
-                    param[0] = "%s xz%s" % (param[0],rc_flag)
-                
-                if (status_yz == 2):
-                    param[0] = "%s yz%s" % (param[0],rc_flag)
-                
-                if (status_3d == 2):
-                    param[0] = "%s 3d%s" % (param[0],rc_flag)
-                
-                if (status_ma == 2):
-                    param[0] = "%s ma%s" % (param[0],rc_flag)
-                
-                if (status_sp == 2):               
-                    param[0] = "%s sp%s" % (param[0],rc_flag)
-                
-                if (status_prt == 2):
-                    param[0] = "%s prt%s" % (param[0],rc_flag)
-                
-                if (status_pts == 2):
-                    param[0] = "%s pts%s" % (param[0],rc_flag)
-
-            status_restarts = self.group_execution.findChild(QtGui.QCheckBox,"check_restarts").checkState()
-
-            if (status_restarts == 2):
-                param[0]="%s restart" % (param[0])
-    
-                # Check if _p3df file is available, otherwise notice user
-                if (status_restarts == 2):
-                    jobname = str(self.group_job.findChild(QtGui.QLineEdit, "line_jobname").text())[len(version_path)+len("/JOBS/"):]
-                    restartfile = "%s/JOBS/%s/INPUT/%s_p3df" % (version_path,jobname,jobname)
-                    
-                    if (os.path.exists(restartfile) == True):                   
-                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("")
-                   
-                    else:                   
-                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3df file found!</font>")
-
-            else:  
-                self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("")
-
-            status_cycfill = self.group_execution.findChild(QtGui.QCheckBox,"check_cycfill").checkState()
-    
-            if (status_cycfill == 2):            
-                param[0]="%s cycfill" % (param[0])
-
-            param[0]="%s\"" % (param[0])
-    
-            if ( fwt_str == "remove"):            
-                self.delete_commandline(id_str)
-                return 1
-            
-            else:            
-                self.button_start.setEnabled(True)
-                self.action_save.setEnabled(True)
-
-        # Change in any other parameter
-        else:
-            if ( fwt_str != ""):            
-                param[0] = "\"%s\"" % (fwt_str)
-            
-            else:            
-                self.delete_commandline(id_str)
-                return 1
-                        
-        # Join the new mrunline
-        splitline[1]= " -".join(param)
-                
-                
-        s = " -%s " % (id_str)
-        newmrunline = s.join(splitline)
-    
-        # Pr the new mrunline to mainwindow
-        newmrunline = newmrunline.replace("  "," ")
-        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(newmrunline)
-
-    # change lineinput depending on sender
-    ###################################################################################
-    def change_lineinput(self):
-        if ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit, "line_host") ):
-            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_host").text()
-            self.change_commandline("h",tmptext)
-
-        elif ( self.sender() == self.group_job.findChild(QtGui.QLineEdit, "line_jobname") ):
-            tmptext = self.group_job.findChild(QtGui.QLineEdit,"line_jobname").text()
-            self.change_commandline("d",tmptext)
-
-        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_q")):
-            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_q").text()
-            self.change_commandline("q",tmptext)
-        
-        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_account")):
-            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_account").text()
-            self.change_commandline("u",tmptext)
-        
-        elif ( self.sender() ==  self.group_execution.findChild(QtGui.QLineEdit,"line_pe")):
-            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_pe").text()
-            self.change_commandline("X",tmptext)
-        
-        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_tpn")):
-            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_tpn").text()
-            self.change_commandline("T",tmptext)
-        
-        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_branch")):
-            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_branch").text()
-            self.change_commandline("K",tmptext)
-        
-        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_time")):
-            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_time").text()
-            self.change_commandline("t",tmptext)
-        
-        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_M")):
-            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_M").text()
-            self.change_commandline("M",tmptext)
-        
-        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_m")):
-            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_m").text()
-            self.change_commandline("m",tmptext)
-        
-        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_a")):
-            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_a").text()
-            self.change_commandline("a",tmptext)
-        
-        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_D")):
-            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_D").text()
-            self.change_commandline("D",tmptext)
-        
-        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_c")):
-            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_c").text()
-            if ( tmptext == ".mrun.config"):
-                tmptext = ""
-            self.change_commandline("c",tmptext)
-
-        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_p")):
-            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_p").text()
-            self.change_commandline("p",tmptext)
-        
-        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_s")):
-            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_s").text()
-            self.change_commandline("s",tmptext)
-        
-        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_i")):
-            cmd = self.groupBox.findChild(QtGui.QLineEdit,"commandline").text()
-            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_i").text()
-            if ( tmptext != ""):
-                self.change_commandline("r","remove")
-                cmd = self.groupBox.findChild(QtGui.QLineEdit,"commandline").text()
-                self.group_runcontrol.setEnabled(False)
-        
-                self.button_start.setEnabled(True)
-                self.action_save.setEnabled(True)
-            
-            elif (self.group_advanced.findChild(QtGui.QLineEdit,"line_o").text() == "" ):
-                self.group_runcontrol.setEnabled(True)
-                self.change_commandline("r","")
-            
-            self.change_commandline("i",tmptext)
-        
-        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_o")):
-            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_o").text()
-            if ( tmptext != ""):
-                self.change_commandline("r","remove")
-                self.button_start.setEnabled(True)
-                self.action_save.setEnabled(True)
-                self.group_runcontrol.setEnabled(False)
-            
-            elif (self.group_advanced.findChild(QtGui.QLineEdit,"line_i").text() == "" ):
-                self.group_runcontrol.setEnabled(True)
-                self.change_commandline("r","")
-                cmd = self.groupBox.findChild(QtGui.QLineEdit,"commandline").text()
-        
-            self.change_commandline("o",tmptext)
-
-        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_w")):
-            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_w").text()
-            self.change_commandline("w",tmptext)
-        
-        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_PE_atmos") or 
-               self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_PE_ocean")):
-            t1 = self.group_execution.findChild(QtGui.QLineEdit,"line_PE_atmos").text()
-            t2 = self.group_execution.findChild(QtGui.QLineEdit,"line_PE_ocean").text()            
-            tmptext = "%s %s" % (t1,t2)
-            
-            self.change_commandline("Y",tmptext)
-
-            # try catch sowas in der art
-            pe1 = 0
-            pe2 = 0
-            
-            try:
-                pe1 = int(t1)
-            except ValueError:            
-                pass
-                
-            try:
-                pe2 = int(t2)
-            except ValueError:
-                pass
-                
-            PE_total = pe1+pe2   
-            self.group_execution.findChild(QtGui.QLineEdit,"line_pe").setText(str(PE_total))
-            self.change_commandline("X",str(PE_total))
-        
-        elif ( self.sender() == self.group_advanced.findChild(QtGui.QComboBox,"combo_n")):
-            tmptext = self.group_advanced.findChild(QtGui.QComboBox,"combo_n").currentText()
-            if ( tmptext == "default"):
-                tmptext = ""
-            
-            self.change_commandline("n",tmptext)      
-           
-    # deletes parameter from commandline
-    ##################################################################################### 
-    def delete_commandline(self, id_str):   
-        # Read mrunline
-        commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
-        mrunline = str(commandline.text())
-        s = " -%s" % (id_str)
-        splitline = filter(None,mrunline.split(s))
-        
-        if ( len(splitline) == 1):
-            return 1
-        else:
-            param = splitline[1].split("-")
-            param[0] = ""
-            splitline[1]= " -".join(param)
-            newmrunline = "".join(splitline)
-            newmrunline = newmrunline.replace("  "," ")
-    
-            # Print new mrunline to screen
-            commandline.setText(newmrunline)
-        
-    # controls flags
-    ###################################################################################
-    def check_flags(self):
-        status = self.group_execution.findChild(QtGui.QCheckBox,"check_delete_tmp_files" ).checkState()
-        if (status == 2):      
-            self.activate_flag("B")
-        else:
-            self.deactivate_flag("B")
-    
-        status = self.group_execution.findChild(QtGui.QCheckBox,"check_verbose" ).checkState()
-        if (status == 2):
-            self.activate_flag("v") 
-        else:
-            self.deactivate_flag("v")
-    
-        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_A" ).checkState()
-        if (status == 2):
-            self.activate_flag("A")
-        else:
-            self.deactivate_flag("A")
-    
-        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_b" ).checkState() 
-        if (status == 2):
-            self.activate_flag("b")
-        else:
-            self.deactivate_flag("b")
-    
-        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_F" ).checkState()   
-        if (status == 2):
-            self.activate_flag("F")
-        else:
-            self.deactivate_flag("F")
-            
-        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_I" ).checkState() 
-        if (status == 2):
-            self.activate_flag("I")
-        else:
-            self.deactivate_flag("I")
-
-        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_k" ).checkState() 
-        if (status == 2):
-            self.activate_flag("k")
-        else:
-            self.deactivate_flag("k")
-
-        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_O" ).checkState() 
-        if (status == 2):
-            self.activate_flag("O")
-        else:
-            self.deactivate_flag("O")
-
-        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_S" ).checkState() 
-        if (status == 2):
-            self.activate_flag("S")
-        else:
-            self.deactivate_flag("S")
-
-        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_x" ).checkState() 
-        if (status == 2):
-            self.activate_flag("x")
-        else:
-            self.deactivate_flag("x")
-        
-        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_Z" ).checkState() 
-        if (status == 2):
-            self.activate_flag("Z")
-        else:
-            self.deactivate_flag("Z")
-        
-    # changes flag to parameter 
-    ##################################################################################    
-    def activate_flag(self, id_str):
-        commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
-        mrunline = str(commandline.text())
-        s = " -%s" % (id_str)
-        splitline = filter(None,mrunline.split(s))
-        
-        if ( len(splitline) == 1):
-            splitline.append("")
-            s = " -%s" % (id_str)
-            newmrunline = s.join(splitline)
-            newmrunline = newmrunline.replace("  "," ")
-            commandline.setText(newmrunline)                
-        
-    # deletes flag in commandline
-    ####################################################################################    
-    def deactivate_flag(self, id_str):
-        commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
-        mrunline = str(commandline.text())
-        s = " -%s" % (id_str)
-        splitline = filter(None,mrunline.split(s))
- 
-        newmrunline = "".join(splitline)
-        newmrunline = newmrunline.replace("  "," ")
-        commandline.setText(newmrunline)     
-
-    # Clears window 
-    #################################################################################
-    def reset_window(self):
-        self.setupUi(self)
-        self.tabWidget.setCurrentIndex(0)
-        self.recent_jobs(10)
-        
-    # Safes current commandline and user Parameters to .sav file
-    #################################################################################
-    def save_to_file(self):
-        user_string = self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text()
-        cmd_string = self.groupBox.findChild(QtGui.QLineEdit,"commandline").text()
-        
-        string_to_file = cmd_string
-        if (user_string != ""): 
-            string_to_file = "%s%s" % (string_to_file,user_string)
-            
-        #filename = QtGui.QInputDialog.getText(self, "Save File naming Dialog", "Insert filename", QtGui.QLineEdit.Normal)
-        filename = str(QtGui.QFileDialog.getSaveFileName(self, "Save File","filename.sav"))
-        extension = ".sav"
-        filename = "%s%s" % (filename, "")
-        tmstamp = strftime("%Y/%m/%d %H:%M")
-        
-        file = open(filename,"w")
-        s = "%s %s" % (tmstamp, string_to_file)
-        file.write(s)
-        file.close()
-        
-    # Safes current commandline and user parameters to default file
-    ################################################################################
-    def save_default(self):
-        user_string = self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text()
-        cmd_string = self.groupBox.findChild(QtGui.QLineEdit,"commandline").text()
-        
-        string_to_file = cmd_string
-        if (user_string != ""): 
-            string_to_file = "%s%s" % (string_to_file,user_string)
-        
-        filename ="%s/.mrun.gui.default" % (version_path)
-        tmstamp = strftime("%Y/%m/%d %H:%M")
-        
-        file = open(filename,"w")
-        s = "%s %s" % (tmstamp, string_to_file)
-        file.write(s)
-        file.close()        
-
-    # Execute command which starts jobmanager (start palm_jm)
-    #######################################################
-    def start_jobmanager(self):
-        subprocess.Popen(["nohup","palm_jm",">>","/dev/null", "2>&1","&"])        
-        
-    # Executes command which starts watchdog (start palm_wd)
-    ########################################################
-    def start_watchdog(self):
-        subprocess.Popen(["nohup","palm_wd",">>","/dev/null", "2>&1","&"])
-
-    # Opens "help" dialog
-    #################################
-    def help(self):        
-        dialog = HelpDialog()
-        dialog.exec_()
-
-    # Opens "about" dialog
-    ##################################
-    def about_gui(self):
-        dialog = AboutDialog()
-        dialog.exec_()
-           
-    # commandline to buttons etc
-    ##############################
-    def setup_gui(self, mrun_str):  
-        #  Some initial settings
-        user = "" 
-        coupled_run = False 
-        ocean_run   = False 
-        nojob       = False 
-        rc_manual   = False 
-
-        #Split parameters in mrunline
-        splitline = mrun_str.split(" -")
-        
-        if ( splitline[0] != "mrun"):
-            return 1
-
-        else:
-            self.group_job.setEnabled(True) 
-
-        # Loop for all parameters in mrunline
-        i = len(splitline)-1
-        while i >= 1:
-
-            # Determine parameter
-            splitparameter = splitline[i].split(" ")
-
-            parameter = splitparameter[0] 
-            splitparameter.pop(0)
-            options = " ".join(splitparameter) 
-            options = options.replace("\"","") 
-
-            # Check for suitable switch
-            if ( parameter == "d"):
-              
-                if ( options != ""):
-                    self.group_job.findChild(QtGui.QLineEdit,"line_jobname").setText(options) 
-                    nojob = False 
-                
-                else:                 
-                    nojob = True 
-                
-            elif ( parameter == "h"):
-                self.group_execution.findChild(QtGui.QLineEdit,"line_host").setText(options) 
-             
-            elif ( parameter == "q"):
-                self.group_execution.findChild(QtGui.QLineEdit,"line_q").setText(options) 
-             
-            elif ( parameter == "K"):
-                self.group_execution.findChild(QtGui.QLineEdit,"line_branch").setText(options) 
-             
-            elif ( parameter == "u"):
-                self.group_execution.findChild(QtGui.QLineEdit,"line_account").setText(options) 
-             
-            elif ( parameter == "X"):
-                self.group_execution.findChild(QtGui.QLineEdit,"line_pe").setText(options) 
-             
-            elif ( parameter == "T"):
-                self.group_execution.findChild(QtGui.QLineEdit,"line_tpn").setText(options) 
-             
-            elif ( parameter == "t"):
-                self.group_execution.findChild(QtGui.QLineEdit,"line_time").setText(options) 
-             
-            elif ( parameter == "B"):
-                self.group_execution.findChild(QtGui.QCheckBox,"check_delete_tmp_files").setChecked(True) 
-             
-            elif ( parameter == "v"):
-                self.group_execution.findChild(QtGui.QCheckBox,"check_verbose").setChecked(True) 
-             
-            elif ( parameter == "A"):
-                self.group_advanced.findChild(QtGui.QCheckBox,"check_A").setChecked(True) 
-             
-            elif ( parameter == "b"): 
-                self.group_advanced.findChild(QtGui.QCheckBox,"check_b").setChecked(True)  
-             
-            elif ( parameter == "F"):
-                self.group_advanced.findChild(QtGui.QCheckBox,"check_F").setChecked(True) 
-             
-            elif ( parameter == "I"):
-                self.group_advanced.findChild(QtGui.QCheckBox,"check_I").setChecked(True) 
-             
-            elif ( parameter == "k"):
-                self.group_advanced.findChild(QtGui.QCheckBox,"check_k").setChecked(True) 
-             
-            elif ( parameter == "O"): 
-                self.group_advanced.findChild(QtGui.QCheckBox,"check_O").setChecked(True) 
-             
-            elif ( parameter == "S"):              
-                self.group_advanced.findChild(QtGui.QCheckBox,"check_S").setChecked(True) 
-             
-            elif ( parameter == "x"):              
-                self.group_advanced.findChild(QtGui.QCheckBox,"check_x").setChecked(True) 
-             
-            elif ( parameter == "Z"):
-                self.group_advanced.findChild(QtGui.QCheckBox,"check_Z").setChecked(True) 
-               
-            elif ( parameter == "m"):
-                self.group_advanced.findChild(QtGui.QLineEdit,"line_m").setText(options) 
-             
-            elif ( parameter == "M"):
-                self.group_advanced.findChild(QtGui.QLineEdit,"line_M").setText(options) 
-             
-            elif ( parameter == "a"):
-                self.group_advanced.findChild(QtGui.QLineEdit,"line_a").setText(options) 
-             
-            elif ( parameter == "D"):
-                self.group_advanced.findChild(QtGui.QLineEdit,"line_D").setText(options) 
-             
-            elif ( parameter == "c"):
-                self.group_advanced.findChild(QtGui.QLineEdit,"line_c").setText(options) 
-             
-            elif ( parameter == "p"):
-                self.group_advanced.findChild(QtGui.QLineEdit,"line_p").setText(options) 
-             
-            elif ( parameter == "s"):
-                self.group_advanced.findChild(QtGui.QLineEdit,"line_s").setText(options) 
-             
-            elif ( parameter == "i"):
-                self.group_advanced.findChild(QtGui.QLineEdit,"line_i").setText(options) 
-                rc_manual = True 
-             
-            elif ( parameter == "o"):
-                self.group_advanced.findChild(QtGui.QLineEdit,"line_o").setText(options) 
-                rc_manual = True 
-             
-            elif ( parameter == "w"):
-                self.group_advanced.findChild(QtGui.QLineEdit,"line_w").setText(options) 
-             
-
-            # Determine settings for coupled restart runs
-            elif ( parameter == "Y"):
-                optionssplit = options.split(" ") 
-                
-                group_coupled = self.group_execution.findChild(QtGui.QGroupBox,"group_coupled")
-                group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").setEnabled(True) 
-                group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").setEnabled(True) 
-                group_coupled.findChild(QtGui.QLabel,"label_coupled1").setEnabled(True) 
-                group_coupled.findChild(QtGui.QLabel,"label_coupled2").setEnabled(True) 
-                group_coupled.findChild(QtGui.QLabel,"label_coupled3").setEnabled(True) 
-                group_coupled.findChild(QtGui.QLabel,"label_coupling").setEnabled(True) 
-
-                if (optionssplit.count() == 2):
-                    group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").setEnabled(optionssplit[0]) 
-                    group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").setEnabled(optionssplit[1])
-                 
-                else:                  
-                    group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").setText("") 
-                    group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").setText("") 
- 
-                 
-                coupled_run = True 
-             
-            elif ( parameter == "n"):
-              
-                if ( options == "shared"):                  
-                    self.group_advanced.findChild(QtGui.QComboBox,"combo_n").setCurrentIndex(1) 
-                 
-                elif ( options == "non_shared"):                  
-                    self.group_advanced.findChild(QtGui.QComboBox,"combo_n").setCurrentIndex(2) 
-                 
-                else:                  
-                    self.group_advanced.findChild(QtGui.QComboBox,"combo_n").setCurrentIndex(0) 
-                 
-             
-            elif ( parameter == "y"):              
-                self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(3) 
-             
-
-            # Determine settings for the run control list
-            elif ( parameter == "r"):
-              
-                optionssplit = options.split(" ") 
-
-                options_2 = None
-                options_all = None
-                
-                j = 0
-                while j < len(optionssplit):
-                 
-                    options_all = optionssplit[j] 
-                    options_2 = optionssplit[j][:2] 
-                    if (options_2 == "ts"):
-                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_ts").setChecked(True) 
-                    
-                    if (options_2 == "pr" and options_all[:3] is not "prt"):                  
-                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_pr").setChecked(True) 
-                    
-                    if (options_2 == "xy"):
-                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_xy").setChecked(True) 
-                    
-                    if (options_2 == "xz"):      
-                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_xz").setChecked(True) 
-                    
-                    if (options_2 == "yz"):     
-                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_yz").setChecked(True) 
-                    
-                    if (options_2 == "3d"):     
-                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_3d").setChecked(True) 
-                        
-                    if (options_2 == "ma"):             
-                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_ma").setChecked(True) 
-                    
-                    if (options_2 == "sp"):       
-                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_sp").setChecked(True) 
-                    
-                    if (options_all[:3] == "prt"):      
-                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_prt").setChecked(True) 
-                    
-                    if (options_all[:3] == "pts"):     
-                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_pts").setChecked(True) 
-                    
-                    if (options_2 == "d3"):       
-                        if (options_all[:3][:-1] == "#"):
-                            self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(0) 
-                        
-                        elif (options_all[:3][:-1] == "f"):
-                            self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(1) 
-                        
-                        elif (options_all[:3][:-1] == "o"):
-                            ocean_run = True 
-                        
-                    if (options_all == "restart"):
-                        self.group_execution.findChild(QtGui.QCheckBox,"check_restarts").setChecked(True) 
-                        # Check if _pdf file is available, otherwise notice user
-                        jobname = str(self.group_job.findChild(QtGui.QLineEdit,"line_jobname").text())[len(version_path)+len("/JOBS/"):] 
-                        
-                        restartfile = "%sJOBS/%s/INPUT/%s_p3df" % (version_path,jobname,jobname)
-                        if (os.path.exists(restartfile) == True):   
-                            self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("") 
-                       
-                        else:
-                            self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3df file \found!</font>") 
-                    j = j+1
-
-            # All unknown parameters are set as extra user parameters
-            else:
-                user = "%s-%s \"%s\" " % (user,parameter,options)
-                splitline.removeAt(i) 
-
-            i = i-1
-        # Change drop box state in case of ocean precursor or coupled restart runs
-        if ( ocean_run == True ):
-            if ( coupled_run == True ):
-                self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(4) 
-            
-            else:
-                self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(3) 
-
-        if ( user != ""):
-            self.group_advanced.findChild(QtGui.QLineEdit,"line_user").setText(user)
-
-        # Join mrunline and post it to mainwindow
-        mrunline = " -".join(splitline) 
-        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(mrunline)          
-
-        # Disable mainwindow if no job was found, otherwise enable
-        if ( nojob == True ):
-            self.group_execution.setEnabled(False) 
-            self.group_runcontrol.setEnabled(False) 
-            self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False) 
-            self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(False) 
-            self.group_job.findChild(QtGui.QComboBox, "drop_job").setEnabled(False) 
-            self.group_advanced.setEnabled(False) 
-            self.check_advanced.setEnabled(False) 
-         
-        else:
-            self.group_execution.setEnabled(True) 
-            self.group_runcontrol.setEnabled(True) 
-            self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True) 
-            self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(True)
-            self.group_job.findChild(QtGui.QComboBox, "drop_job").setEnabled(True) 
-            self.group_advanced.setEnabled(True) 
-            
-        # Disable run control box, if manual settings of -i and -o are used
-        if ( rc_manual == True ):
-            self.group_runcontrol.setEnabled(False) 
-            change_commandline("r","remove") 
-            self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True) 
-            self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(True)
-     
-    # open saved commandline
-    ##################################
-    def open_from_file(self):
-        
-        # Select filename and open it
-        filename = QtGui.QFileDialog.getOpenFileName(self, "Open File","Save files (*.sav)") 
-        
-        if ( filename != ""):
-            file = open(filename, "r")
-          
-            if ( file is not None ):
-                # File opened successfully
-                mrunline = file.read()
-                file.close() 
-    
-            # In case a mrunline was found, load it to mainwindow
-            if ( mrunline != ""):
-                mrunline = mrunline[17:] 
-                self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(mrunline) 
-                self.setup_gui(mrunline)
-         
-    # open saved commandline   
-    ##################################
-    def open_last(self): 
-        # Select filename and open it
-        filename = "%s/.mrun.history" % (version_path)
-        
-        if os.path.exists(filename):
-            pass
-        else:
-            return
-        
-        file = open(filename, "r")  
-        if ( file is not None ):
-            # File opened successfully
-            lines = file.readlines()
-            mrunline = lines[len(lines)-1]
-            mrunline = mrunline[:len(mrunline)-1]
-            file.close() 
-
-        # In case a mrunline was found, load it to mainwindow
-        if ( mrunline != ""):
-            mrunline = mrunline[17:len(mrunline)] 
-            self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(mrunline) 
-            self.setup_gui(mrunline)        
-        
-
-if __name__ == "__main__":
-    app = QtGui.QApplication(sys.argv)
-    window = Mainwindow()
-    window.show()
-    sys.exit(app.exec_())
Index: /palm/trunk/SCRIPTS/palmrungui
===================================================================
--- /palm/trunk/SCRIPTS/palmrungui	(revision 2413)
+++ /palm/trunk/SCRIPTS/palmrungui	(revision 2413)
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+#--------------------------------------------------------------------------------#
+# This file is part of PALM.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2014  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id: mrungui 2316 2017-07-20 07:53:42Z maronga $
+# Renamed to palmrungui
+# 
+# 2316 2017-07-20 07:53:42Z maronga
+# Modified for python version of mrungui
+# 
+# 1842 2016-04-07 19:24:16Z raasch
+#
+# 1841 2016-04-07 19:14:06Z raasch
+# script now running under bash
+#
+# 1046 2012-11-09 14:38:45Z maronga
+# code put under GPL (PALM 3.9)
+#
+# 793 2011-12-12 15:15:24Z maronga
+# Initial revision
+#
+# Description:
+# ------------
+# Starting script for palmrungui
+#------------------------------------------------------------------------------#
+
+if which palmrungui.py >/dev/null; then
+   palmrungui.py > /dev/null 2>&1
+else
+   echo "  +++ palmrungui not found."
+fi
+
+
+
+
Index: /palm/trunk/SCRIPTS/palmrungui.py
===================================================================
--- /palm/trunk/SCRIPTS/palmrungui.py	(revision 2413)
+++ /palm/trunk/SCRIPTS/palmrungui.py	(revision 2413)
@@ -0,0 +1,1122 @@
+#!/usr/bin/python -B
+# -*- coding: utf-8 -*-
+#--------------------------------------------------------------------------------#
+# This file is part of PALM.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2017  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Renamed to palmrungui and adapted for use with palmrun instead of mrun.
+# 
+# 2316 2017-07-20 07:53:42Z maronga
+# Initial revision in python
+# 
+# 
+#
+# Description:
+# ------------
+# Graphical user interface for the palmrun script.
+# @author Felix Gaschler
+# @author BjÃ¶rn Maronga (maronga@muk.uni-hannover.de)
+#
+# Instructions:
+# -------------
+#
+#------------------------------------------------------------------------------!
+
+import sys
+import subprocess
+from PyQt4 import QtCore, QtGui, uic
+from PyQt4.QtCore import QProcess
+from time import strftime
+import os
+
+
+# Determine PALM directories
+try: 
+   devnull = open(os.devnull, 'w')
+   out = subprocess.check_output("echo $PALM_BIN", shell=True, stderr=subprocess.STDOUT)
+   palm_bin = out.rstrip()
+   palm_dir = out.split("palm")[0] + "palm/" + out.split("palm")[1].split("/")[1]
+   out = None
+except:   
+   print "Error. $PALM_BIN is not set."
+   raise SystemExit
+
+
+palmrunline = ""
+name_of_file = os.path.basename(__file__)
+
+palmrungui_path = os.path.realpath(__file__)
+version_path = palmrungui_path[:len(palmrungui_path)-14-len(name_of_file)-1]
+
+Ui_MainWindow = uic.loadUiType("%s/palmrungui_files/mainwindow.ui" % (palm_bin))[0]
+Ui_helpDialog = uic.loadUiType("%s/palmrungui_files/help.ui" % (palm_bin))[0]
+Ui_aboutDialog = uic.loadUiType("%s/palmrungui_files/about.ui" % (palm_bin))[0]
+
+class HelpDialog(QtGui.QDialog,Ui_helpDialog):
+    def __init__(self, parent=None):
+        super(HelpDialog,self).__init__()
+        self.setupUi(self)
+        
+class AboutDialog(QtGui.QDialog,Ui_aboutDialog):
+    def __init__(self, parent=None):
+        super(AboutDialog,self).__init__()
+        self.setupUi(self)        
+
+class Mainwindow(QtGui.QMainWindow, Ui_MainWindow):
+    def __init__(self, parent=None):
+        super(Mainwindow, self).__init__()
+        
+        self.setupUi(self)
+        self.recent_jobs(10)
+        commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
+        commandline.setText("")
+        
+        self.tabWidget.setCurrentIndex(0)  
+        
+        filename = "%s/.palmrun.gui.default" % (version_path)  
+        if os.path.exists(filename):
+            pass
+        else:
+            return
+        
+        file = open(filename, "r")
+        if ( file is not None ):
+            # File opened successfully
+            palmrunline = file.readline()
+            #if neue zeile zeichen
+            palmrunline = palmrunline[:len(palmrunline)-1]
+            file.close() 
+
+        # In case a palmrunline was found, load it to mainwindow
+        if ( palmrunline != ""):
+            palmrunline = palmrunline[17:] 
+            commandline.setText(palmrunline)
+            self.setup_gui(palmrunline)
+                      
+        
+    # starts xterm with palmrun commandline
+    #######################################
+    def startpalmrun(self):
+        palmrunline = str(self.groupBox.findChild(QtGui.QLineEdit,"commandline").text())
+        userline = str(self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text())
+        
+        # Check for empty line
+        palmrunline_save = palmrunline;
+        if (userline != ""):
+            palmrunline = "%s %s" % (palmrunline,userline)
+        history_line = palmrunline       
+        
+        # Disable the main window
+        self.tabWidget.setEnabled(False)
+        self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False)
+        self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("wait...")      
+        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText("Executing palmrun in xterm...")        
+        
+        # Wait until all commands have been executed (ugly) ?
+        #for i in range(0,21):
+        #    qApp->processEvents()       
+        
+        # Start xterm as QProcess
+        palmrun = QProcess()
+        palmrun.setProcessChannelMode(QProcess.MergedChannels) # mergedChannels
+        palmrun.setWorkingDirectory(version_path)
+    
+        geomet = self.frameGeometry()
+        
+        posx = geomet.x()+geomet.width()
+        posy = geomet.y()
+      
+        s = " -title \"Executing palmrun...\" -fa \"Monospace\" -fs 11 -geometry \"80x38+%d+%d\" -e \"" % (posx,posy)
+        palmrunline = "%s%s;echo -n '--> Press enter to continue...';read yesno\"</dev/stdin" % (s, palmrunline.replace("\"","\'"))
+        
+        mString = "xterm %s" % (palmrunline)
+        palmrun.start(mString);
+    
+        if( palmrun.waitForStarted() is False ):
+            return
+        
+        # Wait until palmrun has finished or wait for 200 minutes
+        palmrun.waitForFinished(3600000);        
+        
+        # Jobs has been submitted or aborted. Continuing...
+        # Save the palmrun command to history file
+        filename = "%s/.palm.history" % (version_path)
+        tmstamp = strftime("%Y/%m/%d %H:%M")
+    
+        file = open(filename,"a")
+        s = "%s %s\n" % (tmstamp,history_line)
+        file.write(s)
+        file.close()              
+        
+        # Enable main window again
+        self.tabWidget.setEnabled(True)
+        self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True)
+        self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("Start palmrun") 
+        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline_save);
+        
+        # Reload recent jobs
+        self.recent_jobs(10)
+        
+        
+    # loads recent jobs 
+    ######################################
+    def recent_jobs(self, number):
+        fileDir = "%s/.palm.history" % (version_path)
+        if os.path.exists(fileDir):
+            pass
+        else:
+            return
+        
+        file = open(fileDir,"r")
+        history = file.readlines()
+        tmphistory = list()
+        file.close();
+        j = 0;
+
+        list_jobname = self.group_job.findChild(QtGui.QListWidget,"list_jobname")
+        list_jobname.clear()
+
+        # Read history entries and append to recent job list
+        i=len(history)-1
+        count = 0
+        while i>=0 and count<10:
+            timestamp = history[i][:16]
+            listitem = history[i][17:len(history[i])-1]
+            listitem = filter(None,listitem.split(" -d"))[1]
+            listitem = filter(None,listitem.split(" -"))[0]
+            listitem = listitem.replace(" ","");
+            matchitems = list_jobname.findItems(listitem, QtCore.Qt.MatchExactly)
+
+            if ( len(matchitems) == 0 ):
+                list_jobname.addItem(listitem);
+                s = "%s (%s)" % (listitem,timestamp)
+                tmphistory.append(s);
+                count = count +1
+                j = j+1
+                
+            if ( j == number ):
+                break
+            i = i-1
+            
+        # Send to list
+        list_jobname.clear();
+        
+        i=0
+        while i<len(tmphistory):
+            list_jobname.addItem(tmphistory[i]);
+            i = i+1
+            
+
+    # Enables coupled settings
+    ###############################
+    def enable_coupled(self):
+        coupledState = self.group_job.findChild(QtGui.QComboBox, "drop_job").currentText()
+        group = self.group_execution.findChild(QtGui.QGroupBox, "group_coupled")
+        
+        if (coupledState == "Restart run (coupled atmosphere ocean)" or coupledState == "Initial run (coupled atmosphere ocean)"):
+            self.group_coupled.setEnabled(True)
+        else: 
+            self.group_coupled.setEnabled(False)
+            
+            
+    # select a job via "select"-button
+    ################################
+    def choosejob(self):
+        jobDir = "%s/JOBS" % (version_path)        
+
+        # Pick a job from dialog
+        filename = QtGui.QFileDialog.getExistingDirectory(self, "Open a folder", jobDir, QtGui.QFileDialog.ShowDirsOnly)
+        
+        # If a file was selected, load it into mainwindow
+        if ( filename != ""):
+	    jobname = os.path.basename(unicode(filename))
+            self.group_job.findChild(QtGui.QLineEdit,"line_jobname").setText(jobname)
+            self.group_job.findChild(QtGui.QListWidget,"list_jobname").clearSelection()
+
+            # Change palmrunline accordingly
+            self.change_commandline("d","")
+            self.change_commandline("a","")
+            return
+        else:
+            return
+    
+        
+    # select a job via doubleclick from list
+    #################################
+    def choosejob_list(self):
+        #  Get selected item from list
+        list_jobname = self.group_job.findChild(QtGui.QListWidget,"list_jobname")
+        filename = str(list_jobname.currentItem().text())
+        itemint = list_jobname.currentRow()
+    
+        # Reload list
+        self.setupUi(self)
+        self.recent_jobs(10)
+    
+        # Set selected item to jobname
+        list_jobname.item(itemint).setSelected(True);
+    
+        timestamp = filename[len(filename)-17:][:16]
+        jobname = filename[:len(filename) - 19];
+    
+        fileDir = "%s/.palm.history" % (version_path)
+        file = open(fileDir,"r")
+        history = file.readlines()
+        tmphistory = list()
+        file.close();        
+    
+        i = len(history)
+        while i>=1:
+            listitem = history[i-1][17:len(history[i-1])-1]
+            listitem = filter(None,listitem.split(" -d"))[1]
+            listitem = filter(None,listitem.split(" -"))[0]
+            listitem = listitem.replace(" ","");                
+
+            # Select command line with correct timestamp and jobname
+            if (history[i-1][:16] == timestamp and listitem == jobname):
+                palmrunline = history[i-1]
+                palmrunline = palmrunline[17:]
+                palmrunline = palmrunline[:len(palmrunline)-1]
+                self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline);
+                self.setup_gui(palmrunline);
+                return
+            i = i-1
+                
+    # Change run identifer (initial, restart, coupled...)
+    ######################################################
+    def change_rc_list(self):
+        drop_job = self.group_job.findChild(QtGui.QComboBox,"drop_job").currentText()    
+        self.change_commandline("a","")
+    
+        # Enable PE distribution for atmosphere/ocean
+        if ( drop_job == "Restart run (coupled atmosphere ocean)" or drop_job == "Initial run (coupled atmosphere ocean)"):
+            drop_atmos = self.group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").text() 
+            drop_ocean = self.group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").text() 
+            s = "%s %s" % (drop_atmos,drop_ocean)
+            self.change_commandline("Y",s)
+    
+    
+        if ( drop_job == "Restart run" or drop_job == "Restart run (coupled atmosphere ocean)"):
+           self.change_commandline("d","")
+
+        # Check of ocean runs
+        else:
+            self.delete_commandline("Y")
+            if (drop_job == "Precursor run (ocean)"):
+                self.activate_flag("y")
+            else:
+                self.deactivate_flag("y")
+            
+    # changes commandline depending on parameters
+    ##########################################################      
+    def change_commandline(self, id_str, fwt_str):
+        fwt_str = str(fwt_str) 
+        initialize = False
+        palmrunline = str(self.groupBox.findChild(QtGui.QLineEdit,"commandline").text())    
+        s = " -%s " % (id_str)
+        splitline = filter(None,palmrunline.split(s))
+
+        if ( len(splitline) == 0 ):
+                splitline.append("palmrun")
+                splitline.append(" ")
+                initialize = True
+
+        elif ( len(splitline) == 1 ):
+            splitline.append(" ")
+        
+        param = splitline[1].split("-")
+    
+        # Change in parameter "d" (jobname)
+        if (id_str == "d"):
+            filename = str(self.group_job.findChild(QtGui.QLineEdit,"line_jobname").text())
+            s = filename.split("JOBS/") 
+            param[0] = s[len(s)-1]
+     
+            if ( initialize == True ):#and self.group_runcontrol.isEnabled() == True ):
+                self.group_runcontrol.setEnabled(True)
+                self.group_execution.setEnabled(True)
+                self.group_job.findChild(QtGui.QComboBox,"drop_job").setEnabled(True)
+                self.group_advanced.setEnabled(True)
+                self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True) 
+                self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(True)
+            
+            elif ( param[0] == ""):            
+                self.group_runcontrol.setEnabled(False)
+                self.group_execution.setEnabled(False)
+                self.group_job.findChild(QtGui.QComboBox,"drop_job").setEnabled(False)
+                self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False) 
+                self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(False)
+                self.group_advanced.setEnabled(False)
+                self.delete_commandline("d")
+                self.change_commandline("a","remove")
+                self.group_job.findChild(QtGui.QLabel,"label_usercode").setText("")
+                return 1 
+            
+            else:
+                # Check if user code is available
+                usercode = "%s/USER_CODE/%s" % (version_path,param[0])
+                
+                if (os.path.exists(usercode) is True): 
+                    self.group_job.findChild(QtGui.QLabel,"label_usercode").setText("<font color='green'>User code found.</font>")
+               
+                else:               
+                    self.group_job.findChild(QtGui.QLabel,"label_usercode").setText("<font color='red'>Warning: no user code found!</font>")
+               
+
+                # Check if _pdf file is available, otherwise notice user
+                drop_job = self.group_job.findChild(QtGui.QComboBox,"drop_job").currentText()
+                if ( self.group_execution.findChild(QtGui.QCheckBox,"check_restarts").checkState() == 2 or 
+                     drop_job == "Restart run" or drop_job == "Restart run (coupled atmosphere ocean)"     ):
+
+                    jobname = self.group_job.findChild(QtGui.QLineEdit, "line_jobname").text()
+                    restartfile = "%s/JOBS/%s/INPUT/%s_p3df" % (version_path,jobname,jobname)
+
+                    if (os.path.exists(restartfile) == True):                  
+                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("")
+               
+
+                        if ( drop_job == "Restart run (coupled atmosphere ocean)" ):
+		            restartfileo = "%s/JOBS/%s/INPUT/%s_p3dof" % (version_path,jobname,jobname)
+                            if (os.path.exists(restartfileo) == True):                  
+                                self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("hooo")
+                  
+                            else:       
+                                self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3dof file found!</font>")   
+               
+                    else:       
+                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3df file found!</font>")
+         
+               
+                        
+                        
+                self.group_runcontrol.setEnabled(True)
+                self.group_execution.setEnabled(True)
+                self.drop_job.setEnabled(True)
+                self.group_advanced.setEnabled(True)
+                   
+        # Change in parameter "a" (run control list)
+        elif (id_str == "a"): 
+            status_ts = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_ts").checkState()
+            status_pr = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_pr").checkState()
+            status_xy = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_xy").checkState()
+            status_xz = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_xz").checkState()
+            status_yz = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_yz").checkState()
+            status_3d = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_3d").checkState()
+            status_ma = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_ma").checkState()
+            status_sp = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_sp").checkState()
+            status_pts = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_pts").checkState()
+            status_prt = self.group_runcontrol.findChild(QtGui.QCheckBox,"check_prt").checkState()
+    
+            drop_job = self.group_job.findChild(QtGui.QComboBox,"drop_job").currentText()
+            rc_flag = "#"
+    
+            if (drop_job == "Initial run"):
+                rc_flag = "#"
+            
+            elif (drop_job == "Restart run"):            
+                rc_flag = "f"
+            
+            elif (drop_job == "Precursor run (atmosphere)"):            
+                rc_flag = "#"
+            
+            elif (drop_job == "Precursor run (ocean)"):            
+                rc_flag = "o#"
+
+            elif (drop_job == "Initial run (coupled atmosphere ocean)"):            
+                rc_flag = "#"
+            
+            elif (drop_job == "Restart run (coupled atmosphere ocean)"):            
+                rc_flag = "f"
+            
+            param[0] = "\"d3%s" % (rc_flag)
+    
+            if (status_ts == 2):
+                param[0] = "%s ts%s" % (param[0],rc_flag)
+            
+            if (status_pr == 2):
+                param[0] = "%s pr%s" % (param[0],rc_flag)
+            
+            if (status_xy == 2):
+                param[0] = "%s xy%s" % (param[0],rc_flag)
+            
+            if (status_xz == 2):          
+                param[0] = "%s xz%s" % (param[0],rc_flag)
+            
+            if (status_yz == 2):    
+                param[0] = "%s yz%s" % (param[0],rc_flag)
+            
+            if (status_3d == 2):     
+                param[0] = "%s 3d%s" % (param[0],rc_flag)
+            
+            if (status_ma == 2):
+                param[0] = "%s ma%s" % (param[0],rc_flag)
+            
+            if (status_sp == 2):
+                param[0] = "%s sp%s" % (param[0],rc_flag)
+            
+            if (status_prt == 2):
+                param[0] = "%s prt%s" % (param[0],rc_flag)
+            
+            if (status_pts == 2):
+                param[0] = "%s pts%s" % (param[0],rc_flag)
+            
+    
+            if (drop_job == "Restart run (coupled atmosphere ocean)" or drop_job == "Initial run (coupled atmosphere ocean)"):
+                if (rc_flag == "#"):
+                   rc_flag = "o#"
+                else:
+                   rc_flag = "of"
+
+                param[0] = "%s d3%s" % (param[0],rc_flag)
+    
+                if (status_ts == 2):
+                    param[0] = "%s ts%s" % (param[0],rc_flag)
+                
+                if (status_pr == 2):                
+                    param[0] = "%s pr%s" % (param[0],rc_flag)
+                
+                if (status_xy == 2):
+                    param[0] = "%s xy%s" % (param[0],rc_flag)
+                
+                if (status_xz == 2):   
+                    param[0] = "%s xz%s" % (param[0],rc_flag)
+                
+                if (status_yz == 2):
+                    param[0] = "%s yz%s" % (param[0],rc_flag)
+                
+                if (status_3d == 2):
+                    param[0] = "%s 3d%s" % (param[0],rc_flag)
+                
+                if (status_ma == 2):
+                    param[0] = "%s ma%s" % (param[0],rc_flag)
+                
+                if (status_sp == 2):               
+                    param[0] = "%s sp%s" % (param[0],rc_flag)
+                
+                if (status_prt == 2):
+                    param[0] = "%s prt%s" % (param[0],rc_flag)
+                
+                if (status_pts == 2):
+                    param[0] = "%s pts%s" % (param[0],rc_flag)
+
+            status_restarts = self.group_execution.findChild(QtGui.QCheckBox,"check_restarts").checkState()
+
+            if (status_restarts == 2):
+                param[0]="%s restart" % (param[0])
+    
+                # Check if _p3df file is available, otherwise notice user
+                if (status_restarts == 2):
+                    jobname = str(self.group_job.findChild(QtGui.QLineEdit, "line_jobname").text())[len(version_path)+len("/JOBS/"):]
+                    restartfile = "%s/JOBS/%s/INPUT/%s_p3df" % (version_path,jobname,jobname)
+                    
+                    if (os.path.exists(restartfile) == True):                   
+                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("")
+                   
+                    else:                   
+                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3df file found!</font>")
+
+            else:  
+                self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("")
+
+            status_cycfill = self.group_execution.findChild(QtGui.QCheckBox,"check_cycfill").checkState()
+    
+            if (status_cycfill == 2):            
+                param[0]="%s cycfill" % (param[0])
+
+            param[0]="%s\"" % (param[0])
+    
+            if ( fwt_str == "remove"):            
+                self.delete_commandline(id_str)
+                return 1
+            
+            else:            
+                self.button_start.setEnabled(True)
+                self.action_save.setEnabled(True)
+
+        # Change in any other parameter
+        else:
+            if ( fwt_str != ""):            
+                param[0] = "\"%s\"" % (fwt_str)
+            
+            else:            
+                self.delete_commandline(id_str)
+                return 1
+                        
+        # Join the new palmrunline
+        splitline[1]= " -".join(param)
+                
+                
+        s = " -%s " % (id_str)
+        newpalmrunline = s.join(splitline)
+    
+        # Pr the new palmrunline to mainwindow
+        newpalmrunline = newpalmrunline.replace("  "," ")
+        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(newpalmrunline)
+
+    # change lineinput depending on sender
+    ###################################################################################
+    def change_lineinput(self):
+        if ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit, "line_host") ):
+            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_host").text()
+            self.change_commandline("h",tmptext)
+
+        elif ( self.sender() == self.group_job.findChild(QtGui.QLineEdit, "line_jobname") ):
+            tmptext = self.group_job.findChild(QtGui.QLineEdit,"line_jobname").text()
+            self.change_commandline("d",tmptext)
+
+        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_q")):
+            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_q").text()
+            self.change_commandline("q",tmptext)
+        
+        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_account")):
+            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_account").text()
+            self.change_commandline("u",tmptext)
+        
+        elif ( self.sender() ==  self.group_execution.findChild(QtGui.QLineEdit,"line_pe")):
+            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_pe").text()
+            self.change_commandline("X",tmptext)
+        
+        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_tpn")):
+            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_tpn").text()
+            self.change_commandline("T",tmptext)
+                
+        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_time")):
+            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_time").text()
+            self.change_commandline("t",tmptext)
+        
+        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_M")):
+            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_M").text()
+            self.change_commandline("M",tmptext)
+        
+        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_m")):
+            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_m").text()
+            self.change_commandline("m",tmptext)
+        
+        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_D")):
+            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_D").text()
+            self.change_commandline("D",tmptext)
+        
+        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_c")):
+            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_c").text()
+            if ( tmptext == ".palmgui.config"):
+                tmptext = ""
+            self.change_commandline("c",tmptext)
+        
+        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_s")):
+            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_s").text()
+            self.change_commandline("s",tmptext)
+                
+        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_w")):
+            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_w").text()
+            self.change_commandline("w",tmptext)
+        
+        elif ( self.sender() == self.group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos") or 
+               self.sender() == self.group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean")):
+            t1 = self.group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").text()
+            t2 = self.group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").text()            
+            tmptext = "%s %s" % (t1,t2)
+            
+            self.change_commandline("Y",tmptext)
+
+            # try catch sowas in der art
+            pe1 = 0
+            pe2 = 0
+            
+            try:
+                pe1 = int(t1)
+            except ValueError:            
+                pass
+                
+            try:
+                pe2 = int(t2)
+            except ValueError:
+                pass
+                
+            PE_total = pe1+pe2   
+            self.group_execution.findChild(QtGui.QLineEdit,"line_pe").setText(str(PE_total))
+            self.change_commandline("X",str(PE_total))
+          
+    # deletes parameter from commandline
+    ##################################################################################### 
+    def delete_commandline(self, id_str):   
+        # Read palmrunline
+        commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
+        palmrunline = str(commandline.text())
+        s = " -%s" % (id_str)
+        splitline = filter(None,palmrunline.split(s))
+        
+        if ( len(splitline) == 1):
+            return 1
+        else:
+            param = splitline[1].split("-")
+            param[0] = ""
+            splitline[1]= " -".join(param)
+            newpalmrunline = "".join(splitline)
+            newpalmrunline = newpalmrunline.replace("  "," ")
+    
+            # Print new palmrunline to screen
+            commandline.setText(newpalmrunline)
+        
+    # controls flags
+    ###################################################################################
+    def check_flags(self):
+        status = self.group_execution.findChild(QtGui.QCheckBox,"check_delete_tmp_files" ).checkState()
+        if (status == 2):      
+            self.activate_flag("B")
+        else:
+            self.deactivate_flag("B")
+    
+        status = self.group_execution.findChild(QtGui.QCheckBox,"check_verbose" ).checkState()
+        if (status == 2):
+            self.activate_flag("v") 
+        else:
+            self.deactivate_flag("v")
+        
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_b" ).checkState() 
+        if (status == 2):
+            self.activate_flag("b")
+        else:
+            self.deactivate_flag("b")
+    
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_F" ).checkState()   
+        if (status == 2):
+            self.activate_flag("F")
+        else:
+            self.deactivate_flag("F")
+            
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_I" ).checkState() 
+        if (status == 2):
+            self.activate_flag("I")
+        else:
+            self.deactivate_flag("I")
+
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_k" ).checkState() 
+        if (status == 2):
+            self.activate_flag("k")
+        else:
+            self.deactivate_flag("k")
+
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_O" ).checkState() 
+        if (status == 2):
+            self.activate_flag("O")
+        else:
+            self.deactivate_flag("O")
+
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_x" ).checkState() 
+        if (status == 2):
+            self.activate_flag("x")
+        else:
+            self.deactivate_flag("x")
+        
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_Z" ).checkState() 
+        if (status == 2):
+            self.activate_flag("Z")
+        else:
+            self.deactivate_flag("Z")
+        
+    # changes flag to parameter 
+    ##################################################################################    
+    def activate_flag(self, id_str):
+        commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
+        palmrunline = str(commandline.text())
+        s = " -%s" % (id_str)
+        splitline = filter(None,palmrunline.split(s))
+        
+        if ( len(splitline) == 1):
+            splitline.append("")
+            s = " -%s" % (id_str)
+            newpalmrunline = s.join(splitline)
+            newpalmrunline = newpalmrunline.replace("  "," ")
+            commandline.setText(newpalmrunline)                
+        
+    # deletes flag in commandline
+    ####################################################################################    
+    def deactivate_flag(self, id_str):
+        commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
+        palmrunline = str(commandline.text())
+        s = " -%s" % (id_str)
+        splitline = filter(None,palmrunline.split(s))
+ 
+        newpalmrunline = "".join(splitline)
+        newpalmrunline = newpalmrunline.replace("  "," ")
+        commandline.setText(newpalmrunline)     
+
+    # Clears window 
+    #################################################################################
+    def reset_window(self):
+        self.setupUi(self)
+        self.tabWidget.setCurrentIndex(0)
+        self.recent_jobs(10)
+        
+    # Safes current commandline and user Parameters to .sav file
+    #################################################################################
+    def save_to_file(self):
+        user_string = self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text()
+        cmd_string = self.groupBox.findChild(QtGui.QLineEdit,"commandline").text()
+        
+        string_to_file = cmd_string
+        if (user_string != ""): 
+            string_to_file = "%s%s" % (string_to_file,user_string)
+            
+        #filename = QtGui.QInputDialog.getText(self, "Save File naming Dialog", "Insert filename", QtGui.QLineEdit.Normal)
+        filename = str(QtGui.QFileDialog.getSaveFileName(self, "Save File","filename.sav"))
+        extension = ".sav"
+        filename = "%s%s" % (filename, "")
+        tmstamp = strftime("%Y/%m/%d %H:%M")
+        
+        file = open(filename,"w")
+        s = "%s %s" % (tmstamp, string_to_file)
+        file.write(s)
+        file.close()
+        
+    # Safes current commandline and user parameters to default file
+    ################################################################################
+    def save_default(self):
+        user_string = self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text()
+        cmd_string = self.groupBox.findChild(QtGui.QLineEdit,"commandline").text()
+        
+        string_to_file = cmd_string
+        if (user_string != ""): 
+            string_to_file = "%s%s" % (string_to_file,user_string)
+        
+        filename ="%s/.palmgui.default" % (version_path)
+        tmstamp = strftime("%Y/%m/%d %H:%M")
+        
+        file = open(filename,"w")
+        s = "%s %s" % (tmstamp, string_to_file)
+        file.write(s)
+        file.close()        
+
+    # Execute command which starts jobmanager (start palm_jm)
+    #######################################################
+    def start_jobmanager(self):
+        subprocess.Popen(["nohup","palm_jm",">>","/dev/null", "2>&1","&"])        
+        
+    # Executes command which starts watchdog (start palm_wd)
+    ########################################################
+    def start_watchdog(self):
+        subprocess.Popen(["nohup","palm_wd",">>","/dev/null", "2>&1","&"])
+
+    # Opens "help" dialog
+    #################################
+    def help(self):        
+        dialog = HelpDialog()
+        dialog.exec_()
+
+    # Opens "about" dialog
+    ##################################
+    def about_gui(self):
+        dialog = AboutDialog()
+        dialog.exec_()
+
+    # commandline to buttons etc
+    ##############################
+    def setup_gui(self, palmrun_str):  
+        #  Some initial settings
+        user = "" 
+        coupled_run = False 
+        ocean_run   = False 
+        nojob       = False 
+
+        #Split parameters in palmrunline
+        splitline = palmrun_str.split(" -")
+        
+        if ( splitline[0] != "palmrun"):
+            return 1
+
+        else:
+            self.group_job.setEnabled(True) 
+
+        # Loop for all parameters in palmrunline
+        i = len(splitline)-1
+        while i >= 1:
+
+            # Determine parameter
+            splitparameter = splitline[i].split(" ")
+
+            parameter = splitparameter[0] 
+            splitparameter.pop(0)
+            options = " ".join(splitparameter) 
+            options = options.replace("\"","") 
+
+            # Check for suitable switch
+            if ( parameter == "d"):
+              
+                if ( options != ""):
+                    self.group_job.findChild(QtGui.QLineEdit,"line_jobname").setText(options) 
+                    nojob = False 
+                
+                else:                 
+                    nojob = True 
+                
+            elif ( parameter == "h"):
+                self.group_execution.findChild(QtGui.QLineEdit,"line_host").setText(options) 
+             
+            elif ( parameter == "q"):
+                self.group_execution.findChild(QtGui.QLineEdit,"line_q").setText(options) 
+             
+            elif ( parameter == "u"):
+                self.group_execution.findChild(QtGui.QLineEdit,"line_account").setText(options) 
+             
+            elif ( parameter == "X"):
+                self.group_execution.findChild(QtGui.QLineEdit,"line_pe").setText(options) 
+             
+            elif ( parameter == "T"):
+                self.group_execution.findChild(QtGui.QLineEdit,"line_tpn").setText(options) 
+             
+            elif ( parameter == "t"):
+                self.group_execution.findChild(QtGui.QLineEdit,"line_time").setText(options) 
+             
+            elif ( parameter == "B"):
+                self.group_execution.findChild(QtGui.QCheckBox,"check_delete_tmp_files").setChecked(True) 
+             
+            elif ( parameter == "v"):
+                self.group_execution.findChild(QtGui.QCheckBox,"check_verbose").setChecked(True) 
+                          
+            elif ( parameter == "b"): 
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_b").setChecked(True)  
+             
+            elif ( parameter == "F"):
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_F").setChecked(True) 
+             
+            elif ( parameter == "I"):
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_I").setChecked(True) 
+             
+            elif ( parameter == "k"):
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_k").setChecked(True) 
+             
+            elif ( parameter == "O"): 
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_O").setChecked(True) 
+             
+            elif ( parameter == "x"):              
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_x").setChecked(True) 
+             
+            elif ( parameter == "Z"):
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_Z").setChecked(True) 
+               
+            elif ( parameter == "m"):
+                self.group_advanced.findChild(QtGui.QLineEdit,"line_m").setText(options) 
+             
+            elif ( parameter == "M"):
+                self.group_advanced.findChild(QtGui.QLineEdit,"line_M").setText(options) 
+                          
+            elif ( parameter == "D"):
+                self.group_advanced.findChild(QtGui.QLineEdit,"line_D").setText(options) 
+             
+            elif ( parameter == "c"):
+                self.group_advanced.findChild(QtGui.QLineEdit,"line_c").setText(options) 
+                          
+            elif ( parameter == "s"):
+                self.group_advanced.findChild(QtGui.QLineEdit,"line_s").setText(options) 
+             
+            elif ( parameter == "w"):
+                self.group_advanced.findChild(QtGui.QLineEdit,"line_w").setText(options) 
+             
+
+            # Determine settings for coupled restart runs
+            elif ( parameter == "Y"):
+                optionssplit = options.split(" ") 
+                
+                group_coupled = self.group_execution.findChild(QtGui.QGroupBox,"group_coupled")
+                group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").setEnabled(True) 
+                group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").setEnabled(True) 
+                group_coupled.findChild(QtGui.QLabel,"label_coupled1").setEnabled(True) 
+                group_coupled.findChild(QtGui.QLabel,"label_coupled2").setEnabled(True) 
+                group_coupled.findChild(QtGui.QLabel,"label_coupled3").setEnabled(True) 
+                group_coupled.findChild(QtGui.QLabel,"label_coupling").setEnabled(True) 
+
+                if (optionssplit.count() == 2):
+                    group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").setEnabled(optionssplit[0]) 
+                    group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").setEnabled(optionssplit[1])
+                 
+                else:                  
+                    group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").setText("") 
+                    group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").setText("") 
+ 
+                 
+                coupled_run = True 
+            
+            elif ( parameter == "y"):              
+                self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(3) 
+             
+
+            # Determine settings for the run control list
+            elif ( parameter == "a"):
+              
+                optionssplit = options.split(" ") 
+
+                options_2 = None
+                options_all = None
+                
+                j = 0
+                while j < len(optionssplit):
+                 
+                    options_all = optionssplit[j] 
+                    options_2 = optionssplit[j][:2] 
+                    if (options_2 == "ts"):
+                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_ts").setChecked(True) 
+                    
+                    if (options_2 == "pr" and options_all[:3] is not "prt"):                  
+                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_pr").setChecked(True) 
+                    
+                    if (options_2 == "xy"):
+                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_xy").setChecked(True) 
+                    
+                    if (options_2 == "xz"):      
+                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_xz").setChecked(True) 
+                    
+                    if (options_2 == "yz"):     
+                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_yz").setChecked(True) 
+                    
+                    if (options_2 == "3d"):     
+                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_3d").setChecked(True) 
+                        
+                    if (options_2 == "ma"):             
+                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_ma").setChecked(True) 
+                    
+                    if (options_2 == "sp"):       
+                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_sp").setChecked(True) 
+                    
+                    if (options_all[:3] == "prt"):      
+                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_prt").setChecked(True) 
+                    
+                    if (options_all[:3] == "pts"):     
+                        self.group_runcontrol.findChild(QtGui.QCheckBox,"check_pts").setChecked(True) 
+                    
+                    if (options_2 == "d3"):       
+                        if (options_all[:3][:-1] == "#"):
+                            self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(0) 
+                        
+                        elif (options_all[:3][:-1] == "f"):
+                            self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(1) 
+                        
+                        elif (options_all[:3][:-1] == "o"):
+                            ocean_run = True 
+                        
+                    if (options_all == "restart"):
+                        self.group_execution.findChild(QtGui.QCheckBox,"check_restarts").setChecked(True) 
+                        # Check if _pdf file is available, otherwise notice user
+                        jobname = str(self.group_job.findChild(QtGui.QLineEdit,"line_jobname").text())[len(version_path)+len("/JOBS/"):] 
+                        
+                        restartfile = "%sJOBS/%s/INPUT/%s_p3df" % (version_path,jobname,jobname)
+                        if (os.path.exists(restartfile) == True):   
+                            self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("") 
+                       
+                        else:
+                            self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3df file \found!</font>") 
+                    j = j+1
+
+            # All unknown parameters are set as extra user parameters
+            else: 
+	        print parameter
+                user = "%s-%s \"%s\" " % (user,parameter,options)
+                splitline.removeAt(i) 
+
+            i = i-1
+        # Change drop box state in case of ocean precursor or coupled restart runs
+        if ( ocean_run == True ):
+            if ( coupled_run == True ):
+                self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(4) 
+            
+            else:
+                self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(3) 
+
+        if ( user != ""):
+            self.group_advanced.findChild(QtGui.QLineEdit,"line_user").setText(user)
+
+        # Join palmrunline and post it to mainwindow
+        palmrunline = " -".join(splitline) 
+        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline)          
+
+        # Disable mainwindow if no job was found, otherwise enable
+        if ( nojob == True ):
+            self.group_execution.setEnabled(False) 
+            self.group_runcontrol.setEnabled(False) 
+            self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False) 
+            self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(False) 
+            self.group_job.findChild(QtGui.QComboBox, "drop_job").setEnabled(False) 
+            self.group_advanced.setEnabled(False) 
+            self.check_advanced.setEnabled(False) 
+         
+        else:
+            self.group_execution.setEnabled(True) 
+            self.group_runcontrol.setEnabled(True) 
+            self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True) 
+            self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(True)
+            self.group_job.findChild(QtGui.QComboBox, "drop_job").setEnabled(True) 
+            self.group_advanced.setEnabled(True) 
+         
+        self.tabWidget.setCurrentIndex(0)
+         
+    # open saved commandline
+    ##################################
+    def open_from_file(self):
+        
+        # Select filename and open it
+        filename = QtGui.QFileDialog.getOpenFileName(self, "Open File","Save files (*.sav)") 
+        
+        if ( filename != ""):
+            file = open(filename, "r")
+          
+            if ( file is not None ):
+                # File opened successfully
+                palmrunline = file.read()
+                file.close() 
+    
+            # In case a palmrunline was found, load it to mainwindow
+            if ( palmrunline != ""):
+                palmrunline = palmrunline[17:] 
+                self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline) 
+                self.setup_gui(palmrunline)
+         
+    # open saved commandline   
+    ##################################
+    def open_last(self): 
+        # Select filename and open it
+        filename = "%s/.palm.history" % (version_path)
+        
+        if os.path.exists(filename):
+            pass
+        else:
+            return
+        
+        file = open(filename, "r")  
+        if ( file is not None ):
+            # File opened successfully
+            lines = file.readlines()
+            palmrunline = lines[len(lines)-1]
+            palmrunline = palmrunline[:len(palmrunline)-1]
+            file.close() 
+
+        # In case a palmrunline was found, load it to mainwindow
+        if ( palmrunline != ""):
+            palmrunline = palmrunline[17:len(palmrunline)] 
+            self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline) 
+            self.setup_gui(palmrunline)        
+        
+
+if __name__ == "__main__":
+    app = QtGui.QApplication(sys.argv)
+    window = Mainwindow()
+    window.show()
+    sys.exit(app.exec_())
Index: /palm/trunk/SCRIPTS/palmrungui_files/about.ui
===================================================================
--- /palm/trunk/SCRIPTS/palmrungui_files/about.ui	(revision 2413)
+++ /palm/trunk/SCRIPTS/palmrungui_files/about.ui	(revision 2413)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>about</class>
+ <widget class="QDialog" name="about">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>349</width>
+    <height>127</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>About palmrungui</string>
+  </property>
+  <widget class="QPushButton" name="button_ok">
+   <property name="geometry">
+    <rect>
+     <x>195</x>
+     <y>95</y>
+     <width>91</width>
+     <height>24</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Close</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_2">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>0</y>
+     <width>261</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="font">
+    <font>
+     <pointsize>16</pointsize>
+     <weight>75</weight>
+     <bold>true</bold>
+    </font>
+   </property>
+   <property name="text">
+    <string>palmrungui</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_5">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>60</y>
+     <width>261</width>
+     <height>36</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Visit http://palm-model.org</string>
+   </property>
+   <property name="alignment">
+    <set>Qt::AlignHCenter|Qt::AlignTop</set>
+   </property>
+   <property name="wordWrap">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_3">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>25</y>
+     <width>291</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="font">
+    <font>
+     <pointsize>12</pointsize>
+     <weight>75</weight>
+     <bold>true</bold>
+    </font>
+   </property>
+   <property name="text">
+    <string>A graphical user interface for palmrun</string>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>button_ok</sender>
+   <signal>clicked()</signal>
+   <receiver>about</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>80</x>
+     <y>197</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>196</x>
+     <y>204</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: /palm/trunk/SCRIPTS/palmrungui_files/help.ui
===================================================================
--- /palm/trunk/SCRIPTS/palmrungui_files/help.ui	(revision 2413)
+++ /palm/trunk/SCRIPTS/palmrungui_files/help.ui	(revision 2413)
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>child_help</class>
+ <widget class="QDialog" name="child_help">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>359</width>
+    <height>129</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <widget class="QLabel" name="label_2">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>5</y>
+     <width>171</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="font">
+    <font>
+     <pointsize>16</pointsize>
+     <weight>75</weight>
+     <bold>true</bold>
+    </font>
+   </property>
+   <property name="text">
+    <string>palmrungui help</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="button_ok">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>100</y>
+     <width>91</width>
+     <height>24</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Close</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_3">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>50</y>
+     <width>311</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>For help</string>
+   </property>
+   <property name="alignment">
+    <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+   </property>
+   <property name="wordWrap">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QTextBrowser" name="textBrowser">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="geometry">
+    <rect>
+     <x>70</x>
+     <y>40</y>
+     <width>261</width>
+     <height>31</height>
+    </rect>
+   </property>
+   <property name="font">
+    <font>
+     <italic>false</italic>
+     <underline>false</underline>
+     <kerning>false</kerning>
+    </font>
+   </property>
+   <property name="focusPolicy">
+    <enum>Qt::NoFocus</enum>
+   </property>
+   <property name="contextMenuPolicy">
+    <enum>Qt::NoContextMenu</enum>
+   </property>
+   <property name="acceptDrops">
+    <bool>false</bool>
+   </property>
+   <property name="layoutDirection">
+    <enum>Qt::LeftToRight</enum>
+   </property>
+   <property name="autoFillBackground">
+    <bool>false</bool>
+   </property>
+   <property name="frameShadow">
+    <enum>QFrame::Plain</enum>
+   </property>
+   <property name="lineWidth">
+    <number>0</number>
+   </property>
+   <property name="readOnly">
+    <bool>true</bool>
+   </property>
+   <property name="html">
+    <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://palm-model.org&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#006e28;&quot;&gt;visit official PALM web page&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+   </property>
+   <property name="acceptRichText">
+    <bool>true</bool>
+   </property>
+   <property name="openExternalLinks">
+    <bool>true</bool>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>button_ok</sender>
+   <signal>clicked()</signal>
+   <receiver>child_help</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>187</x>
+     <y>111</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>253</x>
+     <y>104</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: /palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui
===================================================================
--- /palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui	(revision 2413)
+++ /palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui	(revision 2413)
@@ -0,0 +1,2198 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="windowModality">
+   <enum>Qt::WindowModal</enum>
+  </property>
+  <property name="enabled">
+   <bool>true</bool>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>600</width>
+    <height>680</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>600</width>
+    <height>680</height>
+   </size>
+  </property>
+  <property name="maximumSize">
+   <size>
+    <width>600</width>
+    <height>680</height>
+   </size>
+  </property>
+  <property name="focusPolicy">
+   <enum>Qt::NoFocus</enum>
+  </property>
+  <property name="windowTitle">
+   <string>palmrungui</string>
+  </property>
+  <property name="iconSize">
+   <size>
+    <width>72</width>
+    <height>72</height>
+   </size>
+  </property>
+  <property name="toolButtonStyle">
+   <enum>Qt::ToolButtonIconOnly</enum>
+  </property>
+  <property name="animated">
+   <bool>false</bool>
+  </property>
+  <property name="documentMode">
+   <bool>false</bool>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <widget class="QGroupBox" name="groupBox">
+    <property name="enabled">
+     <bool>true</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>570</y>
+      <width>601</width>
+      <height>81</height>
+     </rect>
+    </property>
+    <property name="focusPolicy">
+     <enum>Qt::NoFocus</enum>
+    </property>
+    <property name="title">
+     <string>palmrun</string>
+    </property>
+    <property name="flat">
+     <bool>true</bool>
+    </property>
+    <widget class="QPushButton" name="button_exit">
+     <property name="geometry">
+      <rect>
+       <x>130</x>
+       <y>20</y>
+       <width>90</width>
+       <height>21</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Quit</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="button_start">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>20</y>
+       <width>120</width>
+       <height>21</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Start palmrun</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="button_clear">
+     <property name="geometry">
+      <rect>
+       <x>220</x>
+       <y>20</y>
+       <width>90</width>
+       <height>21</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Clear</string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="commandline">
+     <property name="enabled">
+      <bool>true</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>45</y>
+       <width>581</width>
+       <height>26</height>
+      </rect>
+     </property>
+     <property name="mouseTracking">
+      <bool>false</bool>
+     </property>
+     <property name="acceptDrops">
+      <bool>false</bool>
+     </property>
+     <property name="frame">
+      <bool>false</bool>
+     </property>
+     <property name="dragEnabled">
+      <bool>false</bool>
+     </property>
+     <property name="readOnly">
+      <bool>false</bool>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QTabWidget" name="tabWidget">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>5</y>
+      <width>591</width>
+      <height>556</height>
+     </rect>
+    </property>
+    <property name="sizePolicy">
+     <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+      <horstretch>0</horstretch>
+      <verstretch>0</verstretch>
+     </sizepolicy>
+    </property>
+    <property name="font">
+     <font>
+      <strikeout>false</strikeout>
+     </font>
+    </property>
+    <property name="focusPolicy">
+     <enum>Qt::NoFocus</enum>
+    </property>
+    <property name="autoFillBackground">
+     <bool>false</bool>
+    </property>
+    <property name="currentIndex">
+     <number>0</number>
+    </property>
+    <widget class="QWidget" name="tab">
+     <attribute name="title">
+      <string>Default</string>
+     </attribute>
+     <widget class="QGroupBox" name="group_job">
+      <property name="enabled">
+       <bool>true</bool>
+      </property>
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>541</width>
+        <height>331</height>
+       </rect>
+      </property>
+      <property name="font">
+       <font>
+        <weight>50</weight>
+        <bold>false</bold>
+       </font>
+      </property>
+      <property name="title">
+       <string notr="true">Job name</string>
+      </property>
+      <property name="flat">
+       <bool>true</bool>
+      </property>
+      <widget class="QLineEdit" name="line_jobname">
+       <property name="geometry">
+        <rect>
+         <x>90</x>
+         <y>30</y>
+         <width>221</width>
+         <height>25</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QPushButton" name="pushButton">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>30</y>
+         <width>71</width>
+         <height>24</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Select</string>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>65</y>
+         <width>101</width>
+         <height>16</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Recent 10 jobs:</string>
+       </property>
+      </widget>
+      <widget class="QListWidget" name="list_jobname">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>85</y>
+         <width>301</width>
+         <height>181</height>
+        </rect>
+       </property>
+      </widget>
+      <widget class="QComboBox" name="drop_job">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>270</y>
+         <width>291</width>
+         <height>25</height>
+        </rect>
+       </property>
+       <item>
+        <property name="text">
+         <string>Initial run</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Restart run</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Precursor run (atmosphere)</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Precursor run (ocean)</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Initial run (coupled atmosphere ocean)</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Restart run (coupled atmosphere ocean)</string>
+        </property>
+       </item>
+      </widget>
+      <widget class="QLabel" name="label_usercode">
+       <property name="enabled">
+        <bool>true</bool>
+       </property>
+       <property name="geometry">
+        <rect>
+         <x>310</x>
+         <y>267</y>
+         <width>271</width>
+         <height>31</height>
+        </rect>
+       </property>
+       <property name="font">
+        <font>
+         <weight>75</weight>
+         <bold>true</bold>
+        </font>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+     </widget>
+     <widget class="QGroupBox" name="group_runcontrol">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="geometry">
+       <rect>
+        <x>320</x>
+        <y>0</y>
+        <width>201</width>
+        <height>281</height>
+       </rect>
+      </property>
+      <property name="title">
+       <string>Activation strings</string>
+      </property>
+      <property name="flat">
+       <bool>true</bool>
+      </property>
+      <widget class="QCheckBox" name="check_pr">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>45</y>
+         <width>87</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Profiles</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_3d">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>145</y>
+         <width>87</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>3D</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_xy">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>70</y>
+         <width>87</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>XY</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_ts">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>20</y>
+         <width>131</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Timeseries</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_ma">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>170</y>
+         <width>87</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Masks</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_sp">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>195</y>
+         <width>87</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Spectra</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_prt">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>220</y>
+         <width>87</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Particles</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_xz">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>95</y>
+         <width>87</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>XZ</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_yz">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>120</y>
+         <width>87</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>YZ</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_pts">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>240</y>
+         <width>151</width>
+         <height>36</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Particle timeseries</string>
+       </property>
+      </widget>
+     </widget>
+     <widget class="QGroupBox" name="group_execution">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>305</y>
+        <width>581</width>
+        <height>206</height>
+       </rect>
+      </property>
+      <property name="title">
+       <string>Execution</string>
+      </property>
+      <property name="flat">
+       <bool>false</bool>
+      </property>
+      <widget class="QLineEdit" name="line_q">
+       <property name="geometry">
+        <rect>
+         <x>330</x>
+         <y>30</y>
+         <width>111</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_2">
+       <property name="geometry">
+        <rect>
+         <x>270</x>
+         <y>25</y>
+         <width>51</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Queue:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_pe">
+       <property name="geometry">
+        <rect>
+         <x>80</x>
+         <y>55</y>
+         <width>141</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_3">
+       <property name="geometry">
+        <rect>
+         <x>40</x>
+         <y>55</y>
+         <width>31</width>
+         <height>16</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>PEs:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_tpn">
+       <property name="geometry">
+        <rect>
+         <x>330</x>
+         <y>80</y>
+         <width>111</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_4">
+       <property name="geometry">
+        <rect>
+         <x>230</x>
+         <y>75</y>
+         <width>91</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Tasks / node:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_account">
+       <property name="geometry">
+        <rect>
+         <x>330</x>
+         <y>55</y>
+         <width>111</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_5">
+       <property name="geometry">
+        <rect>
+         <x>260</x>
+         <y>55</y>
+         <width>61</width>
+         <height>16</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Account:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_6">
+       <property name="geometry">
+        <rect>
+         <x>0</x>
+         <y>80</y>
+         <width>71</width>
+         <height>16</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>CPU time:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_time">
+       <property name="geometry">
+        <rect>
+         <x>80</x>
+         <y>80</y>
+         <width>141</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_7">
+       <property name="geometry">
+        <rect>
+         <x>30</x>
+         <y>35</y>
+         <width>41</width>
+         <height>16</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Host:</string>
+       </property>
+       <property name="scaledContents">
+        <bool>false</bool>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_host">
+       <property name="geometry">
+        <rect>
+         <x>80</x>
+         <y>30</y>
+         <width>141</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="Line" name="line">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>105</y>
+         <width>571</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_restarts">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>120</y>
+         <width>121</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Allow restarts</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_delete_tmp_files">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>140</y>
+         <width>271</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Do not delete temporary directory at end</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_verbose">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>160</y>
+         <width>261</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>No prompt on confirmation (silent)</string>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_restart">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="geometry">
+        <rect>
+         <x>120</x>
+         <y>120</y>
+         <width>451</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="font">
+        <font>
+         <weight>75</weight>
+         <bold>true</bold>
+        </font>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_cycfill">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>180</y>
+         <width>261</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Use cyclic fill method</string>
+       </property>
+      </widget>
+     </widget>
+    </widget>
+    <widget class="QWidget" name="tab_2">
+     <attribute name="title">
+      <string>Advanced</string>
+     </attribute>
+     <widget class="QGroupBox" name="group_advanced">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>5</y>
+        <width>371</width>
+        <height>231</height>
+       </rect>
+      </property>
+      <property name="title">
+       <string>Advanced settings</string>
+      </property>
+      <property name="flat">
+       <bool>true</bool>
+      </property>
+      <widget class="QCheckBox" name="check_x">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>175</y>
+         <width>421</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-x  (tracing of palmrun for debug purposes)</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_O">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>150</y>
+         <width>421</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-O  (use OpenMP)</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_k">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>125</y>
+         <width>421</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-k  (keep data from previous run)</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_I">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>100</y>
+         <width>441</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-I  (archiving errors of previous batch-jobs will be ignored)</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_F">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>75</y>
+         <width>421</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-F (create remote job file only)</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_b">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>50</y>
+         <width>421</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-b  (batch-job on local machine)</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_Z">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>200</y>
+         <width>421</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-Z  (disable combine_plot_fields at the end of job)</string>
+       </property>
+      </widget>
+      <widget class="Line" name="line_2">
+       <property name="geometry">
+        <rect>
+         <x>0</x>
+         <y>220</y>
+         <width>581</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+      </widget>
+     </widget>
+     <widget class="QLabel" name="label_20">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>375</y>
+        <width>211</width>
+        <height>21</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>User parameters (no preview):</string>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+      </property>
+     </widget>
+     <widget class="QLineEdit" name="line_M">
+      <property name="geometry">
+       <rect>
+        <x>220</x>
+        <y>275</y>
+        <width>191</width>
+        <height>25</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_18">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>300</y>
+        <width>201</width>
+        <height>21</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Preprocessor directives (cpp):</string>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+      </property>
+     </widget>
+     <widget class="QLineEdit" name="line_w">
+      <property name="geometry">
+       <rect>
+        <x>220</x>
+        <y>350</y>
+        <width>191</width>
+        <height>25</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_17">
+      <property name="geometry">
+       <rect>
+        <x>-10</x>
+        <y>350</y>
+        <width>221</width>
+        <height>21</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Number of parallel I/O streams:</string>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_16">
+      <property name="geometry">
+       <rect>
+        <x>110</x>
+        <y>255</y>
+        <width>101</width>
+        <height>16</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Memory (MB):</string>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+      </property>
+     </widget>
+     <widget class="QLineEdit" name="line_s">
+      <property name="geometry">
+       <rect>
+        <x>220</x>
+        <y>325</y>
+        <width>191</width>
+        <height>25</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+     <widget class="QLineEdit" name="line_user">
+      <property name="geometry">
+       <rect>
+        <x>220</x>
+        <y>375</y>
+        <width>191</width>
+        <height>25</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+     <widget class="QLineEdit" name="line_D">
+      <property name="geometry">
+       <rect>
+        <x>220</x>
+        <y>300</y>
+        <width>191</width>
+        <height>25</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_19">
+      <property name="geometry">
+       <rect>
+        <x>20</x>
+        <y>325</y>
+        <width>191</width>
+        <height>21</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Filenames to be compiled:</string>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+      </property>
+     </widget>
+     <widget class="QLineEdit" name="line_m">
+      <property name="geometry">
+       <rect>
+        <x>220</x>
+        <y>250</y>
+        <width>81</width>
+        <height>25</height>
+       </rect>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_21">
+      <property name="geometry">
+       <rect>
+        <x>40</x>
+        <y>275</y>
+        <width>171</width>
+        <height>20</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Makefile:</string>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+      </property>
+     </widget>
+     <widget class="QGroupBox" name="group_coupled">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>410</y>
+        <width>401</width>
+        <height>101</height>
+       </rect>
+      </property>
+      <property name="title">
+       <string/>
+      </property>
+      <widget class="QLineEdit" name="line_PE_ocean">
+       <property name="geometry">
+        <rect>
+         <x>100</x>
+         <y>70</y>
+         <width>111</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_coupled3">
+       <property name="geometry">
+        <rect>
+         <x>40</x>
+         <y>65</y>
+         <width>51</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Ocean:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_PE_atmos">
+       <property name="geometry">
+        <rect>
+         <x>100</x>
+         <y>45</y>
+         <width>111</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+       <property name="frame">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_coupled2">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>45</y>
+         <width>81</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Atmosphere:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_coupled1">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>1</y>
+         <width>181</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="autoFillBackground">
+        <bool>false</bool>
+       </property>
+       <property name="text">
+        <string>Processor distribution</string>
+       </property>
+       <property name="scaledContents">
+        <bool>false</bool>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignJustify</set>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_coupled1_2">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>20</y>
+         <width>281</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="autoFillBackground">
+        <bool>false</bool>
+       </property>
+       <property name="text">
+        <string>(Coupled atmosphere-ocean runs only)</string>
+       </property>
+       <property name="scaledContents">
+        <bool>false</bool>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignJustify</set>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_coupling">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="geometry">
+        <rect>
+         <x>160</x>
+         <y>5</y>
+         <width>55</width>
+         <height>15</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+     </widget>
+    </widget>
+   </widget>
+  </widget>
+  <widget class="QToolBar" name="mainToolBar">
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+  </widget>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>600</width>
+     <height>21</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuStart">
+    <property name="geometry">
+     <rect>
+      <x>341</x>
+      <y>82</y>
+      <width>133</width>
+      <height>182</height>
+     </rect>
+    </property>
+    <property name="title">
+     <string>St&amp;art</string>
+    </property>
+    <property name="separatorsCollapsible">
+     <bool>false</bool>
+    </property>
+    <addaction name="action_open"/>
+    <addaction name="separator"/>
+    <addaction name="action_last"/>
+    <addaction name="action_save"/>
+    <addaction name="action_default"/>
+    <addaction name="action_quit"/>
+   </widget>
+   <widget class="QMenu" name="menuHelp">
+    <property name="title">
+     <string>He&amp;lp</string>
+    </property>
+    <addaction name="action_help"/>
+    <addaction name="action_about"/>
+   </widget>
+   <widget class="QMenu" name="menuTools">
+    <property name="title">
+     <string>&amp;Tools</string>
+    </property>
+    <addaction name="action_start_watchdog"/>
+    <addaction name="action_start_jobmanager"/>
+   </widget>
+   <addaction name="menuStart"/>
+   <addaction name="menuTools"/>
+   <addaction name="menuHelp"/>
+  </widget>
+  <action name="action_open">
+   <property name="text">
+    <string>&amp;Open from File</string>
+   </property>
+  </action>
+  <action name="action_save">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>&amp;Save to File</string>
+   </property>
+  </action>
+  <action name="action_last">
+   <property name="text">
+    <string>&amp;Load Last Job</string>
+   </property>
+  </action>
+  <action name="action_quit">
+   <property name="text">
+    <string>&amp;Quit</string>
+   </property>
+  </action>
+  <action name="action_help">
+   <property name="text">
+    <string>&amp;Help</string>
+   </property>
+  </action>
+  <action name="action_about">
+   <property name="text">
+    <string>&amp;About palmrungui</string>
+   </property>
+  </action>
+  <action name="action_default">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Save as &amp;Default</string>
+   </property>
+  </action>
+  <action name="actionCheck_parameter_file">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Check parameter file</string>
+   </property>
+  </action>
+  <action name="action_start_wd">
+   <property name="text">
+    <string>Start watchdog</string>
+   </property>
+  </action>
+  <action name="actionStart_job_manager">
+   <property name="text">
+    <string>Start job manager</string>
+   </property>
+  </action>
+  <action name="action_start_watchdog">
+   <property name="text">
+    <string>&amp;Watchdog</string>
+   </property>
+  </action>
+  <action name="action_start_jobmanager">
+   <property name="text">
+    <string>&amp;Job manager</string>
+   </property>
+  </action>
+ </widget>
+ <layoutdefault spacing="1" margin="11"/>
+ <tabstops>
+  <tabstop>pushButton</tabstop>
+  <tabstop>line_jobname</tabstop>
+  <tabstop>list_jobname</tabstop>
+  <tabstop>drop_job</tabstop>
+  <tabstop>line_host</tabstop>
+  <tabstop>line_q</tabstop>
+  <tabstop>line_account</tabstop>
+  <tabstop>line_pe</tabstop>
+  <tabstop>line_tpn</tabstop>
+  <tabstop>line_time</tabstop>
+  <tabstop>check_ts</tabstop>
+  <tabstop>check_pr</tabstop>
+  <tabstop>check_xy</tabstop>
+  <tabstop>check_xz</tabstop>
+  <tabstop>check_yz</tabstop>
+  <tabstop>check_3d</tabstop>
+  <tabstop>check_ma</tabstop>
+  <tabstop>check_sp</tabstop>
+  <tabstop>check_prt</tabstop>
+  <tabstop>check_pts</tabstop>
+  <tabstop>check_restarts</tabstop>
+  <tabstop>check_delete_tmp_files</tabstop>
+  <tabstop>check_verbose</tabstop>
+  <tabstop>button_start</tabstop>
+  <tabstop>button_clear</tabstop>
+  <tabstop>check_b</tabstop>
+  <tabstop>check_F</tabstop>
+  <tabstop>check_I</tabstop>
+  <tabstop>check_k</tabstop>
+  <tabstop>check_O</tabstop>
+  <tabstop>check_x</tabstop>
+  <tabstop>line_m</tabstop>
+  <tabstop>line_M</tabstop>
+  <tabstop>line_D</tabstop>
+  <tabstop>line_s</tabstop>
+  <tabstop>line_w</tabstop>
+  <tabstop>line_user</tabstop>
+  <tabstop>commandline</tabstop>
+  <tabstop>button_exit</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>button_exit</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>160</x>
+     <y>652</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>16</x>
+     <y>19</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>button_start</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>startpalmrun()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>73</x>
+     <y>652</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>14</x>
+     <y>63</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>drop_job</sender>
+   <signal>activated(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>enable_coupled()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>226</x>
+     <y>361</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>261</x>
+     <y>0</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>pushButton</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>choosejob()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>57</x>
+     <y>120</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>535</x>
+     <y>0</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>list_jobname</sender>
+   <signal>itemActivated(QListWidgetItem*)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>choosejob_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>313</x>
+     <y>178</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>430</x>
+     <y>0</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_ts</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>544</x>
+     <y>119</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>506</x>
+     <y>63</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_pr</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>544</x>
+     <y>144</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>506</x>
+     <y>90</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_xy</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>544</x>
+     <y>169</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>506</x>
+     <y>116</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_xz</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>544</x>
+     <y>194</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>142</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_yz</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>544</x>
+     <y>219</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>167</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_3d</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>544</x>
+     <y>244</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>194</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_ma</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>544</x>
+     <y>269</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>219</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_prt</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>544</x>
+     <y>319</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>247</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_sp</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>544</x>
+     <y>294</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>503</x>
+     <y>304</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_pts</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>544</x>
+     <y>352</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>330</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>drop_job</sender>
+   <signal>currentIndexChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>264</x>
+     <y>361</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>334</x>
+     <y>356</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_restarts</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>72</x>
+     <y>536</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>1</x>
+     <y>530</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_delete_tmp_files</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>76</x>
+     <y>561</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>3</x>
+     <y>562</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_verbose</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>57</x>
+     <y>584</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>5</x>
+     <y>623</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_b</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>434</x>
+     <y>139</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>954</x>
+     <y>67</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_F</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>434</x>
+     <y>164</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>954</x>
+     <y>103</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_I</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>454</x>
+     <y>189</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>956</x>
+     <y>129</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_k</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>434</x>
+     <y>214</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>957</x>
+     <y>158</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_O</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>434</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>188</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_x</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>434</x>
+     <y>289</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>255</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_host</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>123</x>
+     <y>421</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>26</x>
+     <y>362</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_pe</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>99</x>
+     <y>472</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>5</x>
+     <y>440</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_time</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>183</x>
+     <y>496</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>4</x>
+     <y>480</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_q</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>342</x>
+     <y>422</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>507</x>
+     <y>387</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_account</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>365</x>
+     <y>446</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>506</x>
+     <y>416</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_tpn</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>334</x>
+     <y>472</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>447</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_m</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>644</x>
+     <y>102</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>954</x>
+     <y>328</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_D</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>754</x>
+     <y>192</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>396</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_s</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>754</x>
+     <y>282</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>522</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_w</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>754</x>
+     <y>371</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>956</x>
+     <y>612</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_user</sender>
+   <signal>textChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>754</x>
+     <y>416</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>650</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>button_clear</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>reset_window()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>307</x>
+     <y>652</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>956</x>
+     <y>689</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_M</sender>
+   <signal>textChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>754</x>
+     <y>132</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>953</x>
+     <y>287</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_quit</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_save</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>save_to_file()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_last</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>open_last()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_open</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>open_from_file()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_help</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>help()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_about</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>about_gui()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_default</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>save_default()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_jobname</sender>
+   <signal>textChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>179</x>
+     <y>121</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>4</x>
+     <y>122</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_Z</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>434</x>
+     <y>314</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>458</x>
+     <y>344</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_cycfill</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>274</x>
+     <y>602</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>4</x>
+     <y>510</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_start_jobmanager</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>start_jobmanager()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>458</x>
+     <y>344</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_start_watchdog</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>start_watchdog()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>458</x>
+     <y>344</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <slot>startpalmrun()</slot>
+  <slot>enable_advanced()</slot>
+  <slot>enable_coupled()</slot>
+  <slot>choosejob()</slot>
+  <slot>choosejob_list()</slot>
+  <slot>change_rc_list()</slot>
+  <slot>check_flags()</slot>
+  <slot>change_lineinput()</slot>
+  <slot>reset_window()</slot>
+  <slot>save_to_file()</slot>
+  <slot>open_from_file()</slot>
+  <slot>open_last()</slot>
+  <slot>about()</slot>
+  <slot>about_gui()</slot>
+  <slot>save_default()</slot>
+  <slot>help()</slot>
+  <slot>start_watchdog()</slot>
+  <slot>start_jobmanager()</slot>
+ </slots>
+</ui>
