Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 550)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 553)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! masks is calculated and removed from inipar
 !
 ! Former revisions:
@@ -2680,4 +2680,10 @@
 !
 !-- Check mask conditions
+    DO mid = 1, max_masks
+       IF ( data_output_masks(mid,1) /= ' ') THEN
+          masks = masks + 1
+       ENDIF
+    ENDDO
+    
     IF ( masks < 0 .OR. masks > max_masks )  THEN
        WRITE( message_string, * )  'illegal value: masks must be >= 0 and ', &
Index: palm/trunk/SOURCE/init_masks.f90
===================================================================
--- palm/trunk/SOURCE/init_masks.f90	(revision 550)
+++ palm/trunk/SOURCE/init_masks.f90	(revision 553)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! parameters for masked output are replaced by arrays
 !
 ! Former revisions:
@@ -60,97 +60,20 @@
        CALL message( 'init_masks', 'PA9998', 1, 2, 0, 6, 0 )
     ENDIF
+
 !
 !-- Store data output parameters for masked data output in few shared arrays
-    do_mask( 1,:) = data_output_mask_01; do_mask( 2,:) = data_output_mask_02
-    do_mask( 3,:) = data_output_mask_03; do_mask( 4,:) = data_output_mask_04
-    do_mask( 5,:) = data_output_mask_05; do_mask( 6,:) = data_output_mask_06
-    do_mask( 7,:) = data_output_mask_07; do_mask( 8,:) = data_output_mask_08
-    do_mask( 9,:) = data_output_mask_09; do_mask(10,:) = data_output_mask_10
-    do_mask(11,:) = data_output_mask_11; do_mask(12,:) = data_output_mask_12
-    do_mask(13,:) = data_output_mask_13; do_mask(14,:) = data_output_mask_14
-    do_mask(15,:) = data_output_mask_15; do_mask(16,:) = data_output_mask_16
-    do_mask(17,:) = data_output_mask_17; do_mask(18,:) = data_output_mask_18
-    do_mask(19,:) = data_output_mask_19; do_mask(20,:) = data_output_mask_20
-    do_mask_user( 1,:) = data_output_mask_user_01
-    do_mask_user( 2,:) = data_output_mask_user_02
-    do_mask_user( 3,:) = data_output_mask_user_03
-    do_mask_user( 4,:) = data_output_mask_user_04
-    do_mask_user( 5,:) = data_output_mask_user_05
-    do_mask_user( 6,:) = data_output_mask_user_06
-    do_mask_user( 7,:) = data_output_mask_user_07
-    do_mask_user( 8,:) = data_output_mask_user_08
-    do_mask_user( 9,:) = data_output_mask_user_09
-    do_mask_user(10,:) = data_output_mask_user_10
-    do_mask_user(11,:) = data_output_mask_user_11
-    do_mask_user(12,:) = data_output_mask_user_12
-    do_mask_user(13,:) = data_output_mask_user_13
-    do_mask_user(14,:) = data_output_mask_user_14
-    do_mask_user(15,:) = data_output_mask_user_15
-    do_mask_user(16,:) = data_output_mask_user_16
-    do_mask_user(17,:) = data_output_mask_user_17
-    do_mask_user(18,:) = data_output_mask_user_18
-    do_mask_user(19,:) = data_output_mask_user_19
-    do_mask_user(20,:) = data_output_mask_user_20
-    mask( 1,1,:) = mask_01_x; mask( 2,1,:) = mask_02_x
-    mask( 3,1,:) = mask_03_x; mask( 4,1,:) = mask_04_x
-    mask( 5,1,:) = mask_05_x; mask( 6,1,:) = mask_06_x
-    mask( 7,1,:) = mask_07_x; mask( 8,1,:) = mask_08_x
-    mask( 9,1,:) = mask_09_x; mask(10,1,:) = mask_10_x
-    mask(11,1,:) = mask_11_x; mask(12,1,:) = mask_12_x
-    mask(13,1,:) = mask_13_x; mask(14,1,:) = mask_14_x
-    mask(15,1,:) = mask_15_x; mask(16,1,:) = mask_16_x
-    mask(17,1,:) = mask_17_x; mask(18,1,:) = mask_18_x
-    mask(19,1,:) = mask_19_x; mask(20,1,:) = mask_20_x
-    mask( 1,2,:) = mask_01_y; mask( 2,2,:) = mask_02_y
-    mask( 3,2,:) = mask_03_y; mask( 4,2,:) = mask_04_y
-    mask( 5,2,:) = mask_05_y; mask( 6,2,:) = mask_06_y
-    mask( 7,2,:) = mask_07_y; mask( 8,2,:) = mask_08_y
-    mask( 9,2,:) = mask_09_y; mask(10,2,:) = mask_10_y
-    mask(11,2,:) = mask_11_y; mask(12,2,:) = mask_12_y
-    mask(13,2,:) = mask_13_y; mask(14,2,:) = mask_14_y
-    mask(15,2,:) = mask_15_y; mask(16,2,:) = mask_16_y
-    mask(17,2,:) = mask_17_y; mask(18,2,:) = mask_18_y
-    mask(19,2,:) = mask_19_y; mask(20,2,:) = mask_20_y
-    mask( 1,3,:) = mask_01_z; mask( 2,3,:) = mask_02_z
-    mask( 3,3,:) = mask_03_z; mask( 4,3,:) = mask_04_z
-    mask( 5,3,:) = mask_05_z; mask( 6,3,:) = mask_06_z
-    mask( 7,3,:) = mask_07_z; mask( 8,3,:) = mask_08_z
-    mask( 9,3,:) = mask_09_z; mask(10,3,:) = mask_10_z
-    mask(11,3,:) = mask_11_z; mask(12,3,:) = mask_12_z
-    mask(13,3,:) = mask_13_z; mask(14,3,:) = mask_14_z
-    mask(15,3,:) = mask_15_z; mask(16,3,:) = mask_16_z
-    mask(17,3,:) = mask_17_z; mask(18,3,:) = mask_18_z
-    mask(19,3,:) = mask_19_z; mask(20,3,:) = mask_20_z
-    mask_loop( 1,1,:) = mask_01_x_loop; mask_loop( 2,1,:) = mask_02_x_loop
-    mask_loop( 3,1,:) = mask_03_x_loop; mask_loop( 4,1,:) = mask_04_x_loop
-    mask_loop( 5,1,:) = mask_05_x_loop; mask_loop( 6,1,:) = mask_06_x_loop
-    mask_loop( 7,1,:) = mask_07_x_loop; mask_loop( 8,1,:) = mask_08_x_loop
-    mask_loop( 9,1,:) = mask_09_x_loop; mask_loop(10,1,:) = mask_10_x_loop
-    mask_loop(11,1,:) = mask_11_x_loop; mask_loop(12,1,:) = mask_12_x_loop
-    mask_loop(13,1,:) = mask_13_x_loop; mask_loop(14,1,:) = mask_14_x_loop
-    mask_loop(15,1,:) = mask_15_x_loop; mask_loop(16,1,:) = mask_16_x_loop
-    mask_loop(17,1,:) = mask_17_x_loop; mask_loop(18,1,:) = mask_18_x_loop
-    mask_loop(19,1,:) = mask_19_x_loop; mask_loop(20,1,:) = mask_20_x_loop
-    mask_loop( 1,2,:) = mask_01_y_loop; mask_loop( 2,2,:) = mask_02_y_loop
-    mask_loop( 3,2,:) = mask_03_y_loop; mask_loop( 4,2,:) = mask_04_y_loop
-    mask_loop( 5,2,:) = mask_05_y_loop; mask_loop( 6,2,:) = mask_06_y_loop
-    mask_loop( 7,2,:) = mask_07_y_loop; mask_loop( 8,2,:) = mask_08_y_loop
-    mask_loop( 9,2,:) = mask_09_y_loop; mask_loop(10,2,:) = mask_10_y_loop
-    mask_loop(11,2,:) = mask_11_y_loop; mask_loop(12,2,:) = mask_12_y_loop
-    mask_loop(13,2,:) = mask_13_y_loop; mask_loop(14,2,:) = mask_14_y_loop
-    mask_loop(15,2,:) = mask_15_y_loop; mask_loop(16,2,:) = mask_16_y_loop
-    mask_loop(17,2,:) = mask_17_y_loop; mask_loop(18,2,:) = mask_18_y_loop
-    mask_loop(19,2,:) = mask_19_y_loop; mask_loop(20,2,:) = mask_20_y_loop
-    mask_loop( 1,3,:) = mask_01_z_loop; mask_loop( 2,3,:) = mask_02_z_loop
-    mask_loop( 3,3,:) = mask_03_z_loop; mask_loop( 4,3,:) = mask_04_z_loop
-    mask_loop( 5,3,:) = mask_05_z_loop; mask_loop( 6,3,:) = mask_06_z_loop
-    mask_loop( 7,3,:) = mask_07_z_loop; mask_loop( 8,3,:) = mask_08_z_loop
-    mask_loop( 9,3,:) = mask_09_z_loop; mask_loop(10,3,:) = mask_10_z_loop
-    mask_loop(11,3,:) = mask_11_z_loop; mask_loop(12,3,:) = mask_12_z_loop
-    mask_loop(13,3,:) = mask_13_z_loop; mask_loop(14,3,:) = mask_14_z_loop
-    mask_loop(15,3,:) = mask_15_z_loop; mask_loop(16,3,:) = mask_16_z_loop
-    mask_loop(17,3,:) = mask_17_z_loop; mask_loop(18,3,:) = mask_18_z_loop
-    mask_loop(19,3,:) = mask_19_z_loop; mask_loop(20,3,:) = mask_20_z_loop
+    DO mid = 1, masks
+       do_mask     (mid,:) = data_output_masks(mid,:)
+       do_mask_user(mid,:) = data_output_masks_user(mid,:)
+       mask      (mid,1,:) = mask_x(mid,:) 
+       mask      (mid,2,:) = mask_y(mid,:)
+       mask      (mid,3,:) = mask_z(mid,:) 
+       mask_loop (mid,1,:) = mask_x_loop(mid,:) 
+       mask_loop (mid,2,:) = mask_y_loop(mid,:) 
+       mask_loop (mid,3,:) = mask_z_loop(mid,:) 
+    ENDDO
+    
     mask_i = -1; mask_j = -1; mask_k = -1
+    
 !
 !-- Global arrays are required by define_netcdf_header.
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 550)
+++ palm/trunk/SOURCE/modules.f90	(revision 553)
@@ -5,5 +5,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! parameters for masked output are replaced by arrays
 !
 ! Former revisions:
@@ -346,25 +346,6 @@
     CHARACTER (LEN=11), DIMENSION(100) ::  data_output = ' ',    &
                                            data_output_user = ' ', doav = ' '
-    CHARACTER (LEN=10), DIMENSION(100) ::  &
-         data_output_mask_01      = ' ', data_output_mask_02      = ' ',  &
-         data_output_mask_03      = ' ', data_output_mask_04      = ' ',  &
-         data_output_mask_05      = ' ', data_output_mask_06      = ' ',  &
-         data_output_mask_07      = ' ', data_output_mask_08      = ' ',  &
-         data_output_mask_09      = ' ', data_output_mask_10      = ' ',  &
-         data_output_mask_11      = ' ', data_output_mask_12      = ' ',  &
-         data_output_mask_13      = ' ', data_output_mask_14      = ' ',  &
-         data_output_mask_15      = ' ', data_output_mask_16      = ' ',  &
-         data_output_mask_17      = ' ', data_output_mask_18      = ' ',  &
-         data_output_mask_19      = ' ', data_output_mask_20      = ' ',  &
-         data_output_mask_user_01 = ' ', data_output_mask_user_02 = ' ',  &
-         data_output_mask_user_03 = ' ', data_output_mask_user_04 = ' ',  &
-         data_output_mask_user_05 = ' ', data_output_mask_user_06 = ' ',  &
-         data_output_mask_user_07 = ' ', data_output_mask_user_08 = ' ',  &
-         data_output_mask_user_09 = ' ', data_output_mask_user_10 = ' ',  &
-         data_output_mask_user_11 = ' ', data_output_mask_user_12 = ' ',  &
-         data_output_mask_user_13 = ' ', data_output_mask_user_14 = ' ',  &
-         data_output_mask_user_15 = ' ', data_output_mask_user_16 = ' ',  &
-         data_output_mask_user_17 = ' ', data_output_mask_user_18 = ' ',  &
-         data_output_mask_user_19 = ' ', data_output_mask_user_20 = ' '
+    CHARACTER (LEN=10), DIMENSION(max_masks,100) ::  &
+         data_output_masks = ' ', data_output_masks_user = ' '
 
     CHARACTER (LEN=10), DIMENSION(300) ::  data_output_pr = ' '
@@ -565,81 +546,46 @@
     REAL, DIMENSION(:), ALLOCATABLE ::  dp_smooth_factor
 
-    REAL, DIMENSION(mask_xyz_dimension) ::  &
-       mask_01_x = -1.0, mask_02_x = -1.0, mask_03_x = -1.0, mask_04_x = -1.0, &
-       mask_05_x = -1.0, mask_06_x = -1.0, mask_07_x = -1.0, mask_08_x = -1.0, &
-       mask_09_x = -1.0, mask_10_x = -1.0, mask_11_x = -1.0, mask_12_x = -1.0, &
-       mask_13_x = -1.0, mask_14_x = -1.0, mask_15_x = -1.0, mask_16_x = -1.0, &
-       mask_17_x = -1.0, mask_18_x = -1.0, mask_19_x = -1.0, mask_20_x = -1.0, &
-       mask_01_y = -1.0, mask_02_y = -1.0, mask_03_y = -1.0, mask_04_y = -1.0, &
-       mask_05_y = -1.0, mask_06_y = -1.0, mask_07_y = -1.0, mask_08_y = -1.0, &
-       mask_09_y = -1.0, mask_10_y = -1.0, mask_11_y = -1.0, mask_12_y = -1.0, &
-       mask_13_y = -1.0, mask_14_y = -1.0, mask_15_y = -1.0, mask_16_y = -1.0, &
-       mask_17_y = -1.0, mask_18_y = -1.0, mask_19_y = -1.0, mask_20_y = -1.0, &
-       mask_01_z = -1.0, mask_02_z = -1.0, mask_03_z = -1.0, mask_04_z = -1.0, &
-       mask_05_z = -1.0, mask_06_z = -1.0, mask_07_z = -1.0, mask_08_z = -1.0, &
-       mask_09_z = -1.0, mask_10_z = -1.0, mask_11_z = -1.0, mask_12_z = -1.0, &
-       mask_13_z = -1.0, mask_14_z = -1.0, mask_15_z = -1.0, mask_16_z = -1.0, &
-       mask_17_z = -1.0, mask_18_z = -1.0, mask_19_z = -1.0, mask_20_z = -1.0
-    REAL, DIMENSION(3) ::  &
-       mask_01_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_02_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_03_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_04_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_05_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_06_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_07_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_08_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_09_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_10_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_11_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_12_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_13_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_14_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_15_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_16_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_17_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_18_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_19_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_20_x_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_01_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_02_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_03_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_04_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_05_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_06_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_07_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_08_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_09_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_10_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_11_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_12_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_13_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_14_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_15_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_16_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_17_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_18_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_19_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_20_y_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_01_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_02_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_03_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_04_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_05_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_06_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_07_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_08_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_09_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_10_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_11_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_12_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_13_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_14_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_15_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_16_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_17_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_18_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_19_z_loop = (/ -1.0, -1.0, 0.0 /), &
-       mask_20_z_loop = (/ -1.0, -1.0, 0.0 /)
+    REAL, DIMENSION(max_masks,mask_xyz_dimension) ::       &
+        mask_x = -1.0, mask_y = -1.0, mask_z = -1.0
+    REAL, DIMENSION(max_masks,3) ::                        &
+        mask_x_loop = (/ -1.0, -1.0, -1.0, -1.0, -1.0,     &  
+	                 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			  0.0,  0.0,  0.0,  0.0,  0.0,     &
+	                  0.0,  0.0,  0.0,  0.0,  0.0,     &
+			  0.0,  0.0,  0.0,  0.0,  0.0,     &
+			  0.0,  0.0,  0.0,  0.0,  0.0  /), &
+	
+	mask_y_loop = (/ -1.0, -1.0, -1.0, -1.0, -1.0,     &  
+	                 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			  0.0,  0.0,  0.0,  0.0,  0.0,     &
+	                  0.0,  0.0,  0.0,  0.0,  0.0,     &
+			  0.0,  0.0,  0.0,  0.0,  0.0,     &
+			  0.0,  0.0,  0.0,  0.0,  0.0  /), &
+			   
+	mask_z_loop = (/ -1.0, -1.0, -1.0, -1.0, -1.0,     &  
+	                 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			 -1.0, -1.0, -1.0, -1.0, -1.0,     &
+			  0.0,  0.0,  0.0,  0.0,  0.0,     &
+	                  0.0,  0.0,  0.0,  0.0,  0.0,     &
+			  0.0,  0.0,  0.0,  0.0,  0.0,     &
+			  0.0,  0.0,  0.0,  0.0,  0.0  /)  
+    
 !
 !--    internal mask arrays ("mask,dimension,selection")
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 550)
+++ palm/trunk/SOURCE/parin.f90	(revision 553)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! parameters for masked output are replaced by arrays
 !
 ! Former revisions:
@@ -117,5 +117,5 @@
              lad_vertical_gradient, lad_vertical_gradient_level, &
              leaf_surface_concentration, long_filter_factor, &
-             loop_optimization, mixing_length_1d, masks, momentum_advec, &
+             loop_optimization, mixing_length_1d, momentum_advec, &
              netcdf_precision, nsor_ini, nx, ny, &
              nz, ocean, omega, outflow_damping_width, overshoot_limit_e, &
@@ -151,14 +151,5 @@
                        cross_ts_uymin, cross_xtext, cycle_mg, data_output, &
                        data_output_format, &
-                       data_output_mask_01, data_output_mask_02, &
-                       data_output_mask_03, data_output_mask_04, &
-                       data_output_mask_05, data_output_mask_06, &
-                       data_output_mask_07, data_output_mask_08, &
-                       data_output_mask_09, data_output_mask_10, &
-                       data_output_mask_11, data_output_mask_12, &
-                       data_output_mask_13, data_output_mask_14, &
-                       data_output_mask_15, data_output_mask_16, &
-                       data_output_mask_17, data_output_mask_18, &
-                       data_output_mask_19, data_output_mask_20, &
+                       data_output_masks, &
                        data_output_pr, &
                        data_output_2d_on_each_pe, disturbance_amplitude, &
@@ -172,40 +163,6 @@
                        end_time, force_print_header, &
                        mask_scale_x, mask_scale_y, mask_scale_z, &
-                       mask_01_x, mask_02_x, mask_03_x, mask_04_x, &
-                       mask_05_x, mask_06_x, mask_07_x, mask_08_x, &
-                       mask_09_x, mask_10_x, mask_11_x, mask_12_x, &
-                       mask_13_x, mask_14_x, mask_15_x, mask_16_x, &
-                       mask_17_x, mask_18_x, mask_19_x, mask_20_x, &
-                       mask_01_y, mask_02_y, mask_03_y, mask_04_y, &
-                       mask_05_y, mask_06_y, mask_07_y, mask_08_y, &
-                       mask_09_y, mask_10_y, mask_11_y, mask_12_y, &
-                       mask_13_y, mask_14_y, mask_15_y, mask_16_y, &
-                       mask_17_y, mask_18_y, mask_19_y, mask_20_y, &
-                       mask_01_z, mask_02_z, mask_03_z, mask_04_z, &
-                       mask_05_z, mask_06_z, mask_07_z, mask_08_z, &
-                       mask_09_z, mask_10_z, mask_11_z, mask_12_z, &
-                       mask_13_z, mask_14_z, mask_15_z, mask_16_z, &
-                       mask_17_z, mask_18_z, mask_19_z, mask_20_z, &
-                       mask_01_x_loop, mask_02_x_loop, mask_03_x_loop, &
-                       mask_04_x_loop, mask_05_x_loop, mask_06_x_loop, &
-                       mask_07_x_loop, mask_08_x_loop, mask_09_x_loop, &
-                       mask_10_x_loop, mask_11_x_loop, mask_12_x_loop, &
-                       mask_13_x_loop, mask_14_x_loop, mask_15_x_loop, &
-                       mask_16_x_loop, mask_17_x_loop, mask_18_x_loop, &
-                       mask_19_x_loop, mask_20_x_loop, &
-                       mask_01_y_loop, mask_02_y_loop, mask_03_y_loop, &
-                       mask_04_y_loop, mask_05_y_loop, mask_06_y_loop, &
-                       mask_07_y_loop, mask_08_y_loop, mask_09_y_loop, &
-                       mask_10_y_loop, mask_11_y_loop, mask_12_y_loop, &
-                       mask_13_y_loop, mask_14_y_loop, mask_15_y_loop, &
-                       mask_16_y_loop, mask_17_y_loop, mask_18_y_loop, &
-                       mask_19_y_loop, mask_20_y_loop, &
-                       mask_01_z_loop, mask_02_z_loop, mask_03_z_loop, &
-                       mask_04_z_loop, mask_05_z_loop, mask_06_z_loop, &
-                       mask_07_z_loop, mask_08_z_loop, mask_09_z_loop, &
-                       mask_10_z_loop, mask_11_z_loop, mask_12_z_loop, &
-                       mask_13_z_loop, mask_14_z_loop, mask_15_z_loop, &
-                       mask_16_z_loop, mask_17_z_loop, mask_18_z_loop, &
-                       mask_19_z_loop, mask_20_z_loop, &
+                       mask_x, mask_y, mask_z,  &
+                       mask_x_loop, mask_y_loop, mask_z_loop, &
                        mg_cycles, mg_switch_to_pe0_level, &
                        netcdf_data_format, &
Index: palm/trunk/SOURCE/user_parin.f90
===================================================================
--- palm/trunk/SOURCE/user_parin.f90	(revision 550)
+++ palm/trunk/SOURCE/user_parin.f90	(revision 553)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! data_output_mask_user_* replaced by array data_output_masks_user
 !
 ! Former revisions:
@@ -39,14 +39,5 @@
 
     NAMELIST /userpar/  data_output_pr_user, data_output_user, region,  &
-                        data_output_mask_user_01, data_output_mask_user_02, &
-                        data_output_mask_user_03, data_output_mask_user_04, &
-                        data_output_mask_user_05, data_output_mask_user_06, &
-                        data_output_mask_user_07, data_output_mask_user_08, &
-                        data_output_mask_user_09, data_output_mask_user_10, &
-                        data_output_mask_user_11, data_output_mask_user_12, &
-                        data_output_mask_user_13, data_output_mask_user_14, &
-                        data_output_mask_user_15, data_output_mask_user_16, &
-                        data_output_mask_user_17, data_output_mask_user_18, &
-                        data_output_mask_user_19, data_output_mask_user_20
+                        data_output_masks_user
 
 !
