Index: palm/trunk/SOURCE/CURRENT_MODIFICATIONS
===================================================================
--- palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 214)
+++ palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 215)
@@ -21,9 +21,16 @@
 User interface has been split into single files.
 
+Precompilation mechanism (mbuild) completely revised: the source tarfile remains in
+the source directory. One depository per block (given in the config-file) is
+created. Always all files from the source directory are copied to the respective
+depository. No additional file checks are done any more (version 2.1). The
+depository name used contains the conditions given by mrun-option "-K".
+(mbuild, mrun)
+
 Output messages (including required stop of execution) can now be handled with
 the new subroutine handle_palm_message. All output messages will be replaced
 by this routine step by step within the next revisions.
 
-Makefile, check_parameters, local_stop, modules
+Makefile, mbuild, mrun, check_parameters, local_stop, modules
 
 New: handle_palm_message, user_3d_data_averaging user_actions user_advec_particles user_check_data_output user_check_data_output_pr user_data_output_2d user_data_output_3d user_data_output_dvrp user_define_netcdf_grid user_dvrp_coltab user_header user_init user_init_3d_model user_init_grid user_init_particles user_init_plant_canopy user_last_actions user_module user_parin user_particle_attributes user_read_restart_data user_spectra user_statistics
@@ -47,3 +54,7 @@
 Bugfix in calculating k index in case of oceans runs. (sort_particles)
 
-advec_particles, combine_plot_fields, header, production_e
+Bugfix: zero output of particle concentration and radius unless particles
+have been started (data_output_2d)
+
+
+advec_particles, combine_plot_fields, data_output_2d, header, production_e
Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 214)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 215)
@@ -938,7 +938,6 @@
 !-- Ocean version must use flux boundary conditions at the top
     IF ( ocean .AND. .NOT. use_top_fluxes )  THEN
-       IF ( myid == 0 )  PRINT*, '+++ check_parameters: use_top_fluxes ',&
-                                    'must be .TRUE. in ocean version'
-       CALL local_stop
+       message_string = 'use_top_fluxes must be .TRUE. in ocean version'
+       CALL handle_palm_message( 'check_parameters', 'PA0042', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -947,7 +946,8 @@
     IF ( alpha_surface /= 0.0 )  THEN
        IF ( ABS( alpha_surface ) > 90.0 )  THEN
-          IF ( myid == 0 )  PRINT*, '+++ check_parameters: ABS( alpha_surface',&
-                                    '=', alpha_surface, ' ) must be < 90.0'
-          CALL local_stop
+          WRITE( message_string, * ) 'ABS( alpha_surface = ', alpha_surface, &
+                                     ' ) must be < 90.0'
+          CALL handle_palm_message( 'check_parameters', 'PA0043', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
        sloping_surface = .TRUE.
@@ -960,6 +960,7 @@
     IF ( dt /= -1.0 )  THEN
        IF ( dt <= 0.0  .AND.  dt /= -1.0 )  THEN
-          IF ( myid == 0 )  PRINT*, '+++ check_parameters:  dt=', dt, ' <= 0.0'
-          CALL local_stop
+          WRITE( message_string, * ) 'dt = ', dt , ' <= 0.0'
+          CALL handle_palm_message( 'check_parameters', 'PA0044', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
        dt_3d = dt
@@ -982,10 +983,8 @@
           ENDIF
        ELSE
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters: cfl_factor=', cfl_factor, &
-                         ' out of range'
-             PRINT*, '+++                   0.0 < cfl_factor <= 1.0 is required'
-          ENDIF
-          CALL local_stop
+          WRITE( message_string, * ) 'cfl_factor = ', cfl_factor, &
+                 ' out of range & 0.0 < cfl_factor <= 1.0 is required'
+          CALL handle_palm_message( 'check_parameters', 'PA0045', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
     ENDIF
@@ -1005,25 +1004,20 @@
        ELSEIF ( use_ug_for_galilei_tr .AND.                &
                 ug_vertical_gradient_level(1) /= 0.0 )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    baroclinicity (ug) not allowed'
-             PRINT*, '    simultaneously with galilei transformation'
-          ENDIF
-          CALL local_stop
+          message_string = 'baroclinicity (ug) not allowed simultaneously' // &
+                           ' with galilei transformation'
+          CALL handle_palm_message( 'check_parameters', 'PA0046', 1, 2, 0, 6, &
+                                    0 )
        ELSEIF ( use_ug_for_galilei_tr .AND.                &
                 vg_vertical_gradient_level(1) /= 0.0 )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    baroclinicity (vg) not allowed'
-             PRINT*, '    simultaneously with galilei transformation'
-          ENDIF
-          CALL local_stop
+          message_string = 'baroclinicity (vg) not allowed simultaneously' // &
+                           ' with galilei transformation'
+          CALL handle_palm_message( 'check_parameters', 'PA0047', 1, 2, 0, 6, &
+                                    0 )
        ELSE
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ WARNING: check_parameters:'
-             PRINT*, '    variable translation speed used for galilei-tran' // &
-                          'sformation, which'
-             PRINT*, '    may cause instabilities in stably stratified regions'
-          ENDIF
+          message_string = 'variable translation speed used for galilei-' // &
+             'transformation, which may cause & instabilities in stably ' // &
+             'stratified regions'
+          CALL handle_palm_message( 'check_parameters', 'PA0048', 0, 1, 0, 6, &
+                                    0 )
        ENDIF
     ENDIF
@@ -1039,17 +1033,13 @@
     IF ( bc_lr /= 'cyclic'  .AND.  bc_lr /= 'dirichlet/radiation'  .AND. &
          bc_lr /= 'radiation/dirichlet' )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    unknown boundary condition: bc_lr = ', bc_lr
-       ENDIF
-       CALL local_stop
+       message_string = 'unknown boundary condition: bc_lr = "' // &
+                        TRIM( bc_lr ) // '"'
+       CALL handle_palm_message( 'check_parameters', 'PA0049', 1, 2, 0, 6, 0 )
     ENDIF
     IF ( bc_ns /= 'cyclic'  .AND.  bc_ns /= 'dirichlet/radiation'  .AND. &
          bc_ns /= 'radiation/dirichlet' )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    unknown boundary condition: bc_ns = ', bc_ns
-       ENDIF
-       CALL local_stop
+       message_string = 'unknown boundary condition: bc_ns = "' // &
+                        TRIM( bc_ns ) // '"'
+       CALL handle_palm_message( 'check_parameters', 'PA0050', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1060,43 +1050,27 @@
     IF ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' )  THEN
        IF ( psolver /= 'multigrid' )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    non-cyclic lateral boundaries do not allow', &
-                          ' psolver = ', psolver 
-          ENDIF
-          CALL local_stop
+          message_string = 'non-cyclic lateral boundaries do not allow ' // &
+                           'psolver = "' // TRIM( psolver ) // '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0051', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
        IF ( momentum_advec /= 'pw-scheme' )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    non-cyclic lateral boundaries do not allow', &
-                          ' momentum_advec = ', momentum_advec 
-          ENDIF
-          CALL local_stop
+          message_string = 'non-cyclic lateral boundaries do not allow ' // &
+                           'momentum_advec = "' // TRIM( momentum_advec ) // '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0052', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
        IF ( scalar_advec /= 'pw-scheme' )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    non-cyclic lateral boundaries do not allow', &
-                          ' scalar_advec = ', scalar_advec 
-          ENDIF
-          CALL local_stop
+          message_string = 'non-cyclic lateral boundaries do not allow ' // &
+                           'scalar_advec = "' // TRIM( scalar_advec ) // '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0053', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
        IF ( galilei_transformation )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    non-cyclic lateral boundaries do not allow', &
-                          ' galilei_transformation = .T.' 
-          ENDIF
-          CALL local_stop
-       ENDIF
-!       IF ( conserve_volume_flow )  THEN
-!          IF ( myid == 0 )  THEN
-!             PRINT*, '+++ check_parameters:'
-!             PRINT*, '    non-cyclic lateral boundaries do not allow', &
-!                          ' conserve_volume_flow = .T.' 
-!          ENDIF
-!          CALL local_stop
-!       ENDIF
+          message_string = 'non-cyclic lateral boundaries do not allow ' // &
+                           'galilei_transformation = .T.'
+          CALL handle_palm_message( 'check_parameters', 'PA0054', 1, 2, 0, 6, &
+                                    0 )
+       ENDIF
     ENDIF
 
@@ -1106,31 +1080,28 @@
        ibc_e_b = 1
        IF ( adjust_mixing_length  .AND.  prandtl_layer )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ WARNING: check_parameters:'
-             PRINT*, '    adjust_mixing_length = TRUE and bc_e_b = ', bc_e_b
-          ENDIF
+          message_string = 'adjust_mixing_length = TRUE and bc_e_b = "neumann"'
+          CALL handle_palm_message( 'check_parameters', 'PA0055', 0, 1, 0, 6, &
+                                    0 )
        ENDIF
     ELSEIF ( bc_e_b == '(u*)**2+neumann' )  THEN
        ibc_e_b = 2
        IF ( .NOT. adjust_mixing_length  .AND.  prandtl_layer )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ WARNING: check_parameters:'
-             PRINT*, '    adjust_mixing_length = FALSE and bc_e_b = ', bc_e_b
-          ENDIF
+          message_string = 'adjust_mixing_length = FALSE and bc_e_b = "' // &
+                           TRIM( bc_e_b ) // '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0056', 0, 1, 0, 6, &
+                                    0 )
        ENDIF
        IF ( .NOT. prandtl_layer )  THEN
           bc_e_b = 'neumann'
           ibc_e_b = 1
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ WARNING: check_parameters:'
-             PRINT*, '    boundary condition bc_e_b changed to "', bc_e_b, '"'
-          ENDIF
+          message_string = 'boundary condition bc_e_b changed to "' // &
+                           TRIM( bc_e_b ) // '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0057', 0, 1, 0, 6, &
+                                    0 )
        ENDIF
     ELSE
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    unknown boundary condition: bc_e_b = ', bc_e_b
-       ENDIF
-       CALL local_stop
+       message_string = 'unknown boundary condition: bc_e_b = "' // &
+                        TRIM( bc_e_b ) // '"'
+       CALL handle_palm_message( 'check_parameters', 'PA0058', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1144,18 +1115,12 @@
        ibc_p_b = 2
     ELSE
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    unknown boundary condition: bc_p_b = ', bc_p_b
-       ENDIF
-       CALL local_stop
+       message_string = 'unknown boundary condition: bc_p_b = "' // &
+                        TRIM( bc_p_b ) // '"'
+       CALL handle_palm_message( 'check_parameters', 'PA0059', 1, 2, 0, 6, 0 )
     ENDIF
     IF ( ibc_p_b == 2  .AND.  .NOT. prandtl_layer )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    boundary condition: bc_p_b = ', TRIM( bc_p_b ), &
-                       ' not allowed with'
-          PRINT*, '    prandtl_layer = .FALSE.' 
-       ENDIF
-       CALL local_stop
+       message_string = 'boundary condition: bc_p_b = "' // TRIM( bc_p_b ) // &
+                        '" not allowed with prandtl_layer = .FALSE.'
+       CALL handle_palm_message( 'check_parameters', 'PA0060', 1, 2, 0, 6, 0 )
     ENDIF
     IF ( bc_p_t == 'dirichlet' )  THEN
@@ -1164,9 +1129,7 @@
        ibc_p_t = 1
     ELSE
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    unknown boundary condition: bc_p_t = ', bc_p_t
-       ENDIF
-       CALL local_stop
+       message_string = 'unknown boundary condition: bc_p_t = "' // &
+                        TRIM( bc_p_t ) // '"'
+       CALL handle_palm_message( 'check_parameters', 'PA0061', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1181,9 +1144,8 @@
           ibc_pt_b = 1
        ELSE
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    unknown boundary condition: bc_pt_b = ', bc_pt_b
-          ENDIF
-          CALL local_stop
+          message_string = 'unknown boundary condition: bc_pt_b = "' // &
+                           TRIM( bc_pt_b ) // '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0062', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
     ENDIF
@@ -1196,9 +1158,7 @@
        ibc_pt_t = 2
     ELSE
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    unknown boundary condition: bc_pt_t = ', bc_pt_t
-       ENDIF
-       CALL local_stop
+       message_string = 'unknown boundary condition: bc_pt_t = "' // &
+                        TRIM( bc_pt_t ) // '"'
+       CALL handle_palm_message( 'check_parameters', 'PA0063', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1209,11 +1169,8 @@
        constant_top_momentumflux = .TRUE.
     ELSEIF (  .NOT. ( top_momentumflux_u == 9999999.9  .AND.  &
-           top_momentumflux_v == 9999999.9 ) )  THEN   
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    both, top_momentumflux_u AND top_momentumflux_v'
-          PRINT*, '    must be set'
-       ENDIF
-       CALL local_stop
+           top_momentumflux_v == 9999999.9 ) )  THEN
+       message_string = 'both, top_momentumflux_u AND top_momentumflux_v ' // &
+                        'must be set'
+       CALL handle_palm_message( 'check_parameters', 'PA0064', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1224,18 +1181,13 @@
     IF ( ibc_pt_b == 0  .AND.   constant_heatflux  .AND. &
          surface_heatflux /= 0.0 )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    boundary_condition: bc_pt_b = ', bc_pt_b
-          PRINT*, '    is not allowed with constant_heatflux = .TRUE.'
-       ENDIF
-       CALL local_stop
+       message_string = 'boundary_condition: bc_pt_b = "' // TRIM( bc_pt_b ) //&
+                        '& is not allowed with constant_heatflux = .TRUE.'
+       CALL handle_palm_message( 'check_parameters', 'PA0065', 1, 2, 0, 6, 0 )
     ENDIF
     IF ( constant_heatflux  .AND.  pt_surface_initial_change /= 0.0 )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters: constant_heatflux = .TRUE. is not'
-          PRINT*, '    allowed with pt_surface_initial_change (/=0) = ', &
-                  pt_surface_initial_change
-       ENDIF
-       CALL local_stop
+       WRITE ( message_string, * )  'constant_heatflux = .TRUE. is not allo', &
+               'wed with pt_surface_initial_change (/=0) = ', &
+               pt_surface_initial_change
+       CALL handle_palm_message( 'check_parameters', 'PA0066', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1246,10 +1198,7 @@
     IF ( ibc_pt_t == 0  .AND.   constant_top_heatflux  .AND. &
          top_heatflux /= 0.0 )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    boundary_condition: bc_pt_t = ', bc_pt_t
-          PRINT*, '    is not allowed with constant_top_heatflux = .TRUE.'
-       ENDIF
-       CALL local_stop
+       message_string = 'boundary_condition: bc_pt_t = "' // TRIM( bc_pt_t ) //&
+                        '" is not allowed with constant_top_heatflux = .TRUE.'
+       CALL handle_palm_message( 'check_parameters', 'PA0067', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1262,19 +1211,17 @@
           ibc_sa_t = 1
        ELSE
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    unknown boundary condition: bc_sa_t = ', bc_sa_t
-          ENDIF
-          CALL local_stop
+          message_string = 'unknown boundary condition: bc_sa_t = "' // &
+                           TRIM( bc_sa_t ) // '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0068', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
 
        IF ( top_salinityflux == 9999999.9 )  constant_top_salinityflux = .FALSE.
        IF ( ibc_sa_t == 1  .AND.   top_salinityflux == 9999999.9 )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    boundary_condition: bc_sa_t = ', bc_sa_t
-             PRINT*, '    requires to set top_salinityflux '
-          ENDIF
-          CALL local_stop
+          message_string = 'boundary condition: bc_sa_t = "' // &
+                           TRIM( bc_sa_t ) // '" requires to set ' // &
+                           'top_salinityflux'
+          CALL handle_palm_message( 'check_parameters', 'PA0069', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
 
@@ -1285,11 +1232,9 @@
        IF ( ibc_sa_t == 0  .AND.   constant_top_salinityflux  .AND. &
             top_salinityflux /= 0.0 )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    boundary_condition: bc_sa_t = ', bc_sa_t
-             PRINT*, '    is not allowed with constant_top_salinityflux = ', &
-                          '.TRUE.'
-          ENDIF
-          CALL local_stop
+          message_string = 'boundary condition: bc_sa_t = "' // &
+                           TRIM( bc_sa_t ) // '" is not allowed with ' // &
+                           'constant_top_salinityflux = .TRUE.'
+          CALL handle_palm_message( 'check_parameters', 'PA0070', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
 
@@ -1310,9 +1255,8 @@
           ibc_q_b = 1
        ELSE
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    unknown boundary condition: bc_', sq, '_b = ', bc_q_b
-          ENDIF
-          CALL local_stop
+          message_string = 'unknown boundary condition: bc_' // TRIM( sq ) // &
+                           '_b ="' // TRIM( bc_q_b ) // '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0071', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
        IF ( bc_q_t == 'dirichlet' )  THEN
@@ -1321,9 +1265,8 @@
           ibc_q_t = 1
        ELSE
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    unknown boundary condition: bc_', sq, '_t = ', bc_q_t
-          ENDIF
-          CALL local_stop
+          message_string = 'unknown boundary condition: bc_' // TRIM( sq ) // &
+                           '_t ="' // TRIM( bc_q_t ) // '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0072', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
 
@@ -1335,18 +1278,16 @@
 !--    forbidden.
        IF ( ibc_q_b == 0  .AND.  constant_waterflux )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    boundary_condition: bc_', sq, '_b = ', bc_q_b
-             PRINT*, '    is not allowed with prescribed surface flux'
-          ENDIF
-          CALL local_stop
+          message_string = 'boundary condition: bc_' // TRIM( sq ) // '_b ' // &
+                           '= "' // TRIM( bc_q_b ) // '" is not allowed wi' // &
+                           'th prescribed surface flux'
+          CALL handle_palm_message( 'check_parameters', 'PA0073', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
        IF ( constant_waterflux  .AND.  q_surface_initial_change /= 0.0 )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters: a prescribed surface flux is not'
-             PRINT*, '    allowed with ', sq, '_surface_initial_change (/=0)', &
-                     ' = ', q_surface_initial_change
-          ENDIF
-          CALL local_stop
+          WRITE( message_string, * )  'a prescribed surface flux is not allo', &
+                 'wed with ', sq, '_surface_initial_change (/=0) = ', &
+                 q_surface_initial_change
+          CALL handle_palm_message( 'check_parameters', 'PA0074', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
        
@@ -1360,19 +1301,15 @@
        ibc_uv_b = 1
        IF ( prandtl_layer )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    boundary condition: bc_uv_b = ', TRIM( bc_uv_b ), &
-                          ' is not allowed with'
-             PRINT*, '    prandtl_layer = .TRUE.' 
-          ENDIF
-          CALL local_stop
+          message_string = 'boundary condition: bc_uv_b = "' // &
+               TRIM( bc_uv_b ) // '" is not allowed with prandtl_layer = .TRUE.'
+          CALL handle_palm_message( 'check_parameters', 'PA0075', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
     ELSE
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    unknown boundary condition: bc_uv_b = ', bc_uv_b
-       ENDIF
-       CALL local_stop
-    ENDIF
+       message_string = 'unknown boundary condition: bc_uv_b = "' // &
+                        TRIM( bc_uv_b ) // '"'
+       CALL handle_palm_message( 'check_parameters', 'PA0076', 1, 2, 0, 6, 0 )
+    ENDIF
+
     IF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
        bc_uv_t = 'neumann'
@@ -1384,9 +1321,8 @@
           ibc_uv_t = 1
        ELSE
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    unknown boundary condition: bc_uv_t = ', bc_uv_t
-          ENDIF
-          CALL local_stop
+          message_string = 'unknown boundary condition: bc_uv_t = "' // &
+                           TRIM( bc_uv_t ) // '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0077', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
     ENDIF
@@ -1403,10 +1339,8 @@
        IF ( rayleigh_damping_factor < 0.0 .OR. rayleigh_damping_factor > 1.0 ) &
        THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    rayleigh_damping_factor = ', rayleigh_damping_factor,&
-                          ' out of range [0.0,1.0]'
-          ENDIF
-          CALL local_stop
+          WRITE( message_string, * )  'rayleigh_damping_factor = ', &
+                              rayleigh_damping_factor, ' out of range [0.0,1.0]'
+          CALL handle_palm_message( 'check_parameters', 'PA0078', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
     ENDIF
@@ -1422,20 +1356,16 @@
           IF ( rayleigh_damping_height < 0.0  .OR. &
                rayleigh_damping_height > zu(nzt) )  THEN
-             IF ( myid == 0 )  THEN
-                PRINT*, '+++ check_parameters:'
-                PRINT*, '    rayleigh_damping_height = ', rayleigh_damping_height,&
-                     ' out of range [0.0,', zu(nzt), ']'
-             ENDIF
-             CALL local_stop
+             WRITE( message_string, * )  'rayleigh_damping_height = ', &
+                   rayleigh_damping_height, ' out of range [0.0,', zu(nzt), ']'
+             CALL handle_palm_message( 'check_parameters', 'PA0079', 1, 2, 0, &
+                                       6, 0 )
           ENDIF
        ELSE
           IF ( rayleigh_damping_height > 0.0  .OR. &
                rayleigh_damping_height < zu(nzb) )  THEN
-             IF ( myid == 0 )  THEN
-                PRINT*, '+++ check_parameters:'
-                PRINT*, '    rayleigh_damping_height = ', rayleigh_damping_height,&
-                     ' out of range [0.0,', zu(nzb), ']'
-             ENDIF
-             CALL local_stop
+             WRITE( message_string, * )  'rayleigh_damping_height = ', &
+                   rayleigh_damping_height, ' out of range [0.0,', zu(nzb), ']'
+             CALL handle_palm_message( 'check_parameters', 'PA0079', 1, 2, 0, &
+                                       6, 0 )
           ENDIF
        ENDIF
@@ -1447,17 +1377,11 @@
          overshoot_limit_w < 0.0  .OR.  overshoot_limit_pt < 0.0  .OR. &
          overshoot_limit_e < 0.0 )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    overshoot_limit_... < 0.0 is not allowed'
-       ENDIF
-       CALL local_stop
+       message_string = 'overshoot_limit_... < 0.0 is not allowed'
+       CALL handle_palm_message( 'check_parameters', 'PA0080', 1, 2, 0, 6, 0 )
     ENDIF
     IF ( ups_limit_u < 0.0 .OR. ups_limit_v < 0.0 .OR. ups_limit_w < 0.0 .OR. &
          ups_limit_pt < 0.0 .OR. ups_limit_e < 0.0 )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    ups_limit_... < 0.0 is not allowed'
-       ENDIF
-       CALL local_stop
+       message_string = 'ups_limit_... < 0.0 is not allowed'
+       CALL handle_palm_message( 'check_parameters', 'PA0081', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1467,19 +1391,14 @@
 !-- be opened (cf. check_open)
     IF ( statistic_regions > 9  .OR.  statistic_regions < 0 )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters: Number of statistic_regions = ', &
-                       statistic_regions+1
-          PRINT*, '    Only 10 regions are allowed'
-       ENDIF
-       CALL local_stop
+       WRITE ( message_string, * ) 'number of statistic_regions = ', &
+                   statistic_regions+1, ' but only 10 regions are allowed'
+       CALL handle_palm_message( 'check_parameters', 'PA0082', 1, 2, 0, 6, 0 )
     ENDIF
     IF ( normalizing_region > statistic_regions  .OR. &
          normalizing_region < 0)  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters: normalizing_region = ', &
-                       normalizing_region, ' is unknown'
-          PRINT*, '    Must be <= ', statistic_regions
-       ENDIF
-       CALL local_stop
+       WRITE ( message_string, * ) 'normalizing_region = ', &
+                normalizing_region, ' must be >= 0 and <= ',statistic_regions, &
+                ' (value of statistic_regions)'
+       CALL handle_palm_message( 'check_parameters', 'PA0083', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1489,9 +1408,7 @@
     IF ( dt_sort_particles /= 0.0  .AND.  cloud_droplets )  THEN
        dt_sort_particles = 0.0
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ WARNING: check_parameters:'
-          PRINT*, '    dt_sort_particles is reset to 0.0 because ', &
-                       'of cloud_droplets = .TRUE.'
-       ENDIF
+       message_string = 'dt_sort_particles is reset to 0.0 because of cloud' //&
+                        '_droplets = .TRUE.'
+       CALL handle_palm_message( 'check_parameters', 'PA0084', 0, 1, 0, 6, 0 )
     ENDIF
 
@@ -1530,10 +1447,7 @@
 !-- spectra)
     IF ( averaging_interval > dt_data_output_av )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters: average_interval=',              &
-                       averaging_interval, ' must be <= dt_data_output=', &
-                       dt_data_output
-       ENDIF
-       CALL local_stop
+       WRITE( message_string, * )  'averaging_interval = ', &
+             averaging_interval, ' must be <= dt_data_output = ', dt_data_output
+       CALL handle_palm_message( 'check_parameters', 'PA0085', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1543,9 +1457,7 @@
 
     IF ( averaging_interval_pr > dt_dopr )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters: averaging_interval_pr=', &
-                       averaging_interval_pr, ' must be <= dt_dopr=', dt_dopr
-       ENDIF
-       CALL local_stop
+       WRITE( message_string, * )  'averaging_interval_pr = ', &
+             averaging_interval_pr, ' must be <= dt_dopr = ', dt_dopr
+       CALL handle_palm_message( 'check_parameters', 'PA0086', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1555,9 +1467,7 @@
 
     IF ( averaging_interval_sp > dt_dosp )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters: averaging_interval_sp=', &
-                       averaging_interval_sp, ' must be <= dt_dosp=', dt_dosp
-       ENDIF
-       CALL local_stop
+       WRITE( message_string, * )  'averaging_interval_sp = ', &
+             averaging_interval_sp, ' must be <= dt_dosp = ', dt_dosp
+       CALL handle_palm_message( 'check_parameters', 'PA0087', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1582,20 +1492,15 @@
 !-- Check the sample rate for averaging (first for 3d-data, then for profiles)
     IF ( dt_averaging_input > averaging_interval )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters: dt_averaging_input=',                &
-                       dt_averaging_input, ' must be <= averaging_interval=', &
-                       averaging_interval
-       ENDIF
-       CALL local_stop
+       WRITE( message_string, * )  'dt_averaging_input = ', &
+                dt_averaging_input, ' must be <= averaging_interval = ', &
+                averaging_interval
+       CALL handle_palm_message( 'check_parameters', 'PA0088', 1, 2, 0, 6, 0 )
     ENDIF
 
     IF ( dt_averaging_input_pr > averaging_interval_pr )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters: dt_averaging_input_pr=', &
-                       dt_averaging_input_pr,                     &
-                       ' must be <= averaging_interval_pr=',      &
-                       averaging_interval_pr
-       ENDIF
-       CALL local_stop
+       WRITE( message_string, * )  'dt_averaging_input_pr = ', &
+                dt_averaging_input_pr, ' must be <= averaging_interval_pr = ', &
+                averaging_interval_pr
+       CALL handle_palm_message( 'check_parameters', 'PA0089', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1607,10 +1512,9 @@
        ELSE
           IF ( precipitation_amount_interval > dt_do2d_xy )  THEN
-             IF ( myid == 0 )  PRINT*, '+++ check_parameters: ',              &
-                                       'precipitation_amount_interval =',     &
-                                        precipitation_amount_interval,        &
-                                       ' must not be larger than dt_do2d_xy', &
-                                       ' = ', dt_do2d_xy   
-       CALL local_stop
+             WRITE( message_string, * )  'precipitation_amount_interval = ', &
+                 precipitation_amount_interval, ' must not be larger than ', &
+                 'dt_do2d_xy = ', dt_do2d_xy
+             CALL handle_palm_message( 'check_parameters', 'PA0090', 1, 2, 0, &
+                                       6, 0 )
           ENDIF
        ENDIF
@@ -1778,10 +1682,9 @@
           CASE ( 'sa', '#sa' )
              IF ( .NOT. ocean )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for ocean = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for ocean = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0091', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 23
@@ -1848,10 +1751,9 @@
           CASE ( 'q', '#q' )
              IF ( .NOT. humidity )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for humidity = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for humidity = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0092', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 41
@@ -1868,10 +1770,9 @@
           CASE ( 's', '#s' )
              IF ( .NOT. passive_scalar )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for passive_scalar = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for passive_scalar = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0093', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 41
@@ -1911,10 +1812,9 @@
           CASE ( 'lpt', '#lpt' )
              IF ( .NOT. cloud_physics ) THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for cloud_physics = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for cloud_physics = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0094', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 4
@@ -1957,10 +1857,9 @@
           CASE ( 'w"q"' )
              IF ( .NOT. humidity )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for humidity = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for humidity = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0092', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 48
@@ -1971,10 +1870,9 @@
           CASE ( 'w*q*' )
              IF ( .NOT. humidity )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for humidity = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for humidity = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0092', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 49
@@ -1985,10 +1883,9 @@
           CASE ( 'wq' )
              IF ( .NOT. humidity )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for humidity = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for humidity = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0092', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 50
@@ -1999,10 +1896,9 @@
           CASE ( 'w"s"' )
              IF ( .NOT. passive_scalar ) THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for passive_scalar = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for passive_scalar = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0093', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 48
@@ -2013,10 +1909,9 @@
           CASE ( 'w*s*' )
              IF ( .NOT. passive_scalar ) THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for passive_scalar = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for passive_scalar = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0093', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 49
@@ -2027,10 +1922,9 @@
           CASE ( 'ws' )
              IF ( .NOT. passive_scalar ) THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for passive_scalar = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for passive_scalar = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0093', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 50
@@ -2050,11 +1944,10 @@
                 hom(:,2,51,:) = SPREAD( zw, 2, statistic_regions+1 )
              ELSE
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for cloud_physics = FALSE', &
-                           '    and                    humidity      = FALSE'
-                ENDIF
-                CALL local_stop                   
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for cloud_physics = .FALSE. an&' // &
+                                 'd humidity = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0095', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
 
@@ -2070,11 +1963,10 @@
                 hom(:,2,52,:) = SPREAD( zw, 2, statistic_regions+1 )
              ELSE
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ',         &
-                           data_output_pr(i),                                  &
-                           '    is not implemented for cloud_physics = FALSE', &
-                           '                       and humidity      = FALSE'
-                ENDIF
-                CALL local_stop                   
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for cloud_physics = .FALSE. an&' // &
+                                 'd humidity = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0095', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
 
@@ -2090,21 +1982,20 @@
                 hom(:,2,53,:) = SPREAD( zw, 2, statistic_regions+1 )
              ELSE
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ',         &
-                           data_output_pr(i),                                  &
-                           '    is not implemented for cloud_physics = FALSE', &
-                           '                       and humidity      = FALSE'
-                ENDIF
-                CALL local_stop                   
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for cloud_physics = .FALSE. an&' // &
+                                 'd humidity = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0095', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
 
           CASE ( 'ql' )
              IF ( .NOT. cloud_physics  .AND.  .NOT. cloud_droplets )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for cloud_physics = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for cloud_physics = .FALSE. or'  // &
+                                 '&cloud_droplets = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0096', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 54
@@ -2165,10 +2056,9 @@
           CASE ( 'w"sa"' )
              IF ( .NOT. ocean ) THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for ocean = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for ocean = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0091', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 65
@@ -2179,10 +2069,9 @@
           CASE ( 'w*sa*' )
              IF ( .NOT. ocean ) THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for ocean = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for ocean = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0091', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 66
@@ -2193,10 +2082,9 @@
           CASE ( 'wsa' )
              IF ( .NOT. ocean ) THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for ocean = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for ocean = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0091', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 67
@@ -2217,10 +2105,9 @@
           CASE ( 'q*2' )
              IF ( .NOT. humidity )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  data_output_pr = ', &
-                           data_output_pr(i),                          &
-                           '    is not implemented for humidity = FALSE'
-                ENDIF
-                CALL local_stop
+                message_string = 'data_output_pr = ' // &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for humidity = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0092', 1, 2, &
+                                          0, 6, 0 )
              ELSE
                 dopr_index(i) = 70
@@ -2234,15 +2121,16 @@
 
              IF ( unit == 'illegal' )  THEN
-                IF ( myid == 0 )  THEN
-                   IF ( data_output_pr_user(1) /= ' ' )  THEN
-                      PRINT*, '+++ check_parameters:  illegal value for data_',&
-                                   'output_pr or data_output_pr_user: "',      &
-                                   TRIM( data_output_pr(i) ), '"'
-                   ELSE
-                      PRINT*, '+++ check_parameters:  illegal value for data_',&
-                                   'output_pr: "', TRIM( data_output_pr(i) ),'"'
-                   ENDIF
+                IF ( data_output_pr_user(1) /= ' ' )  THEN
+                   message_string = 'illegal value for data_output_pr or ' // &
+                                    'data_output_pr_user = "' // &
+                                    TRIM( data_output_pr(i) ) // '"'
+                   CALL handle_palm_message( 'check_parameters', 'PA0097', 1, &
+                                             2, 0, 6, 0 )
+                ELSE
+                   message_string = 'illegal value for data_output_pr = "' // &
+                                    TRIM( data_output_pr(i) ) // '"'
+                   CALL handle_palm_message( 'check_parameters', 'PA0098', 1, &
+                                             2, 0, 6, 0 )
                 ENDIF
-                CALL local_stop
              ENDIF
 
@@ -2279,8 +2167,8 @@
           cross_uymax = zu(nzt+1)
        ELSEIF ( z_max_do1d < zu(nzb+1)  .OR.  z_max_do1d > zu(nzt+1) )  THEN
-          IF ( myid == 0 )  PRINT*, '+++ check_parameters:  z_max_do1d=',  &
-                                    z_max_do1d,' must be >= ', zu(nzb+1),  &
-                                    ' or <= ', zu(nzt+1)
-          CALL local_stop
+          WRITE( message_string, * )  'z_max_do1d = ', z_max_do1d, ' must ', &
+                 'be >= ', zu(nzb+1), ' or <= ', zu(nzt+1)
+          CALL handle_palm_message( 'check_parameters', 'PA0099', 1, 2, 0, 6, &
+                                    0 )
        ELSE
           cross_uymax = z_max_do1d
@@ -2298,9 +2186,9 @@
 
           CASE DEFAULT
-             IF ( myid == 0 )  THEN
-                PRINT*, '+++ check_parameters: unknown normalize method'
-                PRINT*, '    cross_normalized_x="',cross_normalized_x(i),'"'
-             ENDIF
-             CALL local_stop
+             message_string = 'unknown normalization method cross_normali' // &
+                              'zed_x = "' // TRIM( cross_normalized_x(i) ) // &
+                              '"'
+             CALL handle_palm_message( 'check_parameters', 'PA0100', 1, 2, 0, &
+                                       6, 0 )
 
        END SELECT
@@ -2311,9 +2199,9 @@
 
           CASE DEFAULT
-             IF ( myid == 0 )  THEN
-                PRINT*, '+++ check_parameters: unknown normalize method'
-                PRINT*, '    cross_normalized_y="',cross_normalized_y(i),'"'
-             ENDIF
-             CALL local_stop
+             message_string = 'unknown normalization method cross_normali' // &
+                              'zed_y = "' // TRIM( cross_normalized_y(i) ) // &
+                              '"'
+             CALL handle_palm_message( 'check_parameters', 'PA0101', 1, 2, 0, &
+                                       6, 0 )
 
        END SELECT
@@ -2323,7 +2211,7 @@
     IF ( z_max_do1d_normalized /= -1.0  .AND.  z_max_do1d_normalized <= 0.0 ) &
     THEN
-       IF ( myid == 0 )  PRINT*,'+++ check_parameters:  z_max_do1d_normalize', &
-                                'd=', z_max_do1d_normalized, ' must be >= 0.0'
-       CALL local_stop
+       WRITE( message_string, * )  'z_max_do1d_normalized = ', &
+                                   z_max_do1d_normalized, ' must be >= 0.0'
+       CALL handle_palm_message( 'check_parameters', 'PA0101', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -2339,10 +2227,8 @@
        DO  WHILE ( data_output_user(j) /= ' '  .AND.  j <= 100 )
           IF ( i > 100 )  THEN
-             IF ( myid == 0 )  THEN
-                PRINT*, '+++ check_parameters: number of output quantitities', &
-                             ' given by data_output and data_output_user'
-                PRINT*, '                      exceeds the limit of 100'
-             ENDIF
-             CALL local_stop
+             message_string = 'number of output quantitities given by data' // &
+                '_output and data_output_user exceeds the limit of 100'
+             CALL handle_palm_message( 'check_parameters', 'PA0102', 1, 2, 0, &
+                                       6, 0 )
           ENDIF
           data_output(i) = data_output_user(j)
@@ -2385,9 +2271,8 @@
           CASE ( 'e' )
              IF ( constant_diffusion )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires constant_diffusion = .FALSE.'
-                ENDIF
-                CALL local_stop
+                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                                 'res constant_diffusion = .FALSE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0103', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              unit = 'm2/s2'
@@ -2395,10 +2280,8 @@
           CASE ( 'pc', 'pr' )
              IF ( .NOT. particle_advection )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires a "particles_par"-NAMELIST'
-                   PRINT*, '                      in the parameter file (PARIN)'
-                ENDIF
-                CALL local_stop
+                message_string = 'output of "' // TRIM( var ) // '" requir' // &
+                   'es a "particles_par"-NAMELIST in the parameter file (PARIN)'
+                CALL handle_palm_message( 'check_parameters', 'PA0104', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'pc' )  unit = 'number'
@@ -2407,9 +2290,8 @@
           CASE ( 'q', 'vpt' )
              IF ( .NOT. humidity )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires humidity = .TRUE.'
-                ENDIF
-                CALL local_stop
+                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                                 'res humidity = .TRUE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0105', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'q'   )  unit = 'kg/kg'
@@ -2418,10 +2300,8 @@
           CASE ( 'ql' )
              IF ( .NOT. ( cloud_physics  .OR.  cloud_droplets ) )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires cloud_physics = .TRUE.'
-                   PRINT*, '                      or cloud_droplets = .TRUE.'
-                ENDIF
-                CALL local_stop
+                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                         'res cloud_physics = .TRUE. or cloud_droplets = .TRUE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0106', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              unit = 'kg/kg'
@@ -2429,9 +2309,8 @@
           CASE ( 'ql_c', 'ql_v', 'ql_vp' )
              IF ( .NOT. cloud_droplets )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires cloud_droplets = .TRUE.'
-                ENDIF
-                CALL local_stop
+                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                                 'res cloud_droplets = .TRUE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0107', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'ql_c'  )  unit = 'kg/kg'
@@ -2441,9 +2320,8 @@
           CASE ( 'qv' )
              IF ( .NOT. cloud_physics )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires cloud_physics = .TRUE.'
-                ENDIF
-                CALL local_stop
+                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                                 'res cloud_physics = .TRUE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0108', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              unit = 'kg/kg'
@@ -2451,9 +2329,8 @@
           CASE ( 'rho' )
              IF ( .NOT. ocean )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires ocean = .TRUE.'
-                ENDIF
-                CALL local_stop
+                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                                 'res ocean = .TRUE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0109', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              unit = 'kg/m3'
@@ -2461,9 +2338,8 @@
           CASE ( 's' )
              IF ( .NOT. passive_scalar )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires passive_scalar = .TRUE.'
-                ENDIF
-                CALL local_stop
+                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                                 'res passive_scalar = .TRUE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0110', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              unit = 'conc'
@@ -2471,9 +2347,8 @@
           CASE ( 'sa' )
              IF ( .NOT. ocean )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires ocean = .TRUE.'
-                ENDIF
-                CALL local_stop
+                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                                 'res ocean = .TRUE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0109', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              unit = 'psu'
@@ -2481,39 +2356,33 @@
           CASE ( 'u*', 't*', 'lwp*', 'pra*', 'prr*', 'z0*' )
              IF ( k == 0  .OR.  data_output(i)(ilen-2:ilen) /= '_xy' )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:  illegal value for data_',&
-                                'output: "', TRIM( var ), '" is only allowed'
-                   PRINT*, '                       for horizontal cross section'
-                ENDIF
-                CALL local_stop
+                message_string = 'illegal value for data_output: "' // &
+                                 TRIM( var ) // '" & only 2d-horizontal ' // &
+                                 'cross sections are allowed for this value'
+                CALL handle_palm_message( 'check_parameters', 'PA0111', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'lwp*'  .AND.  .NOT. cloud_physics )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires cloud_physics = .TRUE.'
-                ENDIF
-                CALL local_stop
+                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                                 'res cloud_physics = .TRUE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0108', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'pra*'  .AND.  .NOT. precipitation )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires precipitation = .TRUE.'
-                ENDIF
-                CALL local_stop
+                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                                 'res precipitation = .TRUE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0112', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'pra*'  .AND.  j == 1 )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: temporal averaging of ', &
-                           ' precipitation amount "', TRIM( var ),         &
-                           '" not possible' 
-                ENDIF
-                CALL local_stop
+                message_string = 'temporal averaging of precipitation ' // &
+                          'amount "' // TRIM( var ) // '" is not possible'
+                CALL handle_palm_message( 'check_parameters', 'PA0113', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'prr*'  .AND.  .NOT. precipitation )  THEN
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires precipitation = .TRUE.'
-                ENDIF
-                CALL local_stop
+                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                                 'res precipitation = .TRUE.'
+                CALL handle_palm_message( 'check_parameters', 'PA0112', 1, 2, &
+                                          0, 6, 0 )
              ENDIF
 
@@ -2538,15 +2407,15 @@
 
              IF ( unit == 'illegal' )  THEN
-                IF ( myid == 0 )  THEN
-                   IF ( data_output_user(1) /= ' ' )  THEN
-                      PRINT*, '+++ check_parameters:  illegal value for data_',&
-                                   'output or data_output_user: "',            &
-                                   TRIM( data_output(i) ), '"'
-                   ELSE
-                      PRINT*, '+++ check_parameters:  illegal value for data_',&
-                                   'output: "', TRIM( data_output(i) ), '"'
-                   ENDIF
+                IF ( data_output_user(1) /= ' ' )  THEN
+                   message_string = 'illegal value for data_output or ' // &
+                         'data_output_user = "' // TRIM( data_output(i) ) // '"'
+                   CALL handle_palm_message( 'check_parameters', 'PA0114', 1, &
+                                             2, 0, 6, 0 )
+                ELSE
+                   message_string = 'illegal value for data_output =' // &
+                                    TRIM( data_output(i) ) // '"'
+                   CALL handle_palm_message( 'check_parameters', 'PA0115', 1, &
+                                             2, 0, 6, 0 )
                 ENDIF
-                CALL local_stop
              ENDIF
 
@@ -2611,8 +2480,8 @@
     IF ( z_max_do2d == -1.0 )  z_max_do2d = zu(nzt)
     IF ( z_max_do2d < zu(nzb+1)  .OR.  z_max_do2d > zu(nzt) )  THEN
-       IF ( myid == 0 )  PRINT*, '+++ check_parameters:  z_max_do2d=',        &
-                                 z_max_do2d, ' must be >= ', zu(nzb+1),       &
-                                 '(zu(nzb+1)) and <= ', zu(nzt), ' (zu(nzt))'
-       CALL local_stop
+       WRITE( message_string, * )  'z_max_do2d = ', z_max_do2d, &
+                    ' must be >= ', zu(nzb+1), '(zu(nzb+1)) and <= ', zu(nzt), &
+                    ' (zu(nzt))'
+       CALL handle_palm_message( 'check_parameters', 'PA0116', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -2627,9 +2496,8 @@
 !--    Compression only permissible on T3E machines
        IF ( host(1:3) /= 't3e' )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters: do3d_compress = .TRUE. not allow', &
-                          'ed on host "', TRIM( host ), '"'
-          ENDIF
-          CALL local_stop
+          message_string = 'do3d_compress = .TRUE. not allowed on host "' // &
+                           TRIM( host ) // '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0117', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
 
@@ -2640,9 +2508,8 @@
           IF ( LLT( do3d_comp_prec(i)(ilen:ilen), '0' ) .OR. &
                LGT( do3d_comp_prec(i)(ilen:ilen), '9' ) )  THEN
-             IF ( myid == 0 )  THEN
-                PRINT*, '+++ check_parameters: illegal precision: ', &
-                        'do3d_comp_prec(', i, ')="', TRIM(do3d_comp_prec(i)),'"'
-             ENDIF
-             CALL local_stop
+             WRITE( message_string, * )  'illegal precision: do3d_comp_prec', &
+                                   '(', i, ') = "', TRIM(do3d_comp_prec(i)),'"'
+             CALL handle_palm_message( 'check_parameters', 'PA0118', 1, 2, 0, &
+                                       6, 0 )
           ENDIF
 
@@ -2664,11 +2531,9 @@
 
              CASE DEFAULT
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters: unknown variable in ', &
-                               'assignment'
-                   PRINT*, '    do3d_comp_prec(', i, ')="', &
-                           TRIM( do3d_comp_prec(i) ),'"'
-                ENDIF
-                CALL local_stop                
+                WRITE( message_string, * )  'unknown variable "', &
+                     TRIM( do3d_comp_prec(i) ), '" given for do3d_comp_prec(', &
+                     i, ')'
+                CALL handle_palm_message( 'check_parameters', 'PA0119', 1, 2, &
+                                          0, 6, 0 )
 
           END SELECT
@@ -2702,10 +2567,8 @@
 
              CASE DEFAULT
-                IF ( myid == 0 )  THEN
-                   PRINT*, '+++ check_parameters:'
-                   PRINT*, '    unknown value for data_output_format "', &
-                                TRIM( data_output_format(i) ),'"'
-                ENDIF
-                CALL local_stop                
+                message_string = 'unknown value for data_output_format "' // &
+                                 TRIM( data_output_format(i) ) // '"'
+                CALL handle_palm_message( 'check_parameters', 'PA0120', 1, 2, &
+                                          0, 6, 0 )
 
           END SELECT
@@ -2727,19 +2590,21 @@
     IF ( km_constant /= -1.0 )  THEN
        IF ( km_constant < 0.0 )  THEN
-          IF ( myid == 0 )  PRINT*, '+++ check_parameters:  km_constant=', &
-                                    km_constant, ' < 0.0'
-          CALL local_stop
+          WRITE( message_string, * )  'km_constant = ', km_constant, ' < 0.0'
+          CALL handle_palm_message( 'check_parameters', 'PA0121', 1, 2, 0, 6, &
+                                    0 )
        ELSE
           IF ( prandtl_number < 0.0 )  THEN
-             IF ( myid == 0 )  PRINT*,'+++ check_parameters:  prandtl_number=',&
-                                      prandtl_number, ' < 0.0'
-             CALL local_stop
+             WRITE( message_string, * )  'prandtl_number = ', prandtl_number, &
+                                         ' < 0.0'
+             CALL handle_palm_message( 'check_parameters', 'PA0122', 1, 2, 0, &
+                                       6, 0 )
           ENDIF
           constant_diffusion = .TRUE.
 
           IF ( prandtl_layer )  THEN
-             IF ( myid == 0 )  PRINT*, '+++ check_parameters:  prandtl_layer ',&
-                                       'is not allowed with fixed value of km'
-             CALL local_stop
+             message_string = 'prandtl_layer is not allowed with fixed ' // &
+                              'value of km'
+             CALL handle_palm_message( 'check_parameters', 'PA0123', 1, 2, 0, &
+                                       6, 0 )
           ENDIF
        ENDIF
@@ -2758,7 +2623,7 @@
        ENDIF
        IF ( outflow_damping_width <= 0  .OR.  outflow_damping_width > nx )  THEN
-          IF ( myid == 0 )  PRINT*, '+++ check_parameters: outflow_damping w',&
-                                    'idth out of range'
-          CALL local_stop
+          message_string = 'outflow_damping width out of range'
+          CALL handle_palm_message( 'check_parameters', 'PA0124', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
     ENDIF
@@ -2772,7 +2637,7 @@
        ENDIF
        IF ( outflow_damping_width <= 0  .OR.  outflow_damping_width > ny )  THEN
-          IF ( myid == 0 )  PRINT*, '+++ check_parameters: outflow_damping w',&
-                                    'idth out of range'
-          CALL local_stop
+          message_string = 'outflow_damping width out of range'
+          CALL handle_palm_message( 'check_parameters', 'PA0124', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
     ENDIF
@@ -2781,7 +2646,7 @@
 !-- Check value range for rif
     IF ( rif_min >= rif_max )  THEN
-       IF ( myid == 0 )  PRINT*, '+++ check_parameters:  rif_min=', rif_min, &
-                                 ' must be less than rif_max=', rif_max
-       CALL local_stop
+       WRITE( message_string, * )  'rif_min = ', rif_min, ' must be less ', &
+                                   'than rif_max = ', rif_max
+       CALL handle_palm_message( 'check_parameters', 'PA0125', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -2797,13 +2662,11 @@
        ENDIF
     ELSEIF ( disturbance_level_b < zu(3) )  THEN
-       IF ( myid == 0 )  PRINT*, '+++ check_parameters:  disturbance_level_b=',&
-                                 disturbance_level_b, ' must be >= ',zu(3),    &
-                                 '(zu(3))'
-       CALL local_stop
+       WRITE( message_string, * )  'disturbance_level_b = ', &
+                           disturbance_level_b, ' must be >= ', zu(3), '(zu(3))'
+       CALL handle_palm_message( 'check_parameters', 'PA0126', 1, 2, 0, 6, 0 )
     ELSEIF ( disturbance_level_b > zu(nzt-2) )  THEN
-       IF ( myid == 0 )  PRINT*, '+++ check_parameters:  disturbance_level_b=',&
-                                 disturbance_level_b, ' must be <= ',zu(nzt-2),&
-                                 '(zu(nzt-2))'
-       CALL local_stop
+       WRITE( message_string, * )  'disturbance_level_b = ', &
+                   disturbance_level_b, ' must be <= ', zu(nzt-2), '(zu(nzt-2))'
+       CALL handle_palm_message( 'check_parameters', 'PA0127', 1, 2, 0, 6, 0 )
     ELSE
        DO  k = 3, nzt-2
@@ -2824,13 +2687,12 @@
        ENDIF
     ELSEIF ( disturbance_level_t > zu(nzt-2) )  THEN
-       IF ( myid == 0 )  PRINT*, '+++ check_parameters:  disturbance_level_t=',&
-                                 disturbance_level_t, ' must be <= ',zu(nzt-2),&
-                                 '(zu(nzt-2))'
-       CALL local_stop
+       WRITE( message_string, * )  'disturbance_level_t = ', &
+                   disturbance_level_t, ' must be <= ', zu(nzt-2), '(zu(nzt-2))'
+       CALL handle_palm_message( 'check_parameters', 'PA0128', 1, 2, 0, 6, 0 )
     ELSEIF ( disturbance_level_t < disturbance_level_b )  THEN
-       IF ( myid == 0 )  PRINT*, '+++ check_parameters:  disturbance_level_t=',&
-                                 disturbance_level_t, ' must be >= ',          &
-                                 'disturbance_level_b=', disturbance_level_b
-       CALL local_stop
+       WRITE( message_string, * )  'disturbance_level_t = ', &
+                   disturbance_level_t, ' must be >= disturbance_level_b = ', &
+                   disturbance_level_b
+       CALL handle_palm_message( 'check_parameters', 'PA0129', 1, 2, 0, 6, 0 )
     ELSE
        DO  k = 3, nzt-2
@@ -2847,10 +2709,8 @@
 !-- z-direction.
     IF ( disturbance_level_ind_t < disturbance_level_ind_b )  THEN
-       IF ( myid == 0 )  PRINT*, '+++ check_parameters:  ',                &
-                                 'disturbance_level_ind_t=',               &
-                                 disturbance_level_ind_t, ' must be >= ',  &
-                                 'disturbance_level_ind_b=',               &
-                                 disturbance_level_ind_b
-       CALL local_stop
+       WRITE( message_string, * )  'disturbance_level_ind_t = ', &
+                disturbance_level_ind_t, ' must be >= disturbance_level_b = ', &
+                disturbance_level_b
+       CALL handle_palm_message( 'check_parameters', 'PA0130', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -2868,7 +2728,7 @@
        IF ( inflow_disturbance_begin < 0  .OR.  inflow_disturbance_begin > nx )&
        THEN
-          IF ( myid == 0 )  PRINT*, '+++ check_parameters: inflow_disturbance',&
-                                    '_begin out of range'
-          CALL local_stop
+          message_string = 'inflow_disturbance_begin out of range'
+          CALL handle_palm_message( 'check_parameters', 'PA0131', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
        IF ( inflow_disturbance_end == -1 )  THEN
@@ -2877,7 +2737,7 @@
        IF ( inflow_disturbance_end < 0  .OR.  inflow_disturbance_end > nx )    &
        THEN
-          IF ( myid == 0 )  PRINT*, '+++ check_parameters: inflow_disturbance',&
-                                    '_end out of range'
-          CALL local_stop
+          message_string = 'inflow_disturbance_end out of range'
+          CALL handle_palm_message( 'check_parameters', 'PA0132', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
     ELSEIF ( bc_ns /= 'cyclic' )  THEN
@@ -2887,7 +2747,7 @@
        IF ( inflow_disturbance_begin < 0  .OR.  inflow_disturbance_begin > ny )&
        THEN
-          IF ( myid == 0 )  PRINT*, '+++ check_parameters: inflow_disturbance',&
-                                    '_begin out of range'
-          CALL local_stop
+          message_string = 'inflow_disturbance_begin out of range'
+          CALL handle_palm_message( 'check_parameters', 'PA0131', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
        IF ( inflow_disturbance_end == -1 )  THEN
@@ -2896,7 +2756,7 @@
        IF ( inflow_disturbance_end < 0  .OR.  inflow_disturbance_end > ny )    &
        THEN
-          IF ( myid == 0 )  PRINT*, '+++ check_parameters: inflow_disturbance',&
-                                    '_end out of range'
-          CALL local_stop
+          message_string = 'inflow_disturbance_end out of range'
+          CALL handle_palm_message( 'check_parameters', 'PA0132', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
     ENDIF
@@ -2921,10 +2781,7 @@
 !-- boundary (so far, a turbulent inflow is realized from the left side only)
     IF ( turbulent_inflow  .AND.  bc_lr /= 'dirichlet/radiation' )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    turbulent_inflow = .T. requires a Dirichlet condition', &
-                  ' at the inflow boundary'
-       ENDIF
-       CALL local_stop
+       message_string = 'turbulent_inflow = .T. requires a Dirichlet ' // &
+                        'condition at the inflow boundary'
+       CALL handle_palm_message( 'check_parameters', 'PA0133', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -2938,10 +2795,8 @@
        ELSE
           IF ( recycling_width < dx  .OR.  recycling_width > nx * dx )  THEN
-             IF ( myid == 0 )  THEN
-                PRINT*, '+++ check_parameters:'
-                PRINT*, '    illegal value for recycling_width: ', &
-                        recycling_width
-             ENDIF
-             CALL local_stop
+             WRITE( message_string, * )  'illegal value for recycling_width:', &
+                                         ' ', recycling_width
+             CALL handle_palm_message( 'check_parameters', 'PA0134', 1, 2, 0, &
+                                       6, 0 )
           ENDIF
        ENDIF
@@ -2955,10 +2810,7 @@
     IF ( random_generator /= 'system-specific'  .AND. &
          random_generator /= 'numerical-recipes' )  THEN
-       IF ( myid == 0 )  THEN
-          PRINT*, '+++ check_parameters:'
-          PRINT*, '    unknown random generator: random_generator=', &
-                  random_generator
-       ENDIF
-       CALL local_stop
+       message_string = 'unknown random generator: random_generator = "' // &
+                        TRIM( random_generator ) // '"'
+       CALL handle_palm_message( 'check_parameters', 'PA0135', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -2970,8 +2822,8 @@
           damp_level_ind_1d = nzt + 1
        ELSEIF ( damp_level_1d < 0.0  .OR.  damp_level_1d > zu(nzt+1) )  THEN
-          IF ( myid == 0 )  PRINT*, '+++ check_parameters:  damp_level_1d=', &
-                                    damp_level_1d, ' must be > 0.0 and < ',  &
-                                    'zu(nzt+1)', zu(nzt+1)
-          CALL local_stop
+          WRITE( message_string, * )  'damp_level_1d = ', damp_level_1d, &
+                 ' must be > 0.0 and < ', zu(nzt+1), '(zu(nzt+1))'
+          CALL handle_palm_message( 'check_parameters', 'PA0136', 1, 2, 0, 6, &
+                                    0 )
        ELSE
           DO  k = 1, nzt+1
@@ -2983,17 +2835,18 @@
        ENDIF
     ENDIF
+
 !
 !-- Check some other 1d-model parameters
     IF ( TRIM( mixing_length_1d ) /= 'as_in_3d_model'  .AND. &
          TRIM( mixing_length_1d ) /= 'blackadar' )  THEN
-       IF ( myid == 0 )  PRINT*, '+++ check_parameters: mixing_length_1d = "', &
-                                 TRIM( mixing_length_1d ), '" is unknown'
-       CALL local_stop
+       message_string = 'mixing_length_1d = "' // TRIM( mixing_length_1d ) // &
+                        '" is unknown'
+       CALL handle_palm_message( 'check_parameters', 'PA0137', 1, 2, 0, 6, 0 )
     ENDIF
     IF ( TRIM( dissipation_1d ) /= 'as_in_3d_model'  .AND. &
          TRIM( dissipation_1d ) /= 'detering' )  THEN
-       IF ( myid == 0 )  PRINT*, '+++ check_parameters: dissipation_1d = "', &
-                                 TRIM( dissipation_1d ), '" is unknown'
-       CALL local_stop
+       message_string = 'dissipation_1d = "' // TRIM( dissipation_1d ) // &
+                        '" is unknown'
+       CALL handle_palm_message( 'check_parameters', 'PA0138', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -3027,11 +2880,9 @@
 !--    MPP_TREMAIN gives the remaining CPU time only in steps of 30 seconds
        IF ( termination_time_needed <= 30.0 )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:  termination_time_needed', &
-                      termination_time_needed
-             PRINT*, '                       must be > 30.0 on host "', host, &
-                     '"'
-          ENDIF
-          CALL local_stop
+          WRITE( message_string, * )  'termination_time_needed = ', &
+                 termination_time_needed, ' must be > 30.0 on host "', &
+                 TRIM( host ), '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0139', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
     ELSEIF ( host(1:3) == 'ibm' )  THEN
@@ -3041,10 +2892,9 @@
 !--    copying of files, etc.) has to be regarded
        IF ( termination_time_needed < 300.0 )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ WARNING: check_parameters:  termination_time_',  &
-                         'needed', termination_time_needed
-             PRINT*, '                                should be >= 300.0', &
-                         ' on host "', host, '"'
-          ENDIF
+          WRITE( message_string, * )  'termination_time_needed = ', &
+                 termination_time_needed, ' should be >= 300.0 on host "', &
+                 TRIM( host ), '"'
+          CALL handle_palm_message( 'check_parameters', 'PA0140', 1, 2, 0, 6, &
+                                    0 )
        ENDIF
     ENDIF
Index: palm/trunk/SOURCE/data_output_2d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_2d.f90	(revision 214)
+++ palm/trunk/SOURCE/data_output_2d.f90	(revision 215)
@@ -4,5 +4,6 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Bugfix: zero output of particle concentration and radius unless particles
+! have been started
 !
 ! Former revisions:
@@ -215,6 +216,10 @@
              CASE ( 'pc_xy', 'pc_xz', 'pc_yz' )  ! particle concentration
                 IF ( av == 0 )  THEN
-                   tend = prt_count
-                   CALL exchange_horiz( tend )
+                   IF ( simulated_time >= particle_advection_start )  THEN
+                      tend = prt_count
+                      CALL exchange_horiz( tend )
+                   ELSE
+                      tend = 0.0
+                   ENDIF
                    DO  i = nxl-1, nxr+1
                       DO  j = nys-1, nyn+1
@@ -232,24 +237,28 @@
              CASE ( 'pr_xy', 'pr_xz', 'pr_yz' )  ! mean particle radius
                 IF ( av == 0 )  THEN
-                   DO  i = nxl, nxr
-                      DO  j = nys, nyn
-                         DO  k = nzb, nzt+1
-                            psi = prt_start_index(k,j,i)
-                            s_r3 = 0.0
-                            s_r4 = 0.0
-                            DO  n = psi, psi+prt_count(k,j,i)-1
-                               s_r3 = s_r3 + particles(n)%radius**3
-                               s_r4 = s_r4 + particles(n)%radius**4
+                   IF ( simulated_time >= particle_advection_start )  THEN
+                      DO  i = nxl, nxr
+                         DO  j = nys, nyn
+                            DO  k = nzb, nzt+1
+                               psi = prt_start_index(k,j,i)
+                               s_r3 = 0.0
+                               s_r4 = 0.0
+                               DO  n = psi, psi+prt_count(k,j,i)-1
+                                  s_r3 = s_r3 + particles(n)%radius**3
+                                  s_r4 = s_r4 + particles(n)%radius**4
+                               ENDDO
+                               IF ( s_r3 /= 0.0 )  THEN
+                                  mean_r = s_r4 / s_r3
+                               ELSE
+                                  mean_r = 0.0
+                               ENDIF
+                               tend(k,j,i) = mean_r
                             ENDDO
-                            IF ( s_r3 /= 0.0 )  THEN
-                               mean_r = s_r4 / s_r3
-                            ELSE
-                               mean_r = 0.0
-                            ENDIF
-                            tend(k,j,i) = mean_r
                          ENDDO
                       ENDDO
-                   ENDDO
-                   CALL exchange_horiz( tend )
+                      CALL exchange_horiz( tend )
+                   ELSE
+                      tend = 0.0
+                   ENDIF
                    DO  i = nxl-1, nxr+1
                       DO  j = nys-1, nyn+1
Index: palm/trunk/SOURCE/palm.f90
===================================================================
--- palm/trunk/SOURCE/palm.f90	(revision 214)
+++ palm/trunk/SOURCE/palm.f90	(revision 215)
@@ -112,6 +112,8 @@
     WRITE(9,*) '*** coupling_mode = "', TRIM( coupling_mode ), '"'
     CALL LOCAL_FLUSH( 9 )
-    PRINT*, '*** PE', myid, ' Global target PE:', target_id, &
-            TRIM( coupling_mode )
+    IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
+       PRINT*, '*** PE', myid, ' Global target PE:', target_id, &
+               TRIM( coupling_mode )
+    ENDIF
 #endif
 
