Index: /palm/trunk/SOURCE/lpm_init.f90
===================================================================
--- /palm/trunk/SOURCE/lpm_init.f90	(revision 2264)
+++ /palm/trunk/SOURCE/lpm_init.f90	(revision 2265)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Unused variables removed.
+! 
+! 2263 2017-06-08 14:59:01Z schwenkel
 ! Implemented splitting and merging algorithm
 ! 
@@ -177,24 +180,20 @@
         ONLY:   alloc_factor, bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,        &
                 block_offset, block_offset_def, collision_kernel,              &
-                curvature_solution_effects,                                    &
-                density_ratio, grid_particles, isf,i_splitting_mode,           &
-                initial_weighting_factor, ibc_par_b, ibc_par_lr, ibc_par_ns,   &
-                ibc_par_t, iran_part, log_z_z0,                                &
-                max_number_of_particle_groups, maximum_number_of_particles,    &
-                min_nr_particle, mpi_particle_type,                            &
-                number_concentration, number_particles_per_gridbox,            &
-                number_of_particles,                                           &
+                curvature_solution_effects, density_ratio, grid_particles,     &
+                isf,i_splitting_mode, initial_weighting_factor, ibc_par_b,     &
+                ibc_par_lr, ibc_par_ns, ibc_par_t, iran_part, log_z_z0,        &
+                max_number_of_particle_groups, min_nr_particle,                &
+                mpi_particle_type, number_concentration,                       &
+                number_particles_per_gridbox,  number_of_particles,            &
                 number_of_particle_groups, number_of_sublayers,                &
                 offset_ocean_nzt, offset_ocean_nzt_m1,                         &
                 particles, particle_advection_start, particle_groups,          &
                 particle_groups_type, particles_per_point,                     &
-                particle_type, pdx, pdy, pdz,                                  &
-                prt_count, psb, psl, psn, psr, pss, pst,                       &
-                radius, random_start_position, read_particles_from_restartfile,&
-                seed_follows_topography, sgs_wf_part, sort_count,              &
-                splitting_function, splitting_mode, total_number_of_particles,  &
-                use_sgs_for_particles,                                         &
-                write_particle_statistics, uniform_particles, zero_particle,   &
-                z0_av_global
+                particle_type, pdx, pdy, pdz,  prt_count, psb, psl, psn, psr,  & 
+                pss, pst, radius, random_start_position,                       &  
+                read_particles_from_restartfile, seed_follows_topography,      &
+                sgs_wf_part, sort_count, splitting_function, splitting_mode,   &
+                total_number_of_particles, use_sgs_for_particles,              &
+                write_particle_statistics, zero_particle, z0_av_global
 
     USE pegrid
@@ -532,5 +531,4 @@
                  grid_particles(nzb+1:nzt,nys:nyn,nxl:nxr) )
 
-       maximum_number_of_particles = 0
        number_of_particles         = 0
 
@@ -592,6 +590,5 @@
           CALL check_open( 80 )
           WRITE ( 80, 8000 )  current_timestep_number, simulated_time,         &
-                              number_of_particles,                             &
-                              maximum_number_of_particles
+                              number_of_particles                             
           CALL close_file( 80 )
        ENDIF
@@ -956,11 +953,8 @@
 
 !
-!-- Determine maximum number of particles (i.e., all possible particles that 
-!-- have been allocated) and the current number of particles
+!-- Determine the current number of particles
     DO  ip = nxl, nxr
        DO  jp = nys, nyn
           DO  kp = nzb+1, nzt
-             maximum_number_of_particles = maximum_number_of_particles         &
-                                           + SIZE(grid_particles(kp,jp,ip)%particles)
              number_of_particles         = number_of_particles                 &
                                            + prt_count(kp,jp,ip)
Index: /palm/trunk/SOURCE/lpm_read_restart_file.f90
===================================================================
--- /palm/trunk/SOURCE/lpm_read_restart_file.f90	(revision 2264)
+++ /palm/trunk/SOURCE/lpm_read_restart_file.f90	(revision 2265)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Unused variables removed.
+! 
+! 2101 2017-01-05 16:42:31Z suehring
 !
 ! 2000 2016-08-20 18:09:15Z knoop
@@ -70,8 +73,7 @@
     USE particle_attributes,                                                   &
         ONLY:  alloc_factor, bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,         &
-               grid_particles, maximum_number_of_particles,                    &
-               min_nr_particle, number_of_particles, number_of_particle_groups,&
-               particle_groups, particle_type, prt_count, time_prel,           &
-               time_write_particle_data, uniform_particles, zero_particle
+               grid_particles, min_nr_particle, number_of_particles,           &
+               number_of_particle_groups, particle_groups, particle_type,      &
+               prt_count, time_prel, time_write_particle_data, zero_particle
 
     USE pegrid
@@ -127,5 +129,5 @@
     READ ( 90 )  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,                  &
                  number_of_particle_groups, particle_groups, time_prel,     &
-                 time_write_particle_data, uniform_particles
+                 time_write_particle_data
 
     ALLOCATE( prt_count(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                     &
@@ -134,5 +136,4 @@
     READ ( 90 )  prt_count
 
-    maximum_number_of_particles = 0
     DO  ip = nxl, nxr
        DO  jp = nys, nyn
@@ -163,6 +164,4 @@
              ENDIF
 
-             maximum_number_of_particles = maximum_number_of_particles + alloc_size
-
           ENDDO
        ENDDO
Index: /palm/trunk/SOURCE/lpm_write_exchange_statistics.f90
===================================================================
--- /palm/trunk/SOURCE/lpm_write_exchange_statistics.f90	(revision 2264)
+++ /palm/trunk/SOURCE/lpm_write_exchange_statistics.f90	(revision 2265)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Unused variables removed.
+! 
+! 2101 2017-01-05 16:42:31Z suehring
 !
 ! 2000 2016-08-20 18:09:15Z knoop
@@ -68,6 +71,5 @@
 
     USE particle_attributes,                                                   &
-        ONLY:  grid_particles, maximum_number_of_particles,                    &
-               number_of_particles, prt_count,                                 &
+        ONLY:  grid_particles,  number_of_particles, prt_count,                &
                trlp_count_sum, trlp_count_recv_sum, trnp_count_sum,            &
                trnp_count_recv_sum, trrp_count_sum, trrp_count_recv_sum,       &
@@ -83,8 +85,6 @@
 
 !
-!-- Determine maximum number of particles (i.e., all possible particles that 
-!-- have been allocated) and the current number of particles
+!-- Determine the current number of particles
     number_of_particles         = 0
-    maximum_number_of_particles = 0
     DO  ip = nxl, nxr
        DO  jp = nys, nyn
@@ -92,6 +92,4 @@
              number_of_particles = number_of_particles                         &
                                      + prt_count(kp,jp,ip)
-             maximum_number_of_particles = maximum_number_of_particles         &
-                                     + SIZE(grid_particles(kp,jp,ip)%particles)
           ENDDO
        ENDDO
@@ -105,9 +103,9 @@
                         trrp_count_recv_sum, psouth, trsp_count_sum,     &
                         trsp_count_recv_sum, pnorth, trnp_count_sum,     &
-                        trnp_count_recv_sum, maximum_number_of_particles
+                        trnp_count_recv_sum
     CALL close_file( 80 )
 #else
     WRITE ( 80, 8000 )  current_timestep_number+1, simulated_time+dt_3d, &
-                        number_of_particles, maximum_number_of_particles
+                        number_of_particles
 #endif
 
Index: /palm/trunk/SOURCE/lpm_write_restart_file.f90
===================================================================
--- /palm/trunk/SOURCE/lpm_write_restart_file.f90	(revision 2264)
+++ /palm/trunk/SOURCE/lpm_write_restart_file.f90	(revision 2265)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Unused variables removed.
+! 
+! 2101 2017-01-05 16:42:31Z suehring
 !
 ! 2000 2016-08-20 18:09:15Z knoop
@@ -68,5 +71,5 @@
                number_of_particles, number_of_particle_groups,                 &
                particles, particle_groups, prt_count, time_prel,               &
-               time_write_particle_data, uniform_particles
+               time_write_particle_data
 
     USE pegrid
@@ -112,5 +115,5 @@
     WRITE ( 90 )  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,              &
                   number_of_particle_groups, particle_groups, time_prel, &
-                  time_write_particle_data, uniform_particles
+                  time_write_particle_data
 
     WRITE ( 90 )  prt_count
Index: /palm/trunk/SOURCE/mod_particle_attributes.f90
===================================================================
--- /palm/trunk/SOURCE/mod_particle_attributes.f90	(revision 2264)
+++ /palm/trunk/SOURCE/mod_particle_attributes.f90	(revision 2265)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Unused variables removed.
+! 
+! 2263 2017-06-08 14:59:01Z schwenkel
 ! Implemented splitting and merging algorithm
 ! 
@@ -94,5 +97,5 @@
 
     INTEGER(iwp) ::  deleted_particles = 0                        !< number of deleted particles per time step 
-    INTEGER(iwp) ::  dissipation_classes = 10                     !< number of dissipation classes
+    INTEGER(iwp) ::  dissipation_classes = 10                     !< namelist parameter (see documentation)
     INTEGER(iwp) ::  ibc_par_b                                    !< particle bottom boundary condition dummy
     INTEGER(iwp) ::  ibc_par_lr                                   !< particle left/right boundary condition dummy
@@ -102,24 +105,22 @@
     INTEGER(iwp) ::  isf                                          !< dummy for splitting function
     INTEGER(iwp) ::  i_splitting_mode                             !< dummy for splitting mode
-    INTEGER(iwp) ::  maximum_number_of_particles = 0              !< maximum number of particles on a PE (can be removed?)
-    INTEGER(iwp) ::  max_number_particles_per_gridbox = 30        !< maximum number of particles per gridbox (used in splitting algorithm)
+    INTEGER(iwp) ::  max_number_particles_per_gridbox = 30        !< namelist parameter (see documentation)
     INTEGER(iwp) ::  merge_drp = 0                                !< number of merged droplets
-    INTEGER(iwp) ::  min_nr_particle = 50                         !< minimum number of particles for which memory is allocated at every grid cell         
+    INTEGER(iwp) ::  min_nr_particle = 50                         !< namelist parameter (see documentation)         
     INTEGER(iwp) ::  mpi_particle_type                            !< parameter for particle PE particle exchange
     INTEGER(iwp) ::  new_particles = 0                            !< number of new particles
     INTEGER(iwp) ::  n_max = 100                                  !< number of radii bin for splitting functions     
     INTEGER(iwp) ::  number_of_particles = 0                      !< number of particles for each grid box (3d array is saved on prt_count)           
-    INTEGER(iwp) ::  number_of_particle_groups = 1                !< number of particle groups to be used            
+    INTEGER(iwp) ::  number_of_particle_groups = 1                !< namelist parameter (see documentation)            
     INTEGER(iwp) ::  number_of_sublayers = 20                     !< number of sublayers for particle velocities betwenn surface and first grid level         
-    INTEGER(iwp) ::  number_particles_per_gridbox = -1            !< number of particles which are created in every grid box            
+    INTEGER(iwp) ::  number_particles_per_gridbox = -1            !< namelist parameter (see documentation)          
     INTEGER(iwp) ::  offset_ocean_nzt = 0                         !< in case of oceans runs, the vertical index calculations need an offset         
     INTEGER(iwp) ::  offset_ocean_nzt_m1 = 0                      !< in case of oceans runs, the vertical index calculations need an offset
-    INTEGER(iwp) ::  particles_per_point = 1                      !< number of particles to be started per point
-    INTEGER(iwp) ::  particle_file_count = 0                      !< can be removed ?
-    INTEGER(iwp) ::  radius_classes = 20                          !< number of radius classes to be used in the collision efficiency table
+    INTEGER(iwp) ::  particles_per_point = 1                      !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  radius_classes = 20                          !< namelist parameter (see documentation)
     INTEGER(iwp) ::  sort_count = 0                               !< counter for sorting particles
-    INTEGER(iwp) ::  splitting_factor = 2                         !< splitting factor 
-    INTEGER(iwp) ::  splitting_factor_max = 5                     !< maximum splittig factor
-    INTEGER(iwp) ::  step_dealloc = 100                           !< number of timesteps after which particle memory is deallocated
+    INTEGER(iwp) ::  splitting_factor = 2                         !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  splitting_factor_max = 5                     !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  step_dealloc = 100                           !< namelist parameter (see documentation)
     INTEGER(iwp) ::  sum_merge_drp = 0                            !< sum of merged super droplets
     INTEGER(iwp) ::  sum_new_particles = 0                        !< sum of created particles (in splitting algorithm)
@@ -140,67 +141,65 @@
     LOGICAL ::  all_or_nothing = .FALSE.                  !< flag for collision algorithm
     LOGICAL ::  average_impact = .FALSE.                  !< flag for collision algortihm
-    LOGICAL ::  curvature_solution_effects = .FALSE.      !< parameter to consider solution and curvature effects on the equilibrium vapor pressure of cloud droplets                      
-    LOGICAL ::  deallocate_memory = .TRUE.                !< parameter to enable deallocation of unused memory                   
+    LOGICAL ::  curvature_solution_effects = .FALSE.      !< namelist parameter (see documentation)                     
+    LOGICAL ::  deallocate_memory = .TRUE.                !< namelist parameter (see documentation)                  
     LOGICAL ::  hall_kernel = .FALSE.                     !< flag for collision kernel
-    LOGICAL ::  init_aerosol_probabilistic = .FALSE.      !< parameter to steer the initialization of the aerosol spectrum
-    LOGICAL ::  merging = .FALSE.                         !< parameter to enable merging of super droplets
-    LOGICAL ::  monodisperse_aerosols = .FALSE.           !< parameter to steer the initialization of the aerosol spectrum
+    LOGICAL ::  init_aerosol_probabilistic = .FALSE.      !< namelist parameter (see documentation)
+    LOGICAL ::  merging = .FALSE.                         !< namelist parameter (see documentation)
+    LOGICAL ::  monodisperse_aerosols = .FALSE.           !< namelist parameter (see documentation)
     LOGICAL ::  particle_advection = .FALSE.              !< parameter to steer the advection of particles
-    LOGICAL ::  random_start_position = .FALSE.           !< parameter to initialize particles on random positon (within one grid box)                   
-    LOGICAL ::  read_particles_from_restartfile = .TRUE.  !< read particle data from the previous run                   
-    LOGICAL ::  seed_follows_topography = .FALSE.         !< heights of initial particles are interpreted relative to the given topography
-    LOGICAL ::  splitting = .FALSE.                       !< parameter to enable the splitting of super droplets
-    LOGICAL ::  uniform_particles = .TRUE.                !< can be removed?
+    LOGICAL ::  random_start_position = .FALSE.           !< namelist parameter (see documentation)                   
+    LOGICAL ::  read_particles_from_restartfile = .TRUE.  !< namelist parameter (see documentation)                   
+    LOGICAL ::  seed_follows_topography = .FALSE.         !< namelist parameter (see documentation)
+    LOGICAL ::  splitting = .FALSE.                       !< namelist parameter (see documentation)
     LOGICAL ::  use_kernel_tables = .FALSE.               !< parameter, which turns on the use of precalculated collision kernels
-    LOGICAL ::  use_sgs_for_particles = .FALSE.           !< parameter to use sgs velocities for particles 
+    LOGICAL ::  use_sgs_for_particles = .FALSE.           !< namelist parameter (see documentation) 
     LOGICAL ::  wang_kernel = .FALSE.                     !< flag for collision kernel
-    LOGICAL ::  write_particle_statistics = .FALSE.       !< switch on/off output of particle information (statistical information)
+    LOGICAL ::  write_particle_statistics = .FALSE.       !< namelist parameter (see documentation)
                 
     LOGICAL, DIMENSION(max_number_of_particle_groups) ::                       &
                 vertical_particle_advection = .TRUE.              !< Switch on/off vertical particle transport
 
-    REAL(wp) ::  alloc_factor = 20.0_wp                           !< memory allocated additionally to the memory needed for initial particles at a given grid cell
-    REAL(wp) ::  c_0 = 3.0_wp                                     !< parameter for lagrangian timescale
-    REAL(wp) ::  dt_min_part = 0.0002_wp                          !< minimum particle time step when SGS velocities are used (s)
-    REAL(wp) ::  dt_prel = 9999999.9_wp                           !< temporal interval at which particles are to be released from a particle source (in s)
-    REAL(wp) ::  dt_write_particle_data = 9999999.9_wp            !< temporal interval for output of particle data (in s)             
-    REAL(wp) ::  end_time_prel = 9999999.9_wp                     !< time of the last release of particles (in s).            
-    REAL(wp) ::  initial_weighting_factor = 1.0_wp                !< weighting factor used for initialization
-    REAL(wp) ::  molecular_weight_of_solute = 0.05844_wp          !< mol. m. NaCl (kg mol-1)
-    REAL(wp) ::  molecular_weight_of_water = 0.01801528_wp        !< mol. m. H2O (kg mol-1)
-    REAL(wp) ::  n1 = 100.0_wp                                    !< number concentration of the first log-normal distribution (dry aerosol initialization)
-    REAL(wp) ::  n2 = 0.0_wp                                      !< see n1
-    REAL(wp) ::  n3 = 0.0_wp                                      !< see n1 
-    REAL(wp) ::  number_concentration = -1.0_wp                   !< initial particle number concentration (in units of 1/cm^-3)
-    REAL(wp) ::  particle_advection_start = 0.0_wp                !< time of the first release of particles (in s).
-    REAL(wp) ::  radius_merge = 1.0E-7_wp                         !< particles with a smaller radius are merged if merging is set
-    REAL(wp) ::  radius_split = 40.0E-6_wp                        !< particles with a bigger radius are splitted if splittig is set
-    REAL(wp) ::  rho_s = 2165.0_wp                                !< density of NaCl (kg m-3) 
-    REAL(wp) ::  rm1 = 0.05E-6_wp                                 !< mode radius of the first log-normal distribution (dry aerosol initialization)
-    REAL(wp) ::  rm2 = 0.05E-6_wp                                 !< see rm1
-    REAL(wp) ::  rm3 = 0.05E-6_wp                                 !< see rm2
-    REAL(wp) ::  s1 = 2.0_wp                                      !< geometric standard deviation of the first log-normal distribution (dry aerosol initialization)
-    REAL(wp) ::  s2 = 2.0_wp                                      !< see s1 
-    REAL(wp) ::  s3 = 2.0_wp                                      !< see s1
-    REAL(wp) ::  sgs_wf_part                                      !< parameter for sgs 
-    REAL(wp) ::  time_prel = 0.0_wp                               !< time for particle release
-    REAL(wp) ::  time_sort_particles = 0.0_wp                     !< can be removed?
-    REAL(wp) ::  time_write_particle_data = 0.0_wp                !< write particle data at current time on file
-    REAL(wp) ::  vanthoff = 2.0_wp                                !< van't Hoff factor for NaCl
-    REAL(wp) ::  weight_factor_merge = -1.0_wp                    !< critical weighting factor for merging
-    REAL(wp) ::  weight_factor_split = -1.0_wp                    !< critical weighting factor for splitting
-    REAL(wp) ::  z0_av_global                                     !< horizontal mean value of z0
-
-    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  density_ratio = 9999999.9_wp  !< ratio of the density of the fluid and the density of the particles   
-    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pdx = 9999999.9_wp            !< distance along x between particles within a particle source (in m)
-    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pdy = 9999999.9_wp            !< distance along y between particles within a particle source (in m)
-    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pdz = 9999999.9_wp            !< distance along z between particles within a particle source (in m)
-    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  psb = 9999999.9_wp            !< bottom edge of a particle source (in m)
-    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  psl = 9999999.9_wp            !< left edge of a particle source (in m)
-    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  psn = 9999999.9_wp            !< rear ("north") edge of a particle source (in m)
-    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  psr = 9999999.9_wp            !< right edge of a particle source (in m). 
-    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pss = 9999999.9_wp            !< front ("south") edge of a particle source (in m). 
-    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pst = 9999999.9_wp            !< top edge of a particle source (in m).
-    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  radius = 9999999.9_wp         !< particle radius (in m).
+    REAL(wp) ::  alloc_factor = 20.0_wp                    !< namelist parameter (see documentation)
+    REAL(wp) ::  c_0 = 3.0_wp                              !< parameter for lagrangian timescale
+    REAL(wp) ::  dt_min_part = 0.0002_wp                   !< minimum particle time step when SGS velocities are used (s)
+    REAL(wp) ::  dt_prel = 9999999.9_wp                    !< namelist parameter (see documentation)
+    REAL(wp) ::  dt_write_particle_data = 9999999.9_wp     !< namelist parameter (see documentation)            
+    REAL(wp) ::  end_time_prel = 9999999.9_wp              !< namelist parameter (see documentation)         
+    REAL(wp) ::  initial_weighting_factor = 1.0_wp         !< namelist parameter (see documentation)
+    REAL(wp) ::  molecular_weight_of_solute = 0.05844_wp   !< mol. m. NaCl (kg mol-1)
+    REAL(wp) ::  molecular_weight_of_water = 0.01801528_wp !< mol. m. H2O (kg mol-1)
+    REAL(wp) ::  n1 = 100.0_wp                             !< namelist parameter (see documentation)
+    REAL(wp) ::  n2 = 0.0_wp                               !< namelist parameter (see documentation)
+    REAL(wp) ::  n3 = 0.0_wp                               !< namelist parameter (see documentation)
+    REAL(wp) ::  number_concentration = -1.0_wp            !< namelist parameter (see documentation)
+    REAL(wp) ::  particle_advection_start = 0.0_wp         !< namelist parameter (see documentation)
+    REAL(wp) ::  radius_merge = 1.0E-7_wp                  !< namelist parameter (see documentation)
+    REAL(wp) ::  radius_split = 40.0E-6_wp                 !< namelist parameter (see documentation)
+    REAL(wp) ::  rho_s = 2165.0_wp                         !< density of NaCl (kg m-3) 
+    REAL(wp) ::  rm1 = 0.05E-6_wp                          !< namelist parameter (see documentation)
+    REAL(wp) ::  rm2 = 0.05E-6_wp                          !< namelist parameter (see documentation)
+    REAL(wp) ::  rm3 = 0.05E-6_wp                          !< namelist parameter (see documentation)
+    REAL(wp) ::  s1 = 2.0_wp                               !< namelist parameter (see documentation)
+    REAL(wp) ::  s2 = 2.0_wp                               !< namelist parameter (see documentation) 
+    REAL(wp) ::  s3 = 2.0_wp                               !< namelist parameter (see documentation)
+    REAL(wp) ::  sgs_wf_part                               !< parameter for sgs 
+    REAL(wp) ::  time_prel = 0.0_wp                        !< time for particle release
+    REAL(wp) ::  time_write_particle_data = 0.0_wp         !< write particle data at current time on file
+    REAL(wp) ::  vanthoff = 2.0_wp                         !< van't Hoff factor for NaCl
+    REAL(wp) ::  weight_factor_merge = -1.0_wp             !< namelist parameter (see documentation)
+    REAL(wp) ::  weight_factor_split = -1.0_wp             !< namelist parameter (see documentation)
+    REAL(wp) ::  z0_av_global                              !< horizontal mean value of z0
+
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  density_ratio = 9999999.9_wp  !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pdx = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pdy = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pdz = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  psb = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  psl = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  psn = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  psr = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pss = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pst = 9999999.9_wp            !< namelist parameter (see documentation).
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  radius = 9999999.9_wp         !< namelist parameter (see documentation)
 
     REAL(wp), DIMENSION(:), ALLOCATABLE     ::  log_z_z0   !< Precalculate LOG(z/z0)
@@ -209,18 +208,40 @@
     TYPE particle_type
         SEQUENCE
-        REAL(wp)     ::  radius, age, age_m, dt_sum, user, e_m,                &
-                         origin_x, origin_y, origin_z, rvar1, rvar2, rvar3,    &
-                         speed_x, speed_y, speed_z, weight_factor, x, y, z
-        INTEGER(iwp) ::  class, group, id1, id2
-        LOGICAL      ::  particle_mask
-        INTEGER(iwp) ::  block_nr
+        REAL(wp)     ::  radius        !< radius of particle
+        REAL(wp)     ::  age           !< age of particle
+        REAL(wp)     ::  age_m         !<  
+        REAL(wp)     ::  dt_sum        !<
+        REAL(wp)     ::  user          !< varible for user
+        REAL(wp)     ::  e_m           !< interpolated sgs tke      
+        REAL(wp)     ::  origin_x      !< origin x-position of particle (changed cyclic bc)
+        REAL(wp)     ::  origin_y      !< origin y-position of particle (changed cyclic bc)
+        REAL(wp)     ::  origin_z      !< origin z-position of particle (changed cyclic bc)
+        REAL(wp)     ::  rvar1         !< 
+        REAL(wp)     ::  rvar2         !<
+        REAL(wp)     ::  rvar3         !< 
+        REAL(wp)     ::  speed_x       !< speed of particle in x
+        REAL(wp)     ::  speed_y       !< speed of particle in y
+        REAL(wp)     ::  speed_z       !< speed of particle in z
+        REAL(wp)     ::  weight_factor !< weighting factor  
+        REAL(wp)     ::  x             !< x-position 
+        REAL(wp)     ::  y             !< y-position 
+        REAL(wp)     ::  z             !< z-position 
+        INTEGER(iwp) ::  class         !< radius class needed for collision
+        INTEGER(iwp) ::  group         !< number of particle group
+        INTEGER(iwp) ::  id1           !< first part of particle id
+        INTEGER(iwp) ::  id2           !< second part of particle id
+        LOGICAL      ::  particle_mask !< if this parameter is set to false the particle will be deleted
+        INTEGER(iwp) ::  block_nr      !< number for sorting (removable?)
     END TYPE particle_type
 
-    TYPE(particle_type), DIMENSION(:), POINTER ::  particles
-    TYPE(particle_type)                        ::  zero_particle
+    TYPE(particle_type), DIMENSION(:), POINTER ::  particles       !< Particle array for this grid cell
+    TYPE(particle_type)                        ::  zero_particle   !< zero particle to avoid weird thinge
 
     TYPE particle_groups_type
         SEQUENCE
-        REAL(wp) ::  density_ratio, radius, exp_arg, exp_term
+        REAL(wp) ::  density_ratio  !< density ratio of the fluid and the particles
+        REAL(wp) ::  radius         !< radius of particle
+        REAL(wp) ::  exp_arg        !< exponential term of particle inertia
+        REAL(wp) ::  exp_term       !< exponential term of particle inertia
     END TYPE particle_groups_type
 
@@ -229,17 +250,17 @@
 
     TYPE  grid_particle_def
-        INTEGER(iwp), DIMENSION(0:7)               ::  start_index
-        INTEGER(iwp), DIMENSION(0:7)               ::  end_index
-        INTEGER(iwp)                               ::  id_counter
-        LOGICAL                                    ::  time_loop_done
-        TYPE(particle_type), POINTER, DIMENSION(:) ::  particles                !Particle array for this grid cell
+        INTEGER(iwp), DIMENSION(0:7)               ::  start_index        !< start particle index for current block
+        INTEGER(iwp), DIMENSION(0:7)               ::  end_index          !< end particle index for current block
+        INTEGER(iwp)                               ::  id_counter         !< particle id counter (removeable?)
+        LOGICAL                                    ::  time_loop_done     !< timestep loop for particle advection
+        TYPE(particle_type), POINTER, DIMENSION(:) ::  particles          !< Particle array for this grid cell
     END TYPE grid_particle_def
 
     TYPE(grid_particle_def), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  grid_particles
 
-    TYPE block_offset_def
-        INTEGER(iwp) ::  i_off
-        INTEGER(iwp) ::  j_off
-        INTEGER(iwp) ::  k_off
+    TYPE block_offset_def          !<
+        INTEGER(iwp) ::  i_off     !<
+        INTEGER(iwp) ::  j_off     !<
+        INTEGER(iwp) ::  k_off     !<
     END TYPE block_offset_def
 
Index: /palm/trunk/SOURCE/netcdf_interface_mod.f90
===================================================================
--- /palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 2264)
+++ /palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 2265)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Unused variables removed.
+! 
+! 2239 2017-06-01 12:04:51Z suehring
 ! Bugfix xy-output of land-surface variables
 ! 
@@ -498,5 +501,5 @@
 
     USE particle_attributes,                                                   &
-        ONLY:  maximum_number_of_particles, number_of_particle_groups
+        ONLY:  number_of_particle_groups
 
     USE plant_canopy_model_mod,                                                &
@@ -4884,15 +4887,7 @@
                                   312, 313, 000 )
 !
-!--       Define particle coordinate (maximum particle number)
-          IF ( netcdf_data_format < 3 )  THEN
-             CALL netcdf_create_dim( id_set_prt, 'particle_number',            &
-                                     maximum_number_of_particles,              &
-                                     id_dim_prtnum, 314 )
-          ELSE
-!
-!--          netCDF4 allows more than one unlimited dimension
-             CALL netcdf_create_dim( id_set_prt, 'particle_number',            &
-                                     NF90_UNLIMITED, id_dim_prtnum, 314 )
-          ENDIF
+!--       netCDF4 allows more than one unlimited dimension
+          CALL netcdf_create_dim( id_set_prt, 'particle_number',            &
+                                  NF90_UNLIMITED, id_dim_prtnum, 314 )
 
           CALL netcdf_create_var( id_set_prt, (/ id_dim_prtnum /),             &
Index: /palm/trunk/SOURCE/read_var_list.f90
===================================================================
--- /palm/trunk/SOURCE/read_var_list.f90	(revision 2264)
+++ /palm/trunk/SOURCE/read_var_list.f90	(revision 2265)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Unused variables removed.
+! 
+! 2259 2017-06-08 09:09:11Z gronemeier
 ! Implemented synthetic turbulence generator
 !
@@ -223,5 +226,5 @@
 
     USE particle_attributes,                                                   &
-        ONLY:  curvature_solution_effects, time_sort_particles
+        ONLY:  curvature_solution_effects
 
     USE pegrid
@@ -694,6 +697,4 @@
           CASE ( 'time_since_reference_point' )
              READ ( 13 )  time_since_reference_point
-          CASE ( 'time_sort_particles' )
-             READ ( 13 )  time_sort_particles
           CASE ( 'timestep_scheme' )
              READ ( 13 )  timestep_scheme
Index: /palm/trunk/SOURCE/write_var_list.f90
===================================================================
--- /palm/trunk/SOURCE/write_var_list.f90	(revision 2264)
+++ /palm/trunk/SOURCE/write_var_list.f90	(revision 2265)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Unused variables removed.
+! 
+! 2259 2017-06-08 09:09:11Z gronemeier
 ! Implemented synthetic turbulence generator
 !
@@ -198,5 +201,5 @@
 
     USE particle_attributes,                                                   &
-        ONLY:  curvature_solution_effects, time_sort_particles
+        ONLY:  curvature_solution_effects
 
     USE pegrid
@@ -606,6 +609,4 @@
     WRITE ( 14 )  'time_since_reference_point    '
     WRITE ( 14 )  time_since_reference_point
-    WRITE ( 14 )  'time_sort_particles           '
-    WRITE ( 14 )  time_sort_particles
     WRITE ( 14 )  'timestep_scheme               '
     WRITE ( 14 )  timestep_scheme
