Index: /palm/trunk/SCRIPTS/mbuild
===================================================================
--- /palm/trunk/SCRIPTS/mbuild	(revision 1467)
+++ /palm/trunk/SCRIPTS/mbuild	(revision 1468)
@@ -22,5 +22,6 @@
 # Current revisions:
 # ------------------
-# 
+# Typo removed (addres->address)
+# Adjustments for lcxe6
 # 
 # Former revisions:
@@ -170,5 +171,5 @@
     # DETERMINE THE LOCAL HOST
  local_host_real_name=$(hostname)
-# local_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
+# local_address=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
 
 
@@ -359,5 +360,5 @@
  column1="local username:"; column2=$local_username
  printf "| $column1$column2 | \n"
- column1="local IP-addres:"; column2=$local_addres
+ column1="local IP-address:"; column2=$local_address
  printf "| $column1$column2 | \n"
  column1="config file:"; column2=$config_file
@@ -484,24 +485,24 @@
        # DETERMINE IP-ADDRES OF THE REMOTE-HOST
     case  $remote_host  in
-        (lccrayb)        remote_addres=130.73.233.1;;
-        (lccrayh)        remote_addres=130.75.4.1;;
-        (lcflow)         remote_addres="flow.hpc.uni-oldenburg.de";;
+        (lccrayb)        remote_address=130.73.233.1;;
+        (lccrayh)        remote_address=130.75.4.1;;
+        (lcflow)         remote_address="flow.hpc.uni-oldenburg.de";;
         (lckordi)        remote_adress=210.219.61.8;;
-        (lcmuk)          remote_addres=130.75.105.2;;
-        (lcrte)          remote_addres=133.5.185.60;;
-        (lcsb)           remote_addres=147.46.30.151;;
-        (lck)            remote_addres=165.132.26.61;;
-        (lckiaps)        remote_addres=118.128.66.223;;
-        (lckyut)         remote_addres=133.5.4.37;;
-        (lctit)          remote_addres=10.1.6.170;;
-        (lcxe6)          remote_addres=129.177.20.113;;
-        (lcxt5m)         remote_addres=193.166.211.144;;
-        (ibmh)           remote_addres=136.172.40.15;;
-        (ibmkisti)       remote_addres=150.183.146.24;;
-        (ibmku)          remote_addres=133.5.4.129;;
-        (ibms)           remote_addres=150.183.5.101;;
-        (nech)           remote_addres=136.172.44.192;;
-        (neck)           remote_addres=133.5.178.11;;
-        (ground.yonsei.ac.kr) remote_addres=134.75.155.33;;
+        (lcmuk)          remote_address=130.75.105.2;;
+        (lcrte)          remote_address=133.5.185.60;;
+        (lcsb)           remote_address=147.46.30.151;;
+        (lck)            remote_address=165.132.26.61;;
+        (lckiaps)        remote_address=118.128.66.223;;
+        (lckyut)         remote_address=133.5.4.37;;
+        (lctit)          remote_address=10.1.6.170;;
+        (lcxe6)          remote_address=129.177.20.113;;
+        (lcxt5m)         remote_address=193.166.211.144;;
+        (ibmh)           remote_address=136.172.40.15;;
+        (ibmkisti)       remote_address=150.183.146.24;;
+        (ibmku)          remote_address=133.5.4.129;;
+        (ibms)           remote_address=150.183.5.101;;
+        (nech)           remote_address=136.172.44.192;;
+        (neck)           remote_address=133.5.178.11;;
+        (ground.yonsei.ac.kr) remote_address=134.75.155.33;;
         (*)              if [[ $local_host != $remote_host ]]
                          then
@@ -964,5 +965,5 @@
     column1="username:"; column2=$remote_username
     printf "| $column1$column2 | \n"
-    column1="addres:"; column2=$remote_addres
+    column1="address:"; column2=$remote_address
     printf "| $column1$column2 | \n"
     column1="compiler:"; column2=$compiler_name
@@ -1055,14 +1056,14 @@
              # 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}/\" "
+          echo "  *** copying \"${mainprog}_sources.tar\" to \"${remote_address}:${remote_md}/\" "
           if [[ $remote_host != lctit ]]
           then
-             ssh  ${remote_username}@${remote_addres} "[[ ! -d ${remote_md} ]]  &&  (echo \"  *** ${remote_md} will be created\"; mkdir -p  ${remote_md})"
+             ssh  ${remote_username}@${remote_address} "[[ ! -d ${remote_md} ]]  &&  (echo \"  *** ${remote_md} will be created\"; mkdir -p  ${remote_md})"
           else
                 # 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
-
-          scp  ${local_source_path}/${mainprog}_sources.tar  ${remote_username}@${remote_addres}:${remote_md}/${mainprog}_sources.tar
+             print "[[ ! -d ${remote_md} ]]  &&  (echo \"  *** ${remote_md} will be created\"; mkdir -p  ${remote_md})"  |  ssh ${remote_username}@${remote_address}  2>&1
+          fi
+
+          scp  ${local_source_path}/${mainprog}_sources.tar  ${remote_username}@${remote_address}:${remote_md}/${mainprog}_sources.tar
 
 
@@ -1072,8 +1073,8 @@
           if [[ $remote_host != lctit ]]
           then
-             ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]]  &&  tar -xf  ${mainprog}_current_version.tar"
+             ssh  ${remote_username}@${remote_address}  "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]]  &&  tar -xf  ${mainprog}_current_version.tar"
           else
                 # 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
+             print  "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]]  &&  tar -xf  ${mainprog}_current_version.tar"  |  ssh  ${remote_username}@${remote_address}  2>&1
           fi
 
@@ -1083,8 +1084,8 @@
           if [[ $remote_host != lctit ]]
           then
-             ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; tar -xf  ${mainprog}_sources.tar"
+             ssh  ${remote_username}@${remote_address}  "cd ${remote_md}; tar -xf  ${mainprog}_sources.tar"
           else
                 # 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
+             print  "cd ${remote_md}; tar -xf  ${mainprog}_sources.tar"  |  ssh  ${remote_username}@${remote_address}  2>&1
           fi
 
@@ -1121,10 +1122,10 @@
           then
 
-             ssh  ${remote_username}@${remote_addres}  "$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" 2>&1 | tee ${remote_host}_last_make_protokoll
+             ssh  ${remote_username}@${remote_address}  "$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" 2>&1 | tee ${remote_host}_last_make_protokoll
 
           elif [[ $remote_host = ibmh ]]
           then
 
-             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
+             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_address} 2>&1 | tee ${remote_host}_last_make_protokoll
 
           elif [[ $remote_host = lctit ]]
@@ -1134,5 +1135,5 @@
              while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]]
              do
-                print "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 "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_address} 2>&1 | tee ${remote_host}_last_make_protokoll
              done
 
@@ -1140,9 +1141,9 @@
           then
 
-             ssh  ${remote_username}@${remote_addres} "$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" 2>&1 | tee ${remote_host}_last_make_protokoll
+             ssh  ${remote_username}@${remote_address} "$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" 2>&1 | tee ${remote_host}_last_make_protokoll
 
           else
 
-             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
+             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_address} 2>&1 | tee ${remote_host}_last_make_protokoll
 
           fi
@@ -1177,8 +1178,8 @@
           if [[ $remote_host != lctit ]]
           then
-             ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; chmod u+w *; tar -cf  ${mainprog}_current_version.tar  ${mainprog}  *.f90 *.o *.mod"
+             ssh  ${remote_username}@${remote_address}  "cd ${remote_md}; chmod u+w *; tar -cf  ${mainprog}_current_version.tar  ${mainprog}  *.f90 *.o *.mod"
           else
                 # 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
+             print  "cd ${remote_md}; chmod u+w *; tar -cf  ${mainprog}_current_version.tar  ${mainprog}  *.f90 *.o *.mod"  |  ssh  ${remote_username}@${remote_address}  2>&1
           fi
 
@@ -1192,17 +1193,17 @@
 
           printf "\n\n"
-          echo "  *** copying scripts and utility programs to \"${remote_addres}:${remote_ud}/\" "
+          echo "  *** copying scripts and utility programs to \"${remote_address}:${remote_ud}/\" "
           cd  ${local_source_path}/../SCRIPTS
 
           if [[ $remote_host != lctit ]]
           then
-             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)"
+             ssh  ${remote_username}@${remote_address} "[[ ! -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
                 # 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
+             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_address}  2>&1
           fi
 
              # 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
+          scp  batch_scp mbuild mrun process_dvr_output .dvrserver.config subjob batch_nc2vdf nc2vdf nc2vdf.ncl nc2vdf.config ${remote_username}@${remote_address}:${remote_ud}/../SCRIPTS  >  /dev/null
 
           cd  -  > /dev/null
@@ -1211,5 +1212,5 @@
 
              # COPY UTILITY-ROUTINES
-          scp  Makefile  *.f90  ${remote_username}@${remote_addres}:${remote_ud}  >  /dev/null
+          scp  Makefile  *.f90  ${remote_username}@${remote_address}:${remote_ud}  >  /dev/null
 
 
@@ -1245,10 +1246,10 @@
           then
 
-             ssh  ${remote_username}@${remote_addres}  "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR"
+             ssh  ${remote_username}@${remote_address}  "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR"
 
           elif [[ $remote_host = ibmh ]]
           then
 
-             print "$init_cmds $module_calls export OBJECT_MODE=64; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres}
+             print "$init_cmds $module_calls export OBJECT_MODE=64; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_address}
 
           elif [[ $remote_host = lctit ]]
@@ -1258,5 +1259,5 @@
              while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]]
              do
-                print "$init_cmds $module_calls cd ${remote_ud}; $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_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_address} 2>&1 | tee ${remote_host}_last_make_protokoll
              done
 
@@ -1264,9 +1265,9 @@
           then
 
-             ssh  ${remote_username}@${remote_addres} "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll
+             ssh  ${remote_username}@${remote_address} "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll
 
           else
 
-             print "$init_cmds $module_calls cd ${remote_ud}; $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_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_address} 2>&1 | tee ${remote_host}_last_make_protokoll
 
           fi
Index: /palm/trunk/SCRIPTS/mrun
===================================================================
--- /palm/trunk/SCRIPTS/mrun	(revision 1467)
+++ /palm/trunk/SCRIPTS/mrun	(revision 1468)
@@ -22,5 +22,7 @@
 # Current revisions:
 # ------------------
-# 
+# Typo removed (addres->address)
+# Bugfix: returning files to IMUK via ssh did not work for lccrayh and lcycrayb
+# Added support for restart runs (remote) for lcxe6
 # 
 # Former revisions:
@@ -257,16 +259,16 @@
  if [[ `hostname` = rte10 ]]
  then
-    return_addres=133.5.185.60
-    echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"
+    return_address=133.5.185.60
+    echo "+++ WARNING: fixed return_address = $return_address is used !!!!!"
  elif [[ `hostname` = climate0 ]]
  then
-    return_addres=165.132.26.68
-    echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"
+    return_address=165.132.26.68
+    echo "+++ WARNING: fixed return_address = $return_address is used !!!!!"
  elif [[ `hostname` = urban00 ]]
  then
-    return_addres=147.46.30.151
-    echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"
+    return_address=147.46.30.151
+    echo "+++ WARNING: fixed return_address = $return_address is used !!!!!"
  else
-    return_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
+    return_address=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
  fi
  return_password=""
@@ -409,5 +411,5 @@
        (q)   queue=$OPTARG; mc="$mc -q$OPTARG";;
        (r)   run_mode=$OPTARG; mc="$mc -r'$OPTARG'";;
-       (R)   remotecall=true;return_addres=$OPTARG; mc="$mc -R$OPTARG";;
+       (R)   remotecall=true;return_address=$OPTARG; mc="$mc -R$OPTARG";;
        (s)   source_list=$OPTARG; mc="$mc -s'$OPTARG'";;
        (S)   read_from_config=false; mc="$mc -S";;
@@ -670,5 +672,5 @@
 
     # READ AND EVALUATE THE CONFIGURATION-FILE FROM WITHIN THIS SHELLSCRIPT
-    # (OPTION -S). THE DEFAULT IS USING THE ROUTINE interpret_config
+    # (OPTION -S). THE DEFAULT IS USING THE ROUTINE <<<<
  if [[ "$read_from_config" = false ]]
  then
@@ -3407,5 +3409,5 @@
                 echo "fname=$fname"                      >>  mpi_exec_shell
                 echo "localhost=$localhost"              >>  mpi_exec_shell
-                echo "return_addres=$return_addres"      >>  mpi_exec_shell
+                echo "return_address=$return_address"    >>  mpi_exec_shell
                 echo "return_username=$return_username"  >>  mpi_exec_shell
                 echo "tasks_per_node=$tasks_per_node"    >>  mpi_exec_shell
@@ -3419,5 +3421,5 @@
                 echo "export fname"                      >>  mpi_exec_shell
                 echo "export localhost"                  >>  mpi_exec_shell
-                echo "export return_addres"              >>  mpi_exec_shell
+                echo "export return_address"             >>  mpi_exec_shell
                 echo "export return_username"            >>  mpi_exec_shell
                 echo "export tasks_per_node"             >>  mpi_exec_shell
@@ -3794,5 +3796,5 @@
                    printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst"
                    printf "\n              or higher cycle\n"
-                   echo "batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres  $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
+                   echo "batch_scp $PORTOPT $cps -b -m -u $return_username $return_address  $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
 
                    echo "[[ \$? = 0 ]]  &&  rm  $file_to_transfer"  >>  transfer_${localout[$i]}
@@ -3818,10 +3820,13 @@
                    if [[ $localhost = lccrayb ]]
                    then
-                      ssh $usern@blogin1 "cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
+                      ssh $usern@blogin1 ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
                    elif [[ $localhost = lccrayh ]]
                    then
-                      ssh $usern@hlogin1 "cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
+                      ssh $usern@hlogin1 ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
+                   elif [[ $localhost = lcxe6 ]]
+                   then
+                      ssh $usern@hexagon ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
                    else
-                      batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres  ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
+                      batch_scp $PORTOPT $cps -b -m -u $return_username $return_address  ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
                    fi
                    [[ $? != 0 ]]  &&  transfer_failed=true
@@ -3874,5 +3879,5 @@
                    printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}"
                    printf "\n              or higher cycle\n"
-                   echo "batch_scp $PORTOPT -A -b -m -u $return_username $return_addres  $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
+                   echo "batch_scp $PORTOPT -A -b -m -u $return_username $return_address  $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
 
                    echo "[[ \$? = 0 ]]  &&  rm  $file_to_transfer"  >>  transfer_${localout[$i]}
@@ -3898,10 +3903,13 @@
                    if [[ $localhost = lccrayb ]]
                    then
-                      ssh $usern@blogin1 "cd $TEMPDIR; batch_scp $PORTOPT -A -b -m -u $return_username $return_addres  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
+                      ssh $usern@blogin1 ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT -A -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
                    elif [[ $localhost = lccrayh ]]
                    then
-                      ssh $usern@hlogin1 "cd $TEMPDIR; batch_scp $PORTOPT -A -b -m -u $return_username $return_addres  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
+                      ssh $usern@hlogin1 ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT -A -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
+                   elif [[ $localhost = lcxe6 ]]
+                   then
+                      ssh $usern@hexagon ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT -A -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
                    else
-                      batch_scp $PORTOPT -A -b -m -u $return_username  $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
+                      batch_scp $PORTOPT -A -b -m -u $return_username  $return_address ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
                    fi
                    [[ $? != 0 ]]  &&  transfer_failed=true
@@ -4372,5 +4380,5 @@
 
              # START THE RESTART-JOB
-          printf "\n\n  *** initiating restart-run on \"$return_addres\" using command:\n"
+          printf "\n\n  *** initiating restart-run on \"$return_address\" using command:\n"
           echo "      $mc"
           printf "\n$dashes\n"
@@ -4378,39 +4386,41 @@
           then
 
-             if [[ $localhost = lccrayb  || $localhost = lccrayh  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lcflow  ||  $localhost = lckyu* ]]
+             if [[ $localhost = lccrayb  || $localhost = lccrayh  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lcflow  ||  $localhost = lckyu* || $localhost = lcxe6 ]]
              then
                 echo "*** ssh will be used to initiate restart-runs!"
-                echo "    return_addres=\"$return_addres\" "
+                echo "    return_address=\"$return_address\" "
                 echo "    return_username=\"$return_username\" "
-                if [[ $(echo $return_addres | grep -c "130.75.105") = 1 ]]
+                if [[ $(echo $return_address | grep -c "130.75.105") = 1 ]]
                 then
                    if [[ $localhost = ibmh ]]
                    then
-                      ssh $SSH_PORTOPT $usern@136.172.40.15 "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;. /muksoft_i/packages/intel/composer_xe_2013_sp1.2.144/bin/compilervars.sh intel64;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
+                      ssh $SSH_PORTOPT $usern@136.172.40.15 "ssh $SSH_PORTOPT $return_address -l $return_username \". \\\$HOME/.profile; module load intel-compiler hdf5 netcdf; PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
                    elif [[ $localhost = lccrayb ]]
                    then
-                      ssh $usern@blogin1 "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;. /muksoft_i/packages/intel/composer_xe_2013_sp1.2.144/bin/compilervars.sh intel64;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
+                      ssh $usern@blogin1 "ssh $SSH_PORTOPT $return_address -l $return_username \". \\\$HOME/.profile; module load intel-compiler hdf5 netcdf; PATH=\\\$PATH:$LOCAL_MRUN_PATH; export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
                    elif [[ $localhost = lccrayh ]]
                    then
-                      ssh $usern@hlogin1 "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;. /muksoft_i/packages/intel/composer_xe_2013_sp1.2.144/bin/compilervars.sh intel64;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
-
+                      ssh $usern@hlogin1 "ssh $SSH_PORTOPT $return_address -l $return_username \". \\\$HOME/.profile; module load intel-compiler hdf5 netcdf; PATH=\\\$PATH:$LOCAL_MRUN_PATH; export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
+                   elif [[ $localhost = lcxe6 ]]
+                   then
+                      ssh $usern@hexagon "ssh $SSH_PORTOPT $return_address -l $return_username \". \\\$HOME/.profile; module load intel-compiler hdf5 netcdf; PATH=\\\$PATH:$LOCAL_MRUN_PATH; export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
                    else
-                      ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;. /muksoft_i/packages/intel/composer_xe_2013_sp1.2.144/bin/compilervars.sh intel64;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
+                      ssh $SSH_PORTOPT $return_address -l $return_username ". \\\$HOME/.profile; module load intel-compiler hdf5 netcdf; PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
                    fi
                 else
                    if [[ $localhost = ibmkisti ]]
                    then
-                      ssh $SSH_PORTOPT $usern@gaiad "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
+                      ssh $SSH_PORTOPT $usern@gaiad "ssh $SSH_PORTOPT $return_address -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
                    elif [[ $localhost = lcflow ]]
                    then
-                      /usr/bin/ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
+                      /usr/bin/ssh $SSH_PORTOPT $return_address -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
                    elif [[ $localhost = lccrayb ]]
                    then
-                      ssh $usern@blogin1 "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
+                      ssh $usern@blogin1 "ssh $SSH_PORTOPT $return_address -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
                    elif [[ $localhost = lccrayh ]]
                    then
-                      ssh $usern@hlogin1 "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
+                      ssh $usern@hlogin1 "ssh $SSH_PORTOPT $return_address -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
                    else
-                      ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
+                      ssh $SSH_PORTOPT $return_address -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
                    fi
                 fi
@@ -4509,5 +4519,5 @@
 
        # 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"
+    mrun_com="$mrun_script_name -a $afname -c $config_file -d $fname -h $host -H $fromhost -m $memory -t $cpumax -q $queue -R $return_address -U $return_username -u $remote_username"
     [[ "$cpp_opts" != "" ]]       &&  mrun_com=${mrun_com}" -D \"$cpp_opts\""
     [[ "$global_revision" != "" ]]  &&  mrun_com=${mrun_com}" -G \"$global_revision\""
@@ -4648,16 +4658,16 @@
                 # 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
+             echo  "ssh $SSH_PORTOPT $remote_username@gaiad \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_address:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
           elif [[ $host = lccrayb ]]
           then
              echo  "localdir=\`pwd\`"                            >>  $jobfile
-             echo  "ssh $SSH_PORTOPT $remote_username@blogin1 \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
+             echo  "ssh $SSH_PORTOPT $remote_username@blogin1 \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_address:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
           elif [[ $host = lccrayh ]]
           then
              echo  "localdir=\`pwd\`"                            >>  $jobfile
-             echo  "ssh $SSH_PORTOPT $remote_username@hlogin1 \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
+             echo  "ssh $SSH_PORTOPT $remote_username@hlogin1 \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_address:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
 
           else
-             echo  "scp $PORTOPT -r $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname ."  >>  $jobfile
+             echo  "scp $PORTOPT -r $return_username@$return_address:$working_directory/SOURCES_FOR_RUN_$fname ."  >>  $jobfile
           fi
        fi
@@ -4757,5 +4767,5 @@
              echo  "%END%"                                    >>  $jobfile
           else
-             echo  "batch_scp $PORTOPT -b -o -g -s -u $return_username $return_addres ${remotepathin[$i]} \"${pathin[$i]}\" ${frelin[$i]}" >>  $jobfile
+             echo  "batch_scp $PORTOPT -b -o -g -s -u $return_username $return_address ${remotepathin[$i]} \"${pathin[$i]}\" ${frelin[$i]}" >>  $jobfile
           fi
 
Index: /palm/trunk/SCRIPTS/subjob
===================================================================
--- /palm/trunk/SCRIPTS/subjob	(revision 1467)
+++ /palm/trunk/SCRIPTS/subjob	(revision 1468)
@@ -23,5 +23,6 @@
 # Current revisions:
 # ------------------
-# 
+# Typo removed (addres->address)
+# Adjustments for lcxe6
 # 
 # Former revisions:
@@ -170,59 +171,59 @@
     # 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;;
-     (atmos)                 local_addres=172.20.25.35;   local_host=lcide;;
-     (austru)                local_addres=130.75.105.128; local_host=lcmuk;;
-     (autan)                 local_addres=130.75.105.57;  local_host=lcmuk;;
-     (bora)                  local_addres=130.75.105.103; local_host=lcmuk;;
-     (b04*)                  local_addres=133.5.4.33;     local_host=lckyuh;;
-     (blizzard1|p*)          local_addres=136.172.40.15;  local_host=ibmh;;
-     (blizzard2|p*)          local_addres=136.172.40.16;  local_host=ibmh;;
-     (blogin*|bxc*)          local_addres=130.73.233.1;   local_host=lccrayb;;
-     (hlogin*|hxc*)          local_addres=130.75.4.1;     local_host=lccrayh;;
-     (breva)                 local_addres=130.75.105.98;  local_host=lcmuk;;
-     (buran)                 local_addres=130.75.105.58;  local_host=lcmuk;;
-     (caurus)                local_addres=130.75.105.19;  local_host=lcmuk;;
-     (climate*)              local_addres=165.132.26.68;  local_host=lcyon;;
-     (clogin*)               local_addres=86.50.166.21;   local_host=lccrayf;;
-     (cs*)                   local_addres=136.172.44.131; local_host=nech;;
-     (elephanta)             local_addres=130.75.105.6;   local_host=lcmuk;;
-     (flow01)                local_addres=10.141.255.71;  local_host=lcflow;;
-     (flow02)                local_addres=10.141.255.72;  local_host=lcflow;;
-     (node*)                 local_addres=165.132.26.61   local_host=lck;;
-   #  (node*)                 local_addres=210.219.61.8    local_host=lckordi;;
-     (gaia*)                 local_addres=150.183.146.24; local_host=ibmkisti;;
-     (gallego)               local_addres=130.75.105.10;  local_host=lcmuk;;
-     (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;;
-     (hx*)                   local_addres=133.3.51.11;    local_host=lckyoto;;
-     (inferno)               local_addres=130.75.105.5;   local_host=lcmuk;;
-     (irifi)                 local_addres=130.75.105.104; local_host=lcmuk;;
-     (jaboticaba)            local_addres=150.163.25.181; local_host=lcbr;;
-     (sno)                   local_addres=130.75.105.113; local_host=lcmuk;;
-     (levanto)               local_addres=130.75.105.45;  local_host=lcmuk;;
-     (login*)                local_addres=118.128.66.223; local_host=lckiaps;;
-     (maestro)               local_addres=130.75.105.2;   local_host=lcmuk;;
-     (meller)                local_addres=134.106.74.155; local_host=lcfor;;
-     (meteo-login*)          local_addres=193.166.211.144;local_host=lcxt5m;;
-     (hexagon*)		     local_addres=129.177.20.113; local_host=lcxe6;;
-     (nobel*)                local_addres=150.183.5.101;  local_host=ibms;;
-     (orkan)                 local_addres=130.75.105.3;   local_host=lcmuk;;
-     (ostria)                local_addres=130.75.105.106; local_host=lcmuk;;
-     (paesano)               local_addres=130.75.105.46;  local_host=lcmuk;;
-     (pcj*)                  local_addres=172.31.120.1;   local_host=lckyut;;
-     (pingui)                local_addres=134.106.74.118; local_host=lcfor;;
-     (quanero)               local_addres=130.75.105.107; local_host=lcmuk;;
-     (rte*)                  local_addres=133.5.185.60;   local_host=lcrte;;
-     (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;;
-     (t2a*)                  local_addres=10.1.6.165;     local_host=lctit;;
-     (urban*)                local_addres=147.46.30.151   local_host=lcsb;;
-     (vinessa)               local_addres=130.75.105.112; local_host=lcmuk;;
-     (vorias)                local_addres=172.20.25.43;   local_host=lcmuk;;
-     (*.cc.kyushu-u.ac.jp)   local_addres=133.5.4.129;    local_host=ibmku;;
+     (ambiel-lx)             local_address=134.106.74.48;  local_host=lcfor;;
+     (atmos)                 local_address=172.20.25.35;   local_host=lcide;;
+     (austru)                local_address=130.75.105.128; local_host=lcmuk;;
+     (autan)                 local_address=130.75.105.57;  local_host=lcmuk;;
+     (bora)                  local_address=130.75.105.103; local_host=lcmuk;;
+     (b04*)                  local_address=133.5.4.33;     local_host=lckyuh;;
+     (blizzard1|p*)          local_address=136.172.40.15;  local_host=ibmh;;
+     (blizzard2|p*)          local_address=136.172.40.16;  local_host=ibmh;;
+     (blogin*|bxc*)          local_address=130.73.233.1;   local_host=lccrayb;;
+     (hlogin*|hxc*)          local_address=130.75.4.1;     local_host=lccrayh;;
+     (breva)                 local_address=130.75.105.98;  local_host=lcmuk;;
+     (buran)                 local_address=130.75.105.58;  local_host=lcmuk;;
+     (caurus)                local_address=130.75.105.19;  local_host=lcmuk;;
+     (climate*)              local_address=165.132.26.68;  local_host=lcyon;;
+     (clogin*)               local_address=86.50.166.21;   local_host=lccrayf;;
+     (cs*)                   local_address=136.172.44.131; local_host=nech;;
+     (elephanta)             local_address=130.75.105.6;   local_host=lcmuk;;
+     (flow01)                local_address=10.141.255.71;  local_host=lcflow;;
+     (flow02)                local_address=10.141.255.72;  local_host=lcflow;;
+     (node*)                 local_address=165.132.26.61   local_host=lck;;
+   #  (node*)                 local_address=210.219.61.8    local_host=lckordi;;
+     (gaia*)                 local_address=150.183.146.24; local_host=ibmkisti;;
+     (gallego)               local_address=130.75.105.10;  local_host=lcmuk;;
+     (gregale)               local_address=130.75.105.109; local_host=lcmuk;;
+     (hababai)               local_address=130.75.105.108; local_host=lcmuk;;
+     (hayaka*)               local_address=133.5.4.33;     local_host=lckyuh;;
+     (hexagon.bccs.uib.no)   local_address=129.177.20.113; local_host=lcxe6;;
+     (hx*)                   local_address=133.3.51.11;    local_host=lckyoto;;
+     (inferno)               local_address=130.75.105.5;   local_host=lcmuk;;
+     (irifi)                 local_address=130.75.105.104; local_host=lcmuk;;
+     (jaboticaba)            local_address=150.163.25.181; local_host=lcbr;;
+     (sno)                   local_address=130.75.105.113; local_host=lcmuk;;
+     (levanto)               local_address=130.75.105.45;  local_host=lcmuk;;
+     (login*)                local_address=118.128.66.223; local_host=lckiaps;;
+     (maestro)               local_address=130.75.105.2;   local_host=lcmuk;;
+     (meller)                local_address=134.106.74.155; local_host=lcfor;;
+     (meteo-login*)          local_address=193.166.211.144;local_host=lcxt5m;;
+     (hexagon*)		     local_address=129.177.20.113; local_host=lcxe6;;
+     (nobel*)                local_address=150.183.5.101;  local_host=ibms;;
+     (orkan)                 local_address=130.75.105.3;   local_host=lcmuk;;
+     (ostria)                local_address=130.75.105.106; local_host=lcmuk;;
+     (paesano)               local_address=130.75.105.46;  local_host=lcmuk;;
+     (pcj*)                  local_address=172.31.120.1;   local_host=lckyut;;
+     (pingui)                local_address=134.106.74.118; local_host=lcfor;;
+     (quanero)               local_address=130.75.105.107; local_host=lcmuk;;
+     (rte*)                  local_address=133.5.185.60;   local_host=lcrte;;
+     (shiokaze-lx)           local_address=134.106.74.123; local_host=lcfor;;
+     (sisu-login*)           local_address=86.50.166.21;   local_host=lccrayf;;
+     (solano)                local_address=130.75.105.110; local_host=lcmuk;;
+     (sugoka*)               local_address=172.31.120.1;   local_host=lckyut;;
+     (t2a*)                  local_address=10.1.6.165;     local_host=lctit;;
+     (urban*)                local_address=147.46.30.151   local_host=lcsb;;
+     (vinessa)               local_address=130.75.105.112; local_host=lcmuk;;
+     (vorias)                local_address=172.20.25.43;   local_host=lcmuk;;
+     (*.cc.kyushu-u.ac.jp)   local_address=133.5.4.129;    local_host=ibmku;;
      (*)                     printf "\n  +++ \"$local_host\" unknown";
                              printf "\n      please contact the PALM group at IMUK";
@@ -346,25 +347,25 @@
  else
     case  $remote_host  in
-        (ibm)     queue=p690_standard; remote_addres=134.76.99.81; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
-        (ibmh)    queue=cluster; remote_addres=136.172.40.15; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
-        (ibmkisti) queue=class.32plus; remote_addres=150.183.146.24; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
-        (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;;
-        (lccrayb) queue=mpp1testq; 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;;
-        (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;;
-        (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;;
-        (lckordi) remote_addres=210.219.61.8; submcom=/usr/torque/bin/qsub;;
-        (lckyuh)  remote_addres=133.5.4.33; submcom=/usr/bin/pjsub;;
-        (lckyut)  remote_addres=133.5.4.37; submcom=/usr/bin/pjsub;;
-        (lcsb)    remote_addres=147.46.30.151; submcom=/usr/torque/bin/qsub;;
-        (lctit)   queue=S; remote_addres=10.1.6.165; submcom=/opt/pbs/tools/bin/t2sub;;
-        (lcxe6)	  remote_addres=129.177.20.113; submcom=/opt/torque/default/bin/qsub;;
-        (lcxt5m)  remote_addres=193.166.211.144; submcom=/opt/pbs/10.1.0.91350/bin/qsub;;
-        (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";;
+        (ibm)     queue=p690_standard; remote_address=134.76.99.81; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
+        (ibmh)    queue=cluster; remote_address=136.172.40.15; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
+        (ibmkisti) queue=class.32plus; remote_address=150.183.146.24; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
+        (ibmku)   queue=s4; remote_address=133.5.4.129; submcom=/usr/local/bin/llsubmit;;
+        (ibms)    queue=p_normal; remote_address=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
+        (lccrayb) queue=mpp1testq; remote_address=130.73.233.1; submcom=/opt/moab/7.2.6/bin/msub;;
+        (lccrayh) queue=mpp1testq; remote_address=130.75.4.1; submcom=/opt/moab/7.2.6/bin/msub;;
+        (lccrayf) queue=small; remote_address=86.50.166.21; submcom=/opt/slurm/default/bin/sbatch;;
+        (lcflow)  remote_address=10.140.1.71; submcom=/cm/shared/apps/sge/6.2u5p2/bin/lx26-amd64/qsub;;
+        (lckyoto) remote_address=133.3.51.11; submcom=/thin/local/bin/qsub;;
+        (lck)     remote_address=165.132.26.61; submcom=/usr/torque/bin/qsub;;
+        (lckiaps) remote_address=118.128.66.223; submcom=/cm/shared/apps/pbspro/11.0.2.110766/bin/qsub;;
+        (lckordi) remote_address=210.219.61.8; submcom=/usr/torque/bin/qsub;;
+        (lckyuh)  remote_address=133.5.4.33; submcom=/usr/bin/pjsub;;
+        (lckyut)  remote_address=133.5.4.37; submcom=/usr/bin/pjsub;;
+        (lcsb)    remote_address=147.46.30.151; submcom=/usr/torque/bin/qsub;;
+        (lctit)   queue=S; remote_address=10.1.6.165; submcom=/opt/pbs/tools/bin/t2sub;;
+        (lcxe6)	  remote_address=129.177.20.113; submcom=/opt/torque/default/bin/qsub;;
+        (lcxt5m)  remote_address=193.166.211.144; submcom=/opt/pbs/10.1.0.91350/bin/qsub;;
+        (lcyon)   remote_address=165.132.26.68; submcom=/usr/torque/bin/qsub;;
+        (nech)    qsubmem=memsz_job; qsubtime=cputim_job; remote_address=136.172.44.147; submcom="/usr/local/bin/qsub";;
         (*)       printf "\n  +++ hostname \"$remote_host\" not allowed";
                   locat=parameter; exit;;
@@ -1180,5 +1181,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-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* || $remote_host = lcxe6 ]]
     then
        if [[ $remote_host = ibmh ]]
@@ -1197,4 +1198,7 @@
        then
           return_queue=dataq
+       elif [[ $remote_host = lcxe6 ]]
+       then
+          return_queue=debug
        elif [[ $remote_host = lckiaps ]]
        then
@@ -1237,5 +1241,5 @@
 
           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
+          echo "echo \"batch_scp  $PORTOPT  -d  -w 10  -u $local_user  $local_address  ${job_catalog}/$remote_dayfile  \\\"$job_catalog\\\"  $local_dayfile\" >> scpjob.$identifier"  >>  $job_to_send
           if [[ $remote_host = ibmku ]]
           then
@@ -1254,5 +1258,5 @@
           echo "set -x"                            >>  $job_to_send
           echo "cd /pf/b/${remote_user}/job_queue" >>  $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 "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  $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
@@ -1271,5 +1275,5 @@
           echo "export LANG=en_US.UTF-8"           >>  $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 "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  $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
@@ -1288,5 +1292,5 @@
           echo "export LANG=en_US.UTF-8"           >>  $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 "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  $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
@@ -1303,5 +1307,5 @@
           echo " "                                       >>  $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 "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  ${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
@@ -1324,5 +1328,5 @@
           echo "export PATH=\$PATH:\$PALM_BIN"                           >>  $job_to_send
           echo ""                                 >>  $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 "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  ${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.${identifier}"                                 >>  $job_to_send         
@@ -1330,5 +1334,20 @@
           echo "sed -e 's/SGEPREFIX/#$/g' scpjob.${identifier}.tmp > scpjob.${identifier}" >>  $job_to_send         
           echo "rm -f scpjob.${identifier}.tmp"                             >>  $job_to_send         
-
+       elif [[ $remote_host = lcxe6 ]]
+       then
+          echo "cat > scpjob.${identifier}  << %%END%%"  >>  $job_to_send
+          echo "#!/bin/ksh"                              >>  $job_to_send
+          echo "#PBS -N job_protocol_transfer"           >>  $job_to_send
+          echo "#PBS -l walltime=00:30:00"               >>  $job_to_send
+          echo "#PBS -A $project_account"                >>  $job_to_send
+          echo "#PBS -l mppwidth=1"                      >>  $job_to_send
+          echo "#PBS -l mppnppn=1"                       >>  $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 "set -x"                                  >>  $job_to_send
+          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  ${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
        else
 
@@ -1351,5 +1370,5 @@
           fi
           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  >  /dev/null"  >>  $job_to_send
+          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile  >  /dev/null"  >>  $job_to_send
           echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
           echo "%%END%%"                           >>  $job_to_send
@@ -1371,14 +1390,14 @@
        then
           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 "ssh $SSH_PORTOPT ${remote_username}@${remote_address}  \"$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.$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
+          echo "scp $PORTOPT scpjob.$identifier  ${remote_username}@${remote_address}:job_queue"           >>  $job_to_send
+          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_address}  \"cd job_queue; $submcom scpjob.$identifier; rm scpjob.$identifier\" "  >>  $job_to_send
        elif [[ $remote_host = lcflow ]]
        then
           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
+          echo "/usr/bin/ssh ${remote_username}@${remote_address}  \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$identifier\" "  >>  $job_to_send
        else
           echo "$submcom  scpjob.$identifier"      >>  $job_to_send
@@ -1393,7 +1412,7 @@
        fi
     else
-#       echo "ftpcopy  -d  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
+#       echo "ftpcopy  -d  $local_address  ${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
+       echo "nohup  ftpcopy  -d  -w 15  $local_address  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile  >  /dev/null  &"  >>  $job_to_send
     fi
     echo "set -x"                               >>  $job_to_send
@@ -1441,5 +1460,5 @@
           scp  $PORTOPT  $job_to_send  ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost
        else
-          scp  $PORTOPT  $job_to_send  ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost
+          scp  $PORTOPT  $job_to_send  ${remote_user}@${remote_address}:${job_catalog}/$job_on_remhost
        fi
        if [[ $? = 1 ]]
@@ -1466,10 +1485,10 @@
        if [[ $remote_host = ibmku ]]
        then
-          ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost"
+          ssh  $SSH_PORTOPT $remote_address  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost"
        elif [[ $remote_host = lcflow ]]
        then
-          /usr/bin/ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "$init_cmds $module_calls cd $job_catalog; $submcom $job_on_remhost"
+          /usr/bin/ssh  $SSH_PORTOPT $remote_address  -l $remote_user  "$init_cmds $module_calls cd $job_catalog; $submcom $job_on_remhost"
        else
-          ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
+          ssh  $SSH_PORTOPT $remote_address  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
        fi
 
Index: /palm/trunk/SOURCE/check_for_restart.f90
===================================================================
--- /palm/trunk/SOURCE/check_for_restart.f90	(revision 1467)
+++ /palm/trunk/SOURCE/check_for_restart.f90	(revision 1468)
@@ -20,5 +20,6 @@
 ! Current revisions:
 ! -----------------
-! 
+! Added support for unscheduled job termination using the flag files
+! DO_STOP_NOW and DO_RESTART_NOW
 ! 
 ! Former revisions:
@@ -65,5 +66,7 @@
 
 
-    LOGICAL :: terminate_run_l  !:
+    LOGICAL :: terminate_run_l           !:
+    LOGICAL :: do_stop_now = .FALSE.     !:
+    LOGICAL :: do_restart_now = .FALSE.  !:
 
     REAL(wp) ::  remaining_time !:
@@ -113,4 +116,5 @@
 
        terminate_coupled = 3
+
 #if defined( __parallel )
        IF ( myid == 0 ) THEN
@@ -126,7 +130,65 @@
     ENDIF
 
-!
-!-- Set the stop flag also, if restart is forced by user
-    IF ( time_restart /= 9999999.9_wp  .AND.                                      &
+
+!
+!-- Check if a flag file exists that forces a termination of the model
+    terminate_run_l = .FALSE.
+    IF ( myid == 0 )  THEN
+       INQUIRE(FILE="DO_STOP_NOW", EXIST=do_stop_now)
+       INQUIRE(FILE="DO_RESTART_NOW", EXIST=do_restart_now)
+
+       IF ( do_stop_now .OR. do_restart_now )  THEN
+
+          terminate_run_l = .TRUE.
+
+          WRITE( message_string, * ) 'run will be terminated because user ',   &
+                                  'forced a job finialization using a flag',   &
+                                  'file:',                                     &
+                                  '&DO_STOP_NOW: ', do_stop_now,               &
+                                  '&DO_RESTART_NOW: ', do_restart_now 
+          CALL message( 'check_for_restart', 'PA0398', 0, 0, 0, 6, 0 )
+
+       ENDIF
+    ENDIF
+
+
+#if defined( __parallel )
+!
+!-- Make a logical OR for all processes. Stop the model run if at least
+!-- one processor has reached the time limit.
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( terminate_run_l, terminate_run, 1, MPI_LOGICAL,        &
+                        MPI_LOR, comm2d, ierr )
+#else
+    terminate_run = terminate_run_l
+#endif
+
+!
+!-- In case of coupled runs inform the remote model of the termination 
+!-- and its reason, provided the remote model has not already been 
+!-- informed of another termination reason (terminate_coupled > 0) before,
+!-- or vice versa (terminate_coupled_remote > 0).
+    IF ( terminate_run .AND. coupling_mode /= 'uncoupled' .AND.                &
+         terminate_coupled == 0 .AND.  terminate_coupled_remote == 0 )  THEN
+
+       terminate_coupled = 6
+
+#if defined( __parallel )
+       IF ( myid == 0 ) THEN
+          CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER,      &
+                             target_id,  0,                                 &
+                             terminate_coupled_remote, 1, MPI_INTEGER,      &
+                             target_id,  0,                                 &
+                             comm_inter, status, ierr )   
+       ENDIF
+       CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0,         &
+                       comm2d, ierr )  
+#endif
+
+    ENDIF
+
+!
+!-- Set the stop flag also, if restart is forced by user settings
+    IF ( time_restart /= 9999999.9_wp  .AND.                                   &
          time_restart < time_since_reference_point )  THEN
 
@@ -183,6 +245,7 @@
 !
 !-- If the run is stopped, set a flag file which is necessary to initiate
-!-- the start of a continuation run
-    IF ( terminate_run  .AND.  myid == 0 )  THEN
+!-- the start of a continuation run, except if the user forced to stop the
+!-- run without restart
+    IF ( terminate_run  .AND.  myid == 0 .AND. .NOT. do_stop_now)  THEN
 
        OPEN ( 90, FILE='CONTINUE_RUN', FORM='FORMATTED' )
Index: /palm/trunk/SOURCE/check_open.f90
===================================================================
--- /palm/trunk/SOURCE/check_open.f90	(revision 1467)
+++ /palm/trunk/SOURCE/check_open.f90	(revision 1468)
@@ -20,5 +20,6 @@
 ! Current revisions:
 ! -----------------
-! 
+! Adapted for use on up to 6-digit processor cores
+! Added file unit 117 (PROGRESS)
 ! 
 ! Former revisions:
@@ -187,5 +188,5 @@
     IF ( openfile(file_id)%opened_before )  THEN
        SELECT CASE ( file_id )
-          CASE ( 13, 14, 21, 22, 23, 80:85 )
+          CASE ( 13, 14, 21, 22, 23, 80:85, 117 )
              IF ( file_id == 14 .AND. openfile(file_id)%opened_before )  THEN
                 message_string = 're-open of unit ' //                         &
@@ -209,5 +210,5 @@
     SELECT CASE ( file_id )
 
-       CASE ( 15, 16, 17, 18, 19, 50:59, 81:84, 104:105, 107, 109 )
+       CASE ( 15, 16, 17, 18, 19, 50:59, 81:84, 104:105, 107, 109, 117 )
 	      
           IF ( myid /= 0 )  THEN
@@ -280,8 +281,8 @@
           ELSE
 !
-!--          First opening of unit 13 openes file _0000 on all PEs because only
-!--          this file contains the global variables
+!--          First opening of unit 13 openes file _000000 on all PEs because
+!--          only this file contains the global variables
              IF ( .NOT. openfile(file_id)%opened_before )  THEN
-                OPEN ( 13, FILE='BININ'//TRIM( coupling_char )//'/_0000',      &
+                OPEN ( 13, FILE='BININ'//TRIM( coupling_char )//'/_000000',      &
                            FORM='UNFORMATTED', STATUS='OLD' )
              ELSE
@@ -336,5 +337,5 @@
           ENDIF
           IF ( myid_char == '' )  THEN
-             OPEN ( 20, FILE='DATA_LOG'//TRIM( coupling_char )//'/_0000',      &
+             OPEN ( 20, FILE='DATA_LOG'//TRIM( coupling_char )//'/_000000',      &
                         FORM='UNFORMATTED', POSITION='APPEND' )
           ELSE
@@ -1053,4 +1054,12 @@
 
           ENDIF
+
+
+!
+!--    Progress file that is used by the PALM watchdog
+       CASE ( 117 )
+
+          OPEN ( 117, FILE='PROGRESS'//coupling_char, STATUS='REPLACE', FORM='FORMATTED' )
+
 
        CASE ( 201:200+2*max_masks )
Index: /palm/trunk/SOURCE/header.f90
===================================================================
--- /palm/trunk/SOURCE/header.f90	(revision 1467)
+++ /palm/trunk/SOURCE/header.f90	(revision 1468)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Adapted for use on up to 6-digit processor cores
 ! 
 ! Former revisions:
@@ -1694,27 +1694,27 @@
 
  99 FORMAT (1X,78('-'))
-100 FORMAT (/1X,'******************************',6X,42('-')/        &
-            1X,'* ',A,' *',6X,A/                               &
-            1X,'******************************',6X,42('-'))
-101 FORMAT (37X,'coupled run using MPI-',I1,': ',A/ &
-            37X,42('-'))
-102 FORMAT (/' Date:                 ',A8,6X,'Run:       ',A20/      &
-            ' Time:                 ',A8,6X,'Run-No.:   ',I2.2/     &
+100 FORMAT (/1X,'******************************',4X,44('-')/        &
+            1X,'* ',A,' *',4X,A/                               &
+            1X,'******************************',4X,44('-'))
+101 FORMAT (35X,'coupled run using MPI-',I1,': ',A/ &
+            35X,42('-'))
+102 FORMAT (/' Date:                 ',A8,4X,'Run:       ',A20/      &
+            ' Time:                 ',A8,4X,'Run-No.:   ',I2.2/     &
             ' Run on host:        ',A10)
 #if defined( __parallel )
-103 FORMAT (' Number of PEs:',10X,I6,6X,'Processor grid (x,y): (',I3,',',I3, &
+103 FORMAT (' Number of PEs:',10X,I6,4X,'Processor grid (x,y): (',I4,',',I4, &
               ')',1X,A)
-104 FORMAT (' Number of PEs:',8X,I5,9X,'Tasks:',I4,'   threads per task:',I4/ &
-              37X,'Processor grid (x,y): (',I3,',',I3,')',1X,A)
-105 FORMAT (37X,'One additional PE is used to handle'/37X,'the dvrp output!')
-106 FORMAT (37X,'A 1d-decomposition along x is forced'/ &
-            37X,'because the job is running on an SMP-cluster')
-107 FORMAT (37X,'A 1d-decomposition along ',A,' is used')
-108 FORMAT (37X,'Max. # of parallel I/O streams is ',I5)
-109 FORMAT (37X,'Precursor run for coupled atmos-ocean run'/ &
-            37X,42('-'))
-114 FORMAT (37X,'Coupled atmosphere-ocean run following'/ &
-            37X,'independent precursor runs'/             &
-            37X,42('-'))
+104 FORMAT (' Number of PEs:',10X,I6,4X,'Tasks:',I4,'   threads per task:',I4/ &
+              35X,'Processor grid (x,y): (',I4,',',I4,')',1X,A)
+105 FORMAT (35X,'One additional PE is used to handle'/37X,'the dvrp output!')
+106 FORMAT (35X,'A 1d-decomposition along x is forced'/ &
+            35X,'because the job is running on an SMP-cluster')
+107 FORMAT (35X,'A 1d-decomposition along ',A,' is used')
+108 FORMAT (35X,'Max. # of parallel I/O streams is ',I5)
+109 FORMAT (35X,'Precursor run for coupled atmos-ocean run'/ &
+            35X,42('-'))
+114 FORMAT (35X,'Coupled atmosphere-ocean run following'/ &
+            35X,'independent precursor runs'/             &
+            35X,42('-'))
 117 FORMAT (' Accelerator boards / node:  ',I2)
 #endif
Index: /palm/trunk/SOURCE/init_pegrid.f90
===================================================================
--- /palm/trunk/SOURCE/init_pegrid.f90	(revision 1467)
+++ /palm/trunk/SOURCE/init_pegrid.f90	(revision 1468)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! Adapted for use on up to 6-digit processor cores
 ! 
 ! Former revisions:
@@ -242,5 +242,5 @@
                           comm2d, ierr )
     CALL MPI_COMM_RANK( comm2d, myid, ierr )
-    WRITE (myid_char,'(''_'',I4.4)')  myid
+    WRITE (myid_char,'(''_'',I6.6)')  myid
 
     CALL MPI_CART_COORDS( comm2d, myid, ndim, pcoord, ierr )
Index: /palm/trunk/SOURCE/modules.f90
===================================================================
--- /palm/trunk/SOURCE/modules.f90	(revision 1467)
+++ /palm/trunk/SOURCE/modules.f90	(revision 1468)
@@ -20,5 +20,6 @@
 ! Current revisions:
 ! ------------------
-! 
+! Adapted for use on up to 6-digit processor cores.
+! Increased identifier string length for user-defined quantities to 20.
 ! 
 ! Former revisions:
@@ -548,11 +549,11 @@
     CHARACTER (LEN=1000) ::  message_string = ' '
 
-    CHARACTER (LEN=11), DIMENSION(100) ::  data_output = ' ',    &
+    CHARACTER (LEN=20), DIMENSION(100) ::  data_output = ' ',    &
                                            data_output_user = ' ', doav = ' '
-    CHARACTER (LEN=10), DIMENSION(max_masks,100) ::  &
+    CHARACTER (LEN=20), DIMENSION(max_masks,100) ::  &
          data_output_masks = ' ', data_output_masks_user = ' '
 
-    CHARACTER (LEN=10), DIMENSION(300) ::  data_output_pr = ' '
-    CHARACTER (LEN=10), DIMENSION(200) ::  data_output_pr_user = ' '
+    CHARACTER (LEN=20), DIMENSION(300) ::  data_output_pr = ' '
+    CHARACTER (LEN=20), DIMENSION(200) ::  data_output_pr_user = ' '
     CHARACTER (LEN=20), DIMENSION(11)  ::  netcdf_precision = ' '
 
@@ -1241,5 +1242,5 @@
 #endif
     CHARACTER(LEN=2) ::  send_receive = 'al'
-    CHARACTER(LEN=5) ::  myid_char = ''
+    CHARACTER(LEN=7) ::  myid_char = ''
     INTEGER(iwp)          ::  acc_rank, comm1dx, comm1dy, comm2d, comm_inter,       &
                               comm_palm, id_inflow = 0, id_recycling = 0, ierr,     &
Index: /palm/trunk/SOURCE/palm.f90
===================================================================
--- /palm/trunk/SOURCE/palm.f90	(revision 1467)
+++ /palm/trunk/SOURCE/palm.f90	(revision 1468)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Adapted for use on up to 6-digit processor cores
 ! 
 ! Former revisions:
@@ -169,5 +169,5 @@
 !
 !-- Test output (to be removed later)
-    WRITE (*,'(A,I4,A,I3,A,I3,A,I3)') '*** Connect MPI-Task ', myid,' to CPU ',&
+    WRITE (*,'(A,I6,A,I3,A,I3,A,I3)') '*** Connect MPI-Task ', myid,' to CPU ',&
                                       acc_rank, ' Devices: ', num_acc_per_node,&
                                       ' connected to:',                        &
@@ -191,5 +191,5 @@
 !
 !-- Open a file for debug output
-    WRITE (myid_char,'(''_'',I4.4)')  myid
+    WRITE (myid_char,'(''_'',I6.6)')  myid
     OPEN( 9, FILE='DEBUG'//TRIM( coupling_char )//myid_char, FORM='FORMATTED' )
 
Index: /palm/trunk/SOURCE/progress_bar.f90
===================================================================
--- /palm/trunk/SOURCE/progress_bar.f90	(revision 1467)
+++ /palm/trunk/SOURCE/progress_bar.f90	(revision 1468)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Added support for progress file PROGRESS which is used in case of batch jobs
 !
 ! Former revisions:
@@ -28,11 +28,14 @@
 ! Description:
 ! ------------
-! CPU-time measurements for any program part whatever. Results of the
+! This routine prints either a progress bar on the standard output in case of
+! interactive runs, or it prints the progress in a separate file called
+! PROGRESS.
 !------------------------------------------------------------------------------!
 
     USE control_parameters,                                                    &
-        ONLY : end_time, simulated_time, simulated_time_at_begin, time_restart
+        ONLY : end_time, run_identifier, simulated_time,                       &
+               simulated_time_at_begin, time_restart
 
-    USE, INTRINSIC ::  ISO_FORTRAN_ENV,                                     &
+    USE, INTRINSIC ::  ISO_FORTRAN_ENV,                                        &
         ONLY :  OUTPUT_UNIT
 
@@ -60,4 +63,9 @@
 
     SUBROUTINE init_progress_bar
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+! Initialize the progress bar/file
+!------------------------------------------------------------------------------!
 
        IMPLICIT NONE
@@ -74,18 +82,27 @@
        ENDIF
 
-       bar = '____________________________________________________________'
-       crosses = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
+       IF ( batch_job )  THEN
+
+          CALL check_open ( 117 )
+          WRITE ( 117, FMT='(A20,/)' ) run_identifier
+
+       ELSE
+          bar = '____________________________________________________________'
+          crosses = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
 !
-!--    Line feed on stdout to seperate the progress bar from previous messages
-       WRITE ( OUTPUT_UNIT, '(1X)' )
+!--       Line feed on stdout to seperate the progress bar from previous messages
+          WRITE ( OUTPUT_UNIT, '(1X)' )
 #if defined( __intel_compiler )
 !
-!--    The Intel compiler does not allow to immediately flush the output buffer
-!--    in case that option ADVANCE='NO' is used in the write statement.
-!--    A workaround is to set a special carriage control feature and use "+" as
-!--    first output character, but this non-standard and only available with the
-!--    Intel compiler
-       OPEN ( OUTPUT_UNIT, CARRIAGECONTROL='FORTRAN' )
+!--       The Intel compiler does not allow to immediately flush the output buffer
+!--       in case that option ADVANCE='NO' is used in the write statement.
+!--       A workaround is to set a special carriage control feature and use "+" as
+!--       first output character, but this non-standard and only available with the
+!--       Intel compiler
+          OPEN ( OUTPUT_UNIT, CARRIAGECONTROL='FORTRAN' )
 #endif
+
+       ENDIF
+
        initialized = .TRUE.
 
@@ -97,5 +114,5 @@
 ! Description:
 ! ------------
-!
+! Print progress data to standard output (interactive) or to file (batch jobs)
 !------------------------------------------------------------------------------!
 
@@ -104,50 +121,78 @@
        REAL(wp) ::  remaining_time_in_percent  !: remaining time to be simulated
                                                !: in the job
+       REAL(wp) ::  remaining_time_in_percent_total !: total remaining time of
+                                                    !: the job chain
+
+       IF ( .NOT. initialized )  CALL init_progress_bar
+
+
+       remaining_time_in_percent =                                             &
+          ( simulated_time - simulated_time_at_begin ) / time_to_be_simulated
+
+       remaining_time_in_percent_total = ( simulated_time / end_time )
 
 !
-!--    Porgress bar does not make sense in batch mode (and also ADVANCE=no does
-!--    not properly work in batch mode on Cray XC30)
-       IF ( batch_job )  RETURN
+!--    In batch mode, use a file (PROGRESS), otherwise use progress bar
+       IF ( batch_job )  THEN
 
-       IF ( .NOT. initialized )  CALL init_progress_bar
+          BACKSPACE ( 117 )
+          WRITE ( 117, FMT='(F5.2,1X,F5.2)' ) remaining_time_in_percent,       &
+                                              remaining_time_in_percent_total
+          CALL local_flush( 117 )
+
+       ELSE
+
 !
-!--    Calculate length of progress bar
-       remaining_time_in_percent =                                             &
-             ( simulated_time - simulated_time_at_begin ) / time_to_be_simulated
+!--       Calculate length of progress bar
+          ilength = remaining_time_in_percent * 60.0_wp
+          ilength = MIN( ilength, 60 )
 
-       ilength = remaining_time_in_percent * 60.0_wp
-       ilength = MIN( ilength, 60 )
-
-       bar(1:ilength) = crosses(1:ilength)
+          bar(1:ilength) = crosses(1:ilength)
 
 #if defined( __intel_compiler )
-       WRITE ( OUTPUT_UNIT, '(A,6X,''['',A,''] '',F5.1,'' left'')' )           &
-               '+', bar,                                                       &
-                MAX( 0.0_wp, ( 1.0_wp - remaining_time_in_percent ) * 100.0_wp )
+          WRITE ( OUTPUT_UNIT, '(A,6X,''['',A,''] '',F5.1,'' left'')' )        &
+                  '+', bar,                                                    &
+                   MAX( 0.0_wp, ( 1.0_wp - remaining_time_in_percent ) *       &
+                                  100.0_wp )
 #else
-       WRITE ( OUTPUT_UNIT, '(A,6X,''['',A,''] '',F5.1,'' left'')',            &
-               ADVANCE='NO' )  CHAR( 13 ), bar,                                &
-                MAX( 0.0_wp, ( 1.0_wp - remaining_time_in_percent ) * 100.0_wp )
+          WRITE ( OUTPUT_UNIT, '(A,6X,''['',A,''] '',F5.1,'' left'')',         &
+                  ADVANCE='NO' )  CHAR( 13 ), bar,                             &
+                   MAX( 0.0_wp, ( 1.0_wp - remaining_time_in_percent ) *       &
+                                  100.0_wp )
 #endif
-       CALL local_flush( OUTPUT_UNIT )
+          CALL local_flush( OUTPUT_UNIT )
+
+       ENDIF
 
     END SUBROUTINE output_progress_bar
 
     SUBROUTINE finish_progress_bar
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+! Finalization of the progress bar/file
+!------------------------------------------------------------------------------!
 
        IMPLICIT NONE
 
-       IF ( batch_job )  RETURN
+       IF ( batch_job )  THEN
 
+          CALL close_file ( 117 )
+
+       ELSE
+       
 #if defined( __intel_compiler )
 !
-!--    Reset to the default carriage control
-       OPEN ( OUTPUT_UNIT, CARRIAGECONTROL='LIST' )
+!--       Reset to the default carriage control
+          OPEN ( OUTPUT_UNIT, CARRIAGECONTROL='LIST' )
 #endif
 !
-!--    Line feed when simulation has finished
-       WRITE ( OUTPUT_UNIT, '(1X)' )
+!--       Line feed when simulation has finished
+          WRITE ( OUTPUT_UNIT, '(1X)' )
+
+       ENDIF
 
     END SUBROUTINE finish_progress_bar
 
+
  END MODULE progress_bar
Index: /palm/trunk/SOURCE/read_3d_binary.f90
===================================================================
--- /palm/trunk/SOURCE/read_3d_binary.f90	(revision 1467)
+++ /palm/trunk/SOURCE/read_3d_binary.f90	(revision 1468)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Adapted for use on up to 6-digit processor cores
 ! 
 ! Former revisions:
@@ -108,5 +108,5 @@
     IMPLICIT NONE
 
-    CHARACTER (LEN=5)  ::  myid_char_save
+    CHARACTER (LEN=7)  ::  myid_char_save
     CHARACTER (LEN=10) ::  binary_version
     CHARACTER (LEN=10) ::  version_on_file
@@ -296,10 +296,10 @@
 !
 !--    Set the filename (underscore followed by four digit processor id)
-       WRITE (myid_char,'(''_'',I4.4)')  j
+       WRITE (myid_char,'(''_'',I6.6)')  j
        WRITE (9,*) 'myid=',myid,' opening file "',myid_char,'"'
        CALL local_flush( 9 )
 
 !
-!--    Open the restart file. If this file has been created by PE0 (_0000),
+!--    Open the restart file. If this file has been created by PE0 (_000000),
 !--    the global variables at the beginning of the file have to be skipped
 !--    first.
Index: /palm/trunk/UTIL/combine_plot_fields.f90
===================================================================
--- /palm/trunk/UTIL/combine_plot_fields.f90	(revision 1467)
+++ /palm/trunk/UTIL/combine_plot_fields.f90	(revision 1468)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Adapted for use on up to 6-digit processor cores (not tested)
 !
 ! Former revisions:
@@ -87,5 +87,5 @@
 !-- Local variables
     CHARACTER (LEN=2)    ::  modus, model_string
-    CHARACTER (LEN=4)    ::  id_string
+    CHARACTER (LEN=6)    ::  id_string
     CHARACTER (LEN=10)   ::  dimname, var_name
     CHARACTER (LEN=40)   ::  filename
@@ -187,5 +187,5 @@
 !--       create any output for this cross-section.
           danz = 0
-          WRITE (id_string,'(I4.4)')  danz
+          WRITE (id_string,'(I6.6)')  danz
           INQUIRE ( &
                FILE='PLOT2D_'//modus//TRIM( model_string )//'_'//id_string, &
@@ -200,5 +200,5 @@
                   FORM='UNFORMATTED' )
              danz = danz + 1
-             WRITE (id_string,'(I4.4)')  danz
+             WRITE (id_string,'(I6.6)')  danz
              INQUIRE ( &
                   FILE='PLOT2D_'//modus//TRIM( model_string )//'_'//id_string, &
@@ -604,5 +604,5 @@
        IF ( .NOT. netcdf_parallel )  THEN
           danz = 0
-          WRITE (id_string,'(I4.4)')  danz
+          WRITE (id_string,'(I6.6)')  danz
           INQUIRE ( &
                FILE='PLOT3D_DATA'//TRIM( model_string )//'_'//TRIM( id_string ),  &
@@ -626,5 +626,5 @@
                FORM='UNFORMATTED')
           danz = danz + 1
-          WRITE (id_string,'(I4.4)')  danz
+          WRITE (id_string,'(I6.6)')  danz
           INQUIRE ( &
                FILE='PLOT3D_DATA'//TRIM( model_string )//'_'//TRIM(id_string), &
Index: /palm/trunk/UTIL/combine_plot_fields_single_open.f90
===================================================================
--- /palm/trunk/UTIL/combine_plot_fields_single_open.f90	(revision 1467)
+++ /palm/trunk/UTIL/combine_plot_fields_single_open.f90	(revision 1468)
@@ -20,4 +20,5 @@
 ! Current revisions:
 ! -----------------
+! Adapted for use on up to 6-digit processor cores (not tested)
 !
 ! Former revisions:
@@ -43,5 +44,5 @@
 !-- Lokale Variablen
     CHARACTER (LEN=2) ::  modus
-    CHARACTER (LEN=7) ::  id_char
+    CHARACTER (LEN=9) ::  id_char
 
     INTEGER, PARAMETER ::  spk = SELECTED_REAL_KIND( 6 )
@@ -67,5 +68,5 @@
 !--    Pruefen, ob Basisdatei von PE0 vorhanden
        danz = 0
-       WRITE (id_char,'(A2,''_'',I4.4)')  modus, danz
+       WRITE (id_char,'(A2,''_'',I6.6)')  modus, danz
        INQUIRE ( FILE='PLOT2D_'//id_char, EXIST=found )
 !
@@ -74,5 +75,5 @@
 
           danz = danz + 1
-          WRITE (id_char,'(A2,''_'',I4.4)')  modus, danz
+          WRITE (id_char,'(A2,''_'',I6.6)')  modus, danz
           INQUIRE ( FILE='PLOT2D_'//id_char, EXIST=found )
 
@@ -98,5 +99,5 @@
 !
 !--          Prozessordatei oeffnen
-             WRITE (id_char,'(A2,''_'',I4.4)')  modus, id
+             WRITE (id_char,'(A2,''_'',I6.6)')  modus, id
              OPEN ( 1, FILE='PLOT2D_'//id_char, FORM='UNFORMATTED', &
                        POSITION='ASIS' )
@@ -168,5 +169,5 @@
 !-- Pruefen, ob Basisdatei von PE0 vorhanden
     danz = 0
-    WRITE (id_char,'(I4.4)')  danz
+    WRITE (id_char,'(I6.6)')  danz
     INQUIRE ( FILE='PLOT3D_DATA_'//TRIM( id_char ), EXIST=found )
 
@@ -180,5 +181,5 @@
 
        danz = danz + 1
-       WRITE (id_char,'(I4.4)')  danz
+       WRITE (id_char,'(I6.6)')  danz
        INQUIRE ( FILE='PLOT3D_DATA_'//TRIM( id_char ), EXIST=found )
 
@@ -209,5 +210,5 @@
 !
 !--       Prozessordatei oeffnen
-          WRITE (id_char,'(I4.4)')  id
+          WRITE (id_char,'(I6.6)')  id
           OPEN ( 1, FILE='PLOT3D_DATA_'//TRIM( id_char ), FORM='UNFORMATTED', &
                     POSITION='ASIS' )
