Index: palm/trunk/SOURCE/CURRENT_MODIFICATIONS
===================================================================
--- palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 264)
+++ palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 266)
@@ -42,9 +42,11 @@
 First constant in array den also defined as type double. (eqn_state_seawater)
 
+Parameter dvrp_psize moved from particles_par to dvrp_graphics_par. (package_parin)
+
 topography_grid_convention moved from userpar to inipar (check_parameters,
 header, parin, read_var_list, user_check_parameters, user_header, 
 user_init_grid, user_parin, write_var_list)
 
-advec_particles, advec_s_bc, buoyancy, calc_spectra, check_for_restart, check_open, check_parameters, close_file, coriolis, cpu_log, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_ptseries, data_output_spectra, data_output_tseries, eqn_state_seawater, fft_xy, flow_statistics, header, init_1d_model, init_3d_model, init_dvrp, init_grid, init_particles, init_pegrid, netcdf, output_particles_netcdf, parin, plant_canopy_model, poisfft_hybrid, poismg, read_3d_binary, read_var_list, sort_particles, user_check_parameters, user_header, user_init_grid, user_parin, surface_coupler, temperton_fft, timestep, user_actions, user_data_output_dvrp, user_dvrp_coltab, user_init_grid, user_init_plant_canopy, user_parin, user_read_restart_data, user_spectra, write_var_list
+advec_particles, advec_s_bc, buoyancy, calc_spectra, check_for_restart, check_open, check_parameters, close_file, coriolis, cpu_log, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_ptseries, data_output_spectra, data_output_tseries, eqn_state_seawater, fft_xy, flow_statistics, header, init_1d_model, init_3d_model, init_dvrp, init_grid, init_particles, init_pegrid, netcdf, output_particles_netcdf, package_parin, parin, plant_canopy_model, poisfft_hybrid, poismg, read_3d_binary, read_var_list, sort_particles, user_check_parameters, user_header, user_init_grid, user_parin, surface_coupler, temperton_fft, timestep, user_actions, user_data_output_dvrp, user_dvrp_coltab, user_init_grid, user_init_plant_canopy, user_parin, user_read_restart_data, user_spectra, write_var_list
 
 
Index: palm/trunk/SOURCE/package_parin.f90
===================================================================
--- palm/trunk/SOURCE/package_parin.f90	(revision 264)
+++ palm/trunk/SOURCE/package_parin.f90	(revision 266)
@@ -5,5 +5,6 @@
 ! -----------------
 ! +clip_dvrp_*, cluster_size, color_interval, dvrpsize_interval, particle_color,
-! dvrpsize_color in dvrp_graphics_par
+! particle_dvrpsize in dvrp_graphics_par,
+! parameter dvrp_psize moved from particles_par to dvrp_graphics_par
 ! Variables for dvrp-mode pathlines added
 !
Index: palm/trunk/SOURCE/set_particle_attributes.f90
===================================================================
--- palm/trunk/SOURCE/set_particle_attributes.f90	(revision 264)
+++ palm/trunk/SOURCE/set_particle_attributes.f90	(revision 266)
@@ -32,6 +32,7 @@
 
     INTEGER ::  i, j, k, n
-    REAL    ::  aa, bb, cc, dd, gg, pt_int, pt_int_l, pt_int_u, w_int, &
-                w_int_l, w_int_u, x, y
+    REAL    ::  aa, absuv, bb, cc, dd, gg, pt_int, pt_int_l, pt_int_u, u_int, &
+                u_int_l, u_int_u, v_int, v_int_l, v_int_u, w_int, w_int_l,    &
+                w_int_u, x, y
 
 
@@ -41,4 +42,82 @@
 !-- Set particle color
     IF ( particle_color == 'absuv' )  THEN
+
+!
+!--    Set particle color depending on the absolute value of the horizontal
+!--    velocity
+       DO  n = 1, number_of_particles
+!
+!--       Interpolate u velocity-component, determine left, front, bottom
+!--       index of u-array
+          i = ( particles(n)%x + 0.5 * dx ) * ddx
+          j =   particles(n)%y * ddy
+          k = ( particles(n)%z + 0.5 * dz * atmos_ocean_sign ) / dz  &
+              + offset_ocean_nzt                     ! only exact if equidistant
+
+!
+!--       Interpolation of the velocity components in the xy-plane
+          x  = particles(n)%x + ( 0.5 - i ) * dx
+          y  = particles(n)%y - j * dy
+          aa = x**2          + y**2
+          bb = ( dx - x )**2 + y**2
+          cc = x**2          + ( dy - y )**2
+          dd = ( dx - x )**2 + ( dy - y )**2
+          gg = aa + bb + cc + dd
+
+          u_int_l = ( ( gg - aa ) * u(k,j,i)   + ( gg - bb ) * u(k,j,i+1)   &
+                    + ( gg - cc ) * u(k,j+1,i) + ( gg - dd ) * u(k,j+1,i+1) &
+                    ) / ( 3.0 * gg ) - u_gtrans
+          IF ( k+1 == nzt+1 )  THEN
+             u_int = u_int_l
+          ELSE
+             u_int_u = ( ( gg-aa ) * u(k+1,j,i)   + ( gg-bb ) * u(k+1,j,i+1)   &
+                       + ( gg-cc ) * u(k+1,j+1,i) + ( gg-dd ) * u(k+1,j+1,i+1) &
+                       ) / ( 3.0 * gg ) - u_gtrans
+             u_int = u_int_l + ( particles(n)%z - zu(k) ) / dz * &
+                               ( u_int_u - u_int_l )
+          ENDIF
+
+!
+!--       Same procedure for interpolation of the v velocity-component (adopt
+!--       index k from u velocity-component)
+          i =   particles(n)%x * ddx
+          j = ( particles(n)%y + 0.5 * dy ) * ddy
+
+          x  = particles(n)%x - i * dx
+          y  = particles(n)%y + ( 0.5 - j ) * dy
+          aa = x**2          + y**2
+          bb = ( dx - x )**2 + y**2
+          cc = x**2          + ( dy - y )**2
+          dd = ( dx - x )**2 + ( dy - y )**2
+          gg = aa + bb + cc + dd
+
+          v_int_l = ( ( gg - aa ) * v(k,j,i)   + ( gg - bb ) * v(k,j,i+1)   &
+                 + ( gg - cc ) * v(k,j+1,i) + ( gg - dd ) * v(k,j+1,i+1) &
+                 ) / ( 3.0 * gg ) - v_gtrans
+          IF ( k+1 == nzt+1 )  THEN
+             v_int = v_int_l
+          ELSE
+             v_int_u = ( ( gg-aa ) * v(k+1,j,i)   + ( gg-bb ) * v(k+1,j,i+1)   &
+                       + ( gg-cc ) * v(k+1,j+1,i) + ( gg-dd ) * v(k+1,j+1,i+1) &
+                       ) / ( 3.0 * gg ) - v_gtrans
+             v_int = v_int_l + ( particles(n)%z - zu(k) ) / dz * &
+                               ( v_int_u - v_int_l )
+          ENDIF
+
+          absuv = SQRT( u_int**2 + v_int**2 )
+
+!
+!--       Limit values by the given interval and normalize to interval [0,1]
+          absuv = MIN( absuv, color_interval(2) )
+          absuv = MAX( absuv, color_interval(1) )
+
+          absuv = ( absuv - color_interval(1) ) / &
+                  ( color_interval(2) - color_interval(1) )
+
+!
+!--       Number of available colors is defined in init_dvrp
+          particles(n)%color = 1 + absuv * ( dvrp_colortable_entries_prt - 1 )
+
+       ENDDO
 
     ELSEIF ( particle_color == 'pt*' )  THEN
@@ -110,7 +189,26 @@
           particles(n)%color = 1 + pt_int * ( dvrp_colortable_entries_prt - 1 )
 
-    ENDDO
+       ENDDO
 
     ELSEIF ( particle_color == 'z' )  THEN
+!
+!--    Set particle color depending on the height above the bottom
+!--    boundary (z=0)
+       DO  n = 1, number_of_particles
+
+          height = particles(n)%z
+!
+!--       Limit values by the given interval and normalize to interval [0,1]
+          height = MIN( height, color_interval(2) )
+          height = MAX( height, color_interval(1) )
+
+          height = ( height - color_interval(1) ) / &
+                   ( color_interval(2) - color_interval(1) )
+
+!
+!--       Number of available colors is defined in init_dvrp
+          particles(n)%color = 1 + height * ( dvrp_colortable_entries_prt - 1 )
+
+       ENDDO
 
     ENDIF
@@ -149,6 +247,14 @@
           ENDIF
 
-          particles(n)%dvrp_psize = ( 0.2 + MIN( 0.6, ABS( w_int ) / 6.0 ) ) * &
-                                    dx * 1.4
+!
+!--       Limit values by the given interval and normalize to interval [0,1]
+          w_int = ABS( w_int )
+          w_int = MIN( w_int, dvrpsize_interval(2) )
+          w_int = MAX( w_int, dvrpsize_interval(1) )
+
+          w_int = ( w_int - dvrpsize_interval(1) ) / &
+                  ( dvrpsize_interval(2) - dvrpsize_interval(1) )
+
+          particles(n)%dvrp_psize = ( 0.25 + w_int * 0.6 ) * dx
 
        ENDDO
