Index: palm/trunk/SCRIPTS/mbuild
===================================================================
--- palm/trunk/SCRIPTS/mbuild	(revision 1282)
+++ palm/trunk/SCRIPTS/mbuild	(revision 1289)
@@ -22,5 +22,6 @@
 # Current revisions:
 # ------------------
-# 
+# comments translated from German to English
+# fimm-, scirocco-, ibmy-, and sgi-specific code removed
 #
 # Former revisions:
@@ -85,5 +86,4 @@
  compile_utility_programs=false
  config_file=.mrun.config
- fimm=false
  host=all
  host_found=false
@@ -92,5 +92,4 @@
  module_calls=""
  util_compiled_localhost=false
- scirocco=false
  silent=false
  suf=f90
@@ -189,10 +188,4 @@
 
 
-
- [[ $local_host_real_name = scirocco ]]  &&  scirocco=true
- [[ $local_host_real_name = fimm.bccs.uib.no ]]  &&  fimm=true
-
-
-
  if [[ $local_host != ibms ]]
  then
@@ -203,5 +196,5 @@
 
 
-    # determine the block conditions
+    # DETERMINE THE BLOCK CONDITIONS
  if [[ $block_conditions != none ]]
  then
@@ -422,6 +415,6 @@
 
     
-    # GENERIERUNG DER AKTUELLEN MODELLVERSION FUER ALLE RECHNER-/UEBERSETZUNGS-
-    # VERSIONEN, DIE IN DER KONFIGURATIONSDATEI GEFUNDEN WERDEN
+    # GENERATE MODEL-VERSIONS FOR ALL HOST-BLOCKS
+    # FOUND IN THE CONFIGURATION-FILE
  printf "\n  *** scanning configuration file for host(s) ..."
 
@@ -429,5 +422,5 @@
  while read line
  do
-       # KOMMENTARZEILEN UEBERSPRINGEN
+       # SKIP COMMENT-LINES
     [[ $(echo $line | cut -c1) = "#" ]]  &&  continue
     (( ihost = ihost + 1 ))
@@ -441,7 +434,7 @@
     (( ih = ih + 1 ))
 
-       # determine remote host and conditions for the respective block
-       # continue, only if this host has been chosen via -h option and if
-       # conditions have been chosen via -K option
+       # DETERMINE REMOTE HOST AND CONDITIONS FOR THE RESPECTIVE BLOCK
+       # CONTINUE, ONLY IF THIS HOST HAS BEEN CHOSEN VIA -h OPTION AND IF
+       # CONDITIONS HAVE BEEN CHOSEN VIA -K OPTION
     remote_host_string=`echo ${hostline[$ih]} | cut -d" " -s -f3-`
     remote_host=`echo $remote_host_string | cut -d" " -f1`
@@ -475,5 +468,5 @@
     make_options=""
 
-       # IP-ADRESSE DES REMOTE-RECHNERS BESTIMMEN
+       # DETERMINE IP-ADDRES OF THE REMOTE-HOST
     case  $remote_host  in
         (lccrayb)        remote_addres=130.73.233.1;;
@@ -484,6 +477,4 @@
         (lcrte)          remote_addres=133.5.185.60;;
         (lcsb)           remote_addres=147.46.30.151;;
-        (lcsgib)         remote_addres=130.73.232.102;;
-        (lcsgih)         remote_addres=130.75.4.101;;
         (lck)            remote_addres=165.132.26.61;;
         (lckiaps)        remote_addres=118.128.66.223;;
@@ -496,5 +487,4 @@
         (ibmku)          remote_addres=133.5.4.129;;
         (ibms)           remote_addres=150.183.5.101;;
-        (ibmy)           remote_addres=165.132.26.58;;
         (nech)           remote_addres=136.172.44.192;;
         (neck)           remote_addres=133.5.178.11;;
@@ -509,5 +499,5 @@
 
 
-       # REMOTE-USERNAMEN ERMITTELN
+       # DETERMINE REMOTE-USERNAME
     line=""
     found=false
@@ -537,5 +527,5 @@
 
 
-       # REMOTE-QUELLTEXTPFAD ERMITTELN
+       # DETERMINE REMOTE-SOURCE-CODE-PATH
     line=""
     remote_source_path=""
@@ -572,5 +562,5 @@
 
 
-       # REMOTE-PFAD FUER MAKE-DEPOSITORY ERMITTELN
+       # DETERMINE REMOTE-PATH FOR MAKE-DEPOSITORY
     remote_md=""
     line=""
@@ -611,5 +601,5 @@
 
 
-       # COMPILERNAMEN ERMITTELN
+       # DETERMINE COMPILERNAME
     line=""
     found=false
@@ -639,6 +629,6 @@
 
 
-       # BEI BENUTZUNG EINES PARALLELEN COMPILERS MUSS AUCH EIN
-       # SERIELLER COMPILERNAME ERMITTELT WERDEN
+       # IN CASE OF PARALLEL EXECUTION (COMPILER FOR PARALLEL EXECUTION),
+       # A SERIAL COMPILERNAME MUST BE DETERMINED ALSO
     if [[ $(echo $remote_host_string | grep -c parallel) = 1 ]]
     then
@@ -674,5 +664,5 @@
 
 
-       # PRAEPROZESSOR-OPTIONEN/DIREKTIVEN ERMITTELN
+       # DETERMINE PREPROCESSOR-OPTIONS AND DIRECTIVES
     line=""
     found=false
@@ -688,5 +678,5 @@
        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
        then
-             # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
+             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
           cpp_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
           found=true
@@ -703,5 +693,5 @@
 
 
-       # RECHNERSPEZIFISCHE CPP-DIREKTIVEN HINZUFUEGEN
+       # ADD HOST-SPECIFIC PREPROCESSOR-DIRECTIVES
     for  string  in  $remote_host_string
     do
@@ -727,5 +717,5 @@
 
 
-       # get netCDF options
+       # GET netCDF OPTIONS
     line=""
     grep  "$remote_host_string" $config_file | grep "%netcdf_inc"  >  $tmp_mbuild
@@ -740,5 +730,5 @@
        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
        then
-             # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
+             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
           netcdf_inc=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
        fi
@@ -758,5 +748,5 @@
        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
        then
-             # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
+             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
           netcdf_lib=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
        fi
@@ -766,5 +756,5 @@
 
 
-       # get fftw options
+       # GET FFTW OPTIONS
     line=""
     grep  "$remote_host_string" $config_file | grep "%fftw_inc"  >  $tmp_mbuild
@@ -779,5 +769,5 @@
        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
        then
-             # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
+             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
           fftw_inc=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
        fi
@@ -797,5 +787,5 @@
        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
        then
-             # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
+             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
           fftw_lib=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
        fi
@@ -805,5 +795,5 @@
 
 
-       # get make options
+       # GET MAKE OPTIONS
     line=""
     found=false
@@ -819,5 +809,5 @@
        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
        then
-             # remove colons from directive string
+             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
           make_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
 
@@ -828,5 +818,5 @@
 
 
-       # COMPILEROPTIONEN ERMITTELN
+       # GET COMPILER OPTIONS
     line=""
     found=false
@@ -842,9 +832,9 @@
        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
        then
-             # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
+             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
           compiler_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
           found=true
 
-             # add include paths for netCDF and fftw
+             # ADD INCLUDE PATHS FOR netCDF AND FFTW
           compiler_options="$compiler_options $netcdf_inc $fftw_inc"
        fi
@@ -860,5 +850,5 @@
 
 
-       # get login init commands, "::" is replacing a space
+       # GET LOGIN INIT COMMANDS
     line=""
     grep  "$remote_host_string" $config_file | grep "%login_init_cmd"  >  $tmp_mbuild
@@ -873,5 +863,5 @@
        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
        then
-             # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
+             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
           init_cmds=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
           init_cmds="${init_cmds};"
@@ -880,5 +870,5 @@
 
 
-       # get modules to be loaded
+       # GET MODULES TO BE LOADED
     line=""
     grep  "$remote_host_string" $config_file | grep "%modules"  >  $tmp_mbuild
@@ -893,5 +883,5 @@
        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
        then
-             # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
+             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
           modules=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
        fi
@@ -900,5 +890,5 @@
 
 
-       # LADER-OPTIONEN ERMITTELN
+       # GET LINKER OPTIONS
     line=""
     found=false
@@ -914,9 +904,9 @@
        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
        then
-             # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
+             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
           loader_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
           found=true
 
-             # add netCDF- and fftw-library
+             # ADD netCDF- AND FFTW-LIBRARY
           loader_options="$loader_options $netcdf_lib $fftw_lib"
        fi
@@ -1043,5 +1033,5 @@
 
 
-       # make on remote host
+       # MAKE ON REMOTE HOST
     if [[ $remote_host != $local_host ]]
     then
@@ -1049,6 +1039,6 @@
        then
 
-             # AKTUELLE QUELLTEXTVERSION INS REMOTE-QUELLTEXTVERZEICHNIS KOPIEREN
-             # FALLS DIESES NOCH NICHT EXISTIERT, WIRD ES ERZEUGT
+             # COPY CURRENT SOURCE CODE TO SOURCE-CODE DIRECTORY ON THE REMOTE HOST
+             # CREATE THIS DIRECTORY, IF IT DOES NOT EXIST
           echo "  *** copying \"${mainprog}_sources.tar\" to \"${remote_addres}:${remote_md}/\" "
           if [[ $remote_host != lctit ]]
@@ -1056,6 +1046,5 @@
              ssh  ${remote_username}@${remote_addres} "[[ ! -d ${remote_md} ]]  &&  (echo \"  *** ${remote_md} will be created\"; mkdir -p  ${remote_md})"
           else
-                # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
-                # MIT SSH, DESHALB AUFRUF PER PIPE
+                # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS
              print "[[ ! -d ${remote_md} ]]  &&  (echo \"  *** ${remote_md} will be created\"; mkdir -p  ${remote_md})"  |  ssh ${remote_username}@${remote_addres}  2>&1
           fi
@@ -1065,5 +1054,5 @@
 
 
-             # FALLS VORHANDEN, LETZTE VERSION AUF DEM REMOTE-RECHNER AUSPACKEN
+             # UNTAR PREVIOUS UPDATE ON REMOTE HOST, IF EXISTING
           echo "  *** untar previous update on remote host, if existing"
           if [[ $remote_host != lctit ]]
@@ -1071,30 +1060,28 @@
              ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]]  &&  tar -xf  ${mainprog}_current_version.tar"
           else
-                # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
-                # MIT SSH, DESHALB AUFRUF PER PIPE
+                # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS
              print  "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]]  &&  tar -xf  ${mainprog}_current_version.tar"  |  ssh  ${remote_username}@${remote_addres}  2>&1
           fi
 
 
-             # AKTUELLE QUELLTEXTVERSION AUF REMOTE-RECHNER AUSPACKEN
-          echo "  *** untar actual sources on remote host"
+             # UNTAR CURRENT SOURCES ON REMOTE HOST
+          echo "  *** untar current sources on remote host"
           if [[ $remote_host != lctit ]]
           then
              ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; tar -xf  ${mainprog}_sources.tar"
           else
-                # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
-                # MIT SSH, DESHALB AUFRUF PER PIPE
+                # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS
              print  "cd ${remote_md}; tar -xf  ${mainprog}_sources.tar"  |  ssh  ${remote_username}@${remote_addres}  2>&1
           fi
 
 
-             # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF REMOTE RECHNER AUSFUEHREN
-             # KOMMANDOUEBERGABE AN SSH PER PIPE, DA SO DIE SYSTEM- UND
-             # BENUTZERPROFILE VOLLSTAENDIG AUSGEFUEHRT WERDEN (SONST FEHLEN MAKE
-             # Z.B. DIE PFADE ZUM COMPILER)
+             # EXECUTE MAKE WITH THOSE OPTIONS DETERMINED ABOVE
+             # COMMANDS WILL BE COMMUNICATED TO SSH VIA PIPE, SINCE THIS WAY THE SYSTEM- AND
+             # USER-PROFILES OF THE SHELL ARE COMPLETELY EXECUTED (OTHERWISE, MAKE
+             # WILL E.G. MISS THE COMPILER-PATHS)
           echo "  *** execute \"make\" on remote host"
 
 
-             # generate make call with make options
+             # GENERATE MAKE CALL WITH MAKE OPTIONS
           if [[ $remote_host = nech ]]
           then
@@ -1104,5 +1091,5 @@
           fi
 
-             # generate command to load modules, if modules are given
+             # GENERATE COMMAND TO LOAD MODULES, IF MODULES ARE GIVEN
           if [[ "$modules" != "" ]]
           then
@@ -1113,18 +1100,9 @@
                 module_calls="module load ${modules};"
              fi
-
-                # bugfix for wrong netcdf module
-             if [[ $remote_host = lcsgib  ||  $remote_host = lcsgih ]]
-             then
-                if [[ $(echo $module_calls | grep -c netcdf/3.6.3-intel) != 0 ]]
-                then
-                   module_calls="$module_calls export LD_LIBRARY_PATH=/sw/dataformats/netcdf/3.6.3-intel/lib:\$LD_LIBRARY_PATH;"
-                fi
-             fi
           else
              module_calls=""
           fi
 
-          if [[ $remote_host = ibmkisti  ||  $remote_host = ibms  ||  $remote_host = ibmy ]]
+          if [[ $remote_host = ibmkisti  ||  $remote_host = ibms ]]
           then
 
@@ -1135,9 +1113,4 @@
 
              print "$init_cmds $module_calls export OBJECT_MODE=64; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
-
-          elif [[ $remote_host = lcsgib  ||  $remote_host = lcsgih ]]
-          then
-#             print ". /usr/share/modules/init/bash; $module_calls  cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
-             print "$init_cmds $module_calls cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
 
           elif [[ $remote_host = lctit ]]
@@ -1186,5 +1159,5 @@
 
 
-             # NEUE VERSION AUF REMOTE-RECHNER ZUSAMMENPACKEN
+             # TAR UPDATED VERSION ON THE REMOTE HOST
           printf "\n  *** tar update on remote host ..."
           if [[ $remote_host != lctit ]]
@@ -1192,21 +1165,13 @@
              ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; chmod u+w *; tar -cf  ${mainprog}_current_version.tar  ${mainprog}  *.f90 *.o *.mod"
           else
-                # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
-                # MIT SSH, DESHALB AUFRUF PER PIPE
+                # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS
              print  "cd ${remote_md}; chmod u+w *; tar -cf  ${mainprog}_current_version.tar  ${mainprog}  *.f90 *.o *.mod"  |  ssh  ${remote_username}@${remote_addres}  2>&1
           fi
 
 
-             # AKTUELLES VERSIONSVERZEICHNIS AUF REMOTE-RECHNER BEREINIGEN
-#          printf "\n  *** \"make clean\" on remote host ..."
-#          ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; make clean; rm ${mainprog}_sources.tar; rm *.f90 Makefile"
-#          printf "\n"
-
-
-
-
-          # GLEICHE AKTIONEN FUER DIE UTILITY-PROGRAMME DURCHFUEHREN
-          # AKTUELLE QUELLTEXTVERSION INS REMOTE-QUELLTEXTVERZEICHNIS KOPIEREN
-          # FALLS DIESES NOCH NICHT EXISTIERT, WIRD ES ERZEUGT
+
+          # DO THE SAME THINGS FOR THE UTILITY-ROUTINES:
+          # COPY CURRENT SOURCE CODE TO SOURCE-CODE DIRECTORY ON THE REMOTE HOST
+          # CREATE THIS DIRECTORY, IF IT DOES NOT EXIST
        elif [[ $compile_utility_programs = true ]]
        then
@@ -1220,10 +1185,9 @@
              ssh  ${remote_username}@${remote_addres} "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]]  &&  (echo \"  *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)"
           else
-                # TIT ERLAUBT NUR DIE AUSFUEHRUNG GANZ BESTIMMTER KOMMANDOS
-                # MIT SSH, DESHALB AUFRUF PER PIPE
+                # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS
              print "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]]  &&  (echo \"  *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p  ${remote_ud}/../SCRIPTS)"  |  ssh ${remote_username}@${remote_addres}  2>&1
           fi
 
-             # KOPIEREN DER SCRIPTE
+             # COPY SHELL-SCRIPTS
           scp  batch_scp mbuild mrun process_dvr_output .dvrserver.config subjob batch_nc2vdf nc2vdf nc2vdf.ncl nc2vdf.config ${remote_username}@${remote_addres}:${remote_ud}/../SCRIPTS  >  /dev/null
 
@@ -1232,13 +1196,13 @@
 
 
-             # KOPIEREN DER UTILITY-PROGRAMME
+             # COPY UTILITY-ROUTINES
           scp  Makefile  *.f90  ${remote_username}@${remote_addres}:${remote_ud}  >  /dev/null
 
 
 
-             # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF REMOTE RECHNER AUSFUEHREN
-             # KOMMANDOUEBERGABE AN SSH PER PIPE, DA SO DIE SYSTEM- UND
-             # BENUTZERPROFILE VOLLSTAENDIG AUSGEFUEHRT WERDEN (SONST FEHLEN MAKE
-             # Z.B. DIE PFADE ZUM COMPILER)
+             # EXECUTE MAKE WITH THOSE OPTIONS DETERMINED ABOVE
+             # COMMANDS WILL BE COMMUNICATED TO SSH VIA PIPE, SINCE THIS WAY THE SYSTEM- AND
+             # USER-PROFILES OF THE SHELL ARE COMPLETELY EXECUTED (OTHERWISE, MAKE
+             # WILL E.G. MISS THE COMPILER-PATHS)
           echo "  *** execute \"make\" on remote host"
 
@@ -1250,5 +1214,5 @@
           fi
 
-             # generate command to load modules, if modules are given
+             # GENERATE COMMAND TO LOAD MODULES, IF MODULES ARE GIVEN
           if [[ "$modules" != "" ]]
           then
@@ -1259,13 +1223,4 @@
                 module_calls="module load ${modules};"
              fi
-
-                # bugfix for wrong netcdf module
-             if [[ $remote_host = lcsgib  ||  $remote_host = lcsgih ]]
-             then
-                if [[ $(echo $module_calls | grep -c netcdf/3.6.3-intel) != 0 ]]
-                then
-                   module_calls="$module_calls export LD_LIBRARY_PATH=/sw/dataformats/netcdf/3.6.3-intel/lib:\$LD_LIBRARY_PATH;"
-                fi
-             fi
           else
              module_calls=""
@@ -1273,5 +1228,5 @@
 
 
-          if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]
+          if [[ $remote_host = ibms ]]
           then
 
@@ -1303,12 +1258,12 @@
           fi
 
-       fi    # ENDE UEBERSETZUNG DER UTILITY-PROGRAMME
+       fi    # END OF COMPILING UTILITY-ROUTINES
 
        rm -rf  ${remote_host}_last_make_protokoll
 
-       # make on local host
+       # MAKE ON LOCAL HOST
     else
 
-          # workaround for lcxe6
+          # INIT WORKAROUND FOR lcxe6
        if [[ $remote_host = lcxe6  ||  $remote_host = lccrayb  ||  $remote_host = lccrayf ||  $remote_host = lccrayh ]]
        then
@@ -1318,5 +1273,5 @@
        fi
 
-       # first load modules, if given
+       # FIRST LOAD MODULES, IF GIVEN
        if [[ "$modules" != "" ]]
        then
@@ -1336,5 +1291,5 @@
        then
 
-             # DEPOSITORY VERZEICHNIS ERZEUGEN, FALLS NOCH NICHT VORHANDEN
+             # CREATE MAKE-DEPOSITORY, IF IT DOES NOT EXIST
           eval remote_md=$remote_md
           if [[ ! -d $remote_md ]]
@@ -1353,5 +1308,5 @@
           fi
 
-             # QUELLTEXT-DATEIEN AUS REPOSITORY INS DEPOSITORY KOPIEREN
+             # COPY SOURCE-CODE FROM REPOSITORY TO MAKE-DEPOSITORY
           echo " "
           echo "  *** updating sources in $remote_md"
@@ -1360,5 +1315,5 @@
           tar xf  ${mainprog}_sources.tar
 
-             # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF LOKALEM RECHNER AUSFUEHREN
+             # CALL MAKE ON LOCAL HOST USING THE  OPTIONS DETERMINED FURTHER ABOVE
           echo " "
           echo "  *** execute \"make\" on local host"
@@ -1423,10 +1378,9 @@
              fi
 
-             # COMPILE CHECK_NAMELIST_FILES (ONLY FOR ONE BRANCH on LOCALHOST NEEDED)
-
+                # COMPILE CHECK_NAMELIST_FILES (ONLY FOR ONE BRANCH on LOCALHOST NEEDED)
              printf "\n\n"
              echo "  *** compiling check_namelist_files ..."
 
-             # GET CHECK OPTIONS
+                # GET CHECK OPTIONS
              line=""
              found=false
@@ -1442,5 +1396,5 @@
                 if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
                 then
-                   # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING UND ALLE -D ENTFERNEN
+                      # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
                    line="$line "
                    copts_check=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g' | sed 's/-D[^ ]* //g' | sed 's/ -D.*//g'`
@@ -1498,3 +1452,2 @@
  rm -f  hosts_found_in_config_file
  rm -f ${local_source_path}/${mainprog}_sources_check.tar
-
Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 1282)
+++ palm/trunk/SCRIPTS/mrun	(revision 1289)
@@ -22,5 +22,7 @@
 # Current revisions:
 # ------------------
-# 
+# comments translated to English
+# necriam-, fimm-, ibmy-, and sgi-specific code removed
+# export of variables for palm and interpret_config removed
 #
 # Former revisions:
@@ -143,9 +145,10 @@
 
  
-    # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
-
- set +o allexport    # SICHERHEITSHALBER UNTERBINDEN, DA SONST EVTL. STAGEOUT
-                     # NICHT LAUEFT (TOO MANY ARGUMENTS - PROBLEM)
- set +o noclobber    # EXISTIERENDE DATEIEN DUERFEN UEBERSCHRIEBEN WERDEN
+    # DECLARATION OF VARIABLES AND THEIR DEFUALT VALUES
+
+ set +o allexport    # SUPPRESS EXPORT OF ALL VARIABLES, SINCE IN THE PAST THIS
+                     # LES TO PROBLEMS IN ROUTINES CALLED BY MRUN
+                     # (TOO MANY ARGUMENTS - PROBLEM)
+ set +o noclobber    # EXISTING FILES ARE ALLOWED TO BE OVERWRITTEN
 
  AddFilenames=""
@@ -182,6 +185,5 @@
  fftw_lib=""
  fftw_support=false
- fimm=false
- fname=test
+  fname=test
  fromhost=""
  global_revision=""
@@ -199,5 +201,4 @@
  link_local_output=false
  localhost_realname=$(hostname)
- local_compile=false
  local_dvrserver_running=.FALSE.
  locat=normal
@@ -223,5 +224,4 @@
  output_list=""
  package_list=""
- punkte="..........................................................."
  queue=none
  read_from_config=""
@@ -248,7 +248,6 @@
  run_coupled_model=false
  run_mode=""
- scirocco=false
  store_on_archive_system=false
- striche="  ----------------------------------------------------------------------------"
+ dashes="  ----------------------------------------------------------------------------"
  silent=false
  source_list=""
@@ -261,5 +260,5 @@
  usern=$LOGNAME
  use_openmp=false
- version="MRUN  2.0 Rev$Rev$"
+ version="MRUN  2.1 Rev$Rev$"
  working_directory=`pwd`
  TOPT=""
@@ -268,60 +267,17 @@
 
  typeset -i  iec=0 iic=0 iin=0 ioc=0 iout=0 stagein_anz=0 stageout_anz=0
- typeset -x -i  memory=0   # has to be exported here, otherwise an unknown side
-                           # effect may cause data loss when getopts is reading the
-                           # script-option arguments
+ typeset -x -i  memory=0   # HAS TO BE EXPORTED HERE, OTHERWISE AN UNKNOWN SIDE
+                           # SIDE EFFECT MAY CAUSE DATA LOSS WHEN GETOPTS IS READING THE
+                           # SCRIPT-OPTION ARGUMENTS
  typeset -i  cputime i ii iia iii iio icycle inode ival jobges jobsek last_char_int maxcycle minuten nodes pes remaining_pes sekunden tp1
 
 
 
-
-    # EINZELNE VARIABLE FUER HAUPTPROGRAMM EXPORTIEREN
- export  cpurest fname host localhost return_addres return_username remotecall tasks_per_node
-
-    # FOLGENDE VARIABLEN MUESSEN FUER DIE INTERPRETATION DER KONFIGURATIONSDATEI
-    # EXPORTIERT WERDEN
- export  afname config_file cpp_opts cpumax do_batch do_trace fname fromhost
- export  group_number input_list numprocs output_list queue run_mode
-
-
- 
-    # FEHLERBEHANDLUNG
-    # BEI EXIT:
+    # ERROR HANDLING IN CASE OF EXIT
  trap 'rm -rf  $working_directory/tmp_mrun
-       if [[ $locat != localhost ]]
-       then
-#          if [[ ! -f ${mrun_path}/statistik/mrun_statistik ]]
-#          then
-#             cat  >  ${mrun_path}/statistik/mrun_statistik  <<  %STATEND%
-#MRUN-calls on $localhost
-#
-#date and time                      user        localhost   remotehost  termination mrun-command
-#--------------------------------------------------------------------------------------------------------------------
-#%STATEND%
-#             chmod  666  ${mrun_path}/statistik/mrun_statistik
-#          fi
-#
-#             # EINTRAG IN DIE STATISTIK-DATEI
-#          string1=`date`                  #-L35
-#          string2=$usern                  #-L12
-#          string3=$localhost_realname     #-L12
-#          string4=$host                   #-L12
-#          string5=$locat                  #-L12
-#          if [[ "$job_on_file" = ""  &&  $locat != control_c  &&  $locat != user_abort ]]
-#          then
-#             if [[ $do_batch = true ]]
-#             then
-#                printf "$string1$string2$string3$string4$string5$mrun_com \n"  >>  ${mrun_path}/statistik/mrun_statistik
-#             else
-#                printf "$string1$string2$string3$string4$string5$mc \n"  >>  ${mrun_path}/statistik/mrun_statistik
-#             fi
-#          fi
-          echo " " > /dev/null
-       fi
-
-       if [[ $locat != normal  &&  $locat != control_c  &&  $locat != local_compile ]]
-       then
-
-              # EVENTUELLE ERROR-KOMMANDOS ABARBEITEN
+       if [[ $locat != normal  &&  $locat != control_c ]]
+       then
+
+              # CARRY OUT ERROR-COMMANDS GIVEN IN THE CONFIGURATION FILE (EC:)
           (( i = 0 ))
           while (( i < iec ))
@@ -363,5 +319,5 @@
 
 
-    # BEI TERMINAL-BREAK:
+    # ACTIONS IN CASE OF TERMINAL-BREAK (CONTROL-C):
  trap 'rm -rf  $working_directory/tmp_mrun
        rm -rf  $working_directory/tmp_check_namelist_files
@@ -394,6 +350,6 @@
 
 
-    # SHELLSCRIPT-OPTIONEN EINLESEN UND KOMMANDO NEU ZUSAMMENSETZEN, FALLS ES
-    # FUER FOLGEJOBS BENOETIGT WIRD
+    # READ SHELLSCRIPT-OPTIONS AND REBUILD THE MRUN-COMMAND STRING (MC),
+    # WHICH WILL BE USED TO START RESTART-JOBS
  while  getopts  :a:AbBc:Cd:D:Fg:G:h:H:i:IkK:m:M:n:o:O:p:P:q:r:R:s:St:T:u:U:vw:xX:yY:zZ option
  do
@@ -447,10 +403,10 @@
 
 
-    # EVTL. POSITIONSPARAMETER EINLESEN
-    # ZUR ZEIT GIBT ES NUR DEN PARAMETER ? (=KURZINFO)
+    # SKIP GIVEN OPTIONS TO READ POSITIONAL PARAMETER, IF GIVEN
+    # CURRENTLY ONLY PARAMETER ? (TO OUTPUT A SHORT COMMAND INFO) IS ALLOWED
  (( to_shift = $OPTIND - 1 ))
  shift $to_shift
 
-    # KURZE AUFRUFBESCHREIBUNG WIRD HIER AUSGEGEBEN
+    # PRINT SHORT DESCRIPTION OF MRUN OPTIONS
  if [[ "$1" = "?" ]]
  then
@@ -515,5 +471,5 @@
 
 
-    # KURZE STARTMELDUNG
+    # SHORT STARTING MESSAGE
  printf "\n*** $version "
  printf "\n    will be executed.     Please wait ..."
@@ -521,5 +477,5 @@
 
 
-    # PRUEFEN, OB KONFIGURATIONS-DATEI VORHANDEN
+    # CHECK, IF CONFIGURATION FILE EXISTS
  if [[ ! -f $config_file ]]
  then
@@ -531,5 +487,5 @@
 
 
-    # HOST-IDENTIFIER (local_host) AUS KONFIGURATIONSDATEI BESTIMMEN
+    # DETERMINE THE HOST-IDENTIFIER (localhost) FROM THE CONFIGURATION FILE
  line=""
  grep  "%host_identifier"  $config_file  >  tmp_mrun
@@ -559,21 +515,20 @@
 
 
-    # HOSTSPEZIFISCHE VARIABLEN SETZEN
+    # SET HOST-SPECIFIC VARIABLES
  case  $localhost_realname  in
      (r1*|r2*|h01*|b01*)     archive_system=tivoli;;
      (cs*)                   archive_system=ut;;
-     (fimm.bccs.uib.no)      fimm=true;;
-     (gate|n-sx)             PATH=$PALM_BIN:$PATH:/usr/bin/nqsII;;
-     (scirocco)              scirocco=true;;
  esac
 
 
- 
-    # BASISNAME DER INPUT-DATEIEN GLEICH ALLGEMEINEM BASISNAMEN SETZEN,
-    # WENN NICHT VOM BENUTZER ANDERS BESTIMMT
+    # ??? THIS SHOULD BE DECRIBED IN THE MRUN DOCUMENTATION ??? 
+    # SET BASENAME OF THE INPUT-FILES TO THE GENERAL BASENAME (GIVEN BY OPTION -d),
+    # IF IT HAS NOT BEEN SET BY THE USER DIFFERENTLY (USING OPTION -a)
  [[ "$afname" = "" ]]  &&  afname=$fname
 
 
-    # EVTL. RUN-MODUS DEN I/O-LISTEN HINZUFUEGEN
+    # ADD RUN-FILE ACTIVATION STRINGS (GIVEN BY OPTION -r) TO THE
+    # RESPECTIVE LISTS FOR ACTIVATING THE INPUT/OUTPUT FILE CONNECTION
+    # STATEMENTS IN THE CONFIGURATION FILE
  if [[ "$run_mode" != "" ]]
  then
@@ -583,8 +538,9 @@
 
 
-    # RECHNERNAMEN ABSPEICHERN, VON DEM AUS JOB GESTARTET WIRD,
-    # ALLERDINGS NUR DANN, WENN NICHT PER OPTION -H BEREITS EIN WERT
-    # ZUGEWIESEN WURDE (MRUN MACHT DIES IMMER, WENN ES SELBST BATCH-JOBS
-    # STARTET)
+    # ??? is this (and the respective option -H) really required ???
+    # STORE HOSTNAME, FROM WHICH THE JOB IS STARTED,
+    # BUT ONLY IF IT HASN'T BEEN ALREADY SET BY OPTION -H
+    # (MRUN IS AUTOMATICALLY SETTING THIS OPTION IN THE MRUN-CALLS WITHIN
+    # THOSE BATCH-JOBS, WHICH ARE CREATED BY MRUN ITSELF)
  if [[ "$fromhost" = "" ]]
  then
@@ -593,8 +549,8 @@
 
 
-    # PRUEFEN, OB AUF REMOTE-MASCHINE GERECHNET WERDEN SOLL
-    # WERT VON do_remote WIRD FUER DATEIVERBINDUNGEN BENOETIGT.
-    # WENN AUF REMOTE-MASCHINE GERECHNET WIRD, IST GLEICHZEITIG KLAR,
-    # DASS EIN BATCH-JOB GESTARTET WERDEN MUSS
+    # CHECK, IF EXECUTION SHALL TO BE DONE ON THE REMOTE-MACHINE.
+    # VALUE OF do_remote IS IMPORTANT FOR THE FILE CONNECTIONS.
+    # IN CASE OF EXECUTION ON A REMOTE-MACHINE, A BATCH-JOB HAS
+    # TO BE SUBMITTED (I.E. do_bacth=true)
  if [[ -n $host  &&  "$host" != $localhost ]]
  then
@@ -602,5 +558,5 @@
     do_remote=true
     case  $host  in
-        (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|nech|necriam|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|lcsgib|lcsgih|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
+        (ibm|ibmh|ibmkisti|ibmku|ibms|nech|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
         (*)  printf "\n"
              printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
@@ -613,8 +569,7 @@
 
 
-     # ZUSATZBEDINGUNGEN (OPTION -K) AUSWERTEN
+     # EVALUATE ADDITIONAL CONDITIONS GIVEN BY OPTION -K
  if [[ -n $additional_conditions ]]
  then
-#    echo $additional_conditions | cut -d" " -f1-3 | read  cond1  cond2  dummy
     cond1=`echo $additional_conditions | cut -d" " -f1`
     cond2=`echo $additional_conditions | cut -d" " -s -f2`
@@ -630,32 +585,22 @@
 
 
-      # KOPPLUNGSEIGENSCHAFTEN (-Y) AUSWERTEN UND coupled_mode BESTIMMEN
+      # EVALUATE MODEL COUPLING FEATURES (OPTION -Y) AND DETERMINE coupled_mode
  if [[ $run_coupled_model = true ]] 
  then
 
-    if  [[ -n $coupled_dist ]]
-    then
-
-       numprocs_atmos=`echo $coupled_dist | cut -d" " -s -f1`
-       numprocs_ocean=`echo $coupled_dist | cut -d" " -s -f2`
-
-       if (( $numprocs_ocean + $numprocs_atmos != $numprocs ))
-       then
-
-          printf "\n  +++ number of processors does not fit to specification by \"-Y\"."
-          printf "\n      PEs (total)     : $numprocs"
-          printf "\n      PEs (atmosphere): $numprocs_atmos"
-          printf "\n      PEs (ocean)     : $numprocs_ocean"
-          locat=coupling; exit
-
-       fi
-
-    else
-
-       (( numprocs_ocean = $numprocs / 2 ))
-       (( numprocs_atmos = $numprocs / 2 ))
-
-    fi
-    coupled_dist=`echo "$numprocs_atmos $numprocs_ocean"`
+    numprocs_atmos=`echo $coupled_dist | cut -d" " -s -f1`
+    numprocs_ocean=`echo $coupled_dist | cut -d" " -s -f2`
+
+    if (( $numprocs_ocean + $numprocs_atmos != $numprocs ))
+    then
+
+       printf "\n  +++ number of processors does not fit to specification by \"-Y\"."
+       printf "\n      PEs (total)     : $numprocs"
+       printf "\n      PEs (atmosphere): $numprocs_atmos"
+       printf "\n      PEs (ocean)     : $numprocs_ocean"
+       locat=coupling; exit
+
+    fi
+
 
        # GET coupled_mode FROM THE CONFIG FILE
@@ -673,6 +618,5 @@
 
 
-    # PRUEFEN, OB EVTL. BEI VORHERGEHENDEM LAUF (KETTENJOB) EINE
-    # ARCHIVIERUNG FEHLGESCHLAGEN IST
+    # CHECK, IF FILE-ARCHIVING HAS FAILED IN PREVIOUS JOB (OF A JOB-CHAIN)
  if [[ -f ~/job_queue/ARCHIVE_ERROR_$fname ]]
  then
@@ -689,6 +633,6 @@
 
 
-    # WERTE VON MRUN-OPTIONEN SICHERN UND DAMIT GEGEBENENFALLS SPAETER DIE
-    # IN DER KONFIGURAIONSDATEI ANGEGEBENEN WERTE UEBERSTEUERN
+    # SAVE VALUES OF MRUN-OPTIONS SICHERN IN ORDER TO OVERWRITE
+    # THOSE VALUES GIVEN IN THE CONFIGURATION-FILE
  mrun_memory=$memory
  mrun_group_number=$group_number
@@ -697,10 +641,12 @@
 
 
-    # LESEN UND INTERPRETIEREN DER KONFIGURATIONS-DATEI VOM SHELLSCRIPT AUS
-    # VORUEBERGEHEND ZWINGEND AUF LINUX-RECHNERN
+    # READ AND EVALUATE THE CONFIGURATION-FILE FROM WITHIN THIS SHELLSCRIPT
+    # (OPTION -S). THE DEFAULT IS USING THE ROUTINE interpret_config
  if [[ "$read_from_config" = false ]]
  then
 
     [[ $silent = false ]]  &&  printf "\n    Reading the configuration file... "
+
+       # READ THE CONFIGURATION FILE LINE BY LINE
     while  read zeile
     do
@@ -708,13 +654,12 @@
 
 
-          # ZUERST EVENTUELL VORKOMMENDE ENVIRONMENT-VARIABLEN DURCH IHRE WERTE
-          # ERSETZEN
+          # FIRST REPLACE ENVIRONMENT-VARIABLES BY THEIR RESPECTIVE VALUES
        eval  zeile=\"$zeile\"
 
 
-          # INTERPRETATION DER ZEILE
+          # INTERPRET THE LINE
        if [[ "$(echo $zeile)" = "" ]]
        then
-             # LEERZEILE, KEINE AKTION
+             # EMPTY LINE, NO ACTION
           continue
 
@@ -722,5 +667,5 @@
        then
 
-             # ZEILE IST KOMMENTARZEILE
+             # LINE IS A COMMENT LINE
           true
 
@@ -728,7 +673,6 @@
        then
 
-             # ZEILE DEFINIERT ENVIRONMENT-VARIABLE
+             # LINE DEFINES AN ENVIRONMENT-VARIABLE
           zeile=$(echo $zeile | cut -c2-)
-#          echo $zeile | cut -d" " -f1-5 | read  var  value  for_host  for_cond1  for_cond2
           var=`echo $zeile | cut -d" " -f1`
           value=`echo $zeile | cut -d" " -s -f2`
@@ -740,20 +684,20 @@
           then
 
-                # BEI COMPILER- CPP- ODER LINKEROPTIONEN EVTL ":" DURCH " "
-                # ERSETZEN. "::" WIRD DURCH ":" ERSETZT.
+                # REPLACE ":" BY " " IN COMPILER- CPP- OR LINKER-OPTIONS,
+                # "::" IS REPLACED BY ":".
              value=`echo $value | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
 
 
-                # ENVIRONMENT-VARIABLE WIRD WERT AUS KONFIGURATIONSDATEI
-                # ZUGEWIESEN, WENN SIE SELBST NOCH KEINEN WERT UEBER DIE
-                # ENTSPRECHENDE SCRIPT-OPTION ERHALTEN HAT. SOLCHE
-                # VARIABLEN HAETTEN DANN DEN WERT "" ODER IM INTEGER-FALL DEN
-                # WERT 0.  ALLGEMEINE REGEL ALSO: SCRIPT-OPTION GEHT UEBER
-                # KONFIGURATIONSDATEI
+                # VALUE FROM THE CONFIGURATION-FILE IS ASSIGNED TO THE
+                # ENVIRONMENT-VARIABLE, BUT ONLY IF NO VALUE HAS BEEN ALREADY
+                # ASSIGNED WITHIN THIS SCRIPT (E.G. BY SCRIPT-OPTIONS).
+                # NON-ASSIGNED VARIABLES HAVE VALUE "" OR 0 (IN CASE OF INTEGER).
+                # HENCE THE GENERAL RULE IS: SCRIPT-OPTION OVERWRITES THE
+                # CONFIGURATION-FILE.
              if [[ "$(eval echo \$$var)" = ""  ||  "$(eval echo \$$var)" = "0" ]]
              then
                 eval  $var=\$value
 
-                   # EVTL. BILDSCHIRMAUSGABEN DER ENVIRONMENT-VARIABLEN
+                   # TERMINAL OUTPUT OF ENVIRONMENT-VARIABLES, IF TRACEBACK IS SWITCHED on
                 if [[ $do_trace = true ]]
                 then
@@ -762,8 +706,8 @@
              fi
 
-                # WENN ENVIRONMENT-VARIABLE HOST VEREINBART, DANN SOFORT AUSWERTEN
-                # WERT VON do-remote WIRD BEI DATEIVERBINDUNGEN BENOETIGT
-                # WENN AUF REMOTE-MASCHINE GERECHNET WIRD, IST GLEICHZEITIG KLAR,
-                # DASS EIN BATCH-JOB GESTARTET WERDEN MUSS
+                # IF AN ENVIRONMENT-VARIABLE DETERMINES THE HOST, THEN EVALUATE IT IMMEDIATELY:
+                # VALUE OF do-remote IS REQUIRED FOR THE FILE CONNECTIONS (COPY OF I/O FILES).
+                # IF EXECUTION IS SCHEDULED FOR A REMOTE-MASCHINE, A BATCH-JOB
+                # MUST HAVE TO BE STARTED
              if [[ $var = host ]]
              then
@@ -773,5 +717,5 @@
                    do_remote=true
                    case  $host  in
-                       (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|lcsgib|lcsgih|nech|necriam|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
+                       (ibm|ibmh|ibmkisti|ibmku|ibms|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|nech|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
                        (*)  printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
                             printf "\n      is not available"
@@ -783,7 +727,7 @@
              fi
 
-                # VOM BENUTZER DEFINIERTE ENVIRONMENT VARIABLEN MUESSEN PRINZIPIELL
-                # EXPORTIERT WERDEN, DA SIE VIELLEICHT IN WEITER UNTEN AUFZURUFEN-
-                # DEN PROGRAMMEN BENOETIGT WERDEN
+                # USER-DEFINED ENVIRONMENT VARIABLES MUST BE EXPORTED,
+                # BECAUSE THEY MAY BE REQUIRED IN OTHER SCRIPTS CALLED
+                # BY MRUN (E.G. subjob)
              export  $var
           fi
@@ -795,5 +739,5 @@
        then
 
-             # ZEILE DEFINIERT ERROR-KOMMANDO
+             # LINE DEFINES ERROR-COMMAND
           (( iec = iec + 1 ))
           zeile=$(echo $zeile | cut -c4-)
@@ -803,5 +747,5 @@
        then
 
-             # ZEILE DEFINIERT INPUT-KOMMANDO
+             # LINE DEFINES INPUT-COMMAND
           (( iic = iic + 1 ))
           zeile=$(echo $zeile | cut -c4-)
@@ -811,5 +755,5 @@
        then
 
-             # ZEILE DEFINIERT OUTPUT-KOMMANDO
+             # LINE DEFINES OUTPUT-COMMAND
           (( ioc = ioc + 1 ))
           zeile=$(echo $zeile | cut -c4-)
@@ -818,9 +762,8 @@
        else
 
-             # ZEILE DEFINIERT DATEIVERBINDUNG. EINLESEN DER DATEIEIGENSCHAFTEN
-             # s2a: in/out - Feld
-             # s2b: loc    - Feld (optional)
-             # s2c: tr/ar  - Feld (optional)
-#          echo $zeile | cut -d" " -f1-2 | read  s1  s2
+             # LINE DEFINES FILE CONNECTION. READ THE FILE ATTRIBUTES.
+             # s2a: in/out - field
+             # s2b: loc    - field (optional)
+             # s2c: tr/ar  - field (optional)
           s1=`echo $zeile | cut -d" " -f1`
           s2=`echo $zeile | cut -d" " -s -f2`
@@ -831,9 +774,7 @@
              s2c=""
           else
-#             echo $s2 | cut -d":" -f2-3 | sed 's/:/ /g' | read  s2b  s2c
              s2b=`echo $s2 | cut -d":" -f2 | sed 's/:/ /g'`
              s2c=`echo $s2 | cut -d":" -s -f3 | sed 's/:/ /g'`
           fi
-#          echo $zeile | cut -d" " -f3-6 | read  s3  s4  s5  s6
           s3=`echo $zeile | cut -d" " -f3`
           s4=`echo $zeile | cut -d" " -s -f4`
@@ -842,9 +783,10 @@
 
        
-             # ABSPEICHERN DER DATEIVERBINDUNG, FALLS IN INPUT- ODER OUTPUT-LIST
-             # VERMERKT. VARIABLE S3 KANN AUCH LISTE ENTHALTEN (FELDTRENNER ":")
-             # DATEIVERBINDUNG WIRD DANN NICHT ABGESPEICHERT UND GEPRUEFT, WENN
-             # PROGRAMMLAUF AUF REMOTE-MASCHINE ERFOLGT UND DATEI NUR LOKAL VOR-
-             # HANDEN SEIN MUSS (D.H. s2b = loc)
+             # STORE FILE CONNECTION, IF ACTIVATED BY ACTIVATION-STRING FROM
+             # INPUT- OR OUTPUT-LIST.
+             # VARIABLE S3 MAY CONTAIN A LIST OF ACTIVATION STRINGS (FIELD-SEPERATOR ":").
+             # IF EXECUTION IS SCHEDULED FOR A REMOTE-MACHINE AND THE FILE IS ONLY
+             # LOCALLY REQUIRED ON THAT MACHINE (I.E. s2b = loc), THE FILE CONNECTION
+             # IS NOT CHECKED AND STORED.
           IFSALT="$IFS"; IFS="$IFS:"
           if [[ "$s2a" = in  &&  ! ( $do_remote = true  &&  ( "$s2b" = loc  ||  "$s2b" = locopt ) ) ]]
@@ -894,13 +836,11 @@
 
 
-       # INTERPRETATION DER KONFIGURATIONSDATEI MITTELS FORTRAN 90 - PROGRAMM
+       # EVALUATE THE CONFIGURATION-FILE BY FORTRAN-PROGRAM
     [[ $silent = false ]]  &&  printf "..."
-    export  cond1 cond2 config_file do_remote do_trace input_list localhost output_list
-    export  interpreted_config_file=.icf.$RANDOM
-
-
-
-       # ENVIRONMENT-VARIABLEN FUER INTERPRET_CONFIG UEBER NAMELIST_DATEI ZUR
-       # VERFUEGUNG STELLEN
+    interpreted_config_file=.icf.$RANDOM
+
+
+
+       # PROVIDE VALUES OF ENVIRONMENT-VARIABLE FOR interpret_config VIA NAMELIST-FILE
     cat  >  .mrun_environment  <<  %%END%%
  &mrun_environment  cond1 = '$cond1', cond2 = '$cond2', 
@@ -912,41 +852,35 @@
 %%END%%
 
-    if [[ $localhost_realname = "sx-fep" ]]
-    then
-       /home/COAR/NC/raasch/pub/interpret_config_necriam.x
+    if [[ "$host" != $localhost ]]
+    then
+
+          # REMOTE JOB FROM LOCAL HOST: JUST TAKE THE FIRST EXECUTABLE FOUND
+       interpret_config_executable=`ls -1 ${PALM_BIN}/interpret_config*.x 2>/dev/null`
+       if [[ $? != 0 ]]
+       then
+          printf "\n\n  +++ no interpret_config found"
+          printf "\n      run \"mbuild -u -h ...\" to generate utilities for this host"
+          locat=interpret_config; exit
+       fi
+       interpret_config_executable=`echo $interpret_config_executable | cut -d" " -f1`
+       $interpret_config_executable
+
     else
 
-       if [[ "$host" != $localhost ]]
-       then
-
-             # REMOTE JOB FROM LOCAL HOST: JUST TAKE THE FIRST EXECUTABLE FOUND
-          interpret_config_executable=`ls -1 ${PALM_BIN}/interpret_config*.x 2>/dev/null`
-          if [[ $? != 0 ]]
-          then
-             printf "\n\n  +++ no interpret_config found"
-             printf "\n      run \"mbuild -u -h ...\" to generate utilities for this host"
-             locat=interpret_config; exit
-          fi
-          interpret_config_executable=`echo $interpret_config_executable | cut -d" " -f1`
-          $interpret_config_executable
-
+          # CHECK, IF THERE IS AN EXECUTABLE FOR THE BLOCK
+       if [[ ! -f ${PALM_BIN}/interpret_config${block}.x ]]
+       then
+          printf "\n\n  +++ no interpret_config found for given block \"$cond1 $cond2\""
+          printf "\n      run \"mbuild -u -h ...\" to generate utilities for this block"
+          locat=interpret_config; exit
        else
-
-             # CHECK, IF THERE IS AN EXECUTABLE FOR THE BLOCK
-          if [[ ! -f ${PALM_BIN}/interpret_config${block}.x ]]
-          then
-             printf "\n\n  +++ no interpret_config found for given block \"$cond1 $cond2\""
-             printf "\n      run \"mbuild -u -h ...\" to generate utilities for this block"
-             locat=interpret_config; exit
-          else
-             interpret_config${block}.x
-          fi
-
-       fi
+          interpret_config${block}.x
+       fi
+
     fi
     rm .mrun_environment
 
 
-       # AUSFUEHRUNG DER GENERIERTEN SHELL-KOMMANDOS IN DIESER SHELL
+       # EXECUTE SHELL-COMMANDS GENERATED BY interpret_config WITHIN THIS SHELL
     chmod  u+x  $interpreted_config_file
     export PATH=$PATH:.
@@ -957,5 +891,5 @@
 
 
-    # OPTIONSWERTE UEBERSTEUERN KONFIGURATIONSDATEI
+    # VALUES OF MRUN-OPTIONS OVERWRITE THOSE FROM THE CONFIGURATION-FILE
  [[ $mrun_memory     != 0   ]]  &&  memory=$mrun_memory
  [[ "$mrun_group_number" != "none" ]]  &&  group_number=$mrun_group_number
@@ -966,13 +900,13 @@
 
 
-    # QUELLTEXTVERZEICHNIS AUF LOKALER MASCHINE AUS KONFIGURATIONSDATEI
-    # BESTIMMEN (WUERDE SONST EVTL. DAS VERZEICHNIS DES JEWEILS UNTER -h
-    # ANGEGEBENEN REMOTE-RECHNERS SEIN)
-    # BEI BATCH-JOBS SIND DIE ZU UEBERSETZENDEN PROGRAMMTEILE SCHON KOMPLETT
+    # ON THE LOCAL MACHINE, DETERMINE (FROM THE CONFIGURATION-FILE) THE PATH
+    # FOR SOURCE-FILES TO BE COMPILED. 
+    # IN A BATCH-JOB, SOURCES (ROUTINES TO BE COMPILED) ARE COMPLETE ALREADY.
+    # BEFORE MRUN IS CALLED IN THE JOB, SOURCES_COMPLETE = true IS ASSIGNED (SEE FURTHER BELOW).
  if [[ "$SOURCES_COMPLETE" = "" ]]
  then
 
-       # ZUERST PRUEFEN, OB EIN GLOBALER QUELLTEXTPFAD FUER ALLE RECHNER
-       # VEREINBART WURDE
+       # FIRST CHECK, IF A GLOBAL SOURCE PATH (TO BE USED FOR ALL HOSTS)
+       # HAS BEEN DEFINED
     source_path=""
     line=""
@@ -1031,7 +965,7 @@
 
 
-    # GLOBALE REVISIONSNUMMER ERMITTELN (FORTSETZUNGSLAEUFEN WIRD DIESE
-    # DURCH OPTION -G MITGETEILT)
- if [[ "$global_revision" = ""   &&  $host != "ibmkisti" ]]
+    # GET THE GLOBAL REVISION-NUMBER OF THE SVN-REPOSITORY
+    # (HANDED OVER TO RESTART-RUNS USING OPTION -G)
+ if [[ "$global_revision" = ""  &&  $host != "ibmkisti" ]]
  then
     global_revision=`svnversion $source_path  2>/dev/null`
@@ -1040,9 +974,7 @@
 
 
-    # NOCHMAL PRUEFEN, OB AUF REMOTE-MASCHINE GERECHNET WERDEN SOLL
-    # (HOST KANN IN KONFIGURATIONSDATEI ANDERS FESTGELEGT WORDEN SEIN)
-    # WERT VON do_remote WIRD FUER DATEIVERBINDUNGEN BENOETIGT.
-    # WENN AUF REMOTE-MASCHINE GERECHNET WIRD, IST GLEICHZEITIG KLAR,
-    # DASS EIN BATCH-JOB GESTARTET WERDEN MUSS
+    # ??? das darf doch eigentlich garnicht passieren, weil optionen config-datei uebersteuern ???
+    # CHECK AGAIN, IF EXECUTION SHALL BE DONE ON A REMOTE-HOST (BATCH-JOB).
+    # (HOST MAY HAVE CHANGED DUE TO SETTINGS IN THE CONFIGURATION-FILE)
  if [[ -n $host  &&  "$host" != $localhost ]]
  then
@@ -1050,5 +982,5 @@
     do_remote=true
     case  $host  in
-        (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|lcsgib|lcsgih|nech|necriam|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
+        (ibm|ibmh|ibmkisti|ibmku|ibms|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|nech|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
         (*)  printf "\n"
              printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
@@ -1061,9 +993,9 @@
 
 
-    # PRUEFUNG EINIGER PROZESSORZAHLANGABEN BEI RECHNUNGEN AUF PARALLELRECHNERN
+    # IN CASE OF PARALLEL EXECUTION, CHECK SOME SPECIFICATIONS CONCERNING PROCESSOR NUMBERS
  if [[ "$cond1" = parallel  ||  "$cond2" = parallel ]]
  then
 
-       # PRUEFEN, OB DIE ANZAHL DER ZU VERWENDENDEN PES ANGEGEBEN WURDE
+       # CHECK, IF NUMBER OF CORES TO BE USED HAS BEEN GIVEN
     if [[ ! -n $numprocs ]]
     then
@@ -1076,7 +1008,6 @@
     fi
 
-       # PRUEFEN, OB DIE PROZESSORANZAHL PRO KNOTEN ANGEGEBEN WURDE (GGF.
-       # DEFAULT-WERT SETZEN) UND OB SIE EIN GANZZAHLIGER TEILER DER
-       # GESAMTPROZESSORANZAHL IST
+       # CHECK, IF THE NUMBER OF CORES PER NODE HAS BEEN GIVEN UND IF IT IS AN
+       # INTEGRAL DIVISOR OF THE TOTAL NUMBER OF CORES GIVEN BY OPTION -X
     if [[ "$tasks_per_node" = ""  &&  $host != lcflow  &&  $host != lcxt5m ]]
     then
@@ -1114,22 +1045,8 @@
 
 
-       # IBMY HAT NUR EINEN KNOTEN
-    if [[ $host = ibmy ]]
-    then
-       if [[ "$tasks_per_node" != ""  &&  "$tasks_per_node" != "$numprocs" ]]
-       then
-          printf "\n"
-          printf "\n  +++ on ibmy, tasks per node (option \"-T\") must be equal to the"
-          printf "\n      total number of processors (option \"-X\")"
-          printf "\n      values of this mrun-call: \"-T $tasks_per_node\" \"-X $numprocs\""
-          locat=tasks_per_node; (( iec = 0 )); exit 
-       fi
-    fi
-
-
        # SETTINGS FOR SUBJOB-COMMAND
     OOPT="-O $threads_per_task"
 
-       # GESAMTZAHL DER KNOTEN BESTIMMEN
+       # SET THE TOTAL NUMBER OF NODES, REQUIRED FOR THE SUBJOB-COMMAND (SEE FURTHER BELOW)
     if [[ "$tasks_per_node" != "" ]]
     then
@@ -1137,6 +1054,5 @@
     fi
 
-       # PRUEFEN, OB NODE USAGE EINEN ERLAUBTEN WERT HAT BZW. DEN DEFAULT
-       # SETZEN
+       # CHECK node_usage FOR ALLOWED VALUES AND SET DEFAULT VALUE, IF NECESSARY
     if [[ $node_usage = default ]]
     then
@@ -1144,7 +1060,4 @@
        then
           node_usage=shared
-       elif [[ $(echo $host | cut -c1-5) = lcsgi ]]
-       then
-          node_usage=singlejob
        else
           node_usage=not_shared
@@ -1162,5 +1075,5 @@
  fi
 
-    # PRUEFEN, OB HOSTFILE EXISTIERT
+    # CHECK IF HOSTFILE EXISTS
  if [[ -n $hostfile ]]
  then
@@ -1173,25 +1086,6 @@
  fi
 
-    # PRUEFEN, OB RHOSTS DATEI EXISTIERT. GEGEBENENFALLS ANLEGEN BZW. ERWEITERN
- if [[ $host = ibmy  &&  $do_remote = false ]]
- then
-    if [[ ! -f $HOME/.rhosts ]]
-    then
-       echo  "gfdl5.yonsei.ac.kr"  >  $HOME/.rhosts
-       printf "\n\n  *** file:"
-       printf "\n           $HOME/.rhosts"
-       printf "\n      was created\n"
-    fi
-    if [[ $(grep -c gfdl5.yonsei.ac.kr $HOME/.rhosts) = 0 ]]
-    then
-       echo  "gfdl5.yonsei.ac.kr"  >>  $HOME/.rhosts
-       printf "\n\n  *** file:"
-       printf "\n           $HOME/.rhosts"
-       printf "\n      was extended by the name of the current host\n"
-    fi
- fi
-
-
-    # Set default value for the maximum number of parallel io streams
+
+    # SET DEFAULT VALUE FOR THE MAXIMUM NUMBER OF PARALLEL IO STREAMS
  if [[ "$maximum_parallel_io_streams" = "" ]]
  then
@@ -1200,5 +1094,5 @@
 
 
-    # Set port number option for calls of ssh/scp, subjob and batch_scp scripts
+    # SET PORT NUMBER OPTION FOR CALLS OF SSH/SCP, subjob AND batch_scp SCRIPTS
  if [[ "$scp_port" != "" ]]
  then
@@ -1208,5 +1102,5 @@
 
 
-    # FALLS NICHT VORGEGEBEN, DEFAULT-QUEUE AUF DER ZIELMASCHINE FESTLEGEN
+    # SET DEFAULT-QUEUE, IF NOT GIVEN
  if [[ $queue = none ]]
  then
@@ -1214,14 +1108,10 @@
         (ibmh)       queue=cluster;;
         (ibmkisti)   queue=class.32plus;;
-        (ibmy)       queue=parallel;;
         (lckiaps)    queue=normal;;
         (lckyoto)    queue=ph;;
         (lckyuh)     queue=fx-single;;
         (lckyut)     queue=cx-single;;
-        (lcsgib)     queue=testq;;
-        (lcsgih)     queue=testq;;
         (lctit)      queue=S;;
         (nech)       queue=none;;
-        (necriam)    queue=SP;;
         (unics)      queue=unics;;
     esac
@@ -1229,7 +1119,6 @@
 
 
-    # VOLLSTAENDIGE DATEINAMEN DER INPUT-FILES BILDEN,
-    # INPUT-DATEIEN AUF VORHANDENSEIN PRUEFEN UND EVTL. HOECHSTE ZYKLUSNUMMER
-    # ERMITTELN
+    # GENERATE FULL FILENAMES OF INPUT-FILES, INCLUDING THEIR PATH
+    # CHECK, IF INPUT-FILES EXIST, AND DETERMINE HIGHEST CYCLE NUMBER (IF CYCLES EXIST)
  (( i = 0 ))
  while (( i < iin ))
@@ -1238,18 +1127,19 @@
     (( maxcycle = 0 ))
 
-       # NAMENSBILDUNG (EVTL. IST FESTER DATEINAME VORGEGEBEN)
+       # GENERATE PATH AND FULL FILE NAME (then-BRANCH: FIXED FULL NAME IS GIVEN, I.E. THE
+       # FILE IDENTIFIER IS NOT PART OF THE FILENAME))
     if [[ "${actionin[$i]}" = di ]]
     then
-       remotepathin[$i]=${pathin[$i]}/${endin[$i]}  # REMOTE-PFAD ERST AUF
-                                                    # REM-MASCHINE AUSWERTEN
+       remotepathin[$i]=${pathin[$i]}/${endin[$i]}  # EVALUATE REMOTE-PATH ON THE REMOTE
+                                                    # HOST ONLY
        eval filename=${pathin[$i]}/${endin[$i]}
     else
-       remotepathin[$i]=${pathin[$i]}/${afname}${endin[$i]}  # REMOTE-PFAD ERST AUF
-                                                             # REM-MASCHINE AUSWERTEN
+       remotepathin[$i]=${pathin[$i]}/${afname}${endin[$i]}  # EVALUATE REMOTE-PATH ON THE REMOTE
+                                                             # HOST ONLY
        eval filename=${pathin[$i]}/${afname}${endin[$i]}
     fi
     eval pathname=${pathin[$i]}
 
-#   SAVE INPUT FILE NAME FOR PARAMETER FILE CHECK
+       # SAVE INPUT FILE NAME FOR PARAMETER FILE CHECK
     if [[ ("${transin[$i]}" = job) && (-f $filename) ]]
     then
@@ -1257,5 +1147,5 @@
     fi
 
-       # PRUEFEN AUF VORHANDENSEIN
+       # CHECK IF FILE EXISTS
     if [[ $(ls $filename* 2>&1 | grep -c "not found") = 1  || \
           $(ls $filename* 2>&1 | grep -c "nicht gefunden") = 1  || \
@@ -1263,9 +1153,6 @@
           $(ls $filename* 2>&1 | grep -c "does not exist") = 1 ]]
     then
-          # DATEIEN MIT EXTENSION (Z.B. NC) MUESSEN NICHT ZWINGEND VORHANDEN
-          # SEIN, DESHALB IN SOLCHEN FAELLEN KEIN ABBRUCH. DIES IST NUR EINE
-          # VORUEBERGEHENDE LOESUNG (OKT 05). NICHT ZWINGEND BENOETIGTE
-          # EINGABEDATEIEN SOLLTEN EINE SPEZIELLE OPTION IN DER DATEI-
-          # VERBINDUNGSANWEISUNG BEKOMMEN (Z.B. inopt?)
+
+          # FILES WITH ATTRIBUTE locopt ARE OPTIONAL. NO ABORT, IF THEY DO NOT EXIST.
        if [[ "${transin[$i]}" != "locopt" ]]
        then
@@ -1284,5 +1171,5 @@
     else
 
-          # ZYKLUSNUMMER FESTSTELLEN
+          # DETERMINE THE FILE'S CYCLE NUMBER
        ls -1 -d $filename    >   filelist  2>/dev/null
        ls -1 -d $filename.*  >>  filelist  2>/dev/null
@@ -1307,5 +1194,5 @@
        rm filelist
 
-          # EVTL. ZYKLUSNUMMER AN DATEINAMEN ANFUEGEN
+          # APPEND CYCLE NUMBER TO FILENAME
        if (( maxcycle > 0 ))
        then
@@ -1323,6 +1210,6 @@
        fi
        
-          # DATEINAMEN OHNE PFAD ABER MIT ZYKLUSNUMMER ABSPEICHERN,
-          # DA SPAETER BEI RUECKSPEICHERN VOM ARCHIVSYSTEM EVTL. BENOETIGT
+          # STORE FILENAME WITHOUT PATH BUT WITH CYCLE NUMBER,
+          # BECAUSE IT MIGHT BE REQUIRED LATER TO RESTORE THE FILE FROM AN ARCHIVE-SYSTEM
        absnamein[$i]=$filename
        if (( maxcycle > 0 ))
@@ -1346,9 +1233,10 @@
  done
     
-    # VOLLSTAENDIGE DATEINAMEN (OHNE $ ODER ~) DER OUTPUT-FILES BILDEN,
-    # OUTPUT-DATEIEN AUF VORHANDENSEIN PRUEFEN UND EVTL. HOECHSTE ZYKLUSNUMMER
-    # ERMITTELN ODER, FALLS NICHT VORHANDEN, PRUEFEN, OB SIE SICH ANLEGEN LASSEN
-    # DIESE AKTIONEN FINDEN NICHT STATT, WENN PROGRAMM AUF REMOTE-MASCHINE
-    # RECHNET UND DATEI ANSCHLIESSEND TRANSFERIERT WERDEN SOLL!
+    # GENERATE FULL FILENAMES OF OUTPUT-FILES (WITHOUT $ OR ~),
+    # CHECK, IF OUTPUT-FILES EXIST, AND DETERMINE HIGHEST CYCLE NUMBER (IF CYCLES EXIST),
+    # OR, IN CASE THAT FILE DOES NOT EXIST, CHECK, IF IT CAN BE CREATED  
+    # THESE ACTIONS ARE NOT CARRIED OUT, IF FILES SHALL BE TRASFERRED FROM THE REMOTE TO
+    # THE LOCAL HOST (BECAUSE THEIR IS NO DIRECT ACCESS TO THE LOCAL DIRECTORIES FROM THE
+    # REMOTE HOST)
  (( i = 0 ))
  while (( i < iout ))
@@ -1376,5 +1264,5 @@
        then
       
-             # OUTPUT-DATEI NICHT VORHANDEN. PRUEFEN, OB ANLEGEN MOEGLICH.
+             # IF OUTPUT-FILE DOES NOT EXIST CHECK, IF IT CAN BE CREATED
           if  cat /dev/null > $filename  
           then
@@ -1382,5 +1270,6 @@
           else
 
-                # PRUEFEN, OB KATALOG VORHANDEN UND EVTL. DIESEN ANLEGEN
+                # CHECK, IF THE DIRECTORY WHERE FILE SHALL BE COPIED TO EXISTS
+                # IF IT DOES NOT EXIST, TRY TO CREATE IT
              if [[ ! -d $catalogname ]]
              then
@@ -1408,5 +1297,5 @@
        else
 
-             # ZYKLUSNUMMER FESTSTELLEN
+             # DETERMINE THE CYCLE NUMBER
           ls -1 -d $filename    >   filelist  2>/dev/null
           ls -1 -d $filename.*  >>  filelist  2>/dev/null
@@ -1428,8 +1317,6 @@
        fi
 
-          # EVTL. ZYKLUSNUMMER AN DATEINAMEN ANFUEGEN UND PRUEFEN, OB SICH
-          # DATEI AUCH WIRKLICH ANLEGEN LAESST. IM APPEND-FALL MUSS AN DEN
-          # HOECHSTEN VORHANDENEN ZYKLUS-ANGEHAENGT WERDEN. ANLAGEPRUEFUNG
-          # IST DANN NATUERLICH NICHT ZULAESSIG BZW. MOEGLICH
+          # APPEND CYCLE NUMBER TO FILENAME AND CHECK, IF FILE CAN BE CREATED
+          # IN CASE OF FILE-APPEND, FILE MUST BE APPENDED TO THE ONE WITH HIGHEST CYCLE NUMBER
        if [[ "${actionout[$i]}" != a ]]
        then
@@ -1455,7 +1342,7 @@
        fi
        
-          # DATEINAMEN OHNE PFAD ABER MIT ZYKLUSNUMMER ABSPEICHERN,
-          # DA SPAETER BEI ABLAGE AUF ARCHIVSYSTEM BZW. FUER
-          # DATEI OUTPUT_FILE_CONNECTIONS EVTL. BENOETIGT
+          # STORE FILENAME WITHOUT PATH BUT WITH CYCLE NUMBER,
+          # BECAUSE IT MIGHT BE REQUIRED LATER TO STORE THE FILE ON AN ARCHIVE-SYSTEM
+          # OR TO PUT THIS FILENAME ON FILE OUTPUT_FILE_CONNECTIONS
        pathout[$i]=$filename
        if (( maxcycle > 0 ))
@@ -1470,5 +1357,5 @@
 
 
-     # DAS DVR-PAKET ERFORDERT EINE ENTSPRECHENDE BIBLIOTHEK
+     # THE DVR-PACKAGE REQUIRES ITS OWN LIBRARY
  if [[ $(echo $package_list | grep -c dvrp_graphics) != 0 ]]
  then
@@ -1488,7 +1375,6 @@
 
 
-     # PRUEFEN, OB ENTWEDER HAUPTPROGRAMM ODER NUR EIN AUSFUEHRBARES
-     # PROGRAMM VEREINBART WURDE (IN DIESEM FALL BRAUCHT IM WEITEREN NICHT
-     # UEBERSETZT ZU WERDEN)
+     # CHECK, WETHER A MAIN PROGRAM OR AN EXECUTABLE HAVE BEEN DECLARED.
+     # EXECUTABLES DO NOT NEED TO BE COMPILED.
  if [[ "$mainprog" = ""  &&  "$executable" = "" ]]
  then
@@ -1505,7 +1391,6 @@
 
 
-    # SOURCE-VERZEICHNIS ZUM AUFSAMMELN DER ZU UEBERSETZENDEN PROGRAMMTEILE
-    # ERZEUGEN. HIERHIN WERDEN SPAETER IM FALL VON BATCH-JOBS AUCH DAS MRUN-
-    # SCRIPTS SOWIE DIE KONFIGURATIONSDATEI KOPIERT
+    # CREATE SOURCE-DIRECTORY TO COLLECT ROUTINES TO BE COMPILED.
+    # LATER THE MRUN-SCRIPT AND CONFIGURATION-FILE WILL ALSO BE COPIED TO THIS DIRECTORY.
  if [[ $restart_run != true  &&  "$SOURCES_COMPLETE" = "" ]]
  then
@@ -1515,8 +1400,7 @@
 
 
-    # ALLE ZU UEBERSETZENDEN PROGRAMMTEILE ZUSAMMENSAMMELN
-    # BEI BATCH-JOBS IST DIES NICHT NOETIG, WEIL DIE PROGRAMMTEILE BEREITS DURCH
-    # DEN MRUN-AUFRUF ERMITTELT SIND, DER DEN BATCH-JOB GENERIERT HAT, UND
-    # IM VERZEICHNIS SOURCES_FOR_RUN_... ABGELEGT SIND
+    # COLLECT ALL ROUTINES TO BE COMPILED
+    # THIS IS NOT REQUIRED WITHIN BATCH-JOBS, BECAUSE ROUTINES HAVE ALREADY BEEN COLLECTED
+    # BY THE MRUN-CALL WHICH CREATED THE BATCH-JOB.
  if [[ $do_compile = true  &&  "$SOURCES_COMPLETE" = "" ]]
  then
@@ -1527,10 +1411,10 @@
     then
 
-          # MODIFIZIERTE DATEIEN DER SVN-ARBEITSKOPIE BESTIMMEN
+          # DETERMINE MODIFIED FILES OF THE SVN WORKING COPY
        source_list=""
        cd  $source_path
 
 
-          # PRUEFEN, OB VERZEICHNIS UEBERHAUPT UNTER SVN-KONTROLLE STEHT
+          # CHECK, IF DIRECTORY IS UNDER SVN CONTROL
        if [[ ! -d .svn ]]
        then
@@ -1542,5 +1426,5 @@
 
 
-          # ALLE MODIFIZIERTEN QUELLCODEDATEIEN AUFLISTEN
+          # LIST ALL MODIFIED SOURCE CODE FILES
        Filenames=""
        svn status  >  tmp_mrun
@@ -1560,5 +1444,5 @@
 
 
-          # DATEIEN NACH SOURCES_FOR_RUN_... KOPIEREN
+          # COPY FILES TO SOURCES_FOR_RUN_...
        for  dateiname  in  $Filenames
        do
@@ -1570,7 +1454,6 @@
 
 
-       # MITTELS OPTION -s ANGEGEBENE DATEIEN NACH SOURCES_FOR_RUN_... KOPIEREN
-       # BEI AUTOMATISCHEN FORTSETZUNGSLAEUFEN SIND DORT SCHON ALLE DATEIEN
-       # VORHANDEN
+       # COPY FILES GIVEN BY OPTION -s TO DIRECTORY SOURCES_FOR_RUN_...
+       # AUTOMATIC RESTART RUNS JUST ACCESS THE DIRECTORY CREATED BY THE INITIAL RUN
     elif [[ "$source_list" != ""  &&  $restart_run != true ]]
     then
@@ -1581,5 +1464,5 @@
        do
 
-             # QUELLTEXT-DATEI DARF KEINE PFADE BEINHALTEN
+             # SOURCE CODE FILE IS NOT ALLOWED TO INCLUDE PATH
           if [[ $(echo $filename | grep -c "/") != 0 ]]
           then
@@ -1605,7 +1488,6 @@
 
 
-       # PRUEFEN, OB ENTWEDER HAUPTPROGRAMM VORHANDEN UND ES EVTL. IN DER
-       # LISTE DER ZU UEBERSETZENDEN PROGRAMMTEILE MIT ENTHALTEN IST (WENN
-       # NICHT, WIRD ES DIESER LISTE HINZUGEFUEGT)
+       # CHECK, IF A MAIN PROGRAM EXISTS AND IF IT IS PART OF THE LIST OF FILES
+       # TO BE COMPILED. IF NOT, ADD IT TO THE LIST.
     if [[ $restart_run != true ]]
     then
@@ -1627,6 +1509,6 @@
 
 
-       # MAKEFILE AUF VORHANDENSEIN PRUEFEN UND KOPIEREN
-       # BEI RESTART-LAEUFEN LIEGT ES SCHON IM VERZEICHNIS SOURCES_FOR_RUN...
+       # CHECK, IF MAKEFILE EXISTS AND COPY IT TO THE SOURCES_FOR_RUN... DIRECTORY
+       # NOT REQUIRED FOR RESTART RUNS, SOURCES_FOR_RUN... HAS BEEN CREATED BY THE INITIAL RUN
     if [[ "$restart_run" != true ]]
     then
@@ -1642,9 +1524,9 @@
 
 
-       # DATEIEN AUS ZUSAETZLICHEM QUELLVERZEICHNIS HINZUFUEGEN
+       # COPY FILES FROM OPTIONAL SOURCE PATH GIVEN IN THE CONFIGURATION FILE
     if [[ $restart_run != true  &&  "$add_source_path" != "" ]]
     then
 
-          # GIBT ES DAS VERZEICHNIS UEBERHAUPT?
+          # DOES THE DIRECTORY EXIST?
        if [[ ! -d $add_source_path ]]
        then
@@ -1711,17 +1593,4 @@
              else
 
-                # Default User-Interface von der Liste entfernen, falls Datei
-                # ein User-Interface enthaelt
-#             if [[ $( cat $dateiname | grep -c "END SUBROUTINE user_parin" ) != 0 ]]
-#             then
-#                if [[ $dateiname != user_interface.f90  &&  -f user_interface.f90 ]]
-#                then
-#                   rm -rf  user_interface.f90
-#                   source_list=`echo $source_list | sed -e 's/user_interface.f90//'`
-#                   printf "\n\n  *** default \"user_interface.f90\" removed from the files to be translated"
-#                   printf "\n      since a user-interface is found in file"
-#                   printf "\n      \"$add_source_path/$dateiname\" \n"
-#                   sleep 3
-#                else
                 if [[ $found = false ]]
                 then
@@ -1744,6 +1613,6 @@
 
 
-       # ALLE UNTERPROGRAMME, DIE ZU VEREINBARTEN SOFTWAREPAKETEN GEHOEREN,
-       # DER LISTE DER ZU UEBERSETZENDEN DATEIEN HINZUFUEGEN
+       # ADD ALL ROUTINES BELONGING TO SOFTWARE PACKAGES (GIVEN BY OPTION -p)
+       # TO THE LIST OF FILES TO BE COMPILED
     if [[ $restart_run != true  &&  -n $package_list ]]
     then
@@ -1756,12 +1625,12 @@
           [[ $package = "dvrp_graphics+1PE" ]]  &&  package=dvrp_graphics
 
-             # ERMITTELE ALLE DATEIEN, DIE ZUM PAKET GEHOEREN
-             # FEHLERMELDUNGEN WERDEN ABGEFANGEN, DA * AUCH VERZEICHNISSNAMEN
-             # LIEFERT
+             # DETERMINE FILES BELONGING TO THE PACKAGE
+             # ERROR MESSAGE ARE REDIRECTED TO /dev/null, BECAUSE WILDCARD (*) ALSO GIVES
+             # THE NAME OF THE DIRECTORY
           package_source_list=`grep "defined( __$package " * 2>/dev/null | cut -f1 -d:`
 
 
-             # FUEGE DIESE DATEIEN DER LISTE DER ZU UEBERSETZENDEN DATEIEN
-             # HINZU, FALLS SIE NOCH NICHT DAZUGEHOEREN
+             # ADD THESE FILES TO THE LIST OF FILES TO BE COMPILED,
+             # IF THEY ARE NOT ALREADY PART OF THE LIST
           for  source_list_name  in  $package_source_list
           do
@@ -1769,5 +1638,5 @@
              then
 
-                    # NUR DATEIEN MIT GUELTIGEN ENDUNGEN VERWENDEN
+                    # ONLY TAKE FILES WITH VALID SUFFIX
                 ending=`echo $source_list_name | cut -f2 -d.`
                 if [[ "$ending" = f90  ||  "$ending" = F90  ||  "$ending" = f  ||  "$ending" = F  ||  "$ending" = c ]]
@@ -1783,30 +1652,13 @@
     fi
 
-
-       # MAKEFILE AUF VORHANDENSEIN PRUEFEN UND KOPIEREN
-       # BEI RESTART-LAEUFEN LIEGT ES SCHON IM VERZEICHNIS SOURCES_FOR_RUN...
-#    if [[ "$restart_run" != true ]]
-#    then
-#       [[ "$makefile" = "" ]]  &&  makefile=$source_path/Makefile
-#       if [[ ! -f $makefile ]]
-#       then
-#          printf "\n  +++ file \"$makefile\" does not exist"
-#          locat=make; exit
-#       else
-#          cp  $makefile  SOURCES_FOR_RUN_$fname/Makefile 
-#       fi
-#    fi
-
  fi  # do_compile=true
 
 
-    # FALLS PROGRAMMTEILE UEBERSETZT WERDEN SOLLEN, FOLGEN JETZT EINIGE
-    # UEBERPRUEFUNGEN UND DAS SETZEN DER PRAEPROZESSOR-DIREKTIVEN
+    # IF SOURCE CODE IS TO BE COMPILED, DO SOME MORE CHECKS
+    # AND SET PRE-PROCESSOR DIRECTIVES
  if [[ $do_compile = true  ||  $create_executable_for_batch = true ]]
  then
 
-       # PRAEPROZESSOR-DIREKTIVEN ZUM SELEKTIVEN AUSWAEHLEN VON CODETEILEN
-       # ZUSAMMENSETZEN
-       # DIREKTIVEN ZUM AKTIVIEREN VON RECHNERSPEZIFISCHEM CODE
+       # SET PREPROCESSOR-DIRECTIVES TO SELECT OPERATING SYSTEM SPECIFIC CODE
     if [[ $(echo $localhost | cut -c1-3) = ibm ]]
     then
@@ -1822,5 +1674,5 @@
     fi
 
-       # DIREKTIVEN DIE DURCH OPTION -K BESTIMMT WERDEN (Z.B. PARALLEL)
+       # SET DIRECTIVES GIVEN BY OPTION -K (E.G. parallel)
     if [[ $(echo $localhost | cut -c1-3) = ibm ]]
     then
@@ -1832,5 +1684,5 @@
     fi
 
-       # DIREKTIVEN DIE SOFTWAREPAKETE AKTIVIEREN (OPTION -p)
+       # SET DIRECTIVES FOR ACTIVATING SOFTWARE-PACKAGES (OPTION -p)
     if [[ -n $package_list ]]
     then
@@ -1858,5 +1710,5 @@
     fi
 
-       # DIREKTIVEN DIE DURCH OPTION -D FESTGELEGT SIND
+       # SET DIRECTIVES GIVEN BY OPTION -D
     if [[ -n $cpp_opts ]]
     then
@@ -1875,5 +1727,5 @@
 
 
-       # BEI LOKALEN RECHNUNGEN PRUEFEN, OB EXECUTABLE VORHANDEN
+       # FOR LOCAL RUNS CHECK AGAIN, IF EXECUTABLE EXISTS
     if [[ $do_remote = false ]]
     then
@@ -1888,5 +1740,5 @@
 
 
-    # JOBMODUS FESTSTELLEN 
+    # DETERMINE THE JOB MODE
  if [[ "$ENVIRONMENT" = BATCH ]]
  then
@@ -1897,5 +1749,5 @@
 
 
-    # no interactive runs on lctit
+    # NO INTERACTIVE RUNS ALLOWED ON LCTIT 
  if [[ $host = lctit  &&  $jobmo = INTERACTIVE  &&  $do_batch = false ]]
  then
@@ -1906,6 +1758,5 @@
 
 
-    # HOSTSPEZIFISCHE DEFAULT-COMPILER SETZEN, FALLS NICHT BEREITS
-    # DURCH BENUTZER ANDERWEITIG VEREINBART
+    # CHECK, IF USER DEFINED A COMPILER
  if [[ "$compiler_name" = "" ]]
  then
@@ -1917,10 +1768,5 @@
 
 
-    # COMPILER AUF RIAMS NEC UEBERSCHREIBEN
- [[ $localhost = necriam ]]  &&  compiler_name=mpif90
-
-
-
-    # TEMPORAEREN KATALOGNAMEN BESTIMMEN
+    # DETERMINE THE NAME OF MRUN'S TEMPORARY WORKING DIRECTORY
  kennung=$RANDOM
  if [[ "$tmp_user_catalog" = "" ]]
@@ -1939,6 +1785,5 @@
 
 
-    # KATALOGNAMEN FUER ZWISCHENSPEICHERUNG VON FORTSETZUNGSLAUFDATEIEN
-    # BESTIMMEN
+    # DETERMINE THE NAME OF THE DIRECTORY WHICH IS USED TO TEMPORARILY STORE DATA FOR RESTART RUNS
  if [[ "$tmp_data_catalog" = "" ]]
  then
@@ -1952,6 +1797,5 @@
 
 
-    # EVENTUELL BEI LOKALEN RECHNUNGEN $-ZEICHEN IN ENVIRONMENT-VARIABLEN
-    # ERSETZEN
+    # IN CASE OF LOCAL RUNS REPLACE ENVIRONMENT VARIABLES BY THEIR VALUES
  if [[ $do_remote = false  &&  $do_compile = true  ||  $create_executable_for_batch = true ]]
  then
@@ -1962,9 +1806,9 @@
 
 
-    # COMPILE- UND LINK-OPTIONEN BESTIMMEN
+    # DETERMINE COMPILE- AND LINK-OPTIONS
  fopts="$fopts $netcdf_inc $fftw_inc $dvr_inc"
  lopts="$lopts $netcdf_lib $fftw_lib $dvr_lib"
  ROPTS="$ropts"
-# if [[ ( $(echo $host | cut -c1-3) = nec  ||  $(echo $host | cut -c1-3) = ibm  ||  $host = lckyoto  ||  $host = lcsgih  ||  $host = lcsgib  ||  $host = lctit  ||  $host = lcfimm  ||  $host = lcflow  ||  $host = lcxe6 ||  $host = lcxt5m || $host = lck || $host = lckiaps || $host = lckordi || $host = lcsb || $host )  &&  -n $numprocs ]]
+# if [[ ( $(echo $host | cut -c1-3) = nec  ||  $(echo $host | cut -c1-3) = ibm  ||  $host = lckyoto  ||  $host = lctit  ||  $host = lcflow  ||  $host = lcxe6 ||  $host = lcxt5m || $host = lck || $host = lckiaps || $host = lckordi || $host = lcsb || $host )  &&  -n $numprocs ]]
 # then
     XOPT="-X $numprocs"
@@ -1973,6 +1817,6 @@
 
 
-    # PRUEFEN DER CPU-ZEIT. (CPUMAX WIRD ALS ENV-VARIABLE VOM HAUTPRO-
-    # GRAMM BENOETIGT
+    # CHECK THE CPU-LIMIT. IT MUST BE GIVEN FOR BATCH-JOBS AND IS COMMUNICATED TO THE
+    # EXECUTABLE VIA NAMELIST-PARAMETER cputime
  done=false
  while [[ $done = false ]]
@@ -2000,5 +1844,5 @@
 
 
-    # PRUEFEN DER KERNSPEICHERANFORDERUNG
+    # CHECK THE MEMORY DEMAND
  if [[ $do_batch = true ]]
  then
@@ -2019,5 +1863,5 @@
 
 
-    # PRUEFEN, OB FUER REMOTE-RECHNUNGEN EIN BENUTZERNAME ANGEGEBEN WURDE
+    # IN CASE OF REMOTE-JOBS CHECK, IF A USERNAME FOR THE REMOTE HOST IS GIVEN
  if [[ $do_remote = true  &&  -z $remote_username ]]
  then
@@ -2039,5 +1883,5 @@
 
 
-    # set module load command and export for subjob
+    # SET THE MODULE-LOAD COMMAD AND EXPORT IT FOR subjob
  if [[ "$modules" != "" ]]
  then
@@ -2050,44 +1894,9 @@
  fi
 
-    # bugfix for wrong netcdf module and for netCDF4 usage in case of mpt
- if [[ $host = lcsgib  ||  $host = lcsgih ]]
- then
-    if [[ $(echo $module_calls | grep -c netcdf/3.6.3-intel) != 0 ]]
-    then
-       export module_calls="$module_calls export LD_LIBRARY_PATH=/sw/dataformats/netcdf/3.6.3-intel/lib:\$LD_LIBRARY_PATH;"
-    fi
-#     if [[ $(echo $module_calls | grep -c mpt) != 0 ]]
-#     then
-#        export module_calls="$module_calls export LD_LIBRARY_PATH=/sw/sgi/mpt/2011-02-07/lib:\$LD_LIBRARY_PATH;"
-#        echo "*** module_calls = $module_calls"
-#     fi
- fi
-
-
-    # SET DEFAULT VALUE FOR MPI MODULE TO BE USED ON SGI-ALTIX
- if [[ $host = lcsgib  ||  $host = lcsgih ]]
- then
-    if [[ $(echo $modules | grep -c mpt ) != 0 ]]
-    then
-       mpilib=mpt
-    elif [[ $(echo $modules | grep -c mvapich ) != 0 ]]
-    then
-       mpilib=mvapich
-    elif [[ $(echo $modules | grep -c impi ) != 0 ]]
-    then
-       mpilib=impi
-    fi
- fi
-
-
-
-###########################################################################
-# HEADER-AUSGABE
-###########################################################################
-
-
+
+
+    # OUTPUT OF THE MRUN-HEADER
  calltime=$(date)
  printf "\n"
-# [[ $silent = false ]]  &&  clear
  printf "#------------------------------------------------------------------------# \n"
  printf "| %-35s%35s | \n" "$version" "$calltime"
@@ -2095,14 +1904,9 @@
  spalte1="called on:"; spalte2=$localhost_realname
  printf "| %-25s%-45s | \n" "$spalte1" "$spalte2"
- if [[ $local_compile = false ]]
- then
-    if [[ $do_remote = true ]]
-    then
-       spalte1="execution on:"; spalte2="$host (username: $remote_username)"
-    else
-       spalte1="execution on:"; spalte2="$host ($localhost_realname)"
-    fi
+ if [[ $do_remote = true ]]
+ then
+    spalte1="execution on:"; spalte2="$host (username: $remote_username)"
  else
-    spalte1="compiling test only!"; spalte2=""
+    spalte1="execution on:"; spalte2="$host ($localhost_realname)"
  fi
  printf "| %-25s%-45s | \n" "$spalte1" "$spalte2"
@@ -2246,5 +2050,5 @@
 
 
-    # BEDINGTE AUSGABE DER DATEIVERBINDUNGEN
+    # OUTPUT OF FILE CONNECTIONS IN CASE OF TRACEBACK
  if [[ $do_trace = true ]]
  then
@@ -2292,5 +2096,5 @@
 
 
-    # ABFRAGEN BEI AUFRUF AUF LOKALER MASCHINE 
+    # QUERY FOR CONTINUE (ON LOCAL MACHINES ONLY)
  if [[ $remotecall = false  &&  $silent = false  &&  $jobmo != BATCH ]]
  then
@@ -2315,10 +2119,5 @@
        printf " >>> batch-job will be created and submitted"
     else
-       if [[ $local_compile = false ]]
-       then
-          printf " >>> MRUN will now continue to execute on this machine"
-       else
-          printf " >>> a test compilation will now be carried out on this machine"
-       fi
+       printf " >>> MRUN will now continue to execute on this machine"
     fi
  fi
@@ -2544,5 +2343,5 @@
           if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
           then
-                # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING UND ALLE -D ENTFERNEN
+                # REMOVE COLONS FROM OPTION-STRING, REMOVE ALL -D OPTIONS
              line="$line "
              copts_check=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g' | sed 's/-D[^ ]* //g' | sed 's/ -D.*//g'`
@@ -2821,11 +2620,11 @@
 
 
-    # FALLS AUF DIESER MASCHINE GERECHNET WERDEN SOLL, WERDEN JETZT ENTSPRE-
-    # CHENDE AKTIONEN DURCHGEFUEHRT
+    # NOW PERFORM THOSE ACTIONS REQUIRED TO EXECUTE THE PROGRAM (PALM) ON THIS MACHINE
+    # (COMPILING/LINKING, EXECUTING, COPYING I/O FILES)
  if [[ $do_batch = false ]]
  then
 
 
-       # TEMPORAEREN KATALOG ERZEUGEN
+       # CREATE THE TEMPORARY WORKING DIRECTORY
     mkdir -p  $TEMPDIR
     chmod  go+rx  $TEMPDIR
@@ -2833,6 +2632,6 @@
 
 
-       # SAEMTLICHE QUELLTEXT-DATEIEN BZW. AUSFUEHRBARES PROGRAMM IN 
-       # TEMPORAERES VERZEICHNIS KOPIEREN
+       # COPY EITHER THE COMPLETE SOURCE CODE FILES TO BE COMPILED OR THE EXECUTABLE 
+       # INTO THE TEMPORARY WORKING DIRECTORY
     if [[ $do_compile = true ]]
     then
@@ -2878,13 +2677,13 @@
 
 
-       # WECHSEL IN TEMPORAEREN KATALOG
+       # CHANGE TO THE TEMPORARY WORKING DIRECTORY
     cd  $TEMPDIR
     printf "\n  *** changed to temporary directory: $TEMPDIR"
 
 
-       # OUTPUT-DATEI-VERBINDUNGEN AUF TEMPORAERER DATEI ABLEGEN
-       # DIESE DATEI KANN VON SPAETER AUFZURUFENDEN BENUTZERPROZEDUREN GELESEN
-       # WERDEN, UM ZU LOKALEN DATEINAMEN GEHOERENDE PERMANENTE NAMEN ZU
-       # ERMITTELN
+       # THE FOLLOWING IS REQUIRED FPR AVS-OUTPUT WITH PALM  ??? REMOVE ???
+       # WRITE INFORMATIONS ABOUT THE OUTPUT-FILE CONNECTIONS TO A TEMPORARY FILE
+       # THIS FILE CAN LATER BE READ FROM USER-DEFINED CODE TO DETERMINE THE
+       # RELATION BETWEEN THE LOCAL TEMPORARY AND PERMANENT FILE NAMES
     (( i = 0 ))
     while (( i < iout ))
@@ -2900,5 +2699,5 @@
 
 
-       # IF REQUIRED, START WITH COMPILING ACTIONS
+       # IF REQUIRED, START WITH COMPILING
     if [[ $do_compile = true ]]
     then
@@ -2915,5 +2714,5 @@
 
              # COMPILING WITH MAKE (ON NEC COMPILER IS CALLED ON HOST CROSS)
-          printf "\n\n\n  *** compilation starts \n$striche\n"
+          printf "\n\n\n  *** compilation starts \n$dashes\n"
           printf "  *** compilation with make using following options:\n"
           printf "      make depository:          $make_depository"
@@ -2943,17 +2742,5 @@
              ssh  $SSH_PORTOPT  plogin1  -l $usern  "$init_cmds export PATH=/sw/ibm/xlf/13.1.0.8/usr/bin:$PATH; $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
              [[ ! -f a.out ]]  &&  compile_error=true
-             continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
-          elif [[ $localhost = lcsgib ]]
-          then
-             printf "      compiler is called via ssh on \"bicegate0\" \n"
-             ssh  $SSH_PORTOPT  bicegate0  -l $usern  "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
-             [[ ! -f a.out ]]  &&  compile_error=true
-             continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
-          elif [[ $localhost = lcsgih ]]
-          then
-             printf "      compiler is called via ssh on \"hicegate0\" \n"
-             ssh  $SSH_PORTOPT  hicegate0  -l $usern  "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" 2>&1 "
-             [[ ! -f a.out ]]  &&  compile_error=true
-             continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
+             continue   # STATUS=1, IF a.out EXISTS
           elif [[ $localhost = lcflow ]]
           then 
@@ -2962,5 +2749,5 @@
              check_for_file=`/usr/bin/ssh $SSH_PORTOPT flow02.hpc.uni-oldenburg.de -l $usern "ls $TEMPDIR/a.out 2> /dev/null"`
              [[ "$check_for_file" = "" ]]  &&  compile_error=true
-             continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
+             continue   # STATUS=1, IF a.out EXISTS
           elif [[ $localhost = lccrayb  ||  $localhost = lccrayf ||  $localhost = lccrayh ]]
           then
@@ -2979,23 +2766,14 @@
              exit
           else
-             printf "$striche\n  *** compilation finished \n"
-          fi
-
-       fi
-
-    fi
-
-
-       # FALLS NUR TESTWEISE KOMPILIERT WERDEN SOLLTE, IST MRUN JETZT FERTIG
-    if [[ $local_compile = true ]]
-    then
-       cd  $HOME
-       rm -rf $TEMPDIR
-       locat=local_compile; exit
-    fi
-
-
-       # BEREITSTELLEN DER INPUT-DATEIEN
-       # SCHLEIFE UEBER ALLE VOM BENUTZER ANGEGEBENEN DATEIEN
+             printf "$dashes\n  *** compilation finished \n"
+          fi
+
+       fi
+
+    fi
+
+
+       # PROVIDE THE INPUT FILES
+       # LOOP OVER ALL ACTIVATED FILES (LISTED IN THE CONFIGURATION FILE)
     (( i = 0 ))
     while (( i < iin ))
@@ -3004,9 +2782,9 @@
        if (( i == 1 ))
        then
-          printf "\n\n  *** providing INPUT-files:\n$striche"
-       fi
-
-
-          # OPTIONALE DATEIEN BEI NICHTVORHANDENSEIN UEBERGEHEN
+          printf "\n\n  *** providing INPUT-files:\n$dashes"
+       fi
+
+
+          # SKIP OPTIONAL FILES, IF THEY DO NOT EXIST
        if [[ "${transin[$i]}" = unavailable ]]
        then
@@ -3022,5 +2800,5 @@
        fi
 
-          # PRUEFEN, OB EINZELDATEI ODER DATEI PRO PROZESSOR
+          # CHECK FOR SINGLE FILE (SERIAL RUN) OR DIRECTORY (ONE FILE PER CORE FOR PARELLEL EXECUTION)
        files_for_pes=false; datentyp=file
        if [[ "${actionin[$i]}" = pe  &&  -n $numprocs ]]
@@ -3054,8 +2832,7 @@
        fi
 
-          # INPUT-DATEI FUER EINEN FORTSETZUNGSLAUF. ES WIRD GEPRUEFT,
-          # OB DIESE DATEI NOCH AUF DEM TEMPORAEREN DATENKATALOG VORHANDEN
-          # IST. FALLS NICHT, WIRD VERSUCHT, SIE ANSCHLIESSEND VOM ARCHIV-
-          # SERVER ZU HOLEN
+          # INPUT-FILE FOR A RESTART RUN.
+          # CHECK, IF THIS FILE STILL EXISTS ON THE TEMPORARY DATA DIRECTORY.
+          # IF NOT, TRY TO GET IT FROM THE ARCHIVE SYSTEM
        if [[ "${actionin[$i]}" = fl ]]
        then
@@ -3104,5 +2881,5 @@
 
 
-          # DATEI LIEGT AUF ARCHIV-SERVER
+          # FILE IS STORED ON THE ARCHIVE SYSTEM
        if [[ "${actionin[$i]}" = ar ]]
        then
@@ -3162,20 +2939,10 @@
              if [[ $files_for_pes = false ]]
              then
-                if [[ $localhost = lcsgih ]]
-                then
-                   ssh  $SSH_PORTOPT  $usern@hicedata.hlrn.de  "cp  $PERM/${frelin[$i]}  $PWD"
-                else
-                   ssh  $SSH_PORTOPT  $usern@bicedata.hlrn.de  "cp  $PERM/${frelin[$i]}  $PWD"
-                fi
+                ssh  $SSH_PORTOPT  $usern@bicedata.hlrn.de  "cp  $PERM/${frelin[$i]}  $PWD"
              else
                 (( inode = 0 ))
                 while (( inode < nodes ))
                 do
-                   if [[ $localhost = lcsgih ]]
-                   then
-                      ssh  $SSH_PORTOPT  $usern@hicedata.hlrn.de  "cd $PWD; tar  xf  $PERM/${frelin[$i]}/${frelin[$i]}.node_$inode.tar"
-                   else
-                      ssh  $SSH_PORTOPT  $usern@bicedata.hlrn.de  "cd $PWD; tar  xf  $PERM/${frelin[$i]}/${frelin[$i]}.node_$inode.tar"
-                   fi
+                   ssh  $SSH_PORTOPT  $usern@bicedata.hlrn.de  "cd $PWD; tar  xf  $PERM/${frelin[$i]}/${frelin[$i]}.node_$inode.tar"
                    (( inode = inode + 1 ))
                 done
@@ -3205,6 +2972,6 @@
           then
 
-                # DATEI AUCH AUF TEMPORAERES DATENVERZEICHNIS LEGEN, DAMIT
-                # SIE BEI WEITEREN ZUGRIFFEN NOCH VORHANDEN IST
+                # PUT FILE ON THE TEMPORARY DATA DIRECTORY TOO.
+                # THIS WILL MAKE FILE ACCESS EASIER FOR LATER RUNS 
              [[ ! -d $tmp_data_catalog ]]  &&  mkdir -p  $tmp_data_catalog; chmod  g+rx  $tmp_data_catalog
              if [[ $files_for_pes = false ]]
@@ -3217,5 +2984,5 @@
              got_tmp[$i]=true
 
-                # DATEI UNTER LOKALEM NAMEN ZUR VERFUEGUNG STELLEN
+                # PROVIDE THE FILE UNDER ITS LOCAL NAME
              mv  ${frelin[$i]}  ${localin[$i]}
 
@@ -3224,5 +2991,5 @@
 
 
-          # DATEI LIEGT IM VOM BENUTZER ANGEGEBENEN VERZEICHNIS
+          # FILE IS STORED IN THE RESPECTIVE DIRECTORY GIVEN IN THE CONFIGURATION FILE
        if [[ "${actionin[$i]}" = ""  ||  "${actionin[$i]}" = "di"  ||  "${actionin[$i]}" = "npe" ]]
        then
@@ -3231,5 +2998,6 @@
           then
 
-                # DATEI WIRD FUER DIE PROZESSOREN EINES PARALLERECHNERS BEREITGESTELLT
+                # FILE COPIES ARE PROVIDED FOR ALL CORES
+                # EACH FILE GETS A UNIQUE FILENAME WITH A FOUR DIGIT NUMBER
              printf "\n      file will be provided for $numprocs processors"
              mkdir  ${localin[$i]}
@@ -3258,8 +3026,7 @@
              then
 
-                   # DIE DEN PROZESSOREN EINES PARALLELRECHNERS ZUGEHOERIGEN
-                   # DATEIEN WERDEN BEREITGESTELLT, INDEM ZUERST DER GESAMTE
-                   # KATALOGINHALT KOPIERT UND DANN DIE EINZELNEN DATEIEN
-                   # PER MOVE UMBENANNT WERDEN
+                   # PROVIDE FILES FOR EACH CORE
+                   # FIRST CREATE THE LOCAL DIRECTORY, THEN COPY FILES
+                   # FROM THE PERMANENT DIRECTORY BY LINKING THEM TO THE LOCAL ONE
                 printf "\n      providing $numprocs files for the respective processors"
                 mkdir  ${localin[$i]}
@@ -3274,5 +3041,6 @@
 		    cd $TEMPDIR
 		fi
-                # If "ln -f" fails of if "$link_local_input = false" do a normal "cp -r"
+
+                   # IF "ln -f" FAILED OR IF "$link_local_input = false" DO A NORMAL "cp -r"
 		if [[ ! -f "${localin[$i]}/_0000" ]]
 		    then
@@ -3285,5 +3053,6 @@
 
              else
-                   # BEREITSTELLUNG AUF EINPROZESSORRECHNERN
+
+                   # PROVIDE FILE FOR RUNS ON A SINGLE CORE
 		if [[ $link_local_input = true ]]
 		then
@@ -3307,9 +3076,9 @@
     if (( i != 0 ))
     then
-       printf "\n$striche\n  *** all INPUT-files provided \n"
-    fi
-
-
-       # EVENTUELLE INPUT-KOMMANDOS ABARBEITEN
+       printf "\n$dashes\n  *** all INPUT-files provided \n"
+    fi
+
+
+       # EXECUTE INPUT-COMMANDS GIVEN IN THE CONFIGURATION FILE
     (( i = 0 ))
     while (( i < iic ))
@@ -3318,5 +3087,5 @@
        if (( i == 1 ))
        then
-          printf "\n\n  *** execution of INPUT-commands:\n$striche"
+          printf "\n\n  *** execution of INPUT-commands:\n$dashes"
        fi
        printf "\n  >>> ${in_command[$i]}"
@@ -3324,10 +3093,10 @@
        if (( i == iic ))
        then
-          printf "\n$striche\n"
+          printf "\n$dashes\n"
        fi
     done
 
 
-       # VERBLEIBENDE CPU-ZEIT BERECHNEN
+       # SET THE REMAINING CPU-TIME
     cpurest=${cpumax}.
 
@@ -3341,5 +3110,5 @@
           printf "\n\n  *** preparing the dvr streaming server configuration file"
 
-             # Check, if a dvr server is already running
+             # CHECK, IF A DVR SERVER IS ALREADY RUNNING
           running_dvrserver_id=`echo $(ps -edaf | grep .dvrserver.config | grep -v grep) | cut -d" " -f2`
           if [[ "$running_dvrserver_id" != "" ]]
@@ -3357,8 +3126,9 @@
                 cp  ${PALM_BIN}/.dvrserver.config  .
 
-                   # Entering the BASEDIR, UID and GID into this file
+                   # ENTERING THE BASEDIR, UID AND GID INTO THIS FILE
                 user_id=`id -u`
                 group_id=`id -g`
-                   # & is needed as seperator, because TEMPDIR contains /
+
+                   # "&" IS REQUIRED AS A SEPERATOR, BECAUSE TEMPDIR CONTAINS "/"
                 sed "s&<replace by dvr data directory>&${TEMPDIR}&g" .dvrserver.config > .dvrserver.1
                 sed "s/<replace by user id>/$user_id/g"    .dvrserver.1 > .dvrserver.2
@@ -3367,5 +3137,5 @@
                 rm  .dvrserver.1  .dvrserver.2
 
-                   # Start dvr server in background, get his id and print on terminal
+                   # START DVR SERVER IN BACKGROUND, GET HIS ID AND PRINT ON TERMINAL
                 $dvr_server  .dvrserver.config  >>  DVR_LOGFILE  2>&1  &
                 dvrserver_id=`echo $(ps -edaf | grep .dvrserver.config) | cut -d" " -f2`
@@ -3387,6 +3157,6 @@
 
 
-       # NAMELIST-DATEI MIT WERTEN VON ENVIRONMENT-VARIABLEN ERZEUGEN (ZU
-       # LESEN VON PALM)
+       # CREATE THE NAMELIST-FILE WITH VALUES OF ENVIRONMENT-VARIABLES REQUIRED BY PALM
+       # (FILE ENVPAR WILL BE READ BY PALM)
     cat  >  ENVPAR  <<  %%END%%
  &envpar  run_identifier = '$fname', host = '$localhost',
@@ -3400,9 +3170,9 @@
 
 
-       # PROGRAMMSTART
-    printf "\n\n  *** execution starts in directory\n      \"`pwd`\"\n$striche\n"
+       # STARTING THE EXECUTABLE
+    printf "\n\n  *** execution starts in directory\n      \"`pwd`\"\n$dashes\n"
     PATH=$PATH:$TEMPDIR
 
-       # MPI debug option (argument checking, slows down execution due to increased latency)
+       # MPI DEBUG OPTION (ARGUMENT CHECKING, SLOWS DOWN EXECUTION DUE TO INCREASED LATENCY)
     if [[ "$mpi_debug" = true ]]
     then
@@ -3423,10 +3193,5 @@
        if [[ "$ENVIRONMENT" = BATCH ]]
        then
-          if [[ $(echo $localhost | cut -c1-5) != lcsgi ]]
-          then
-             printf "\n  +++ debug is allowed in interactive mode only"
-             locat=debug
-             exit
-          fi
+          continue
        fi
        if [[ $localhost = ibmh ]]
@@ -3464,62 +3229,16 @@
              totalview   poe  -a a.out  -procs $numprocs  -rmpool 0  -nodes 1   $ROPTS
           fi
-       elif [[ $(echo $localhost | cut -c1-5) = lcsgi ]]
-       then
-             # CURRENTLY NO DEBUGGER ON LCSGI
-          if [[ $run_coupled_model = true ]]
-          then
-             printf "\n  +++ no debug in coupled mode available on \"$localhost\" "
-             locat=debug
-             exit
-          else
-             echo "no_coupling"  >  runfile_atmos
-          fi
-          (( ii = $numprocs / $threads_per_task ))
-          export OMP_NUM_THREADS=$threads_per_task
-          echo "OMP_NUM_THREADS=$OMP_NUM_THREADS"
-          if [[ $threads_per_task != 1 ]]
-          then
-             printf "\n      threads per task: $threads_per_task"
-          fi
-          printf "\n\n"
-          if [[ $( echo $mpilib | cut -c1-3 ) = mpt ]]
-          then
-#             export MPI_LAUNCH_TIMEOUT=360
-             if [[ "$totalview" = true ]]
-             then
-                printf "\n     running totalview debugger"
-                mpiexec_mpt $tv_opt -n $ii   ./a.out  $ROPTS  < runfile_atmos
-             else
-                mpiexec_mpt -np $ii   ./a.out  $ROPTS  < runfile_atmos
-             fi
-          elif [[ $( echo $mpilib | cut -c1-3 ) = mva ]]
-          then
-#             ulimit -s 300000   # A too large stack size causes problems
-#             export MV2_NUM_PORTS=2
-#             export MV2_CPU_MAPPING=0:1:2:3
-             if [[ "$totalview" = true ]]
-             then
-                printf "\n     running totalview debugger"
-                mpiexec $tv_opt ./a.out  $ROPTS  < runfile_atmos
-             else
-                mpiexec    ./a.out  $ROPTS  < runfile_atmos
-             fi
-          fi
-       else 
-          printf "\n  +++ no debug available on \"$localhost\" "
-          printf "\n      or not implemented in mrun so far"
-          locat=debug
-          exit
-       fi
-
-       # end debug mode
+
+       # END DEBUG MODE
     else
 
-          # normal execution
+          # NORMAL EXECUTION
        if [[ -n $numprocs ]]
        then
+
              # RUNNING THE PROGRAM ON PARALLEL MACHINES
           if [[ $(echo $host | cut -c1-3) = ibm ]]
           then
+
                 # SETUP THE IBM MPI ENVIRONMENT
              if [[ $host != ibmh  &&  $host != ibmkisti ]]
@@ -3533,6 +3252,6 @@
                 #  export MP_PRINTENV=yes
 
-                   # TUNING-VARIABLEN ZUR VERBESSERUNG DER KOMMUNIKATION
-                   # ZEIGEN ABER DERZEIT (SEP 04, FEDERATION) KAUM WIRKUNG
+                   # TUNING-VARIABLES TO IMPROVE COMMUNICATION SPEED
+                   # DO NOT SHOW SIGNIFICANT EFFECTS (SEP 04, FEDERATION-SWITCH)
                 export MP_WAIT_MODE=poll
                 [[ $node_usage = not_shared ]]  &&  export MP_SINGLE_THREAD=yes
@@ -3581,5 +3300,5 @@
                 then
                    poe  a.out  -procs $numprocs  -nodes 1  -rmpool 0  $ROPTS
-                elif [[ $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibmy ]]
+                elif [[ $localhost = ibmkisti  ||  $localhost = ibmku ]]
                 then
                    if [[ -f $hostfile ]]
@@ -3611,10 +3330,6 @@
                       echo "coupled_run $iia $iio"  >  runfile_atmos
                    fi
-                   if [[ $localhost = ibmy ]]
-                   then
-                      ./a.out  -procs $tasks_per_node  $ROPTS  <  runfile_atmos
-                   else
-                      poe  ./a.out  -procs $numprocs $ROPTS  <  runfile_atmos 
-                   fi
+
+                   poe  ./a.out  -procs $numprocs $ROPTS  <  runfile_atmos 
 
                 else
@@ -3631,5 +3346,5 @@
                 fi
              fi
-          elif [[ $host = nech  ||  $host = necriam ]]
+          elif [[ $host = nech ]]
           then
              (( ii = nodes ))
@@ -3689,5 +3404,5 @@
                 # COPY HOSTFILE FROM SOURCE DIRECTORY OR CREATE IT, IF IT
                 # DOES NOT EXIST
-             if [[  $host != lccrayb  &&$host != lccrayf  && $host != lccrayh  &&  $host != lcsgih  &&  $host != lcsgib  &&  $host != lckyuh  &&  $host != lckyut ]]
+             if [[  $host != lccrayb  &&$host != lccrayf  && $host != lccrayh  &&  $host != lckyuh  &&  $host != lckyut ]]
              then
                 if [[ -f $hostfile ]]
@@ -3709,9 +3424,9 @@
              (( ii = $numprocs / $threads_per_task ))
              export OMP_NUM_THREADS=$threads_per_task
-             # echo "*** OMP_NUM_THREADS=$OMP_NUM_THREADS"
+
              if [[ $threads_per_task != 1 ]]
              then
-                   # increase stack size to unlimited, because large runs
-                   # may abort otherwise
+                   # INCREASE STACK SIZE TO UNLIMITED, BECAUSE OTHERWISE LARGE RUNS
+                   # MAY ABORT
                 ulimit -Ss unlimited
                 printf "\n      threads per task: $threads_per_task  stacksize: unlimited"
@@ -3726,75 +3441,6 @@
                 fi
                 printf "\n\n"
-                if [[ $host = lcsgih  ||  $host = lcsgib ]]
-                then
-                   if [[ $( echo $mpilib | cut -c1-3 ) = mpt ]]
-                   then
-                          # MPI_DSM_DISTRIBUTE not necessary when MPI_DSM_CPULIST is set
-                          # export MPI_DSM_DISTRIBUTE=1
-                          # MPI_DSM_CPULIST: pin MPI processes to cores
-                      if [[ $use_openmp = false ]]
-                      then
-                         if [[ "$sgi_feature" = ice2 ]]
-                         then
-                            export MPI_DSM_CPULIST="0,4,1,5,2,6,3,7:allhosts"
-                         else
-                            export MPI_DSM_CPULIST="0,1,4,5,2,3,6,7:allhosts"
-                         fi
-                      else
-                         unset MPI_DSM_CPULIST
-                      fi
-                          # MPI_IB_RAILS: use both IB rails on ICE2
-                      export MPI_BUFS_PER_HOST=512
-                      export MPI_IB_RAILS=2
-                          # NECESSARY, IF MORE THAN 4096 PEs ARE USED
-                      export MPI_CONNECTIONS_THRESHOLD=8192
-                  #    echo "*** MPI_DSM_CPULIST=$MPI_DSM_CPULIST"
-                      export MPI_TYPE_DEPTH=20
-                  #    echo "*** MPI_TYPE_DEPTH=$MPI_TYPE_DEPTH"
-                      export MPI_GROUP_MAX=64
-                  #    echo "*** MPI_GROUP_MAX=$MPI_GROUP_MAX"
-                      if [[ $use_openmp = true ]]
-                      then
-                         echo " mpiexec -npernode $tasks_per_node  ./a.out  $ROPTS  <  runfile_atmos"
-                         mpiexec -npernode $tasks_per_node $tv_opt ./a.out  $ROPTS  <  runfile_atmos
-                      else
-                         mpiexec_mpt -np $ii $tv_opt  ./a.out  $ROPTS  < runfile_atmos
-                      fi
-
-                          # next is test for openmp usage
-                  #     echo "mpiexec -npernode $tasks_per_node  ./a.out  $ROPTS  < runfile_atmos"
-                  #     mpiexec -npernode $tasks_per_node  ./a.out  $ROPTS  < runfile_atmos
-                   elif [[ $( echo $mpilib | cut -c1-3 ) = mva ]]
-                   then
-                      export MV2_NUM_PORTS=2
-                      #  The default setting of MV2_CPU_MAPPING gives best results
-                      # export MV2_ENABLE_AFFINITY=1
-                      #  export MV2_CPU_MAPPING=0,1,4,5,2,3,6,7
-               #       if [[ "$sgi_feature" = ice2 ]]
-               #       then
-               #          export MV2_CPU_MAPPING=0,4,1,5,2,6,3,7
-               #       else
-               #          export MV2_CPU_MAPPING=0,1,4,5,2,3,6,7
-               #       fi
-                      if [[ $use_openmp = true ]]
-                      then
-                         unset MV2_CPU_MAPPING
-                         export MV2_ENABLE_AFFINITY=0
-                      fi
-                      echo "*** MV2_CPU_MAPPING=$MV2_CPU_MAPPING"
-                      echo "*** MV2_ENABLE_AFFINITY=$MV2_ENABLE_AFFINITY"
-                      if [[ $use_openmp = true ]]
-                      then
-                         echo " mpiexec -npernode $tasks_per_node  ./a.out  $ROPTS  <  runfile_atmos"
-                         mpiexec -npernode $tasks_per_node $tv_opt ./a.out  $ROPTS  <  runfile_atmos
-                      else
-                         mpiexec -np $ii $tv_opt ./a.out  $ROPTS  < runfile_atmos
-                      fi
-                   elif [[ "$mpilib" = impi ]]
-                   then
-                      echo "mpirun -np $ii inspxe-cl -r result -collect mi3 -- ./a.out  <  runfile_atmos"
-                      mpirun -np $ii inspxe-cl -r result -collect mi3 -- ./a.out  <  runfile_atmos
-                   fi
-                elif [[ $host = lccrayb || $host = lccrayh ]]
+
+                if [[ $host = lccrayb || $host = lccrayh ]]
                 then
                     echo "--- aprun  -n $ii  -N $tasks_per_node  a.out  $ROPTS  < runfile_atmos"
@@ -3824,5 +3470,5 @@
              else
 
-                    # currently there is no full MPI-2 support on ICE and XT4
+                    # CURRENTLY THERE IS NO FULL MPI-2 SUPPORT ON ICE AND XT4
                 (( iia = $numprocs_atmos / $threads_per_task ))
                 (( iio = $numprocs_ocean / $threads_per_task ))
@@ -3835,22 +3481,6 @@
                    echo "atmosphere_to_ocean $iia $iio"  >  runfile_atmos
                    echo "ocean_to_atmosphere $iia $iio"  >  runfile_ocean
-                   if [[ $host = lcsgih  ||  $host = lcsgib ]]
-                   then
-
-                      if [[ $( echo $mpilib | cut -c1-3 ) = mpt ]]
-                      then
-#                         export MPI_LAUNCH_TIMEOUT=360
-                         mpiexec_mpt -np $iia  ./a.out  $ROPTS < runfile_atmos &
-                         mpiexec_mpt -np $iio  ./a.out  $ROPTS < runfile_ocean &
-                      elif [[ $( echo $mpilib | cut -c1-3 ) = mva ]]
-                      then
-#                         ulimit -s 300000   # A too large stack size causes problems
-#                         export MV2_NUM_PORTS=2
-#                         export MV2_CPU_MAPPING=0:1:2:3
-                         mpiexec -n $iia  ./a.out  $ROPTS < runfile_atmos &
-                         mpiexec -n $iio  ./a.out  $ROPTS < runfile_ocean &
-                      fi
-
-                   elif [[ $host = lccrayf  ||  $host = lcxe6  ||  $host = lcxt5m ]]
+
+                   if [[ $host = lccrayf  ||  $host = lcxe6  ||  $host = lcxt5m ]]
                    then
 
@@ -3870,20 +3500,6 @@
 
                    echo "coupled_run $iia $iio"  >  runfile_atmos
-                   if [[ $host = lcsgih  ||  $host = lcsgib ]]
-                   then
-
-                      if [[ $( echo $mpilib | cut -c1-3 ) = mpt ]]
-                      then
-#                         export MPI_LAUNCH_TIMEOUT=360
-                         mpiexec_mpt -np $ii  ./a.out  $ROPTS < runfile_atmos
-                      elif [[ $( echo $mpilib | cut -c1-3 ) = mva ]]
-                      then
-#                         ulimit -s 300000   # A too large stack size causes problems
-#                         export MV2_NUM_PORTS=2
-#                         export MV2_CPU_MAPPING=0:1:2:3
-                         mpiexec  ./a.out  $ROPTS < runfile_atmos
-                      fi
-
-                   elif [[ $host = lccrayf  ||  $host = lcxe6  ||  $host = lcxt5m ]]
+
+                   if [[ $host = lccrayf  ||  $host = lcxe6  ||  $host = lcxt5m ]]
                    then
 
@@ -3905,4 +3521,5 @@
 
              fi
+
           elif [[ $host = lckyoto ]]
           then
@@ -3930,4 +3547,5 @@
              fi
              set +xv
+
           elif [[ $host = lctit ]]
           then
@@ -3947,30 +3565,23 @@
              mpprun  -n $numprocs  a.out  $ROPTS
           fi
-          [[ $? != 0 ]]  &&  execution_error=true
-
-
-             # PERFORMANCE-AUSWERTUNG MIT APPRENTICE
-          if [[ "$cond1" = apprentice  ||  "$cond2" = apprentice ]]
-          then
-             apprentice
-          fi
        else
           a.out  $ROPTS
        fi
     fi
-    if [[ $? != 0  ||  $execution_error = true ]]
-    then
-
-          # ABBRUCH BEI LAUFZEITFEHLER
-#       [[ ! ( "$cond1" = debug  ||  "$cond2" = debug ) ]]  &&  cat  aout_output*
+
+    if [[ $? != 0 ]]
+    then
+
+          # ABORT IN CASE OF RUNTIME ERRORS
        printf "\n  +++ runtime error occured"
        locat=execution
        exit
+
     else
-#       [[ ! ( "$cond1" = debug  ||  "$cond2" = debug ) ]]  &&  cat  aout_output*
-       printf "\n$striche\n  *** execution finished \n"
-
-          # Stop the dvr streaming server and process the dvr output in order
-          # to create dvrs- and html-files containing all streams
+
+       printf "\n$dashes\n  *** execution finished \n"
+
+          # STOP THE DVR STREAMING SERVER AND PROCESS THE DVR OUTPUT IN ORDER
+          # TO CREAT DVRS- AND HTML-FILES CONTAINING ALL STREAMS
        if [[ "$dvrserver_id" != "" ]]
        then
@@ -3978,20 +3589,20 @@
           printf "\n  *** dvr server with id=$dvrserver_id has been stopped"
 
-             # If there is a directory, data have been output by the
-             # streaming server. Otherwise, user has chosen dvrp_output=local
+             # IF THERE IS A DIRECTORY, DATA HAVE BEEN OUTPUT BY THE
+             # STREAMING SERVER. OTHERWISE, USER HAS CHOSEN dvrp_output=local
           if [[ -d DATA_DVR ]]
           then
 
-                # Add the current dvr configuration file to the dvr output
-                # directory
+                # ADD THE CURRENT DVR CONFIGURATION FILE TO THE DVR OUTPUT
+                # DIRECTORY
              cp  .dvrserver.config  DATA_DVR
 
-                # Process the dvr output (option -s for also generating
-                # sequence mode data)
+                # PROCESS THE DVR OUTPUT (OPTION -s FOR GENERATING
+                # SEQUENCE MODE DATA TOO)
              process_dvr_output  -d DATA_DVR  -f $fname  -s
 
           else
 
-                # Process the local output
+                # PROCESS THE LOCAL OUTPUT
              process_dvr_output  -l  -d DATA_DVR  -f $fname
 
@@ -4001,5 +3612,5 @@
        then
 
-             # Process dvr output generated in local mode (dvrp_output=local)
+             # PROCESS DVR OUTPUT GENERATD IN LOCAL MODE (dvrp_output=local)
           process_dvr_output  -l  -d DATA_DVR  -f $fname
 
@@ -4009,6 +3620,6 @@
 
 
-       # Call of combine_plot_fields in order to merge single files written
-       # by each PE into one file.
+       # CALL OF combine_plot_fields IN ORDER TO MERGE SINGLE FILES WRITTEN
+       # BY EACH CORE INTO ONE FILE
    if [[ ! -f ${PALM_BIN}/combine_plot_fields${block}.x ]]
    then
@@ -4027,6 +3638,8 @@
       fi
    else
-#     Temporary solution to skip combine_plot_fields. This is necessary in case of huge amount of
-#     data output. To do: extend this branch by creating a batch job for combine_plot_fields.
+
+         # TEMPORARY SOLUTION TO SKIP combine_plot_fields. THIS IS REQUIRED IN CASE OF HUGE AMOUNT OF
+         # DATA OUTPUT. TO DO: EXTEND THIS BRANCH BY CREATING A BATCH JOB for combine_plot_fields.
+         # ??? koennen wir das streichen ???
       printf "\n\n\n *** post-processing: skipping combine_plot_fields (-Z option set) ..."
    fi
@@ -4034,5 +3647,5 @@
 
 
-       # EVENTUELLE OUTPUT-KOMMANDOS ABARBEITEN
+       # EXECUTE OUTPUT-COMMANDS GIVEN IN THE CONFIGURATION FILE
     (( i = 0 ))
     while (( i < ioc ))
@@ -4041,5 +3654,5 @@
        if (( i == 1 ))
        then
-          printf "\n\n  *** execution of OUTPUT-commands:\n$striche"
+          printf "\n\n  *** execution of OUTPUT-commands:\n$dashes"
        fi
        printf "\n  >>> ${out_command[$i]}"
@@ -4047,10 +3660,10 @@
        if (( i == ioc ))
        then
-          printf "\n$striche\n"
+          printf "\n$dashes\n"
        fi
     done
 
 
-       # EVTL. INHALT DES AKTUELLEN VERZEICHNISSES AUSGEBEN
+       # IN TRACE-MODE PRINT CONTENTS OF THE CURRENT (TEMPORARY) WORKING DIRECTORY
     if [[ $do_trace = true ]]
     then
@@ -4061,5 +3674,5 @@
 
 
-       # OUTPUT-DATEIEN AN IHRE ZIELORTE KOPIEREN
+       # COPY LOCAL OUTPUT-FILES TO THEIR PERMANENT DESTINATIONS
     (( i = 0 ))
     while (( i < iout ))
@@ -4068,8 +3681,8 @@
        if (( i == 1 ))
        then
-          printf "\n\n  *** saving OUTPUT-files:\n$striche"
-       fi
-
-          # PRUEFEN, OB EINZELDATEI ODER DATEI PRO PROZESSOR
+          printf "\n\n  *** saving OUTPUT-files:\n$dashes"
+       fi
+
+          # CHECK FOR SINGLE FILE (SERIAL RUN) OR DIRECTORY (ONE FILE PER CORE FOR PARELLEL EXECUTION)
        files_for_pes=false; filetyp=file
        if [[ "${actionout[$i]}" = pe  &&  -n $numprocs ]]
@@ -4112,7 +3725,6 @@
 
 
-             # KOPIEREN PER FTP/SCP (IMMER IM BINAERMODUS, -M: FALLS ZIELKATALOG
-             # NICHT VORHANDEN, WIRD VERSUCHT, IHN ANZULEGEN), ABER NUR BEI
-             # REMOTE-RECHNUNGEN
+             # COPY VIA SCP TO LOCAL HOST (ALWAYS IN BINARY MODE USING batch_scp option -m)
+             # IF TARGET DIRECTORY DOES NOT EXISTS, TRY TO CREATE IT
           if [[ "${actionout[$i]}" = tr ]]
           then
@@ -4130,6 +3742,6 @@
                 then
 
-                      # TRANSFER IN EIGENSTAENDIGEM JOB
-                      # ZUERST KOPIE DER DATEI INS TEMPORAERE DATENVERZEICHNIS
+                      # TRANSFER IN SEPERATE JOB
+                      # FIRST COPY FILE TO TEMPORY DATA DIRECTORY
                    [[ ! -d $tmp_data_catalog/TRANSFER ]]  &&  mkdir -p  $tmp_data_catalog/TRANSFER
                    file_to_transfer=${fname}_${localout[$i]}_to_transfer_$kennung
@@ -4166,5 +3778,5 @@
                 else
 
-                      # TRANSFER INNERHALB DIESES JOBS
+                      # TRANSFER WITHIN THIS JOB
                    transfer_failed=false
                    printf "\n  >>> OUTPUT: ${localout[$i]}$cst  by SCP to"
@@ -4181,13 +3793,11 @@
                    [[ $? != 0 ]]  &&  transfer_failed=true
 
-                      # BEI FEHLGESCHLAGENEM TRANSFER SICHERUNGSKOPIE AUF
-                      # LOKALER MASCHINE ANLEGEN
+                      # IF TRANSFER FAILED, CREATE BACKUP COPY ON THIS MACHINE
                    if [[ $transfer_failed = true ]]
                    then
-                      printf "  +++ transfer failed. Trying to save a copy on the local host under:\n"
+                      printf "  +++ transfer failed. Trying to save a copy on this host under:\n"
                       printf "      ${pathout[$i]}/${localhost}_${fname}${endout[$i]}_$kennung\n"
 
-                         # ERSTMAL PRUEFEN, OB VERZEICHNIS EXISTIERT. GEGEBENENFALLS
-                         # ANLEGEN.
+                         # FIRST CHECK, IF DIRECTORY EXISTS, AND CREATE IT, IF NECESSARY
                       eval  local_catalog=${pathout[$i]}
                       if [[ ! -d $local_catalog ]]
@@ -4203,5 +3813,5 @@
              else
 
-                   # WERTZUWEISUNG, SO DASS WEITER UNTEN NUR KOPIERT WIRD
+                   # UNSET actionout. DUE TO THIS SETTING, FILE WILL LATER JUST BE COPIED ON THIS MACHINE
                 actionout[$i]=""
              fi
@@ -4209,7 +3819,6 @@
 
 
-             # APPEND PER FTP/SCP (IMMER IM BINAERMODUS, -M: FALLS ZIELKATALOG
-             # NICHT VORHANDEN, WIRD VERSUCHT, IHN ANZULEGEN), ABER NUR BEI
-             # REMOTE-RECHNUNGEN
+             # APPEND VIA SCP TO LOCAL HOST (ALWAYS IN BINARY MODE USING batch_scp option -m)
+             # IF TARGET DIRECTORY DOES NOT EXISTS, TRY TO CREATE IT
           if [[ "${actionout[$i]}" = tra ]]
           then
@@ -4219,6 +3828,6 @@
                 then
 
-                      # TRANSFER IN EIGENSTAENDIGEM JOB
-                      # ZUERST KOPIE DER DATEI INS TEMPORAERE DATENVERZEICHNIS
+                      # TRANSFER IN SEPERATE JOB
+                      # FIRST COPY FILE TO TEMPORY DATA DIRECTORY
                    [[ ! -d $tmp_data_catalog/TRANSFER ]]  &&  mkdir -p  $tmp_data_catalog/TRANSFER
                    file_to_transfer=${fname}_${localout[$i]}_to_transfer_$kennung
@@ -4249,5 +3858,5 @@
                 else
 
-                      # TRANSFER INNERHALB DIESES JOBS
+                      # TRANSFER WITHIN THIS JOB
                    transfer_failed=false
                    printf "\n  >>> OUTPUT: ${localout[$i]}  append by SCP to"
@@ -4264,13 +3873,11 @@
                    [[ $? != 0 ]]  &&  transfer_failed=true
 
-                      # BEI FEHLGESCHLAGENEM TRANSFER SICHERUNGSKOPIE AUF
-                      # LOKALER MASCHINE ANLEGEN
+                      # IF TRANSFER FAILED, CREATE BACKUP COPY ON THIS MACHINE
                    if [[ $transfer_failed = true ]]
                    then
-                      printf "  +++ transfer failed. Trying to save a copy on the local host under:\n"
+                      printf "  +++ transfer failed. Trying to save a copy on this host under:\n"
                       printf "      ${pathout[$i]}/${localhost}_${fname}${endout[$i]}_$kennung\n"
 
-                         # ERSTMAL PRUEFEN, OB VERZEICHNIS EXISTIERT. GEGEBENENFALLS
-                         # ANLEGEN
+                         # FIRST CHECK, IF DIRECTORY EXISTS, AND CREATE IT, IF NECESSARY
                       eval  local_catalog=${pathout[$i]}
                       if [[ ! -d $local_catalog ]]
@@ -4287,6 +3894,5 @@
              else
 
-                   # WERTZUWEISUNG, SO DASS WEITER UNTEN NUR APPEND AUF
-                   # LOKALER MASCHINE DURCHGEFUEHRT WIRD
+                   # RESET actionout. DUE TO THIS SETTING, FILE WILL LATER JUST BE APPENDED ON THIS MACHINE
                 actionout[$i]=a
              fi
@@ -4294,8 +3900,8 @@
 
 
-             # OUTPUT-DATEI FUER EINEN FORTSETZUNGSLAUF. DATEI WIRD PER
-             # LINK AUF DEN TEMPORAEREN DATENKATALOG GELEGT. OPTION -f WIRD
-             # VERWENDET, FALLS DORT NOCH EINE DATEI GLEICHEN NAMENS VORHANDEN
-             # SEIN SOLLTE. ANSCHLIESSEND WIRD SEINE ARCHIVIERUNG ANGESTOSSEN
+             # OUTPUT-FILE FOR A RESTART-RUN.
+             # FILE IS MOVED TO THE TEMPORARY DATA DIRECTORY USING link COMMAND.
+             # OPTION -f IS USED TO OVERWRITE EXISTING FILES.
+             # AS LAST ACTION, ARCHIVING IS INITIATED.
           if [[ "${actionout[$i]}" = fl ]]
           then
@@ -4320,5 +3926,5 @@
 
 
-                # ARCHIVIERUNGSJOB WIRD ERZEUGT UND ABGESCHICKT
+                # CREATE AND SUBMIT ARCHIVING-JOB
              if [[ $store_on_archive_system = true ]]
              then
@@ -4360,4 +3966,5 @@
                       exit
                    else
+                         # ??? nicht benÃ¶tigte Archiv-Systeme entfernen ???
                          # FUER RECHNER IN JUELICH. DORT KOENNTEN AUCH
                          # EINZELNE DATEIEN GESICHERT WERDEN (SPAETER KORR.)
@@ -4370,5 +3977,5 @@
                    if [[ $files_for_pes = false ]]
                    then
-                         # EVENTUELL NOCH VORHANDENE DATEI IM ARCHIV LOSCHEN
+                         # REMOVE EXISTING OLD FILES FROM THE ARCHIVE
                       echo "set -x"                                   >> archive_${frelout[$i]}
                       echo "rm  -rf  \$PERM/${frelout[$i]}"           >> archive_${frelout[$i]}
@@ -4386,20 +3993,9 @@
                       while (( inode < nodes ))
                       do
-#                         echo "*** all_files = \"$all_files\" "
                          files=`echo $all_files | cut -d" " -f1-$tasks_per_node`
                          all_files=`echo $all_files | cut -d" " -f$tp1-`
-#                         echo "*** tasks_per_node = \"$tasks_per_node\" "
-#                         echo "*** files = \"$files\" "
-#                         echo "*** all_files = \"$all_files\" "
-                        echo "tar  cvf \$PERM/${frelout[$i]}/${frelout[$i]}.node_$inode.tar $files"   >> archive_${frelout[$i]}
-			### echo "tar  cvf ${frelout[$i]}.node_$inode.tar $files"   >> archive_${frelout[$i]}
-			### echo "cp ${frelout[$i]}.node_$inode.tar \$PERM/${frelout[$i]}/"   >> archive_${frelout[$i]}
-			 ###echo "rm ${frelout[$i]}.node_$inode.tar"   >> archive_${frelout[$i]}
-#                         echo "dsmc incremental  \$PERM/${frelout[$i]}/${frelout[$i]}.node_$inode.tar" >> archive_${frelout[$i]}
-#                         echo "dsmmigrate \$PERM/${frelout[$i]}/${frelout[$i]}.node_$inode.tar"        >> archive_${frelout[$i]}
+                         echo "tar  cvf \$PERM/${frelout[$i]}/${frelout[$i]}.node_$inode.tar $files"   >> archive_${frelout[$i]}
                          (( inode = inode + 1 ))
                       done
-#                      echo "rm  -rf  \$PERM/${frelout[$i]}.tar"       >> archive_${frelout[$i]}
-#                      echo "tar  cvf \$PERM/${frelout[$i]}.tar ${frelout[$i]}" >> archive_${frelout[$i]}
                    fi
                 elif [[ $archive_system = ut ]]
@@ -4408,5 +4004,5 @@
                    if [[ $files_for_pes = false ]]
                    then
-                         # EVENTUELL NOCH VORHANDENE DATEI IM ARCHIV LOSCHEN
+                         # REMOVE EXISTING OLD FILES FROM THE ARCHIVE
                       echo "set -x"                                 >> archive_${frelout[$i]}
                       echo "rm  -rf  \$UT/${frelout[$i]}"           >> archive_${frelout[$i]}
@@ -4437,9 +4033,5 @@
                 if [[ $archive_system != none ]]
                 then
-                   if [[ $localhost = lcsgih  ||  $localhost = lcsgib ]]
-                   then
-#                      subjob  -d  -v  -q cdata  -X 0  -m 1000  -t 43200  -c $job_catalog  $PORTOPT  archive_${frelout[$i]}
-                      subjob   -v  -q permq  -X 1 -T 1  -m 1000  -t 172800  -c $job_catalog  $PORTOPT  archive_${frelout[$i]}
-                   elif [[ $localhost = nech ]]
+                   if [[ $localhost = nech ]]
                    then
                       subjob  -d  -c /pf/b/$usern/job_queue  -v  -q pp  -X 0  -m 1000  -t 7200  $PORTOPT  archive_${frelout[$i]}
@@ -4452,6 +4044,9 @@
 
 
-                # LEERDATEI IM BENUTZERVERZEICHNIS ANLEGEN, DAMIT BEKANNT IST,
-                # WIE DIE HOECHSTE ZYKLUSNUMMER AUF DEM ARCHIV-SYSTEM LAUTET
+                # CREATE AN EMPTY DIRECTORY IN THE USERS PERMANENT DIRECTORY,
+                # IN ORDER TO NOTE THE RESPECTIVE CYCLE NUMBER ON THE ARCHIVE SYSTEM
+                # RESTART-JOBS ARE USING THESE EMPTY-DIRECTORIES TO GET THE CURRENT HIGHEST
+                # CYCLE NUMBER ON THE ARCHIVE SYSTEM (IN CASE THAT INFORMATIONS ARE DIFFICULT TO
+                # TO ACCESS FROM THE ARCHIVE-SYSTEM DIRECTLY))
              if [[ $files_for_pes = false ]]
              then
@@ -4464,10 +4059,7 @@
 
 
-             # KOPIEREN AUF LOKALER MASCHINE ZUM ARCHIV-SYSTEM
-             # AUSSERDEM MUSS LEERDATEI ANGELEGT WERDEN, DAMIT BEKANNT IST,
-             # WIE DIE HOECHSTE ZYKLUSNUMMER AUF DEM ARCHIV-SYSTEM LAUTET
-             # FALLS IRGENDEINE (VON MEHREREN) ARCHIVIERUNGEN SCHIEF GEHT,
-             # WIRD FLAG GESETZT UND BLEIBT AUCH BEI WEITEREN ORDNUNGS-
-             # GEMAESSEN ARCHIVIERUNGEN GESETZT
+             # COPY FROM THIS HOST TO THE ARCHIVE-SYSTEM
+             # IF ANY ARCHIVING FAILS, AN ERROR-FLAG-FILE IS SET
+             # THIS FILE REMAINS TO BE SET, EVEN IF ARCHIVING OF FURTHER FILES IS SUCCESSFULL
           if [[ "${actionout[$i]}" = ar ]]
           then
@@ -4536,7 +4128,8 @@
              elif [[ $archive_system = tivoli ]]
              then
-                   # ARCHIVIERUNG NUR PER BATCH-JOB MOEGLICH
-                   # DATEI MUSS ZWISCHENZEITLICH INS TEMPORAERE DATENVERZEICHNIS
-                   # GELEGT WERDEN
+                   # ARCHIVING ONLY POSSIBLE VIA BATCH-JOB
+                   # IN THE MEANTIME, FILE IS STORED IN THE TEMPORARY DATA DIRECTORY,
+                   # BECAUSE MRUN'S CURRENT TEMPORARY WORKING DIRECTORY MAY ALREADY BE DELETED
+                   # WHEN THE ARCHIVE-JOB IS EXECUTED
                 [[ ! -d $tmp_data_catalog ]]  &&  mkdir -p  $tmp_data_catalog
                 chmod  g+rx  $tmp_data_catalog
@@ -4549,10 +4142,10 @@
                 fi
 
-                   # BATCH JOB GENERIEREN UND ABSCHICKEN; DATEI MUSS WIEDER
-                   # AUS TEMPORAEREM DATENVERZEICHNIS ENTFERNT WERDEN
+                   # GENERATE AND SUBMIT BATCH-JOB
+                   # FILE HAS TO BE DELETED FROM THE TEMPORARY DATA DIRECTORY
+                   # DELETE OLD EXISTING FILES FROM THE ARCHIVE
                 echo "cd  $tmp_data_catalog"                       >  archive_${frelout[$i]}
                 if [[ $files_for_pes = false ]]
                 then
-                      # EVENTUELL NOCH VORHANDENE DATEI IM ARCHIV LOSCHEN
                    echo "rm  -rf  \$PERM/${frelout[$i]}"           >> archive_${frelout[$i]}
                    echo "cp  ${frelout[$i]} \$PERM/${frelout[$i]}" >> archive_${frelout[$i]}
@@ -4570,7 +4163,8 @@
              elif [[ $archive_system = ut ]]
              then
-                   # ARCHIVIERUNG NUR PER BATCH-JOB MOEGLICH
-                   # DATEI MUSS ZWISCHENZEITLICH INS TEMPORAERE DATENVERZEICHNIS
-                   # GELEGT WERDEN
+                   # ARCHIVING ONLY POSSIBLE VIA BATCH-JOB
+                   # IN THE MEANTIME, FILE IS STORED IN THE TEMPORARY DATA DIRECTORY,
+                   # BECAUSE MRUN'S CURRENT TEMPORARY WORKING DIRECTORY MAY ALREADY BE DELETED
+                   # WHEN THE ARCHIVE-JOB IS EXECUTED
                 [[ ! -d $tmp_data_catalog ]]  &&  mkdir -p  $tmp_data_catalog
                 chmod  g+rx  $tmp_data_catalog
@@ -4583,10 +4177,10 @@
                 fi
 
-                   # BATCH JOB GENERIEREN UND ABSCHICKEN; DATEI MUSS WIEDER
-                   # AUS TEMPORAEREM DATENVERZEICHNIS ENTFERNT WERDEN
+                   # GENERATE AND SUBMIT BATCH-JOB
+                   # FILE HAS TO BE DELETED FROM THE TEMPORARY DATA DIRECTORY
+                   # DELETE OLD EXISTING FILES FROM THE ARCHIVE
                 echo "cd  $tmp_data_catalog"                       >  archive_${frelout[$i]}
                 if [[ $files_for_pes = false ]]
                 then
-                      # EVENTUELL NOCH VORHANDENE DATEI IM ARCHIV LOSCHEN
                    echo "rm  -rf  \$UT/${frelout[$i]}"           >> archive_${frelout[$i]}
                    echo "cp  ${frelout[$i]} \$UT/${frelout[$i]}" >> archive_${frelout[$i]}
@@ -4606,4 +4200,10 @@
                 archive_save=false
              fi
+
+                # CREATE EMPTY FLAG-FILE OR -DIRECTORY
+                # IN ORDER TO NOTE THE RESPECTIVE CYCLE NUMBER ON THE ARCHIVE SYSTEM
+                # RESTART-JOBS ARE USING THESE EMPTY-DIRECTORIES TO GET THE CURRENT HIGHEST
+                # CYCLE NUMBER ON THE ARCHIVE SYSTEM (IN CASE THAT INFORMATIONS ARE DIFFICULT TO
+                # TO ACCESS FROM THE ARCHIVE-SYSTEM DIRECTLY))
              if [[ $file_saved = true ]]
              then
@@ -4615,7 +4215,8 @@
                 fi
              fi
-          fi
-
-             # APPEND AUF LOKALER MASCHINE
+
+          fi
+
+             # APPEND ON THIS MACHINE
           if [[ "${actionout[$i]}" = "a" ]]
           then
@@ -4630,10 +4231,11 @@
           fi
 
-             # KOPIEREN AUF LOKALER MASCHINE
-             # ES MUSS KOPIERT WERDEN, DA MOVE NICHT UEBER FILESYSTEM HINAUS MOEGLICH
+             # COPY ON THIS MACHINE
+             # COPY HAS TO BE USED, BECAUSE MOVE DOES NOT WORK IF FILE-ORIGIN AND TARGET ARE
+             # ON DIFFERENT FILE-SYSTEMS
           if [[ "${actionout[$i]}" = ""  &&  $files_for_pes = false ]]
           then
 
-                # KOPIEREN AUF EINPROZESSORMASCHINE
+                # COPY IN CASE OF RUNS ON SINGLE CORES
              if [[ "${extout[$i]}" != " "  &&  "${extout[$i]}" != "" ]]
              then
@@ -4674,8 +4276,6 @@
           then
 
-                # DIE DEN PROZESSOREN EINES PARALLELRECHNERS ZUGEHOERIGEN
-                # DATEIEN WERDEN ERST IN EINEM KATALOG GESAMMELT UND DIESER
-                # WIRD DANN KOPIERT
-                # PER MOVE UMBENANNT WERDEN
+                # FILES FROM THE DIFFERENT CORES ARE MOVED WITH ln-COMMAND TO THE PERMANENT DIRECTORY
+                # AS A FIRST STEP, THE PERMANENT DIRECTORY IS CREATED
              printf "\n  >>> OUTPUT: ${localout[$i]}/_....  to  ${pathout[$i]}\n"
 	     if [[ $link_local_output = true ]]
@@ -4690,5 +4290,6 @@
 		 cd $TEMPDIR
 	     fi
-             # If "ln -f" fails of if "$link_local_output = false" do a normal "cp -r"
+
+                # IF "ln -f" HAS FAILED OR IF "$link_local_output = false" DO A NORMAL COPY "cp -r"
 	     if [[ ! -f "${pathout[$i]}/_0000" ]]
              then
@@ -4707,14 +4308,14 @@
        if [[ $transfer_problems = true ]]
        then
-          printf "\n$striche\n  *** OUTPUT-files saved"
+          printf "\n$dashes\n  *** OUTPUT-files saved"
           printf "\n  +++ WARNING: some data transfers failed! \n"
        else
-          printf "\n$striche\n  *** all OUTPUT-files saved \n"
-       fi
-    fi
-
-
-       # EVENTUELL FOLGEJOB STARTEN
-       # DATEI CONTINUE_RUN MUSS VOM BENUTZERPROGRAMM AUS ERZEUGT WERDEN
+          printf "\n$dashes\n  *** all OUTPUT-files saved \n"
+       fi
+    fi
+
+
+       # IF REQUIRED, START A RESTART-JOB
+       # FILE CONTINUE_RUN MUST HAVE BEEN CREATED BY THE EXECUTABLE (PALM)
     if [[ -f CONTINUE_RUN ]]
     then
@@ -4723,9 +4324,8 @@
        then
 
-             # ZUERST IN MRUN-AUFRUF OPTIONEN FUER FORTSETZUNGSLAUF, FUER
-             # STILLES ABARBEITEN (OHNE INTERAKTIVE RUECKFAGEN) UND FUER
-             # BATCH-BETRIEB (NUR WICHTIG, FALLS BATCH AUF LOKALER MASCHINE
-             # DURCHGEFUEHRT WERDEN SOLL) EINFUEGEN, FALLS NICHT BEREITS VOR-
-             # HANDEN
+             # ADD RESTART-OPTIONS TO THE MRUN-CALL (IF THEY ARE NOT USED ALREADY):
+             # -C TELLS MRUN THAT IT IS A RESTART-RUN
+             # -v SILENT MODE WITHOUT INTERACTIVE QUERIES
+             # -n BATCH-MODE (IMPORTANT ONLY IN CASE OF BATCH JOBS ON THE LOCAL MACHINE)
           [[ $(echo $mc | grep -c "\-C") = 0 ]]  &&  mc="$mc -C"
           [[ $(echo $mc | grep -c "\-v") = 0 ]]  &&  mc="$mc -v"
@@ -4737,12 +4337,12 @@
 
 
-             # JOB STARTEN
+             # START THE RESTART-JOB
           printf "\n\n  *** initiating restart-run on \"$return_addres\" using command:\n"
           echo "      $mc"
-          printf "\n$striche\n"
+          printf "\n$dashes\n"
           if [[ $localhost != $fromhost ]]
           then
 
-             if [[ $localhost = lcsgih  ||  $localhost = lccrayb  ||  $localhost = lccrayh  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lcflow  ||  $localhost = lckyu* ]]
+             if [[ $localhost = lccrayh  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lcflow  ||  $localhost = lckyu* ]]
              then
                 echo "*** ssh will be used to initiate restart-runs!"
@@ -4786,6 +4386,5 @@
              fi
 
-                # WARTEN, DAMIT SICH RESTART JOB IN QUEUE EINREIHEN KANN, BEVOR
-                # DER AKTUELLE JOB ENDET
+                # WAIT TO ALLOW THE RESTART-JOB TO BE QUEUED, BEFORE THE CURRENT JOB IS FINISHED
 	     if [[ $queue = special1q ]]
 	     then
@@ -4797,11 +4396,8 @@
           else
 
-                # BEI RECHNUNGEN AUF LOKALER MASCHINE KANN MRUN DIREKT AUFGE-
-                # RUFEN WERDEN, AUSSER AUF lcfimm
+                # JOBS RUNNING (AND STARTED) ON THE LOCAL MACHINE CAN DIRECTLY CALL MRUN (WITHOUT
+                # USING SSH)
              cd $LOCAL_PWD
-             if [[ $localhost = lcfimm ]]
-             then
-                ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc " 
-             elif [[ $localhost = lckyuh ]]
+             if [[ $localhost = lckyuh ]]
              then
                 printf "\n  +++ WARNING: no restart mechanism available for host \"$localhost\" "
@@ -4809,5 +4405,5 @@
                 printf "\n               \"$mc\" "
              else
-                eval  $mc                # ' MUESSEN AUSGEWERTET WERDEN
+                eval  $mc                # THE ' MUST BE EVALUATED
              fi
              cd -  > /dev/null
@@ -4815,12 +4411,14 @@
           if [[ $localhost = lckyuh ]]
           then
-             printf "\n$striche\n  *** restart-run to be initiated manually\n"
+             printf "\n$dashes\n  *** restart-run to be initiated manually\n"
           else
-             printf "\n$striche\n  *** restart-run initiated \n"
-          fi
-
-
-             # EVENTUELL INPUT-DATEIEN, DIE VON TEMPORAEREM DATENVERZEICHNIS
-             # GEHOLT WORDEN SIND, LOESCHEN
+             printf "\n$dashes\n  *** restart-run initiated \n"
+          fi
+
+
+             # DELETE INPUT-(RESTART)FILES, WHICH HAVE BEEN FETCHED FROM THE TEMPORARY DATA
+             # DIRECTORY, BACAUSE THEY ARE NOT REQUIRED BY THE RESTART-JOB.
+             # THIS IS DONE IN ORDER TO AVOID EXCEEDING DISC QUOTAS OR DISC SPACE (RESTART-FILES
+             # MAY BE VERY HUGE)
           (( i = 0 ))
           while (( i < iin ))
@@ -4843,5 +4441,5 @@
 
     
-       # EVTL. EMAIL-BENACHRICHTIGUNG UEBER ABGESCHLOSSENEN LAUF
+       # SEND EMAIL NOTIFICATION ABOUT THE FINISHED RUN
     if [[ "$email_notification" != "none" ]]
     then
@@ -4866,5 +4464,5 @@
 
 
-       # ALLE ARBEITEN BEENDET. TEMPORAERER KATALOG KANN GELOESCHT WERDEN
+       # ALL ACTIONS FINISHED, TEMPORARY WORKING-DIRECTORY CAN BE DELETED
     cd  $HOME
     [[ $delete_temporary_catalog = true ]]  &&  rm -rf $TEMPDIR
@@ -4873,8 +4471,8 @@
 
 
-       # FALLS AUF REMOTE-MASCHINE GERECHNET WERDEN SOLL, WERDEN JETZT ENTSPRE-
-       # CHENDE AKTIONEN DURCHGEFUEHRT
-
-       # MRUN-BEFEHL FUER REMOTE-MASCHINE ZUSAMMENSTELLEN
+       # PREPARING ACTIONS,
+       # IF A BATCH-JOB IS TO BE GENERATED AND STARTED ON A REMOTE-MACHINE GERECHNET
+
+       # BUILD THE MRUN-COMMAND TO BE CALLED IN THE BATCH-JOB ON THE REMOTE-MACHINE
     mrun_com="$mrun_script_name -a $afname -c $config_file -d $fname -h $host -H $fromhost -m $memory -t $cpumax -q $queue -R $return_addres -U $return_username -u $remote_username"
     [[ "$cpp_opts" != "" ]]       &&  mrun_com=${mrun_com}" -D \"$cpp_opts\""
@@ -4886,5 +4484,4 @@
     [[ $keep_data_from_previous_run = true ]]  &&  mrun_com=${mrun_com}" -k"
     [[ "$additional_conditions" != "" ]]  &&  mrun_com=${mrun_com}" -K \"$additional_conditions\""
-#    [[ "$makefile" != "$source_path/Makefile" ]]  &&  mrun_com=${mrun_com}" -M \"$makefile\""
     [[ "$output_list" != "" ]]    &&  mrun_com=${mrun_com}" -o \"$output_list\""
     [[ "$read_from_config" = false ]]  &&  mrun_com=${mrun_com}" -S"
@@ -4912,5 +4509,5 @@
 
 
-       # create executable for batch job
+       # CREATE EXECUTABLE FOR BATCH JOB
     if [[ $create_executable_for_batch = true  &&  $restart_run != true ]]
     then
@@ -4918,5 +4515,5 @@
        printf "\n  *** creating the executable for batch job\n"
 
-          # method only works for batch jobs on local hosts
+          # METHOD ONLY WORKS FOR BATCH JOBS ON LOCAL HOSTS
        if [[ $host != $localhost ]]
        then
@@ -4951,14 +4548,14 @@
 
 
-       # ZUSAMMENSTELLUNG DES JOBSCRIPTS AUF DATEI jobfile
+       # BUILD THE JOB-SCRIPTS ON FILE jobfile
     jobfile=jobfile.$RANDOM
 
 
-       # TEMPORAERES VERZEICHNIS GENERIEREN UND NACH DORT WECHSELN
+       # CREATE TEMPORARY DIRECTORY AND SWITCH TO IT
     echo  "mkdir  $TEMPDIR"      >>  $jobfile
     echo  "cd  $TEMPDIR"         >>  $jobfile
 
 
-       # EVENTUELL FEHLERVERFOLGUNG AKTIVIEREN
+       # ACTIVATE ERROR-TRACEBACK
     if [[ $do_trace = true ]]
     then
@@ -4969,5 +4566,5 @@
 
 
-       # initialize the environment and load modules
+       # INITIALIZE THE ENVIRONMENT AND LOAD MODULES
     if [[ "$init_cmds" != "" ]]
     then
@@ -4980,11 +4577,15 @@
 
 
-       # BEREITSTELLUNG VON QUELLTEXTEN, MRUN-SCRIPTS UND KONFIGURATIONS-
-       # DATEI FUER DEN JOB
-    if [[ $( echo $host | cut -c1-5 ) = lcsgi  ||  $host = ibmkisti  ||  $host = lccrayb  ||  $host = lccrayf  ||  $host = lccrayh ]]
-    then
-
-          # KONFIGURATIONSDATEI UND MRUN_SCRIPT IN DAS SOURCE-VERZEICHNIS
-          # KOPIEREN
+       # PROVIDE SOURCE-CODE FILES, MRUN-SCRIPT AND CONFIGURATION-FILE FOR THE JOB
+       # then-CLAUSE: FILES ARE COLLECTED IN THE SOURCES_FOR_RUN_... DIRECTORY ON THE LOCAL HOST,
+       #              WHICH IS THEN FETCHED FROM THE BATCH-JOB BY USING cp/scp
+       #              THE SOURCE-CODE FILES ALREADY EXIST IN THIS DIRECTORY
+       # else-CLAUSE: FILE-CONTENTS ARE PUT INTO THE JOB-FILE AS HERE-DOCUMENTS
+       #              THIS MAY CREATE A QUITE LARGE JOB-FILE, WHICH CAN CAUSE PROBLEMS WITH SOME
+       #              QUEUEING-SYSTEMS
+    if [[ $host = ibmkisti  ||  $host = lccrayb  ||  $host = lccrayf  ||  $host = lccrayh ]]
+    then
+
+          # COPY CONFIGURATION-FILE AND MRUN-SCRIPT INTO THE SOURCES_FOR_RUN... DIRECTORY
        if [[ $restart_run != true ]]
        then
@@ -4993,6 +4594,6 @@
        fi
 
-          # SOURCE-VERZEICHNIS VOM LOKALEN RECHNER PER SCP TRANSFERIEREN
-          # (BEI JOBS AUF LOKALEM RECHNER REICHT CP)
+          # COPY THE SOURCES_FOR_RUN... DIRECTORY FROM THE LOCAL HOST TO THE JOB VIA scp
+          # (then-CLAUSE: JOBS ON THE LOCAL HOST CAN JUST USE cp)
        echo  "set -x"  >>  $jobfile
        if [[ $host = $localhost ]]
@@ -5011,5 +4612,5 @@
           if [[ $host = ibmkisti ]]
           then
-                # on KISTI's IBM firewall is only opened on interactive node
+                # ON KISTI'S IBM FIREWALL IS ONLY OPENED ON INTERACTIVE NODE
              echo  "localdir=\`pwd\`"                            >>  $jobfile
              echo  "ssh $SSH_PORTOPT $remote_username@gaiad \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
@@ -5029,6 +4630,6 @@
        echo  "export SOURCES_COMPLETE=true"                      >>  $jobfile
 
-          # QUELLTEXTE, MRUN-SCRIPT UND KONFIGURATIONSDATEI IN DAS AKTUELLE
-          # ARBEITSVERZEICHNIS VERSCHIEBEN
+          # MOVE MRUN-SCRIPT AND CONFIGURATION-FILE FROM THE SOURCES_FOR_RUN... DIRECTORY TO THE
+          # WORKING DIRECTORY OF THE JOB
        echo  "mv  SOURCES_FOR_RUN_$fname/$config_file  . "       >>  $jobfile
        echo  "mv  SOURCES_FOR_RUN_$fname/$mrun_script_name  . "  >>  $jobfile
@@ -5039,6 +4640,5 @@
     else
 
-          # ABSPEICHERN DER QUELLTEXTE (NUR FALLS UEBERSETZT WERDEN SOLL)
-          # SOWIE GEGEBENENFALLS DES MAKEFILES
+          # PROVIDE SOURCE-CODE FILES AND MAKEFILE AS HERE DOCUMENT
        if [[ $do_compile = true ]]
        then
@@ -5046,7 +4646,5 @@
           source_catalog=SOURCES_FOR_RUN_$fname
 
-              # UNTERVERZEICHNIS FUER QUELLTEXTE UND MAKEFILE ANLEGEN
-              # MRUN WIRD DIESES VRZEICHNIS UEBER ENVIRONMENT VARIABLE
-              # MITGETEILT (UEBERSTEUERT ANGABE IN KONFIGURATIONSDATEI)
+              # CREATE SOURCES_FOR_RUN... DIRECTORY TO STORE THE SOURCE CODE FILES AND THE MAKEFILE
           echo  "mkdir  SOURCES_FOR_RUN_$fname"                >>  $jobfile
           echo  "export SOURCES_COMPLETE=true"                 >>  $jobfile
@@ -5055,5 +4653,5 @@
           for  filename  in  $source_list
           do
-                # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN
+                # BACKSLASH IS USED FOR MASKING
              echo  "cat > $filename << \"%END%\""              >>  $jobfile
              cat   $source_catalog/$filename                   >>  $jobfile
@@ -5063,5 +4661,5 @@
           done
 
-             # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN
+             # BACKSLASH IS USED FOR MASKING
           echo  "cat > Makefile << \"%END%\""               >>  $jobfile
           cat   $source_catalog/Makefile                    >>  $jobfile
@@ -5075,13 +4673,12 @@
 
 
-          # ABSPEICHERN DER KONFIGURATIONSDATEI
-          # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN
-          # Lines with #$ coming from the svn keyword substitution are
-          # removed from the config file in order to avoid problems
-          # with the SGE batch system
+          # PROVIDE THE CONFIGURATION-FILE AS HERE-DOCUMENT
+          # BACKSLASH IS USED FOR MASKING
+          # LINES WITH #$ IN THE CONFIGURATION-FILE, COMING FROM THE SVN KEYWORD SUBSTITUTION,
+          # ARE REMOVED FROM THE FILE IN ORDER TO AVOID PROBLEMS WITH THE SGE BATCH SYSTEM
        echo  "cat > $config_file << \"%END%\""      >>  $jobfile
        if [[ $host = lckyuh ]]
        then
-             # no cross compiler on compute node
+             # NO CROSS-COMPILER ON COMPUTE NODE
           sed  's/frtpx/frt/g'  $config_file        >>  $jobfile
        else
@@ -5092,6 +4689,6 @@
 
 
-          # ABSPEICHERN DER AKTUELLEN MRUN-VERSION
-          # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN
+          # PROVIDE THE MRUN-SCRIPTS AS HERE-DOCUMENT
+          # BACKSLASH IS USED FOR MASKING
        echo  "cat > $mrun_script_name <<\"%END%\""  >>  $jobfile
        if [[ $host = lckyuh ]]
@@ -5109,8 +4706,7 @@
 
 
-       # EVTL. BENOETIGTE INPUT-DATEIEN PER FTP HOLEN ODER DEM JOB DIREKT
-       # MITGEBEN UND AUF DEM REMOTE-RECHNER IM BENUTZERVERZEICHNIS ABLEGEN
-       # FALLS DIESES NICHT EXISTIERT, WIRD VERSUCHT, DAS JEWEILS LETZTE
-       # UNTERVERZEICHNIS DES PFADNAMENS ANZULEGEN
+       # GET REQUIRED INPUT-FILES BY SCP OR BY SENDING THEM WITH THE JOB AS HERE-DOCUMENT
+       # PUT THESE FILES INTO THE USER'S RESPECTIVE PERMANENT DIRECTORIES ON THE REMOTE-HOST
+       # IF THE DIRECTORIES DO NOT EXIST, TRY TO CREATE THEM
     if [[ $do_remote = true ]]
     then
@@ -5130,5 +4726,5 @@
           fi
 
-             # UEBERPRUEFEN, OB DATEI ANGELEGT WERDEN KONNTE
+             # CHECK, IF FILE COULD BE CREATED
           echo  "if [[ \$? = 1 ]]"                    >>  $jobfile
           echo  "then"                                >>  $jobfile
@@ -5142,18 +4738,16 @@
     fi
 
-       # ARBEITSKATALOG AUF DER LOKALEN MASCHINE FUER EVENTUELLE 
-       # FORTSETZUNGSLAUEFE PER ENV-VARIABLE UEBERGEBEN
+       # PROVIDE NAME OF THE CURRENT WORKING-DIRECTORY ON THE LOCAL MACHINE (FROM WHERE THE JOB IS
+       # STARTED) BY SETTING AN ENVIRONMENT-VARIABLE. THIS INFORMATION IS USED IN THE JOB BY MRUN
+       # IN CASE THAT RESTART-RUNS HAVE TO BE GENERATED
     echo  "LOCAL_PWD=$working_directory"                >>  $jobfile
     echo  "export LOCAL_PWD"                            >>  $jobfile
 
-       # EBENSO LOKALEN MRUN-KATALOG UEBERGEBEN 
+       # PROVIDE THE PATH OF THE LOCAL MRUN-SCRIPT FOR THE SAME REASON 
     echo  "LOCAL_MRUN_PATH=$PALM_BIN"                   >>  $jobfile
     echo  "export LOCAL_MRUN_PATH"                      >>  $jobfile
 
-       # WORKAROUND FUER RIAM-NEC-JOBS WEGEN PROFILE-SCHWIERIGKEITEN
-    if [[ $localhost_realname = "gate"  ||  $localhost = lctit ]]
-    then
-       echo  "export PALM_BIN=$PALM_BIN"                >>  $jobfile
-    elif [[ $host = lcflow  ||  $localhost = lcflow ]]
+       # lcflow ALSO REQUIRES TO PROVIDE PATH FOR THE PALM-SCRIPTS
+    if [[ $host = lcflow  ||  $localhost = lcflow ]]
     then
        echo  "export PALM_BIN=$PALM_BIN" | sed -e 's:'$HOME':$HOME:'   >>  $jobfile
@@ -5161,5 +4755,6 @@
     fi
 
-       # MRUN AUF ZIELRECHNER AUFRUFEN (queue is workaround for ibmkisti)
+       # CALL MRUN WITHIN THE JOB (SETTING QUEUE IS A WORKAROUND FOR ibmkisti)
+       # AS FINAL ACTION, REMOVE THE TEMPORARY DIRECTORY CREATED AT THE BEGINNING OF THE JOB
     echo  "set -x"                                        >>  $jobfile
     echo  "queue=$queue"                                  >>  $jobfile
@@ -5172,5 +4767,5 @@
 
 
-       # JOB PER SUBJOB STARTEN
+       # START THE JOB USING SUBJOB-COMMAND
     if [[ $silent = false ]]
     then
@@ -5184,7 +4779,3 @@
 
 
- fi  # ENDE REMOTE-TEIL
-
-
-
-     # ENDE DER PROZEDUR
+ fi  # END OF REMOTE-PART
Index: palm/trunk/SCRIPTS/subjob
===================================================================
--- palm/trunk/SCRIPTS/subjob	(revision 1282)
+++ palm/trunk/SCRIPTS/subjob	(revision 1289)
@@ -23,5 +23,6 @@
 # Current revisions:
 # ------------------
-# 
+# German comments translated to English
+# fimm-, necriam-, scirocco-, ibmy-, and sgi-specific code removed
 #
 # Former revisions:
@@ -91,5 +92,5 @@
 
 
-    # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
+    # VARIABLE-DECLARATIONS AND DEFAULT VALUES
  delete_dayfile=false
  email_notification=none
@@ -115,6 +116,6 @@
 
 
-    # FEHLERBEHANDLUNG
-    # BEI EXIT:
+    # ERROR HANDLING
+    # IN CASE OF EXIT:
  trap 'if [[ $locat != normal ]]
        then
@@ -132,5 +133,5 @@
 
 
-    # BEI TERMINAL-BREAK:
+    # IN CASE OF TERMINAL-BREAK:
  trap '[[ -f $job_to_send ]]  &&  rm  $job_to_send
        printf "\n\n+++ SUBJOB killed \n\n"
@@ -141,13 +142,13 @@
 
 
-    # LOKALEN HOSTNAMEN FESTSTELLEN
+    # DETERMINE NAME OF LOCAL HOST
  local_host=$(hostname)
 
 
 
-    # HOSTSPEZIFISCHE VARIABLEN VEREINBAREN BZW. PRUEFEN, OB LOKALER HOST
-    # UEBERHAUPT ZULAESSIG IST
-    # Note: One of the entries for "lck" or "lckordi" always has to be
-    # comment out, because the hostname (node*) is same for both machines
+    # SET HOST-SPECIFIC VARIABLES VEREINBAREN (CHECK, IF LOCAL HOST
+    # IS ADMITTED AT ALL)
+    # NOTE: ONE OF THE ENTRIES FOR "lck" OR "lckordi" ALWAYS HAS TO BE
+    # COMMENT OUT, BECAUSE THE HOSTNAME (node*) IS SAME FOR BOTH MACHINES
  case  $local_host  in
      (ambiel-lx)             local_addres=134.106.74.48;  local_host=lcfor;;
@@ -156,11 +157,5 @@
      (autan)                 local_addres=130.75.105.57;  local_host=lcmuk;;
      (bora)                  local_addres=130.75.105.103; local_host=lcmuk;;
-     (bd1)                   local_addres=130.73.232.64;  local_host=lcsgib;;
-     (bd2)                   local_addres=130.73.232.65;  local_host=lcsgib;;
-     (bd3)                   local_addres=130.73.232.66;  local_host=lcsgib;;
-     (bd4)                   local_addres=130.73.232.67;  local_host=lcsgib;;
-     (b01*|bicegate1)        local_addres=130.73.232.102; local_host=lcsgib;;
      (b04*)                  local_addres=133.5.4.33;     local_host=lckyuh;;
-     (bicegate2)             local_addres=130.73.232.103; local_host=lcsgib;;
      (blizzard1)             local_addres=136.172.40.15;  local_host=ibmh;;
      (blogin*|bxc*)          local_addres=130.73.233.1;   local_host=lccrayb;;
@@ -171,8 +166,6 @@
      (climate*)              local_addres=165.132.26.68;  local_host=lcyon;;
      (clogin*)               local_addres=86.50.166.21;   local_host=lccrayf;;
-     (compute-*.local)       local_addres=172.20.4.2;     local_host=lcfimm;;
      (cs*)                   local_addres=136.172.44.131; local_host=nech;;
      (elephanta)             local_addres=130.75.105.6;   local_host=lcmuk;;
-     (fimm.bccs.uib.no)      local_addres=172.20.4.2;     local_host=lcfimm;;
      (flow01)                local_addres=10.141.255.71;  local_host=lcflow;;
      (flow02)                local_addres=10.141.255.72;  local_host=lcflow;;
@@ -181,16 +174,8 @@
      (gaia*)                 local_addres=150.183.146.24; local_host=ibmkisti;;
      (gallego)               local_addres=130.75.105.10;  local_host=lcmuk;;
-     (gfdl5)                 local_addres=165.132.26.58;  local_host=ibmy;;
      (gregale)               local_addres=130.75.105.109; local_host=lcmuk;;
      (hababai)               local_addres=130.75.105.108; local_host=lcmuk;;
      (hayaka*)               local_addres=133.5.4.33;     local_host=lckyuh;;
      (hexagon.bccs.uib.no)   local_addres=129.177.20.113; local_host=lcxe6;;
-     (hd1)                   local_addres=130.75.4.104;   local_host=lcsgih;;
-     (hd2)                   local_addres=130.75.4.105;   local_host=lcsgih;;
-     (hd3)                   local_addres=130.75.4.106;   local_host=lcsgih;;
-     (hd4)                   local_addres=130.75.4.107;   local_host=lcsgih;;
-     (hicegate0)             local_addres=130.75.4.101;   local_host=lcsgih;;
-     (h01*|hicegate1)        local_addres=130.75.4.102;   local_host=lcsgih;;
-     (hicegate2)             local_addres=130.75.4.103;   local_host=lcsgih;;
      (hx*)                   local_addres=133.3.51.11;    local_host=lckyoto;;
      (inferno)               local_addres=130.75.105.5;   local_host=lcmuk;;
@@ -212,13 +197,8 @@
      (quanero)               local_addres=130.75.105.107; local_host=lcmuk;;
      (rte*)                  local_addres=133.5.185.60;   local_host=lcrte;;
-     (r1*)                   local_addres=130.75.4.102;   local_host=lcsgih;;
-     (r2*)                   local_addres=130.73.232.102; local_host=lcsgib;;
-     (scirocco)              local_addres=172.20.25.41;   local_host=lcmuk;;
      (shiokaze-lx)           local_addres=134.106.74.123; local_host=lcfor;;
      (sisu-login*)           local_addres=86.50.166.21;   local_host=lccrayf;;
      (solano)                local_addres=130.75.105.110; local_host=lcmuk;;
      (sugoka*)               local_addres=172.31.120.1;   local_host=lckyut;;
-     (sun1|sun2)             local_addres=130.75.6.1;     local_host=unics;;
-     (sx-*)                  local_addres=172.16.1.131;   local_host=necriam;;
      (t2a*)                  local_addres=10.1.6.165;     local_host=lctit;;
      (urban*)                local_addres=147.46.30.151   local_host=lcsb;;
@@ -233,5 +213,5 @@
 
 
-    # REMOTE HOST DEFAULTMAESSIG = LOCAL HOST SETZEN
+    # BY DEFAULT, THE REMOTE HOST IS THE LOCAL HOST
  remote_host=$local_host
 
@@ -239,5 +219,5 @@
 
 
-    # PROZEDUROPTIONEN EINLESEN
+    # READ THE SHELLSCRIPT-OPTIONS
  while  getopts  :c:dDe:g:h:m:n:N:O:P:q:t:T:u:vX:  option
  do
@@ -266,10 +246,10 @@
 
 
-    # JOBDATEINAMEN ALS NAECHSTES ARGUMENT HOLEN
+    # GET THE NAME OF THE JOBFILE AS NEXT ARGUMENT
  (( to_shift = $OPTIND - 1 ))
  shift $to_shift; file_to_send=$1
 
 
-    # KURZE AUFRUFBESCHREIBUNG WIRD HIER AUSGEGEBEN
+    # OUTPUT OF SHORT DESCRIPTION OF SCRIPT-OPTIONS
  if [ "$1" = "?" ]
  then
@@ -282,6 +262,6 @@
     printf "\n        -D    only the job-file will be created   ---"
     printf "\n        -h    execution host, available hosts:    $remote_host"
-    printf "\n              ibm, ibmh, ibmkisti, ibmku, ibms, ibmy, lc...,"
-    printf "\n              lckiaps, lctit, nech, necriam, unics"
+    printf "\n              ibm, ibmh, ibmkisti, ibmku, ibms, lc...,"
+    printf "\n              lckiaps, lctit, nech"
     printf "\n        -m    memory demand per process in MByte  ---"
     printf "\n        -n    jobname                             <jobdatei>"
@@ -303,5 +283,5 @@
 
 
-    # PRUEFEN, OB JOBDATEI ANGEGEBEN WURDE UND OB SIE AUCH EXISTIERT
+    # CHECK, IF JOB-FILE HAS BEEN GIVEN AS ARGUMENT AND IF THE FILE ITSELF EXISTS
  if [[ "$file_to_send" = "" ]]
  then
@@ -322,6 +302,6 @@
 
 
-    # FALLS KEIN JOBNAME ANGEGEBEN WURDE, WIRD JOBNAME = JOBDATEINAME
-    # GESETZT. VORAUSSETZUNG: JOBDATEINAME BEINHALTET KEINE PFADE
+    # IF NO JOBNAME HAS BEEN GIVEN, JOBNAME IS SET TO THE NAME OF THE JOB-FILE,
+    # PROVIDED THAT THE JOB-FILE NAME DOES NOT CONTAIN ANY PATH
  if [[ $job_name = none ]]
  then
@@ -339,6 +319,6 @@
 
 
-    # HOSTSPEZIFISCHE GROESSEN VEREINBAREN BZW. ABBRUCH BEI UNZULAESSIGEM HOST
-    # ODER WENN HOST NICHT ANGEGEBEN WURDE
+    # SET HOST-SPECIFIC QUANTITIES, OR TERMINATE IN CASE OF UNKNOWN HOST,
+    # OR IF NO HOST HAS BEEN GIVEN
  if [[ $remote_host = none ]]
  then
@@ -352,13 +332,9 @@
         (ibmku)   queue=s4; remote_addres=133.5.4.129; submcom=/usr/local/bin/llsubmit;;
         (ibms)    queue=p_normal; remote_addres=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
-        (ibmy)    queue=parallel; remote_addres=165.132.26.58; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
         (lccrayb) queue=testq; remote_addres=130.73.233.1; submcom=/opt/moab/7.2.6/bin/msub;;
         (lccrayh) queue=mpp1testq; remote_addres=130.75.4.1; submcom=/opt/moab/7.2.6/bin/msub;;
         (lccrayf) queue=small; remote_addres=86.50.166.21; submcom=/opt/slurm/default/bin/sbatch;;
-	(lcfimm)  remote_addres=172.20.4.2; submcom=/opt/torque/bin/qsub;;
         (lcflow)  remote_addres=10.140.1.71; submcom=/cm/shared/apps/sge/6.2u5p2/bin/lx26-amd64/qsub;;
         (lckyoto) remote_addres=133.3.51.11; submcom=/thin/local/bin/qsub;;
-        (lcsgib)  queue=smallq; remote_addres=130.73.232.104; submcom=/opt/moab/bin/msub;;
-        (lcsgih)  queue=smallq; remote_addres=130.75.4.101; submcom=/opt/moab/bin/msub;;
         (lck)     remote_addres=165.132.26.61; submcom=/usr/torque/bin/qsub;;
         (lckiaps) remote_addres=118.128.66.223; submcom=/cm/shared/apps/pbspro/11.0.2.110766/bin/qsub;;
@@ -372,7 +348,4 @@
         (lcyon)   remote_addres=165.132.26.68; submcom=/usr/torque/bin/qsub;;
         (nech)    qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=136.172.44.147; submcom="/usr/local/bin/qsub";;
-        (necriam) qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=172.16.1.131; submcom="/usr/bin/nqsII/qsub";;
-        (vpp)     qsubmem=m; qsubtime=t; queue=vpp; remote_addres=130.75.4.130;;
-        (unics)   qsubmem=d; qsubtime=t; queue=unics; remote_addres=130.75.6.1;;
         (*)       printf "\n  +++ hostname \"$remote_host\" not allowed";
                   locat=parameter; exit;;
@@ -381,5 +354,5 @@
 
 
-    # EVTL. PRUEFEN, OB ANGEGEBENE QUEUE ZULAESSIG IST
+    # CHECK, IF A VALID QUEUE HAS BEEN GIVEN
  if [[ $no_default_queue != none ]]
  then
@@ -407,8 +380,4 @@
                      (*)                                     error=true;;
                  esac;;
-        (ibmy)   case  $ndq  in
-                     (parallel)                              error=false;;
-                     (*)                                     error=true;;
-                 esac;;
         (lccrayb) case  $ndq  in
                      (mpp1q|testq|specialm1q)                error=false;;
@@ -443,8 +412,4 @@
                      (*)                                     error=true;;
                  esac;;
-        (lcsgib|lcsgih)   case  $ndq  in
-                     (testq|serialq|smallq|mediumq|bigq|workq|dataq|permq|special1q)       error=false;;
-                     (*)                                     error=true;;
-                 esac;;
         (lctit)  case  $ndq  in
                      (G|L128|L256|L512H|S|S96|V)             error=false;;
@@ -455,8 +420,4 @@
                      (*)    error=true;;
                  esac;;
-        (necriam) case  $ndq  in
-                     (SP|SS|P6)  error=false;;
-                     (*)    error=true;;
-                 esac;;
         (t3eh)   case  $ndq  in
                      (para_t3e|em|k|l|lm|comp_t3e|c|p|ht)  error=false;;
@@ -471,8 +432,4 @@
                      (*)    error=true;;
                  esac;;
-        (unics)  case  $ndq  in
-                     (unics|ht)  error=false;;
-                     (*)         error=true;;
-                 esac;;
     esac
     if [[ $error = true ]]
@@ -487,6 +444,6 @@
 
 
-    # PRUEFEN DER CPU-ZEIT, ZEIT NACH STUNDEN, MINUTEN UND SEKUNDEN
-    # AUFTEILEN
+    # CHECK THE CPU-TIME
+    # SPLIT TIME INTO HOURS, MINUTES, AND SECONDS
  done=false
  while [[ $done = false ]]
@@ -520,5 +477,5 @@
 
 
-    # PRUEFEN DER KERNSPEICHERANFORDERUNG
+    # CHECK THE MEMORY DEMAND
  done=false
  while [[ $done = false ]]
@@ -535,5 +492,5 @@
  done
 
- if [[ $remote_host = nech  ||  $remote_host = necriam ]]
+ if [[ $remote_host = nech ]]
  then
     if (( tasks_per_node != 0 ))
@@ -552,5 +509,5 @@
 
 
-    # SPEICHERBERECHNUNG BEI OPENMP-NUTZUNG
+    # MEMORY DEMAND IN CASE OF OPENMP-USAGE ON IBM-SYSTEMS
  if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
  then
@@ -559,5 +516,5 @@
 
 
-    # BERECHNUNG DER ANZAHL DER ZU VERWENDENDEN KNOTEN
+    # CALCULATE NUMBER OF REQUIRED NODES
  if (( tasks_per_node != 0 ))
  then
@@ -566,13 +523,13 @@
 
 
-    # Calculate number of processes per node
+    # CALCULATE NUMBER OF PROCESSES PER NODE
  (( processes_per_node = tasks_per_node * threads_per_task ))
 
 
-    # Calculate number of MPI tasks
+    # CALCULATE NUMBER OF MPI TASKS
  (( mpi_tasks = numprocs / threads_per_task ))
 
 
-    # Set port number option for calls of ssh/scp, subjob and batch_scp scripts
+    # SET PORT NUMBER OPTION FOR CALLS OF ssh/scp, subjob AND batch_scp SCRIPTS
  if [[ "$scp_port" != "" ]]
  then
@@ -582,5 +539,5 @@
 
 
-    # HEADER-AUSGABE
+    # HEADER-OUTPUT
  if [[ $verify = true ]]
  then
@@ -612,5 +569,5 @@
 
 
-       # KONTROLLABFRAGE, OB ALLES O.K.
+       # QUERY CHECK
     antwort="dummy"
     while [[ $antwort != y  &&  $antwort != Y  &&  $antwort != n  &&  $antwort != N ]]
@@ -627,11 +584,11 @@
 
 
-    # ZUFALLSKENNUNG GENERIEREN UND JOBNAMEN AUF ZIELRECHNER BESTIMMEN
- kennung=$RANDOM
- job_on_remhost=${job_name}_${kennung}_$local_host
- job_to_send=job_to_send_$kennung
+    # GENERATE RANDOM IDENTIFIER, AND DETERMINE THE JOBNAME ON THE TARGET HOST
+ identifier=$RANDOM
+ job_on_remhost=${job_name}_${identifier}_$local_host
+ job_to_send=job_to_send_$identifier
  if [[ $delete_dayfile = false ]]
  then
-    remote_dayfile=${local_host}_${job_name}_result_$kennung
+    remote_dayfile=${local_host}_${job_name}_result_$identifier
     local_dayfile=${remote_host}_${job_name}
  else
@@ -641,9 +598,9 @@
 
 
-    # Generate the batch job scripts (qsub/msub/LoadLeveler)
+    # GENERATE THE BATCH-JOB SCRIPTS (FOR QUEUEING-SYSTEMS qsub/msub/LoadLeveler)
  if [[ $(echo $remote_host | cut -c1-3) = ibm  &&  $numprocs != 0 ]]
  then
 
-       # General LoadLeveler settings
+       # GENERAL LOADLEVELER SETTINGS
     execute_in_shell="#!/bin/ksh"
     use_shell="# @ shell = /bin/ksh"
@@ -700,8 +657,4 @@
     then
        network_to_use="# @ network.mpi = csss,shared,us"
-    elif [[ $remote_host = ibmy ]]
-    then
-       consumable_memory=""
-       network_to_use=""
     fi
 
@@ -756,8 +709,5 @@
     else
 
-       if [[ $remote_host != ibmy ]]
-       then
-
-          cat >> $job_to_send << %%END%%
+       cat >> $job_to_send << %%END%%
 # @ blocking = unlimited
 # @ total_tasks = $numprocs
@@ -767,18 +717,7 @@
 %%END%%
 
-       else
-
-          cat >> $job_to_send << %%END%%
-# @ node = 1
-# @ total_tasks = $numprocs
-# @ queue
-
-%%END%%
-
-       fi
-
-    fi
-
-       # workaround because of silly job filter on ibmkisti
+    fi
+
+       # WORKAROUND BECAUSE OF SILLY JOB FILTER ON ibmkisti
     if [[ $remote_host = ibmkisti  &&  $threads_per_task != 1 ]]
     then
@@ -863,39 +802,4 @@
 $init_cmds
 $module_calls
-
-%%END%%
-
-    fi
-
- elif [[ $remote_host = lcfimm ]]
- then
-
-    if [[ $numprocs != 0 ]]
-    then
-       cat > $job_to_send << %%END%%
-#!/bin/ksh
-#PBS -N $job_name
-#PBS -A $project_account
-#PBS -l walltime=$timestring
-#PBS -l nodes=${nodes}:ppn=$processes_per_node
-#PBS -l pmem=${memory}mb
-#PBS -m abe
-#PBS -o $remote_dayfile
-#PBS -j oe
-mpd &
-
-%%END%%
-
-    else
-       cat > $job_to_send << %%END%%
-#!/bin/ksh
-#PBS -N $job_name
-#PBS -A $project_account
-#PBS -l walltime=$timestring
-#PBS -l ncpus=1
-#PBS -l pmem=${memory}mb
-#PBS -m abe
-#PBS -o $remote_dayfile
-#PBS -j oe
 
 %%END%%
@@ -1036,76 +940,4 @@
     fi
 
- elif [[ $remote_host = lcsgih  ||  $remote_host = lcsgib ]]
- then
-
-    if [[ "$sgi_feature" != "" ]]
-    then
-       feature_directive="#PBS -l feature=$sgi_feature"
-    else
-       feature_directive=""
-    fi
-
-    if [[ $queue = dataq || $queue = permq ]]
-    then
-       feature_directive="#PBS -l feature=data"
-    fi
-
-    if [[ $queue = testq  || $queue = mediumq  ||  $queue = bigq  ||  $queue = workq  ||  $queue = dataq  ||  $queue = permq ||  $queue = serialq  ||  $queue = special1q ]]
-    then
-       queue_directive="#PBS -q $queue"
-    else
-       queue_directive=""
-    fi
-
-    if [[ $email_notification = none ]]
-    then
-       email_directive=""
-    else
-       email_directive="#PBS -M $email_notification"
-    fi
-
-    if [[ $numprocs != 0 ]]
-    then
-       cat > $job_to_send << %%END%%
-#!/bin/bash
-#PBS -N $job_name
-#PBS -l walltime=$timestring
-#PBS -l nodes=$nodes:ppn=${processes_per_node}
-#PBS -l naccesspolicy=$node_usage
-#PBS -o $remote_dayfile
-#PBS -j oe
-$feature_directive
-$queue_directive
-$email_directive
-
-eval \`/sw/swdist/bin/modulesinit\`
-#. /usr/share/modules/init/bash
-$init_cmds
-$module_calls
-
-echo ld_library_path=\$LD_LIBRARY_PATH
-
-%%END%%
-
-    else
-       cat > $job_to_send << %%END%%
-#PBS -S /bin/bash
-#PBS -N $job_name
-#PBS -l walltime=$timestring
-#PBS -l ncpus=1
-#PBS -o $remote_dayfile
-#PBS -j oe
-$queue_directive
-$email_directive
-
-eval \`/sw/swdist/bin/modulesinit\`
-#. /usr/share/modules/init/bash
-$init_cmds
-$module_calls
-
-%%END%%
-
-    fi
-
  elif [[ $remote_host = lcxe6 ]]
  then
@@ -1290,41 +1122,4 @@
     fi
 
- elif [[ $remote_host = necriam ]]
- then
-
-    if (( nodes > 1 ))
-    then
-       cat > $job_to_send << %%END%%
-#!/bin/ksh
-#PBS -b $nodes
-#PBS -o $remote_dayfile
-#PBS -N $job_name
-#PBS -j o
-#PBS -v MPIPROGINV=YES
-
-%%END%%
-
-    elif [[ $numprocs != 0 ]]
-    then
-       cat > $job_to_send << %%END%%
-#!/bin/ksh
-#PBS -q ${queue}
-#PBS -o $remote_dayfile
-#PBS -N $job_name
-#PBS -j o
-#PBS -v MPIPROGINV=YES
-
-%%END%%
-
-    else
-       cat > $job_to_send << %%END%%
-#!/bin/ksh
-#PBS -o $remote_dayfile
-#PBS -j o
-
-%%END%%
-
-    fi
-
  elif [[ $remote_host = lctit ]]
  then
@@ -1336,5 +1131,5 @@
 %%END%%
 
-       # OPTIONEN FUER SUBMIT-KOMMANDO ZUSAMMENSTELLEN
+       # SET OPTIONS FOR SUBMIT-COMMAND
     if [[ $tasks_per_node != $processes_per_node ]]
     then
@@ -1358,8 +1153,7 @@
 
 
-    # BEI RECHNUNG AUF REMOTE-MASCHINEN RUECKTRANSFER DES DAYFILES PER TRAP
-    # BEI EXIT VERANLASSEN
-    # VEKTORRECHNER MUSS EIGENEN JOB STARTEN, DA DORT NOHUP NICHT FUNKTIONIERT
-    # AUF IBM IN SEOUL IST RUECKTRANSFER ZUR ZEIT GENERELL NICHT MOEGLICH
+    # IN CASE OF JOBS EXECUTING ON REMOTE-HOSTS, THE TRANSFER OF THE DAYFILES
+    # TO THE LOCAL HOSTS WILL BE INITIATED BY TRAP ON EXIT
+    # NO TRANSFER POSSIBLE ON IBM IN SEOUL
  if [[ $delete_dayfile = false  &&  $remote_host != $local_host ]]
  then
@@ -1367,5 +1161,5 @@
     echo "trap '"                               >>  $job_to_send
     echo "set +vx"                              >>  $job_to_send
-    if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lccrayb  ||  $remote_host = lccrayh  ||  $(echo $remote_host | cut -c1-5) = lcsgi  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lcflow  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* ]]
+    if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lccrayb  ||  $remote_host = lccrayh  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lcflow  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* ]]
     then
        if [[ $remote_host = ibmh ]]
@@ -1381,13 +1175,4 @@
        then
           return_queue=p_normal
-       elif [[ $remote_host = ibmy ]]
-       then
-          return_queue=serial
-       elif [[ $remote_host = lcsgih  ||  $remote_host = lcsgib ]]
-       then
-          return_queue=serialq
-       elif [[ $remote_host = necriam ]]
-       then
-          return_queue=SP
        elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]]
        then
@@ -1411,37 +1196,37 @@
           if [[ $remote_host = ibmku ]]
           then
-             echo "echo \"#!/usr/bin/ksh\" >> scpjob.$kennung"            >>  $job_to_send
-             echo "echo \"# @ shell = /usr/bin/ksh\" >> scpjob.$kennung"  >>  $job_to_send
+             echo "echo \"#!/usr/bin/ksh\" >> scpjob.$identifier"            >>  $job_to_send
+             echo "echo \"# @ shell = /usr/bin/ksh\" >> scpjob.$identifier"  >>  $job_to_send
           else
-             echo "echo \"#!/bin/ksh\" >> scpjob.$kennung"                >>  $job_to_send
+             echo "echo \"#!/bin/ksh\" >> scpjob.$identifier"                >>  $job_to_send
           fi
-          echo "echo \"# @ job_type = serial\" >> scpjob.$kennung"    >>  $job_to_send
-          echo "echo \"# @ job_name = transfer\" >> scpjob.$kennung"  >>  $job_to_send
-          echo "echo \"# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)\" >> scpjob.$kennung"  >>  $job_to_send
-          echo "echo \"# @ wall_clock_limit = 00:10:00,00:10:00\" >> scpjob.$kennung "  >>  $job_to_send
-          echo "echo \"# @ output = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung"  >>  $job_to_send
-          echo "echo \"# @ error = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung"  >>  $job_to_send
+          echo "echo \"# @ job_type = serial\" >> scpjob.$identifier"    >>  $job_to_send
+          echo "echo \"# @ job_name = transfer\" >> scpjob.$identifier"  >>  $job_to_send
+          echo "echo \"# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)\" >> scpjob.$identifier"  >>  $job_to_send
+          echo "echo \"# @ wall_clock_limit = 00:10:00,00:10:00\" >> scpjob.$identifier "  >>  $job_to_send
+          echo "echo \"# @ output = job_queue/last_job_transfer_protocol\" >> scpjob.$identifier"  >>  $job_to_send
+          echo "echo \"# @ error = job_queue/last_job_transfer_protocol\" >> scpjob.$identifier"  >>  $job_to_send
           if [[ $host != "ibmh" ]]
           then
-             echo "echo \"# @ class = $return_queue\" >> scpjob.$kennung"  >>  $job_to_send
+             echo "echo \"# @ class = $return_queue\" >> scpjob.$identifier"  >>  $job_to_send
           fi
-          echo "echo \"# @ image_size = 10\" >> scpjob.$kennung"      >>  $job_to_send
-          echo "echo \"# @ notification = never\" >> scpjob.$kennung" >>  $job_to_send
-
-          echo "echo \"# @ queue\" >> scpjob.$kennung"                >>  $job_to_send
-          echo "echo \" \" >> scpjob.$kennung"                        >>  $job_to_send
-
-          echo "echo \"set -x\" >> scpjob.$kennung"                   >>  $job_to_send
-          echo "echo \"batch_scp  $PORTOPT  -d  -w 10  -u $local_user  $local_addres  ${job_catalog}/$remote_dayfile  \\\"$job_catalog\\\"  $local_dayfile\" >> scpjob.$kennung"  >>  $job_to_send
+          echo "echo \"# @ image_size = 10\" >> scpjob.$identifier"      >>  $job_to_send
+          echo "echo \"# @ notification = never\" >> scpjob.$identifier" >>  $job_to_send
+
+          echo "echo \"# @ queue\" >> scpjob.$identifier"                >>  $job_to_send
+          echo "echo \" \" >> scpjob.$identifier"                        >>  $job_to_send
+
+          echo "echo \"set -x\" >> scpjob.$identifier"                   >>  $job_to_send
+          echo "echo \"batch_scp  $PORTOPT  -d  -w 10  -u $local_user  $local_addres  ${job_catalog}/$remote_dayfile  \\\"$job_catalog\\\"  $local_dayfile\" >> scpjob.$identifier"  >>  $job_to_send
           if [[ $remote_host = ibmku ]]
           then
-             echo "echo \"rm  scpjob.$kennung\" >> scpjob.$kennung"   >>  $job_to_send
+             echo "echo \"rm  scpjob.$identifier\" >> scpjob.$identifier"   >>  $job_to_send
           fi
-          echo "echo \"exit\" >> scpjob.$kennung"                     >>  $job_to_send
+          echo "echo \"exit\" >> scpjob.$identifier"                     >>  $job_to_send
 
        elif [[ $remote_host = nech ]]
        then
           echo "cd /pf/b/${remote_user}/job_queue" >>  $job_to_send
-          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
+          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
           echo "#PBS -l ${qsubmem}=1GB,${qsubtime}=100"  >>  $job_to_send
           echo "#PBS -o last_job_transfer_protocol"      >>  $job_to_send
@@ -1454,19 +1239,7 @@
           echo "%%END%%"                           >>  $job_to_send
 
-       elif [[ $remote_host = necriam ]]
-       then
-          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
-          echo "#PBS -q $return_queue"             >>  $job_to_send
-          echo "#PBS -o last_job_transfer_protocol"      >>  $job_to_send
-          echo "#PBS -j o"                         >>  $job_to_send
-          echo " "                                 >>  $job_to_send
-          echo "set -x"                            >>  $job_to_send
-          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
-          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
-          echo "%%END%%"                           >>  $job_to_send
-
        elif [[ $remote_host = lckyuh ]]
        then
-          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
+          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
           echo "#!/bin/bash"                       >>  $job_to_send
           echo "#PJM -L \"node=1\""                >>  $job_to_send
@@ -1485,5 +1258,5 @@
        elif [[ $remote_host = lckyut ]]
        then
-          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
+          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
           echo "#!/bin/bash"                       >>  $job_to_send
           echo "#PJM -L \"vnode=1\""               >>  $job_to_send
@@ -1500,24 +1273,7 @@
           echo "%%END%%"                           >>  $job_to_send
 
-       elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]]
-       then
-          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
-          echo "#!/bin/bash"                             >>  $job_to_send
-          echo "#PBS -N job_protocol_transfer"           >>  $job_to_send
-          echo "#PBS -l walltime=00:30:00"               >>  $job_to_send
-          echo "#PBS -l nodes=1:ppn=1"                   >>  $job_to_send
-          echo "#PBS -l feature=data"                    >>  $job_to_send
-          echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol"      >>  $job_to_send
-          echo "#PBS -j oe"                        >>  $job_to_send
-          echo " "                                 >>  $job_to_send
-          echo ". /usr/share/modules/init/bash"    >>  $job_to_send
-          echo "set -x"                            >>  $job_to_send
-          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
-          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
-          echo "%%END%%"                           >>  $job_to_send
-
        elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]]
        then
-          echo "cat > scpjob.$kennung << %%END%%"        >>  $job_to_send
+          echo "cat > scpjob.$identifier << %%END%%"        >>  $job_to_send
           echo "#!/bin/bash"                             >>  $job_to_send
           echo "#PBS -N job_protocol_transfer"           >>  $job_to_send
@@ -1534,5 +1290,5 @@
        elif [[ $remote_host = lcflow ]]
        then
-          echo "cat > scpjob.${kennung}.tmp << %%END%%"                  >>  $job_to_send
+          echo "cat > scpjob.${identifier}.tmp << %%END%%"                  >>  $job_to_send
           echo "#!/bin/bash"                                             >>  $job_to_send
           echo "SGEPREFIX -S /bin/bash"                                  >>  $job_to_send
@@ -1543,5 +1299,5 @@
           echo "SGEPREFIX -l excl_flow=false"                            >>  $job_to_send
           echo "SGEPREFIX -j y"                                          >>  $job_to_send
-          echo "SGEPREFIX -o ${local_host}_${job_name}_scpjob_$kennung"  >>  $job_to_send 
+          echo "SGEPREFIX -o ${local_host}_${job_name}_scpjob_$identifier"  >>  $job_to_send 
           echo " "                                                       >>  $job_to_send 
           echo "set -x"                                                  >>  $job_to_send 
@@ -1551,12 +1307,12 @@
           echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
           echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
-          echo "rm -f scpjob.${kennung}"                                 >>  $job_to_send         
+          echo "rm -f scpjob.${identifier}"                                 >>  $job_to_send         
           echo "%%END%%"                                                 >>  $job_to_send
-          echo "sed -e 's/SGEPREFIX/#$/g' scpjob.${kennung}.tmp > scpjob.${kennung}" >>  $job_to_send         
-          echo "rm -f scpjob.${kennung}.tmp"                             >>  $job_to_send         
+          echo "sed -e 's/SGEPREFIX/#$/g' scpjob.${identifier}.tmp > scpjob.${identifier}" >>  $job_to_send         
+          echo "rm -f scpjob.${identifier}.tmp"                             >>  $job_to_send         
 
        else
 
-          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
+          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
           echo "# @\\\$-q $return_queue"           >>  $job_to_send
           echo "# @\\\$-l${qsubtime} 10"           >>  $job_to_send
@@ -1567,5 +1323,4 @@
           fi
           echo '# @\$-lF 10mb'                     >>  $job_to_send
-#          echo '# @\$-o /dev/null'                 >>  $job_to_send
           echo '# @\$-o job_queue/last_job_transfer_protocol'    >>  $job_to_send
           echo '# @\\\$-eo'                          >>  $job_to_send
@@ -1584,38 +1339,33 @@
        if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
        then
-          echo "llsubmit  scpjob.$kennung"      >>  $job_to_send
+          echo "llsubmit  scpjob.$identifier"      >>  $job_to_send
        elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]]
        then
-          echo "msub -q $return_queue  scpjob.$kennung"               >>  $job_to_send
-       elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]]
-       then
-          echo "rm -rf \$HOME/job_queue/last_job_transfer_protocol"  >>  $job_to_send
-          echo "chmod  u+x  scpjob.$kennung"                         >>  $job_to_send
-          echo "msub  scpjob.$kennung"                               >>  $job_to_send
+          echo "msub -q $return_queue  scpjob.$identifier"               >>  $job_to_send
        elif [[ $remote_host = t3eb  ||  $remote_host = t3eh  ||  $remote_host = t3ej2  ||  $remote_host = t3ej5 ]]
        then
-          echo "qsub -J n  scpjob.$kennung"     >>  $job_to_send
+          echo "qsub -J n  scpjob.$identifier"     >>  $job_to_send
        elif [[ $remote_host = t3es ]]
        then
-          echo "qsub -J n  -s /bin/ksh  scpjob.$kennung"     >>  $job_to_send
+          echo "qsub -J n  -s /bin/ksh  scpjob.$identifier"     >>  $job_to_send
        elif [[ $remote_host = lckiaps ]]
        then
-          echo "mv  scpjob.$kennung  $job_catalog"           >>  $job_to_send
-          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"$submcom ${job_catalog}/scpjob.$kennung\" "  >>  $job_to_send
-          echo "rm  ${job_catalog}/scpjob.$kennung"          >>  $job_to_send
+          echo "mv  scpjob.$identifier  $job_catalog"           >>  $job_to_send
+          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"$submcom ${job_catalog}/scpjob.$identifier\" "  >>  $job_to_send
+          echo "rm  ${job_catalog}/scpjob.$identifier"          >>  $job_to_send
        elif [[ $remote_host = lckyu* ]]
        then
-          echo "scp $PORTOPT scpjob.$kennung  ${remote_username}@${remote_addres}:job_queue"           >>  $job_to_send
-          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"cd job_queue; $submcom scpjob.$kennung; rm scpjob.$kennung\" "  >>  $job_to_send
+          echo "scp $PORTOPT scpjob.$identifier  ${remote_username}@${remote_addres}:job_queue"           >>  $job_to_send
+          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"cd job_queue; $submcom scpjob.$identifier; rm scpjob.$identifier\" "  >>  $job_to_send
        elif [[ $remote_host = lcflow ]]
        then
-          echo "mv  scpjob.$kennung  $job_catalog"           >>  $job_to_send
-          echo "/usr/bin/ssh ${remote_username}@${remote_addres}  \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$kennung\" "  >>  $job_to_send
+          echo "mv  scpjob.$identifier  $job_catalog"           >>  $job_to_send
+          echo "/usr/bin/ssh ${remote_username}@${remote_addres}  \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$identifier\" "  >>  $job_to_send
        else
-          echo "$submcom  scpjob.$kennung"      >>  $job_to_send
+          echo "$submcom  scpjob.$identifier"      >>  $job_to_send
        fi
        if [[ $remote_host != ibmku  &&  $remote_host != lckiaps ]]
        then
-          echo "rm  scpjob.$kennung"            >>  $job_to_send
+          echo "rm  scpjob.$identifier"            >>  $job_to_send
        fi
        if [[ $remote_host = nech ]]
@@ -1625,4 +1375,5 @@
     else
 #       echo "ftpcopy  -d  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
+       # ??? funktioniert das ÃŒberhaupt noch ???
        echo "nohup  ftpcopy  -d  -w 15  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile  >  /dev/null  &"  >>  $job_to_send
     fi
@@ -1634,5 +1385,5 @@
 
 
-    # EIGENTLICHE JOB-DATEI AN QSUB-KOMMANDOS ANHAENGEN
+    # APPEND THE JOB-FILE (CREATE BY mrun) TO THE JOB-DIRECTIVES GENERATED ABOVE
  cat  $file_to_send  >>  $job_to_send
 
@@ -1643,5 +1394,5 @@
  fi
 
-    # remove job file
+    # REMOVE JOB-FILE
  if [[ $remote_host = lctit  ||  $remote_host = ibmku  ||  $remote_host = lcflow ]]
  then
@@ -1651,17 +1402,5 @@
 
 
-
-    # USER-NAME AUF ZIELRECHNER AUS .NETRC-DATEI ERMITTELN
- if [[ -z $remote_user ]]
- then
-    if [[ $remote_host = t3eb  ||  $remote_host = t3eh  ||  $remote_host = t3ej2  ||  $remote_host = t3ej5  ||  $remote_host = t3es  ||  $remote_host = vpp ]]
-    then
-       grep  $remote_addres  ~/.netrc | read dum dum dum remote_user dum dum
-    fi
- fi
-
-
-
-    # JOB AUF ZIELRECHNER TRANSFERIEREN BZW. INS JOBVERZEICHNIS KOPIEREN
+    # TRANSFER JOB TO THE TARGET HOST (JOB-DIRECTORY)
  if [[ $no_submit = false ]]
  then
@@ -1669,5 +1408,5 @@
     then
        [[ $verify = true ]]  &&  printf "\n >>> transfering job to \"$remote_host\"..."
-       if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]    # ssh on ibms cannot handle "~/"
+       if [[ $remote_host = ibms ]]    # ssh on ibms cannot handle "~/"
        then
           job_catalog_save=$job_catalog
@@ -1680,6 +1419,5 @@
        if [[ $remote_host = nech ]]
        then
-             # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ
-             # TRANSFERIERT WERDEN
+             # FILES CAN ONLY BE TRANSFERED VIA DKRZ'S ARCHIVE-SERVER
           scp  $PORTOPT  $job_to_send  ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost
        else
@@ -1702,14 +1440,10 @@
 
 
-       # NQS- BZW. LOADLEVELER-JOB STARTEN
+       # START NQS- / LOADLEVELER-JOB
     if [[ $remote_host != $local_host ]]
     then
        [[ $verify = true ]]  &&  printf "\n >>> submitting job using \"qsub\"...\n"
 
-       if [[ $(echo $remote_host | cut -c1-5) = lcsgi  &&  $prio = true ]]
-       then
-          printf "\n >>> submit with HLRN qos-feature hiprio...\n"
-          ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost"
-       elif [[ $remote_host = ibmku ]]
+       if [[ $remote_host = ibmku ]]
        then
           ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost"
@@ -1724,8 +1458,8 @@
     else
        cd  $job_catalog
-       if [[ $(echo $local_host | cut -c1-5) = lcsgi  ||  $(echo $local_host | cut -c1-3) = ibm  ||  $(echo $local_host | cut -c1-6) = lccray ]]
+       if [[ $(echo $local_host | cut -c1-3) = ibm  ||  $(echo $local_host | cut -c1-6) = lccray ]]
        then
           eval  $submcom  $job_on_remhost
-       elif [[  $local_host = lcfimm  ||  $local_host = lctit  ||  $localhost = lcxe6  ||  $localhost = lck  || $localhost = lckordi ||  $localhost = lcyon || $localhost = lcsb  ||  $localhost = lckyu* ]]
+       elif [[  $local_host = lctit  ||  $localhost = lcxe6  ||  $localhost = lck  || $localhost = lckordi ||  $localhost = lcyon || $localhost = lcsb  ||  $localhost = lckyu* ]]
        then
           chmod  u+x  $job_on_remhost
@@ -1743,6 +1477,6 @@
        fi
 
-          # Jobfile must not be deleted on lctit/ibmku!! This will be done
-          # only at the end of the job.
+          # JOBFILE MUST NOT BE DELETED ON lctit/ibmku/lcflow. THIS WILL BE DONE
+          # AT THE END OF THE JOB
        if [[ $local_host != lctit  &&  $local_host != ibmku  &&  $local_host != lcflow ]]
        then
@@ -1755,6 +1489,5 @@
 
 
-    # ABSCHLUSSARBEITEN
-
+    # FINAL ACTIONS
  if [[ $no_submit = false ]]
  then
