Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 3248)
+++ palm/trunk/SOURCE/parin.f90	(revision 3274)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3248 2018-09-14 09:42:06Z sward
 ! Minor formating changes
 ! 
@@ -420,10 +423,13 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  pt_init, q_init, ref_state, s_init, sa_init,                    &     
+        ONLY:  pt_init, q_init, ref_state, s_init, sa_init,                    &
                ug, u_init, v_init, vg
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bcm_parin
 
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_parin
-        
+
     USE chem_modules
 
@@ -455,10 +461,4 @@
     USE land_surface_model_mod,                                                &
         ONLY: lsm_parin
-
-    USE microphysics_mod,                                                      &
-        ONLY:  c_sedimentation, cloud_water_sedimentation,                     &
-               collision_turbulence, curvature_solution_effects_bulk,          &
-               dry_aerosol_radius, limiter_sedimentation, na_init, nc_const,   &
-               sigma_bulk, ventilation_effect
 
     USE model_1d_mod,                                                          &
@@ -525,5 +525,5 @@
     INTEGER(iwp) ::  ioerr          !< error flag for open/read/write
 
-    NAMELIST /inipar/  aerosol_bulk, alpha_surface, approximation, bc_e_b,     &
+    NAMELIST /inipar/  alpha_surface, approximation, bc_e_b,     &
                        bc_lr, bc_ns, bc_p_b, bc_p_t, bc_pt_b, bc_pt_t, bc_q_b, &
              bc_q_t,bc_s_b, bc_s_t, bc_sa_t, bc_uv_b, bc_uv_t,                 &
@@ -531,19 +531,18 @@
              building_length_y, building_wall_left, building_wall_south,       &
              calc_soil_moisture_during_spinup,                                 &
-             call_psolver_at_all_substeps, call_microphysics_at_all_substeps,  &
+             call_psolver_at_all_substeps,  &
              canyon_height,                                                    &
              canyon_width_x, canyon_width_y, canyon_wall_left,                 &
-             canyon_wall_south, c_sedimentation, cfl_factor, cloud_droplets,   &
-             cloud_physics, cloud_scheme, cloud_top_radiation,                 &
-             cloud_water_sedimentation,                                        &
-             collective_wait, collision_turbulence, complex_terrain,           &
+             canyon_wall_south, cfl_factor, cloud_droplets,   &
+             cloud_top_radiation,                 &
+             collective_wait, complex_terrain,           &
              conserve_volume_flow,                                             &
              conserve_volume_flow_mode, constant_flux_layer,                   &
-             coupling_start_time, curvature_solution_effects_bulk,             &
+             coupling_start_time,             &
              cycle_mg, damp_level_1d,                                          &
              data_output_during_spinup,                                        &
              day_of_year_init,                                                 &
              dissipation_1d,                                                   &
-             dp_external, dp_level_b, dp_smooth, dpdxy, dry_aerosol_radius,    &
+             dp_external, dp_level_b, dp_smooth, dpdxy,    &
              dt, dt_pr_1d, dt_run_control_1d, dt_spinup, dx, dy, dz, dz_max,   &
              dz_stretch_factor, dz_stretch_level, dz_stretch_level_start,      &
@@ -555,12 +554,12 @@
              initializing_actions, km_constant,                                &
              large_scale_forcing, large_scale_subsidence, latitude,            &
-             limiter_sedimentation, longitude,                                 &
+             longitude,                                 &
              loop_optimization, lsf_exception, masking_method, mg_cycles,      &
              mg_switch_to_pe0_level, mixing_length_1d, momentum_advec,         &
-             most_method, na_init, nc_const, nesting_offline,                  &
+             most_method, nesting_offline,                  &
              netcdf_precision, neutral, ngsrb,                                 &
              nsor, nsor_ini, nudging, nx, ny, nz, ocean, omega, omega_sor,     &
              outflow_source_plane, passive_scalar,                             &
-             prandtl_number, precipitation, psolver, pt_damping_factor,        &
+             prandtl_number, psolver, pt_damping_factor,        &
              pt_damping_width, pt_reference, pt_surface,                       &
              pt_surface_initial_change, pt_vertical_gradient,                  &
@@ -574,5 +573,5 @@
              roughness_length, sa_surface,                                     &
              sa_vertical_gradient, sa_vertical_gradient_level, scalar_advec,   &
-             scalar_rayleigh_damping, sigma_bulk,                              &
+             scalar_rayleigh_damping,                              &
              spinup_time, spinup_pt_amplitude, spinup_pt_mean,                 &
              statistic_regions, subs_vertical_gradient,                        &
@@ -592,10 +591,10 @@
              use_top_fluxes, use_ug_for_galilei_tr, use_upstream_for_tke,      &
              uv_heights, u_bulk, u_profile, vg_surface, vg_vertical_gradient,  &
-             vg_vertical_gradient_level, v_bulk, v_profile, ventilation_effect,&
+             vg_vertical_gradient_level, v_bulk, v_profile,&
              wall_adjustment, wall_heatflux, wall_humidityflux,                &
              wall_salinityflux, wall_scalarflux, y_shift, zeta_max, zeta_min,  &
              z0h_factor
 
-    NAMELIST /initialization_parameters/  aerosol_bulk, alpha_surface,         &
+    NAMELIST /initialization_parameters/  alpha_surface,         &
              approximation, bc_e_b,                                            &
              bc_lr, bc_ns, bc_p_b, bc_p_t, bc_pt_b, bc_pt_t, bc_q_b,           &
@@ -604,19 +603,18 @@
              building_length_y, building_wall_left, building_wall_south,       &
              calc_soil_moisture_during_spinup,                                 &
-             call_psolver_at_all_substeps, call_microphysics_at_all_substeps,  &
+             call_psolver_at_all_substeps,  &
              canyon_height,                                                    &
              canyon_width_x, canyon_width_y, canyon_wall_left,                 &
-             canyon_wall_south, c_sedimentation, cfl_factor, cloud_droplets,   &
-             cloud_physics, cloud_scheme, cloud_top_radiation,                 &
-             cloud_water_sedimentation,                                        &
-             collective_wait, collision_turbulence, complex_terrain,           &
+             canyon_wall_south, cfl_factor, cloud_droplets,   &
+             cloud_top_radiation,                 &
+             collective_wait, complex_terrain,           &
              conserve_volume_flow,                                             &
              conserve_volume_flow_mode, constant_flux_layer,                   &
-             coupling_start_time, curvature_solution_effects_bulk,             &
+             coupling_start_time,             &
              cycle_mg, damp_level_1d,                                          &
              data_output_during_spinup,                                        &
              day_of_year_init,                                                 &
              dissipation_1d,                                                   &
-             dp_external, dp_level_b, dp_smooth, dpdxy, dry_aerosol_radius,    &
+             dp_external, dp_level_b, dp_smooth, dpdxy,    &
              dt, dt_pr_1d, dt_run_control_1d, dt_spinup, dx, dy, dz, dz_max,   &
              dz_stretch_factor, dz_stretch_level, dz_stretch_level_start,      &
@@ -628,12 +626,12 @@
              initializing_actions, km_constant,                                &
              large_scale_forcing, large_scale_subsidence, latitude,            &
-             limiter_sedimentation, longitude,                                 &
+             longitude,                                 &
              loop_optimization, lsf_exception, masking_method, mg_cycles,      &
              mg_switch_to_pe0_level, mixing_length_1d, momentum_advec,         &
-             most_method, na_init, nc_const, nesting_offline,                  &
+             most_method, nesting_offline,                  &
              netcdf_precision, neutral, ngsrb,                                 &
              nsor, nsor_ini, nudging, nx, ny, nz, ocean, omega, omega_sor,     &
              outflow_source_plane, passive_scalar,                             &
-             prandtl_number, precipitation, psolver, pt_damping_factor,        &
+             prandtl_number, psolver, pt_damping_factor,        &
              pt_damping_width, pt_reference, pt_surface,                       &
              pt_surface_initial_change, pt_vertical_gradient,                  &
@@ -647,5 +645,5 @@
              roughness_length, sa_surface,                                     &
              sa_vertical_gradient, sa_vertical_gradient_level, scalar_advec,   &
-             scalar_rayleigh_damping, sigma_bulk,                              &
+             scalar_rayleigh_damping,                              &
              spinup_time, spinup_pt_amplitude, spinup_pt_mean,                 &
              statistic_regions, subs_vertical_gradient,                        &
@@ -665,5 +663,5 @@
              use_free_convection_scaling,                                      &
              uv_heights, u_bulk, u_profile, vg_surface, vg_vertical_gradient,  &
-             vg_vertical_gradient_level, v_bulk, v_profile, ventilation_effect,&
+             vg_vertical_gradient_level, v_bulk, v_profile,&
              wall_adjustment, wall_heatflux, wall_humidityflux,                &
              wall_salinityflux, wall_scalarflux, y_shift, zeta_max, zeta_min,  &
@@ -684,5 +682,5 @@
              mask_y_loop, mask_z_loop, netcdf_data_format, netcdf_deflate,     &
              normalizing_region, npex, npey, nz_do3d,                          &
-             precipitation_amount_interval, profile_columns, profile_rows,     &
+             profile_columns, profile_rows,     &
              restart_time, section_xy, section_xz, section_yz,                 &
              skip_time_data_output, skip_time_data_output_av, skip_time_dopr,  &
@@ -705,5 +703,5 @@
              mask_y_loop, mask_z_loop, netcdf_data_format, netcdf_deflate,     &
              normalizing_region, npex, npey, nz_do3d,                          &
-             precipitation_amount_interval, profile_columns, profile_rows,     &
+             profile_columns, profile_rows,     &
              restart_time, section_xy, section_xz, section_yz,                 &
              skip_time_data_output, skip_time_data_output_av, skip_time_dopr,  &
@@ -864,4 +862,8 @@
 
 !
+!--       Check if gust module is used and read &gust_par if required
+          CALL bcm_parin
+
+!
 !--       Check if urban surface model is used and read &urban_surface_par if required
           CALL usm_parin
