Index: /palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- /palm/trunk/SOURCE/check_parameters.f90	(revision 1424)
+++ /palm/trunk/SOURCE/check_parameters.f90	(revision 1425)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! bugfix: perturbation domain modified for parallel random number generator
 ! 
 ! Former revisions:
@@ -2427,5 +2427,5 @@
                 hom(:,2,53,:) = SPREAD( zw, 2, statistic_regions+1 )
              ELSE
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for cloud_physics = .FALSE. an&' // &
@@ -2436,5 +2436,5 @@
           CASE ( 'ql' )
              IF ( .NOT. cloud_physics  .AND.  .NOT. cloud_droplets )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for cloud_physics = .FALSE. or'  // &
@@ -2495,5 +2495,5 @@
           CASE ( 'rho' )
              IF ( .NOT. ocean ) THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for ocean = .FALSE.'
@@ -2513,5 +2513,5 @@
           CASE ( 'w"sa"' )
              IF ( .NOT. ocean ) THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for ocean = .FALSE.'
@@ -2525,5 +2525,5 @@
           CASE ( 'w*sa*' )
              IF ( .NOT. ocean ) THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for ocean = .FALSE.'
@@ -2537,5 +2537,5 @@
           CASE ( 'wsa' )
              IF ( .NOT. ocean ) THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for ocean = .FALSE.'
@@ -2559,5 +2559,5 @@
           CASE ( 'q*2' )
              IF ( .NOT. humidity )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for humidity = .FALSE.'
@@ -2571,5 +2571,5 @@
           CASE ( 'prho' )
              IF ( .NOT. ocean ) THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for ocean = .FALSE.'
@@ -2588,15 +2588,15 @@
           CASE ( 'nr' )
              IF ( .NOT. cloud_physics )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for cloud_physics = .FALSE.'
                 CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
              ELSEIF ( icloud_scheme /= 0 )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for cloud_scheme /= seifert_beheng'
                 CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 )
              ELSEIF ( .NOT. precipitation )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for precipitation = .FALSE.'
@@ -2610,15 +2610,15 @@
           CASE ( 'qr' )
              IF ( .NOT. cloud_physics )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for cloud_physics = .FALSE.'
                 CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
              ELSEIF ( icloud_scheme /= 0 )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for cloud_scheme /= seifert_beheng'
                 CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 )
              ELSEIF ( .NOT. precipitation )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for precipitation = .FALSE.'
@@ -2632,10 +2632,10 @@
           CASE ( 'qc' )
              IF ( .NOT. cloud_physics )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for cloud_physics = .FALSE.'
                 CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
              ELSEIF ( icloud_scheme /= 0 )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for cloud_scheme /= seifert_beheng'
@@ -2649,15 +2649,15 @@
           CASE ( 'prr' )
              IF ( .NOT. cloud_physics )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for cloud_physics = .FALSE.'
                 CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
              ELSEIF ( icloud_scheme /= 0 )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for cloud_scheme /= seifert_beheng'
                 CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 )
              ELSEIF ( .NOT. precipitation )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for precipitation = .FALSE.'
@@ -2682,5 +2682,5 @@
           CASE ( 'w_subs' )
              IF ( .NOT. large_scale_subsidence )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for large_scale_subsidence = .FALSE.'
@@ -2694,5 +2694,5 @@
           CASE ( 'td_lsa_lpt' )
              IF ( .NOT. large_scale_forcing )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for large_scale_forcing = .FALSE.'
@@ -2706,5 +2706,5 @@
           CASE ( 'td_lsa_q' )
              IF ( .NOT. large_scale_forcing )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for large_scale_forcing = .FALSE.'
@@ -2718,5 +2718,5 @@
           CASE ( 'td_sub_lpt' )
              IF ( .NOT. large_scale_forcing )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for large_scale_forcing = .FALSE.'
@@ -2730,5 +2730,5 @@
           CASE ( 'td_sub_q' )
              IF ( .NOT. large_scale_forcing )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for large_scale_forcing = .FALSE.'
@@ -2742,5 +2742,5 @@
           CASE ( 'td_nud_lpt' )
              IF ( .NOT. nudging )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for nudging = .FALSE.'
@@ -2754,5 +2754,5 @@
           CASE ( 'td_nud_q' )
              IF ( .NOT. nudging )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for nudging = .FALSE.'
@@ -2766,5 +2766,5 @@
           CASE ( 'td_nud_u' )
              IF ( .NOT. nudging )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for nudging = .FALSE.'
@@ -2778,5 +2778,5 @@
           CASE ( 'td_nud_v' )
              IF ( .NOT. nudging )  THEN
-                message_string = 'data_output_pr = ' // &
+                message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for nudging = .FALSE.'
@@ -2795,10 +2795,10 @@
              IF ( unit == 'illegal' )  THEN
                 IF ( data_output_pr_user(1) /= ' ' )  THEN
-                   message_string = 'illegal value for data_output_pr or ' // &
-                                    'data_output_pr_user = "' // &
+                   message_string = 'illegal value for data_output_pr or ' //  &
+                                    'data_output_pr_user = "' //               &
                                     TRIM( data_output_pr(i) ) // '"'
                    CALL message( 'check_parameters', 'PA0097', 1, 2, 0, 6, 0 )
                 ELSE
-                   message_string = 'illegal value for data_output_pr = "' // &
+                   message_string = 'illegal value for data_output_pr = "' //  &
                                     TRIM( data_output_pr(i) ) // '"'
                    CALL message( 'check_parameters', 'PA0098', 1, 2, 0, 6, 0 )
@@ -2851,6 +2851,6 @@
        var = data_output(i)(1:ilen)
        IF ( ilen > 3 )  THEN
-          IF ( data_output(i)(ilen-2:ilen) == '_xy'  .OR. &
-               data_output(i)(ilen-2:ilen) == '_xz'  .OR. &
+          IF ( data_output(i)(ilen-2:ilen) == '_xy'  .OR.                      &
+               data_output(i)(ilen-2:ilen) == '_xz'  .OR.                      &
                data_output(i)(ilen-2:ilen) == '_yz' )  THEN
              k = 1                                             ! 2d data
@@ -2864,5 +2864,5 @@
           CASE ( 'e' )
              IF ( constant_diffusion )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res constant_diffusion = .FALSE.'
                 CALL message( 'check_parameters', 'PA0103', 1, 2, 0, 6, 0 )
@@ -2872,5 +2872,5 @@
           CASE ( 'lpt' )
              IF ( .NOT. cloud_physics )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                          'res cloud_physics = .TRUE.'
                 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
@@ -2880,9 +2880,9 @@
           CASE ( 'nr' )
              IF ( .NOT. cloud_physics )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                          'res cloud_physics = .TRUE.'
                 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
              ELSEIF ( icloud_scheme /= 0 )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                          'res cloud_scheme = seifert_beheng'
                 CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
@@ -2901,13 +2901,13 @@
           CASE ( 'prr' )
              IF ( .NOT. cloud_physics )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                          'res cloud_physics = .TRUE.'
                 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
              ELSEIF ( icloud_scheme /= 0 )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                          'res cloud_scheme = seifert_beheng'
                 CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
              ELSEIF ( .NOT. precipitation )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res precipitation = .TRUE.'
                 CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 )
@@ -2917,5 +2917,5 @@
           CASE ( 'q', 'vpt' )
              IF ( .NOT. humidity )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res humidity = .TRUE.'
                 CALL message( 'check_parameters', 'PA0105', 1, 2, 0, 6, 0 )
@@ -2926,9 +2926,9 @@
           CASE ( 'qc' )
              IF ( .NOT. cloud_physics )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                          'res cloud_physics = .TRUE.'
                 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
              ELSEIF ( icloud_scheme /= 0 ) THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                          'res cloud_scheme = seifert_beheng'
                 CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
@@ -2938,5 +2938,5 @@
           CASE ( 'ql' )
              IF ( .NOT. ( cloud_physics  .OR.  cloud_droplets ) )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                          'res cloud_physics = .TRUE. or cloud_droplets = .TRUE.'
                 CALL message( 'check_parameters', 'PA0106', 1, 2, 0, 6, 0 )
@@ -2946,5 +2946,5 @@
           CASE ( 'ql_c', 'ql_v', 'ql_vp' )
              IF ( .NOT. cloud_droplets )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res cloud_droplets = .TRUE.'
                 CALL message( 'check_parameters', 'PA0107', 1, 2, 0, 6, 0 )
@@ -2956,13 +2956,13 @@
           CASE ( 'qr' )
              IF ( .NOT. cloud_physics )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                          'res cloud_physics = .TRUE.'
                 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
              ELSEIF ( icloud_scheme /= 0 ) THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                          'res cloud_scheme = seifert_beheng'
                 CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
              ELSEIF ( .NOT. precipitation )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res precipitation = .TRUE.'
                 CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 )
@@ -2972,5 +2972,5 @@
           CASE ( 'qv' )
              IF ( .NOT. cloud_physics )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res cloud_physics = .TRUE.'
                 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
@@ -2980,5 +2980,5 @@
           CASE ( 'rho' )
              IF ( .NOT. ocean )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res ocean = .TRUE.'
                 CALL message( 'check_parameters', 'PA0109', 1, 2, 0, 6, 0 )
@@ -2988,5 +2988,5 @@
           CASE ( 's' )
              IF ( .NOT. passive_scalar )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res passive_scalar = .TRUE.'
                 CALL message( 'check_parameters', 'PA0110', 1, 2, 0, 6, 0 )
@@ -2996,5 +2996,5 @@
           CASE ( 'sa' )
              IF ( .NOT. ocean )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res ocean = .TRUE.'
                 CALL message( 'check_parameters', 'PA0109', 1, 2, 0, 6, 0 )
@@ -3004,31 +3004,31 @@
           CASE ( 'u*', 't*', 'lwp*', 'pra*', 'prr*', 'qsws*', 'shf*', 'z0*', 'z0h*' )
              IF ( k == 0  .OR.  data_output(i)(ilen-2:ilen) /= '_xy' )  THEN
-                message_string = 'illegal value for data_output: "' // &
-                                 TRIM( var ) // '" & only 2d-horizontal ' // &
+                message_string = 'illegal value for data_output: "' //         &
+                                 TRIM( var ) // '" & only 2d-horizontal ' //   &
                                  'cross sections are allowed for this value'
                 CALL message( 'check_parameters', 'PA0111', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'lwp*'  .AND.  .NOT. cloud_physics )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res cloud_physics = .TRUE.'
                 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'pra*'  .AND.  .NOT. precipitation )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res precipitation = .TRUE.'
                 CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'pra*'  .AND.  j == 1 )  THEN
-                message_string = 'temporal averaging of precipitation ' // &
+                message_string = 'temporal averaging of precipitation ' //     &
                           'amount "' // TRIM( var ) // '" is not possible'
                 CALL message( 'check_parameters', 'PA0113', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'prr*'  .AND.  .NOT. precipitation )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res precipitation = .TRUE.'
                 CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'qsws*'  .AND.  .NOT. humidity )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res humidity = .TRUE.'
                 CALL message( 'check_parameters', 'PA0322', 1, 2, 0, 6, 0 )
@@ -3059,9 +3059,9 @@
              IF ( unit == 'illegal' )  THEN
                 IF ( data_output_user(1) /= ' ' )  THEN
-                   message_string = 'illegal value for data_output or ' // &
+                   message_string = 'illegal value for data_output or ' //     &
                          'data_output_user = "' // TRIM( data_output(i) ) // '"'
                    CALL message( 'check_parameters', 'PA0114', 1, 2, 0, 6, 0 )
                 ELSE
-                   message_string = 'illegal value for data_output =' // &
+                   message_string = 'illegal value for data_output =' //       &
                                     TRIM( data_output(i) ) // '"'
                    CALL message( 'check_parameters', 'PA0115', 1, 2, 0, 6, 0 )
@@ -3139,5 +3139,5 @@
     IF ( z_max_do2d == -1.0_wp )  z_max_do2d = zu(nzt)
     IF ( z_max_do2d < zu(nzb+1)  .OR.  z_max_do2d > zu(nzt) )  THEN
-       WRITE( message_string, * )  'z_max_do2d = ', z_max_do2d, &
+       WRITE( message_string, * )  'z_max_do2d = ', z_max_do2d,                &
                     ' must be >= ', zu(nzb+1), '(zu(nzb+1)) and <= ', zu(nzt), &
                     ' (zu(nzt))'
@@ -3184,5 +3184,5 @@
 !-- Check mask conditions
     DO mid = 1, max_masks
-       IF ( data_output_masks(mid,1) /= ' ' .OR.   &
+       IF ( data_output_masks(mid,1) /= ' ' .OR.                               &
             data_output_masks_user(mid,1) /= ' ' ) THEN
           masks = masks + 1
@@ -3191,5 +3191,5 @@
     
     IF ( masks < 0 .OR. masks > max_masks )  THEN
-       WRITE( message_string, * )  'illegal value: masks must be >= 0 and ', &
+       WRITE( message_string, * )  'illegal value: masks must be >= 0 and ',   &
             '<= ', max_masks, ' (=max_masks)'
        CALL message( 'check_parameters', 'PA0325', 1, 2, 0, 6, 0 )
@@ -3200,6 +3200,6 @@
        mask_scale(3) = mask_scale_z
        IF ( ANY( mask_scale <= 0.0_wp ) )  THEN
-          WRITE( message_string, * )  &
-               'illegal value: mask_scale_x, mask_scale_y and mask_scale_z', &
+          WRITE( message_string, * )                                           &
+               'illegal value: mask_scale_x, mask_scale_y and mask_scale_z',   &
                'must be > 0.0'
           CALL message( 'check_parameters', 'PA0326', 1, 2, 0, 6, 0 )
@@ -3232,6 +3232,6 @@
        CONTINUE
 #else
-       message_string = 'netCDF: netCDF4 format requested but no ' // &
-                        'cpp-directive __netcdf4 given & switch '  // &
+       message_string = 'netCDF: netCDF4 format requested but no ' //          &
+                        'cpp-directive __netcdf4 given & switch '  //          &
                         'back to 64-bit offset format'
        CALL message( 'check_parameters', 'PA0171', 0, 1, 0, 6, 0 )
@@ -3260,5 +3260,5 @@
        ntdim_3d(0)    = INT( ( end_time - skip_time_do3d ) / dt_do3d )
        IF ( do3d_at_begin ) ntdim_3d(0) = ntdim_3d(0) + 1
-       ntdim_3d(1)    = INT( ( end_time - skip_time_data_output_av ) &
+       ntdim_3d(1)    = INT( ( end_time - skip_time_data_output_av )           &
                              / dt_data_output_av )
        ntdim_2d_xy(0) = INT( ( end_time - skip_time_do2d_xy ) / dt_do2d_xy )
@@ -3290,5 +3290,5 @@
        ELSE
           IF ( prandtl_number < 0.0_wp )  THEN
-             WRITE( message_string, * )  'prandtl_number = ', prandtl_number, &
+             WRITE( message_string, * )  'prandtl_number = ', prandtl_number,  &
                                          ' < 0.0'
              CALL message( 'check_parameters', 'PA0122', 1, 2, 0, 6, 0 )
@@ -3297,5 +3297,5 @@
 
           IF ( prandtl_layer )  THEN
-             message_string = 'prandtl_layer is not allowed with fixed ' // &
+             message_string = 'prandtl_layer is not allowed with fixed ' //    &
                               'value of km'
              CALL message( 'check_parameters', 'PA0123', 1, 2, 0, 6, 0 )
@@ -3308,5 +3308,6 @@
 !-- potential temperature, check the width of the damping layer
     IF ( bc_lr /= 'cyclic' ) THEN
-       IF ( pt_damping_width < 0.0_wp  .OR.  pt_damping_width > REAL( nx * dx ) )  THEN
+       IF ( pt_damping_width < 0.0_wp  .OR.                                    &
+            pt_damping_width > REAL( nx * dx ) )  THEN
           message_string = 'pt_damping_width out of range'
           CALL message( 'check_parameters', 'PA0124', 1, 2, 0, 6, 0 )
@@ -3315,5 +3316,6 @@
 
     IF ( bc_ns /= 'cyclic' )  THEN
-       IF ( pt_damping_width < 0.0_wp  .OR.  pt_damping_width > REAL( ny * dy ) )  THEN
+       IF ( pt_damping_width < 0.0_wp  .OR.                                    &
+            pt_damping_width > REAL( ny * dy ) )  THEN
           message_string = 'pt_damping_width out of range'
           CALL message( 'check_parameters', 'PA0124', 1, 2, 0, 6, 0 )
@@ -3324,7 +3326,17 @@
 !-- Check value range for rif
     IF ( rif_min >= rif_max )  THEN
-       WRITE( message_string, * )  'rif_min = ', rif_min, ' must be less ', &
+       WRITE( message_string, * )  'rif_min = ', rif_min, ' must be less ',    &
                                    'than rif_max = ', rif_max
        CALL message( 'check_parameters', 'PA0125', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check random generator
+    IF ( (random_generator /= 'system-specific'     .AND.                      &
+          random_generator /= 'random-parallel'   ) .AND.                      &
+          random_generator /= 'numerical-recipes' )  THEN
+       message_string = 'unknown random generator: random_generator = "' //    &
+                        TRIM( random_generator ) // '"'
+       CALL message( 'check_parameters', 'PA0135', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -3340,9 +3352,9 @@
        ENDIF
     ELSEIF ( disturbance_level_b < zu(3) )  THEN
-       WRITE( message_string, * )  'disturbance_level_b = ', &
+       WRITE( message_string, * )  'disturbance_level_b = ',                   &
                            disturbance_level_b, ' must be >= ', zu(3), '(zu(3))'
        CALL message( 'check_parameters', 'PA0126', 1, 2, 0, 6, 0 )
     ELSEIF ( disturbance_level_b > zu(nzt-2) )  THEN
-       WRITE( message_string, * )  'disturbance_level_b = ', &
+       WRITE( message_string, * )  'disturbance_level_b = ',                   &
                    disturbance_level_b, ' must be <= ', zu(nzt-2), '(zu(nzt-2))'
        CALL message( 'check_parameters', 'PA0127', 1, 2, 0, 6, 0 )
@@ -3365,10 +3377,10 @@
        ENDIF
     ELSEIF ( disturbance_level_t > zu(nzt-2) )  THEN
-       WRITE( message_string, * )  'disturbance_level_t = ', &
+       WRITE( message_string, * )  'disturbance_level_t = ',                   &
                    disturbance_level_t, ' must be <= ', zu(nzt-2), '(zu(nzt-2))'
        CALL message( 'check_parameters', 'PA0128', 1, 2, 0, 6, 0 )
     ELSEIF ( disturbance_level_t < disturbance_level_b )  THEN
-       WRITE( message_string, * )  'disturbance_level_t = ', &
-                   disturbance_level_t, ' must be >= disturbance_level_b = ', &
+       WRITE( message_string, * )  'disturbance_level_t = ',                   &
+                   disturbance_level_t, ' must be >= disturbance_level_b = ',  &
                    disturbance_level_b
        CALL message( 'check_parameters', 'PA0129', 1, 2, 0, 6, 0 )
@@ -3387,5 +3399,5 @@
 !-- z-direction.
     IF ( disturbance_level_ind_t < disturbance_level_ind_b )  THEN
-       WRITE( message_string, * )  'disturbance_level_ind_t = ', &
+       WRITE( message_string, * )  'disturbance_level_ind_t = ',               &
                 disturbance_level_ind_t, ' must be >= disturbance_level_b = ', &
                 disturbance_level_b
@@ -3398,6 +3410,5 @@
 !-- near the inflow and the perturbation area is further limited to ...(1)
 !-- after the initial phase of the flow.
-    dist_nxl = 0;  dist_nxr = nx
-    dist_nys = 0;  dist_nyn = ny
+    
     IF ( bc_lr /= 'cyclic' )  THEN
        IF ( inflow_disturbance_begin == -1 )  THEN
@@ -3436,17 +3447,38 @@
     ENDIF
 
-    IF ( bc_lr == 'radiation/dirichlet' )  THEN
-       dist_nxr    = nx - inflow_disturbance_begin
-       dist_nxl(1) = nx - inflow_disturbance_end
-    ELSEIF ( bc_lr == 'dirichlet/radiation' )  THEN
-       dist_nxl    = inflow_disturbance_begin
-       dist_nxr(1) = inflow_disturbance_end
-    ENDIF
-    IF ( bc_ns == 'dirichlet/radiation' )  THEN
-       dist_nyn    = ny - inflow_disturbance_begin
-       dist_nys(1) = ny - inflow_disturbance_end
-    ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
-       dist_nys    = inflow_disturbance_begin
-       dist_nyn(1) = inflow_disturbance_end
+    IF ( random_generator == 'random-parallel' )  THEN 
+       dist_nxl = nxl;  dist_nxr = nxr
+       dist_nys = nys;  dist_nyn = nyn
+       IF ( bc_lr == 'radiation/dirichlet' )  THEN
+          dist_nxr    = MIN( nx - inflow_disturbance_begin, nxr )
+          dist_nxl(1) = MAX( nx - inflow_disturbance_end, nxl )
+       ELSEIF ( bc_lr == 'dirichlet/radiation' )  THEN
+          dist_nxl    = MAX( inflow_disturbance_begin, nxl )
+          dist_nxr(1) = MIN( inflow_disturbance_end, nxr )
+       ENDIF
+       IF ( bc_ns == 'dirichlet/radiation' )  THEN
+          dist_nyn    = MIN( ny - inflow_disturbance_begin, nyn )
+          dist_nys(1) = MAX( ny - inflow_disturbance_end, nys )
+       ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
+          dist_nys    = MAX( inflow_disturbance_begin, nys )
+          dist_nyn(1) = MIN( inflow_disturbance_end, nyn )
+       ENDIF
+    ELSE
+       dist_nxl = 0;  dist_nxr = nx
+       dist_nys = 0;  dist_nyn = ny
+       IF ( bc_lr == 'radiation/dirichlet' )  THEN
+          dist_nxr    = nx - inflow_disturbance_begin
+          dist_nxl(1) = nx - inflow_disturbance_end
+       ELSEIF ( bc_lr == 'dirichlet/radiation' )  THEN
+          dist_nxl    = inflow_disturbance_begin
+          dist_nxr(1) = inflow_disturbance_end
+       ENDIF
+       IF ( bc_ns == 'dirichlet/radiation' )  THEN
+          dist_nyn    = ny - inflow_disturbance_begin
+          dist_nys(1) = ny - inflow_disturbance_end
+       ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
+          dist_nys    = inflow_disturbance_begin
+          dist_nyn(1) = inflow_disturbance_end
+       ENDIF
     ENDIF
 
@@ -3455,5 +3487,5 @@
 !-- boundary (so far, a turbulent inflow is realized from the left side only)
     IF ( turbulent_inflow  .AND.  bc_lr /= 'dirichlet/radiation' )  THEN
-       message_string = 'turbulent_inflow = .T. requires a Dirichlet ' // &
+       message_string = 'turbulent_inflow = .T. requires a Dirichlet ' //      &
                         'condition at the inflow boundary'
        CALL message( 'check_parameters', 'PA0133', 1, 2, 0, 6, 0 )
@@ -3465,5 +3497,5 @@
     IF ( turbulent_inflow  .AND.  initializing_actions /= 'cyclic_fill'  .AND. &
          initializing_actions /= 'read_restart_data' )  THEN
-       message_string = 'turbulent_inflow = .T. requires ' // &
+       message_string = 'turbulent_inflow = .T. requires ' //                  &
                         'initializing_actions = ''cyclic_fill'' '
        CALL message( 'check_parameters', 'PA0055', 1, 2, 0, 6, 0 )
@@ -3490,14 +3522,4 @@
 
 !
-!-- Check random generator
-    IF ( (random_generator /= 'system-specific'     .AND.                      &
-          random_generator /= 'random-parallel'   ) .AND.                      &
-          random_generator /= 'numerical-recipes' )  THEN
-       message_string = 'unknown random generator: random_generator = "' // &
-                        TRIM( random_generator ) // '"'
-       CALL message( 'check_parameters', 'PA0135', 1, 2, 0, 6, 0 )
-    ENDIF
-
-!
 !-- Determine damping level index for 1D model
     IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
@@ -3506,5 +3528,5 @@
           damp_level_ind_1d = nzt + 1
        ELSEIF ( damp_level_1d < 0.0_wp  .OR.  damp_level_1d > zu(nzt+1) )  THEN
-          WRITE( message_string, * )  'damp_level_1d = ', damp_level_1d, &
+          WRITE( message_string, * )  'damp_level_1d = ', damp_level_1d,       &
                  ' must be > 0.0 and < ', zu(nzt+1), '(zu(nzt+1))'
           CALL message( 'check_parameters', 'PA0136', 1, 2, 0, 6, 0 )
@@ -3521,13 +3543,13 @@
 !
 !-- Check some other 1d-model parameters
-    IF ( TRIM( mixing_length_1d ) /= 'as_in_3d_model'  .AND. &
+    IF ( TRIM( mixing_length_1d ) /= 'as_in_3d_model'  .AND.                   &
          TRIM( mixing_length_1d ) /= 'blackadar' )  THEN
-       message_string = 'mixing_length_1d = "' // TRIM( mixing_length_1d ) // &
+       message_string = 'mixing_length_1d = "' // TRIM( mixing_length_1d ) //  &
                         '" is unknown'
        CALL message( 'check_parameters', 'PA0137', 1, 2, 0, 6, 0 )
     ENDIF
-    IF ( TRIM( dissipation_1d ) /= 'as_in_3d_model'  .AND. &
+    IF ( TRIM( dissipation_1d ) /= 'as_in_3d_model'  .AND.                     &
          TRIM( dissipation_1d ) /= 'detering' )  THEN
-       message_string = 'dissipation_1d = "' // TRIM( dissipation_1d ) // &
+       message_string = 'dissipation_1d = "' // TRIM( dissipation_1d ) //      &
                         '" is unknown'
        CALL message( 'check_parameters', 'PA0138', 1, 2, 0, 6, 0 )
@@ -3565,6 +3587,6 @@
 !--    MPP_TREMAIN gives the remaining CPU time only in steps of 30 seconds
        IF ( termination_time_needed <= 30.0_wp )  THEN
-          WRITE( message_string, * )  'termination_time_needed = ', &
-                 termination_time_needed, ' must be > 30.0 on host "', &
+          WRITE( message_string, * )  'termination_time_needed = ',            &
+                 termination_time_needed, ' must be > 30.0 on host "',         &
                  TRIM( host ), '"'
           CALL message( 'check_parameters', 'PA0139', 1, 2, 0, 6, 0 )
@@ -3576,6 +3598,6 @@
 !--    copying of files, etc.) has to be regarded
        IF ( termination_time_needed < 300.0_wp )  THEN
-          WRITE( message_string, * )  'termination_time_needed = ', &
-                 termination_time_needed, ' should be >= 300.0 on host "', &
+          WRITE( message_string, * )  'termination_time_needed = ',            &
+                 termination_time_needed, ' should be >= 300.0 on host "',     &
                  TRIM( host ), '"'
           CALL message( 'check_parameters', 'PA0140', 1, 2, 0, 6, 0 )
@@ -3603,5 +3625,5 @@
     ENDIF
     IF ( ANY( dpdxy /= 0.0_wp ) .AND. .NOT. dp_external )  THEN
-       WRITE( message_string, * )  'dpdxy is nonzero but dp_external is ', &
+       WRITE( message_string, * )  'dpdxy is nonzero but dp_external is ',     &
             '.FALSE., i.e. the external pressure gradient & will not be applied'
        CALL message( 'check_parameters', 'PA0153', 0, 1, 0, 6, 0 )
@@ -3613,29 +3635,29 @@
 
        ELSEIF ( TRIM( conserve_volume_flow_mode ) /= 'initial_profiles' .AND.  &
-            TRIM( conserve_volume_flow_mode ) /= 'inflow_profile' .AND.  &
+            TRIM( conserve_volume_flow_mode ) /= 'inflow_profile' .AND.        &
             TRIM( conserve_volume_flow_mode ) /= 'bulk_velocity' )  THEN
-          WRITE( message_string, * )  'unknown conserve_volume_flow_mode: ', &
+          WRITE( message_string, * )  'unknown conserve_volume_flow_mode: ',   &
                conserve_volume_flow_mode
           CALL message( 'check_parameters', 'PA0154', 1, 2, 0, 6, 0 )
        ENDIF
-       IF ( (bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic')  .AND. &
+       IF ( (bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic')  .AND.                &
           TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
-          WRITE( message_string, * )  'non-cyclic boundary conditions ', &
+          WRITE( message_string, * )  'non-cyclic boundary conditions ',       &
                'require  conserve_volume_flow_mode = ''initial_profiles'''
           CALL message( 'check_parameters', 'PA0155', 1, 2, 0, 6, 0 )
        ENDIF
-       IF ( bc_lr == 'cyclic'  .AND.  bc_ns == 'cyclic'  .AND.  &
+       IF ( bc_lr == 'cyclic'  .AND.  bc_ns == 'cyclic'  .AND.                 &
             TRIM( conserve_volume_flow_mode ) == 'inflow_profile' )  THEN
-          WRITE( message_string, * )  'cyclic boundary conditions ', &
-               'require conserve_volume_flow_mode = ''initial_profiles''', &
+          WRITE( message_string, * )  'cyclic boundary conditions ',           &
+               'require conserve_volume_flow_mode = ''initial_profiles''',     &
                ' or ''bulk_velocity'''
           CALL message( 'check_parameters', 'PA0156', 1, 2, 0, 6, 0 )
        ENDIF
     ENDIF
-    IF ( ( u_bulk /= 0.0_wp .OR. v_bulk /= 0.0_wp ) .AND.  &
-         ( .NOT. conserve_volume_flow .OR.  &
+    IF ( ( u_bulk /= 0.0_wp .OR. v_bulk /= 0.0_wp ) .AND.                      &
+         ( .NOT. conserve_volume_flow .OR.                                     &
          TRIM( conserve_volume_flow_mode ) /= 'bulk_velocity' ) )  THEN
-       WRITE( message_string, * )  'nonzero bulk velocity requires ', &
-            'conserve_volume_flow = .T. and ', &
+       WRITE( message_string, * )  'nonzero bulk velocity requires ',          &
+            'conserve_volume_flow = .T. and ',                                 &
             'conserve_volume_flow_mode = ''bulk_velocity'''
        CALL message( 'check_parameters', 'PA0157', 1, 2, 0, 6, 0 )
@@ -3645,7 +3667,7 @@
 !-- Check particle attributes
     IF ( particle_color /= 'none' )  THEN
-       IF ( particle_color /= 'absuv'  .AND.  particle_color /= 'pt*'  .AND.  &
+       IF ( particle_color /= 'absuv'  .AND.  particle_color /= 'pt*'  .AND.   &
             particle_color /= 'z' )  THEN
-          message_string = 'illegal value for parameter particle_color: ' // &
+          message_string = 'illegal value for parameter particle_color: ' //   &
                            TRIM( particle_color)
           CALL message( 'check_parameters', 'PA0313', 1, 2, 0, 6, 0 )
@@ -3674,13 +3696,13 @@
 !-- Check nudging and large scale forcing from external file
     IF ( nudging .AND. ( .NOT. large_scale_forcing ) )  THEN
-       message_string = 'Nudging requires large_scale_forcing = .T.. &'// &
-                        'Surface fluxes and geostrophic wind should be &'// &
+       message_string = 'Nudging requires large_scale_forcing = .T.. &'//      &
+                        'Surface fluxes and geostrophic wind should be &'//    &
                         'prescribed in file LSF_DATA'
        CALL message( 'check_parameters', 'PA0374', 1, 2, 0, 6, 0 )
     ENDIF
 
-    IF ( large_scale_forcing .AND. ( bc_lr /= 'cyclic'  .OR. &
+    IF ( large_scale_forcing .AND. ( bc_lr /= 'cyclic'  .OR.                   &
                                     bc_ns /= 'cyclic' ) )  THEN
-       message_string = 'Non-cyclic lateral boundaries do not allow for &' // &
+       message_string = 'Non-cyclic lateral boundaries do not allow for &' //  &
                         'the usage of large scale forcing from external file.'
        CALL message( 'check_parameters', 'PA0375', 1, 2, 0, 6, 0 )
@@ -3688,5 +3710,5 @@
 
     IF ( large_scale_forcing .AND. ( .NOT. humidity ) )  THEN
-       message_string = 'The usage of large scale forcing from external &'//& 
+       message_string = 'The usage of large scale forcing from external &'//   & 
                         'file LSF_DATA requires humidity = .T..'
        CALL message( 'check_parameters', 'PA0376', 1, 2, 0, 6, 0 )
@@ -3694,5 +3716,5 @@
 
     IF ( large_scale_forcing .AND. topography /= 'flat' )  THEN
-       message_string = 'The usage of large scale forcing from external &'//& 
+       message_string = 'The usage of large scale forcing from external &'//   & 
                         'file LSF_DATA is not implemented for non-flat topography'
        CALL message( 'check_parameters', 'PA0377', 1, 2, 0, 6, 0 )
@@ -3700,5 +3722,5 @@
 
     IF ( large_scale_forcing .AND.  ocean  )  THEN
-       message_string = 'The usage of large scale forcing from external &'//& 
+       message_string = 'The usage of large scale forcing from external &'//   & 
                         'file LSF_DATA is not implemented for ocean runs'
        CALL message( 'check_parameters', 'PA0378', 1, 2, 0, 6, 0 )
Index: /palm/trunk/SOURCE/disturb_field.f90
===================================================================
--- /palm/trunk/SOURCE/disturb_field.f90	(revision 1424)
+++ /palm/trunk/SOURCE/disturb_field.f90	(revision 1425)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! bugfix: Parallel random number generator loop: print-statement no needed
 ! 
 ! Former revisions:
@@ -135,5 +135,4 @@
                 ENDIF
              ENDDO
-!              IF (myid == 0) PRINT*, nxl, i, nxr, i, nys, j, nyn, j
              CALL random_seed_parallel( get=seq_random_array(:, j, i) )
           ENDDO
