Index: palm/trunk/SCRIPTS/mbuild
===================================================================
--- palm/trunk/SCRIPTS/mbuild	(revision 82)
+++ palm/trunk/SCRIPTS/mbuild	(revision 83)
@@ -108,4 +108,5 @@
  suf=f90
  update=false
+ working_directory=`pwd`
 
  typeset -i  ih ihost=0
@@ -119,5 +120,5 @@
     # FEHLERBEHANDLUNG
     # BEI EXIT:
- trap 'rm -rf  tmp_mbuild
+ trap 'rm -rf  $working_directory/tmp_mbuild
        if [[ $locat != normal ]]
        then
@@ -129,5 +130,5 @@
 
     # BEI TERMINAL-BREAK:
- trap 'rm -rf  tmp_mbuild
+ trap 'rm -rf  $working_directory/tmp_mbuild
        printf "\n\n +++ mbuild killed by \"^C\" \n\n"
        exit
@@ -188,5 +189,5 @@
        HOSTNAME=`echo $line | cut -d" " -s -f2`
        host_identifier=`echo $line | cut -d" " -s -f3`
-       if [[ "$HOSTNAME" = $local_host_real_name ]]
+       if [[ $local_host_real_name = $HOSTNAME ]]
        then
           local_host=$host_identifier
@@ -207,22 +208,4 @@
 
 
-# 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
@@ -737,42 +720,20 @@
 
        # IP-ADRESSE DES REMOTE-RECHNERS BESTIMMEN
-    netcdf_support=false
     case  $remote_host  in
-        (lcmuk)          remote_addres=130.75.105.3
-                         netcdf_support=true
-                         if [[ $scirocco = true ]]
+        (lcmuk)          remote_addres=130.75.105.3;;
+        (lctit)          remote_addres=172.17.75.161;;
+        (decalpha)       remote_addres=165.132.26.56;;
+        (ibmb)           remote_addres=130.73.230.10;;
+        (ibmh)           remote_addres=130.75.4.10;;
+        (ibms)           remote_addres=150.183.5.101;;
+        (ibmy)           remote_addres=165.132.26.58;;
+        (nech)           remote_addres=136.172.44.192;;
+        (neck)           remote_addres=133.5.178.11;;
+        (ground.yonsei.ac.kr) remote_addres=134.75.155.33;;
+        (*)              if [[ $local_host != $remote_host ]]
                          then
-                            netcdf_path=/opt/netcdf/3.6.2-beta4
-                         elif [[ $fimm = true ]]
-                         then
-                            netcdf_path=/local/netcdf
-                         else
-                            netcdf_path=/muksoft/packages/netcdf/linux
+                            printf "\n  +++ remote host \"$remote_host\" unknown";
+                            printf "\n      please inform S. Raasch!"
                          fi;;
-        (lctit)          remote_addres=172.17.75.161; netcdf_support=true
-                         netcdf_path=/home/usr5/mkanda/netcdf-3.6.2; cpp_options="-Mpreprocess";;
-        (decalpha)       remote_addres=165.132.26.56; cpp_options="-cpp"; netcdf_support=true
-                         netcdf_path=/usr/local/netcdf-3.5.1;;
-        (ibm)            remote_addres=134.76.99.81; cpp_options="-qsuffix=cpp=f90";;
-        (ibmb)           remote_addres=130.73.230.10; cpp_options="-qsuffix=cpp=f90"; netcdf_support=true
-                         netcdf_path=/aws/dataformats/netcdf-3.6.0-p1/64-32;;
-        (ibmh)           remote_addres=130.75.4.10; cpp_options="-qsuffix=cpp=f90"; netcdf_support=true
-                         netcdf_path=/aws/dataformats/netcdf-3.6.0-p1/64-32;;
-        (ibms)           remote_addres=150.183.5.101; cpp_options="-qsuffix=cpp=f90"; netcdf_support=true
-                         netcdf_path=/applic/lib/NETCDF64;;
-        (ibmy)           remote_addres=165.132.26.58; cpp_options="-qsuffix=cpp=f90"; netcdf_support=true
-                         netcdf_path=/usr1/users/raasch/pub/netcdf-3.6.0-p1;;
-        (nech)           remote_addres=136.172.44.192; cpp_options="-Ep"; netcdf_support=true
-                         netcdf_path=/pool/SX-6/netcdf/netcdf-3.6.0-p1;;
-        (neck)           remote_addres=133.5.178.11; cpp_options="-Ep"; netcdf_support=true
-                         netcdf_path=/home/DSRC/NC/tatuyama/pub/netcdf-3.6.0-p1;;
-        (t3eb)           remote_addres=130.73.206.21; cpp_options="-eZ";;
-        (t3eh)           remote_addres=130.75.4.131; cpp_options="-eZ";;
-        (t3ej2)          remote_addres=134.94.100.22; cpp_options="-eZ";;
-        (t3ej5)          remote_addres=134.94.100.49; cpp_options="-eZ";;
-        (ground.yonsei.ac.kr) remote_addres=134.75.155.33;;
-     (*)                 printf "\n  +++ remote host \"$remote_host\" unknown";
-                         printf "\n      please inform S. Raasch!";
-                         locat=config_file; exit;;
     esac
 
@@ -912,70 +873,4 @@
 
 
-       # PRAEPROZESSOR-DIREKTIVEN SETZEN
-    if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
-    then
-       if [[ $remote_host = ibms ]]
-       then
-          cpp_options="$cpp_options -WF,-DMPI_REAL=MPI_DOUBLE_PRECISION"
-          [[ $netcdf_support = true ]]  &&  cpp_options="${cpp_options},-D__netcdf"
-       else
-          cpp_options="$cpp_options -WF,-DMPI_REAL=MPI_DOUBLE_PRECISION"
-          [[ $netcdf_support = true ]]  &&  cpp_options="${cpp_options},-D__netcdf,-D__netcdf_64bit"
-          [[ $remote_host = ibmy ]]  &&  cpp_options="${cpp_options},-D__ibmy_special"
-       fi
-    elif [[ $remote_host = lcmuk ]]
-    then
-       cpp_options="$cpp_options -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION"
-       [[ $netcdf_support = true ]]  &&  cpp_options="$cpp_options -D__netcdf -D__netcdf_64bit"
-    elif [[ $remote_host = lctit ]]
-    then
-       cpp_options="$cpp_options -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION"
-       [[ $netcdf_support = true ]]  &&  cpp_options="$cpp_options -D__netcdf"
-    elif [[ $remote_host = decalpha ]]
-    then
-       cpp_options="$cpp_options -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION"
-       [[ $netcdf_support = true ]]  &&  cpp_options="$cpp_options -D__netcdf"
-    elif [[ $remote_host = nech  ||  $remote_host = neck ]]
-    then
-       cpp_options="$cpp_options -DMPI_REAL=MPI_REAL8 -DMPI_2REAL=MPI_2REAL8 -DSCFFT=DZFFT -DCSFFT=ZDFFT"
-       [[ $netcdf_support = true ]]  &&  cpp_options="$cpp_options -D__netcdf -D__netcdf_64bit"
-    fi
-
-    if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
-    then
-       for  string  in  $remote_host_string
-       do
-          if [[ $(echo $string | cut -c1-3) = ibm ]]
-          then
-             cpp_options="${cpp_options},-D__ibm"
-             if [[ $remote_host = ibmy ]]
-             then
-                cpp_options="${cpp_options},-D__ibmy_special"
-             fi
-          else
-             cpp_options="${cpp_options},-D__$string"
-          fi
-       done
-       cpp_options="$cpp_options "
-    elif [[ $remote_host = nech  ||  $remote_host = neck ]]
-    then
-       for  string  in  $remote_host_string
-       do
-          if [[ $(echo $string | cut -c1-3) = nec ]]
-          then
-             cpp_options="${cpp_options} -D__nec"
-          else
-             cpp_options="${cpp_options} -D__$string"
-          fi
-       done
-       cpp_options="$cpp_options "
-    else
-       for  string  in  $remote_host_string
-       do
-          cpp_options="$cpp_options -D__$string "
-       done
-    fi
-
-
        # PRAEPROZESSOR-OPTIONEN/DIREKTIVEN ERMITTELN
     line=""
@@ -1004,6 +899,17 @@
        then
           cpp_options="$cpp_options -D__lc "
+       elif [[ $(echo $remote_host | cut -c1-3) = ibm  &&  $(echo $string | cut -c1-3) = ibm ]]
+       then
+          cpp_options="${cpp_options},-D__ibm"
+       elif [[ $(echo $remote_host | cut -c1-3) = nec  &&  $(echo $string | cut -c1-3) = nec ]]
+       then
+          cpp_options="${cpp_options} -D__nec"
        else
-          cpp_options="$cpp_options -D__$string "
+          if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
+          then
+             cpp_options="${cpp_options},-D__$string"
+          else
+             cpp_options="$cpp_options -D__$string "
+          fi
        fi
     done
@@ -1067,15 +973,4 @@
     fi
 
-    if [[ $netcdf_support = true ]]
-    then
-       case  $remote_host  in
-          (decalpha)  compiler_options="-I${netcdf_path}/include  $compiler_options";;
-          (ibmb|ibmh) compiler_options="-I ${netcdf_path}/include-64  $compiler_options";;
-          (ibms)      compiler_options="-I /applic/netcdf64/src/f90  $compiler_options";;
-          (ibmy)      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
 
 
@@ -1102,15 +997,4 @@
           # 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|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
 
