Index: palm/trunk/SOURCE/bulk_cloud_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/bulk_cloud_model_mod.f90	(revision 3620)
+++ palm/trunk/SOURCE/bulk_cloud_model_mod.f90	(revision 3622)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Important bugfix in case of restart runs.
+! 
+! 3507 2018-11-08 14:28:46Z schwenkel
 ! Minor bugfixes for bcm cache version and initializing prr
 ! 
@@ -209,5 +212,5 @@
                intermediate_timestep_count_max, large_scale_forcing,           &
                lsf_surf, pt_surface, rho_surface, surface_pressure,            &
-               time_do2d_xy, message_string
+               time_do2d_xy, message_string, initializing_actions
 
     USE cpulog,                                                                &
@@ -927,59 +930,46 @@
 
        IF ( bulk_cloud_model )  THEN
-
-!           dots_label(dots_num+1) = 'some_var'
-!           dots_unit(dots_num+1)  = 'm/s'
-!
-!           dots_num_palm = dots_num
-!           dots_num = dots_num + 1
-! !
-! !--       Stuff for the module
-!
-!           abs_velocity   = 0.0_wp
-
-!
-!--       Initialize the remaining quantities
-          IF ( microphysics_morrison )  THEN
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   qc(:,j,i) = 0.0_wp
-                   nc(:,j,i) = 0.0_wp
+          IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+!
+!--          Initialize the remaining quantities
+             IF ( microphysics_morrison )  THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      qc(:,j,i) = 0.0_wp
+                      nc(:,j,i) = 0.0_wp
+                   ENDDO
                 ENDDO
-             ENDDO
-          ENDIF
-
-          IF ( microphysics_seifert )  THEN
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   qr(:,j,i) = 0.0_wp
-                   nr(:,j,i) = 0.0_wp
+             ENDIF
+
+             IF ( microphysics_seifert )  THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      qr(:,j,i) = 0.0_wp
+                      nr(:,j,i) = 0.0_wp
+                   ENDDO
                 ENDDO
-             ENDDO
-          ENDIF
-
-!
-!--       Liquid water content and precipitation amount
-!--       are zero at beginning of the simulation
-          ql = 0.0_wp
-! TODO ???
-          qc = 0.0_wp
-          precipitation_amount = 0.0_wp
-          prr = 0.0_wp
-
-!
-!--       Initialize old and new time levels.
-          IF ( microphysics_morrison )  THEN
-             tqc_m = 0.0_wp
-             tnc_m = 0.0_wp
-             qc_p  = qc
-             nc_p  = nc
-          ENDIF
-          IF ( microphysics_seifert )  THEN
-             tqr_m = 0.0_wp
-             tnr_m = 0.0_wp
-             qr_p  = qr
-             nr_p  = nr
-          ENDIF
-
+             ENDIF
+!
+!--          Liquid water content and precipitation amount
+!--          are zero at beginning of the simulation
+             ql = 0.0_wp
+             qc = 0.0_wp
+             precipitation_amount = 0.0_wp
+             prr = 0.0_wp
+!
+!--          Initialize old and new time levels.
+             IF ( microphysics_morrison )  THEN
+                tqc_m = 0.0_wp
+                tnc_m = 0.0_wp
+                qc_p  = qc
+                nc_p  = nc
+             ENDIF
+             IF ( microphysics_seifert )  THEN
+                tqr_m = 0.0_wp
+                tnr_m = 0.0_wp
+                qr_p  = qr
+                nr_p  = nr
+             ENDIF
+          ENDIF ! Only if not read_restart_data
 !
 !--       constant for the sedimentation of cloud water (2-moment cloud physics)
@@ -1729,4 +1719,20 @@
              READ ( 13 )  ventilation_effect
 
+          CASE ( 'na_init' )
+             READ ( 13 )  na_init
+
+          CASE ( 'dry_aerosol_radius' )
+             READ ( 13 )  dry_aerosol_radius
+
+          CASE ( 'sigma_bulk' )
+             READ ( 13 )  sigma_bulk
+
+          CASE ( 'aerosol_bulk' )
+             READ ( 13 )  aerosol_bulk
+
+          CASE ( 'curvature_solution_effects_bulk' )
+             READ ( 13 )  curvature_solution_effects_bulk
+
+
 !          CASE ( 'global_paramter' )
 !             READ ( 13 )  global_parameter
@@ -1926,4 +1932,20 @@
        CALL wrd_write_string( 'ventilation_effect' )
        WRITE ( 14 )  ventilation_effect
+
+       CALL wrd_write_string( 'na_init' )
+       WRITE ( 14 )  na_init
+
+       CALL wrd_write_string( 'dry_aerosol_radius' )
+       WRITE ( 14 )  dry_aerosol_radius
+
+       CALL wrd_write_string( 'sigma_bulk' )
+       WRITE ( 14 )  sigma_bulk
+
+       CALL wrd_write_string( 'aerosol_bulk' )
+       WRITE ( 14 )  aerosol_bulk
+
+       CALL wrd_write_string( 'curvature_solution_effects_bulk' )
+       WRITE ( 14 )  curvature_solution_effects_bulk
+
 
 ! needs preceeding allocation if array
