Index: palm/trunk/SOURCE/data_output_dvrp.f90
===================================================================
--- palm/trunk/SOURCE/data_output_dvrp.f90	(revision 241)
+++ palm/trunk/SOURCE/data_output_dvrp.f90	(revision 242)
@@ -33,5 +33,4 @@
 ! -----------------
 ! TEST: different colours for isosurfaces
-! TEST: write statements
 !
 ! Former revisions:
@@ -90,7 +89,11 @@
     CHARACTER (LEN=2) ::  section_chr
     CHARACTER (LEN=6) ::  output_variable
-    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 ::  c_mode, c_size_x, c_size_y, c_size_z, dvrp_nop, dvrp_not,     &
+                gradient_normals, i, ip, j, jp, k, l, m, n, nn, section_mode, &
+                tv, vn
     INTEGER, DIMENSION(:), ALLOCATABLE ::  p_c, p_t
+
+    LOGICAL, DIMENSION(:), ALLOCATABLE ::  dvrp_mask
+
     REAL(4) ::  center(3), distance, slicer_position, surface_value,         &
                 tmp_alpha, tmp_alpha_w, tmp_b, tmp_c_alpha, tmp_g, tmp_norm, &
@@ -101,6 +104,4 @@
 
 
-    WRITE ( 9, * ) '*** myid=', myid, ' Anfang data_output_dvrp'
-    CALL local_flush( 9 )
     CALL cpu_log( log_point(27), 'data_output_dvrp', 'start' )
 
@@ -117,9 +118,5 @@
 !--       Set lock to avoid recursive calls of DVRP_STEERING_UPDATE
           lock_steering_update = .TRUE.
-!   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: vor steering_update'
-!   CALL local_flush( 9 )
 !          CALL DVRP_STEERING_UPDATE( m-1, data_output_dvrp )
-!   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: nach steering_update'
-!   CALL local_flush( 9 )
           lock_steering_update = .FALSE.
        ENDIF
@@ -155,7 +152,4 @@
        IF ( mode_dvrp(m)(1:9) == 'particles'  .AND.  particle_advection  .AND. &
             simulated_time >= particle_advection_start )  THEN
-
-!   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: anfang particles'
-!   CALL local_flush( 9 )
 !
 !--       DVRP-Calls for plotting particles:
@@ -169,31 +163,78 @@
 
 !
+!--       If clipping is active and if this subdomain is clipped, find out the
+!--       number of particles and tails to be plotted; otherwise, all
+!--       particles/tails are plotted
+          IF ( .NOT. use_particle_tails )  THEN
+             ALLOCATE( dvrp_mask(number_of_particles) )
+          ELSE
+             ALLOCATE( dvrp_mask(number_of_tails*maximum_number_of_tailpoints) )
+          ENDIF
+          dvrp_mask = .TRUE.
+          IF ( dvrp_total_overlap )  THEN
+             dvrp_nop = number_of_particles
+             dvrp_not = number_of_tails
+          ELSE
+             dvrp_nop = 0
+             dvrp_not = 0
+             IF ( dvrp_overlap )  THEN
+                IF ( .NOT. use_particle_tails )  THEN
+                   DO  n = 1, number_of_particles
+                      ip = particles(n)%x / dx
+                      jp = particles(n)%y / dy
+                      IF ( ip >= nxl_dvrp  .AND.  ip <= nxr_dvrp  .AND.  &
+                           jp >= nys_dvrp  .AND.  jp <= nyn_dvrp )  THEN
+                         dvrp_nop = dvrp_nop + 1
+                      ELSE
+                         dvrp_mask(n) = .FALSE.
+                      ENDIF
+                   ENDDO
+                ELSE
+                   k = 0
+                   DO  n = 1, number_of_particles
+                      IF ( particles(n)%tail_id /= 0 )  THEN
+                         k = k + 1
+                         ip = particles(n)%x / dx
+                         jp = particles(n)%y / dy
+                         IF ( ip >= nxl_dvrp  .AND.  ip <= nxr_dvrp  .AND.  &
+                              jp >= nys_dvrp  .AND.  jp <= nyn_dvrp )  THEN
+                            dvrp_not = dvrp_not + 1
+                         ELSE
+                            dvrp_mask(k) = .FALSE.
+                         ENDIF
+                      ENDIF
+                   ENDDO
+                ENDIF
+             ENDIF
+          ENDIF
+
+!
 !--       Move particle coordinates to one-dimensional arrays
           IF ( .NOT. use_particle_tails )  THEN
 !
 !--          All particles are output
-             ALLOCATE( psize(number_of_particles), p_t(number_of_particles), &
-                       p_c(number_of_particles), p_x(number_of_particles),   &
-                       p_y(number_of_particles), p_z(number_of_particles) )
+             ALLOCATE( psize(dvrp_nop), p_t(dvrp_nop), p_c(dvrp_nop), &
+                       p_x(dvrp_nop), p_y(dvrp_nop), p_z(dvrp_nop) )
              psize = 0.0;  p_t = 0;  p_c = 0.0;  p_x = 0.0;  p_y = 0.0
-             p_z   = 0.0;
-             psize = particles(1:number_of_particles)%dvrp_psize
-             p_x   = particles(1:number_of_particles)%x * superelevation_x
-             p_y   = particles(1:number_of_particles)%y * superelevation_y
-             p_z   = particles(1:number_of_particles)%z * superelevation
-             p_c   = particles(1:number_of_particles)%color
+             p_z   = 0.0
+             k = 0
+             DO  n = 1, number_of_particles
+                IF ( dvrp_mask(n) )  THEN
+                   k = k + 1
+                   psize(k) = particles(n)%dvrp_psize
+                   p_x(k)   = particles(n)%x * superelevation_x
+                   p_y(k)   = particles(n)%y * superelevation_y
+                   p_z(k)   = particles(n)%z * superelevation
+                   p_c(k)   = particles(n)%color
+                ENDIF
+             ENDDO
           ELSE
 !
 !--          Particles have a tail
-!            WRITE (9,*) '--- before ALLOCATE  simtime=',simulated_time,' #of_tails=', number_of_tails, &
-!                          ' max#of_tp=', maximum_number_of_tailpoints
-!   CALL local_flush( 9 )
-             ALLOCATE( psize(number_of_tails), p_t(number_of_tails),      &
-                       p_c(number_of_tails*maximum_number_of_tailpoints), &
-                       p_x(number_of_tails*maximum_number_of_tailpoints), &
-                       p_y(number_of_tails*maximum_number_of_tailpoints), &
-                       p_z(number_of_tails*maximum_number_of_tailpoints) )
-!            WRITE (9,*) '--- after ALLOCATE'
-!   CALL local_flush( 9 )
+             ALLOCATE( psize(dvrp_not), p_t(dvrp_not),             &
+                       p_c(dvrp_not*maximum_number_of_tailpoints), &
+                       p_x(dvrp_not*maximum_number_of_tailpoints), &
+                       p_y(dvrp_not*maximum_number_of_tailpoints), &
+                       p_z(dvrp_not*maximum_number_of_tailpoints) )
              psize = 0.0;  p_t = 0;  p_c = 0.0;  p_x = 0.0;  p_y = 0.0
              p_z   = 0.0;
@@ -202,10 +243,6 @@
              DO  n = 1, number_of_particles
                 nn = particles(n)%tail_id
-                IF ( nn /= 0 )  THEN
+                IF ( nn /= 0  .AND.  dvrp_mask(n) )  THEN
                    k = k + 1
-!                  IF ( simulated_time > 1338.0 )  THEN
-!                     WRITE (9,*) '--- particle ',n,' tail_id=',nn,' #of_tp=',particles(n)%tailpoints
-!   CALL local_flush( 9 )
-!                  ENDIF
                    DO  j = 1, particles(n)%tailpoints
                       i = i + 1
@@ -217,20 +254,9 @@
                                                                 superelevation
                       p_c(i) = particle_tail_coordinates(j,4,nn)
-!                     IF ( simulated_time > 1338.0 )  THEN
-!                        WRITE (9,*) '--- tp= ',i,' x=',p_x(i),' y=',p_y(i), &
-!                                                ' z=',p_z(i),' c=',p_c(i)
-!   CALL local_flush( 9 )
-!                     ENDIF
                    ENDDO
                    psize(k) = particles(n)%dvrp_psize
                    p_t(k)   = particles(n)%tailpoints - 1
-!                  IF ( simulated_time > 1338.0 )  THEN
-!                     WRITE (9,*) '--- t= ',k,' psize=',psize(k),' p_t=',p_t(k)
-!   CALL local_flush( 9 )
-!                  ENDIF
                 ENDIF                
              ENDDO
-!            WRITE (9,*) '--- after locally storing the particle attributes'
-!   CALL local_flush( 9 )
           ENDIF
 
@@ -252,30 +278,15 @@
 
              IF ( .NOT. use_particle_tails )  THEN
-                CALL DVRP_PARTICLES( m-1, number_of_particles, p_x, p_y, p_z, &
-                                     3, psize, p_c, p_t )
+                CALL DVRP_PARTICLES( m-1, dvrp_nop, p_x, p_y, p_z, 3, psize, &
+                                     p_c, p_t )
              ELSE
-!               WRITE (9,*) '--- before DVRP_PARTICLES'
-!   CALL local_flush( 9 )
-                CALL DVRP_PARTICLES( m-1, number_of_tails, p_x, p_y, p_z, 15, &
-                                     psize, p_c, p_t )
-!               WRITE (9,*) '--- after DVRP_PARTICLES'
-!               WRITE (9,*) 'm-1 = ',m-1
-!               WRITE (9,*) 'number_of_tails=', number_of_tails
-!               WRITE (9,*) 'p_x =', p_x
-!               WRITE (9,*) 'p_y =', p_y
-!               WRITE (9,*) 'p_z =', p_z
-!               WRITE (9,*) 'psize =', psize
-!               WRITE (9,*) 'p_c =', p_c
-!               WRITE (9,*) 'p_t =', p_t
-
-!   CALL local_flush( 9 )
+                CALL DVRP_PARTICLES( m-1, dvrp_not, p_x, p_y, p_z, 15, psize, &
+                                     p_c, p_t )
              ENDIF
           ENDIF
 
           CALL DVRP_VISUALIZE( m-1, 3, dvrp_filecount )
-!   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: ende particles'
-!   CALL local_flush( 9 )
-
-          DEALLOCATE( psize, p_c, p_t, p_x, p_y, p_z )
+
+          DEALLOCATE( dvrp_mask, psize, p_c, p_t, p_x, p_y, p_z )
 
           CALL cpu_log( log_point_s(28), 'dvrp_particles', 'stop' )
@@ -436,7 +447,4 @@
 
           IF ( mode_dvrp(m)(1:10) == 'isosurface' )  THEN
-
-!   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: anfang isosurface'
-!   CALL local_flush( 9 )
 !
 !--          DVRP-Calls for plotting isosurfaces:
@@ -485,13 +493,7 @@
              CALL DVRP_VISUALIZE( m-1, 21, dvrp_filecount )
 
-!   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: ende isosurface'
-!   CALL local_flush( 9 )
-
              CALL cpu_log( log_point_s(26), 'dvrp_isosurface', 'stop' )
 
           ELSEIF ( mode_dvrp(m)(1:6) == 'slicer' )  THEN
-
-!   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: anfang slicer'
-!   CALL local_flush( 9 )
 !
 !--          DVRP-Calls for plotting slicers:
@@ -532,6 +534,4 @@
              CALL cpu_log( log_point_s(27), 'dvrp_slicer', 'stop' )
 
-!   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: ende slicer'
-!   CALL local_flush( 9 )
           ENDIF
 
@@ -578,6 +578,4 @@
 
     CALL cpu_log( log_point(27), 'data_output_dvrp', 'stop' )
-!   WRITE ( 9, * ) '*** myid=', myid, ' Ende data_output_dvrp'
-!   CALL local_flush( 9 )
 
 #endif
Index: palm/trunk/SOURCE/init_dvrp.f90
===================================================================
--- palm/trunk/SOURCE/init_dvrp.f90	(revision 241)
+++ palm/trunk/SOURCE/init_dvrp.f90	(revision 242)
@@ -4,4 +4,5 @@
 ! Actual revisions:
 ! -----------------
+! Clipping implemented.
 ! Polygon reduction for building and ground plate isosurface. Reduction level
 ! for buildings can be chosen with parameter cluster_size.
@@ -60,5 +61,6 @@
     CHARACTER (LEN=80) ::  dvrp_file_local
     INTEGER ::  cluster_mode, cluster_size_x, cluster_size_y, cluster_size_z, &
-                gradient_normals, i, j, k, l, m, pn, tv, vn
+                gradient_normals, i, j, k, l, m, nx_dvrp_l, nx_dvrp_r,        &
+                ny_dvrp_n, ny_dvrp_s, pn, tv, vn
     LOGICAL ::  allocated
     REAL(4) ::  center(3), cluster_alpha, distance, tmp_b, tmp_g, tmp_r, &
@@ -71,4 +73,47 @@
                             dvrp_file_local_c,dvrp_host_c, &
                             dvrp_password_c, dvrp_username_c, name_c
+
+!
+!-- Set clipping to default (total domain), if not set by user
+    IF ( clip_dvrp_l == 9999999.9 )  clip_dvrp_l = 0.0
+    IF ( clip_dvrp_r == 9999999.9 )  clip_dvrp_r = ( nx + 1 ) * dx
+    IF ( clip_dvrp_s == 9999999.9 )  clip_dvrp_s = 0.0
+    IF ( clip_dvrp_n == 9999999.9 )  clip_dvrp_n = ( ny + 1 ) * dy
+
+!
+!-- Calculate the clipping index limits
+    nx_dvrp_l = clip_dvrp_l / dx
+    nx_dvrp_r = clip_dvrp_r / dx
+    ny_dvrp_s = clip_dvrp_s / dy
+    ny_dvrp_n = clip_dvrp_n / dy
+
+    IF ( nx_dvrp_l < nxr  .AND.  nx_dvrp_r > nxl  .AND. &
+         ny_dvrp_s < nyn  .AND.  ny_dvrp_n > nys )  THEN
+
+       dvrp_overlap = .TRUE.
+       nxl_dvrp = MAX( nxl, nx_dvrp_l )
+       nxr_dvrp = MIN( nxr, nx_dvrp_r )
+       nys_dvrp = MAX( nys, ny_dvrp_s )
+       nyn_dvrp = MIN( nyn, ny_dvrp_n )
+
+       IF ( nxl_dvrp == nxl  .AND.  nxr_dvrp == nxr  .AND.  &
+            nys_dvrp == nys  .AND.  nyn_dvrp == nyn )  THEN
+          dvrp_total_overlap = .TRUE.
+       ELSE
+          dvrp_total_overlap = .FALSE.
+       ENDIF
+
+    ELSE
+!
+!--    This subdomain does not overlap with the clipping area. Define an
+!--    arbitrary (small) domain within in the clipping area.
+       dvrp_overlap       = .FALSE.
+       dvrp_total_overlap = .FALSE.
+       nxl_dvrp = nx_dvrp_l
+       nxr_dvrp = nxl_dvrp + 4
+       nys_dvrp = ny_dvrp_s
+       nyn_dvrp = nys_dvrp + 4
+
+    ENDIF
 
 !
@@ -151,9 +196,9 @@
 !
 !--       Compute center of domain and distance of camera from center
-          center(1) = ( nx + 1.0 ) * dx * 0.5 * superelevation_x
-          center(2) = ( ny + 1.0 ) * dy * 0.5 * superelevation_y
+          center(1) = ( clip_dvrp_l + clip_dvrp_r ) * 0.5 * superelevation_x
+          center(2) = ( clip_dvrp_s + clip_dvrp_n ) * 0.5 * superelevation_y
           center(3) = ( zu(nz_do3d) - zu(nzb) ) * 0.5 * superelevation
-          distance  = 1.5 * MAX( ( nx + 1.0 ) * dx * superelevation_x, &
-                                 ( ny + 1.0 ) * dy * superelevation_y, &
+          distance  = 1.5 * MAX( (clip_dvrp_r-clip_dvrp_l) * superelevation_x, &
+                                 (clip_dvrp_n-clip_dvrp_s) * superelevation_y, &
 	                         ( zu(nz_do3d) - zu(nzb) ) * superelevation )
 
@@ -200,7 +245,10 @@
           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_1 = 0.01;
+          tmp_2 = clip_dvrp_l * superelevation_x
+          tmp_3 = clip_dvrp_s * superelevation_y
+          tmp_4 = 0.0
+          tmp_5 = clip_dvrp_r * superelevation_x
+          tmp_6 = clip_dvrp_n * superelevation_y
           tmp_7 = zu(nz_do3d) * superelevation
           CALL DVRP_BOUNDINGBOX( m-1, 1, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, &
@@ -252,17 +300,18 @@
 !--          Determine local gridpoint coordinates
              IF ( .NOT. allocated )  THEN
-                ALLOCATE( xcoor_dvrp(nxl:nxr+1), ycoor_dvrp(nys:nyn+1), &
+                ALLOCATE( xcoor_dvrp(nxl_dvrp:nxr_dvrp+1), &
+                          ycoor_dvrp(nys_dvrp:nyn_dvrp+1), &
                           zcoor_dvrp(nzb:nz_do3d) )
                 allocated = .TRUE.
 
-                DO  i = nxl, nxr+1
+                DO  i = nxl_dvrp, nxr_dvrp+1
                    xcoor_dvrp(i) = i * dx * superelevation_x
                 ENDDO
-                DO  j = nys, nyn+1
+                DO  j = nys_dvrp, nyn_dvrp+1
                    ycoor_dvrp(j) = j * dy * superelevation_y
                 ENDDO
                 zcoor_dvrp = zu(nzb:nz_do3d) * superelevation
-                nx_dvrp    = nxr+1 - nxl + 1
-                ny_dvrp    = nyn+1 - nys + 1
+                nx_dvrp    = nxr_dvrp+1 - nxl_dvrp + 1
+                ny_dvrp    = nyn_dvrp+1 - nys_dvrp + 1
                 nz_dvrp    = nz_do3d - nzb + 1
              ENDIF
@@ -279,13 +328,16 @@
 !
 !--          Compute and plot isosurface in dvr-format
-             ALLOCATE( local_pf(nxl:nxr+1,nys:nyn+1,nzb:nz_do3d) )
+             ALLOCATE( local_pf(nxl_dvrp:nxr_dvrp+1,nys_dvrp:nyn_dvrp+1, &
+                                nzb:nz_do3d) )
              local_pf = 0.0
-             DO  i = nxl, nxr+1
-                DO  j = nys, nyn+1
-                   IF ( nzb_s_inner(j,i) > 0 )  THEN
+             IF ( dvrp_overlap )  THEN
+                DO  i = nxl_dvrp, nxr_dvrp+1
+                   DO  j = nys_dvrp, nyn_dvrp+1
+                      IF ( nzb_s_inner(j,i) > 0 )  THEN
                          local_pf(i,j,nzb:nzb_s_inner(j,i)) = 1.0
                       ENDIF
+                   ENDDO
                 ENDDO
-             ENDDO
+             ENDIF
 
              CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, &
@@ -369,17 +421,18 @@
 !--       Determine local gridpoint coordinates
           IF ( .NOT. allocated )  THEN
-             ALLOCATE( xcoor_dvrp(nxl:nxr+1), ycoor_dvrp(nys:nyn+1), &
+             ALLOCATE( xcoor_dvrp(nxl_dvrp:nxr_dvrp+1), &
+                       ycoor_dvrp(nys_dvrp:nyn_dvrp+1), &
                        zcoor_dvrp(nzb:nz_do3d) )
              allocated = .TRUE.
 
-             DO  i = nxl, nxr+1
+             DO  i = nxl_dvrp, nxr_dvrp+1
                 xcoor_dvrp(i) = i * dx * superelevation_x
              ENDDO
-             DO  j = nys, nyn+1
+             DO  j = nys_dvrp, nyn_dvrp+1
                 ycoor_dvrp(j) = j * dy * superelevation_y
              ENDDO
              zcoor_dvrp = zu(nzb:nz_do3d) * superelevation
-             nx_dvrp    = nxr+1 - nxl + 1
-             ny_dvrp    = nyn+1 - nys + 1
+             nx_dvrp    = nxr_dvrp+1 - nxl_dvrp + 1
+             ny_dvrp    = nyn_dvrp+1 - nys_dvrp + 1
              nz_dvrp    = nz_do3d - nzb + 1
           ENDIF
@@ -396,7 +449,8 @@
 !
 !--       Compute and plot isosurface in dvr-format
-          ALLOCATE( local_pf(nxl:nxr+1,nys:nyn+1,nzb:nz_do3d) )
+          ALLOCATE( local_pf(nxl_dvrp:nxr_dvrp+1,nys_dvrp:nyn_dvrp+1, &
+                             nzb:nz_do3d) )
           local_pf = 0.0
-          local_pf(:,:,0) = 1.0
+          IF (dvrp_overlap )  local_pf(:,:,0) = 1.0
 
           CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, &
@@ -406,5 +460,5 @@
 
 !
-!--       Always reduce the number of polygones
+!--       Always reduce the number of polygones as much as possible
           cluster_size_x = 5
           cluster_size_y = 5
@@ -541,17 +595,18 @@
 !--    Determine local gridpoint coordinates
        IF ( .NOT. allocated )  THEN
-          ALLOCATE( xcoor_dvrp(nxl:nxr+1), ycoor_dvrp(nys:nyn+1), &
+          ALLOCATE( xcoor_dvrp(nxl_dvrp:nxr_dvrp+1), &
+                    ycoor_dvrp(nys_dvrp:nyn_dvrp+1), &
                     zcoor_dvrp(nzb:nz_do3d) )
           allocated = .TRUE.
 
-          DO  i = nxl, nxr+1
+          DO  i = nxl_dvrp, nxr_dvrp+1
              xcoor_dvrp(i) = i * dx * superelevation_x
           ENDDO
-          DO  j = nys, nyn+1
+          DO  j = nys_dvrp, nyn_dvrp+1
              ycoor_dvrp(j) = j * dy * superelevation_y
           ENDDO
           zcoor_dvrp = zu(nzb:nz_do3d) * superelevation
-          nx_dvrp    = nxr+1 - nxl + 1
-          ny_dvrp    = nyn+1 - nys + 1
+          nx_dvrp    = nxr_dvrp+1 - nxl_dvrp + 1
+          ny_dvrp    = nyn_dvrp+1 - nys_dvrp + 1
           nz_dvrp    = nz_do3d - nzb + 1
        ENDIF
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 241)
+++ palm/trunk/SOURCE/modules.f90	(revision 242)
@@ -5,5 +5,6 @@
 ! Actual revisions:
 ! -----------------
-! +cluster_size in dvrp_variables
+! +clip_dvrp_*, cluster_size, dvrp_overlap, dvrp_total_overlap,
+! n*_dvrp in dvrp_variables
 ! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left, 
 ! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b, 
@@ -538,16 +539,20 @@
 
     INTEGER ::  cluster_size = 1, 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
+                nx_dvrp, nxl_dvrp, nxr_dvrp, ny_dvrp, nyn_dvrp, nys_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
 
-    LOGICAL ::  cyclic_dvrp = .FALSE., lock_steering_update = .FALSE., &
+    LOGICAL ::  cyclic_dvrp = .FALSE., dvrp_overlap, dvrp_total_overlap, &
+                lock_steering_update = .FALSE.,                          &
                 use_seperate_pe_for_dvrp_output = .FALSE.
 
-    REAL    ::  superelevation = 1.0, superelevation_x = 1.0, &
+    REAL    ::  clip_dvrp_l = 9999999.9, clip_dvrp_n = 9999999.9, &
+                clip_dvrp_r = 9999999.9, clip_dvrp_s = 9999999.9, &
+                superelevation = 1.0, superelevation_x = 1.0,     &
                 superelevation_y = 1.0, vc_alpha = 38.0
 
Index: palm/trunk/SOURCE/package_parin.f90
===================================================================
--- palm/trunk/SOURCE/package_parin.f90	(revision 241)
+++ palm/trunk/SOURCE/package_parin.f90	(revision 242)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! +cluster_size in dvrp_graphics_par
+! +clip_dvrp_*, cluster_size in dvrp_graphics_par
 ! Variables for dvrp-mode pathlines added
 !
@@ -45,14 +45,16 @@
     CHARACTER (LEN=80) ::  zeile
 
-    NAMELIST /dvrp_graphics_par/  cluster_size, dt_dvrp, dvrp_directory,       &
-                                  dvrp_file, 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, vc_alpha, vc_gradient_normals,    &
-                                  vc_mode, vc_size_x, vc_size_y, vc_size_z
+    NAMELIST /dvrp_graphics_par/  clip_dvrp_l, clip_dvrp_n, clip_dvrp_r,       &
+                                  clip_dvrp_s, cluster_size, dt_dvrp,          &
+                                  dvrp_directory, dvrp_file, 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, 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,             &
