Index: palm/trunk/SCRIPTS/.palm.iofiles
===================================================================
--- palm/trunk/SCRIPTS/.palm.iofiles	(revision 2663)
+++ palm/trunk/SCRIPTS/.palm.iofiles	(revision 2669)
@@ -1,125 +1,61 @@
 #
-#----------------------------------------------------------------------------
+#------------------------------------------------------------------------------------------
 # List of input-files
-#----------------------------------------------------------------------------
-PARIN                    in:job        d3#      $base_data/$fname/INPUT         _p3d
-PARIN                    in:job        pcr      $base_data/$fname/INPUT         _pcr
-PARIN                    in:job        d3r      $base_data/$fname/INPUT         _p3dr
-TOPOGRAPHY_DATA          in:locopt     d3#:d3r  $base_data/$fname/INPUT         _topo
-#WTM_DATA                 in:job        d3#:d3r  $base_data/$fname/INPUT         _wtm
-BININ                    in:loc:lnpe   d3r:rec  $fast_io_catalog/$fname/RESTART _d3d
-PARTICLE_RESTART_DATA_IN in:loc:lnpe   prtr     $fast_io_catalog/$fname/RESTART _rprt
-DATA_1D_PR_NETCDF        in:locopt     prr      $base_data/$fname/OUTPUT        _pr     nc
-DATA_1D_SP_NETCDF        in:locopt     spr      $base_data/$fname/OUTPUT        _sp     nc
-DATA_1D_TS_NETCDF        in:locopt     tsr      $base_data/$fname/OUTPUT        _ts     nc
-DATA_1D_PTS_NETCDF       in:locopt     ptsr     $base_data/$fname/OUTPUT        _pts    nc
-DATA_2D_XY_NETCDF        in:locopt     xyr      $base_data/$fname/OUTPUT        _xy     nc
-DATA_2D_XY_AV_NETCDF     in:locopt     xyr      $base_data/$fname/OUTPUT        _xy_av  nc
-DATA_2D_XZ_NETCDF        in:locopt     xzr      $base_data/$fname/OUTPUT        _xz     nc
-DATA_2D_XZ_AV_NETCDF     in:locopt     xzr      $base_data/$fname/OUTPUT        _xz_av  nc
-DATA_2D_YZ_NETCDF        in:locopt     yzr      $base_data/$fname/OUTPUT        _yz     nc
-DATA_2D_YZ_AV_NETCDF     in:locopt     yzr      $base_data/$fname/OUTPUT        _yz_av  nc
-DATA_3D_NETCDF           in:locopt     3dr      $base_data/$fname/OUTPUT        _3d     nc
-DATA_3D_AV_NETCDF        in:locopt     3dr      $base_data/$fname/OUTPUT        _3d_av  nc
-DATA_MASK_01_NETCDF      in:locopt     mar      $base_data/$fname/OUTPUT        _m01    nc
-DATA_MASK_01_AV_NETCDF   in:locopt     mar      $base_data/$fname/OUTPUT        _m01_av nc
-DATA_MASK_02_NETCDF      in:locopt     mar      $base_data/$fname/OUTPUT        _m02    nc
-DATA_MASK_02_AV_NETCDF   in:locopt     mar      $base_data/$fname/OUTPUT        _m02_av nc
-DATA_MASK_03_NETCDF      in:locopt     mar      $base_data/$fname/OUTPUT        _m03    nc
-DATA_MASK_03_AV_NETCDF   in:locopt     mar      $base_data/$fname/OUTPUT        _m03_av nc
-DATA_MASK_04_NETCDF      in:locopt     mar      $base_data/$fname/OUTPUT        _m04    nc
-DATA_MASK_04_AV_NETCDF   in:locopt     mar      $base_data/$fname/OUTPUT        _m04_av nc
-DATA_MASK_05_NETCDF      in:locopt     mar      $base_data/$fname/OUTPUT        _m05    nc
-DATA_MASK_05_AV_NETCDF   in:locopt     mar      $base_data/$fname/OUTPUT        _m05_av nc
-DATA_PRT_NETCDF          in:locopt:pe  prtr     $base_data/$fname/OUTPUT        _prt
+#------------------------------------------------------------------------------------------
+PARIN                    in:tr      d3#      $base_data/$fname/INPUT          _p3d*
+PARIN                    in:tr      d3r      $base_data/$fname/INPUT          _p3dr*
+PARIN                    in:tr      pcr      $base_data/$fname/INPUT          _pcr
+TOPOGRAPHY_DATA          inopt:tr   d3#:d3r  $base_data/$fname/INPUT          _topo*
+WTM_DATA                 inopt:tr   d3#:d3r  $base_data/$fname/INPUT          _wtm
+BININ                    in:lnpe    d3r:rec  $fast_io_catalog/$fname/RESTART  _d3d
+PARTICLE_RESTART_DATA_IN in:lnpe    prtr     $fast_io_catalog/$fname/RESTART  _rprt
+DATA_1D_PR_NETCDF        inopt      prr      $base_data/$fname/OUTPUT         _pr*       nc
+DATA_1D_SP_NETCDF        inopt      spr      $base_data/$fname/OUTPUT         _sp*       nc
+DATA_1D_TS_NETCDF        inopt      tsr      $base_data/$fname/OUTPUT         _ts*       nc
+DATA_1D_PTS_NETCDF       inopt      ptsr     $base_data/$fname/OUTPUT         _pts*      nc
+DATA_2D_XY_NETCDF        inopt      xyr      $base_data/$fname/OUTPUT         _xy*       nc
+DATA_2D_XY_AV_NETCDF     inopt      xyr      $base_data/$fname/OUTPUT         _xy_av*    nc
+DATA_2D_XZ_NETCDF        inopt      xzr      $base_data/$fname/OUTPUT         _xz*       nc
+DATA_2D_YZ_NETCDF        inopt      yzr      $base_data/$fname/OUTPUT         _yz*       nc
+DATA_3D_NETCDF           inopt      3dr      $base_data/$fname/OUTPUT         _3d*       nc
+DATA_3D_AV_NETCDF        inopt      3dr      $base_data/$fname/OUTPUT         _3d*       nc
+DATA_MASK_NETCDF         inopt      mar      $base_data/$fname/OUTPUT         _masked    nc
+DATA_MASK_AV_NETCDF      inopt      mar      $base_data/$fname/OUTPUT         _masked_av nc
+DATA_PRT_NETCDF          inopt:pe   prtr     $base_data/$fname/OUTPUT         _prt*      nc
 #
-#----------------------------------------------------------------------------
+#------------------------------------------------------------------------------------------
 # List of output-files
-#----------------------------------------------------------------------------
-BINOUT                    out:loc:lnpe restart   $fast_io_catalog/$fname/RESTART  _d3d
-PARTICLE_RESTART_DATA_OUT out:loc:lnpe prt#:prtr $fast_io_catalog/$fname/RESTART  _rprt
+#------------------------------------------------------------------------------------------
+BINOUT*                    out:lnpe restart   $fast_io_catalog/$fname/RESTART  _d3d
+PARTICLE_RESTART_DATA_OUT* out:lnpe prt#:prtr $fast_io_catalog/$fname/RESTART  _rprt
 #
-RUN_CONTROL       out:loc:tr   d3#:pcr $base_data/$fname/MONITORING  _rc
-RUN_CONTROL       out:loc:tra  d3r     $base_data/$fname/MONITORING  _rc
-HEADER            out:loc:tr   d3#:pcr $base_data/$fname/MONITORING  _header
-HEADER            out:loc:tra  d3r     $base_data/$fname/MONITORING  _header
-CPU_MEASURES      out:loc:tr   d3#:pcr $base_data/$fname/MONITORING  _cpu
-CPU_MEASURES      out:loc:tra  d3r     $base_data/$fname/MONITORING  _cpu
-PARTICLE_INFO     out:loc:tr   pt#     $base_data/$fname/MONITORING  _prt_info
-PARTICLE_INFO     out:loc:tra  ptr     $base_data/$fname/MONITORING  _prt_info
-LIST_PROFIL       out:loc:tr   d3#     $base_data/$fname/MONITORING  _list_pr
+RUN_CONTROL*               out:tr   d3#:pcr   $base_data/$fname/MONITORING     _rc
+RUN_CONTROL*               out:tra  d3r       $base_data/$fname/MONITORING     _rc
+HEADER*                    out:tr   d3#:pcr   $base_data/$fname/MONITORING     _header
+HEADER*                    out:tra  d3r       $base_data/$fname/MONITORING     _header
+CPU_MEASURES*              out:tr   d3#:pcr   $base_data/$fname/MONITORING     _cpu
+CPU_MEASURES*              out:tra  d3r       $base_data/$fname/MONITORING     _cpu
+PARTICLE_INFO*             out:tr   pt#       $base_data/$fname/MONITORING     _prt_info
+PARTICLE_INFO*             out:tra  ptr       $base_data/$fname/MONITORING     _prt_info
+LIST_PROFIL*               out:tr   d3#       $base_data/$fname/MONITORING     _list_pr
 #
-TURBINE_PARAMETERS01   out:loc:tr   d3#:d3r   $base_data/$fname/MONITORING  _turbine_parameters01
-TURBINE_PARAMETERS02   out:loc:tr   d3#:d3r   $base_data/$fname/MONITORING  _turbine_parameters02
-TURBINE_PARAMETERS03   out:loc:tr   d3#:d3r   $base_data/$fname/MONITORING  _turbine_parameters03
-TURBINE_PARAMETERS04   out:loc:tr   d3#:d3r   $base_data/$fname/MONITORING  _turbine_parameters04
+DATA_1D_PR_NETCDF*         out:tr   *         $base_data/$fname/OUTPUT         _pr        nc
+DATA_1D_SP_NETCDF          out:tr   *         $base_data/$fname/OUTPUT         _sp        nc
+DATA_1D_TS_NETCDF          out:tr   *         $base_data/$fname/OUTPUT         _ts        nc
+DATA_1D_PTS_NETCDF         out:tr   *         $base_data/$fname/OUTPUT         _pts       nc
+DATA_2D_XY_NETCDF*         out:tr   *         $base_data/$fname/OUTPUT         _xy        nc
+DATA_2D_XY_AV_NETCDF*      out:tr   *         $base_data/$fname/OUTPUT         _xy_av     nc
+DATA_2D_XZ_NETCDF*         out:tr   *         $base_data/$fname/OUTPUT         _xz        nc
+DATA_2D_XZ_AV_NETCDF*      out:tr   *         $base_data/$fname/OUTPUT         _xz_av     nc
+DATA_2D_YZ_NETCDF*         out:tr   *         $base_data/$fname/OUTPUT         _yz        nc
+DATA_2D_YZ_AV_NETCDF*      out:tr   *         $base_data/$fname/OUTPUT         _yz_av     nc
+DATA_3D_NETCDF*            out:tr   *         $base_data/$fname/OUTPUT         _3d        nc
+DATA_3D_AV_NETCDF*         out:tr   *         $base_data/$fname/OUTPUT         _3d_av     nc
+DATA_MASK_NETCDF*          out:tr   *         $base_data/$fname/OUTPUT         _masked    nc
+DATA_MASK_AV_NETCDF*       out:tr   *         $base_data/$fname/OUTPUT         _masked_av nc
 #
-DATA_1D_PR_NETCDF      out:loc:tr   pr#:prr   $base_data/$fname/OUTPUT  _pr     nc
-DATA_1D_SP_NETCDF      out:loc:tr   sp#:spr   $base_data/$fname/OUTPUT  _sp     nc
-DATA_1D_TS_NETCDF      out:loc:tr   ts#:tsr   $base_data/$fname/OUTPUT  _ts     nc
-DATA_1D_PTS_NETCDF     out:loc:tr   pts#:ptsr $base_data/$fname/OUTPUT  _pts    nc
-DATA_2D_XY_NETCDF      out:loc:tr   xy#:xyr   $base_data/$fname/OUTPUT  _xy     nc
-DATA_2D_XY_AV_NETCDF   out:loc:tr   xy#:xyr   $base_data/$fname/OUTPUT  _xy_av  nc
-DATA_2D_XZ_NETCDF      out:loc:tr   xz#:xzr   $base_data/$fname/OUTPUT  _xz     nc
-DATA_2D_XZ_AV_NETCDF   out:loc:tr   xz#:xzr   $base_data/$fname/OUTPUT  _xz_av  nc
-DATA_2D_YZ_NETCDF      out:loc:tr   yz#:yzr   $base_data/$fname/OUTPUT  _yz     nc
-DATA_2D_YZ_AV_NETCDF   out:loc:tr   yz#:yzr   $base_data/$fname/OUTPUT  _yz_av  nc
-DATA_3D_NETCDF         out:loc:tr   3d#:3dr   $base_data/$fname/OUTPUT  _3d     nc
-DATA_3D_AV_NETCDF      out:loc:tr   3d#:3dr   $base_data/$fname/OUTPUT  _3d_av  nc
-DATA_MASK_01_NETCDF    out:loc:tr   ma#:mar   $base_data/$fname/OUTPUT  _m01    nc
-DATA_MASK_01_AV_NETCDF out:loc:tr   ma#:mar   $base_data/$fname/OUTPUT  _m01_av nc
-DATA_MASK_02_NETCDF    out:loc:tr   ma#:mar   $base_data/$fname/OUTPUT  _m02    nc
-DATA_MASK_02_AV_NETCDF out:loc:tr   ma#:mar   $base_data/$fname/OUTPUT  _m02_av nc
-DATA_MASK_03_NETCDF    out:loc:tr   ma#:mar   $base_data/$fname/OUTPUT  _m03    nc
-DATA_MASK_03_AV_NETCDF out:loc:tr   ma#:mar   $base_data/$fname/OUTPUT  _m03_av nc
-DATA_MASK_04_NETCDF    out:loc:tr   ma#:mar   $base_data/$fname/OUTPUT  _m04    nc
-DATA_MASK_04_AV_NETCDF out:loc:tr   ma#:mar   $base_data/$fname/OUTPUT  _m04_av nc
-DATA_MASK_05_NETCDF    out:loc:tr   ma#:mar   $base_data/$fname/OUTPUT  _m05    nc
-DATA_MASK_05_AV_NETCDF out:loc:tr   ma#:mar   $base_data/$fname/OUTPUT  _m05_av nc
-DATA_PRT_NETCDF        out:loc:pe   prt#:prtr $base_data/$fname/OUTPUT  _prt
-DATA_PRT_NETCDF        out:loc:trpe prt#:prtr $base_data/$fname/OUTPUT  _prt
-PLOTTS_PAR             out:loc:tr   ts#:tsr   $base_data/$fname/OUTPUT  _ts_par
-PLOTTS_DATA            out:loc:tr   ts#       $base_data/$fname/OUTPUT  _ts_in
-PLOTTS_DATA            out:loc:tra  tsr       $base_data/$fname/OUTPUT  _ts_in
-PLOT1D_PAR             out:loc:tr   pr#:prr   $base_data/$fname/OUTPUT  _pr_par
-PLOT1D_DATA            out:loc:tr   pr#       $base_data/$fname/OUTPUT  _pr_in
-PLOT1D_DATA            out:loc:tr   prr       $base_data/$fname/OUTPUT  _pr_in
-PARTICLE_DATA          out:loc:lnpe prt#:prtr $base_data/$fname/OUTPUT  _prt_dat
+DATA_PRT_NETCDF*           out:pe   *         $base_data/$fname/OUTPUT         _prt
+DATA_PRT_NETCDF*           out:trpe *         $base_data/$fname/OUTPUT         _prt
+PARTICLE_DATA*             out:lnpe *         $base_data/$fname/OUTPUT         _prt_dat
 #
-#----------------------------------------------------------------------------
-# List of input-files for nested model runs
-#----------------------------------------------------------------------------
-PARIN_02           in:job        nest#      $base_data/$fname/INPUT   _02_p3d
-TOPOGRAPHY_DATA_02 in:locopt     nest#      $base_data/$fname/INPUT   _02_topo
-PARIN_03           in:job        nest#      $base_data/$fname/INPUT   _02_p3d
-TOPOGRAPHY_DATA_03 in:locopt     nest#      $base_data/$fname/INPUT   _02_topo
-#
-#----------------------------------------------------------------------------
-# List of input-files for coupled ocean model
-#----------------------------------------------------------------------------
-#PARIN_O                  in:job        d3o#      $base_data/$fname/INPUT         _o_p3d
-#PARIN_O                  in:job        d3or      $base_data/$fname/INPUT         _o_p3df
-#BININ_O                  in:loc:lnpe   d3or:reco $fast_io_catalog/$fname/RESTART _o_d3d
-#
-#----------------------------------------------------------------------------
-# List of output-files for coupled ocean model
-#----------------------------------------------------------------------------
-RUN_CONTROL_02     out:loc:tr   nest#     $base_data/$fname/MONITORING     _2_rc
-RUN_CONTROL_02     out:loc:tra  nestr     $base_data/$fname/MONITORING     _2_rc
-HEADER_02          out:loc:tr   nest#     $base_data/$fname/MONITORING     _2_header
-HEADER_02          out:loc:tra  nestr     $base_data/$fname/MONITORING     _2_header
-CPU_MEASURES_02    out:loc:tr   nest#     $base_data/$fname/MONITORING     _2_cpu
-CPU_MEASURES_02    out:loc:tra  nestr     $base_data/$fname/MONITORING     _2_cpu
-LIST_PROFIL_02     out:loc:tr   nest#     $base_data/$fname/MONITORING     _2_list_pr
-BINOUT_02          out:loc:lnpe restart   $fast_io_catalog/$fname/RESTART  _2_d3d
-#
-DATA_1D_PR_NETCDF_2    out:loc:tr pro#:pror   $base_data/$fname/OUTPUT _2_pr     nc
-DATA_1D_SP_NETCDF_2    out:loc:tr spo#:spor   $base_data/$fname/OUTPUT _2_sp     nc
-DATA_1D_TS_NETCDF_2    out:loc:tr tso#:tsor   $base_data/$fname/OUTPUT _2_ts     nc
-DATA_1D_PTS_NETCDF_2   out:loc:tr ptso#:ptsor $base_data/$fname/OUTPUT _2_pts    nc
-DATA_2D_XY_NETCDF_2    out:loc:tr xyo#:xyor   $base_data/$fname/OUTPUT _2_xy     nc
-DATA_2D_XY_AV_NETCDF_2 out:loc:tr xyo#:xyor   $base_data/$fname/OUTPUT _2_xy_av  nc
-DATA_2D_XZ_NETCDF_2    out:loc:tr xzo#:xzor   $base_data/$fname/OUTPUT _2_xz     nc
-DATA_2D_XZ_AV_NETCDF_2 out:loc:tr xzo#:xzor   $base_data/$fname/OUTPUT _2_xz_av  nc
-DATA_2D_YZ_NETCDF_2    out:loc:tr yzo#:yzor   $base_data/$fname/OUTPUT _2_yz     nc
-DATA_2D_YZ_AV_NETCDF_2 out:loc:tr yzo#:yzor   $base_data/$fname/OUTPUT _2_yz_av  nc
+WTM_OUTPUT_DATA*           out:tr   *         $base_data/$fname/MONITORING     _wtm
Index: palm/trunk/SCRIPTS/palmrun
===================================================================
--- palm/trunk/SCRIPTS/palmrun	(revision 2663)
+++ palm/trunk/SCRIPTS/palmrun	(revision 2669)
@@ -27,4 +27,12 @@
 # -----------------
 # $Id$
+# file attributes in .palm.iofiles restructured, "loc" attribute completely
+# removed,
+# wildcard (*) allowed in .palm.iofiles as file activation string for output
+# files,
+# informative messages in case of missing optional input files shortened
+# bugfix: variable cycle explicitly interpreted with 10 as the number base
+# 
+# 2638 2017-11-23 12:44:23Z raasch
 # use of wildcards in file connection statements enabled
 # 
@@ -515,7 +523,6 @@
  do
 
-       # FIRST REPLACE ENVIRONMENT-VARIABLES BY THEIR RESPECTIVE VALUES
-    eval  line=\"$line\"
-
+       # REPLACE REPEATING SPACES BETWEEN THE COLUMNS BY A SINGLE SPACE
+    line=`echo "$line" | sed -e "s/\s\{1,\}/ /g"`
 
        # INTERPRET THE LINE
@@ -535,21 +542,22 @@
           # LINE DEFINES FILE CONNECTION. READ THE FILE ATTRIBUTES.
           # s2a: in/out - field
-          # s2b: loc    - field (optional)
-          # s2c: tr/ar  - field (optional)
-       s1=`echo $line | cut -d" " -f1`
-       s2=`echo $line | cut -d" " -s -f2`
-       s2a=$(echo $s2 | cut -d":" -f1)
+          # s2b: action - field (optional)
+       s1=`echo "$line" | cut -d" " -f1`
+       s2=`echo "$line" | cut -d" " -s -f2`
+#       s2a=$(echo $s2 | cut -d":" -f1)
        if [[ $(echo $s2 | grep -c ":") = 0 ]]
        then
+          s2a=$s2
           s2b=""
-          s2c=""
        else
-          s2b=`echo $s2 | cut -d":" -f2 | sed 's/:/ /g'`
-          s2c=`echo $s2 | cut -d":" -s -f3 | sed 's/:/ /g'`
-       fi
-       s3=`echo $line | cut -d" " -f3`
-       s4=`echo $line | cut -d" " -s -f4`
-       s5=`echo $line | cut -d" " -s -f5`
-       s6=`echo $line | cut -d" " -s -f6`
+          s2a=`echo $s2 | cut -d":" -f1`
+          s2b=`echo $s2 | cut -d":" -f2`
+       fi
+       s3=`echo "$line" | cut -d" " -f3 | sed 's/*/wildcard /g'`
+       s4=`echo "$line" | cut -d" " -s -f4`
+       eval s4=\"$s4\"    # REPLACE ENVIRONMENT-VARIABLES IN PATH BY THEIR RESPECTIVE VALUES
+       echo "### s4=\"$s4\" "
+       s5=`echo "$line" | cut -d" " -s -f5`
+       s6=`echo "$line" | cut -d" " -s -f6`
 
        
@@ -558,8 +566,8 @@
           # VARIABLE S3 MAY CONTAIN A LIST OF ACTIVATION STRINGS (FIELD-SEPERATOR ":").
           # IF EXECUTION IS SCHEDULED FOR A REMOTE-MACHINE AND THE FILE IS ONLY
-          # LOCALLY REQUIRED ON THAT MACHINE (I.E. s2b = loc), THE FILE CONNECTION
+          # LOCALLY REQUIRED ON THAT MACHINE (I.E. s2b != tr), THE FILE CONNECTION
           # IS NOT CHECKED AND STORED.
        IFSALT="$IFS"; IFS="$IFS:"      # ADD ":" AS FIELD SEPARATOR
-       if [[ "$s2a" = in  &&  ! ( $create_remote_batch_job = true  &&  ( "$s2b" = loc  ||  "$s2b" = locopt ) ) ]]
+       if [[ ( "$s2a" = in  || "$s2a" = inopt )  &&  ! ( $create_remote_batch_job = true  &&  "$s2b" != tr ) ]]
        then
           found=false
@@ -574,10 +582,16 @@
           then
              (( iin = iin + 1 ))
-             localin_pre[$iin]=$s1; transin_pre[$iin]=$s2b; actionin_pre[$iin]=$s2c;
+             localin_pre[$iin]=$s1; actionin_pre[$iin]=$s2b;
              pathin_pre[$iin]=$s4; endin_pre[$iin]=$s5; extin_pre[$iin]=$s6
+             if [[ "$s2a" = inopt ]]
+             then
+                optin_pre[$iin]=yes
+             else
+                optin_pre[$iin]=no
+             fi 
 
                 # FILES WITH JOB-ATTRIBUTE ARE STORED IN THE SOURCES_FOR_RUN
                 # FOLDER IF THE JOB IS RUNNING ON A REMOTE HOST
-             if [[ $running_on_remote = true  && ( "$s2b" = job  ||  "$s2b" = jobopt ) ]]
+             if [[ $running_on_remote = true  &&  "$s2b" = tr ]]
              then
                 pathin_pre[$iin]=${fast_io_catalog}/${sources_for_run_catalog}
@@ -588,5 +602,5 @@
              if [[ "${s5: -1}" = "*" ]]
              then
-                if [[ "$s2c" = "di" ]]
+                if [[ "$s2b" = "di" ]]
                 then
                    printf "\n    +++ wildcards (*) not allowed with \"di\" file attribute."
@@ -602,12 +616,20 @@
              fi
           fi
-       elif [[ "$s2a" = out  &&  ! ( $create_remote_batch_job = true  &&  "$s2b" = loc ) ]]
+       elif [[ "$s2a" = out  &&  ! ( $create_remote_batch_job = true ) ]]
        then
           found=false
+          echo "### line=\"$line\" "
           for  actual  in  $activation_string_list
           do
              for  formal  in  $s3  
              do
-                [[ $actual = $formal  ||  "$formal" = "-"  ]]  &&  found=true
+                echo "--- actual=\"$actual\"   formal=\"$formal\"   s3=\"$s3\" "
+                if [[ $actual = $formal  ||  $formal = wildcard  ]]
+                then
+                   found=true
+                   echo "--- found"
+                else
+                   echo "--- not found"
+                fi
              done
           done
@@ -615,6 +637,16 @@
           then
              (( iout = iout + 1 ))
-             localout_pre[$iout]=$s1; actionout_pre[$iout]=$s2c; typeout_pre[$iout]=$s3;
+             localout_pre[$iout]=$s1; actionout_pre[$iout]=$s2b
              pathout_pre[$iout]=$s4; endout_pre[$iout]=$s5; extout_pre[$iout]=$s6
+             echo "### pathout_pre[$iout]=\"${pathout_pre[$iout]}\" "
+
+                # CHECK IF WILDCARD IS USED AS ACTIVATION STRING
+                # IN SUCH CASES, NO WARNING WILL LATER BE OUTPUT IF LOCAL FILES DO NOT EXIST
+             if [[ $formal = wildcard  ]]
+             then
+                warnout_pre[$iout]=false
+             else
+                warnout_pre[$iout]=true
+             fi
 
                 # CHECK FOR MULTIPLE FILES, SET A RESPECTIVE FLAG AND REMOVE
@@ -622,5 +654,5 @@
              if [[ "${s1: -1}" = "*" ]]
              then
-                if [[ "$s2c" = "di" ]]
+                if [[ "$s2b" = "di" ]]
                 then
                    printf "\n    +++ wildcards (*) not allowed with \"di\" file attribute."
@@ -636,8 +668,8 @@
              fi
           fi
-       elif [[ "$s2a" != in  &&  "$s2a" != out ]]
-       then
-          printf "\n  +++ I/O-attribute in configuration file $config_file has the invalid"
-          printf "\n      value \"$s2\". Only \"in\" and \"out\" are allowed!"
+       elif [[ "$s2a" != in  &&  "$s2a" != inopt  &&  "$s2a" != out ]]
+       then
+          printf "\n  +++ I/O-attribute in file $fileconnection_file has invalid"
+          printf "\n      value \"$s2\". Only \"in\", \"inopt\", and \"out\" are allowed!"
           locat=connect; exit
        fi
@@ -1024,6 +1056,6 @@
     then
 
-          # FILES WITH ATTRIBUTE locopt ARE OPTIONAL. NO ABORT, IF THEY DO NOT EXIST.
-       if [[ "${transin_pre[$i]}" != "locopt"  &&  "${transin_pre[$i]}" != "jobopt" ]]
+          # FILES WITH ATTRIBUTE opt ARE OPTIONAL. NO ABORT, IF THEY DO NOT EXIST.
+       if [[ "${optin_pre[$i]}" != "yes" ]]
        then
           printf "\n\n  +++ INPUT-file: "
@@ -1039,6 +1071,6 @@
           (( nr_of_input_files = nr_of_input_files + 1 ))
           localin[$nr_of_input_files]="${localin_pre[$i]}"
-          transin[$nr_of_input_files]="unavailable"
-          actionin[$nr_of_input_files]="${actionin_pre[$i]}"
+          optin[$nr_of_input_files]="${optin_pre[$i]}"
+          actionin[$nr_of_input_files]="unavailable"
           pathin[$nr_of_input_files]="${pathin_pre[$i]}"
           endin[$nr_of_input_files]="${endin_pre[$i]}"
@@ -1128,5 +1160,5 @@
           (( nr_of_input_files = nr_of_input_files + 1 ))
           localin[$nr_of_input_files]="${localin_pre[$i]}"$ending
-          transin[$nr_of_input_files]="${transin_pre[$i]}"
+          optin[$nr_of_input_files]="${optin_pre[$i]}"
           actionin[$nr_of_input_files]="${actionin_pre[$i]}"
           pathin[$nr_of_input_files]="${pathin_pre[$i]}"
@@ -1164,5 +1196,7 @@
               if [[ $cycle =~ ^-?[0-9]+$ ]]
               then
-                 (( icycle = $cycle ))
+                    # NUMBERS WITH LEADING ZEROS ARE INTERPRETED AS OCTAL NUMBERS
+                    # 10# EXPLICITLY SPECIFIES THE NUMBER BASE AS 10
+                 (( icycle = $((10#$cycle)) ))
               else
                  (( icycle = 0 ))
@@ -1755,6 +1789,6 @@
 
 
-    # WHEN CREATING A REMOTE BATCH JOB, THOSE INPUT FILES WITH JOB-ATTRIBUT WILL
-    # BE COPIED TO THE REMOTE HOST
+    # WHEN CREATING A REMOTE BATCH JOB, THOSE INPUT FILES WITH TRANSFER-ATTRIBUT
+    # WILL BE COPIED TO THE REMOTE HOST
  if [[ $create_remote_batch_job = true ]]
  then
@@ -1763,5 +1797,5 @@
     do
        (( i = i + 1 ))
-       if [[ "${transin[$i]}" = job  ||  "${transin[$i]}" = jobopt ]]
+       if [[ "${actionin[$i]}" = tr ]]
        then
           eval inputfile=${pathin[$i]}/${frelin[$i]}
@@ -1802,4 +1836,5 @@
        # PROVIDE THE INPUT FILES
        # LOOP OVER ALL ACTIVATED FILES (LISTED IN THE CONFIGURATION FILE)
+    optional_files_missing=false
     (( i = 0 ))
     while (( i < nr_of_input_files ))
@@ -1813,14 +1848,7 @@
 
           # SKIP OPTIONAL FILES, IF THEY DO NOT EXIST
-       if [[ "${transin[$i]}" = unavailable ]]
-       then
-          if [[ "${extin[$i]}" = ""  ||  "${extin[$i]}" = " " ]]
-          then
-             printf "\n  *** INFORMATIVE: input file \"${pathin[$i]}/${fname}${endin[$i]}\" "
-             printf "\n                   is not available!"
-          else
-             printf "\n  *** INFORMATIVE: input file \"${pathin[$i]}/${fname}${endin[$i]}.${extin[$i]}\" "
-             printf "\n                   is not available!"
-          fi
+       if [[ "${actionin[$i]}" = unavailable ]]
+       then
+          optional_files_missing=true
           continue
        fi
@@ -1887,5 +1915,5 @@
 
           # FILE IS STORED IN THE RESPECTIVE DIRECTORY GIVEN IN THE CONFIGURATION FILE
-       if [[ "${actionin[$i]}" = ""  ||  "${actionin[$i]}" = "di"  ||  "${actionin[$i]}" = "npe" ]]
+       if [[ "${actionin[$i]}" = ""  ||  "${actionin[$i]}" = "di"  ||  "${actionin[$i]}" = "tr"  ||  "${actionin[$i]}" = "npe" ]]
        then
 
@@ -1962,5 +1990,5 @@
                       printf "\n  --- WARNING: ln failed, using cp instead (might be time consuming...)"
 		                 fi
-                   if [[ $running_on_remote = true  &&  ( "${transin[$i]}" = job  ||  "${transin[$i]}" = jobopt ) ]]
+                   if [[ $running_on_remote = true  &&  "${actionin[$i]}" = tr ]]
                    then
                       mv  ${absnamein[$i]}  ${localin[$i]}
@@ -1976,4 +2004,8 @@
     if (( i != 0 ))
     then
+       if [[ $optional_files_missing = true ]]
+       then
+          printf "\n  *** INFORMATIVE: some optional INPUT-files are not present"
+       fi
        printf "\n$dashes\n  *** all INPUT-files provided \n"
     fi
@@ -2208,4 +2240,5 @@
           endout[$nr_of_output_files]="${endout_pre[$i]}"$ending
           extout[$nr_of_output_files]="${extout_pre[$i]}"
+          warnout[$nr_of_output_files]="${warnout_pre[$i]}"
 
        done
@@ -2268,5 +2301,7 @@
              if [[ $cycle =~ ^-?[0-9]+$ ]]
              then
-                (( icycle = $cycle + 1 ))
+                   # NUMBERS WITH LEADING ZEROS ARE INTERPRETED AS OCTAL NUMBERS
+                   # 10# EXPLICITLY SPECIFIES THE NUMBER BASE AS 10
+                (( icycle = $((10#$cycle)) + 1 ))
              else
                 (( icycle = 1 ))
@@ -2346,8 +2381,14 @@
        if [[ ! -f ${localout[$i]}  &&  $files_for_cores = false ]]
        then
-          printf "\n  +++ temporary OUTPUT-file  ${localout[$i]}  does not exist\n"
+          if [[ ${warnout[$i]} = true ]]
+          then
+             printf "\n  +++ temporary OUTPUT-file  ${localout[$i]}  does not exist\n"
+          fi
        elif [[ ! -d ${localout[$i]}  &&  $files_for_cores = true ]]
        then
-          printf "\n  +++ temporary OUTPUT-file  ${localout[$i]}/....  does not exist\n"
+          if [[ ${warnout[$i]} = true ]]
+          then
+             printf "\n  +++ temporary OUTPUT-file  ${localout[$i]}/....  does not exist\n"
+          fi
        else
 
Index: palm/trunk/SOURCE/check_open.f90
===================================================================
--- palm/trunk/SOURCE/check_open.f90	(revision 2663)
+++ palm/trunk/SOURCE/check_open.f90	(revision 2669)
@@ -25,4 +25,9 @@
 ! -----------------
 ! $Id$
+! file name extension for masked data files is changed to "_M##" and is now
+! appended at the end of the filename,
+! file ids not used any more have been removed
+! 
+! 2516 2017-10-04 11:03:04Z suehring
 ! Remove tabs
 ! 
@@ -184,5 +189,5 @@
     IMPLICIT NONE
 
-    CHARACTER (LEN=2)   ::  mask_char               !<
+    CHARACTER (LEN=4)   ::  mask_char               !<
     CHARACTER (LEN=2)   ::  suffix                  !<
     CHARACTER (LEN=30)  ::  filename                !<
@@ -209,5 +214,5 @@
     IF ( openfile(file_id)%opened_before )  THEN
        SELECT CASE ( file_id )
-          CASE ( 13, 14, 21, 22, 23, 80:85, 117 )
+          CASE ( 13, 14, 21, 22, 23, 80, 85, 117 )
              IF ( file_id == 14 .AND. openfile(file_id)%opened_before )  THEN
                 message_string = 're-open of unit ' //                         &
@@ -230,5 +235,5 @@
     SELECT CASE ( file_id )
 
-       CASE ( 15, 16, 17, 18, 19, 50:59, 81:84, 104:105, 107, 109, 117 )
+       CASE ( 15, 16, 17, 18, 19, 50:59, 104:105, 107, 109, 117 )
       
           IF ( myid /= 0 )  THEN
@@ -260,5 +265,5 @@
           ENDIF
 
-       CASE ( 27, 28, 29, 31, 33, 71:73, 90:99 )
+       CASE ( 90:99 )
 
 !
@@ -479,26 +484,4 @@
           ENDIF
 
-       CASE ( 81 )
-
-             OPEN ( 81, FILE='PLOTSP_X_PAR'//TRIM( coupling_char ),            &
-                        FORM='FORMATTED', DELIM='APOSTROPHE', RECL=1500,       &
-                        POSITION='APPEND' )
-
-       CASE ( 82 )
-
-             OPEN ( 82, FILE='PLOTSP_X_DATA'//TRIM( coupling_char ),           &
-                        FORM='FORMATTED', POSITION = 'APPEND' )
-
-       CASE ( 83 )
-
-             OPEN ( 83, FILE='PLOTSP_Y_PAR'//TRIM( coupling_char ),            &
-                        FORM='FORMATTED', DELIM='APOSTROPHE', RECL=1500,       &
-                        POSITION='APPEND' )
-
-       CASE ( 84 )
-
-             OPEN ( 84, FILE='PLOTSP_Y_DATA'//TRIM( coupling_char ),           &
-                        FORM='FORMATTED', POSITION='APPEND' )
-
        CASE ( 85 )
 
@@ -1078,13 +1061,13 @@
           IF ( file_id <= 200+max_masks )  THEN
              mid = file_id - 200
-             WRITE ( mask_char,'(I2.2)')  mid
-             filename = 'DATA_MASK_' // mask_char // '_NETCDF' //              &
-                        TRIM( coupling_char )
+             WRITE ( mask_char,'(A2,I2.2)')  '_M', mid
+             filename = 'DATA_MASK_NETCDF' // TRIM( coupling_char ) //         &
+                        mask_char
              av = 0
           ELSE
              mid = file_id - (200+max_masks)
-             WRITE ( mask_char,'(I2.2)')  mid
-             filename = 'DATA_MASK_' // mask_char // '_AV_NETCDF' //           &
-                        TRIM( coupling_char )
+             WRITE ( mask_char,'(A2,I2.2)')  '_M', mid
+             filename = 'DATA_MASK_AV_NETCDF' // TRIM( coupling_char ) //      &
+                        mask_char
              av = 1
           ENDIF
Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 2663)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 2669)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! mrun-string replaced by palmrun
+! 
+! 2628 2017-11-20 12:40:38Z schwenkel
 ! Enabled particle advection with grid stretching -> Removed parameter check
 ! 
@@ -1022,5 +1025,5 @@
 !--    ocean run (this setting is done via mrun-option -y)
        message_string = 'ocean = .F. does not allow coupling_char = "' //      &
-                        TRIM( coupling_char ) // '" set by mrun-option "-y"'
+                        TRIM( coupling_char ) // '" set by palmrun-option "-y"'
        CALL message( 'check_parameters', 'PA0317', 1, 2, 0, 6, 0 )
 
Index: palm/trunk/SOURCE/init_coupling.f90
===================================================================
--- palm/trunk/SOURCE/init_coupling.f90	(revision 2663)
+++ palm/trunk/SOURCE/init_coupling.f90	(revision 2669)
@@ -25,4 +25,7 @@
 ! ------------------
 ! $Id$
+! file extension for vertical nesting changed to "_NV"
+! 
+! 2365 2017-08-21 14:59:59Z kanani
 ! Vertical nesting implemented (SadiqHuq)
 ! 
@@ -192,5 +195,5 @@
 !
 !-- Set file extension for vertical nesting
-       coupling_char = '_N'
+       coupling_char = '_NV'
     ENDIF
 
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 2663)
+++ palm/trunk/SOURCE/modules.f90	(revision 2669)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! CONTIGUOUS-attribut added to 3d pointer arrays,
+! coupling_char extended to LEN=8
+! 
+! 2575 2017-10-24 09:57:58Z maronga
 ! Renamed phi -> latitude, moved longitude from radiation model to modules
 ! 
@@ -776,46 +780,46 @@
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  w_3     !< pointer for swapping of timelevels for respective quantity
 
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  e          !< pointer: subgrid-scale turbulence kinetic energy (sgs tke)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  e_p        !< pointer: prognostic value of sgs tke
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  nc         !< pointer: cloud drop number density
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  nc_p       !< pointer: prognostic value of cloud drop number density
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  nr         !< pointer: rain drop number density
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  nr_p       !< pointer: prognostic value of rain drop number density
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  prho       !< pointer: potential density
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  pt         !< pointer: potential temperature
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  pt_p       !< pointer: prognostic value of potential temperature
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  q          !< pointer: specific humidity
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  q_p        !< pointer: prognostic value of specific humidity
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  qc         !< pointer: cloud water content
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  qc_p       !< pointer: cloud water content
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  ql         !< pointer: liquid water content
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  ql_c       !< pointer: change in liquid water content due to 
-                                                       !< condensation/evaporation during last time step
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  qr         !< pointer: rain water content
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  qr_p       !< pointer: prognostic value of rain water content
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  rho_ocean  !< pointer: density of ocean
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  s          !< pointer: passive scalar
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  s_p        !< pointer: prognostic value of passive scalar
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  sa         !< pointer: ocean salinity
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  sa_p       !< pointer: prognostic value of ocean salinity
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  te_m       !< pointer: weighted tendency of e for previous sub-timestep (Runge-Kutta)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  tnc_m      !< pointer: weighted tendency of nc for previous sub-timestep (Runge-Kutta)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  tnr_m      !< pointer: weighted tendency of nr for previous sub-timestep (Runge-Kutta)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  tpt_m      !< pointer: weighted tendency of pt for previous sub-timestep (Runge-Kutta)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  tq_m       !< pointer: weighted tendency of q for previous sub-timestep (Runge-Kutta)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  tqc_m      !< pointer: weighted tendency of qc for previous sub-timestep (Runge-Kutta)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  tqr_m      !< pointer: weighted tendency of qr for previous sub-timestep (Runge-Kutta)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  ts_m       !< pointer: weighted tendency of s for previous sub-timestep (Runge-Kutta)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  tsa_m      !< pointer: weighted tendency of sa for previous sub-timestep (Runge-Kutta)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  tu_m       !< pointer: weighted tendency of u for previous sub-timestep (Runge-Kutta)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  tv_m       !< pointer: weighted tendency of v for previous sub-timestep (Runge-Kutta)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  tw_m       !< pointer: weighted tendency of w for previous sub-timestep (Runge-Kutta)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  u          !< pointer: horizontal velocity component u (x-direction)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  u_p        !< pointer: prognostic value of u
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  v          !< pointer: horizontal velocity component v (y-direction)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  v_p        !< pointer: prognostic value of v
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  vpt        !< pointer: virtual potential temperature
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  w          !< pointer: vertical velocity component w (z-direction)
-    REAL(wp), DIMENSION(:,:,:), POINTER ::  w_p        !< pointer: prognostic value of w
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  e          !< pointer: subgrid-scale turbulence kinetic energy (sgs tke)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  e_p        !< pointer: prognostic value of sgs tke
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  nc         !< pointer: cloud drop number density
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  nc_p       !< pointer: prognostic value of cloud drop number density
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  nr         !< pointer: rain drop number density
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  nr_p       !< pointer: prognostic value of rain drop number density
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  prho       !< pointer: potential density
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  pt         !< pointer: potential temperature
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  pt_p       !< pointer: prognostic value of potential temperature
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  q          !< pointer: specific humidity
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  q_p        !< pointer: prognostic value of specific humidity
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  qc         !< pointer: cloud water content
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  qc_p       !< pointer: cloud water content
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  ql         !< pointer: liquid water content
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  ql_c       !< pointer: change in liquid water content due to
+                                                                   !< condensation/evaporation during last time step
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  qr         !< pointer: rain water content
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  qr_p       !< pointer: prognostic value of rain water content
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  rho_ocean  !< pointer: density of ocean
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  s          !< pointer: passive scalar
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  s_p        !< pointer: prognostic value of passive scalar
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  sa         !< pointer: ocean salinity
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  sa_p       !< pointer: prognostic value of ocean salinity
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  te_m       !< pointer: weighted tendency of e for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tnc_m      !< pointer: weighted tendency of nc for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tnr_m      !< pointer: weighted tendency of nr for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tpt_m      !< pointer: weighted tendency of pt for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tq_m       !< pointer: weighted tendency of q for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tqc_m      !< pointer: weighted tendency of qc for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tqr_m      !< pointer: weighted tendency of qr for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  ts_m       !< pointer: weighted tendency of s for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tsa_m      !< pointer: weighted tendency of sa for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tu_m       !< pointer: weighted tendency of u for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tv_m       !< pointer: weighted tendency of v for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tw_m       !< pointer: weighted tendency of w for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  u          !< pointer: horizontal velocity component u (x-direction)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  u_p        !< pointer: prognostic value of u
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  v          !< pointer: horizontal velocity component v (y-direction)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  v_p        !< pointer: prognostic value of v
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  vpt        !< pointer: virtual potential temperature
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  w          !< pointer: vertical velocity component w (z-direction)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  w_p        !< pointer: prognostic value of w
 #endif
 
@@ -971,5 +975,6 @@
     CHARACTER (LEN=1)    ::  cycle_mg = 'w'                               !< namelist parameter (see documentation)
     CHARACTER (LEN=1)    ::  timestep_reason = ' '                        !< 'A'dvection or 'D'iffusion criterion, written to RUN_CONTROL file
-    CHARACTER (LEN=3)    ::  coupling_char = ''                           !< appended to filenames in coupled ocean-atmosphere runs ('_O': ocean PE, '_A': atmosphere PE)
+    CHARACTER (LEN=8)    ::  coupling_char = ''                           !< appended to filenames in coupled or nested runs ('_O': ocean PE,
+                                                                          !< '_NV': vertically nested atmosphere PE, '_N##': PE of nested domain ##
     CHARACTER (LEN=8)    ::  most_method = 'newton'                       !< namelist parameter
     CHARACTER (LEN=8)    ::  run_date                                     !< date of simulation run, printed to HEADER file
Index: palm/trunk/SOURCE/plant_canopy_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 2663)
+++ palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 2669)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! coupling_char removed
+! 
+! 2512 2017-10-04 08:26:59Z raasch
 ! upper bounds of 3d output changed from nx+1,ny+1 to nx,ny
 ! no output of ghost layer data
@@ -564,6 +567,6 @@
 
        USE control_parameters,                                                 &
-           ONLY:  coupling_char, dz, humidity, io_blocks, io_group,            &
-                  message_string, ocean, passive_scalar, urban_surface
+           ONLY: dz, humidity, io_blocks, io_group, message_string, ocean,     &
+                 passive_scalar, urban_surface
 
        USE surface_mod,                                                        &
Index: palm/trunk/SOURCE/pmc_interface_mod.f90
===================================================================
--- palm/trunk/SOURCE/pmc_interface_mod.f90	(revision 2663)
+++ palm/trunk/SOURCE/pmc_interface_mod.f90	(revision 2669)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! file extension for nested domains changed to "_N##",
+! created flag file in order to enable combine_plot_fields to process nest data
+! 
+! 2663 2017-12-04 17:40:50Z suehring
 ! Bugfix, wrong coarse-grid index in init_tkefactor used.
 ! 
@@ -561,5 +565,5 @@
     IF ( cpl_id >= 2 )  THEN
        nest_domain = .TRUE.
-       WRITE( coupling_char, '(A1,I2.2)') '_', cpl_id
+       WRITE( coupling_char, '(A2,I2.2)') '_N', cpl_id
     ENDIF
 
@@ -591,4 +595,6 @@
     IMPLICIT NONE
 
+    INTEGER(iwp) ::  ncpl   !<  number of nest domains
+
     CALL location_message( 'setup the nested model configuration', .FALSE. )
 !
@@ -605,4 +611,10 @@
 !-- (e.g., all children have to follow the end_time settings of the root master)
     CALL pmci_check_setting_mismatches
+!
+!-- Set flag file for combine_plot_fields for precessing the nest output data
+    OPEN( 90, FILE='3DNESTING', FORM='FORMATTED' )
+    CALL pmc_get_model_info( ncpl = ncpl )
+    WRITE( 90, '(I2)' )  ncpl
+    CLOSE( 90 )
 
     CALL location_message( 'finished', .TRUE. )
Index: palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
===================================================================
--- palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90	(revision 2663)
+++ palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90	(revision 2669)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! unit number for file containing turbulence generator data changed to 90
+! bugfix: preprocessor directives added for MPI specific code
+! 
+! 2576 2017-10-24 13:49:46Z Giersch
 ! Definition of a new function called stg_skip_var_list to skip module 
 ! parameters during reading restart data
@@ -312,6 +316,8 @@
     IMPLICIT NONE
 
+#if defined( __parallel )
     INTEGER(KIND=MPI_ADDRESS_KIND) :: extent !< extent of new MPI type
     INTEGER(KIND=MPI_ADDRESS_KIND) :: tob=0  !< dummy variable
+#endif
 
     INTEGER(iwp) :: j                        !> loop index
@@ -362,4 +368,5 @@
                tu(nzb:nzt+1),  tv(nzb:nzt+1),  tw(nzb:nzt+1)   )
 
+#if defined( __parallel )
 !
 !-- Define MPI type used in stg_generate_seed_yz to gather vertical splitted
@@ -391,4 +398,5 @@
        displs(j) = 0 + (nzt_x-nzb_x+1) * (j-1)
     ENDDO
+#endif
 
 !
@@ -408,12 +416,12 @@
 !-- zw: lwy, lwz, tw, r31, r32, r33, d3
 !-- WARNING: zz is not used at the moment
-    OPEN( 24, FILE='STG_PROFILES'//TRIM( coupling_char ), STATUS='OLD',        &
+    OPEN( 90, FILE='STG_PROFILES'//TRIM( coupling_char ), STATUS='OLD',        &
                    FORM='FORMATTED')
 
     ! Skip header
-    READ( 24, * )
+    READ( 90, * )
 
     DO  k = nzb, nzt+1
-       READ( 24, * ) zz, luy, luz, tu(k), lvy, lvz, tv(k), lwy, lwz, tw(k),    &
+       READ( 90, * ) zz, luy, luz, tu(k), lvy, lvz, tv(k), lwy, lwz, tw(k),    &
                      r11(k), r21(k), r22(k), r31(k), r32(k), r33(k),           &
                      d1, d2, d3, d5
@@ -438,5 +446,5 @@
     ENDDO
 
-    CLOSE(24)
+    CLOSE( 90 )
 
 !
Index: palm/trunk/SOURCE/wind_turbine_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 2663)
+++ palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 2669)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! filename of turbine output changed to WTM_OUTPUT_DATA. File extension now
+! includes the nest domain number. Turbine extension changed to "_T##"
+!
+! 2576 2017-10-24 13:49:46Z Giersch
 ! Definition of a new function called wtm_skip_var_list to skip module 
 ! parameters during reading restart data
@@ -113,6 +117,6 @@
 
     USE control_parameters,                                                    &
-        ONLY:  dt_3d, dz, message_string, simulated_time, wind_turbine,        & 
-               initializing_actions
+        ONLY:  coupling_char, dt_3d, dz, message_string, simulated_time,       &
+               wind_turbine, initializing_actions
 
     USE cpulog,                                                                &
@@ -1556,5 +1560,5 @@
        IMPLICIT NONE
 
-       CHARACTER (LEN=2) ::  turbine_id
+       CHARACTER (LEN=4) ::  turbine_id
 
        INTEGER(iwp) ::  i, j, k          !< loop indices
@@ -2367,7 +2371,8 @@
                 ELSE
 
-                   WRITE ( turbine_id,'(I2.2)')  inot
-                   OPEN ( 400+inot, FILE=( 'TURBINE_PARAMETERS'//turbine_id ), &
-                                            FORM='FORMATTED' )
+                   WRITE ( turbine_id,'(A2,I2.2)')  '_T', inot
+                   OPEN ( 400+inot, FILE=( 'WTM_OUTPUT_DATA' //                &
+                                           TRIM( coupling_char ) //            &
+                                           turbine_id ), FORM='FORMATTED' )
                    WRITE ( 400+inot, 105 ) inot
                    WRITE ( 400+inot, 106 ) simulated_time, omega_rot(inot),    &
Index: palm/trunk/UTIL/combine_plot_fields.f90
===================================================================
--- palm/trunk/UTIL/combine_plot_fields.f90	(revision 2663)
+++ palm/trunk/UTIL/combine_plot_fields.f90	(revision 2669)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! data of 3d-nest runs are completely processed now
+! 
+! 2523 2017-10-05 14:42:47Z kanani
 ! Increased LEN for CHARACTER variable var_name, equal to the value in PALM
 ! 
@@ -105,5 +108,6 @@
 !
 !-- Local variables
-    CHARACTER (LEN=2)    ::  modus, model_string
+    CHARACTER (LEN=2)    ::  modus
+    CHARACTER (LEN=4)    ::  model_string
     CHARACTER (LEN=6)    ::  id_string
     CHARACTER (LEN=30)   ::  dimname, var_name
@@ -116,7 +120,6 @@
     INTEGER(iwp) ::  av, danz, i, id, j, k, model, models, nc_stat,            &
                      nxa, nxag, nxe, nxeg, nya, nyag, nye, nyeg,               &
-                     nza, nze, pos, time_step,                                 &
-                     xa, xe, xxa, xxe, ya, ya_do, ya_tot, ye, ye_do, ye_tot, yya, yye, za,   &
-                     ze, zza, zze
+                     nza, nze, pos, time_step, xa, xe, xxa, xxe, ya, ya_do,    &
+                     ya_tot, ye, ye_do, ye_tot, yya, yye, za, ze, zza, zze
 
     INTEGER(8)                        ::  count, count_rate
@@ -128,6 +131,6 @@
     INTEGER(iwp), DIMENSION(0:1,1000) ::  id_var, levels
 
-    LOGICAL  ::  found, netcdf_output, netcdf_parallel, netcdf_0, netcdf_1
-    LOGICAL  ::  vnest
+    LOGICAL  ::  found, nest3d, netcdf_output, netcdf_parallel, netcdf_0,      &
+                 netcdf_1, vnest
 
     REAL(wp) ::  cpu_start_time, cpu_end_time, dx, simulated_time
@@ -142,7 +145,8 @@
 
 !
-!-- Find out if a coupled run has been carried out
+!-- Find out if a coupled or nested run has been carried out
     INQUIRE( FILE='COUPLING_PORT_OPENED', EXIST=found )
     INQUIRE( FILE='VNESTING_PORT_OPENED', EXIST=vnest )
+    INQUIRE( FILE='3DNESTING', EXIST=nest3d )
     IF ( found )  THEN
        models = 2
@@ -151,4 +155,10 @@
        models = 2
        PRINT*, '    Vertically nested grid coupling'
+    ELSEIF ( nest3d )  THEN
+       OPEN( 90, FILE='3DNESTING', FORM='FORMATTED' )
+       READ ( 90, '(I2)' )  models
+       CLOSE ( 90 )
+       PRINT*, '    3d-nest run'
+       PRINT*, '    number of nest domains = ', models
     ELSE
        models = 1
@@ -171,7 +181,6 @@
 !
 !--    Set the model string used to identify the filenames
-       IF ( models == 2 )  THEN
+       IF ( found  .OR.  vnest )  THEN
           PRINT*, ''
-          PRINT*, '*** combine_plot_fields ***'
           IF ( model == 2 )  THEN
              IF ( vnest )  THEN
@@ -193,4 +202,12 @@
              ENDIF
           ENDIF
+       ELSEIF ( nest3d )  THEN
+          PRINT*, ''
+          PRINT*, '--> processing nest id = ', model
+          IF ( model == 1 )  THEN
+             model_string = ''
+          ELSE
+             WRITE( model_string, '(A2,I2.2)' )  '_N', model
+          ENDIF
        ENDIF
 !
@@ -260,5 +277,4 @@
 !--       Info-output
           PRINT*, ''
-          PRINT*, '*** combine_plot_fields ***'
 #if defined( __netcdf )
           IF ( netcdf_output )  THEN
@@ -568,5 +584,4 @@
 !--    Info-output
        PRINT*, ' '
-       PRINT*, '*** combine_plot_fields ***'
 
 !
