Index: palm/trunk/SOURCE/advec_particles.f90
===================================================================
--- palm/trunk/SOURCE/advec_particles.f90	(revision 482)
+++ palm/trunk/SOURCE/advec_particles.f90	(revision 519)
@@ -5,4 +5,5 @@
 ! -----------------
 ! TEST: PRINT statements on unit 9 (commented out)
+! NetCDF4 output format allows size of particle array to be extended
 !
 ! Former revisions:
@@ -1978,9 +1979,9 @@
           IF ( number_of_particles + number_of_initial_particles > &
                maximum_number_of_particles  )  THEN
-             IF ( netcdf_output )  THEN
+             IF ( netcdf_output  .AND.  netcdf_data_format < 3 )  THEN
                 message_string = 'maximum_number_of_particles ' //   &
                                  'needs to be increased ' //         &
                                  '&but this is not allowed with ' // &
-                                 'NetCDF output switched on'
+                                 'netcdf_data_format < 3'
                 CALL message( 'advec_particles', 'PA0146', 2, 2, -1, 6, 1 )
              ELSE
@@ -1998,9 +1999,9 @@
              IF ( number_of_tails + number_of_initial_tails > &
                   maximum_number_of_tails  )  THEN
-                IF ( netcdf_output )  THEN
+                IF ( netcdf_output  .AND.  netcdf_data_format < 3 )  THEN
                    message_string = 'maximum_number_of_tails ' //    &
                                     'needs to be increased ' //      &
                                     '&but this is not allowed wi' // &
-                                    'th NetCDF output switched on'
+                                    'th netcdf_data_format < 3'
                    CALL message( 'advec_particles', 'PA0147', 2, 2, -1, 6, 1 )
                 ELSE
@@ -2389,9 +2390,9 @@
                maximum_number_of_particles )           &
           THEN
-             IF ( netcdf_output )  THEN
+             IF ( netcdf_output  .AND.  netcdf_data_format < 3 )  THEN
                  message_string = 'maximum_number_of_particles ' //    &
                                   'needs to be increased ' //          &
                                   '&but this is not allowed with ' //  &
-                                  'NetCDF output switched on'
+                                  'netcdf-data_format < 3'
                 CALL message( 'advec_particles', 'PA0146', 2, 2, -1, 6, 1 )
              ELSE
@@ -2417,9 +2418,9 @@
              IF ( number_of_tails+trrpt_count_recv > maximum_number_of_tails ) &
              THEN
-                IF ( netcdf_output )  THEN
+                IF ( netcdf_output  .AND.  netcdf_data_format < 3 )  THEN
                    message_string = 'maximum_number_of_tails ' //   &
                                     'needs to be increased ' //     &
                                     '&but this is not allowed wi'// &
-                                    'th NetCDF output switched on'
+                                    'th netcdf_data_format < 3'
                    CALL message( 'advec_particles', 'PA0147', 2, 2, -1, 6, 1 )
                 ELSE
@@ -2466,9 +2467,9 @@
                maximum_number_of_particles )           &
           THEN
-             IF ( netcdf_output )  THEN
+             IF ( netcdf_output  .AND.  netcdf_data_format < 3 )  THEN
                 message_string = 'maximum_number_of_particles ' //  &
                                  'needs to be increased ' //        &
                                  '&but this is not allowed with '// &
-                                 'NetCDF output switched on'
+                                 'netcdf_data_format < 3'
                 CALL message( 'advec_particles', 'PA0146', 2, 2, -1, 6, 1 )
              ELSE
@@ -2494,9 +2495,9 @@
              IF ( number_of_tails+trlpt_count_recv > maximum_number_of_tails ) &
              THEN
-                IF ( netcdf_output )  THEN
+                IF ( netcdf_output  .AND.  netcdf_data_format < 3 )  THEN
                    message_string = 'maximum_number_of_tails ' //   &
                                     'needs to be increased ' //     &
                                     '&but this is not allowed wi'// &
-                                    'th NetCDF output switched on'
+                                    'th netcdf_data_format < 3'
                    CALL message( 'advec_particles', 'PA0147', 2, 2, -1, 6, 1 ) 
                 ELSE
@@ -2836,9 +2837,9 @@
                maximum_number_of_particles )           &
           THEN
-             IF ( netcdf_output )  THEN
+             IF ( netcdf_output  .AND.  netcdf_data_format < 3 )  THEN
                 message_string = 'maximum_number_of_particles ' //  &
                                  'needs to be increased ' //        &
                                  '&but this is not allowed with '// &
-                                 'NetCDF output switched on'
+                                 'netcdf_data_format < 3'
                 CALL message( 'advec_particles', 'PA0146', 2, 2, -1, 6, 1 ) 
              ELSE
@@ -2864,9 +2865,9 @@
              IF ( number_of_tails+trnpt_count_recv > maximum_number_of_tails ) &
              THEN
-                IF ( netcdf_output )  THEN
+                IF ( netcdf_output  .AND.  netcdf_data_format < 3 )  THEN
                    message_string = 'maximum_number_of_tails ' //    &
                                     'needs to be increased ' //      &
                                     '&but this is not allowed wi' // &
-                                    'th NetCDF output switched on'
+                                    'th netcdf_data_format < 3'
                    CALL message( 'advec_particles', 'PA0147', 2, 2, -1, 6, 1 ) 
                 ELSE
@@ -2914,9 +2915,9 @@
                maximum_number_of_particles )           &
           THEN
-             IF ( netcdf_output )  THEN
+             IF ( netcdf_output  .AND.  netcdf_data_format < 3 )  THEN
                 message_string = 'maximum_number_of_particles ' //   &
                                  'needs to be increased ' //         &
                                  '&but this is not allowed with ' // &
-                                 'NetCDF output switched on'
+                                 'netcdf_data_format < 3'
                CALL message( 'advec_particles', 'PA0146', 2, 2, -1, 6, 1 )  
              ELSE
@@ -2942,5 +2943,5 @@
              IF ( number_of_tails+trspt_count_recv > maximum_number_of_tails ) &
              THEN
-                IF ( netcdf_output )  THEN
+                IF ( netcdf_output  .AND.  netcdf_data_format < 3 )  THEN
                    message_string = 'maximum_number_of_tails ' //   &
                                     'needs to be increased ' //     &
