Index: /palm/trunk/DOC/app/chapter_5.1.html
===================================================================
--- /palm/trunk/DOC/app/chapter_5.1.html	(revision 81)
+++ /palm/trunk/DOC/app/chapter_5.1.html	(revision 82)
@@ -12,10 +12,10 @@
 Details about new releases can be found in the
 <a href="../tec/technical_documentation.html">technical/numerical
-documentation</a>. Users can easily make version updates by
+documentation</a>.</p><p>If you have previously checked out the most recent (at that time)  PALM version by using</p><p style="margin-left: 40px; font-family: Courier New,Courier,monospace;">svn checkout ...../palm/trunk trunk &nbsp; &nbsp; ,</p><p>you can easily make an update to the most recent PALM version by
 changing into
 the working directory<span style="font-family: Courier New,Courier,monospace;">
 ~/palm/current_version
 </span>and executing<span style="font-family: Courier New,Courier,monospace;"></span></p><p style="margin-left: 40px;"><span style="font-family: Courier New,Courier,monospace;">svn
-update</span></p><p><span style="font-family: Courier New,Courier,monospace;"></span>This
+update trunk</span></p><p><span style="font-family: Courier New,Courier,monospace;"></span>This
 updates all files in the PALM working copy in subdirectory<span style="font-family: Courier New,Courier,monospace;"> trunk</span>.
 The update may fail due&nbsp;the&nbsp;<span style="font-weight: bold;">subversion</span> rules, if
Index: /palm/trunk/SCRIPTS/mbuild
===================================================================
--- /palm/trunk/SCRIPTS/mbuild	(revision 81)
+++ /palm/trunk/SCRIPTS/mbuild	(revision 82)
@@ -87,4 +87,7 @@
      #                    adjustments for running under pdksh, local ip-addres
      #                    is not determined any more
+     # 30/03/07 - Siggi - cpp-directives/options + netcdf-options are read
+     #                    from configuration file
+     #                    host identifier (local_host) is read from config file
 
 
@@ -159,32 +162,4 @@
 
 
-    # LOKALEN RECHNER ERMITTELN
- local_host_real_name=$(hostname)
-# local_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
-
- case  $local_host_real_name  in
-     (atmos)                    local_host=lcide;;
-     (berte)                    local_host=t3eb;;
-     (bora|breva|gregale|irifi|levanto|maestro|orkan|ostria|quanero|scirocco)  local_host=lcmuk;;
-     (fimm.bccs.uib.no)         local_host=lcmuk;;
-     (gate)                     local_host=neck;;
-     (gfdl3.yonsei.ac.kr)       local_host=decalpha;;
-     (gfdl5)                    local_host=ibmy;;
-     (gwdk081.gwdg.de)          local_host=ibm;;
-     (hreg01a-en0|hreg02a-en0)  local_host=ibmh;;
-     (nobel|nobela)             local_host=ibms;;
-     (tgg*)                     local_host=lctit;;
-     (t3e)                      local_host=t3eh;;
-     (zam003)                   local_host=t3ej2;;
-     (zam005)                   local_host=t3ej5;;
-     (*)       printf "\n  +++ local host \"$local_host_real_name\" not admitted for mbuild \n"
-               locat=local_host; exit;;
- esac
-
- [[ $local_host_real_name = scirocco ]]  &&  scirocco=true
- [[ $local_host_real_name = fimm.bccs.uib.no ]]  &&  fimm=true
-
-
-
     # PRUEFEN, OB KONFIGURATIONS-DATEI VORHANDEN
  if [[ ! -f $config_file ]]
@@ -195,4 +170,65 @@
     locat=configuration; exit  
  fi
+
+
+
+    # LOKALEN RECHNER ERMITTELN
+ local_host_real_name=$(hostname)
+# local_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
+
+
+
+    # HOST-IDENTIFIER (local_host) AUS KONFIGURATIONSDATEI BESTIMMEN
+ line=""
+ grep  "%host_identifier"  $config_file  >  tmp_mbuild
+ while read line
+ do
+    if [[ "$line" != ""  ||  $(echo $line | cut -c1) != "#" ]]
+    then
+       HOSTNAME=`echo $line | cut -d" " -s -f2`
+       host_identifier=`echo $line | cut -d" " -s -f3`
+       if [[ "$HOSTNAME" = $local_host_real_name ]]
+       then
+          local_host=$host_identifier
+          break
+       fi
+    fi
+ done < tmp_mbuild
+
+ if [[ "$local_host" = "" ]]
+ then
+    printf "\n  +++ no host identifier found in configuration file \"$config_file\""
+    printf "\n      for local host \"$local_host_real_name\"."
+    printf "\n      Please add line"
+    printf "\n      \"\%host_identifier $local_host_real_name <identifier>\""
+    printf "\n      to the configuration file."
+    locat=local_host; exit
+ fi
+
+
+# case  $local_host_real_name  in
+#     (atmos)                    local_host=lcide;;
+#     (berte)                    local_host=t3eb;;
+#     (bora|breva|gregale|irifi|levanto|maestro|orkan|ostria|quanero|scirocco)  local_host=lcmuk;;
+#     (fimm.bccs.uib.no)         local_host=lcmuk;;
+#     (gate)                     local_host=neck;;
+#     (gfdl3.yonsei.ac.kr)       local_host=decalpha;;
+#     (gfdl5)                    local_host=ibmy;;
+#     (gwdk081.gwdg.de)          local_host=ibm;;
+#     (hreg01a-en0|hreg02a-en0)  local_host=ibmh;;
+#     (nobel|nobela)             local_host=ibms;;
+#     (tgg*)                     local_host=lctit;;
+#     (t3e)                      local_host=t3eh;;
+#     (zam003)                   local_host=t3ej2;;
+#     (zam005)                   local_host=t3ej5;;
+#    (*)       printf "\n  +++ local host \"$local_host_real_name\" not admitted for mbuild \n"
+#               locat=local_host; exit;;
+# esac
+
+ [[ $local_host_real_name = scirocco ]]  &&  scirocco=true
+ [[ $local_host_real_name = fimm.bccs.uib.no ]]  &&  fimm=true
+
+
+
  if [[ $local_host != ibms ]]
  then
@@ -214,4 +250,5 @@
     fi
  done < tmp_mbuild
+
 
  if [[ "$local_username" = "" ]]
@@ -673,4 +710,6 @@
     fi
 
+    netcdf_inc=""
+    netcdf_lib=""
 
        # AUF HLRN-RECHNER NUR EINMAL UEBERSETZEN
@@ -700,5 +739,5 @@
     netcdf_support=false
     case  $remote_host  in
-        (lcmuk)          remote_addres=130.75.105.3; cpp_options=""
+        (lcmuk)          remote_addres=130.75.105.3
                          netcdf_support=true
                          if [[ $scirocco = true ]]
@@ -939,4 +978,70 @@
 
 
+       # PRAEPROZESSOR-OPTIONEN/DIREKTIVEN ERMITTELN
+    line=""
+    grep  "$remote_host_string" $config_file | grep "%cpp_options"  >  tmp_mbuild
+    while read line1
+    do
+       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
+       then
+          line="$line1"
+       fi
+    done < tmp_mbuild
+    if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
+    then
+       printf "\n  +++ no preprocessor options found in configuration file"
+       printf "\n      for \"$remote_host_string\" "
+       locat=config_file; exit
+    else
+          # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
+       cpp_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
+    fi
+
+       # RECHNERSPEZIFISCHE CPP-DIREKTIVEN HINZUFUEGEN
+    for  string  in  $remote_host_string
+    do
+       if [[ $(echo $remote_host | cut -c1-2) = lc  &&  $(echo $string | cut -c1-2) = lc ]]
+       then
+          cpp_options="$cpp_options -D__lc "
+       else
+          cpp_options="$cpp_options -D__$string "
+       fi
+    done
+
+
+
+       # NETCDF-OPTIONEN ERMITTELN
+    line=""
+    grep  "$remote_host_string" $config_file | grep "%netcdf_inc"  >  tmp_mbuild
+    while read line1
+    do
+       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
+       then
+          line="$line1"
+       fi
+    done < tmp_mbuild
+    if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+    then
+          # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
+       netcdf_inc=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
+    fi
+
+    line=""
+    grep  "$remote_host_string" $config_file | grep "%netcdf_lib"  >  tmp_mbuild
+    while read line1
+    do
+       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
+       then
+          line="$line1"
+       fi
+    done < tmp_mbuild
+    if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+    then
+          # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
+       netcdf_lib=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
+    fi
+
+
+
        # COMPILEROPTIONEN ERMITTELN
     line=""
@@ -957,5 +1062,9 @@
           # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
        compiler_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
-    fi
+
+          # NETCDF-INCLUDEVERZEICHNIS HINZUFUEGEN
+       compiler_options="$compiler_options $netcdf_inc"
+    fi
+
     if [[ $netcdf_support = true ]]
     then
@@ -965,10 +1074,8 @@
           (ibms)      compiler_options="-I /applic/netcdf64/src/f90  $compiler_options";;
           (ibmy)      compiler_options="-I ${netcdf_path}/include  $compiler_options";;
-          (lcmuk)     compiler_options="-I ${netcdf_path}/include  $compiler_options";;
           (lctit)     compiler_options="-I ${netcdf_path}/include  $compiler_options";;
           (nech|neck) compiler_options="-I ${netcdf_path}/include  $compiler_options";;
        esac
     fi
-
 
 
@@ -992,13 +1099,17 @@
           # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
        loader_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
-    fi
+
+          # NETCDF-LIBRARY HINZUFUEGEN
+       loader_options="$loader_options $netcdf_lib"
+    fi
+
     if [[ $netcdf_support = true ]]
     then
        case  $remote_host  in
-          (decalpha)                   loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";;
-          (ibmb|ibmh|lcmuk|nech|neck)  loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";;
-          (ibms)                       loader_options="$loader_options -L${netcdf_path} -lnetcdf";;
-          (ibmy)                       loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";;
-          (lctit)                      loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";;
+          (decalpha)             loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";;
+          (ibmb|ibmh|nech|neck)  loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";;
+          (ibms)                 loader_options="$loader_options -L${netcdf_path} -lnetcdf";;
+          (ibmy)                 loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";;
+          (lctit)                loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";;
        esac
     fi
Index: /palm/trunk/SCRIPTS/mrun
===================================================================
--- /palm/trunk/SCRIPTS/mrun	(revision 81)
+++ /palm/trunk/SCRIPTS/mrun	(revision 82)
@@ -114,4 +114,9 @@
      # 29/03/07 - Siggi  - global revision transfered to batch job by new
      #                     option -G
+     # 30/03/07 - Siggi  - compilation "by hand" removed, cpp-directives/options
+     #                     + netcdf/dvrp-options are read from configuration
+     #                     file, host identifier (local_host) is read from
+     #                     config file, code related to ftp filetransfer
+     #                     removed (incl. option -f)
 
 
@@ -135,4 +140,5 @@
  config_file=.mrun.config
  cpp_opts=""
+ cpp_options=""
  cpumax=0
  cpurest=0
@@ -148,5 +154,4 @@
  executable=""
  execution_error=false
- filetransfer_protocol=""
  fimm=false
  fname=test
@@ -172,6 +177,7 @@
  done
  module_files=""
- MODULE_OPTIONS=""
  mrun_script_name=$mc
+ netcdf_inc=""
+ netcdf_lib=""
  netcdf_support=false
  node_usage=default
@@ -213,5 +219,4 @@
  transfer_problems=false
  usern=$LOGNAME
- use_makefile=""
  working_directory=`pwd`
  TOPT=""
@@ -335,31 +340,8 @@
 
 
-    # EVTL. NAMEN DES LOKALEN RECHNERS MIT UEBERGREIFENDEM NAMEN VERSEHEN
- case  $localhost_realname  in
-     (atmos)                localhost=lcide;;
-     (bora|breva|elephanta|gallego|gregale|hababai|irifi|levanto|maestro|orkan|ostria|poniente|quanero|scirocco|vorias)  localhost=lcmuk;;
-     (breg*-en0|berni*-en0) localhost=ibmb; archive_system=tivoli;;
-     (cs*)                  localhost=nech; archive_system=ut;;
-     (fimm.bccs.uib.no)     localhost=lcmuk;;
-     (gate|n-sx)            PATH=$PALM_BIN:$PATH:/usr/bin/nqsII; localhost=neck;;
-     (ground.yonsei.ac.kr)  localhost=decalpha;;
-     (gfdl3.yonsei.ac.kr)   localhost=decalpha;;
-     (gfdl5)                localhost=ibmy;;
-     (hreg*-en0|hanni*-en0) localhost=ibmh; archive_system=tivoli;;
-     (nobel*)               localhost=ibms;;
-     (sun1|sun2)            localhost=unics;;
-     (tgg*)                 localhost=lctit;;
-     (*)                    printf "\n  +++ Host \"$localhost_realname\" not admitted for mrun \n"
-                            locat=localhost; exit;;
- esac
-
- [[ $localhost_realname = scirocco ]]  &&  scirocco=true
- [[ $localhost_realname = fimm.bccs.uib.no ]]  &&  fimm=true
-
-
- 
+
     # SHELLSCRIPT-OPTIONEN EINLESEN UND KOMMANDO NEU ZUSAMMENSETZEN, FALLS ES
     # FUER FOLGEJOBS BENOETIGT WIRD
- while  getopts  :a:AbBc:Cd:D:f:FG:h:H:i:IkK:m:M:n:o:Op:P:q:r:R:s:St:T:u:U:vxX: option
+ while  getopts  :a:AbBc:Cd:D:FG:h:H:i:IkK:m:M:n:o:Op:P:q:r:R:s:St:T:u:U:vxX: option
  do
    case  $option  in
@@ -372,5 +354,4 @@
        (d)   fname=$OPTARG; mc="$mc -d$OPTARG";;
        (D)   cpp_opts="$cpp_opts $OPTARG"; mc="$mc -D$OPTARG";;
-       (f)   filetransfer_protocol=$OPTARG; mc="$mc -f$OPTARG";;
        (F)   job_on_file="-D"; mc="$mc -F";;
        (G)   global_revision=$OPTARG; mc="$mc -G'$OPTARG'";;
@@ -426,5 +407,4 @@
     printf "\n        -d    base name of files attached to program   test"
     printf "\n        -D    preprocessor(cpp)-directives             \"\" "
-    printf "\n        -f    filetransfer protocol (ftp or scp)       depending on -h"
     printf "\n        -F    create remote job file only              ---"
     printf "\n        -h    execution host                           $localhost_realname"
@@ -472,4 +452,56 @@
 
 
+
+    # PRUEFEN, OB KONFIGURATIONS-DATEI VORHANDEN
+ if [[ ! -f $config_file ]]
+ then
+    printf "\n\n  +++ configuration file: "
+    printf "\n           $config_file"
+    printf "\n      does not exist"
+    locat=connect; exit  
+ fi
+
+
+    # HOST-IDENTIFIER (local_host) AUS KONFIGURATIONSDATEI BESTIMMEN
+ line=""
+ grep  "%host_identifier"  $config_file  >  tmp_mrun
+ while read line
+ do
+    if [[ "$line" != ""  ||  $(echo $line | cut -c1) != "#" ]]
+    then
+       HOSTNAME=`echo $line | cut -d" " -s -f2`
+       host_identifier=`echo $line | cut -d" " -s -f3`
+       if [[ "$HOSTNAME" = $localhost_realname ]]
+       then
+          localhost=$host_identifier
+          break
+       fi
+    fi
+ done < tmp_mrun
+
+ if [[ "$localhost" = "" ]]
+ then
+    printf "\n\n  +++ no host identifier found in configuration file \"$config_file\""
+    printf "\n      for local host \"$localhost_realname\"."
+    printf "\n      Please add line"
+    printf "\n      \"\%host_identifier $localhost_realname <identifier>\""
+    printf "\n      to the configuration file."
+    locat=localhost; exit
+ fi
+
+
+
+    # HOSTSPEZIFISCHE VARIABLEN SETZEN
+ case  $localhost_realname  in
+     (breg*-en0|berni*-en0)  archive_system=tivoli;;
+     (cs*)                   archive_system=ut;;
+     (fimm.bccs.uib.no)      fimm=true;;
+     (gate|n-sx)             PATH=$PALM_BIN:$PATH:/usr/bin/nqsII;;
+     (hreg*-en0|hanni*-en0)  archive_system=tivoli;;
+     (scirocco)              scirocco=true;;
+ esac
+
+
+ 
     # BASISNAME DER INPUT-DATEIEN GLEICH ALLGEMEINEM BASISNAMEN SETZEN,
     # WENN NICHT VOM BENUTZER ANDERS BESTIMMT
@@ -555,14 +587,4 @@
 
 
-    # PRUEFEN, OB KONFIGURATIONS-DATEI VORHANDEN
- if [[ ! -f $config_file ]]
- then
-    printf "\n\n  +++ configuration file: "
-    printf "\n           $config_file"
-    printf "\n      does not exist"
-    locat=connect; exit  
- fi
-
-
 
     # LESEN UND INTERPRETIEREN DER KONFIGURATIONS-DATEI VOM SHELLSCRIPT AUS
@@ -1030,21 +1052,4 @@
  fi
 
-    # DEFAULT-DATEITRANSFER-PROTOKOLL FESTLEGEN
- if [[ "$filetransfer_protocol" = "" ]]
- then
-    case  $host  in
-        (nech|neck|ibm|ibmb|ibmh|ibms|ibmy|lctit)  filetransfer_protocol=scp;;
-        (*)              filetransfer_protocol=ftp;;
-    esac
- fi
-
-    # PRUEFEN, OB ZULAESSIGES DATEITRANSFER-PROTOKOLL GEWAEHLT WURDE
- if [[ "$filetransfer_protocol" != ftp  &&  "$filetransfer_protocol" != scp ]]
- then
-    printf "\n"
-    printf "\n  +++ illegal value \"$filetransfer_protocol\" for Option -f"
-    printf "\n      only \"ftp\" or \"scp\" are allowed"
-    locat=options; exit
- fi
 
 
@@ -1075,30 +1080,29 @@
 
     # EVTL. NETCDF-UNTERSTUETZUNG SETZEN
- case  $host  in
-     (decalpha)   netcdf_support=true
-                  netcdf_path=/usr/local/netcdf-3.5.1;;
-     (ibmb|ibmh)  netcdf_support=true
-                  netcdf_path=/aws/dataformats/netcdf-3.6.0-p1/64-32;;
-     (ibms)       netcdf_support=true
-                  netcdf_path=/applic/lib/NETCDF64;;
-     (ibmy)       netcdf_support=true
-                  netcdf_path=/usr1/users/raasch/pub/netcdf-3.6.0-p1;;
-     (lcmuk)      netcdf_support=true
-                  if [[ $scirocco = true ]]
-                  then
-                     netcdf_path=/opt/netcdf/3.6.2-beta4
-                  elif [[ $fimm = true ]]
-                  then
-                     netcdf_path=/local/netcdf
-                  else
-                     netcdf_path=/muksoft/packages/netcdf/linux
-                  fi;;
-     (lctit)      netcdf_support=true
-                  netcdf_path=/home2/usr5/mkanda/netcdf-3.6.2;;
-     (nech)       netcdf_support=true
-                  netcdf_path=/pool/SX-6/netcdf/netcdf-3.6.0-p1;;
-     (neck)       netcdf_support=true
-                  netcdf_path=/home/DSRC/NC/tatuyama/pub/netcdf-3.6.0-p1;;
- esac
+# case  $host  in
+#     (decalpha)   netcdf_support=true
+#                  netcdf_path=/usr/local/netcdf-3.5.1;;
+#     (ibmb|ibmh)  netcdf_support=true
+#                  netcdf_path=/aws/dataformats/netcdf-3.6.0-p1/64-32;;
+#     (ibms)       netcdf_support=true
+#                  netcdf_path=/applic/lib/NETCDF64;;
+#     (ibmy)       netcdf_support=true
+#                  netcdf_path=/usr1/users/raasch/pub/netcdf-3.6.0-p1;;
+#     (lcmuk)      if [[ $scirocco = true ]]
+#                  then
+#                     netcdf_path=/opt/netcdf/3.6.2-beta4
+#                  elif [[ $fimm = true ]]
+#                  then
+#                     netcdf_path=/local/netcdf
+#                  else
+#                     netcdf_path=/muksoft/packages/netcdf/linux
+#                  fi;;
+#     (lctit)      netcdf_support=true
+#                  netcdf_path=/home2/usr5/mkanda/netcdf-3.6.2;;
+#     (nech)       netcdf_support=true
+#                  netcdf_path=/pool/SX-6/netcdf/netcdf-3.6.0-p1;;
+#     (neck)       netcdf_support=true
+#                  netcdf_path=/home/DSRC/NC/tatuyama/pub/netcdf-3.6.0-p1;;
+# esac
 
 
@@ -1626,5 +1630,5 @@
        # MAKEFILE AUF VORHANDENSEIN PRUEFEN UND KOPIEREN
        # BEI RESTART-LAEUFEN LIEGT ES SCHON IM VERZEICHNIS SOURCES_FOR_RUN...
-    if [[ "$use_makefile" = true  &&  "$restart_run" != true ]]
+    if [[ "$restart_run" != true ]]
     then
        [[ "$makefile" = "" ]]  &&  makefile=$source_path/Makefile
@@ -1632,5 +1636,4 @@
        then
           printf "\n  +++ file \"$makefile\" does not exist"
-          printf "\n      provide this file or set \"use_makefile=false\" in configuration file\n"
           locat=make; exit
        else
@@ -1651,32 +1654,35 @@
     if [[ $(echo $localhost | cut -c1-3) = ibm ]]
     then
-       PPOPTS=-Dibm=ibm
+       cpp_options="${cpp_options},-D__ibm=__ibm"
     elif [[ $(echo $localhost | cut -c1-3) = nec ]]
     then
-       PPOPTS=-Dnec
+       cpp_options="$cpp_options -D__nec"
+    elif [[ $(echo $localhost | cut -c1-2) = lc ]]
+    then
+       cpp_options="$cpp_options -D__lc"
     else
-       PPOPTS=-D$localhost
+       cpp_options="$cpp_options -D__$localhost"
     fi
     if [[ $(echo $localhost | cut -c1-3) = ibm ]]
     then
-       [[ -n $cond1 ]]               &&  PPOPTS="$PPOPTS -D$cond1=$cond1"
-       [[ -n $cond2 ]]               &&  PPOPTS="$PPOPTS -D$cond2=$cond2"
-       if [[ $netcdf_support = true ]]
-       then
-          PPOPTS="$PPOPTS -Dnetcdf=netcdf"
-          [[ $localhost != ibms ]]      &&  PPOPTS="$PPOPTS -Dnetcdf_64bit=netcdf_64bit"
-       fi
-       if [[ $localhost = ibmy ]]
-       then
-          PPOPTS="$PPOPTS -Dibmy_special=ibmy_special"
-       fi
+       [[ -n $cond1 ]]  &&  cpp_options="${cpp_options},-D__$cond1=__$cond1"
+       [[ -n $cond2 ]]  &&  cpp_options="${cpp_options},-D__$cond2=__$cond2"
+#       if [[ $netcdf_support = true ]]
+#       then
+#          PPOPTS="$PPOPTS -Dnetcdf=netcdf"
+#          [[ $localhost != ibms ]]      &&  PPOPTS="$PPOPTS -Dnetcdf_64bit=netcdf_64bit"
+#       fi
+#       if [[ $localhost = ibmy ]]
+#       then
+#          PPOPTS="$PPOPTS -Dibmy_special=ibmy_special"
+#       fi
     else
-       [[ -n $cond1 ]]               &&  PPOPTS="$PPOPTS -D$cond1"
-       [[ -n $cond2 ]]               &&  PPOPTS="$PPOPTS -D$cond2"
-       if [[ $netcdf_support = true ]]
-       then
-          PPOPTS="$PPOPTS -Dnetcdf"
-          [[ $localhost != decalpha  &&  $localhost != lctit ]]  &&  PPOPTS="$PPOPTS -Dnetcdf_64bit"
-       fi
+       [[ -n $cond1 ]]  &&  cpp_options="$cpp_options -D__$cond1"
+       [[ -n $cond2 ]]  &&  cpp_options="$cpp_options -D__$cond2"
+#       if [[ $netcdf_support = true ]]
+#       then
+#          PPOPTS="$PPOPTS -Dnetcdf"
+#          [[ $localhost != decalpha  &&  $localhost != lctit ]]  &&  PPOPTS="$PPOPTS -Dnetcdf_64bit"
+#       fi
     fi
     if [[ -n $package_list ]]
@@ -1688,7 +1694,7 @@
              if [[ $package != "dvrp_graphics+1PE" ]]
              then
-                PPOPTS="$PPOPTS -D$package=$package"
+                cpp_options="${cpp_options},-D__$package=__$package"
              else
-                PPOPTS="$PPOPTS -Ddvrp_graphics"
+                cpp_options="${cpp_options},-D__dvrp_graphics=__dvrp_graphics"
                 export use_seperate_pe_for_dvrp_output=true
              fi
@@ -1696,7 +1702,7 @@
              if [[ $package != "dvrp_graphics+1PE" ]]
              then
-                PPOPTS="$PPOPTS -D$package"
+                cpp_options="$cpp_options -D__$package"
              else
-                PPOPTS="$PPOPTS -Ddvrp_graphics"
+                cpp_options="$cpp_options -D__dvrp_graphics"
                 export use_seperate_pe_for_dvrp_output=true
              fi
@@ -1708,32 +1714,34 @@
        for  popts  in  $cpp_opts
        do
-          PPOPTS="$PPOPTS -D$popts"
+          if [[ $(echo $localhost | cut -c1-3) = ibm ]]
+          then
+             cpp_options="${cpp_options},-D__$popts=__$popts"
+          else
+             cpp_options="$cpp_options -D__$popts"
+          fi
        done
     fi
 
-       # -D ARGUMENTEN EINEN DOPPELTEN UNTERSTRICH VORANSTELLEN
-    PPOPTS=`echo " $PPOPTS" | sed 's/ -D/ -D__/g'`
-
        # OPTION ZUM EINSCHALTEN DES PRAEPROZESSORS HINZUFUEGEN
-    if [[ $host = decalpha ]]
-    then
-       C_PPOPTS="-cpp  -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION $PPOPTS"
-    elif [[ $(echo $host | cut -c1-3) = ibm ]]
-    then
-          # blanks in PPOPTS muessen durch "," ersetzt werden
-       PPOPTS=`echo $PPOPTS | sed 's/ -/,-/g'`
-       C_PPOPTS="-qsuffix=cpp=f90 -WF,-DMPI_REAL=MPI_DOUBLE_PRECISION,$PPOPTS"
-    elif [[ $host = lcmuk ]]
-    then
-       C_PPOPTS="$PPOPTS -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION"
-    elif [[ $host = lctit ]]
-    then
-       C_PPOPTS="$PPOPTS -Mpreprocess -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION"
-    elif [[ $(echo $host | cut -c1-3) = nec ]]
-    then
-       C_PPOPTS="-Ep -DMPI_REAL=MPI_REAL8 -DMPI_2REAL=MPI_2REAL8 -DSCFFT=dzfft -DCSFFT=zdfft $PPOPTS"
-    else
-       C_PPOPTS="$PPOPTS"
-    fi
+#    if [[ $host = decalpha ]]
+#    then
+#       C_PPOPTS="-cpp  -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION $PPOPTS"
+#    elif [[ $(echo $host | cut -c1-3) = ibm ]]
+#    then
+#          # blanks in PPOPTS muessen durch "," ersetzt werden
+#       PPOPTS=`echo $PPOPTS | sed 's/ -/,-/g'`
+#       C_PPOPTS="-qsuffix=cpp=f90 -WF,-DMPI_REAL=MPI_DOUBLE_PRECISION,$PPOPTS"
+#    elif [[ $host = lcmuk ]]
+#    then
+#       C_PPOPTS="$PPOPTS -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION"
+#    elif [[ $host = lctit ]]
+#    then
+#       C_PPOPTS="$PPOPTS -Mpreprocess -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION"
+#    elif [[ $(echo $host | cut -c1-3) = nec ]]
+#    then
+#       C_PPOPTS="-Ep -DMPI_REAL=MPI_REAL8 -DMPI_2REAL=MPI_2REAL8 -DSCFFT=dzfft -DCSFFT=zdfft $PPOPTS"
+#    else
+#       C_PPOPTS="$PPOPTS"
+#    fi
 
  else
@@ -1766,26 +1774,24 @@
  if [[ "$compiler_name" = "" ]]
  then
-    case  $localhost  in
-        (unics)                                 compiler_name=f77;;
-        (lcmuk)                                 if [[ "$cond1" = parallel  ||  "$cond2" = parallel ]]
-                                                then
-                                                   compiler_name=mpif90
-                                                else
-                                                   compiler_name=ifc
-                                                fi;;
-        (lctit)                                 if [[ "$cond1" = parallel  ||  "$cond2" = parallel ]]
-                                                then
-                                                   compiler_name=mpif90
-                                                   echo ">>> compiler=mpif90"
-                                                else
-                                                   compiler_name=pgf95
-                                                   echo ">>> compiler=pgf95"
-                                                fi;;
-        (nech)                                  compiler_name=sxmpif90;;
-        (decalpha)                              compiler_name=f95;;
-        (ibm|ibmb|ibmh|ibms|ibmy)               compiler_name=mpxlf95_r;;
-        (*)      printf "\n  +++ unknown host name: $localhost \n";
-                 locat=localhost; exit;;
-    esac
+
+    printf "\n  +++ no compiler specified for \"$localhost $cond1 $cond2\""
+    locat=compiler_name; exit
+
+#    case  $localhost  in
+#        (unics)                                 compiler_name=f77;;
+#        (lctit)                                 if [[ "$cond1" = parallel  ||  "$cond2" = parallel ]]
+#                                                then
+#                                                   compiler_name=mpif90
+#                                                   echo ">>> compiler=mpif90"
+#                                                else
+#                                                   compiler_name=pgf95
+#                                                   echo ">>> compiler=pgf95"
+#                                                fi;;
+#        (nech)                                  compiler_name=sxmpif90;;
+#        (decalpha)                              compiler_name=f95;;
+#        (ibm|ibmb|ibmh|ibms|ibmy)               compiler_name=mpxlf95_r;;
+#        (*)      printf "\n  +++ unknown host name: $localhost \n";
+#                 locat=localhost; exit;;
+#    esac
  fi
 
@@ -1846,6 +1852,6 @@
 
     # COMPILE- UND LINK-OPTIONEN BESTIMMEN
- FOPTS="$fopts"
- LOPTS="$lopts"
+ fopts="$fopts $netcdf_inc $dvrp_inc"
+ lopts="$lopts $netcdf_lib $dvrp_lib"
  ROPTS="$ropts"
  if [[ ( $(echo $host | cut -c1-3) = nec  ||  $(echo $host | cut -c1-3) = ibm  ||  $host = lctit )  &&  -n $numprocs ]]
@@ -1857,63 +1863,63 @@
     # BEI VERWENDUNG VON DVRP-SOFTWARE MUSS ENTSPECHENDE GRAFIK-BIBLIOTHEK
     # MIT EINGEBUNDEN WERDEN
- if [[ -n $package_list ]]
- then
-    if [[ $(echo $package_list | grep -c dvrp_graphics) != 0 ]]
-    then
-
-          # DVRP-GRAFIK GIBT ES NUR AUF DER IBM AM HLRN, AUF NECH/NECK UND
-          # DEM NOTEBOOK SCIROCCO
-       if [[ $host != ibmh  &&  $host != nech  &&  $host != neck  &&  $host != lcmuk  &&  "$local_compile" != true ]]
-       then
-          printf "\n"
-          printf "\n  +++ option -p with package \"dvrp_graphics\" only allowed on nech and ibmh"
-          locat=parameter; exit
-       fi
-       if [[ $host = ibmh ]]
-       then
-          if [[ $cond1 = debug  ||  $cond2 = debug ]]
-          then
-             FOPTS="-I/home/h/hzazchmi/lib/debug  $FOPTS"
-             LOPTS="$LOPTS -L/home/h/hzazchmi/lib/debug -lDVRP2 -lftp"
-          else
-             FOPTS="-I/home/h/nikevita/lib_stable/optimize  $FOPTS"
-             LOPTS="$LOPTS -L/home/h/nikevita/lib_stable/optimize -lDVRP2 -lftp"
-          fi
-       elif [[ $host = nech ]]
-       then
-          FOPTS="-I/import/ds9b/ipf2/b/b323014/lib/optimize  $FOPTS"
-          LOPTS="$LOPTS -L/import/ds9b/ipf2/b/b323014/lib/optimize -lDVRP2 -lftp"
-       elif [[ $host = neck ]]
-       then
-          FOPTS="-I/home/DSRC/NC/tatuyama/pub/dvrp  $FOPTS"
-          LOPTS="$LOPTS -L/home/DSRC/NC/tatuyama/pub/dvrp -lDVRP2 -lftp"
-       elif [[ $host = lcmuk ]]
-       then
-          FOPTS="-I/usr/local/lib/dvrp/optimize  $FOPTS"
-          LOPTS="$LOPTS -L/usr/local/lib/dvrp/optimize -lDVRP2 -lftp"
-       fi
-    fi
- fi
+# if [[ -n $package_list ]]
+# then
+#    if [[ $(echo $package_list | grep -c dvrp_graphics) != 0 ]]
+#    then
+#
+#          # DVRP-GRAFIK GIBT ES NUR AUF DER IBM AM HLRN, AUF NECH/NECK UND
+#          # DEM NOTEBOOK SCIROCCO
+#       if [[ $host != ibmh  &&  $host != nech  &&  $host != neck  &&  $host != lcmuk  &&  "$local_compile" != true ]]
+#       then
+#          printf "\n"
+#          printf "\n  +++ option -p with package \"dvrp_graphics\" only allowed on nech and ibmh"
+#          locat=parameter; exit
+#       fi
+#       if [[ $host = ibmh ]]
+#       then
+#          if [[ $cond1 = debug  ||  $cond2 = debug ]]
+#          then
+#             fopts="-I/home/h/hzazchmi/lib/debug  $fopts"
+#             lopts="$lopts -L/home/h/hzazchmi/lib/debug -lDVRP2 -lftp"
+#          else
+#             fopts="-I/home/h/nikevita/lib_stable/optimize  $fopts"
+#             lopts="$lopts -L/home/h/nikevita/lib_stable/optimize -lDVRP2 -lftp"
+#          fi
+#       elif [[ $host = nech ]]
+#       then
+#          fopts="-I/import/ds9b/ipf2/b/b323014/lib/optimize  $fopts"
+#          lopts="$lopts -L/import/ds9b/ipf2/b/b323014/lib/optimize -lDVRP2 -lftp"
+#       elif [[ $host = neck ]]
+#       then
+#          fopts="-I/home/DSRC/NC/tatuyama/pub/dvrp  $fopts"
+#          lopts="$lopts -L/home/DSRC/NC/tatuyama/pub/dvrp -lDVRP2 -lftp"
+#       elif [[ $host = lcmuk ]]
+#       then
+#          fopts="-I/usr/local/lib/dvrp/optimize  $fopts"
+#          lopts="$lopts -L/usr/local/lib/dvrp/optimize -lDVRP2 -lftp"
+#       fi
+#    fi
+# fi
 
 
     # EVTL. EINBINDEN DER NETCDF-BIBLIOTHEK
- if [[ $netcdf_support = true ]]
- then
-    case  $host  in
-       (decalpha)         FOPTS="-I${netcdf_path}/include  $FOPTS"
-                          LOPTS="$LOPTS -L${netcdf_path}/lib -lnetcdf";;
-       (ibmb|ibmh)        FOPTS="-I ${netcdf_path}/include-64  $FOPTS"
-                          LOPTS="$LOPTS -L${netcdf_path}/lib -lnetcdf";;
-       (ibms)             FOPTS="-I /applic/netcdf64/src/f90  $FOPTS"
-                          LOPTS="$LOPTS -L${netcdf_path} -lnetcdf";;
-       (ibmy)             FOPTS="-I ${netcdf_path}/include  $FOPTS"
-                          LOPTS="$LOPTS -L${netcdf_path}/lib -lnetcdf";;
-       (lcmuk|nech|neck)  FOPTS="-I ${netcdf_path}/include  $FOPTS"
-                          LOPTS="$LOPTS -L${netcdf_path}/lib -lnetcdf";;
-       (lctit)            FOPTS="-I ${netcdf_path}/include  $FOPTS"
-                          LOPTS="$LOPTS -L${netcdf_path}/lib -lnetcdf";;
-
-    esac
- fi
+# if [[ $netcdf_support = true ]]
+# then
+#    case  $host  in
+#       (decalpha)   fopts="-I${netcdf_path}/include  $fopts"
+#                    lopts="$lopts -L${netcdf_path}/lib -lnetcdf";;
+#       (ibmb|ibmh)  fopts="-I ${netcdf_path}/include-64  $fopts"
+#                    lopts="$lopts -L${netcdf_path}/lib -lnetcdf";;
+#       (ibms)       fopts="-I /applic/netcdf64/src/f90  $fopts"
+#                    lopts="$lopts -L${netcdf_path} -lnetcdf";;
+#       (ibmy)       fopts="-I ${netcdf_path}/include  $fopts"
+#                    lopts="$lopts -L${netcdf_path}/lib -lnetcdf";;
+#       (nech|neck)  fopts="-I ${netcdf_path}/include  $fopts"
+#                    lopts="$lopts -L${netcdf_path}/lib -lnetcdf";;
+#       (lctit)      fopts="-I ${netcdf_path}/include  $fopts"
+#                    lopts="$lopts -L${netcdf_path}/lib -lnetcdf";;
+#
+#    esac
+# fi
 
     # PRUEFEN DER CPU-ZEIT. (CPUMAX WIRD ALS ENV-VARIABLE VOM HAUTPRO-
@@ -2014,7 +2020,7 @@
  if [[ $do_compile = true ]]
  then
-    spalte1=cpp-directives:; spalte2=$C_PPOPTS
+    spalte1=cpp-directives:; spalte2=$cpp_options
     printf "| $spalte1$spalte2 | \n"
-    zeile=$(echo "$C_PPOPTS" | cut -c41-)
+    zeile=$(echo "$cpp_options" | cut -c41-)
     while [[ "$zeile" != "" ]]
     do
@@ -2025,7 +2031,7 @@
     done
 
-    spalte1=compiler-options:; spalte2="$FOPTS $MODULE_OPTIONS"
+    spalte1=compiler-options:; spalte2="$fopts"
     printf "| $spalte1$spalte2 | \n"
-    zeile=$(echo "$FOPTS $MODULE_OPTIONS" | cut -c41-)
+    zeile=$(echo "$fopts" | cut -c41-)
     while [[ "$zeile" != "" ]]
     do
@@ -2036,7 +2042,7 @@
     done
 
-    spalte1=linker-options:; spalte2=$LOPTS
+    spalte1=linker-options:; spalte2=$lopts
     printf "| $spalte1$spalte2 | \n"
-    zeile=$(echo "$LOPTS" | cut -c41-)
+    zeile=$(echo "$lopts" | cut -c41-)
     while [[ "$zeile" != "" ]]
     do
@@ -2049,14 +2055,4 @@
     spalte1="main program":; spalte2=$mainprog
     printf "| $spalte1$spalte2 | \n"
-    if [[ "$use_makefile" = true ]]
-    then
-       spalte1="using \"make\" for com"; spalte2="piling and linking"
-       printf "| $spalte1$spalte2 | \n"
-    fi
-#    if [[ $vtk_graphics = true ]]
-#    then
-#       spalte1=""; spalte2="wird in C++ - Programm eingebunden (vtk)"
-#       printf "| $spalte1$spalte2 | \n"
-#    fi
  else
     spalte1=executable:; spalte2=$executable
@@ -2212,74 +2208,71 @@
        fi
 
-       if [[ "$use_makefile" = true ]]
-       then
-
-             # PFADNAMEN FUER DAS MAKE-DEPOSITORY ERMITTELN
-          line=""
-          grep "%depository_path" $config_file  >  tmp_mrun
-          while read line
-          do
-             if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
-             then
-                if [[ "$(echo $line | cut -d" " -s -f3)" = "" ]]
-                then
-                   global_depository_path=`echo $line | cut -d" " -s -f2`
-                fi
-             fi
-          done < tmp_mrun
-
-          line=""
-          grep  " $localhost" $config_file | grep "%depository_path"  >  tmp_mrun
-          while read line
-          do
-             if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
-             then
-                local_depository_path=`echo $line | cut -d" " -s -f2`
-             fi
-          done < tmp_mrun
-
-          if [[ "$local_depository_path" = "" ]]
-          then
-             if [[ "$global_depository_path" != "" ]]
-             then
-                local_depository_path=$global_depository_path
-             else
-                printf "\n\n  +++ no depository path found in configuration file"
-                printf "\n      for local host \"$localhost\" "
-                printf "\n      please set \"\%depository_path\" in configuration file\n"
-                locat=config_file; exit
-             fi
-          fi
-          eval local_depository_path=$local_depository_path
-
-          basename=`print $mainprog | cut -f1 -d"."`
-          eval make_depository=${local_depository_path}/${basename}_current_version.tar
-          if [[ ! -f $make_depository ]]
-          then
-             printf "\n"
-             printf "\n  *** WARNING: make depository \"$make_depository\" not found"
-             printf "\n               \"make\" will fail, if the Makefile or other source files are missing\n"
+
+          # PFADNAMEN FUER DAS MAKE-DEPOSITORY ERMITTELN
+       line=""
+       grep "%depository_path" $config_file  >  tmp_mrun
+       while read line
+       do
+          if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+          then
+             if [[ "$(echo $line | cut -d" " -s -f3)" = "" ]]
+             then
+                global_depository_path=`echo $line | cut -d" " -s -f2`
+             fi
+          fi
+       done < tmp_mrun
+
+       line=""
+       grep  " $localhost" $config_file | grep "%depository_path"  >  tmp_mrun
+       while read line
+       do
+          if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+          then
+             local_depository_path=`echo $line | cut -d" " -s -f2`
+          fi
+       done < tmp_mrun
+
+       if [[ "$local_depository_path" = "" ]]
+       then
+          if [[ "$global_depository_path" != "" ]]
+          then
+             local_depository_path=$global_depository_path
           else
-             cp  $make_depository  $TEMPDIR_COMPILE
-             cd  $TEMPDIR_COMPILE
-             tar -xf  $make_depository  >  /dev/null  2>&1
-             cd -  > /dev/null
-          fi
-
-          cp  SOURCES_FOR_RUN_$fname/*  $TEMPDIR_COMPILE
-
-             # FALLS USER-INTERFACE VORHANDEN UND AUF DATEI MIT ANDEREM NAMEN
-             # ALS user_interface.f90 LIEGT, DIESEN GEAENDERTEN NAMEN INS
-             # MAKEFILE EINTRAGEN
+             printf "\n\n  +++ no depository path found in configuration file"
+             printf "\n      for local host \"$localhost\" "
+             printf "\n      please set \"\%depository_path\" in configuration file\n"
+             locat=config_file; exit
+          fi
+       fi
+       eval local_depository_path=$local_depository_path
+
+       basename=`print $mainprog | cut -f1 -d"."`
+       eval make_depository=${local_depository_path}/${basename}_current_version.tar
+       if [[ ! -f $make_depository ]]
+       then
+          printf "\n"
+          printf "\n  *** WARNING: make depository \"$make_depository\" not found"
+          printf "\n               \"make\" will fail, if the Makefile or other source files are missing\n"
+       else
+          cp  $make_depository  $TEMPDIR_COMPILE
           cd  $TEMPDIR_COMPILE
-          interface_file=`grep -l "END SUBROUTINE user_parin" $source_list`
-          if [[ "$interface_file" != "" ]]
-          then
-             interface_file=`echo $interface_file | cut -d"." -f1`
-             mv  Makefile  Makefile_old
-             sed "s/user_interface/$interface_file/g"  Makefile_old  >  Makefile
-          fi
+          tar -xf  $make_depository  >  /dev/null  2>&1
           cd -  > /dev/null
        fi
+
+       cp  SOURCES_FOR_RUN_$fname/*  $TEMPDIR_COMPILE
+
+          # FALLS USER-INTERFACE VORHANDEN UND AUF DATEI MIT ANDEREM NAMEN
+          # ALS user_interface.f90 LIEGT, DIESEN GEAENDERTEN NAMEN INS
+          # MAKEFILE EINTRAGEN
+       cd  $TEMPDIR_COMPILE
+       interface_file=`grep -l "END SUBROUTINE user_parin" $source_list`
+       if [[ "$interface_file" != "" ]]
+       then
+          interface_file=`echo $interface_file | cut -d"." -f1`
+          mv  Makefile  Makefile_old
+          sed "s/user_interface/$interface_file/g"  Makefile_old  >  Makefile
+       fi
+       cd -  > /dev/null
     else
        cp  $executable   ${TEMPDIR}/a.out
@@ -2315,88 +2308,22 @@
 
           # COMPILING WITH MAKE (ON NEC COMPILER IS CALLED ON HOST CROSS)
-       if [[ "$use_makefile" = true ]]
-       then
-          printf "\n\n\n  *** compilation starts \n$striche\n"
-          printf "  *** compilation with make using following options:\n"
-          printf "      compilername:             $compiler_name\n"
-          printf "      options:                  $FOPTS\n"
-          printf "      preprocessor-directives:  $C_PPOPTS \n"
-          printf "      linker-options:           $LOPTS \n"
-          printf "      source code files:        $source_list \n"
-
-          if [[ $localhost = nech ]]
-          then
-             ssh  136.172.44.192 -l $usern ". /SX/opt/etc/initsx.sh; cd \$HOME/work/${usern}.$kennung; sxmake -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$C_PPOPTS\"  F90FLAGS=\"$FOPTS\"  LDFLAGS=\"$LOPTS\" "
-             cp  $TEMPDIR_COMPILE/a.out  .
-             [[ $? != 0 ]]  &&  compile_error=true
-             rm -rf  $TEMPDIR_COMPILE
-          else
-             make -f Makefile PROG=a.out  F90=$compiler_name  COPT="$C_PPOPTS"  F90FLAGS="$FOPTS"  LDFLAGS="$LOPTS"
-          fi
-
-          # UEBERSETZUNG "VON HAND" (OHNE MAKE)
+       printf "\n\n\n  *** compilation starts \n$striche\n"
+       printf "  *** compilation with make using following options:\n"
+       printf "      compilername:             $compiler_name\n"
+       printf "      options:                  $fopts\n"
+       printf "      preprocessor-directives:  $cpp_options \n"
+       printf "      linker-options:           $lopts \n"
+       printf "      source code files:        $source_list \n"
+
+       if [[ $localhost = nech ]]
+       then
+          ssh  136.172.44.192 -l $usern ". /SX/opt/etc/initsx.sh; cd \$HOME/work/${usern}.$kennung; sxmake -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
+          cp  $TEMPDIR_COMPILE/a.out  .
+          [[ $? != 0 ]]  &&  compile_error=true
+          rm -rf  $TEMPDIR_COMPILE
        else
-
-
-             # UEBERSETZUNG DER QUELLTEXT-DATEIEN UND DES HAUPTPROGRAMMS
-             # $CPPOPTS FUER CPP-PRAEPROZESSOR WURDEN OBEN BESTIMMT
-          printf "\n\n\n  *** compilation starts \n$striche\n"
-
-
-             # VORWEG EVTL. UEBERSETZUNG VON PROGRAMMTEILEN MIT SPEZIELLEN
-             # COMPILERN UND/ODER COMPILEROPTIONEN. DIESE WERDEN BEI DER SPAETEREN
-             # EIGENTLICHEN UEBERSETZUNG ALS OBJECT-FILES EINGEBUNDEN
-          new_source_list=""
-          for  filename  in  $source_list
-          do
-
-             basename=`print $filename | cut -f1 -d"."`
-
-                # EVTL. SPEZIELLEN COMPILER FUER UP BESTIMMEN
-             comp_var=$(eval echo \$comp_$basename)  # \$ liefert evtl. fuer source alternativ vereinbarten Compiler
-             comp_opt_var=$(eval echo \$$basename)  # \$$ liefert evtl. fuer source vereinbarte Compiler-Environment-Variable
-
-             if [[ "$comp_var" = ""  &&  "$comp_opt_var" = "" ]]
-             then
-                new_source_list="$new_source_list "$filename
-             else
-
-                if [[ "$comp_var" = "" ]]
-                then
-                   SPECIAL_COMPILER=$compiler_name
-                else
-                   SPECIAL_COMPILER=$comp_var
-                fi
-
-                if [[ "$comp_opt_var" = "" ]]
-                then
-                   SPECIAL_FOPTS=$FOPTS
-                else
-                   SPECIAL_FOPTS="$parallel_options $(eval echo \$$comp_opt_var)"
-                fi
-
-                printf "  *** compiling of $filename with special compiler call: $SPECIAL_COMPILER  $CPPOPTS  -c $SPECIAL_FOPTS \n"
-                $SPECIAL_COMPILER  $C_PPOPTS  -c $SPECIAL_FOPTS  $MODULE_OPTIONS  $filename  
-                if [[ $? != 0 ]]
-                then
-                   printf "\n  +++ compiling error occured"
-                   locat=compile
-                   exit
-                fi
-                new_source_list="$new_source_list "${basename}.o
-             fi
-          done
-          source_list="$new_source_list"
-
-
-             # EIGENTLICHE UEBERSETZUNG MIT DEN NORMALEN OPTIONEN
-          printf "  *** compilation with standard options: $compiler_name $FOPTS $MODULE_OPTIONS \n"
-          printf "      preprocessor-directives:           $C_PPOPTS \n"
-          printf "      linker-options:                    $LOPTS \n"
-          printf "      source code files:                 $source_list \n"
-
-          $compiler_name  $C_PPOPTS  $FOPTS  $MODULE_OPTIONS  $LOPTS  $source_list  
-
-       fi
+          make -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
+       fi
+
        if [[ $? != 0  ||  "$compile_error" = true  ||  "$module_compile_error" = true ]]
        then
@@ -2907,5 +2834,5 @@
 
              fi
-          elif [[ $host = lcmuk ]]
+          elif [[ $(echo $host | cut -c1-2) = lc  &&  $host != lctit ]]
           then
 
@@ -3106,31 +3033,21 @@
                    echo "set -x"                                    >    transfer_${localout[$i]}
                    echo "cd  $tmp_data_catalog/TRANSFER"            >>   transfer_${localout[$i]}
-                   if [[ $filetransfer_protocol = ftp ]]
-                   then
-                      if [[ $files_for_pes = true ]]
-                      then
-                         printf "\n  +++ WARNING: no transfer of catalogs via ftpcopy\n"
-                      fi
-                      printf "\n  >>> OUTPUT: ${localout[$i]}  by FTP in seperate job to"
-                      printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}"
-                      printf "\n              or higher cycle\n"
-                      echo "ftpcopy -b -m $return_addres $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
-                   else
-                      printf "\n  >>> OUTPUT: ${localout[$i]}$cst  by SCP in seperate job to"
-                      printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst"
-                      printf "\n              or higher cycle\n"
-                      echo "batch_scp $cps -b -m -u $return_username $return_addres  $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
-                   fi
+
+                   printf "\n  >>> OUTPUT: ${localout[$i]}$cst  by SCP in seperate job to"
+                   printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst"
+                   printf "\n              or higher cycle\n"
+                   echo "batch_scp $cps -b -m -u $return_username $return_addres  $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
+
                    echo "[[ \$? = 0 ]]  &&  rm  $file_to_transfer"  >>  transfer_${localout[$i]}
 
                    if [[ $localhost = nech ]]
                    then
-                      subjob  -d  -c /pf/b/$usern/job_queue  -v  -q pp  -X 0  -m 1000  -t 900  -f $filetransfer_protocol  transfer_${localout[$i]}
+                      subjob  -d  -c /pf/b/$usern/job_queue  -v  -q pp  -X 0  -m 1000  -t 900  transfer_${localout[$i]}
                    else
                       if [[ "$LOGNAME" = b323013 ]]
                       then
-                         subjob  -v  -q c1  -X 0  -m 1000  -t 900  -f $filetransfer_protocol  transfer_${localout[$i]}
+                         subjob  -v  -q c1  -X 0  -m 1000  -t 900  transfer_${localout[$i]}
                       else
-                         subjob  -d  -v  -q c1  -X 0  -m 1000  -t 900  -f $filetransfer_protocol  transfer_${localout[$i]}
+                         subjob  -d  -v  -q c1  -X 0  -m 1000  -t 900  transfer_${localout[$i]}
                       fi
                    fi
@@ -3140,20 +3057,8 @@
                       # TRANSFER INNERHALB DIESES JOBS
                    transfer_failed=false
-                   if [[ $filetransfer_protocol = ftp ]]
-                   then
-                      if [[ $files_for_pes = true ]]
-                      then
-                         printf "\n  +++ WARNING: no transfer of catalogs via ftpcopy\n"
-                      fi
-                      printf "\n  >>> OUTPUT: ${localout[$i]}  by FTP to"
-                      printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}\n"
-                      ftpcopy -b -m $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
-                      [[ $? != 0 ]]  &&  transfer_failed=true
-                   else
-                      printf "\n  >>> OUTPUT: ${localout[$i]}$cst  by SCP to"
-                      printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst\n"
-                      batch_scp $cps -b -m -u $return_username $return_addres  ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
-                      [[ $? != 0 ]]  &&  transfer_failed=true
-                   fi
+                   printf "\n  >>> OUTPUT: ${localout[$i]}$cst  by SCP to"
+                   printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst\n"
+                   batch_scp $cps -b -m -u $return_username $return_addres  ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
+                   [[ $? != 0 ]]  &&  transfer_failed=true
 
                       # BEI FEHLGESCHLAGENEM TRANSFER SICHERUNGSKOPIE AUF
@@ -3203,27 +3108,21 @@
                    echo "set -x"                                    >    transfer_${localout[$i]}
                    echo "cd  $tmp_data_catalog/TRANSFER"            >>   transfer_${localout[$i]}
-                   if [[ $filetransfer_protocol = ftp ]]
-                   then
-                      printf "\n  >>> OUTPUT: ${localout[$i]}  append by FTP in seperate job to"
-                      printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}"
-                      printf "\n              or higher cycle\n"
-                      echo "ftpcopy -A -b -m $return_addres $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
-                   else
-                      printf "\n  >>> OUTPUT: ${localout[$i]}  append by SCP in seperate job to"
-                      printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}"
-                      printf "\n              or higher cycle\n"
-                      echo "batch_scp -A -b -m -u $return_username $return_addres  $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
-                   fi
+
+                   printf "\n  >>> OUTPUT: ${localout[$i]}  append by SCP in seperate job to"
+                   printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}"
+                   printf "\n              or higher cycle\n"
+                   echo "batch_scp -A -b -m -u $return_username $return_addres  $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
+
                    echo "[[ \$? = 0 ]]  &&  rm  $file_to_transfer"  >>  transfer_${localout[$i]}
 
                    if [[ $localhost = nech ]]
                    then
-                      subjob  -d  -c /pf/b/$usern/job_queue  -v  -q pp  -X 0  -m 1000  -t 900  -f $filetransfer_protocol  transfer_${localout[$i]}
+                      subjob  -d  -c /pf/b/$usern/job_queue  -v  -q pp  -X 0  -m 1000  -t 900  transfer_${localout[$i]}
                    else
                       if [[ $LOGNAME = b323013 ]]
                       then
-                         subjob  -v  -q c1  -X 0  -m 1000  -t 900  -f $filetransfer_protocol  transfer_${localout[$i]}
+                         subjob  -v  -q c1  -X 0  -m 1000  -t 900  transfer_${localout[$i]}
                       else
-                         subjob  -d  -v  -q c1  -X 0  -m 1000  -t 900  -f $filetransfer_protocol  transfer_${localout[$i]}
+                         subjob  -d  -v  -q c1  -X 0  -m 1000  -t 900  transfer_${localout[$i]}
                       fi
                    fi
@@ -3233,16 +3132,8 @@
                       # TRANSFER INNERHALB DIESES JOBS
                    transfer_failed=false
-                   if [[ $filetransfer_protocol = ftp ]]
-                   then
-                      printf "\n  >>> OUTPUT: ${localout[$i]}  append by FTP to"
-                      printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}\n"
-                      ftpcopy -A -b -m $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
-                      [[ $? != 0 ]]  &&  transfer_failed=true
-                   else
-                      printf "\n  >>> OUTPUT: ${localout[$i]}  append by SCP to"
-                      printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}\n"
-                      batch_scp -A -b -m -u $return_username  $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
-                      [[ $? != 0 ]]  &&  transfer_failed=true
-                   fi
+                   printf "\n  >>> OUTPUT: ${localout[$i]}  append by SCP to"
+                   printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}\n"
+                   batch_scp -A -b -m -u $return_username  $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
+                   [[ $? != 0 ]]  &&  transfer_failed=true
 
                       # BEI FEHLGESCHLAGENEM TRANSFER SICHERUNGSKOPIE AUF
@@ -3413,8 +3304,8 @@
                    if [[ $localhost = ibmh  ||  $localhost = ibmb ]]
                    then
-                      subjob  -d  -v  -q cdata  -X 0  -m 1000  -t 7200  -f $filetransfer_protocol  archive_${frelout[$i]}
+                      subjob  -d  -v  -q cdata  -X 0  -m 1000  -t 7200  archive_${frelout[$i]}
                    elif [[ $localhost = nech ]]
                    then
-                      subjob  -d  -c /pf/b/$usern/job_queue  -v  -q pp  -X 0  -m 1000  -t 7200  -f $filetransfer_protocol  archive_${frelout[$i]}
+                      subjob  -d  -c /pf/b/$usern/job_queue  -v  -q pp  -X 0  -m 1000  -t 7200  archive_${frelout[$i]}
                    fi
                    printf "              Archiving of $tmp_data_catalog/${frelout[$i]} initiated (batch job submitted)\n"
@@ -3537,5 +3428,5 @@
                 fi
 
-                subjob  -v  -d  -q cdata  -X 0  -m 1000  -t 7200  -f $filetransfer_protocol  archive_${frelout[$i]}
+                subjob  -v  -d  -q cdata  -X 0  -m 1000  -t 7200  archive_${frelout[$i]}
                 printf "              Archiving of $tmp_data_catalog/${frelout[$i]} initiated (batch job submitted)\n"
                 file_saved=true
@@ -3571,5 +3462,5 @@
                 fi
 
-                subjob  -v  -c /pf/b/$usern/job_queue  -d  -q pp  -X 0  -m 1000  -t 7200  -f $filetransfer_protocol  archive_${frelout[$i]}
+                subjob  -v  -c /pf/b/$usern/job_queue  -d  -q pp  -X 0  -m 1000  -t 7200  archive_${frelout[$i]}
                 printf "              Archiving of $tmp_data_catalog/${frelout[$i]} initiated (batch job submitted)\n"
                 file_saved=true
@@ -3754,5 +3645,5 @@
 
        # MRUN-BEFEHL FUER REMOTE-MASCHINE ZUSAMMENSTELLEN
-    mrun_com="$mrun_script_name -a $afname -c $config_file -d $fname -f $filetransfer_protocol -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_addres -U $return_username -u $remote_username"
     [[ "$cpp_opts" != "" ]]       &&  mrun_com=${mrun_com}" -D \"$cpp_opts\""
     [[ "$global_revision" != "" ]]  &&  mrun_com=${mrun_com}" -G \"$global_revision\""
@@ -3827,13 +3718,10 @@
        done
 
-       if [[ "$use_makefile" = true ]]
-       then
-             # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN
-          echo  "cat > Makefile << \"%END%\""               >>  $jobfile
-          cat   $source_catalog/Makefile                    >>  $jobfile
-          echo  " "                                         >>  $jobfile
-          echo  "%END%"                                     >>  $jobfile
-          echo  " "                                         >>  $jobfile
-       fi
+          # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN
+       echo  "cat > Makefile << \"%END%\""               >>  $jobfile
+       cat   $source_catalog/Makefile                    >>  $jobfile
+       echo  " "                                         >>  $jobfile
+       echo  "%END%"                                     >>  $jobfile
+       echo  " "                                         >>  $jobfile
 
        echo  "cd -  > /dev/null"                         >>  $jobfile
@@ -3882,10 +3770,5 @@
              echo  "%END%"                                    >>  $jobfile
           else
-             if [[ $filetransfer_protocol = ftp ]]
-             then
-                echo  "ftpcopy -b -o -g -s $return_addres ${remotepathin[$i]} \"${pathin[$i]}\" ${frelin[$i]}" >>  $jobfile
-             else
-                echo  "batch_scp -b -o -g -s -u $return_username $return_addres ${remotepathin[$i]} \"${pathin[$i]}\" ${frelin[$i]}" >>  $jobfile
-             fi
+             echo  "batch_scp -b -o -g -s -u $return_username $return_addres ${remotepathin[$i]} \"${pathin[$i]}\" ${frelin[$i]}" >>  $jobfile
           fi
 
@@ -3936,5 +3819,5 @@
     fi
 
-    subjob  $job_on_file  -h $host  -u $remote_username  -q $queue  -m $memory  -N $node_usage -t $cpumax  $XOPT  $TOPT  $OOPT  -n $fname  -f $filetransfer_protocol  -v   $jobfile
+    subjob  $job_on_file  -h $host  -u $remote_username  -q $queue  -m $memory  -N $node_usage -t $cpumax  $XOPT  $TOPT  $OOPT  -n $fname  -v   $jobfile
     rm -rf  $jobfile
 
Index: /palm/trunk/SCRIPTS/subjob
===================================================================
--- /palm/trunk/SCRIPTS/subjob	(revision 81)
+++ /palm/trunk/SCRIPTS/subjob	(revision 82)
@@ -1,4 +1,4 @@
 #!/bin/ksh
-# subjob - Plot-Shellskript         Version:  @(#)SUBJOB 1.0    13/02/07
+# subjob - Plot-Shellskript         Version:  @(#)SUBJOB 1.0
 # $Id: subjob 54 2007-03-08 00:00:02Z raasch $
 
@@ -81,9 +81,9 @@
      # 13/02/07 - Siggi - hpmuk releated code removed
      # 01/03/07 - Siggi - adjustments for RIAM machines gate and NEC-SX8 (n-sx)
+     # 12/04/07 - Siggi - option -f (filetransfer protocol) removed, scp only
 
 
     # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
  delete_dayfile=false 
- filetransfer_protocol=scp
  locat=normal
  no_default_queue=none
@@ -180,5 +180,5 @@
 
     # PROZEDUROPTIONEN EINLESEN
- while  getopts  :c:dDf:h:m:n:N:O:q:t:T:u:vX:  option
+ while  getopts  :c:dDh:m:n:N:O:q:t:T:u:vX:  option
  do
    case  $option  in
@@ -186,5 +186,4 @@
        (d)   delete_dayfile=true;;
        (D)   no_submit=true;;
-       (f)   filetransfer_protocol=$OPTARG;;
        (h)   remote_host=$OPTARG;;
        (m)   memory=$OPTARG;;
@@ -218,5 +217,4 @@
     printf "\n        -d    no job-protocol will be created     ---"
     printf "\n        -D    only the job-file will be created   ---"
-    printf "\n        -f    filetransfer protocol               scp"
     printf "\n        -h    execution host, available hosts:    $remote_host"
     printf "\n              ibm, ibmb, ibmh, ibms, ibmy, lcmuk,"
@@ -897,42 +895,33 @@
     then
        [[ $verify = true ]]  &&  printf "\n >>> transfering job to \"$remote_host\"..."
-       if [[ $filetransfer_protocol = scp ]]
-       then
-          if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]    # ssh on ibms cannot handle "~/"
-          then
-             job_catalog_save=$job_catalog
-             job_catalog=job_queue
-          elif [[ $remote_host = nech ]]
-          then
-             job_catalog_save=$job_catalog
-             job_catalog=/hpf/b/${remote_user}/job_queue
-          fi
-          if [[ $local_host = decalpha ]]
-          then
-                # VERWENDUNG VON SCP AUF DECALPHA FRAGT FEHLERHAFTERWEISE
-                # PASSWORT AB
-             /bin/scp  $job_to_send  ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost
-          elif [[ $remote_host = nech ]]
-          then
-                # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ
-                # TRANSFERIERT WERDEN
-             scp  $job_to_send  ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost
-          else
-             scp  $job_to_send  ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost
-          fi
-          if [[ $? = 1 ]]
-          then
-             locat=scp; exit
-          fi
-          if [[ $remote_host = ibms ]]
-          then
-             job_catalog=$job_catalog_save
-          fi
+       if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]    # ssh on ibms cannot handle "~/"
+       then
+          job_catalog_save=$job_catalog
+          job_catalog=job_queue
+       elif [[ $remote_host = nech ]]
+       then
+          job_catalog_save=$job_catalog
+          job_catalog=/hpf/b/${remote_user}/job_queue
+       fi
+       if [[ $local_host = decalpha ]]
+       then
+             # VERWENDUNG VON SCP AUF DECALPHA FRAGT FEHLERHAFTERWEISE
+             # PASSWORT AB
+          /bin/scp  $job_to_send  ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost
+       elif [[ $remote_host = nech ]]
+       then
+             # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ
+             # TRANSFERIERT WERDEN
+          scp  $job_to_send  ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost
        else
-          ftpcopy -s -o  $remote_addres  $job_to_send  "$job_catalog"  $job_on_remhost
-          if [[ $? = 1 ]]
-          then
-             locat=ftpcopy; exit
-          fi
+          scp  $job_to_send  ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost
+       fi
+       if [[ $? = 1 ]]
+       then
+          locat=scp; exit
+       fi
+       if [[ $remote_host = ibms ]]
+       then
+          job_catalog=$job_catalog_save
        fi
        [[ $verify = true ]]  &&  printf "\n >>> finished\n"
@@ -948,71 +937,30 @@
     then
        [[ $verify = true ]]  &&  printf "\n >>> submitting job using \"qsub\"...\n"
-       if [[ $filetransfer_protocol = scp ]]
-       then
-          if [[ $remote_host != lctit ]]
-          then
-             ssh  $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
-          else
-                # TIT ERLAUBT NUR DIE AUSFÜHRUNG GANZ BESTIMMTER KOMMANDOS
-                # MIT SSH, DESHALB AUFRUF PER PIPE
-                # UEBERGANGSWEISE CHECK, OB N1GE ENVIRONMENT WIRKLICH VERFUEGBAR
-             print  "cd $job_catalog; chmod u+x $job_on_remhost"  |  ssh  $remote_addres  -l $remote_user  > /dev/null  2>&1 
-             echo "first try" > send_protocol
-             while [[ $(cat send_protocol | grep -c "Forwarding to N1GE") = 0 ]]
-             do
-                if [[ $(cat send_protocol | grep -c "first try") = 1 ]]
-                then
-                   printf "\n trying to submit job to TIT cluster..."
-                else
-                   printf "\n +++ failed ... trying to submit again ..."
-                fi
-                print  "cd $job_catalog; $submcom $job_on_remhost"  |  ssh  $remote_addres  -l $remote_user  >  send_protocol  2>&1 
-                cat send_protocol
-             done
-             sleep 10
-             print  "cd $job_catalog;  rm $job_on_remhost"  |  ssh  $remote_addres  -l $remote_user  > /dev/null  2>&1 
-             echo "$submcom  $job_on_remhost"
-             rm  send_protocol
-          fi
+       if [[ $remote_host != lctit ]]
+       then
+          ssh  $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
        else
-          if [[ $remote_host = ibms ]]
-          then
-             password=`cat ~/.netrc | grep $remote_addres | awk '{print $6}'`
-             echo "echo \"$remote_user\" "       >  telnet_script
-             echo "sleep 5"                      >> telnet_script
-             echo "echo \"$password\" "          >> telnet_script
-             echo "sleep 10"                     >> telnet_script
-             echo "echo \"\" "                   >> telnet_script
-             echo "sleep 2"                      >> telnet_script
-             echo "echo \"cd $job_catalog; $submcom $job_on_remhost; rm -rf $job_on_remhost\" " >> telnet_script
-             echo "sleep 10"                     >> telnet_script
-             echo "echo \"exit\" "               >> telnet_script
-
-             chmod  u+x  telnet_script
-             telnet_script  |  telnet $remote_addres  2>&1  |  grep "llsubmit:"
-             rm  telnet_script
-          elif [[ $remote_host = t3es ]]
-          then
-             password=`cat ~/.netrc | grep $remote_addres | awk '{print $6}'`
-             echo "printf \"$remote_user\\\n\" " >  telnet_script
-             echo "sleep 10"                     >> telnet_script
-             echo "printf \"$password\\\n\" "    >> telnet_script
-             echo "sleep 10"                     >> telnet_script
-             echo "printf \"\\\n\" "             >> telnet_script
-             echo "sleep 5"                      >> telnet_script
-             echo "printf \"\\\n\" "             >> telnet_script
-             echo "sleep 5"                      >> telnet_script
-             echo "printf \"cd $job_catalog; $submcom $job_on_remhost; rm -f $job_on_remhost\\\n\" " >> telnet_script
-             echo "sleep 10"                     >> telnet_script
-             echo "printf \"exit\\\n\" "         >> telnet_script
-
-             chmod  u+x  telnet_script
-             cat telnet_script
-             telnet_script | telnet $remote_addres  |  grep $remote_user
-             rm  telnet_script
-          else
-             remcom.x  $remote_addres  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
-          fi
-       fi
+             # TIT ERLAUBT NUR DIE AUSFÜHRUNG GANZ BESTIMMTER KOMMANDOS
+             # MIT SSH, DESHALB AUFRUF PER PIPE
+             # UEBERGANGSWEISE CHECK, OB N1GE ENVIRONMENT WIRKLICH VERFUEGBAR
+          print  "cd $job_catalog; chmod u+x $job_on_remhost"  |  ssh  $remote_addres  -l $remote_user  > /dev/null  2>&1 
+          echo "first try" > send_protocol
+          while [[ $(cat send_protocol | grep -c "Forwarding to N1GE") = 0 ]]
+          do
+             if [[ $(cat send_protocol | grep -c "first try") = 1 ]]
+             then
+                printf "\n trying to submit job to TIT cluster..."
+             else
+                printf "\n +++ failed ... trying to submit again ..."
+             fi
+             print  "cd $job_catalog; $submcom $job_on_remhost"  |  ssh  $remote_addres  -l $remote_user  >  send_protocol  2>&1 
+             cat send_protocol
+          done
+          sleep 10
+          print  "cd $job_catalog;  rm $job_on_remhost"  |  ssh  $remote_addres  -l $remote_user  > /dev/null  2>&1 
+          echo "$submcom  $job_on_remhost"
+          rm  send_protocol
+       fi
+
        [[ $verify = true ]]  &&  printf " >>> o.k.\n"
     else
Index: /palm/trunk/SOURCE/CURRENT_MODIFICATIONS
===================================================================
--- /palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 81)
+++ /palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 82)
@@ -5,5 +5,20 @@
 Changed:
 -------
+All system relevant compile and link options as well as the host identifier (local_host) are specified in the configuration file.
 
+Filetransfer by ftp removed (options -f removed from mrun and mbuild).
+
+Call of (system-)FLUSH routine moved to new routine local_flush.
+
+return_addres and return_username are read from ENVPAR-NAMELIST-file.
+
+Preprocessor strings for different linux clusters changed to "lc", some preprocessor directives renamed (new: __intel_openmp_bug), preprocessor directives for old systems removed
+
+advec_particles, check_open, cpu_log, cpu_statistics, data_output_dvrp, flow_statistics, header, init_dvrp, init_particles, init_1d_model, init_dvrp, init_pegrid, local_getenv, local_system, local_tremain, local_tremain_ini, modules, run_control
+
+new:
+local_flush
+
+mbuild, mrun
 
 Errors:
Index: /palm/trunk/SOURCE/Makefile
===================================================================
--- /palm/trunk/SOURCE/Makefile	(revision 81)
+++ /palm/trunk/SOURCE/Makefile	(revision 82)
@@ -4,5 +4,5 @@
 # Actual revisions:
 # -----------------
-# 
+# +local_flush
 #
 # Former revisions:
@@ -51,5 +51,5 @@
 	init_particles.f90 init_pegrid.f90 init_pt_anomaly.f90 \
 	init_rankine.f90 init_slope.f90 interaction_droplets_ptq.f90 \
-	local_getenv.f90 local_stop.f90 local_system.f90 local_tremain.f90 \
+	local_flush.f90 local_getenv.f90 local_stop.f90 local_system.f90 local_tremain.f90 \
 	local_tremain_ini.f90 modules.f90 netcdf.f90 package_parin.f90 \
 	palm.f90 parin.f90 particle_boundary_conds.f90 poisfft.f90 \
@@ -81,5 +81,5 @@
 	init_dvrp.o init_grid.o init_particles.o init_pegrid.o \
 	init_pt_anomaly.o init_rankine.o init_slope.o \
-	interaction_droplets_ptq.o local_getenv.o local_stop.o \
+	interaction_droplets_ptq.o local_flush.o local_getenv.o local_stop.o \
 	local_system.o local_tremain.o local_tremain_ini.o modules.o netcdf.o \
 	package_parin.o palm.o parin.o particle_boundary_conds.o poisfft.o \
Index: /palm/trunk/SOURCE/advec_particles.f90
===================================================================
--- /palm/trunk/SOURCE/advec_particles.f90	(revision 81)
+++ /palm/trunk/SOURCE/advec_particles.f90	(revision 82)
@@ -117,5 +117,5 @@
 !       WRITE (9,*) '--- advec_particles: #1'
 !       WRITE (9,*) '    #of p=',number_of_particles,' #of t=',number_of_tails
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !    ENDIF
 !
@@ -165,5 +165,5 @@
 
 !    WRITE ( 9, * ) '*** advec_particles: ##0.3'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    nd = 0
 !    DO  n = 1, number_of_particles
@@ -172,5 +172,5 @@
 !    IF ( nd /= deleted_particles ) THEN
 !       WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !       CALL MPI_ABORT( comm2d, 9999, ierr )
 !    ENDIF
@@ -1872,5 +1872,5 @@
 
 !    WRITE ( 9, * ) '*** advec_particles: ##0.4'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    nd = 0
 !    DO  n = 1, number_of_particles
@@ -1879,5 +1879,5 @@
 !    IF ( nd /= deleted_particles ) THEN
 !       WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !       CALL MPI_ABORT( comm2d, 9999, ierr )
 !    ENDIF
@@ -1904,8 +1904,8 @@
              ELSE
 !    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory dt_prel'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                 CALL allocate_prt_memory( number_of_initial_particles )
 !    WRITE ( 9, * ) '*** advec_particles: after allocate_prt_memory dt_prel'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
              ENDIF
           ENDIF
@@ -1928,8 +1928,8 @@
                 ELSE
 !    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory dt_prel'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                    CALL allocate_tail_memory( number_of_initial_tails )
 !    WRITE ( 9, * ) '*** advec_particles: after allocate_tail_memory dt_prel'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                 ENDIF
              ENDIF
@@ -2008,5 +2008,5 @@
              ENDIF
 !    WRITE ( 9, * ) '*** advec_particles: after setting the beginning of new tails'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 
              number_of_particles = number_of_particles + &
@@ -2017,5 +2017,5 @@
 
 !    WRITE ( 9, * ) '*** advec_particles: ##0.5'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    nd = 0
 !    DO  n = 1, number_of_particles
@@ -2024,5 +2024,5 @@
 !    IF ( nd /= deleted_particles ) THEN
 !       WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !       CALL MPI_ABORT( comm2d, 9999, ierr )
 !    ENDIF
@@ -2031,5 +2031,5 @@
 !       WRITE (9,*) '--- advec_particles: #2'
 !       WRITE (9,*) '    #of p=',number_of_particles,' #of t=',number_of_tails
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !    ENDIF
 !    DO  n = 1, number_of_particles
@@ -2038,5 +2038,5 @@
 !          WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')'
 !          WRITE (9,*) '    id=',particles(n)%tail_id,' of (',number_of_tails,')'
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -2103,5 +2103,5 @@
 
 !    WRITE ( 9, * ) '*** advec_particles: ##1'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    nd = 0
 !    DO  n = 1, number_of_particles
@@ -2111,5 +2111,5 @@
 !          WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')'
 !          WRITE (9,*) '    id=',particles(n)%tail_id,' of (',number_of_tails,')'
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -2117,5 +2117,5 @@
 !    IF ( nd /= deleted_particles ) THEN
 !       WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !       CALL MPI_ABORT( comm2d, 9999, ierr )
 !    ENDIF
@@ -2274,5 +2274,5 @@
 
 !    WRITE ( 9, * ) '*** advec_particles: ##2'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    nd = 0
 !    DO  n = 1, number_of_particles
@@ -2282,5 +2282,5 @@
 !          WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')'
 !          WRITE (9,*) '    id=',particles(n)%tail_id,' of (',number_of_tails,')'
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -2288,5 +2288,5 @@
 !    IF ( nd /= deleted_particles ) THEN
 !       WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !       CALL MPI_ABORT( comm2d, 9999, ierr )
 !    ENDIF
@@ -2313,8 +2313,8 @@
              ELSE
 !    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trrp'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                 CALL allocate_prt_memory( trrp_count_recv )
 !    WRITE ( 9, * ) '*** advec_particles: after allocate_prt_memory trrp'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
              ENDIF
           ENDIF
@@ -2341,8 +2341,8 @@
                 ELSE
 !    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trrpt'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                    CALL allocate_tail_memory( trrpt_count_recv )
 !    WRITE ( 9, * ) '*** advec_particles: after allocate_tail_memory trrpt'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                 ENDIF
              ENDIF
@@ -2370,5 +2370,5 @@
 !          WRITE (9,*) '--- advec_particles: #3'
 !          WRITE (9,*) '    #of p=',number_of_particles,' #of t=',number_of_tails
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !       ENDIF
 
@@ -2390,8 +2390,8 @@
              ELSE
 !    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trlp'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                 CALL allocate_prt_memory( trlp_count_recv )
 !    WRITE ( 9, * ) '*** advec_particles: after allocate_prt_memory trlp'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
              ENDIF
           ENDIF
@@ -2418,8 +2418,8 @@
                 ELSE
 !    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trlpt'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                    CALL allocate_tail_memory( trlpt_count_recv )
 !    WRITE ( 9, * ) '*** advec_particles: after allocate_tail_memory trlpt'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                 ENDIF
              ENDIF
@@ -2447,5 +2447,5 @@
 !          WRITE (9,*) '--- advec_particles: #4'
 !          WRITE (9,*) '    #of p=',number_of_particles,' #of t=',number_of_tails
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !       ENDIF
 
@@ -2460,5 +2460,5 @@
 
 !    WRITE ( 9, * ) '*** advec_particles: ##3'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    nd = 0
 !    DO  n = 1, number_of_particles
@@ -2468,5 +2468,5 @@
 !          WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')'
 !          WRITE (9,*) '    id=',particles(n)%tail_id,' of (',number_of_tails,')'
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -2474,5 +2474,5 @@
 !    IF ( nd /= deleted_particles ) THEN
 !       WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !       CALL MPI_ABORT( comm2d, 9999, ierr )
 !    ENDIF
@@ -2538,5 +2538,5 @@
 
 !    WRITE ( 9, * ) '*** advec_particles: ##4'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    nd = 0
 !    DO  n = 1, number_of_particles
@@ -2546,5 +2546,5 @@
 !          WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')'
 !          WRITE (9,*) '    id=',particles(n)%tail_id,' of (',number_of_tails,')'
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -2552,5 +2552,5 @@
 !    IF ( nd /= deleted_particles ) THEN
 !       WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !       CALL MPI_ABORT( comm2d, 9999, ierr )
 !    ENDIF
@@ -2715,5 +2715,5 @@
 
 !    WRITE ( 9, * ) '*** advec_particles: ##5'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    nd = 0
 !    DO  n = 1, number_of_particles
@@ -2723,5 +2723,5 @@
 !          WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')'
 !          WRITE (9,*) '    id=',particles(n)%tail_id,' of (',number_of_tails,')'
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -2729,5 +2729,5 @@
 !    IF ( nd /= deleted_particles ) THEN
 !       WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !       CALL MPI_ABORT( comm2d, 9999, ierr )
 !    ENDIF
@@ -2754,8 +2754,8 @@
              ELSE
 !    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trnp'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                 CALL allocate_prt_memory( trnp_count_recv )
 !    WRITE ( 9, * ) '*** advec_particles: after allocate_prt_memory trnp'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
              ENDIF
           ENDIF
@@ -2782,8 +2782,8 @@
                 ELSE
 !    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trnpt'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                    CALL allocate_tail_memory( trnpt_count_recv )
 !    WRITE ( 9, * ) '*** advec_particles: after allocate_tail_memory trnpt'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                 ENDIF
              ENDIF
@@ -2811,5 +2811,5 @@
 !          WRITE (9,*) '--- advec_particles: #5'
 !          WRITE (9,*) '    #of p=',number_of_particles,' #of t=',number_of_tails
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !       ENDIF
 
@@ -2831,8 +2831,8 @@
              ELSE
 !    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trsp'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                 CALL allocate_prt_memory( trsp_count_recv )
 !    WRITE ( 9, * ) '*** advec_particles: after allocate_prt_memory trsp'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
              ENDIF
           ENDIF
@@ -2859,8 +2859,8 @@
                 ELSE
 !    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trspt'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                    CALL allocate_tail_memory( trspt_count_recv )
 !    WRITE ( 9, * ) '*** advec_particles: after allocate_tail_memory trspt'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
                 ENDIF
              ENDIF
@@ -2888,5 +2888,5 @@
 !          WRITE (9,*) '--- advec_particles: #6'
 !          WRITE (9,*) '    #of p=',number_of_particles,' #of t=',number_of_tails
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !       ENDIF
 
@@ -2901,5 +2901,5 @@
 
 !    WRITE ( 9, * ) '*** advec_particles: ##6'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    nd = 0
 !    DO  n = 1, number_of_particles
@@ -2909,5 +2909,5 @@
 !          WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')'
 !          WRITE (9,*) '    id=',particles(n)%tail_id,' of (',number_of_tails,')'
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -2915,5 +2915,5 @@
 !    IF ( nd /= deleted_particles ) THEN
 !       WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !       CALL MPI_ABORT( comm2d, 9999, ierr )
 !    ENDIF
@@ -3133,5 +3133,5 @@
 
 !    WRITE ( 9, * ) '*** advec_particles: ##7'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    nd = 0
 !    DO  n = 1, number_of_particles
@@ -3141,5 +3141,5 @@
 !          WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')'
 !          WRITE (9,*) '    id=',particles(n)%tail_id,' of (',number_of_tails,')'
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -3147,5 +3147,5 @@
 !    IF ( nd /= deleted_particles ) THEN
 !       WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !       CALL MPI_ABORT( comm2d, 9999, ierr )
 !    ENDIF
@@ -3167,5 +3167,5 @@
 !       IF ( nd /= deleted_particles ) THEN
 !          WRITE (9,*) '*** advec_part nd=',nd,' deleted_particles=',deleted_particles
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -3189,5 +3189,5 @@
 !                WRITE (9,*) '+++ n=',n,' (of ',number_of_tails,' #oftails)'
 !                WRITE (9,*) '    id=',new_tail_id(n)
-!                CALL FLUSH_( 9 )
+!                CALL local_flush( 9 )
                 ENDIF
              ENDDO
@@ -3196,5 +3196,5 @@
 !       IF ( nd /= deleted_tails  .AND.  use_particle_tails ) THEN
 !          WRITE (9,*) '*** advec_part nd=',nd,' deleted_tails=',deleted_tails
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -3211,5 +3211,5 @@
 !        WRITE (9,*) '    new_tail_id=', new_tail_id(particles(n)%tail_id), &
 !                         ' of (',number_of_tails,')'
-!        CALL FLUSH_( 9 )
+!        CALL local_flush( 9 )
 !     ENDIF
                 particles(n)%tail_id = new_tail_id(particles(n)%tail_id)
@@ -3219,5 +3219,5 @@
 !     IF ( nn /= number_of_tails  .AND.  use_particle_tails ) THEN
 !        WRITE (9,*) '*** advec_part #of_tails=',number_of_tails,' nn=',nn
-!        CALL FLUSH_( 9 )
+!        CALL local_flush( 9 )
 !        DO  n = 1, number_of_particles
 !           WRITE (9,*) 'prt# ',n,' tail_id=',particles(n)%tail_id, &
@@ -3233,8 +3233,8 @@
 !       WRITE (9,*) '--- advec_particles: #7'
 !       WRITE (9,*) '    #of p=',number_of_particles,' #of t=',number_of_tails
-!       CALL FLUSH_( 9 )
+!       CALL local_flush( 9 )
 !    ENDIF
 !    WRITE ( 9, * ) '*** advec_particles: ##8'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    DO  n = 1, number_of_particles
 !       IF ( particles(n)%tail_id<0 .OR. particles(n)%tail_id>number_of_tails ) &
@@ -3242,5 +3242,5 @@
 !          WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')'
 !          WRITE (9,*) '    id=',particles(n)%tail_id,' of (',number_of_tails,')'
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -3252,5 +3252,5 @@
 
 !    WRITE ( 9, * ) '*** advec_particles: ##9'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    DO  n = 1, number_of_particles
 !       IF ( particles(n)%tail_id<0 .OR. particles(n)%tail_id>number_of_tails ) &
@@ -3258,5 +3258,5 @@
 !          WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')'
 !          WRITE (9,*) '    id=',particles(n)%tail_id,' of (',number_of_tails,')'
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -3341,5 +3341,5 @@
     CALL user_particle_attributes
 !    WRITE ( 9, * ) '*** advec_particles: ##10'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 !    DO  n = 1, number_of_particles
 !       IF ( particles(n)%tail_id<0 .OR. particles(n)%tail_id>number_of_tails ) &
@@ -3347,5 +3347,5 @@
 !          WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')'
 !          WRITE (9,*) '    id=',particles(n)%tail_id,' of (',number_of_tails,')'
-!          CALL FLUSH_( 9 )
+!          CALL local_flush( 9 )
 !          CALL MPI_ABORT( comm2d, 9999, ierr )
 !       ENDIF
@@ -3366,5 +3366,5 @@
 !--          next tailpoint
 !             WRITE ( 9, * ) '*** advec_particles: ##10.1  nn=',nn
-!             CALL FLUSH_( 9 )
+!             CALL local_flush( 9 )
              IF ( minimum_tailpoint_distance /= 0.0 )  THEN
                 distance = ( particle_tail_coordinates(1,1,nn) -      &
@@ -3376,5 +3376,5 @@
              ENDIF
 !             WRITE ( 9, * ) '*** advec_particles: ##10.2'
-!             CALL FLUSH_( 9 )
+!             CALL local_flush( 9 )
 !
 !--          First, increase the index of all existings tailpoints by one
@@ -3395,5 +3395,5 @@
              ENDIF
 !             WRITE ( 9, * ) '*** advec_particles: ##10.3'
-!             CALL FLUSH_( 9 )
+!             CALL local_flush( 9 )
 !
 !--          In any case, store the new point at the beginning of the tail
@@ -3403,5 +3403,5 @@
              particle_tail_coordinates(1,4,nn) = particles(n)%color
 !             WRITE ( 9, * ) '*** advec_particles: ##10.4'
-!             CALL FLUSH_( 9 )
+!             CALL local_flush( 9 )
 !
 !--          Increase the age of the tailpoints
@@ -3418,5 +3418,5 @@
              ENDIF
 !             WRITE ( 9, * ) '*** advec_particles: ##10.5'
-!             CALL FLUSH_( 9 )
+!             CALL local_flush( 9 )
 
           ENDIF
@@ -3426,5 +3426,5 @@
     ENDIF
 !    WRITE ( 9, * ) '*** advec_particles: ##11'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 
 !
@@ -3533,5 +3533,5 @@
     ENDIF
     WRITE (9,*) '*** Request: ',new_maximum_number,' new_maximum_number(tails)'
-!    CALL FLUSH_( 9 )
+!    CALL local_flush( 9 )
 
     tmp_tail(:,:,1:number_of_tails)  = &
Index: /palm/trunk/SOURCE/check_open.f90
===================================================================
--- /palm/trunk/SOURCE/check_open.f90	(revision 81)
+++ /palm/trunk/SOURCE/check_open.f90	(revision 82)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Call of local_getenv removed, preprocessor directives for old systems removed
 !
 ! Former revisions:
@@ -42,5 +42,5 @@
 
     CHARACTER (LEN=2)   ::  suffix
-    CHARACTER (LEN=20)  ::  return_addres, return_usern, xtext = 'time in s'
+    CHARACTER (LEN=20)  ::  xtext = 'time in s'
     CHARACTER (LEN=30)  ::  filename
     CHARACTER (LEN=40)  ::  avs_coor_file, avs_coor_file_localname, &
@@ -151,9 +151,4 @@
                         STATUS='OLD' )
           ELSE
-#if defined( __t3eh ) || defined( __t3eb ) || defined( __t3ej5 )
-!
-!--          Declare a cache layer for faster I/O
-             CALL ASNUNIT ( 13, '-F cachea:512:1:1', ierr1 )
-#endif
              OPEN ( 13, FILE='BININ/'//myid_char, FORM='UNFORMATTED', &
                         STATUS='OLD' )
@@ -174,9 +169,4 @@
 !--          directory created by PE0 can open their file
              CALL MPI_BARRIER( comm2d, ierr )
-#endif
-#if defined( __t3eh ) || defined( __t3eb ) || defined( __t3ej5 )
-!
-!--          Declare a cache layer for faster I/O
-             CALL ASNUNIT ( 14, '-F cachea:512:1:1', ierr1 )
 #endif
              OPEN ( 14, FILE='BINOUT/'//myid_char_14, FORM='UNFORMATTED', &
@@ -342,13 +332,4 @@
        CASE ( 30 )
 
-
-#if defined( __t3eb ) || defined( __t3eh ) || defined( __t3ej5 )
-!
-!--       In case of active data compression 32Bit integer output
-          IF ( do3d_compress )  THEN
-             CALL ASNUNIT( 30, '-F f77 -N ieee_32', ierr1 )
-          ENDIF
-#endif
-
           OPEN ( 30, FILE='PLOT3D_DATA'//myid_char, FORM='UNFORMATTED' )
 !
@@ -369,6 +350,6 @@
 !--          Therefore path information has to be obtained first.
              IF ( avs_output )  THEN
-                CALL local_getenv( 'return_addres', 13, return_addres, iaddres )
-                CALL local_getenv( 'return_username', 15, return_usern, iusern )
+                iaddres = LEN_TRIM( return_addres )
+                iusern  = LEN_TRIM( return_username )
 
                 OPEN ( 3, FILE='OUTPUT_FILE_CONNECTIONS', FORM='FORMATTED' )
@@ -433,5 +414,5 @@
 !--                   really transferred.
                       command = TRIM( batch_scp ) // ' -n -u ' // &
-                         return_usern(1:iusern) // ' ' // &
+                         return_username(1:iusern) // ' ' // &
                          return_addres(1:iaddres) // ' /etc/passwd "' // &
                          TRIM( avs_coor_file_catalog ) // '" ' // &
@@ -445,5 +426,5 @@
 !--                   Determine the data file name
                       command = TRIM( batch_scp ) // ' -n -u ' // &
-                         return_usern(1:iusern) // ' ' // &
+                         return_username(1:iusern) // ' ' // &
                          return_addres(1:iaddres) // ' /etc/passwd "' // &
                          TRIM( avs_data_file_catalog ) // '" ' // &
Index: /palm/trunk/SOURCE/cpu_log.f90
===================================================================
--- /palm/trunk/SOURCE/cpu_log.f90	(revision 81)
+++ /palm/trunk/SOURCE/cpu_log.f90	(revision 82)
@@ -4,5 +4,6 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Preprocessor strings for different linux clusters changed to "lc",
+! preprocessor directives for old systems removed
 !
 ! Former revisions:
@@ -34,10 +35,8 @@
     TYPE(logpoint)              ::  log_event
 
-#if defined( __lcmuk ) || defined( __lctit ) || defined( __hpmuk ) || defined( __decalpha ) || defined( __nec )
+#if defined( __lc ) || defined( __decalpha ) || defined( __nec )
     INTEGER                     ::  count, count_rate
 #elif defined( __ibm )
     INTEGER(8)                  ::  IRTC
-#elif defined( __t3eb )
-    REAL                        ::  TIMEF
 #endif
 
@@ -57,20 +56,9 @@
 !
 !-- Take current time
-#if defined( __lcmuk ) || defined( __lctit ) || defined( __hpmuk ) || defined( __decalpha ) || defined( __nec )
+#if defined( __lc ) || defined( __decalpha ) || defined( __nec )
     CALL SYSTEM_CLOCK( count, count_rate )
     mtime = REAL( count ) / REAL( count_rate )
 #elif defined( __ibm )
     mtime = IRTC( ) * 1E-9
-!#elif defined( __vpp )
-!    CALL CLOCKV ( mtimevec, mtime, 0, 2 )
-#elif defined( __t3eb ) || defined( __t3eh ) || defined( __t3ej2 ) || defined( __t3ej5 )
-#if defined( __parallel )
-    IF ( .NOT. PRESENT( barrierwait ) )  THEN
-       CALL MPI_BARRIER( comm2d, ierr )
-       CONTINUE
-    ENDIF
-#endif
-    mtime = TIMEF( )
-    mtime = mtime * 0.001
 #else
     IF ( myid == 0 )  THEN
Index: /palm/trunk/SOURCE/cpu_statistics.f90
===================================================================
--- /palm/trunk/SOURCE/cpu_statistics.f90	(revision 81)
+++ /palm/trunk/SOURCE/cpu_statistics.f90	(revision 82)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Preprocessor directives for old systems removed
 !
 ! Former revisions:
@@ -37,8 +37,4 @@
     REAL, DIMENSION(:,:), ALLOCATABLE ::  pe_log_points
 
-
-!#if defined( __hpmuk )  &&  ! defined( __chinook )
-!    norm = clock_ticks_per_second()
-!#endif
 
 !
Index: /palm/trunk/SOURCE/data_output_dvrp.f90
===================================================================
--- /palm/trunk/SOURCE/data_output_dvrp.f90	(revision 81)
+++ /palm/trunk/SOURCE/data_output_dvrp.f90	(revision 82)
@@ -32,4 +32,6 @@
 ! Actual revisions:
 ! -----------------
+! Preprocessor strings for different linux clusters changed to "lc",
+! routine local_flush is used for buffer flushing
 ! TEST: write statements
 !
@@ -84,9 +86,5 @@
 
     WRITE ( 9, * ) '*** myid=', myid, ' Anfang data_output_dvrp'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
     CALL cpu_log( log_point(27), 'data_output_dvrp', 'start' )
 
@@ -104,16 +102,8 @@
           lock_steering_update = .TRUE.
     WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: vor steering_update'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
           CALL DVRP_STEERING_UPDATE( m-1, data_output_dvrp )
     WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: nach steering_update'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
           lock_steering_update = .FALSE.
        ENDIF
@@ -150,9 +140,5 @@
 
     WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: anfang particles'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 !
 !--       DVRP-Calls for plotting particles:
@@ -183,9 +169,5 @@
              WRITE (9,*) '--- before ALLOCATE  simtime=',simulated_time,' #of_tails=', number_of_tails, &
                            ' max#of_tp=', maximum_number_of_tailpoints
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
              ALLOCATE( psize(number_of_tails), p_t(number_of_tails),      &
                        p_c(number_of_tails*maximum_number_of_tailpoints), &
@@ -194,9 +176,5 @@
                        p_z(number_of_tails*maximum_number_of_tailpoints) )
              WRITE (9,*) '--- after ALLOCATE'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
              psize = 0.0;  p_t = 0;  p_c = 0.0;  p_x = 0.0;  p_y = 0.0
              p_z   = 0.0;
@@ -209,9 +187,5 @@
                    IF ( simulated_time > 1338.0 )  THEN
                       WRITE (9,*) '--- particle ',n,' tail_id=',nn,' #of_tp=',particles(n)%tailpoints
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
                    ENDIF
                    DO  j = 1, particles(n)%tailpoints
@@ -227,9 +201,5 @@
                          WRITE (9,*) '--- tp= ',i,' x=',p_x(i),' y=',p_y(i), &
                                                  ' z=',p_z(i),' c=',p_c(i)
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
                       ENDIF
                    ENDDO
@@ -238,18 +208,10 @@
                    IF ( simulated_time > 1338.0 )  THEN
                       WRITE (9,*) '--- t= ',k,' psize=',psize(k),' p_t=',p_t(k)
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
                    ENDIF
                 ENDIF                
              ENDDO
              WRITE (9,*) '--- after locally storing the particle attributes'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
           ENDIF
 
@@ -275,9 +237,5 @@
              ELSE
                 WRITE (9,*) '--- before DVRP_PARTICLES'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
                 CALL DVRP_PARTICLES( m-1, number_of_tails, p_x, p_y, p_z, 15, &
                                      psize, p_c, p_t )
@@ -292,9 +250,5 @@
                 WRITE (9,*) 'p_t =', p_t
 
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
              ENDIF
           ENDIF
@@ -302,9 +256,5 @@
           CALL DVRP_VISUALIZE( m-1, 3, dvrp_filecount )
     WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: ende particles'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
           DEALLOCATE( psize, p_c, p_t, p_x, p_y, p_z )
@@ -456,9 +406,5 @@
 
     WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: anfang isosurface'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 !
 !--          DVRP-Calls for plotting isosurfaces:
@@ -481,9 +427,5 @@
              CALL DVRP_VISUALIZE( m-1, 1, dvrp_filecount )
     WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: ende isosurface'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
              CALL cpu_log( log_point_s(26), 'dvrp_isosurface', 'stop' )
@@ -492,9 +434,5 @@
 
     WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: anfang slicer'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 !
 !--          DVRP-Calls for plotting slicers:
@@ -526,9 +464,5 @@
 
     WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: ende slicer'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
           ENDIF
 
@@ -545,9 +479,5 @@
     CALL cpu_log( log_point(27), 'data_output_dvrp', 'stop' )
     WRITE ( 9, * ) '*** myid=', myid, ' Ende data_output_dvrp'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
 #endif
Index: /palm/trunk/SOURCE/flow_statistics.f90
===================================================================
--- /palm/trunk/SOURCE/flow_statistics.f90	(revision 81)
+++ /palm/trunk/SOURCE/flow_statistics.f90	(revision 82)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Cpp-directive lcmuk changed to intel_openmp_bug
 !
 ! Former revisions:
@@ -98,5 +98,5 @@
        tn = 0
        !$OMP PARALLEL PRIVATE( i, j, k, tn )
-#if defined( __lcmuk )
+#if defined( __intel_openmp_bug )
        tn = omp_get_thread_num()
 #else
@@ -260,5 +260,5 @@
 !--          rearranged according to the staggered grid.
        tn = 0
-#if defined( __lcmuk )
+#if defined( __intel_openmp_bug )
        !$OMP PARALLEL PRIVATE( i, j, k, pts, sums_ll, sums_l_eper, sums_l_etot, &
        !$OMP                    tn, ust, ust2, u2, vst, vst2, v2, w2 )
Index: /palm/trunk/SOURCE/header.f90
===================================================================
--- /palm/trunk/SOURCE/header.f90	(revision 81)
+++ /palm/trunk/SOURCE/header.f90	(revision 82)
@@ -4,5 +4,6 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Preprocessor strings for different linux clusters changed to "lc",
+! routine local_flush is used for buffer flushing
 !
 ! Former revisions:
@@ -1109,11 +1110,7 @@
     WRITE ( io, 99 )
 
-#if defined( __ibm )
 !
 !-- Write buffer contents to disc immediately
-    CALL FLUSH_( io )
-#elif defined( __lcmuk )  ||  defined( __nec )
-    CALL FLUSH( io )
-#endif
+    CALL local_flush( io )
 
 !
Index: /palm/trunk/SOURCE/init_1d_model.f90
===================================================================
--- /palm/trunk/SOURCE/init_1d_model.f90	(revision 81)
+++ /palm/trunk/SOURCE/init_1d_model.f90	(revision 82)
@@ -4,5 +4,6 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Preprocessor strings for different linux clusters changed to "lc",
+! routine local_flush is used for buffer flushing
 !
 ! Former revisions:
@@ -770,11 +771,7 @@
        WRITE ( 15, 101 )  current_timestep_number_1d, simulated_time_chr, &
                           dt_1d, umax, vmax, us1d, alpha, energy
-#if defined( __ibm )
 !
 !--    Write buffer contents to disc immediately
-       CALL FLUSH_( 15 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-       CALL FLUSH( 15 )
-#endif
+       CALL local_flush( 15 )
 
     ENDIF
@@ -955,11 +952,7 @@
        WRITE ( 17, 101 )
 
-#if defined( __ibm )
 !
 !--    Write buffer contents to disc immediately
-       CALL FLUSH_( 17 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-       CALL FLUSH( 17 )
-#endif
+       CALL local_flush( 17 )
 
     ENDIF
Index: /palm/trunk/SOURCE/init_dvrp.f90
===================================================================
--- /palm/trunk/SOURCE/init_dvrp.f90	(revision 81)
+++ /palm/trunk/SOURCE/init_dvrp.f90	(revision 82)
@@ -3,5 +3,7 @@
 !------------------------------------------------------------------------------!
 ! Actual revisions:
-! ----------------- 
+! -----------------
+! Preprocessor strings for different linux clusters changed to "lc",
+! routine local_flush is used for buffer flushing
 ! Test output of isosurface on camera file
 ! TEST: print* statements
@@ -145,9 +147,5 @@
 
     WRITE ( 9, * ) '***  vor dvrp_output_rtsp'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
              dvrp_file   = TRIM( mode_dvrp(m) ) // '/camera.dvr'
@@ -157,9 +155,5 @@
                                     dvrp_file_c )
     WRITE ( 9, * ) '***  nach dvrp_output_rtsp'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
           ELSEIF ( dvrp_output == 'ftp' )  THEN
@@ -185,9 +179,5 @@
           CALL DVRP_CAMERA( m-1, center, distance )
     WRITE ( 9, * ) '***  #1'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
 !
@@ -202,9 +192,5 @@
           CALL DVRP_EXIT( m-1 )
     WRITE ( 9, * ) '***  #2'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
 
@@ -223,9 +209,5 @@
                                     dvrp_file_c )
     WRITE ( 9, * ) '***  #3'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
           ELSEIF ( dvrp_output == 'ftp' )  THEN
@@ -274,9 +256,5 @@
           CALL DVRP_MATERIAL_RGB( m-1, 1, 0.8, 0.7, 0.6, 0.0 )
     WRITE ( 9, * ) '***  #4'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
 !
@@ -292,31 +270,15 @@
           ENDDO
     WRITE ( 9, * ) '***  #4.1'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
           CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, &
                           cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
     WRITE ( 9, * ) '***  #4.2'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
           CALL DVRP_THRESHOLD( m-1, 1.0 )
     WRITE ( 9, * ) '***  #4.3'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
           CALL DVRP_VISUALIZE( m-1, 1, 0 )
     WRITE ( 9, * ) '***  #4.4'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
           DEALLOCATE( local_pf )
@@ -324,9 +286,5 @@
           CALL DVRP_EXIT( m-1 )
     WRITE ( 9, * ) '***  #5'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
 !
@@ -344,9 +302,5 @@
                                     dvrp_file_c )
     WRITE ( 9, * ) '***  #6'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
           ELSEIF ( dvrp_output == 'ftp' )  THEN
@@ -395,9 +349,5 @@
           CALL DVRP_MATERIAL_RGB( m-1, 1, 0.0, 0.6, 0.0, 0.0 )
     WRITE ( 9, * ) '***  #7'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
 !
@@ -416,9 +366,5 @@
           CALL DVRP_EXIT( m-1 )
     WRITE ( 9, * ) '***  #8'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
     
@@ -461,17 +407,9 @@
                 name_c = TRIM( do3d(0,vn) )
     WRITE ( 9, * ) '***  #9'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
                 CALL DVRP_STEERING_INIT( m-1, name_c, steering_dvrp(pn)%min, &
                                          steering_dvrp(pn)%max, threshold(tv) )
     WRITE ( 9, * ) '***  #10'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
              ELSEIF ( mode_dvrp(pn)(1:6) == 'slicer' )  THEN
@@ -517,9 +455,5 @@
 
     WRITE ( 9, * ) '***  #11'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
           dvrp_file = TRIM( mode_dvrp(m) ) // '/*****.dvr'
@@ -529,9 +463,5 @@
                                  dvrp_file_c )
     WRITE ( 9, * ) '***  #12'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
        ELSEIF ( dvrp_output == 'ftp' )  THEN
@@ -585,18 +515,10 @@
 !--    Define the grid used by dvrp
     WRITE ( 9, * ) '***  #13'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
        CALL DVRP_GRID( m-1, nx_dvrp, ny_dvrp, nz_dvrp, xcoor_dvrp, ycoor_dvrp, &
                        zcoor_dvrp )
     WRITE ( 9, * ) '***  #14'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
 
@@ -631,46 +553,22 @@
 !-- Initialize logging of calls by DVRP graphic software
     WRITE ( 9, * ) '*** myid=', myid, ' vor DVRP_LOG_INIT'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
     CALL DVRP_LOG_INIT( 'DVRP_LOG' // CHAR( 0 ), 0 )
     WRITE ( 9, * ) '*** myid=', myid, ' nach DVRP_LOG_INIT'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
 !
 !-- User-defined logging events: #1 (total time needed by PALM)
     WRITE ( 9, * ) '*** myid=', myid, ' vor DVRP_LOG_SYMBOL'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
     CALL DVRP_LOG_SYMBOL( 1, 'PALM_total' // CHAR( 0 ) )
     WRITE ( 9, * ) '*** myid=', myid, ' nach DVRP_LOG_SYMBOL'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
     CALL DVRP_LOG_SYMBOL( 2, 'PALM_timestep' // CHAR( 0 ) )
     WRITE ( 9, * ) '*** myid=', myid, ' vor DVRP_LOG_EVENT'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
     CALL DVRP_LOG_EVENT( 1, 1 )
     WRITE ( 9, * ) '*** myid=', myid, ' nach DVRP_LOG_EVENT'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
 
 #if defined( __parallel )
@@ -681,16 +579,8 @@
        use_seperate_pe_for_dvrp_output = .TRUE.
     WRITE ( 9, * ) '*** myid=', myid, ' vor DVRP_SPLIT'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
        CALL DVRP_SPLIT( MPI_COMM_WORLD, comm_palm )
     WRITE ( 9, * ) '*** myid=', myid, ' nach DVRP_SPLIT'
-#if defined( __ibm )
-    CALL FLUSH_( 9 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-    CALL FLUSH( 9 )
-#endif
+    CALL local_flush( 9 )
        CALL MPI_COMM_SIZE( comm_palm, numprocs, ierr )
     ENDIF
Index: /palm/trunk/SOURCE/init_particles.f90
===================================================================
--- /palm/trunk/SOURCE/init_particles.f90	(revision 81)
+++ /palm/trunk/SOURCE/init_particles.f90	(revision 82)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Preprocessor directives for old systems removed
 !
 ! Former revisions:
@@ -59,13 +59,8 @@
 !
 !-- Define MPI derived datatype for FORTRAN datatype particle_type (see module
-!-- particle_attributes). Integer length is 4 byte, Real is 8 byte (=> total
-!-- length 100, nevertheless, 120 bytes are needed on T3E since integer seems
-!-- to be 8 bytes long there)
-    blocklengths(1)  = 19; blocklengths(2)  = 4; blocklengths(3)  =  1
-#if defined( __t3eb )
-    displacements(1) = 0; displacements(2) = 152; displacements(3) = 184
-#else
-    displacements(1) = 0; displacements(2) = 152; displacements(3) = 168
-#endif
+!-- particle_attributes). Integer length is 4 byte, Real is 8 byte
+    blocklengths(1)  = 19;  blocklengths(2)  =   4;  blocklengths(3)  =   1
+    displacements(1) =  0;  displacements(2) = 152;  displacements(3) = 168
+
     types(1) = MPI_REAL
     types(2) = MPI_INTEGER
Index: /palm/trunk/SOURCE/init_pegrid.f90
===================================================================
--- /palm/trunk/SOURCE/init_pegrid.f90	(revision 81)
+++ /palm/trunk/SOURCE/init_pegrid.f90	(revision 82)
@@ -4,5 +4,6 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Cpp-directive lcmuk changed to intel_openmp_bug, setting of host on lcmuk by
+! cpp-directive removed
 !
 ! Former revisions:
@@ -56,5 +57,5 @@
 !-- Get the number of OpenMP threads
     !$OMP PARALLEL
-#if defined( __lcmuk )
+#if defined( __intel_openmp_bug )
     threads_per_task = omp_get_num_threads()
 #else
@@ -72,7 +73,4 @@
 !--    Automatic determination of the topology
 !--    The default on SMP- and cluster-hosts is a 1d-decomposition along x
-#if defined( __lcmuk )
-       host = 'lcmuk'
-#endif
        IF ( host(1:3) == 'ibm'  .OR.  host(1:3) == 'nec'  .OR. &
             host(1:2) == 'lc'   .OR.  host(1:3) == 'dec' )  THEN
Index: /palm/trunk/SOURCE/local_flush.f90
===================================================================
--- /palm/trunk/SOURCE/local_flush.f90	(revision 82)
+++ /palm/trunk/SOURCE/local_flush.f90	(revision 82)
@@ -0,0 +1,27 @@
+ SUBROUTINE local_flush( file_id )
+
+!------------------------------------------------------------------------------!
+! Actual revisions:
+! -----------------
+! 
+!
+! Former revisions:
+! -----------------
+! $Id$
+! Initial revision (raasch 12/04/07)
+!
+!
+! Description:
+! ------------
+! Flush calls for different operating systems
+!------------------------------------------------------------------------------!
+
+    INTEGER ::  file_id
+
+#if defined( __ibm )
+    CALL FLUSH_( file_id )
+#elif defined( __lc )  ||  defined( __nec )
+    CALL FLUSH( file_id )
+#endif
+
+ END SUBROUTINE local_flush    
Index: /palm/trunk/SOURCE/local_getenv.f90
===================================================================
--- /palm/trunk/SOURCE/local_getenv.f90	(revision 81)
+++ /palm/trunk/SOURCE/local_getenv.f90	(revision 82)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Preprocessor directives for old systems removed
 !
 ! Former revisions:
@@ -29,18 +29,10 @@
     CHARACTER (LEN=*) ::  var, value
     INTEGER           ::  ivalue, ivar
-#if defined( __t3eb ) || defined( __t3eh ) || defined( __t3ej2 ) || defined( __t3ej5 )
-    INTEGER           ::  dummy
-#endif
 #if defined( __lcmuk )
     INTEGER            ::  i, ia(20)
 #endif
 
-#if defined( __t3eb ) || defined( __t3eh ) || defined( __t3ej2 ) || defined( __t3ej5 )
-    CALL PXFGETENV( var(1:ivar), ivar, value, ivalue, dummy )
-    IF ( ivalue == 0 )  value = ''
-#else
     CALL GETENV( var(1:ivar), value )
     ivalue = LEN_TRIM( value )
-#endif
 
 #if defined( __lcmuk )  &&  defined( __parallel )
Index: /palm/trunk/SOURCE/local_system.f90
===================================================================
--- /palm/trunk/SOURCE/local_system.f90	(revision 81)
+++ /palm/trunk/SOURCE/local_system.f90	(revision 82)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Preprocessor directives for old systems removed
 !
 ! Former revisions:
@@ -25,9 +25,5 @@
     CHARACTER (LEN=*) ::  command
 
-#if defined( __t3eb ) || defined( __t3eh ) || defined( __t3ej2 ) || defined( __t3ej5 )
-    CALL ISHELL( command )
-#else
     CALL SYSTEM( command )
-#endif
 
  END SUBROUTINE local_system    
Index: /palm/trunk/SOURCE/local_tremain.f90
===================================================================
--- /palm/trunk/SOURCE/local_tremain.f90	(revision 81)
+++ /palm/trunk/SOURCE/local_tremain.f90	(revision 82)
@@ -4,5 +4,6 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Preprocessor strings for different linux clusters changed to "lc",
+! preprocessor directives for old systems removed
 !
 ! Former revisions:
@@ -30,33 +31,19 @@
 
     REAL ::  remaining_time
-!#if defined( __vpp )
-!    REAL ::  cpu_time_used, rdum
-!#endif
 #if defined( __ibm )
     INTEGER(8) ::  IRTC
     REAL       ::  actual_wallclock_time
-#elif defined( __lctit )
+#elif defined( __lc )
     INTEGER    ::  count, count_rate
     REAL       ::  actual_wallclock_time
 #endif
 
-#if defined( __t3eh ) || defined( __t3eb ) || defined( __t3ej2 ) || defined( __t3ej5 )
+#if defined( __ibm )
 
-    CALL MPP_TREMAIN( remaining_time )
-
-!#elif defined( __vpp )
-!
-!    CALL CLOCKV( rdum, cpu_time_used, 0, 2 )
-!    remaining_time = maximum_cpu_time_allowed - cpu_time_used
-
-#elif defined( __ibm )
-
-!    CALL SYSTEM_CLOCK( count, count_rate )
-!    actual_wallclock_time = REAL( count ) / REAL( count_rate )
     actual_wallclock_time = IRTC( ) * 1E-9
     remaining_time = maximum_cpu_time_allowed - &
                      ( actual_wallclock_time - initial_wallclock_time )
 
-#elif defined( __lctit )
+#elif defined( __lc )
 
     CALL SYSTEM_CLOCK( count, count_rate )
Index: /palm/trunk/SOURCE/local_tremain_ini.f90
===================================================================
--- /palm/trunk/SOURCE/local_tremain_ini.f90	(revision 81)
+++ /palm/trunk/SOURCE/local_tremain_ini.f90	(revision 82)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Cpp-directive lctit renamed lc
 !
 ! Former revisions:
@@ -33,5 +33,5 @@
     INTEGER            ::  idum
     INTEGER(8)         ::  IRTC
-#elif defined( __lctit )
+#elif defined( __lc )
     CHARACTER (LEN=10) ::  value_chr
     INTEGER            ::  idum
@@ -46,5 +46,5 @@
     initial_wallclock_time = IRTC( ) * 1E-9
 
-#elif defined( __lctit )
+#elif defined( __lc )
 
     CALL SYSTEM_CLOCK( count, count_rate )
Index: /palm/trunk/SOURCE/modules.f90
===================================================================
--- /palm/trunk/SOURCE/modules.f90	(revision 81)
+++ /palm/trunk/SOURCE/modules.f90	(revision 82)
@@ -5,5 +5,6 @@
 ! Actual revisions:
 ! -----------------
-! 
+! +return_addres, return_username
+! Cpp-directive lcmuk renamed lc
 !
 ! Former revisions:
@@ -236,4 +237,5 @@
                             mixing_length_1d = 'as_in_3d_model', &
                             random_generator = 'numerical-recipes', &
+                            return_addres, return_username, &
                             timestep_scheme = 'runge-kutta-3'
     CHARACTER (LEN=40)  ::  avs_data_file, topography = 'flat'
@@ -879,7 +881,6 @@
 
 #if defined( __parallel )
-#if defined( __lcmuk )
+#if defined( __lc )
     USE MPI
-!    INCLUDE "mpif.h"
 #else
     INCLUDE "mpif.h"
Index: /palm/trunk/SOURCE/parin.f90
===================================================================
--- /palm/trunk/SOURCE/parin.f90	(revision 81)
+++ /palm/trunk/SOURCE/parin.f90	(revision 82)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! +return_addres, return_username, use_seperate_pe_for_dvrp_output in envpar
 !
 ! Former revisions:
@@ -121,6 +121,6 @@
 
 
-    NAMELIST /envpar/  host, maximum_cpu_time_allowed, revision, &
-                       run_identifier, tasks_per_node, write_binary
+    NAMELIST /envpar/  host, maximum_cpu_time_allowed, revision, return_addres, &
+                       return_username, run_identifier, tasks_per_node, write_binary
 
 
Index: /palm/trunk/SOURCE/poisfft.f90
===================================================================
--- /palm/trunk/SOURCE/poisfft.f90	(revision 81)
+++ /palm/trunk/SOURCE/poisfft.f90	(revision 82)
@@ -1345,5 +1345,5 @@
 !       tn = omp_get_thread_num()
 !       WRITE( 120+tn, * ) '+++ id=',myid,' nx=',nx,' thread=', omp_get_thread_num()
-!       CALL FLUSH_( 120+tn )
+!       CALL local_flush( 120+tn )
 !CDIR NOLOOPCHG
        DO  k = 0, nz-1
@@ -1354,5 +1354,5 @@
        ENDDO
 !       WRITE( 120+tn, * ) '+++ id=',myid,' end of first tridia loop   thread=', omp_get_thread_num()
-!       CALL FLUSH_( 120+tn )
+!       CALL local_flush( 120+tn )
 
        IF ( j <= nnyh )  THEN
Index: /palm/trunk/SOURCE/run_control.f90
===================================================================
--- /palm/trunk/SOURCE/run_control.f90	(revision 81)
+++ /palm/trunk/SOURCE/run_control.f90	(revision 82)
@@ -4,5 +4,6 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Preprocessor strings for different linux clusters changed to "lc",
+! routine local_flush is used for buffer flushing
 !
 ! Former revisions:
@@ -89,11 +90,8 @@
                           advected_distance_x/1000.0,                          &
                           advected_distance_y/1000.0, mgcycles
-#if defined( __ibm )
 !
 !--    Write buffer contents to disc immediately
-       CALL FLUSH_( 15 )
-#elif defined( __lcmuk )  ||  defined( __lctit )  ||  defined( __nec )
-       CALL FLUSH( 15 )
-#endif
+       CALL local_flush( 15 )
+
     ENDIF
 !
