Index: palm/trunk/DOC/app/chapter_3.9.html
===================================================================
--- palm/trunk/DOC/app/chapter_3.9.html	(revision 209)
+++ palm/trunk/DOC/app/chapter_3.9.html	(revision 210)
@@ -38,8 +38,9 @@
 carried out in order to create a (quasi-) stationary state. Since the
 horizontal average from this precursor run is used as the mean inflow
-profile for the main run, the wall-normal velocity component must point
+profile for the main run, <span style="font-weight: bold;">the
+wall-normal velocity component must point
 into the domain at every grid point and its magnitude should be large
 enough in order to guarantee an inflow even if a turbulence signal is
-added.<br></li><li>The
+added</span>.<br></li><li>The
 main run requires&nbsp;from the precursor run&nbsp;the mean profiles to
 be used at the inflow. For this, the horizontally and temporally
Index: palm/trunk/SCRIPTS/mbuild
===================================================================
--- palm/trunk/SCRIPTS/mbuild	(revision 209)
+++ palm/trunk/SCRIPTS/mbuild	(revision 210)
@@ -728,5 +728,5 @@
         (lcmuk)          remote_addres=130.75.105.2;;
         (lcsgib)         remote_addres=130.73.232.102;;
-        (lcsgih)         remote_addres=130.75.4.102;;
+        (lcsgih)         remote_addres=130.75.4.103;;
         (lctit)          remote_addres=172.17.75.161;;
         (lcxt4)          remote_addres=129.177.20.113;;
@@ -1309,5 +1309,5 @@
              then
 
-                print ". /usr/share/modules/init/bash; module load mpt; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
+                print ". /usr/share/modules/init/bash; module load mpt/1.21; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
 #                print ". /usr/share/modules/init/bash; module load mvapich2/1.2rc1-intel; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
 #                print ". /usr/share/modules/init/bash; module load mvapich2; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 209)
+++ palm/trunk/SCRIPTS/mrun	(revision 210)
@@ -154,5 +154,7 @@
      # 08/08/08 - Marcus - typo removed in lcxt4 branch
      # 17/09/08 - Siggi  - restart mechanism adjusted for lcsgi
-     # 02/10/09 - BjornM - argument "-Y" modified, adjustments for coupled runs
+     # 02/10/08 - BjornM - argument "-Y" modified, adjustments for coupled runs
+     # 21/10/08 - Siggi  - bugfix for the case that -K has more than one
+     #                     argument
  
     # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
@@ -396,5 +398,5 @@
        (C)   restart_run=true; mc="$mc -C";;
        (d)   fname=$OPTARG; mc="$mc -d$OPTARG";;
-       (D)   cpp_opts="$cpp_opts $OPTARG"; mc="$mc -D$OPTARG";;
+       (D)   cpp_opts="$cpp_opts $OPTARG"; mc="$mc -D'$OPTARG'";;
        (F)   job_on_file="-D"; mc="$mc -F";;
        (g)   group_number=$OPTARG; mc="$mc -g$OPTARG";;
@@ -405,5 +407,5 @@
        (I)   ignore_archive_error=true; mc="$mc -I";;
        (k)   keep_data_from_previous_run=true; mc="$mc -k";;
-       (K)   additional_conditions="$OPTARG"; mc="$mc -K$OPTARG";;
+       (K)   additional_conditions="$OPTARG"; mc="$mc -K'$OPTARG'";;
        (m)   memory=$OPTARG; mc="$mc -m$OPTARG";;
        (M)   makefile=$OPTARG; mc="$mc -M$OPTARG";;
@@ -2320,5 +2322,5 @@
        then
           printf "      compiler is called via ssh on \"hicegate\" \n"
-          ssh  130.75.4.102  -l $usern  ". /usr/share/modules/init/bash; module load mpt; cd $TEMPDIR; make -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" 2>&1 "
+          ssh  130.75.4.103  -l $usern  ". /usr/share/modules/init/bash; module load mpt; cd $TEMPDIR; make -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" 2>&1 "
 #          ssh  130.75.4.102  -l $usern  ". /usr/share/modules/init/bash; module load mvapich2; cd $TEMPDIR; make -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" 2>&1 "
 #          print  ". /usr/share/modules/init/bash; module load mpt; cd $TEMPDIR; make -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" " | ssh  ${usern}@130.75.4.102  2>&1
@@ -2919,4 +2921,5 @@
 #                   export MV2_CPU_MAPPING=0:1:2:3
 #                   mpiexec    ./a.out  $ROPTS
+#                   export MPI_LAUNCH_TIMEOUT=360
                    mpiexec_mpt -np $ii   ./a.out  $ROPTS
                 elif [[ $host = lcxt4 ]]
Index: palm/trunk/SCRIPTS/subjob
===================================================================
--- palm/trunk/SCRIPTS/subjob	(revision 209)
+++ palm/trunk/SCRIPTS/subjob	(revision 210)
@@ -161,4 +161,5 @@
      (autan)                 local_addres=130.75.105.57;  local_host=lcmuk;;
      (bora)                  local_addres=130.75.105.103; local_host=lcmuk;;
+     (bicegate1)             local_addres=130.73.232.102; local_host=lcsgib;;
      (breg*-en0|berni*-en0)  local_addres=130.73.230.10;  local_host=ibmb;;
      (breva)                 local_addres=130.75.105.98;  local_host=lcmuk;;
@@ -175,4 +176,6 @@
      (hababai)               local_addres=130.75.105.108; local_host=lcmuk;;
      (hexagon.bccs.uib.no)   local_addres=129.177.20.113; local_host=lcxt4;;
+     (hicegate1)             local_addres=130.75.4.102;   local_host=lcsgih;;
+     (hicegate2)             local_addres=130.75.4.103;   local_host=lcsgih;;
      (hreg*-en0|hanni*-en0)  local_addres=130.75.4.10;    local_host=ibmh;;
      (h01*)                  local_addres=130.75.4.102;   local_host=lcsgih;;
@@ -187,5 +190,4 @@
      (quanero)               local_addres=130.75.105.107; local_host=lcmuk;;
      (scirocco)              local_addres=172.20.25.41;   local_host=lcmuk;;
-     (service100)            local_addres=130.75.4.102;   local_host=lcsgih;;
      (sun1|sun2)             local_addres=130.75.6.1;     local_host=unics;;
      (r1*)                   local_addres=130.75.4.102;   local_host=lcsgih;;
@@ -317,5 +319,5 @@
 	(lcfimm) remote_addres=172.20.4.2; submcom=/opt/torque/bin/qsub;;
         (lcsgib) queue=smallq; remote_addres=130.73.232.102; submcom=/opt/moab/bin/msub;;
-        (lcsgih) queue=smallq; remote_addres=130.75.4.102; submcom=/opt/moab/bin/msub;;
+        (lcsgih) queue=smallq; remote_addres=130.75.4.103; submcom=/opt/moab/bin/msub;;
         (lctit)  queue=lctit; remote_addres=172.17.75.161; submcom=/n1ge/TITECH_GRID/tools/bin/n1ge;;
         (lcxt4)	 remote_addres=129.177.20.113; submcom=/opt/torque/2.3.0/bin/qsub;;
@@ -701,5 +703,5 @@
 
 . /usr/share/modules/init/bash
-module load mpt
+module load mpt/1.21
 # module load mvapich2/1.2rc1-intel
 # module load mvapich2
@@ -1145,5 +1147,5 @@
     else
        cd  $job_catalog
-       if [[ $(echo $local_host | cut -c1-3) = ibm ]]
+       if [[ $(echo $local_host | cut -c1-5) = lcsgi  ||  $(echo $local_host | cut -c1-3) = ibm ]]
        then
           eval  $submcom  $job_on_remhost
Index: palm/trunk/SOURCE/CURRENT_MODIFICATIONS
===================================================================
--- palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 209)
+++ palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 210)
@@ -7,6 +7,8 @@
 (-Y option). Adjustments in mrun, mbuild, and subjob for lcxt4.
 
+DVRP arguments changed to single precision, mode pathlines added
 
-check_for_restart, check_parameters, init_dvrp, init_pegrid, local_stop, modules, palm, surface_coupler, timestep
+
+check_for_restart, check_parameters, data_output_dvrp, init_dvrp, init_pegrid, local_stop, modules, package_parin, palm, surface_coupler, timestep
 Makefile, mrun, mbuild, subjob
 
@@ -21,4 +23,9 @@
 ------
 
+Size of pf3d adjusted to the required output size (1 gridpoint less, along
+all three dimensions), because output of a subset of the data
+(pf3d(nxa:nxe...) in the NF90_PUT_VAR statement caused segmentation fault
+with the INTEL compiler. (combine_plot_fields)
+
 Bugfix: error in zu index in case of section_xy = -1 (header)
 
@@ -27,3 +34,3 @@
 dwdy, dvdx and dwdx. (production_e)
 
-header, production_e 
+combine_plot_fields, header, production_e
Index: palm/trunk/SOURCE/data_output_dvrp.f90
===================================================================
--- palm/trunk/SOURCE/data_output_dvrp.f90	(revision 209)
+++ palm/trunk/SOURCE/data_output_dvrp.f90	(revision 210)
@@ -32,5 +32,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! DVRP arguments changed to single precision, mode pathlines added
 ! TEST: different colours for isosurfaces
 ! TEST: write statements
@@ -72,4 +72,5 @@
     USE arrays_3d
     USE cloud_parameters
+    USE constants
     USE cpulog
     USE DVRP
@@ -87,9 +88,13 @@
     CHARACTER (LEN=2) ::  section_chr
     CHARACTER (LEN=6) ::  output_variable
-    INTEGER ::  i, j, k, l, m, n, nn, section_mode, tv, vn
+    INTEGER ::  c_mode, c_size_x, c_size_y, c_size_z, gradient_normals, i, j, &
+                k, l, m, n, nn, section_mode, tv, vn
     INTEGER, DIMENSION(:), ALLOCATABLE ::  p_c, p_t
-    REAL    ::  center(3), distance, slicer_position, surface_value
-    REAL, DIMENSION(:),     ALLOCATABLE ::  psize, p_x, p_y, p_z
-    REAL, DIMENSION(:,:,:), ALLOCATABLE ::  local_pf
+    REAL(4) ::  center(3), distance, slicer_position, surface_value,         &
+                tmp_alpha, tmp_alpha_w, tmp_b, tmp_c_alpha, tmp_g, tmp_norm, &
+                tmp_pos, tmp_r, tmp_t, tmp_th
+    REAL(4), DIMENSION(:),     ALLOCATABLE   ::  psize, p_x, p_y, p_z
+    REAL(4), DIMENSION(:,:,:), ALLOCATABLE   ::  local_pf
+    REAL(4), DIMENSION(:,:,:,:), ALLOCATABLE ::  local_pfi
 
 
@@ -112,5 +117,5 @@
 !   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: vor steering_update'
 !   CALL local_flush( 9 )
-          CALL DVRP_STEERING_UPDATE( m-1, data_output_dvrp )
+!          CALL DVRP_STEERING_UPDATE( m-1, data_output_dvrp )
 !   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: nach steering_update'
 !   CALL local_flush( 9 )
@@ -157,6 +162,7 @@
 !
 !--       Definition of characteristics of particle material
-!          CALL DVRP_MATERIAL_RGB( m-1, 1, 0.1, 0.7, 0.1, 0.0 )
-          CALL DVRP_MATERIAL_RGB( m-1, 1, 0.0, 0.0, 0.0, 0.0 )
+!          tmp_r = 0.1;  tmp_g = 0.7;  tmp_b = 0.1;  tmp_t = 0.0
+          tmp_r = 0.0;  tmp_g = 0.0;  tmp_b = 0.0;  tmp_t = 0.0
+          CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
 
 !
@@ -437,13 +443,19 @@
 !
 !--          Definition of characteristics of isosurface material
-!--          Preliminary settings for w!
+!--          Preliminary settings for w and pt!
              IF ( output_variable == 'w' )  THEN
                 IF ( tv == 1 )  THEN
-                   CALL DVRP_MATERIAL_RGB( m-1, 1, 0.8, 0.1, 0.1, 0.0 )
+                   tmp_r = 0.8;  tmp_g = 0.1;  tmp_b = 0.1;  tmp_t = 0.0
+                   CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
                 ELSE
-                   CALL DVRP_MATERIAL_RGB( m-1, 1, 0.1, 0.1, 0.8, 0.0 )
+                   tmp_r = 0.1;  tmp_g = 0.1;  tmp_b = 0.8;  tmp_t = 0.0
+                   CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
                 ENDIF
+             ELSEIF ( output_variable == 'pt' )  THEN
+                tmp_r = 0.8;  tmp_g = 0.1;  tmp_b = 0.1;  tmp_t = 0.0
+                CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
              ELSE
-                CALL DVRP_MATERIAL_RGB( m-1, 1, 0.9, 0.9, 0.9, 0.0 )
+                tmp_r = 0.9;  tmp_g = 0.9;  tmp_b = 0.9;  tmp_t = 0.0
+                CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
              ENDIF
 
@@ -452,6 +464,23 @@
              CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, &
                              cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
-             CALL DVRP_THRESHOLD( m-1, threshold(tv) )
-             CALL DVRP_VISUALIZE( m-1, 1, dvrp_filecount )
+
+             c_size_x = vc_size_x;  c_size_y = vc_size_y;  c_size_z = vc_size_z
+             CALL DVRP_CLUSTER_SIZE( m-1, c_size_x, c_size_y, c_size_z )
+
+             c_mode   = vc_mode 
+             CALL DVRP_CLUSTERING_MODE( m-1, c_mode )
+
+             gradient_normals = vc_gradient_normals
+             CALL DVRP_GRADIENTNORMALS( m-1, gradient_normals )
+!
+!--          A seperate procedure for setting vc_alpha will be in the next
+!--          version of libDVRP
+             tmp_c_alpha = vc_alpha 
+             CALL DVRP_THRESHOLD( -(m-1)-1, tmp_c_alpha )
+
+             tmp_th = threshold(tv)
+             CALL DVRP_THRESHOLD( m-1, tmp_th )
+             CALL DVRP_VISUALIZE( m-1, 21, dvrp_filecount )
+
 !   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: ende isosurface'
 !   CALL local_flush( 9 )
@@ -469,5 +498,6 @@
 !
 !--          Material and color definitions
-             CALL DVRP_MATERIAL_RGB( m-1, 1, 0.0, 0.0, 0.0, 0.0 )
+             tmp_r = 0.0;  tmp_g = 0.0;  tmp_b = 0.0;  tmp_t = 0.0
+             CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
 
              islice_dvrp = islice_dvrp + 1
@@ -487,5 +517,6 @@
                              cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
 !             CALL DVRP_SLICER( m-1, section_mode, slicer_position )
-             CALL DVRP_SLICER( m-1, 2, 1.0 )
+             tmp_pos = 1.0
+             CALL DVRP_SLICER( m-1, 2, tmp_pos )
              WRITE (9,*) 'nx_dvrp=', nx_dvrp
              WRITE (9,*) 'ny_dvrp=', ny_dvrp
@@ -505,4 +536,35 @@
           DEALLOCATE( local_pf )
 
+       ELSEIF ( mode_dvrp(m)(1:9) == 'pathlines' ) THEN
+
+          ALLOCATE( local_pfi(4,nxl:nxr+1,nys:nyn+1,nzb:nz_do3d) )
+          DO  i = nxl, nxr+1
+             DO  j = nys, nyn+1
+                DO  k = nzb, nz_do3d
+                   local_pfi(1,i,j,k) = u(k,j,i)
+                   local_pfi(2,i,j,k) = v(k,j,i)
+                   local_pfi(3,i,j,k) = w(k,j,i)
+                   tmp_norm           = SQRT( u(k,j,i) * u(k,j,i) + &
+                                              v(k,j,i) * v(k,j,i) + &
+                                              w(k,j,i) * w(k,j,i) )
+                   tmp_alpha          = ACOS( 0.0 * u(k,j,i) / tmp_norm + &
+                                              0.0 * v(k,j,i) / tmp_norm - &
+                                              1.0 * w(k,j,i) / tmp_norm )
+                   tmp_alpha_w        = tmp_alpha / pi * 180.0
+                   local_pfi(4,i,j,k) = tmp_alpha_w
+                ENDDO
+             ENDDO
+          ENDDO
+
+          CALL cpu_log( log_point_s(31), 'dvrp_pathlines', 'start' )
+
+          CALL DVRP_DATA( m-1, local_pfi, 4, nx_dvrp, ny_dvrp, nz_dvrp, &
+                          cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
+          CALL DVRP_VISUALIZE( m-1, 20, dvrp_filecount )
+
+          CALL cpu_log( log_point_s(31), 'dvrp_pathlines', 'stop' )
+
+          DEALLOCATE( local_pfi )
+
        ENDIF
 
Index: palm/trunk/SOURCE/init_dvrp.f90
===================================================================
--- palm/trunk/SOURCE/init_dvrp.f90	(revision 209)
+++ palm/trunk/SOURCE/init_dvrp.f90	(revision 210)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! DVRP arguments changed to single precision, mode pathlines added
 ! TEST: print* statements
 ! ToDo: checking of mode_dvrp for legal values is not correct
@@ -50,8 +50,4 @@
     USE control_parameters
 
-!
-!-- New coupling
-    USE coupling
-
     IMPLICIT NONE
 
@@ -61,7 +57,9 @@
     INTEGER ::  i, j, k, l, m, pn, tv, vn
     LOGICAL ::  allocated
-    REAL    ::  center(3), distance
-
-    REAL, DIMENSION(:,:,:), ALLOCATABLE ::  local_pf
+    REAL(4) ::  center(3), distance, tmp_b, tmp_g, tmp_r, tmp_t, tmp_th, &
+                tmp_thr, tmp_x1, tmp_x2, tmp_y1, tmp_y2, tmp_z1, tmp_z2, &
+                tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tmp_7
+
+    REAL(4), DIMENSION(:,:,:), ALLOCATABLE ::  local_pf
 
     TYPE(CSTRING), SAVE ::  dvrp_directory_c, dvrp_file_c, &
@@ -130,5 +128,6 @@
        IF ( mode_dvrp(m)(1:10) /= 'isosurface'  .AND. &
             mode_dvrp(m)(1:6)  /= 'slicer'      .AND. &
-            mode_dvrp(m)(1:9)  /= 'particles' )  THEN
+            mode_dvrp(m)(1:9)  /= 'particles'   .AND. &
+            mode_dvrp(m)(1:9)  /= 'pathlines' )  THEN
 
           IF ( myid == 0 )  THEN
@@ -200,9 +199,13 @@
 !
 !--       Define bounding box material and create a bounding box
-          CALL DVRP_MATERIAL_RGB( m-1, 1, 0.5, 0.5, 0.5, 0.0 )
-          CALL DVRP_BOUNDINGBOX( m-1, 1, 0.01, 0.0, 0.0, 0.0,    &
-                                 (nx+1) * dx * superelevation_x, &
-                                 (ny+1) * dy * superelevation_y, &
-                                 zu(nz_do3d) * superelevation )
+          tmp_r = 0.5;  tmp_g = 0.5;  tmp_b = 0.5;  tmp_t = 0.0
+          CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
+
+          tmp_1 = 0.01;  tmp_2 = 0.0;  tmp_3 = 0.0;  tmp_4 = 0.0
+          tmp_5 = (nx+1) * dx * superelevation_x
+          tmp_6 = (ny+1) * dy * superelevation_y
+          tmp_7 = zu(nz_do3d) * superelevation
+          CALL DVRP_BOUNDINGBOX( m-1, 1, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, &
+                                 tmp_6, tmp_7 )
 
           CALL DVRP_VISUALIZE( m-1, 0, 0 )
@@ -272,7 +275,10 @@
 !
 !--       Define the grid used by dvrp
+          CALL DVRP_NO_GLOBAL_GRID( m-1, 1 )
           CALL DVRP_GRID( m-1, nx_dvrp, ny_dvrp, nz_dvrp, xcoor_dvrp, &
                           ycoor_dvrp, zcoor_dvrp )
-          CALL DVRP_MATERIAL_RGB( m-1, 1, 0.8, 0.7, 0.6, 0.0 )
+
+          tmp_r = 0.8;  tmp_g = 0.7;  tmp_b = 0.6;  tmp_t = 0.0
+          CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
     WRITE ( 9, * ) '***  #4'
     CALL local_flush( 9 )
@@ -295,5 +301,6 @@
     WRITE ( 9, * ) '***  #4.2'
     CALL local_flush( 9 )
-          CALL DVRP_THRESHOLD( m-1, 1.0 )
+          tmp_th = 1.0
+          CALL DVRP_THRESHOLD( m-1, tmp_th )
     WRITE ( 9, * ) '***  #4.3'
     CALL local_flush( 9 )
@@ -366,7 +373,10 @@
 !
 !--       Define the grid used by dvrp
+          CALL DVRP_NO_GLOBAL_GRID( m-1, 1 )
           CALL DVRP_GRID( m-1, nx_dvrp, ny_dvrp, nz_dvrp, xcoor_dvrp, &
                           ycoor_dvrp, zcoor_dvrp )
-          CALL DVRP_MATERIAL_RGB( m-1, 1, 0.0, 0.6, 0.0, 0.0 )
+
+          tmp_r = 0.0;  tmp_g = 0.6;  tmp_b = 0.0;  tmp_t = 0.0
+          CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
     WRITE ( 9, * ) '***  #7'
     CALL local_flush( 9 )
@@ -380,5 +390,6 @@
           CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, &
                           cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
-          CALL DVRP_THRESHOLD( m-1, 1.0 )
+          tmp_th = 1.0
+          CALL DVRP_THRESHOLD( m-1, tmp_th )
           CALL DVRP_VISUALIZE( m-1, 1, 0 )
 
@@ -429,6 +440,7 @@
     WRITE ( 9, * ) '***  #9'
     CALL local_flush( 9 )
+                tmp_thr = threshold(tv)
                 CALL DVRP_STEERING_INIT( m-1, name_c, steering_dvrp(pn)%min, &
-                                         steering_dvrp(pn)%max, threshold(tv) )
+                                         steering_dvrp(pn)%max, tmp_thr )
     WRITE ( 9, * ) '***  #10'
     CALL local_flush( 9 )
@@ -541,6 +553,31 @@
     CALL local_flush( 9 )
 
+       IF ( mode_dvrp(m) /= 'pathlines' )  THEN
+          CALL DVRP_NO_GLOBAL_GRID( m-1, 1 )
+       ENDIF
        CALL DVRP_GRID( m-1, nx_dvrp, ny_dvrp, nz_dvrp, xcoor_dvrp, ycoor_dvrp, &
                        zcoor_dvrp )
+
+       IF ( mode_dvrp(m) == 'pathlines' )  THEN
+
+          tmp_x1 = 0.0;  tmp_y1 = 0.0;  tmp_z1 = 0.0
+          tmp_x2 = 1.0;  tmp_y2 = 1.0;  tmp_z2 = 0.3
+          CALL DVRP_CUBIC_SEEDING( m-1, tmp_x1, tmp_y1, tmp_z1, tmp_x2, tmp_y2,&
+                                   tmp_z2, pathlines_linecount, 2, 0 )
+!
+!--       Set wavecount and wavetime
+          CALL DVRP_PATHLINES_BEHAVIOUR_WAVE( m-1, pathlines_wavecount, &
+                                              pathlines_wavetime,       &
+                                              pathlines_fadeintime,     &
+                                              pathlines_fadeouttime )
+!
+!--       Set pathline length
+          CALL DVRP_PATHLINES_SETMAXHISTORY( m-1, pathlines_maxhistory )
+          CALL DVRP_PATHLINES_SETFADING( m-1, 1, 0.0 )
+
+          CALL DVRP_INIT_PATHLINES( m-1, 0 )
+
+       ENDIF
+
     WRITE ( 9, * ) '***  #14'
     CALL local_flush( 9 )
@@ -566,4 +603,5 @@
 #if defined( __dvrp_graphics )
 
+    USE control_parameters
     USE dvrp_variables
     USE pegrid
@@ -602,21 +640,26 @@
     IF ( chr == 'true' )  THEN
        use_seperate_pe_for_dvrp_output = .TRUE.
-    WRITE ( 9, * ) '*** myid=', myid, ' vor DVRP_SPLIT'
-    CALL local_flush( 9 )
-
-!
-!-- Adjustment for new MPI-1 coupling. This might be unnecessary.
+       WRITE ( 9, * ) '*** myid=', myid, ' vor DVRP_SPLIT'
+       CALL local_flush( 9 )
+
+!
+!--    Adjustment for new MPI-1 coupling. This might be unnecessary.
 #if defined( __mpi2 )
        CALL DVRP_SPLIT( MPI_COMM_WORLD, comm_palm )
 #else
-    IF ( coupling_mode /= 'uncoupled' ) THEN
-       CALL DVRP_SPLIT( comm_inter, comm_palm )
-    ELSE
-       CALL DVRP_SPLIT( MPI_COMM_WORLD, comm_palm )
-    ENDIF
+       IF ( coupling_mode /= 'uncoupled' ) THEN
+          IF ( myid == 0 )  THEN
+             PRINT*, '+++ init_dvrp: split of communicator not realized with', &
+                          ' MPI1 coupling atmosphere-ocean'
+          ENDIF
+          CALL local_stop
+!          CALL DVRP_SPLIT( comm_inter, comm_palm )
+       ELSE
+          CALL DVRP_SPLIT( MPI_COMM_WORLD, comm_palm )
+       ENDIF
 #endif
 
-    WRITE ( 9, * ) '*** myid=', myid, ' nach DVRP_SPLIT'
-    CALL local_flush( 9 )
+       WRITE ( 9, * ) '*** myid=', myid, ' nach DVRP_SPLIT'
+       CALL local_flush( 9 )
        CALL MPI_COMM_SIZE( comm_palm, numprocs, ierr )
     ENDIF
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 209)
+++ palm/trunk/SOURCE/modules.f90	(revision 210)
@@ -5,5 +5,6 @@
 ! Actual revisions:
 ! -----------------
-! +target_id
+! some dvrp-variables changed to single precision, variables for dvrp-mode
+! pathlines added, +target_id
 !
 ! Former revisions:
@@ -521,6 +522,10 @@
                            dvrp_username  = ' '
 
-    INTEGER ::  dvrp_colourtable_entries = 4, islice_dvrp, nx_dvrp, ny_dvrp, &
-                nz_dvrp
+    INTEGER ::  dvrp_colourtable_entries = 4, islice_dvrp, nx_dvrp, ny_dvrp,  &
+                nz_dvrp, pathlines_fadeintime = 5, pathlines_fadeouttime = 5, &
+                pathlines_linecount = 1000, pathlines_maxhistory = 40,        &
+                pathlines_wavecount = 10, pathlines_wavetime = 50,            &
+                vc_gradient_normals = 0, vc_mode = 0, vc_size_x = 2,          &
+                vc_size_y = 2, vc_size_z = 2
 
     INTEGER, DIMENSION(10) ::  slicer_position_dvrp
@@ -530,5 +535,5 @@
 
     REAL    ::  superelevation = 1.0, superelevation_x = 1.0, &
-                superelevation_y = 1.0
+                superelevation_y = 1.0, vc_alpha = 38.0
 
 #if defined( __decalpha )
@@ -538,15 +543,15 @@
                                 -1.0, 1.0, -1.0, 1.0 /)
 
-    REAL, DIMENSION(2,100) ::  interval_values_dvrp, interval_h_dvrp =       &
-                               (/ 270.0, 225.0, 225.0, 180.0, 70.0, 25.0,    &
-                                  25.0, -25.0, ( 0.0, i9 = 1, 192 ) /),      &
-                               interval_l_dvrp = 0.5, interval_s_dvrp = 1.0, &
-                               interval_a_dvrp = 0.0
+    REAL/4), DIMENSION(2,100) ::  interval_values_dvrp, interval_h_dvrp =      &
+                                  (/ 270.0, 225.0, 225.0, 180.0, 70.0, 25.0,   &
+                                     25.0, -25.0, ( 0.0, i9 = 1, 192 ) /),     &
+                                  interval_l_dvrp = 0.5, interval_s_dvrp = 1.0,&
+                                  interval_a_dvrp = 0.0
 #else
     REAL, DIMENSION(2,10)  ::  slicer_range_limits_dvrp
 
-    REAL, DIMENSION(2,100) ::  interval_values_dvrp, interval_h_dvrp,        &
-                               interval_l_dvrp = 0.5, interval_s_dvrp = 1.0, &
-                               interval_a_dvrp = 0.0
+    REAL(4), DIMENSION(2,100) ::  interval_values_dvrp, interval_h_dvrp,       &
+                                  interval_l_dvrp = 0.5, interval_s_dvrp = 1.0,&
+                                  interval_a_dvrp = 0.0
 
     DATA  slicer_range_limits_dvrp / -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, &
@@ -559,9 +564,9 @@
 #endif
 
-    REAL, DIMENSION(:), ALLOCATABLE ::  xcoor_dvrp, ycoor_dvrp, zcoor_dvrp
+    REAL(4), DIMENSION(:), ALLOCATABLE ::  xcoor_dvrp, ycoor_dvrp, zcoor_dvrp
 
     TYPE steering
        CHARACTER (LEN=20) ::  name
-       REAL               ::  min, max
+       REAL(4)            ::  min, max
        INTEGER            ::  imin, imax
     END TYPE steering
Index: palm/trunk/SOURCE/package_parin.f90
===================================================================
--- palm/trunk/SOURCE/package_parin.f90	(revision 209)
+++ palm/trunk/SOURCE/package_parin.f90	(revision 210)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Variables for dvrp-mode pathlines added
 !
 ! Former revisions:
@@ -14,5 +14,5 @@
 !
 ! 60 2007-03-11 11:50:04Z raasch
-! Particles-paclage is now part of the default code
+! Particles-package is now part of the default code
 !
 ! RCS Log replace by Id keyword, revision history cleaned up
@@ -44,6 +44,11 @@
                                   dvrp_host, dvrp_output, dvrp_password,       &
                                   dvrp_username, mode_dvrp,                    &
+                                  pathlines_fadeintime, pathlines_fadeouttime, &
+                                  pathlines_linecount, pathlines_maxhistory,   &
+                                  pathlines_wavecount, pathlines_wavetime,     &
                                   slicer_range_limits_dvrp, superelevation,    &
-                                  superelevation_x, superelevation_y, threshold
+                                  superelevation_x, superelevation_y,          &
+                                  threshold, vc_alpha, vc_gradient_normals,    &
+                                  vc_mode, vc_size_x, vc_size_y, vc_size_z
     NAMELIST /particles_par/      bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,    &
                                   density_ratio, radius, dt_dopts,             &
Index: palm/trunk/UTIL/combine_plot_fields.f90
===================================================================
--- palm/trunk/UTIL/combine_plot_fields.f90	(revision 209)
+++ palm/trunk/UTIL/combine_plot_fields.f90	(revision 210)
@@ -4,4 +4,8 @@
 ! Actual revisions:
 ! -----------------
+! Size of pf3d adjusted to the required output size (1 gridpoint less, along
+! all three dimensions), because output of a subset of the data
+! (pf3d(nxa:nxe...) in the NF90_PUT_VAR statement caused segmentation fault
+! with the INTEL compiler.
 ! Subdomain data are read into temporary arrays pf_tmp/pf3d_tmp in order to
 ! avoid INTEL compiler warnings about (automatic) creation of temporary arrays
@@ -93,7 +97,7 @@
 
     INTEGER ::  av, danz, i, id,             &
-                j, model, models, nc_stat, nxa, nxag, nxe, nxeg, nya,   &
+                j, k, model, models, nc_stat, nxa, nxag, nxe, nxeg, nya,   &
                 nyag, nye, nyeg, nza, nzag, nze, nzeg, pos, time_step, xa, xe, &
-                ya, ye, za, ze
+                xxa, xxe, ya, ye, yya, yye, za, ze, zza, zze
 
     INTEGER, DIMENSION(0:1) ::  current_level, current_var, fanz, id_set, &
@@ -603,9 +607,7 @@
 !
 !--             Get variable ID from name
-!                print*, '*** find id for "',TRIM( var_name ),'" begin'
                 nc_stat = NF90_INQ_VARID( id_set(av), TRIM( var_name ), &
                      id_var(av,i) )
                 IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( 16 )
-!                print*, '*** find id for "',TRIM( var_name ),'" end'
 
              ENDDO
@@ -636,5 +638,5 @@
                 READ ( id+110 )  nxag, nxeg, nyag, nyeg, nzag, nzeg
                 READ ( id+110 )  nxa, nxe, nya, nye, nza, nze
-                ALLOCATE ( pf3d(nxag:nxeg,nyag:nyeg,nzag:nzeg) )
+                ALLOCATE ( pf3d(nxa:nxe,nya:nye,nza:nze) )
                 IF ( avs_output )  THEN
                    OPEN ( 2, FILE='PLOT3D_DATA'//TRIM( model_string ), &
@@ -661,5 +663,19 @@
              ALLOCATE( pf3d_tmp(xa:xe,ya:ye,za:ze) )
              READ ( id+110 )  pf3d_tmp
-             pf3d(xa:xe,ya:ye,za:ze) = pf3d_tmp
+
+             xxa = MAX( nxa, xa )
+             xxe = MIN( nxe, xe )
+             yya = MAX( nya, ya )
+             yye = MIN( nye, ye )
+             zza = MAX( nza, za )
+             zze = MIN( nze, ze )
+             DO  k = zza, zze
+                DO  j = yya, yye
+                   DO  i = xxa, xxe
+                      pf3d(i,j,k) = pf3d_tmp(i,j,k)
+                   ENDDO
+                ENDDO
+             ENDDO
+
              DEALLOCATE( pf3d_tmp )
              IF ( id == 0 )  fanz(av) = fanz(av) + 1
@@ -688,6 +704,5 @@
 !--          Now write the data
              nc_stat = NF90_PUT_VAR( id_set(av), id_var(av,current_var(av)), &
-                                  pf3d(nxa:nxe,nya:nye,nza:nze),      &
-                                  start = (/ 1, 1, 1, time_step /),   &
+                                     pf3d, start = (/ 1, 1, 1, time_step /), &
                               count = (/ nxe-nxa+1, nye-nya+1, nze-nza+1, 1 /) )
              IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( 18 )
