Index: palm/trunk/SOURCE/Makefile
===================================================================
--- palm/trunk/SOURCE/Makefile	(revision 1846)
+++ palm/trunk/SOURCE/Makefile	(revision 1849)
@@ -20,5 +20,5 @@
 # Current revisions:
 # ------------------
-# 
+# Adapted for modularization of microphysics 
 # 
 # Former revisions:
@@ -370,5 +370,5 @@
 check_parameters.o: modules.o mod_kinds.o land_surface_model_mod.o \
 	netcdf_interface.o plant_canopy_model_mod.o pmc_interface.o radiation_model_mod.o \
-	spectra_mod.o subsidence.o
+	spectra_mod.o subsidence.o microphysics.o
 close_file.o: modules.o mod_kinds.o netcdf_interface.o
 compute_vpt.o: modules.o mod_kinds.o
@@ -391,5 +391,5 @@
 data_output_3d.o: modules.o cpulog.o mod_kinds.o mod_particle_attributes.o\
    netcdf_interface.o land_surface_model_mod.o
-diffusion_e.o: modules.o mod_kinds.o
+diffusion_e.o: modules.o mod_kinds.o microphysics.o
 diffusion_s.o: modules.o mod_kinds.o
 diffusion_u.o: modules.o mod_kinds.o wall_fluxes.o
@@ -408,6 +408,6 @@
 global_min_max.o: modules.o mod_kinds.o
 header.o: modules.o cpulog.o mod_kinds.o netcdf_interface.o land_surface_model_mod.o\
-   plant_canopy_model_mod.o pmc_handle_communicator.o pmc_interface.o \
-   radiation_model_mod.o spectra_mod.o subsidence.o 
+   microphysics.o plant_canopy_model_mod.o: pmc_handle_communicator.o pmc_interface.o \
+   radiation_model_mod.o spectra_mod.o subsidence.o
 inflow_turbulence.o: modules.o cpulog.o mod_kinds.o
 init_1d_model.o: modules.o mod_kinds.o
@@ -415,5 +415,5 @@
    lpm_init.o ls_forcing.o netcdf_interface.o plant_canopy_model_mod.o \
    radiation_model_mod.o random_function.o random_generator_parallel.o \
-	surface_layer_fluxes.o
+   surface_layer_fluxes.o microphysics.o
 init_advec.o: modules.o mod_kinds.o
 init_cloud_physics.o: modules.o mod_kinds.o
@@ -472,5 +472,5 @@
 parin.o: modules.o cpulog.o land_surface_model_mod.o mod_kinds.o netcdf_interface.o \
    plant_canopy_model_mod.o pmc_interface.o progress_bar.o spectra_mod.o \
-   radiation_model_mod.o
+   radiation_model_mod.o microphysics.o
 plant_canopy_model_mod.o: modules.o mod_kinds.o
 pmc_interface.o: modules.o mod_kinds.o pmc_client.o pmc_general.o\
@@ -496,5 +496,5 @@
 	subsidence.o user_actions.o
 progress_bar.o: modules.o mod_kinds.o
-radiation_model_mod.o : modules.o mod_particle_attributes.o
+radiation_model_mod.o : modules.o mod_particle_attributes.o microphysics.o
 random_function.o: mod_kinds.o
 random_gauss.o: mod_kinds.o random_function.o random_generator_parallel.o
@@ -504,5 +504,5 @@
    spectra_mod.o
 read_var_list.o: modules.o mod_kinds.o netcdf_interface.o plant_canopy_model_mod.o \
-   spectra_mod.o
+   spectra_mod.o microphysics.o
 run_control.o: modules.o cpulog.o mod_kinds.o
 set_slicer_attributes_dvrp.o: modules.o mod_kinds.o
@@ -522,7 +522,7 @@
 	ls_forcing.o mod_kinds.o nudging.o pmc_interface.o production_e.o \
 	prognostic_equations.o progress_bar.o radiation_model_mod.o \
-	spectra_mod.o user_actions.o surface_layer_fluxes.o
+	spectra_mod.o user_actions.o surface_layer_fluxes.o microphysics.o
 time_to_string.o: mod_kinds.o
-timestep.o: modules.o cpulog.o mod_kinds.o
+timestep.o: modules.o cpulog.o mod_kinds.o microphysics.o
 timestep_scheme_steering.o: modules.o mod_kinds.o
 transpose.o: modules.o cpulog.o mod_kinds.o
@@ -562,3 +562,3 @@
 	spectra_mod.o
 write_var_list.o: modules.o mod_kinds.o netcdf_interface.o plant_canopy_model_mod.o\
-   spectra_mod.o
+   spectra_mod.o microphysics.o
Index: palm/trunk/SOURCE/data_output_2d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_2d.f90	(revision 1846)
+++ palm/trunk/SOURCE/data_output_2d.f90	(revision 1849)
@@ -19,6 +19,6 @@
 ! Current revisions:
 ! -----------------
-!
-! 
+! precipitation_amount, precipitation_rate, prr moved to arrays_3d
+!
 ! Former revisions:
 ! -----------------
@@ -134,12 +134,12 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  dzw, e, nr, ol, p, pt, q, qc, ql, ql_c, ql_v, ql_vp, qr, qsws,  &
-               rho, sa, shf, tend, ts, u, us, v, vpt, w, z0, z0h, z0q, zu, zw
+        ONLY:  dzw, e, nr, ol, p, pt, precipitation_amount, precipitation_rate,&
+               prr,q, qc, ql, ql_c, ql_v, ql_vp, qr, qsws, rho, sa, shf, tend, &
+               ts, u, us, v, vpt, w, z0, z0h, z0q, zu, zw
         
     USE averaging
         
     USE cloud_parameters,                                                      &
-        ONLY:  hyrho, l_d_cp, precipitation_amount, precipitation_rate, prr,   &
-               pt_d_t
+        ONLY:  hyrho, l_d_cp, pt_d_t
                
     USE control_parameters,                                                    &
Index: palm/trunk/SOURCE/data_output_3d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_3d.f90	(revision 1846)
+++ palm/trunk/SOURCE/data_output_3d.f90	(revision 1849)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! ------------------
-!
+! prr moved to arrays_3d
 !
 ! Former revisions:
@@ -116,11 +116,11 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  e, nr, p, pt, q, qc, ql, ql_c, ql_v, qr, rho, sa, tend, u, v,   &
-               vpt, w
+        ONLY:  e, nr, p, pt, prr, q, qc, ql, ql_c, ql_v, qr, rho, sa, tend, u, &
+               v, vpt, w
         
     USE averaging
         
     USE cloud_parameters,                                                      &
-        ONLY:  l_d_cp, prr, pt_d_t
+        ONLY:  l_d_cp, pt_d_t
         
     USE control_parameters,                                                    &
Index: palm/trunk/SOURCE/diffusion_e.f90
===================================================================
--- palm/trunk/SOURCE/diffusion_e.f90	(revision 1846)
+++ palm/trunk/SOURCE/diffusion_e.f90	(revision 1849)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-!
+! Adapted for modularization of microphysics
 ! 
 ! Former revisions:
@@ -122,7 +122,4 @@
                   wall_adjustment, wall_adjustment_factor
 
-       USE cloud_parameters,                                                   &
-           ONLY:  collision_turbulence
-
        USE grid_variables,                                                     &
            ONLY:  ddx2, ddy2
@@ -133,5 +130,8 @@
            
        USE kinds
-       
+
+       USE microphysics_mod,                                                   &
+           ONLY:  collision_turbulence
+
        USE particle_attributes,                                                &
            ONLY:  use_sgs_for_particles, wang_kernel
@@ -307,5 +307,5 @@
 !
 !--    Boundary condition for dissipation
-       IF ( use_sgs_for_particles  .OR.  wang_kernel  .OR.                     &
+       IF ( use_sgs_for_particles  .OR.  wang_kernel  .OR.  &
             collision_turbulence )  THEN
           DO  i = nxl, nxr
@@ -332,7 +332,4 @@
            ONLY:  atmos_ocean_sign, g, use_single_reference_value,             &
                   wall_adjustment, wall_adjustment_factor
-
-       USE cloud_parameters,                                                   &
-           ONLY:  collision_turbulence
 
        USE grid_variables,                                                     &
@@ -344,5 +341,8 @@
            
        USE kinds
-       
+
+       USE microphysics_mod,                                                   &
+           ONLY:  collision_turbulence
+
        USE particle_attributes,                                                &
            ONLY:  use_sgs_for_particles, wang_kernel
@@ -536,7 +536,4 @@
                   wall_adjustment, wall_adjustment_factor
 
-       USE cloud_parameters,                                                   &
-           ONLY:  collision_turbulence
-
        USE grid_variables,                                                     &
            ONLY:  ddx2, ddy2
@@ -546,5 +543,8 @@
            
        USE kinds
-       
+
+       USE microphysics_mod,                                                   &
+           ONLY:  collision_turbulence
+
        USE particle_attributes,                                                &
            ONLY:  use_sgs_for_particles, wang_kernel
@@ -621,5 +621,6 @@
 !
 !--    Store dissipation if needed for calculating the sgs particle velocities
-       IF ( use_sgs_for_particles  .OR.  wang_kernel  .OR.  collision_turbulence )  THEN
+       IF ( use_sgs_for_particles  .OR.  wang_kernel  .OR.                     &
+            collision_turbulence )  THEN
           DO  k = nzb_s_inner(j,i)+1, nzt
              diss(k,j,i) = dissipation(k)
Index: palm/trunk/SOURCE/flow_statistics.f90
===================================================================
--- palm/trunk/SOURCE/flow_statistics.f90	(revision 1846)
+++ palm/trunk/SOURCE/flow_statistics.f90	(revision 1849)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-!
+! prr moved to arrays_3d
 !
 ! Former revisions:
@@ -186,11 +186,11 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  ddzu, ddzw, e, hyp, km, kh, nr, ol, p, prho, pt, q, qc, ql, qr, &
-               qs, qsws, qswst, rho, sa, saswsb, saswst, shf, td_lsa_lpt,      &
+        ONLY:  ddzu, ddzw, e, hyp, km, kh, nr, ol, p, prho, prr, pt, q, qc, ql,&
+               qr, qs, qsws, qswst, rho, sa, saswsb, saswst, shf, td_lsa_lpt,  &
                td_lsa_q, td_sub_lpt, td_sub_q, time_vert, ts, tswst, u, ug, us,& 
                usws, uswst, vsws, v, vg, vpt, vswst, w, w_subs, zw
         
     USE cloud_parameters,                                                      &
-        ONLY:   l_d_cp, prr, pt_d_t
+        ONLY:   l_d_cp, pt_d_t
         
     USE control_parameters,                                                    &
Index: palm/trunk/SOURCE/header.f90
===================================================================
--- palm/trunk/SOURCE/header.f90	(revision 1846)
+++ palm/trunk/SOURCE/header.f90	(revision 1849)
@@ -19,6 +19,6 @@
 ! Current revisions:
 ! -----------------
-! 
-! 
+! Adapted for modularization of microphysics
+!
 ! Former revisions:
 ! -----------------
@@ -259,8 +259,6 @@
         
     USE cloud_parameters,                                                      &
-        ONLY:  cloud_water_sedimentation, collision_turbulence, cp,            &
-               c_sedimentation, limiter_sedimentation, l_v, nc_const,          &
-               r_d, ventilation_effect
-        
+        ONLY:  cp, l_v, r_d
+
     USE cpulog,                                                                &
         ONLY:  log_point_s
@@ -280,5 +278,10 @@
     USE land_surface_model_mod,                                                &
         ONLY: land_surface, lsm_header
- 
+
+    USE microphysics_mod,                                                      &
+        ONLY:  cloud_water_sedimentation, collision_turbulence,                &
+               c_sedimentation, limiter_sedimentation, nc_const,               &
+               ventilation_effect
+
     USE model_1d,                                                              &
         ONLY:  damp_level_ind_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
Index: palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_3d_model.f90	(revision 1846)
+++ palm/trunk/SOURCE/init_3d_model.f90	(revision 1849)
@@ -19,6 +19,9 @@
 ! Current revisions:
 ! ------------------
-! 
-! 
+! Adapted for modularization of microphysics.
+! precipitation_amount, precipitation_rate, prr moved to arrays_3d.
+! Initialization of nc_1d, nr_1d, pt_1d, qc_1d, qr_1d, q_1d moved to 
+! microphysics_init.
+!
 ! Former revisions:
 ! -----------------
@@ -265,9 +268,5 @@
 
     USE arrays_3d
-    
-    USE cloud_parameters,                                                      &
-        ONLY:  collision_turbulence, nc_const, precipitation_amount,           &
-               precipitation_rate, prr
-    
+
     USE constants,                                                             &
         ONLY:  pi
@@ -289,5 +288,8 @@
   
     USE ls_forcing_mod
-    
+
+    USE microphysics_mod,                                                      &
+        ONLY:  collision_turbulence, microphysics_init
+
     USE model_1d,                                                              &
         ONLY:  e1d, kh1d, km1d, l1d, rif1d, u1d, us1d, usws1d, v1d, vsws1d 
@@ -483,8 +485,4 @@
 
 !
-!--          1D-arrays
-             ALLOCATE ( nc_1d(nzb:nzt+1), pt_1d(nzb:nzt+1),                 &
-                        q_1d(nzb:nzt+1), qc_1d(nzb:nzt+1) )
-!
 !--          3D-cloud water content
 #if defined( __nopointer )
@@ -498,8 +496,4 @@
 
              IF ( microphysics_seifert )  THEN
-!
-!--             1D-arrays
-                ALLOCATE ( nr_1d(nzb:nzt+1), qr_1d(nzb:nzt+1) )
-
 !
 !--             2D-rain water content and rain drop concentration arrays
@@ -743,7 +737,4 @@
                    ENDDO
                 ENDDO
-!
-!--             Initialze nc_1d with default value
-                nc_1d(:) = nc_const
 
              ENDIF
@@ -882,7 +873,4 @@
              ENDDO
              IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
-!
-!--             Initialze nc_1d with default value
-                nc_1d(:) = nc_const
 
                 DO  i = nxlg, nxrg
@@ -1199,8 +1187,4 @@
 
           precipitation_amount = 0.0_wp
-
-          IF ( microphysics_seifert )  THEN
-             nc_1d = nc_const
-          ENDIF 
        ENDIF
 !
@@ -1655,4 +1639,7 @@
 !--    lpm_init) is not defined.
        CALL init_cloud_physics
+!
+!--    Initialize bulk cloud microphysics
+       CALL microphysics_init
     ENDIF
 
Index: palm/trunk/SOURCE/init_cloud_physics.f90
===================================================================
--- palm/trunk/SOURCE/init_cloud_physics.f90	(revision 1846)
+++ palm/trunk/SOURCE/init_cloud_physics.f90	(revision 1849)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-!
+! bfactor removed
 ! 
 ! Former revisions:
@@ -85,16 +85,9 @@
         
     USE cloud_parameters,                                                      &
-        ONLY:  bfactor, cp, c_sedimentation, dpirho_l, dt_precipitation,       &
-               hyrho, k_st, l_d_cp, l_d_r, l_d_rv, l_v, mass_of_solute,  &
-               molecular_weight_of_solute, molecular_weight_of_water, pirho_l, &
-               pt_d_t, rho_l, r_d, r_v, sed_qc_const, schmidt, schmidt_p_1d3,  &
-               sigma_gc, t_d_pt, vanthoff, w_precipitation
-        
-    USE constants,                                                             &
-        ONLY:  pi
-        
+        ONLY:  cp, hyrho, l_d_cp, l_d_r, l_d_rv, l_v, pt_d_t, rho_l, r_d, r_v, &
+               t_d_pt
+                
     USE control_parameters,                                                    &
-        ONLY:  g, message_string, microphysics_seifert, pt_surface,            &
-               rho_surface, surface_pressure
+        ONLY:  g, message_string, pt_surface, rho_surface, surface_pressure
     
     USE indices,                                                               &
@@ -118,23 +111,4 @@
     l_d_rv = l_v / r_v
 
-    schmidt_p_1d3 = schmidt**( 1.0_wp / 3.0_wp )
-
-    pirho_l  = pi * rho_l / 6.0_wp
-    dpirho_l = 1.0_wp / pirho_l
-!
-!-- constant for the sedimentation of cloud water (2-moment cloud physics)
-    sed_qc_const = k_st * ( 3.0_wp / ( 4.0_wp * pi * rho_l )                   &
-                          )**( 2.0_wp / 3.0_wp ) *                             &
-                   EXP( 5.0_wp * LOG( sigma_gc )**2 )
-!
-!-- Calculate timestep according to precipitation
-    IF ( microphysics_seifert )  THEN
-       dt_precipitation = c_sedimentation * MINVAL( dzu(nzb+2:nzt) ) /         &
-                          w_precipitation
-    ENDIF
-!
-!-- Calculate factor used in equation for droplet growth by condensation
-    bfactor = 3.0_wp * vanthoff * mass_of_solute * molecular_weight_of_water   &
-              / ( 4.0_wp * pi * rho_l * molecular_weight_of_solute )
 !
 !-- Calculate:
Index: palm/trunk/SOURCE/land_surface_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 1846)
+++ palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 1849)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! prr moved to arrays_3d
 ! 
 ! Former revisions:
@@ -137,9 +137,9 @@
  
     USE arrays_3d,                                                             &
-        ONLY:  hyp, ol, pt, pt_p, q, q_p, ql, qsws, shf, ts, us, vpt, z0, z0h, &
-               z0q
+        ONLY:  hyp, ol, pt, pt_p, prr, q, q_p, ql, qsws, shf, ts, us, vpt, z0, &
+               z0h, z0q
 
     USE cloud_parameters,                                                      &
-        ONLY:  cp, hyrho, l_d_cp, l_d_r, l_v, prr, pt_d_t, rho_l, r_d, r_v
+        ONLY:  cp, hyrho, l_d_cp, l_d_r, l_v, pt_d_t, rho_l, r_d, r_v
 
     USE control_parameters,                                                    &
Index: palm/trunk/SOURCE/lpm_droplet_condensation.f90
===================================================================
--- palm/trunk/SOURCE/lpm_droplet_condensation.f90	(revision 1846)
+++ palm/trunk/SOURCE/lpm_droplet_condensation.f90	(revision 1849)
@@ -19,5 +19,11 @@
 ! Current revisions:
 ! ------------------
-!
+! Interpolation of supersaturation has been removed because it is not in 
+! accordance with the release/depletion of latent heat/water vapor in 
+! interaction_droplets_ptq.
+!
+! Calculation of particle Reynolds number has been corrected.
+!
+! eps_ros added from modules
 ! 
 ! Former revisions:
@@ -90,8 +96,8 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  hyp, pt, q,  ql_c, ql_v, zu
+        ONLY:  hyp, pt, q,  ql_c, ql_v
 
     USE cloud_parameters,                                                      &
-        ONLY:  bfactor, eps_ros, l_d_rv, l_v, rho_l,  r_v
+        ONLY:  l_d_rv, l_v, rho_l, r_v
 
     USE constants,                                                             &
@@ -113,7 +119,8 @@
 
     USE particle_attributes,                                                   &
-        ONLY:  block_offset, curvature_solution_effects, grid_particles,       &
-               hall_kernel, number_of_particles, particles, radius_classes,    &
-               use_kernel_tables, wang_kernel
+        ONLY:  curvature_solution_effects, hall_kernel, mass_of_solute,        &
+               molecular_weight_of_solute, molecular_weight_of_water,          &
+               number_of_particles, particles, radius_classes,                 &
+               use_kernel_tables, vanthoff, wang_kernel
 
 
@@ -129,24 +136,18 @@
     INTEGER(iwp) :: kp                         !<
     INTEGER(iwp) :: n                          !<
-    INTEGER(iwp) :: nb                         !<
     INTEGER(iwp) :: ros_count                  !<
  
-    INTEGER(iwp), PARAMETER ::  maxtry = 40      !<
-
-    INTEGER(iwp), DIMENSION(0:7) ::  end_index   !<
-    INTEGER(iwp), DIMENSION(0:7) ::  start_index !<
-
-    LOGICAL ::  repeat                           !<
-
-    LOGICAL, DIMENSION(number_of_particles) ::  flag_1 !<
+    INTEGER(iwp), PARAMETER ::  maxtry = 40    !<
+
+    LOGICAL ::  repeat                         !<
 
     REAL(wp) ::  aa                            !<
-    REAL(wp) ::  afactor                       !<
+    REAL(wp) ::  afactor                       !< curvature effects
     REAL(wp) ::  arg                           !<
-    REAL(wp) ::  bb                            !<
-    REAL(wp) ::  cc                            !<
-    REAL(wp) ::  dd                            !<
+    REAL(wp) ::  bfactor                       !< solute effects
     REAL(wp) ::  ddenom                        !<
     REAL(wp) ::  delta_r                       !<
+    REAL(wp) ::  diameter                      !< diameter of cloud droplets
+    REAL(wp) ::  diff_coeff_v                  !< diffusivity for water vapor
     REAL(wp) ::  drdt                          !<
     REAL(wp) ::  drdt_ini                      !<
@@ -157,4 +158,6 @@
     REAL(wp) ::  d2rdtdr                       !<
     REAL(wp) ::  errmax                        !<
+    REAL(wp) ::  e_a                           !< current vapor pressure
+    REAL(wp) ::  e_s                           !< current saturation vapor pressure
     REAL(wp) ::  err_ros                       !<
     REAL(wp) ::  g1                            !<
@@ -162,18 +165,13 @@
     REAL(wp) ::  g3                            !<
     REAL(wp) ::  g4                            !<
-    REAL(wp) ::  gg                            !<
-    REAL(wp) ::  pt_int                        !<
-    REAL(wp) ::  pt_int_l                      !<
-    REAL(wp) ::  pt_int_u                      !<
-    REAL(wp) ::  q_int                         !<
-    REAL(wp) ::  q_int_l                       !<
-    REAL(wp) ::  q_int_u                       !<
     REAL(wp) ::  r_ros                         !<
     REAL(wp) ::  r_ros_ini                     !<
     REAL(wp) ::  sigma                         !<
-    REAL(wp) ::  x                             !<
-    REAL(wp) ::  y                             !< 
+    REAL(wp) ::  thermal_conductivity_v        !< thermal conductivity for water
+    REAL(wp) ::  t_int                         !< temperature
+    REAL(wp) ::  w_s                           !< terminal velocity of droplets
     REAL(wp) ::  re_p                          !<
- 
+
+!
 !-- Parameters for Rosenbrock method
     REAL(wp), PARAMETER ::  a21 = 2.0_wp               !<
@@ -200,146 +198,96 @@
     REAL(wp), PARAMETER ::  pshrnk = -1.0_wp /3.0_wp   !<
     REAL(wp), PARAMETER ::  shrnk = 0.5_wp             !<
-
-    REAL(wp), DIMENSION(number_of_particles) ::  afactor_v              !<
-    REAL(wp), DIMENSION(number_of_particles) ::  diff_coeff_v           !<
-    REAL(wp), DIMENSION(number_of_particles) ::  e_s                    !<
-    REAL(wp), DIMENSION(number_of_particles) ::  e_a                    !<
+    REAL(wp), PARAMETER ::  eps_ros = 1.0E-4_wp        !< accuracy of Rosenbrock method
+
+!
+!-- Parameters for terminal velocity
+    REAL(wp), PARAMETER ::  a_rog = 9.65_wp      !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  b_rog = 10.43_wp     !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  c_rog = 0.6_wp       !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  k_cap_rog = 4.0_wp   !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  k_low_rog = 12.0_wp  !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  d0_rog = 0.745_wp    !< separation diameter
+
+    REAL(wp), DIMENSION(number_of_particles) ::  ventilation_effect     !<
     REAL(wp), DIMENSION(number_of_particles) ::  new_r                  !<
-    REAL(wp), DIMENSION(number_of_particles) ::  p_int                  !<
-    REAL(wp), DIMENSION(number_of_particles) ::  thermal_conductivity_v !<
-    REAL(wp), DIMENSION(number_of_particles) ::  t_int                  !<
-    REAL(wp), DIMENSION(number_of_particles) ::  xv                     !<
-    REAL(wp), DIMENSION(number_of_particles) ::  yv                     !<
-    REAL(wp), DIMENSION(number_of_particles) ::  zv                     !<
+
 
 
     CALL cpu_log( log_point_s(42), 'lpm_droplet_condens', 'start' )
 
-    start_index = grid_particles(kp,jp,ip)%start_index
-    end_index   = grid_particles(kp,jp,ip)%end_index
-
-    xv = particles(1:number_of_particles)%x
-    yv = particles(1:number_of_particles)%y
-    zv = particles(1:number_of_particles)%z
-
-    DO  nb = 0,7
-
-       i = ip + block_offset(nb)%i_off
-       j = jp + block_offset(nb)%j_off
-       k = kp + block_offset(nb)%k_off
-
-       DO  n = start_index(nb), end_index(nb)
-!
-!--    Interpolate temperature and humidity.
-          x  = xv(n) - i * dx
-          y  = yv(n) - 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
-
-          pt_int_l = ( ( gg - aa ) * pt(k,j,i)   + ( gg - bb ) * pt(k,j,i+1)   &
-                     + ( gg - cc ) * pt(k,j+1,i) + ( gg - dd ) * pt(k,j+1,i+1) &
-                     ) / ( 3.0_wp * gg )
-
-          pt_int_u = ( ( gg-aa ) * pt(k+1,j,i)   + ( gg-bb ) * pt(k+1,j,i+1)   &
-                     + ( gg-cc ) * pt(k+1,j+1,i) + ( gg-dd ) * pt(k+1,j+1,i+1) &
-                     ) / ( 3.0_wp * gg )
-
-          pt_int = pt_int_l + ( particles(n)%z - zu(k) ) / dz *                &
-                              ( pt_int_u - pt_int_l )
-
-          q_int_l = ( ( gg - aa ) * q(k,j,i)     + ( gg - bb ) * q(k,j,i+1)    &
-                    + ( gg - cc ) * q(k,j+1,i)   + ( gg - dd ) * q(k,j+1,i+1)  &
-                    ) / ( 3.0_wp * gg )
-
-          q_int_u = ( ( gg-aa ) * q(k+1,j,i)   + ( gg-bb ) * q(k+1,j,i+1)      &
-                    + ( gg-cc ) * q(k+1,j+1,i) + ( gg-dd ) * q(k+1,j+1,i+1)    &
-                    ) / ( 3.0_wp * gg )
-
-          q_int = q_int_l + ( zv(n) - zu(k) ) / dz *                           &
-                            ( q_int_u - q_int_l )
-
-!
-!--       Calculate real temperature and saturation vapor pressure
-          p_int(n) = hyp(k) + ( particles(n)%z - zu(k) ) / dz *                &
-                              ( hyp(k+1)-hyp(k) )
-          t_int(n) = pt_int * ( p_int(n) / 100000.0_wp )**0.286_wp
-
-          e_s(n) = 611.0_wp * EXP( l_d_rv * ( 3.6609E-3_wp - 1.0_wp /          &
-                                   t_int(n) ) )
-
-!
-!--       Current vapor pressure
-          e_a(n) = q_int * p_int(n) / ( 0.378_wp * q_int + 0.622_wp )
-
-       ENDDO
-    ENDDO
+!
+!-- Calculate temperature, saturation vapor pressure and current vapor pressure
+    t_int = pt(kp,jp,ip) * ( hyp(kp) / 100000.0_wp )**0.286_wp
+    e_s   = 611.0_wp * EXP( l_d_rv * ( 3.6609E-3_wp - 1.0_wp / t_int ) )
+    e_a   = q(kp,jp,ip) * hyp(kp) / ( 0.378_wp * q(kp,jp,ip) + 0.622_wp )
+!
+!-- Thermal conductivity for water (from Rogers and Yau, Table 7.1),
+!-- diffusivity for water vapor (after Hall und Pruppacher, 1976)
+    thermal_conductivity_v = 7.94048E-05_wp * t_int + 0.00227011_wp
+    diff_coeff_v           = 0.211E-4_wp * ( t_int / 273.15_wp )**1.94_wp * &
+                             ( 101325.0_wp / hyp(kp) )
+!
+!-- Calculate effects of heat conductivity and diffusion of water vapor on the 
+!-- condensation/evaporation process (typically known as 1.0 / (F_k + F_d) )
+    ddenom  = 1.0_wp / ( rho_l * r_v * t_int / ( e_s * diff_coeff_v ) +        &
+                         ( l_v / ( r_v * t_int ) - 1.0_wp ) * rho_l *          &
+                         l_v / ( thermal_conductivity_v * t_int )              &
+                       )
 
     new_r = 0.0_wp
-    flag_1 = .false.
-
+
+!
+!-- Determine ventilation effect on evaporation of large drops
     DO  n = 1, number_of_particles
-!
-!--    Change in radius by condensation/evaporation
-       IF ( particles(n)%radius >= 4.0E-5_wp  .AND.                            &
-            e_a(n)/e_s(n) < 1.0_wp )  THEN
-!
-!--    Approximation for large radii, where curvature and solution effects
-!--    can be neglected but ventilation effect has to be included in case of
-!--    evaporation.
-!--    First calculate the droplet's Reynolds number
-          re_p = 2.0_wp * particles(n)%radius * ABS( particles(n)%speed_z ) /  &
-                                                     molecular_viscosity
+
+       IF ( particles(n)%radius >= 4.0E-5_wp  .AND.  e_a / e_s < 1.0_wp )  THEN
+!
+!--       Terminal velocity is computed for vertical direction (Rogers et al.,
+!--       1993, J. Appl. Meteorol.)
+          diameter = particles(n)%radius * 2000.0_wp !diameter in mm
+          IF ( diameter <= d0_rog )  THEN
+             w_s = k_cap_rog * diameter * ( 1.0_wp - EXP( -k_low_rog * diameter ) )
+          ELSE
+             w_s = a_rog - b_rog * EXP( -c_rog * diameter )
+          ENDIF
+!
+!--       First calculate droplet's Reynolds number
+          re_p = 2.0_wp * particles(n)%radius * w_s / molecular_viscosity
 !
 !--       Ventilation coefficient (Rogers and Yau, 1989):
           IF ( re_p > 2.5_wp )  THEN
-             afactor_v(n) = 0.78_wp + 0.28_wp * SQRT( re_p )
+             ventilation_effect(n) = 0.78_wp + 0.28_wp * SQRT( re_p )
           ELSE
-             afactor_v(n) = 1.0_wp + 0.09_wp * re_p
+             ventilation_effect(n) = 1.0_wp + 0.09_wp * re_p
           ENDIF
-          flag_1(n) = .TRUE.
-       ELSEIF ( particles(n)%radius >= 1.0E-6_wp  .OR.                         &
-                .NOT. curvature_solution_effects )  THEN
-!
-!--    Approximation for larger radii in case that curvature and solution
-!--    effects are neglected and ventilation effects does not play a role
-          afactor_v(n) = 1.0_wp
-          flag_1(n) = .TRUE.
+       ELSE
+!
+!--       For small droplets or in supersaturated environments, the ventilation 
+!--       effect does not play a role
+          ventilation_effect(n) = 1.0_wp
        ENDIF
     ENDDO
 
-    DO  n = 1, number_of_particles
-!
-!--    Thermal conductivity for water (from Rogers and Yau, Table 7.1),
-!--    diffusivity for water vapor (after Hall und Pruppacher, 1976)
-       thermal_conductivity_v(n) = 7.94048E-05_wp * t_int(n) + 0.00227011_wp
-       diff_coeff_v(n)           = 0.211E-4_wp *                               &
-                   ( t_int(n) / 273.15_wp )**1.94_wp * ( 101325.0_wp / p_int(n))
-
-       IF(flag_1(n)) then
-          arg = particles(n)%radius**2 + 2.0_wp * dt_3d * afactor_v(n) *       &
-                  ( e_a(n) / e_s(n) - 1.0_wp ) /                               &
-                  ( ( l_d_rv / t_int(n) - 1.0_wp ) * l_v * rho_l / t_int(n) /  &
-                  thermal_conductivity_v(n) +                                  &
-                  rho_l * r_v * t_int(n) / diff_coeff_v(n) / e_s(n) )
-
+!
+!-- Use analytic model for condensational growth
+    IF( .NOT. curvature_solution_effects ) then
+       DO  n = 1, number_of_particles
+          arg = particles(n)%radius**2 + 2.0_wp * dt_3d * ddenom *             &
+                                         ventilation_effect(n) *               &
+                                         ( e_a / e_s - 1.0_wp )
           arg = MAX( arg, 1.0E-16_wp )
           new_r(n) = SQRT( arg )
-        ENDIF
-    ENDDO
-
+       ENDDO
+    ENDIF
+
+!
+!-- If selected, use numerical solution of the condensational growth
+!-- equation (e.g., for studying the activation of aerosols).
+!-- Curvature and solutions effects are included in growth equation.
+!-- Change in Radius is calculated with a 4th-order Rosenbrock method
+!-- for stiff o.d.e's with monitoring local truncation error to adjust
+!-- stepsize (see Numerical recipes in FORTRAN, 2nd edition, p. 731).
     DO  n = 1, number_of_particles
-       IF ( curvature_solution_effects  .AND.                                  &
-            ( ( particles(n)%radius < 1.0E-6_wp )  .OR.                        &
-              ( new_r(n) < 1.0E-6_wp ) ) )  THEN
-!
-!--       Curvature and solutions effects are included in growth equation.
-!--       Change in Radius is calculated with 4th-order Rosenbrock method
-!--       for stiff o.d.e's with monitoring local truncation error to adjust
-!--       stepsize (see Numerical recipes in FORTRAN, 2nd edition, p. 731).
-!--       For larger radii the simple analytic method (see ELSE) gives
-!--       almost the same results.
+       IF ( curvature_solution_effects )  THEN
 
           ros_count = 0
@@ -356,20 +304,19 @@
              repeat = .FALSE.
 !
-!--          Surface tension (Straka, 2009):
-             sigma = 0.0761_wp - 0.000155_wp * ( t_int(n) - 273.15_wp )
+!--          Curvature effect (afactor) with surface tension parameterization
+!--          by Straka (2009)
+             sigma = 0.0761_wp - 0.000155_wp * ( t_int - 273.15_wp )
+             afactor = 2.0_wp * sigma / ( rho_l * r_v * t_int )
+!
+!--          Solute effect (bfactor), mass of solute to be replaced by variable
+!--          aerosol radius
+             bfactor = 3.0_wp * vanthoff * mass_of_solute *                     &
+                       molecular_weight_of_water / ( 4.0_wp * pi * rho_l *      &
+                                                     molecular_weight_of_solute &
+                                                   )
 
              r_ros = particles(n)%radius
              dt_ros_sum  = 0.0_wp      ! internal integrated time (s)
              internal_timestep_count = 0
-
-             ddenom  = 1.0_wp / ( rho_l * r_v * t_int(n) / ( e_s(n) *          &
-                                  diff_coeff_v(n) ) + ( l_v /                  &
-                                  ( r_v * t_int(n) ) - 1.0_wp ) *              &
-                                  rho_l * l_v / ( thermal_conductivity_v(n) *  &
-                                  t_int(n) )                                   &
-                                )
-
-             afactor = 2.0_wp * sigma / ( rho_l * r_v * t_int(n) )
-
 !
 !--          Take internal time step values from the end of last PALM time step
@@ -380,5 +327,5 @@
 !--          because larger values may lead to secondary solutions which are
 !--          physically unlikely
-             IF ( dt_ros_next > 1.0E-2_wp  .AND.  e_a(n)/e_s(n) < 1.0_wp )  THEN
+             IF ( dt_ros_next > 1.0E-2_wp  .AND.  e_a / e_s < 1.0_wp )  THEN
                 dt_ros_next = 1.0E-3_wp
              ENDIF
@@ -408,6 +355,9 @@
 !
 !--             Derivative at starting value
-                drdt = ddenom / r_ros * ( e_a(n) / e_s(n) - 1.0_wp - afactor / &
-                                          r_ros + bfactor / r_ros**3 )
+                drdt = ddenom * ventilation_effect(n) * ( e_a / e_s - 1.0_wp - &
+                                                          afactor / r_ros +    &
+                                                          bfactor / r_ros**3   &
+                                                        ) / r_ros
+
                 drdt_ini       = drdt
                 dt_ros_sum_ini = dt_ros_sum
@@ -416,7 +366,9 @@
 !
 !--             Calculate radial derivative of dr/dt
-                d2rdtdr = ddenom * ( ( 1.0_wp - e_a(n)/e_s(n) ) / r_ros**2 +   &
-                                     2.0_wp * afactor / r_ros**3 -             &
-                                     4.0_wp * bfactor / r_ros**5 )
+                d2rdtdr = ddenom * ventilation_effect(n) *                     &
+                                       ( ( 1.0_wp - e_a / e_s ) / r_ros**2 +   &
+                                         2.0_wp * afactor / r_ros**3 -         &
+                                         4.0_wp * bfactor / r_ros**5           &
+                                       )
 !
 !--             Adjust stepsize unless required accuracy is reached
@@ -432,14 +384,16 @@
                    g1    = drdt_ini / aa
                    r_ros = r_ros_ini + a21 * g1
-                   drdt  = ddenom / r_ros * ( e_a(n) / e_s(n) - 1.0_wp -       &
-                                              afactor / r_ros +                &
-                                              bfactor / r_ros**3 )
+                   drdt  = ddenom * ventilation_effect(n) * ( e_a / e_s - 1.0_wp - &
+                                                              afactor / r_ros +    &
+                                                              bfactor / r_ros**3   &
+                                                            ) / r_ros
 
                    g2    = ( drdt + c21 * g1 / dt_ros )&
                            / aa
                    r_ros = r_ros_ini + a31 * g1 + a32 * g2
-                   drdt  = ddenom / r_ros * ( e_a(n) / e_s(n) - 1.0_wp -       &
-                                              afactor / r_ros +                &
-                                              bfactor / r_ros**3 )
+                   drdt  = ddenom * ventilation_effect(n) * ( e_a / e_s - 1.0_wp - &
+                                                              afactor / r_ros +    &
+                                                              bfactor / r_ros**3   &
+                                                            ) / r_ros
 
                    g3    = ( drdt +  &
@@ -510,5 +464,5 @@
 !--          Limiting values are tested for droplets down to 1.0E-7
              IF ( new_r(n) - particles(n)%radius >= 3.0E-7_wp  .AND.  &
-                  e_a(n)/e_s(n) < 0.97_wp )  THEN
+                  e_a / e_s < 0.97_wp )  THEN
                 ros_count = ros_count + 1
                 repeat = .TRUE.
@@ -546,5 +500,5 @@
             new_r(n) < 0.0_wp )  THEN
           WRITE( message_string, * ) '#1 k=',k,' j=',j,' i=',i,                &
-                       ' e_s=',e_s(n), ' e_a=',e_a(n),' t_int=',t_int(n),      &
+                       ' e_s=',e_s, ' e_a=',e_a,' t_int=',t_int,      &
                        ' &delta_r=',delta_r,                                   &
                        ' particle_radius=',particles(n)%radius
Index: palm/trunk/SOURCE/microphysics.f90
===================================================================
--- palm/trunk/SOURCE/microphysics.f90	(revision 1846)
+++ palm/trunk/SOURCE/microphysics.f90	(revision 1849)
@@ -19,6 +19,6 @@
 ! Current revisions:
 ! ------------------
-! 
-! 
+! Adapted for modularization of microphysics.
+!
 ! Former revisions:
 ! -----------------
@@ -98,12 +98,76 @@
 ! Description:
 ! ------------
-!> Calculate cloud microphysics according to the two moment bulk 
-!> scheme by Seifert and Beheng (2006).
+!> Calculate bilk cloud microphysics.
 !------------------------------------------------------------------------------!
  MODULE microphysics_mod
- 
+
+    USE  kinds
+
+    IMPLICIT NONE
+
+    LOGICAL ::  cloud_water_sedimentation = .FALSE.  !< cloud water sedimentation
+    LOGICAL ::  limiter_sedimentation = .TRUE.       !< sedimentation limiter
+    LOGICAL ::  collision_turbulence = .FALSE.       !< turbulence effects
+    LOGICAL ::  ventilation_effect = .TRUE.          !< ventilation effect
+
+    REAL(wp) ::  a_1 = 8.69E-4_wp          !< coef. in turb. parametrization (cm-2 s3)
+    REAL(wp) ::  a_2 = -7.38E-5_wp         !< coef. in turb. parametrization (cm-2 s3)
+    REAL(wp) ::  a_3 = -1.40E-2_wp         !< coef. in turb. parametrization
+    REAL(wp) ::  a_term = 9.65_wp          !< coef. for terminal velocity (m s-1)
+    REAL(wp) ::  a_vent = 0.78_wp          !< coef. for ventilation effect
+    REAL(wp) ::  b_1 = 11.45E-6_wp         !< coef. in turb. parametrization (m)
+    REAL(wp) ::  b_2 = 9.68E-6_wp          !< coef. in turb. parametrization (m)
+    REAL(wp) ::  b_3 = 0.62_wp             !< coef. in turb. parametrization
+    REAL(wp) ::  b_term = 9.8_wp           !< coef. for terminal velocity (m s-1)
+    REAL(wp) ::  b_vent = 0.308_wp         !< coef. for ventilation effect
+    REAL(wp) ::  beta_cc = 3.09E-4_wp      !< coef. in turb. parametrization (cm-2 s3)
+    REAL(wp) ::  c_1 = 4.82E-6_wp          !< coef. in turb. parametrization (m)
+    REAL(wp) ::  c_2 = 4.8E-6_wp           !< coef. in turb. parametrization (m)
+    REAL(wp) ::  c_3 = 0.76_wp             !< coef. in turb. parametrization
+    REAL(wp) ::  c_const = 0.93_wp         !< const. in Taylor-microscale Reynolds number
+    REAL(wp) ::  c_evap = 0.7_wp           !< constant in evaporation
+    REAL(wp) ::  c_term = 600.0_wp         !< coef. for terminal velocity (m-1)
+    REAL(wp) ::  diff_coeff_l = 0.23E-4_wp  !< diffusivity of water vapor (m2 s-1)
+    REAL(wp) ::  eps_sb = 1.0E-20_wp       !< threshold in two-moments scheme
+    REAL(wp) ::  k_cc = 9.44E09_wp         !< const. cloud-cloud kernel (m3 kg-2 s-1)
+    REAL(wp) ::  k_cr0 = 4.33_wp           !< const. cloud-rain kernel (m3 kg-1 s-1)
+    REAL(wp) ::  k_rr = 7.12_wp            !< const. rain-rain kernel (m3 kg-1 s-1)
+    REAL(wp) ::  k_br = 1000.0_wp          !< const. in breakup parametrization (m-1)
+    REAL(wp) ::  k_st = 1.2E8_wp           !< const. in drizzle parametrization (m-1 s-1)
+    REAL(wp) ::  kappa_rr = 60.7_wp        !< const. in collision kernel (kg-1/3)
+    REAL(wp) ::  kin_vis_air = 1.4086E-5_wp  !< kin. viscosity of air (m2 s-1)
+    REAL(wp) ::  prec_time_const = 0.001_wp  !< coef. in Kessler scheme (s-1)
+    REAL(wp) ::  ql_crit = 0.0005_wp       !< coef. in Kessler scheme (kg kg-1)
+    REAL(wp) ::  schmidt_p_1d3=0.8921121_wp  !< Schmidt number**0.33333, 0.71**0.33333
+    REAL(wp) ::  sigma_gc = 1.3_wp         !< geometric standard deviation cloud droplets
+    REAL(wp) ::  thermal_conductivity_l = 2.43E-2_wp  !< therm. cond. air (J m-1 s-1 K-1)
+    REAL(wp) ::  w_precipitation = 9.65_wp  !< maximum terminal velocity (m s-1)
+    REAL(wp) ::  x0 = 2.6E-10_wp           !< separating drop mass (kg)
+    REAL(wp) ::  xrmin = 2.6E-10_wp        !< minimum rain drop size (kg)
+    REAL(wp) ::  xrmax = 5.0E-6_wp         !< maximum rain drop site (kg)
+
+    REAL(wp) ::  c_sedimentation = 2.0_wp  !< Courant number of sedimentation process
+    REAL(wp) ::  dpirho_l                  !< 6.0 / ( pi * rho_l )
+    REAL(wp) ::  dt_micro                  !< microphysics time step
+    REAL(wp) ::  nc_const = 70.0E6_wp      !< cloud droplet concentration
+    REAL(wp) ::  dt_precipitation = 100.0_wp !< timestep precipitation (s)
+    REAL(wp) ::  sed_qc_const              !< const. for sedimentation of cloud water
+    REAL(wp) ::  pirho_l                   !< pi * rho_l / 6.0;
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  nc_1d  !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  nr_1d  !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  pt_1d  !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  qc_1d  !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  qr_1d  !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  q_1d   !<
+
+    SAVE
 
     PRIVATE
-    PUBLIC microphysics_control
+    PUBLIC microphysics_control, microphysics_init
+
+    PUBLIC cloud_water_sedimentation, collision_turbulence, c_sedimentation,   &
+           dt_precipitation, limiter_sedimentation, nc_const, sigma_gc,        &
+           ventilation_effect
 
     INTERFACE microphysics_control
@@ -157,24 +221,79 @@
     END INTERFACE calc_precipitation_amount
 
-
  CONTAINS
-
-
 !------------------------------------------------------------------------------!
 ! Description:
 ! ------------
-!> Call for all grid points
+!> Initialization of bulk microphysics
+!------------------------------------------------------------------------------!
+    SUBROUTINE microphysics_init
+
+       USE arrays_3d,                                                          &
+           ONLY:  dzu
+
+       USE constants,                                                          &
+           ONLY:  pi
+
+       USE cloud_parameters,                                                   &
+           ONLY:  rho_l
+
+       USE control_parameters,                                                 &
+           ONLY:  microphysics_seifert
+
+       USE indices,                                                            &
+           ONLY:  nzb, nzt
+
+       IMPLICIT NONE
+
+!
+!--    constant for the sedimentation of cloud water (2-moment cloud physics)
+       sed_qc_const = k_st * ( 3.0_wp / ( 4.0_wp * pi * rho_l )                &
+                          )**( 2.0_wp / 3.0_wp ) *                             &
+                      EXP( 5.0_wp * LOG( sigma_gc )**2 )
+
+!
+!--    Calculate timestep according to precipitation
+       IF ( microphysics_seifert )  THEN
+          dt_precipitation = c_sedimentation * MINVAL( dzu(nzb+2:nzt) ) /      &
+                             w_precipitation
+       ENDIF
+
+!
+!--    Pre-calculate frequently calculated fractions of pi and rho_l
+       pirho_l  = pi * rho_l / 6.0_wp
+       dpirho_l = 1.0_wp / pirho_l
+
+!
+!--    Allocate 1D microphysics arrays
+       ALLOCATE ( nc_1d(nzb:nzt+1), pt_1d(nzb:nzt+1), q_1d(nzb:nzt+1),         &
+                  qc_1d(nzb:nzt+1) )
+
+       IF ( microphysics_seifert )  THEN
+          ALLOCATE ( nr_1d(nzb:nzt+1), qr_1d(nzb:nzt+1) )
+       ENDIF
+
+!
+!--    Initialze nc_1d with nc_const
+       nc_1d = nc_const
+
+    END SUBROUTINE microphysics_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Control of microphysics for all grid points
 !------------------------------------------------------------------------------!
     SUBROUTINE microphysics_control
 
        USE arrays_3d,                                                          &
-           ONLY:  hyp, pt_init, zu
+           ONLY:  hyp, pt_init, prr, zu
 
        USE cloud_parameters,                                                   &
-           ONLY:  cloud_water_sedimentation, cp, hyrho, prr, pt_d_t, r_d, t_d_pt
+           ONLY:  cp, hyrho, pt_d_t, r_d, t_d_pt
 
        USE control_parameters,                                                 &
-           ONLY:  call_microphysics_at_all_substeps, dt_3d, dt_micro,          &
-                  g, intermediate_timestep_count, large_scale_forcing,         &
+           ONLY:  call_microphysics_at_all_substeps, dt_3d, g,                 &
+                  intermediate_timestep_count, large_scale_forcing,            &
                   lsf_surf, microphysics_kessler, microphysics_seifert,        &
                   pt_surface, rho_surface,surface_pressure
@@ -263,5 +382,5 @@
 
        USE cloud_parameters,                                                   &
-           ONLY:  eps_sb, xrmin, xrmax, hyrho
+           ONLY:  hyrho
 
        USE cpulog,                                                             &
@@ -314,10 +433,8 @@
 
        USE cloud_parameters,                                                   &
-           ONLY:  a_1, a_2, a_3, b_1, b_2, b_3, beta_cc, c_1, c_2, c_3,        &
-                  c_const, collision_turbulence, dpirho_l, eps_sb, hyrho,      &
-                  k_cc, kin_vis_air, nc_const, x0
+           ONLY:  hyrho
 
        USE control_parameters,                                                 &
-           ONLY:  dt_micro, rho_surface
+           ONLY:  rho_surface
 
        USE cpulog,                                                             &
@@ -446,11 +563,8 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  dzw, pt, q, qc
+           ONLY:  dzw, pt, prr, q, qc
 
        USE cloud_parameters,                                                   &
-           ONLY:  l_d_cp, pt_d_t, prec_time_const, prr, ql_crit
-
-       USE control_parameters,                                                 &
-           ONLY:  dt_micro
+           ONLY:  l_d_cp, pt_d_t
 
        USE indices,                                                            &
@@ -506,8 +620,8 @@
 
        USE cloud_parameters,                                                   &
-           ONLY:  collision_turbulence, eps_sb, hyrho, k_cr0
+           ONLY:  hyrho
 
        USE control_parameters,                                                 &
-           ONLY:  dt_micro, rho_surface
+           ONLY:  rho_surface
 
        USE cpulog,                                                             &
@@ -587,8 +701,8 @@
 
        USE cloud_parameters,                                                   &
-           ONLY:  dpirho_l, eps_sb, hyrho, k_br, k_rr
+           ONLY:  hyrho
 
        USE control_parameters,                                                 &
-           ONLY:  dt_micro, rho_surface
+           ONLY:  rho_surface
 
        USE cpulog,                                                             &
@@ -659,14 +773,8 @@
 
        USE cloud_parameters,                                                   &
-           ONLY:  a_term, a_vent, b_term, b_vent, c_evap, c_term,              &
-                  diff_coeff_l, dpirho_l, eps_sb, hyrho, kin_vis_air,          &
-                  l_d_cp, l_d_r, l_v, r_v, schmidt_p_1d3,                      &
-                  thermal_conductivity_l, t_d_pt, ventilation_effect
+           ONLY:  hyrho, l_d_cp, l_d_r, l_v, r_v, t_d_pt
 
        USE constants,                                                          &
            ONLY:  pi
-
-       USE control_parameters,                                                 &
-           ONLY:  dt_micro
 
        USE cpulog,                                                             &
@@ -817,12 +925,11 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  ddzu, dzu, pt, q, qc
+           ONLY:  ddzu, dzu, pt, prr, q, qc
 
        USE cloud_parameters,                                                   &
-           ONLY:  eps_sb, hyrho, l_d_cp, nc_const, prr, pt_d_t, sed_qc_const
+           ONLY:  hyrho, l_d_cp, pt_d_t
 
        USE control_parameters,                                                 &
-           ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
-                  intermediate_timestep_count
+           ONLY:  call_microphysics_at_all_substeps, intermediate_timestep_count
 
        USE cpulog,                                                             &
@@ -840,7 +947,7 @@
        IMPLICIT NONE
 
-       INTEGER(iwp) ::  i                 !<
-       INTEGER(iwp) ::  j                 !<
-       INTEGER(iwp) ::  k                 !<
+       INTEGER(iwp) ::  i             !<
+       INTEGER(iwp) ::  j             !<
+       INTEGER(iwp) ::  k             !<
 
        REAL(wp), DIMENSION(nzb:nzt+1) :: sed_qc !<
@@ -900,13 +1007,11 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  ddzu, dzu, nr, pt, q, qr
+           ONLY:  ddzu, dzu, nr, pt, prr, q, qr
 
        USE cloud_parameters,                                                   &
-           ONLY:  a_term, b_term, c_term, dpirho_l, eps_sb, hyrho,             &
-                  limiter_sedimentation, l_d_cp, prr, pt_d_t
+           ONLY:  hyrho, l_d_cp, pt_d_t
 
        USE control_parameters,                                                 &
-           ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
-                  intermediate_timestep_count
+           ONLY:  call_microphysics_at_all_substeps, intermediate_timestep_count
        USE cpulog,                                                             &
            ONLY:  cpu_log, log_point_s
@@ -1125,6 +1230,9 @@
     SUBROUTINE calc_precipitation_amount
 
+       USE arrays_3d,                                                          &
+           ONLY:  precipitation_amount, prr
+
        USE cloud_parameters,                                                   &
-           ONLY:  hyrho, precipitation_amount, prr
+           ONLY:  hyrho
 
        USE control_parameters,                                                 &
@@ -1166,5 +1274,5 @@
 ! Description:
 ! ------------
-!> Call for grid point i,j
+!> Control of microphysics for grid points i,j
 !------------------------------------------------------------------------------!
 
@@ -1172,14 +1280,12 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  hyp, nc_1d, nr, nr_1d, pt, pt_init, pt_1d, q, q_1d, qc,      &
-                  qc_1d, qr, qr_1d, zu
+           ONLY:  hyp, nr, pt, pt_init, prr, q, qc, qr, zu
 
        USE cloud_parameters,                                                   &
-           ONLY:  cloud_water_sedimentation, cp, hyrho, nc_const, prr, pt_d_t, &
-                  r_d, t_d_pt
+           ONLY:  cp, hyrho, pt_d_t, r_d, t_d_pt
 
        USE control_parameters,                                                 &
-           ONLY:  call_microphysics_at_all_substeps, dt_3d, dt_micro,          &
-                  g, intermediate_timestep_count, large_scale_forcing,         &
+           ONLY:  call_microphysics_at_all_substeps, dt_3d, g,                 &
+                  intermediate_timestep_count, large_scale_forcing,            &
                   lsf_surf, microphysics_seifert, microphysics_kessler,        &
                   pt_surface, rho_surface, surface_pressure
@@ -1286,9 +1392,6 @@
     SUBROUTINE adjust_cloud_ij( i, j )
 
-       USE arrays_3d,                                                          &
-           ONLY:  qr_1d, nr_1d
-
        USE cloud_parameters,                                                   &
-           ONLY:  eps_sb, xrmin, xrmax, hyrho
+           ONLY:  hyrho
 
        USE indices,                                                            &
@@ -1334,13 +1437,11 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  diss, dzu, nc_1d, nr_1d, qc_1d, qr_1d
+           ONLY:  diss, dzu
 
        USE cloud_parameters,                                                   &
-           ONLY:  a_1, a_2, a_3, b_1, b_2, b_3, beta_cc, c_1, c_2, c_3,        &
-                  c_const, collision_turbulence, dpirho_l, eps_sb, hyrho,      &
-                  kin_vis_air, k_cc, x0
+           ONLY:  hyrho
 
        USE control_parameters,                                                 &
-           ONLY:  dt_micro, rho_surface
+           ONLY:  rho_surface
 
        USE grid_variables,                                                     &
@@ -1454,11 +1555,8 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  dzw, pt_1d, q_1d, qc_1d
+           ONLY:  dzw, prr
 
        USE cloud_parameters,                                                   &
-           ONLY:  l_d_cp, pt_d_t, prec_time_const, prr, ql_crit
-
-       USE control_parameters,                                                 &
-           ONLY:  dt_micro
+           ONLY:  l_d_cp, pt_d_t
 
        USE indices,                                                            &
@@ -1505,11 +1603,11 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  diss, qc_1d, qr_1d
+           ONLY:  diss
 
        USE cloud_parameters,                                                   &
-           ONLY:  collision_turbulence, eps_sb, hyrho, k_cr0
+           ONLY:  hyrho
 
        USE control_parameters,                                                 &
-           ONLY:  dt_micro, rho_surface
+           ONLY:  rho_surface
 
        USE indices,                                                            &
@@ -1572,12 +1670,9 @@
     SUBROUTINE selfcollection_breakup_ij( i, j )
 
-       USE arrays_3d,                                                          &
-           ONLY:  nr_1d, qr_1d
-
        USE cloud_parameters,                                                   &
-           ONLY:  dpirho_l, eps_sb, hyrho, k_br, k_rr
+           ONLY:  hyrho
 
        USE control_parameters,                                                 &
-           ONLY:  dt_micro, rho_surface
+           ONLY:  rho_surface
 
        USE indices,                                                            &
@@ -1632,17 +1727,11 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  hyp, nr_1d, pt_1d, q_1d,  qc_1d, qr_1d
+           ONLY:  hyp
 
        USE cloud_parameters,                                                   &
-           ONLY:  a_term, a_vent, b_term, b_vent, c_evap, c_term, diff_coeff_l,&
-                  dpirho_l, eps_sb, hyrho, kin_vis_air, l_d_cp, l_d_r,         &
-                  l_v, r_v, schmidt_p_1d3, thermal_conductivity_l,             &
-                  t_d_pt, ventilation_effect
+           ONLY:  hyrho, l_d_cp, l_d_r, l_v, r_v, t_d_pt
 
        USE constants,                                                          &
            ONLY:  pi
-
-       USE control_parameters,                                                 &
-           ONLY:  dt_micro
 
        USE indices,                                                            &
@@ -1779,12 +1868,11 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  ddzu, dzu, nc_1d, pt_1d, q_1d, qc_1d
+           ONLY:  ddzu, dzu, prr
 
        USE cloud_parameters,                                                   &
-           ONLY:  eps_sb, hyrho, l_d_cp, prr, pt_d_t, sed_qc_const
+           ONLY:  hyrho, l_d_cp, pt_d_t
 
        USE control_parameters,                                                 &
-           ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
-                  intermediate_timestep_count
+           ONLY:  call_microphysics_at_all_substeps, intermediate_timestep_count
 
        USE indices,                                                            &
@@ -1798,7 +1886,7 @@
        IMPLICIT NONE
 
-       INTEGER(iwp) ::  i                 !<
-       INTEGER(iwp) ::  j                 !<
-       INTEGER(iwp) ::  k                 !<
+       INTEGER(iwp) ::  i             !<
+       INTEGER(iwp) ::  j             !<
+       INTEGER(iwp) ::  k             !<
 
        REAL(wp), DIMENSION(nzb:nzt+1) :: sed_qc  !<
@@ -1848,13 +1936,11 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  ddzu, dzu, nr_1d, pt_1d, q_1d, qr_1d
+           ONLY:  ddzu, dzu, prr
 
        USE cloud_parameters,                                                   &
-           ONLY:  a_term, b_term, c_term, dpirho_l, eps_sb, hyrho,             &
-                  limiter_sedimentation, l_d_cp, prr, pt_d_t
+           ONLY:  hyrho, l_d_cp, pt_d_t
 
        USE control_parameters,                                                 &
-           ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
-                  intermediate_timestep_count
+           ONLY:  call_microphysics_at_all_substeps, intermediate_timestep_count
 
        USE indices,                                                            &
@@ -2050,6 +2136,9 @@
     SUBROUTINE calc_precipitation_amount_ij( i, j )
 
+       USE arrays_3d,                                                          &
+           ONLY:  precipitation_amount, prr
+
        USE cloud_parameters,                                                   &
-           ONLY:  hyrho, precipitation_amount, prr
+           ONLY:  hyrho
 
        USE control_parameters,                                                 &
@@ -2089,7 +2178,4 @@
 !------------------------------------------------------------------------------!
     FUNCTION gamm( xx ) 
-       
-       USE cloud_parameters,                                                   &
-           ONLY:  cof, stp
 
        USE kinds
@@ -2106,8 +2192,17 @@
        REAL(wp)     ::  y_gamm       !<
 
-       x_gamm = xx 
-       y_gamm = x_gamm 
+
+       REAL(wp), PARAMETER  ::  stp = 2.5066282746310005_wp               !<
+       REAL(wp), PARAMETER  ::  cof(6) = (/ 76.18009172947146_wp,      &
+                                           -86.50532032941677_wp,      &
+                                            24.01409824083091_wp,      &
+                                            -1.231739572450155_wp,     &
+                                             0.1208650973866179E-2_wp, &
+                                            -0.5395239384953E-5_wp /)     !<
+
+       x_gamm = xx
+       y_gamm = x_gamm
        tmp = x_gamm + 5.5_wp
-       tmp = ( x_gamm + 0.5_wp ) * LOG( tmp ) - tmp 
+       tmp = ( x_gamm + 0.5_wp ) * LOG( tmp ) - tmp
        ser = 1.000000000190015_wp
 
Index: palm/trunk/SOURCE/mod_particle_attributes.f90
===================================================================
--- palm/trunk/SOURCE/mod_particle_attributes.f90	(revision 1846)
+++ palm/trunk/SOURCE/mod_particle_attributes.f90	(revision 1849)
@@ -19,5 +19,6 @@
 ! Current revisions:
 ! ------------------
-!
+! bfactor, mass_of_solute, molecular_weight_of_solute, molecular_weight_of_water,
+! vanthoff added from modules
 !
 ! Former revisions:
@@ -115,4 +116,11 @@
     REAL(wp), DIMENSION(:), ALLOCATABLE     ::  log_z_z0
 
+!
+!-- Lagrangian cloud model constants
+    REAL(wp) ::  mass_of_solute = 1.0E-17_wp                !< soluted NaCl (kg)
+    REAL(wp) ::  molecular_weight_of_solute = 0.05844_wp    !< mol. m. NaCl (kg mol-1)
+    REAL(wp) ::  molecular_weight_of_water = 0.01801528_wp  !< mol. m. H2O (kg mol-1)
+    REAL(wp) ::  vanthoff = 2.0_wp                          !< van't Hoff factor for NaCl
+
     TYPE particle_type
         SEQUENCE
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 1846)
+++ palm/trunk/SOURCE/modules.f90	(revision 1849)
@@ -19,6 +19,9 @@
 ! Current revisions:
 ! ------------------
-! 
-! 
+! bfactor, mass_of_solute, molecular_weight_of_solute, molecular_weight_of_water,
+! vanthoff moved to mod_particle_attributes.
+! dt_micro and several cloud_parameters moved to microphysics_mod.
+! 1d-microphysics profiles moved to microphysics_mod.
+!
 ! Former revisions:
 ! -----------------
@@ -394,8 +397,7 @@
           c_u_m, c_u_m_l, c_v_m, c_v_m_l, c_w_m, c_w_m_l, ddzu, ddzu_pres,     &
           dd2zu, dzu, ddzw, dzw, hyp, inflow_damping_factor, l_grid,           &
-          nc_1d, nr_1d, ptdf_x, ptdf_y, p_surf, pt_surf, pt_1d, pt_init,       &
-          qsws_surf, q_1d, q_init, q_surf, qc_1d, qr_1d, rdf, rdf_sc,          & 
-          ref_state, sa_init, shf_surf, timenudge, time_surf, time_vert,       &
-          tmp_tnudge, ug, u_init, u_nzb_p1_for_vfc, vg, v_init,                &
+          ptdf_x, ptdf_y, p_surf, pt_surf, pt_init, qsws_surf, q_init, q_surf, &
+          rdf, rdf_sc, ref_state, sa_init, shf_surf, timenudge, time_surf,     &
+          time_vert, tmp_tnudge, ug, u_init, u_nzb_p1_for_vfc, vg, v_init,     &
           v_nzb_p1_for_vfc, w_subs, zu, zw
 
@@ -407,5 +409,5 @@
           mean_inflow_profiles, nrs, nrsws, nrswst,                            &
           ol,                                                                  & !< Obukhov length
-          ptnudge, pt_slope_ref,                                               &
+          precipitation_amount, precipitation_rate, ptnudge, pt_slope_ref,     &
           qnudge, qs, qsws, qswst, qswst_remote, qrs, qrsws, qrswst,           &
           saswsb, saswst, shf, tnudge, td_lsa_lpt, td_lsa_q, td_sub_lpt,       &
@@ -421,5 +423,5 @@
           diss_l_v, diss_l_w, flux_l_e, flux_l_nr, flux_l_pt, flux_l_q,        &
           flux_l_qr, flux_l_sa, flux_l_u, flux_l_v, flux_l_w, kh, km,          &
-          l_wall, p_loc, tend, tric,                                           &
+          l_wall, prr, p_loc, tend, tric,                                      &
           u_m_l, u_m_n, u_m_r, u_m_s, v_m_l, v_m_n, v_m_r, v_m_s, w_m_l,       &
           w_m_n, w_m_r, w_m_s
@@ -490,79 +492,13 @@
     USE kinds
 
-    LOGICAL ::  cloud_water_sedimentation = .FALSE., & !< cloud water sedimentation in bulk cloud physics
-                limiter_sedimentation = .TRUE.,      & !< sedimentation limiter in bulk cloud physics
-                collision_turbulence = .FALSE.,      & !< turbulence effects in bulk cloud physics
-                ventilation_effect = .TRUE.            !< ventilation effect in bulk cloud physics
-                
-
-    REAL(wp) ::  a_1 = 8.69E-4_wp,     & !< coef. in turb. parametrization (cm-2 s3)
-                 a_2 = -7.38E-5_wp,    & !< coef. in turb. parametrization (cm-2 s3)
-                 a_3 = -1.40E-2_wp,    & !< coef. in turb. parametrization
-                 a_term = 9.65_wp,     & !< coef. for terminal velocity (m s-1)
-                 a_vent = 0.78_wp,     & !< coef. for ventilation effect
-                 b_1 = 11.45E-6_wp,    & !< coef. in turb. parametrization (m)
-                 b_2 = 9.68E-6_wp,     & !< coef. in turb. parametrization (m)
-                 b_3 = 0.62_wp,        & !< coef. in turb. parametrization
-                 b_term = 9.8_wp,      & !< coef. for terminal velocity (m s-1)
-                 b_vent = 0.308_wp,    & !< coef. for ventilation effect
-                 beta_cc = 3.09E-4_wp, & !< coef. in turb. parametrization (cm-2 s3)
-                 bfactor,              & !< solution effect on diffusional growth
-                 c_1 = 4.82E-6_wp,     & !< coef. in turb. parametrization (m)
-                 c_2 = 4.8E-6_wp,      & !< coef. in turb. parametrization (m)
-                 c_3 = 0.76_wp,        & !< coef. in turb. parametrization
-                 c_const = 0.93_wp,    & !< const. in Taylor-microscale Reynolds number
-                 c_evap = 0.7_wp,      & !< constant in evaporation
-                 c_sedimentation = 2.0_wp, & !< Courant number of sedimentation process
-                 c_term = 600.0_wp,    & !< coef. for terminal velocity (m-1)
-                 cof(6) = (/ 76.18009172947146_wp,      & !< coefficients in the 
-                             -86.50532032941677_wp,     & !< numerical
-                             24.01409824083091_wp,      & !< calculation of the
-                             -1.231739572450155_wp,     & !< gamma function
-                             0.1208650973866179E-2_wp,  &
-                             -0.5395239384953E-5_wp /), &
-                cp = 1005.0_wp,       & !< heat capacity of dry air (J kg-1 K-1) 
-                diff_coeff_l = 0.23E-4_wp, & !< diffusivity of water vapor (m2 s-1)
-                effective_coll_efficiency, & !< effective collision efficiency
-                eps_ros = 1.0E-4_wp,  & !< accuracy of Rosenbrock method
-                eps_sb = 1.0E-20_wp,  & !< threshold in two-moments scheme
-                k_cc = 9.44E09_wp,    & !< const. cloud-cloud kernel (m3 kg-2 s-1) 
-                k_cr0 = 4.33_wp,      & !< const. cloud-rain kernel (m3 kg-1 s-1) 
-                k_rr = 7.12_wp,       & !< const. rain-rain kernel (m3 kg-1 s-1) 
-                k_br = 1000._wp,      & !< const. in breakup parametrization (m-1)
-                k_st = 1.2E8_wp,      & !< const. in drizzle parametrization (m-1 s-1)
-                kappa_rr = 60.7_wp,   & !< const. in collision kernel (kg-1/3)
-                kin_vis_air = 1.4086E-5_wp, & !< kin. viscosity of air (m2 s-1)
+    REAL(wp) :: cp = 1005.0_wp,       & !< heat capacity of dry air (J kg-1 K-1)
                 l_v = 2.5E+06_wp,     & !< latent heat of vaporization (J kg-1)
                 l_d_cp, l_d_r, l_d_rv, & !< l_v / cp, l_v / r_d, l_v / r_v
-                mass_of_solute = 1.0E-17_wp, & !< soluted NaCl (kg)
-                molecular_weight_of_solute = 0.05844_wp, & !< mol. m. NaCl (kg mol-1)
-                molecular_weight_of_water = 0.01801528_wp, & !< mol. m. H2O (kg mol-1)
-                nc_const = 70.0E6_wp, & !< cloud droplet concentration
-                prec_time_const = 0.001_wp, & !< coef. in Kessler scheme
-                pirho_l, dpirho_l, & !< pi * rho_l / 6.0; 6.0 / ( pi * rho_l )
                 rho_l = 1.0E3_wp,     & !< density of water (kg m-3)
-                ql_crit = 0.0005_wp,  & !< coef. in Kessler scheme
                 r_d = 287.0_wp,       & !< sp. gas const. dry air (J kg-1 K-1)
-                r_v = 461.51_wp,      & !< sp. gas const. water vapor (J kg-1 K-1)
-                schmidt = 0.71_wp,    & !< Schmidt number
-                schmidt_p_1d3,        & !< schmidt**( 1.0 / 3.0 )
-                sed_qc_const,         & !< const. for sedimentation of cloud water
-                sigma_gc = 1.3_wp,    & !< log-normal geometric standard deviation
-                stp = 2.5066282746310005_wp, & !< parameter in gamma function
-                thermal_conductivity_l = 2.43E-2_wp, & !< therm. cond. air (J m-1 s-1 K-1)
-                vanthoff = 2.0_wp,    & !< van't Hoff factor for NaCl
-                x0 = 2.6E-10_wp,      & !< separating drop mass (kg)
-                xrmin = 2.6E-10_wp,   & !< minimum rain drop size (kg)
-                xrmax = 5.0E-6_wp,    & !< maximum rain drop site (kg)
-                dt_precipitation = 100.0_wp, & !< timestep precipitation (s)
-                w_precipitation = 9.65_wp      !< maximum terminal velocity (m s-1)
+                r_v = 461.51_wp         !< sp. gas const. water vapor (J kg-1 K-1)
+
 
     REAL(wp), DIMENSION(:), ALLOCATABLE     ::  hyrho, pt_d_t, t_d_pt  
-
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  precipitation_amount, &
-                                                precipitation_rate
-!
-!-- 3D array of precipitation rate
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  prr
 
     SAVE
@@ -807,5 +743,5 @@
                  dt_do2d_xy = 9999999.9_wp, dt_do2d_xz = 9999999.9_wp, &
                  dt_do2d_yz = 9999999.9_wp, dt_do3d = 9999999.9_wp, dt_dvrp = 9999999.9_wp, &
-                 dt_max = 20.0_wp, dt_micro = -1.0_wp, &
+                 dt_max = 20.0_wp, &
                  dt_restart = 9999999.9_wp, &
                  dt_run_control = 60.0_wp, dt_3d = -1.0_wp, dz = -1.0_wp, &
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 1846)
+++ palm/trunk/SOURCE/parin.f90	(revision 1849)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Adapted for modularization of microphysics
 ! 
 ! Former revisions:
@@ -205,29 +205,29 @@
     USE plant_canopy_model_mod,                                                &
          ONLY: pcm_parin  
- 
-    USE cloud_parameters,                                                      &
+
+    USE control_parameters
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log_barrierwait
+
+    USE dvrp_variables,                                                        &
+        ONLY:  local_dvrserver_running
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nx, ny, nz
+
+    USE kinds
+
+    USE land_surface_model_mod,                                                &
+        ONLY: lsm_parin
+
+    USE microphysics_mod,                                                      &
         ONLY:  c_sedimentation, cloud_water_sedimentation,                     &
                collision_turbulence, limiter_sedimentation, nc_const,          &
                ventilation_effect
 
-    USE control_parameters
-
-    USE cpulog,                                                                &
-        ONLY:  cpu_log_barrierwait
-
-    USE dvrp_variables,                                                        &
-        ONLY:  local_dvrserver_running
-
-    USE grid_variables,                                                        &
-        ONLY:  dx, dy
-
-    USE indices,                                                               &
-        ONLY:  nx, ny, nz
-
-    USE kinds
-
-    USE land_surface_model_mod,                                                &
-        ONLY: lsm_parin
-    
     USE model_1d,                                                              &
         ONLY:  damp_level_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
Index: palm/trunk/SOURCE/radiation_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/radiation_model_mod.f90	(revision 1846)
+++ palm/trunk/SOURCE/radiation_model_mod.f90	(revision 1849)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Adapted for modularization of microphysics
 ! 
 ! Former revisions:
@@ -98,5 +98,5 @@
 
     USE cloud_parameters,                                                      &
-        ONLY:  cp, l_d_cp, nc_const, rho_l, sigma_gc  
+        ONLY:  cp, l_d_cp, rho_l
 
     USE constants,                                                             &
@@ -112,4 +112,7 @@
 
     USE kinds
+
+    USE microphysics_mod,                                                      &
+        ONLY:  nc_const, sigma_gc
 
 #if defined ( __netcdf )
Index: palm/trunk/SOURCE/read_3d_binary.f90
===================================================================
--- palm/trunk/SOURCE/read_3d_binary.f90	(revision 1846)
+++ palm/trunk/SOURCE/read_3d_binary.f90	(revision 1849)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! prr, precipitation_amount moved to arrays_3d
 ! 
 ! Former revisions:
@@ -102,5 +102,6 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, qr,    &
+        ONLY:  e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst,        &
+               prr, precipitation_amount, qr,                                  &
                qrs, qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst,        &
                rif_wall, shf, ts, tswst, u, u_m_l, u_m_n, u_m_r, u_m_s, us,    &
@@ -109,7 +110,4 @@
 
     USE averaging
-
-    USE cloud_parameters,                                                      &
-        ONLY:  prr, precipitation_amount
 
     USE control_parameters,                                                    &
Index: palm/trunk/SOURCE/read_var_list.f90
===================================================================
--- palm/trunk/SOURCE/read_var_list.f90	(revision 1846)
+++ palm/trunk/SOURCE/read_var_list.f90	(revision 1849)
@@ -19,6 +19,6 @@
 ! Current revisions:
 ! ------------------
-! 
-! 
+! Adapted for modularization of microphysics
+!
 ! Former revisions:
 ! -----------------
@@ -171,16 +171,16 @@
                q_init, ref_state, sa_init, u_init, ug, v_init, vg
 
-    USE cloud_parameters,                                                      &
+    USE control_parameters
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nz, nx, nx_on_file, ny, ny_on_file
+
+    USE microphysics_mod,                                                      &
         ONLY:  c_sedimentation, collision_turbulence,                          &
                cloud_water_sedimentation, limiter_sedimentation,               &
                nc_const, ventilation_effect
-
-    USE control_parameters
-
-    USE grid_variables,                                                        &
-        ONLY:  dx, dy
-
-    USE indices,                                                               &
-        ONLY:  nz, nx, nx_on_file, ny, ny_on_file
 
     USE model_1d,                                                              &
Index: palm/trunk/SOURCE/sum_up_3d_data.f90
===================================================================
--- palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 1846)
+++ palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 1849)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! precipitation_rate moved to arrays_3d
 ! 
 ! Former revisions:
@@ -94,6 +94,6 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  dzw, e, nr, ol, p, pt, q, qc, ql, ql_c, ql_v, qr, qsws, rho, sa,&
-               shf, ts, u, us, v, vpt, w, z0, z0h, z0q
+        ONLY:  dzw, e, nr, ol, p, pt, precipitation_rate, q, qc, ql, ql_c,     &
+               ql_v, qr, qsws, rho, sa, shf, ts, u, us, v, vpt, w, z0, z0h, z0q
 
     USE averaging,                                                             &
@@ -105,5 +105,5 @@
 
     USE cloud_parameters,                                                      &
-        ONLY:  l_d_cp, precipitation_rate, pt_d_t 
+        ONLY:  l_d_cp, pt_d_t
 
     USE control_parameters,                                                    &
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 1846)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 1849)
@@ -19,6 +19,6 @@
 ! Current revisions:
 ! ------------------
-! 
-! 
+! Adapted for modularization of microphysics
+!
 ! Former revisions:
 ! -----------------
@@ -243,7 +243,4 @@
                ws_scheme_sca
 
-    USE cloud_parameters,                                                      &
-        ONLY: collision_turbulence
-
     USE cpulog,                                                                &
         ONLY:  cpu_log, log_point, log_point_s
@@ -264,4 +261,7 @@
     USE ls_forcing_mod,                                                        &
         ONLY:  ls_forcing_surf, ls_forcing_vert
+
+    USE microphysics_mod,                                                      &
+        ONLY: collision_turbulence
 
     USE nudge_mod,                                                             &
Index: palm/trunk/SOURCE/timestep.f90
===================================================================
--- palm/trunk/SOURCE/timestep.f90	(revision 1846)
+++ palm/trunk/SOURCE/timestep.f90	(revision 1849)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! Adapted for modularization of microphysics
 ! 
 ! Former revisions:
@@ -89,7 +89,4 @@
         ONLY:  dzu, dzw, kh, km, u, v, w
 
-    USE cloud_parameters,                                                      &
-        ONLY:  dt_precipitation
-
     USE control_parameters,                                                    &
         ONLY:  cfl_factor, coupling_mode, dt_3d, dt_fixed, dt_max,             &
@@ -110,4 +107,7 @@
 
     USE kinds
+
+    USE microphysics_mod,                                                      &
+        ONLY:  dt_precipitation
 
     USE pegrid
Index: palm/trunk/SOURCE/write_3d_binary.f90
===================================================================
--- palm/trunk/SOURCE/write_3d_binary.f90	(revision 1846)
+++ palm/trunk/SOURCE/write_3d_binary.f90	(revision 1849)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! prr, precipitation_amount moved to arrays_3d
 ! 
 ! Former revisions:
@@ -95,5 +95,6 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, qr,    &
+        ONLY:  e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst,        &
+               prr, precipitation_amount, qr,                                  &
                qrs, qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst,        &
                rif_wall, shf, ts, tswst, u, u_m_l, u_m_n, u_m_r, u_m_s, us,    &
@@ -102,8 +103,5 @@
         
     USE averaging
-        
-    USE cloud_parameters,                                                      &
-        ONLY:  prr, precipitation_amount
-        
+
     USE control_parameters,                                                    &
         ONLY:  iran, humidity, passive_scalar, cloud_physics, cloud_droplets,  &
Index: palm/trunk/SOURCE/write_var_list.f90
===================================================================
--- palm/trunk/SOURCE/write_var_list.f90	(revision 1846)
+++ palm/trunk/SOURCE/write_var_list.f90	(revision 1849)
@@ -19,6 +19,6 @@
 ! Current revisions:
 ! -----------------
-! 
-! 
+! Adapted for modularization of microphysics
+!
 ! Former revisions:
 ! -----------------
@@ -149,10 +149,5 @@
         ONLY:  inflow_damping_factor, mean_inflow_profiles, pt_init,           &
                q_init, ref_state, sa_init, u_init, ug, v_init, vg
-    
-    USE cloud_parameters,                                                      &
-        ONLY:  c_sedimentation, cloud_water_sedimentation,                     &
-               collision_turbulence, limiter_sedimentation, nc_const,          &
-               ventilation_effect
-    
+
     USE control_parameters
     
@@ -162,5 +157,10 @@
     USE indices,                                                               &
         ONLY:  nz, nx, ny
-    
+
+    USE microphysics_mod,                                                      &
+        ONLY:  c_sedimentation, cloud_water_sedimentation,                     &
+               collision_turbulence, limiter_sedimentation, nc_const,          &
+               ventilation_effect
+
     USE model_1d,                                                              &
         ONLY:  damp_level_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
