Index: /palm/trunk/DOC/app/chapter_4.1.html
===================================================================
--- /palm/trunk/DOC/app/chapter_4.1.html	(revision 115)
+++ /palm/trunk/DOC/app/chapter_4.1.html	(revision 116)
@@ -1,5 +1,4 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
+<html><head>
 
 
@@ -20,6 +19,5 @@
   
   
-  <title>PALM chapter 4.1</title>
-</head>
+  <title>PALM chapter 4.1</title></head>
 
 <body>
@@ -2153,6 +2151,10 @@
 
 
-Cloud droplets require to use the particle package (<span style="font-weight: bold;">mrun</span>-option <span style="font-family: monospace;">-p particles</span>),
-so in this case a particle corresponds to a droplet. The droplet
+<span style="font-weight: bold;"></span><span style="font-family: monospace;"></span>
+
+
+
+
+Cloud droplets require to use&nbsp;particles (i.e. the NAMELIST group <span style="font-family: Courier New,Courier,monospace;">particles_par</span> has to be included in the parameter file<span style="font-family: monospace;"></span>). Then each particle is a representative for a certain number of droplets. The droplet
 features (number of droplets, initial radius, etc.) can be steered with
 the&nbsp; respective particle parameters (see e.g. <a href="#chapter_4.2.html#radius">radius</a>).
@@ -12602,4 +12604,3 @@
 
 
-</body>
-</html>
+</body></html>
Index: /palm/trunk/DOC/app/chapter_4.2.html
===================================================================
--- /palm/trunk/DOC/app/chapter_4.2.html	(revision 115)
+++ /palm/trunk/DOC/app/chapter_4.2.html	(revision 116)
@@ -1,5 +1,4 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
+<html><head>
 
 
@@ -12,7 +11,5 @@
   
   
-  <title>PALM chapter 4.2</title>
-</head>
-
+  <title>PALM chapter 4.2</title></head>
 
 <body>
@@ -8686,5 +8683,12 @@
 
 
-    <tr>
+    <tr><td style="vertical-align: top;"><span style="font-weight: bold;"><a name="dt_sort_particles"></a>dt_sort_particles</span></td><td style="vertical-align: top;">R</td><td style="vertical-align: top;"><span style="font-style: italic;">0.0</span></td><td style="vertical-align: top;">Temporal interval for sorting particles (in s).<br><br>By
+default, particles are sorted in memory in a way that their order
+follows the order in which the gridpoint values are stored. This may
+improve cache coherence in case of larger numbers of particles and
+gridpoints. However, since the sorting itself is time consuming and
+since the requirement of sorting depends on the strength of mixing in
+the flow, performance can be improved if the sorting is applied only
+after certain time intervals. The proper length of this interval <span style="font-weight: bold;">dt_sort_particles</span> must be determined empirically by carrying out test runs with different intervals. Check file <a href="chapter_3.4.html#CPU_MEASURES">CPU_MEASURES</a> to find the value of <span style="font-weight: bold;">dt_sort_particles</span> which gives the best performance.<br><br><span style="font-weight: bold;">Note:</span><br>In case of <a href="chapter_4.1.html#cloud_droplets">cloud_droplets</a> = <span style="font-style: italic;">.T.</span>, any given non-zero value of <span style="font-weight: bold;">dt_sort_particles</span> will be reset to zero and a corresponding warning message will appear in the job protocol.</td></tr><tr>
 
 
@@ -11590,4 +11594,3 @@
 
 
-</body>
-</html>
+</body></html>
Index: /palm/trunk/DOC/app/chapter_4.6.html
===================================================================
--- /palm/trunk/DOC/app/chapter_4.6.html	(revision 115)
+++ /palm/trunk/DOC/app/chapter_4.6.html	(revision 116)
@@ -1,5 +1,4 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
+<html><head>
 
 
@@ -15,6 +14,6 @@
   
   
-  <title>PALM chapter 4.6</title>
-  <meta name="GENERATOR" content="StarOffice 7 (Win32)">
+  
+  <title>PALM chapter 4.6</title><meta name="GENERATOR" content="StarOffice 7 (Win32)">
 
 
@@ -50,7 +49,5 @@
 @page { size: 21cm 29.7cm }
 -->
-  </style>
-</head>
-
+  </style></head>
 
 <body style="direction: ltr;" lang="en-US">
@@ -3732,5 +3729,5 @@
 
 
- <tr>
+ <tr><td><a href="chapter_4.2.html#dt_sort_particles"><span style="font-weight: bold;">dt_sort_particles</span></a></td><td>P</td><td>R</td><td><span style="font-style: italic;">0.0</span></td><td>Temporal interval for sorting particles (in s).</td></tr><tr>
 
 
@@ -11820,4 +11817,3 @@
 
 
-</body>
-</html>
+</body></html>
Index: /palm/trunk/SCRIPTS/mbuild
===================================================================
--- /palm/trunk/SCRIPTS/mbuild	(revision 115)
+++ /palm/trunk/SCRIPTS/mbuild	(revision 116)
@@ -90,4 +90,5 @@
      #                    from configuration file
      #                    host identifier (local_host) is read from config file
+     # 10/10/07 - Siggi - bugfix: handling of comment lines
 
 
@@ -185,5 +186,5 @@
  while read line
  do
-    if [[ "$line" != ""  ||  $(echo $line | cut -c1) != "#" ]]
+    if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     then
        HOSTNAME=`echo $line | cut -d" " -s -f2`
@@ -228,5 +229,5 @@
  while read line
  do
-    if [[ "$line" != ""  ||  $(echo $line | cut -c1) != "#" ]]
+    if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     then
        local_username=`echo $line | cut -d" " -s -f2`
@@ -252,5 +253,5 @@
  while read line
  do
-    if [[ "$line" != ""  &&  "$(echo $line | cut -d" " -s -f3)" = "" ]]
+    if [[ "$line" != ""  &&  "$(echo $line | cut -d" " -s -f3)" = ""  &&  $(echo $line | cut -c1) != "#" ]]
     then
        var=`echo $line | cut -d" " -s -f1 | cut -c2-`
@@ -721,5 +722,5 @@
        # IP-ADRESSE DES REMOTE-RECHNERS BESTIMMEN
     case  $remote_host  in
-        (lcmuk)          remote_addres=130.75.105.3;;
+        (lcmuk)          remote_addres=130.75.105.2;;
         (lctit)          remote_addres=172.17.75.161;;
         (decalpha)       remote_addres=165.132.26.56;;
@@ -741,20 +742,27 @@
        # REMOTE-USERNAMEN ERMITTELN
     line=""
+    found=false
     grep  "$remote_host_string" $config_file | grep "%remote_username"  >  tmp_mbuild
     while read line1
     do
+
        if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
        then
           line="$line1"
        fi
+
+       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+       then
+          remote_username=`echo $line | cut -d" " -s -f2`
+          found=true
+       fi
+
     done < tmp_mbuild
 
-    if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
+    if [[ $found = false ]]
     then
        printf "\n  +++ no remote username found in configuration file"
        printf "\n      for \"$remote_host_string\" "
        locat=config_file; exit
-    else
-       remote_username=`echo $line | cut -d" " -s -f2`
     fi
 
@@ -766,14 +774,17 @@
     while read line1
     do
+
        if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
        then
           line="$line1"
        fi
+
+       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+       then
+          remote_source_path=`echo $line | cut -d" " -s -f2`
+       fi
+
     done < tmp_mbuild
 
-    if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
-    then
-       remote_source_path=`echo $line | cut -d" " -s -f2`
-    fi
     if [[ "$remote_source_path" = "" ]]
     then
@@ -798,14 +809,17 @@
     while read line1
     do
+
        if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
        then
           line="$line1"
        fi
+
+       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+       then
+          remote_md=`echo $line | cut -d" " -s -f2`
+       fi
+
     done < tmp_mbuild
 
-    if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
-    then
-       remote_md=`echo $line | cut -d" " -s -f2`
-    fi
     if [[ "$remote_md" = "" ]]
     then
@@ -826,20 +840,27 @@
        # COMPILERNAMEN ERMITTELN
     line=""
+    found=false
     grep  "$remote_host_string" $config_file | grep "%compiler_name "  >  tmp_mbuild
     while read line1
     do
+
        if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
        then
           line="$line1"
        fi
+
+       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+       then
+          compiler_name=`echo $line | cut -d" " -s -f2`
+          found=true
+       fi
+
     done < tmp_mbuild
 
-    if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
+    if [[ $found = false ]]
     then
        printf "\n  +++ no compiler name found in configuration file"
        printf "\n      for \"$remote_host_string\" "
        locat=config_file; exit
-    else
-       compiler_name=`echo $line | cut -d" " -s -f2`
     fi
 
@@ -850,20 +871,27 @@
     then
        line=""
+       found=false
        grep  "$remote_host_string" $config_file | grep "%compiler_name_ser"  >  tmp_mbuild
        while read line1
        do
+
           if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
           then
              line="$line1"
           fi
+
+          if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+          then
+             compiler_name_ser=`echo $line | cut -d" " -s -f2`
+             found=true
+          fi
+
        done < tmp_mbuild
 
-       if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
+       if [[ $found = false ]]
        then
           printf "\n  +++ no serial compiler name found in configuration file"
           printf "\n      for \"$remote_host_string\" "
           locat=config_file; exit
-       else
-          compiler_name_ser=`echo $line | cut -d" " -s -f2`
        fi
     else
@@ -875,21 +903,30 @@
        # PRAEPROZESSOR-OPTIONEN/DIREKTIVEN ERMITTELN
     line=""
+    found=false
     grep  "$remote_host_string" $config_file | grep "%cpp_options"  >  tmp_mbuild
     while read line1
     do
+
        if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
        then
           line="$line1"
        fi
+
+       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+       then
+             # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
+          cpp_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
+          found=true
+       fi
+
     done < tmp_mbuild
-    if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
+
+    if [[ $found = false ]]
     then
        printf "\n  +++ no preprocessor options found in configuration file"
        printf "\n      for \"$remote_host_string\" "
        locat=config_file; exit
-    else
-          # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
-       cpp_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
-    fi
+    fi
+
 
        # RECHNERSPEZIFISCHE CPP-DIREKTIVEN HINZUFUEGEN
@@ -922,14 +959,17 @@
     while read line1
     do
+
        if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
        then
           line="$line1"
        fi
+
+       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+       then
+             # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
+          netcdf_inc=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
+       fi
+
     done < tmp_mbuild
-    if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
-    then
-          # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
-       netcdf_inc=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
-    fi
 
     line=""
@@ -937,14 +977,17 @@
     while read line1
     do
+
        if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
        then
           line="$line1"
        fi
+
+       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+       then
+             # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
+          netcdf_lib=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
+       fi
+
     done < tmp_mbuild
-    if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
-    then
-          # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
-       netcdf_lib=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
-    fi
 
 
@@ -952,23 +995,31 @@
        # COMPILEROPTIONEN ERMITTELN
     line=""
+    found=false
     grep  "$remote_host_string" $config_file | grep "%fopts"  >  tmp_mbuild
     while read line1
     do
+
        if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
        then
           line="$line1"
        fi
+
+       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+       then
+             # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
+          compiler_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
+          found=true
+
+             # NETCDF-INCLUDEVERZEICHNIS HINZUFUEGEN
+          compiler_options="$compiler_options $netcdf_inc"
+       fi
+
     done < tmp_mbuild
-    if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
+
+    if [[ $found = false ]]
     then
        printf "\n  +++ no compiler options found in configuration file"
        printf "\n      for \"$remote_host_string\" "
        locat=config_file; exit
-    else
-          # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
-       compiler_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
-
-          # NETCDF-INCLUDEVERZEICHNIS HINZUFUEGEN
-       compiler_options="$compiler_options $netcdf_inc"
     fi
 
@@ -977,24 +1028,31 @@
        # LADER-OPTIONEN ERMITTELN
     line=""
+    found=false
     grep  "$remote_host_string" $config_file | grep "%lopts"  >  tmp_mbuild
     while read line1
     do
+
        if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
        then
           line="$line1"
        fi
+
+       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+       then
+             # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
+          loader_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
+          found=true
+
+             # NETCDF-LIBRARY HINZUFUEGEN
+          loader_options="$loader_options $netcdf_lib"
+       fi
+
     done < tmp_mbuild
 
-    if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
+    if [[ $found = false ]]
     then
        printf "\n  +++ no loader options found in configuration file"
        printf "\n      for \"$remote_host_string\" "
        locat=config_file; exit
-    else
-          # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
-       loader_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
-
-          # NETCDF-LIBRARY HINZUFUEGEN
-       loader_options="$loader_options $netcdf_lib"
     fi
 
Index: /palm/trunk/SOURCE/CURRENT_MODIFICATIONS
===================================================================
--- /palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 115)
+++ /palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 116)
@@ -7,5 +7,9 @@
 (user_interface).
 
-init_grid, init_pegrid, modules, user_interface
+Frequence of sorting particles can be controlled with new particles_par
+parameter dt_sort_particles. Sorting is moved from the SGS timestep loop in
+advec_particles after the end of this loop.
+
+advec_particles, check_parameters, init_grid, init_pegrid, modules, package_parin, read_var_list, user_interface, write_var_list
 
 
Index: /palm/trunk/SOURCE/advec_particles.f90
===================================================================
--- /palm/trunk/SOURCE/advec_particles.f90	(revision 115)
+++ /palm/trunk/SOURCE/advec_particles.f90	(revision 116)
@@ -4,4 +4,6 @@
 ! Actual revisions:
 ! -----------------
+! Sorting of particles is controlled by dt_sort_particles and moved from
+! the SGS timestep loop after the end of this loop.
 ! Bugfix: pleft/pright changed to pnorth/psouth in sendrecv of particle tail
 ! numbers along y
@@ -3254,8 +3256,4 @@
 !    ENDDO
 
-!
-!--    Sort particles in the sequence the gridboxes are stored in the memory
-       CALL sort_particles
-
 !    WRITE ( 9, * ) '*** advec_particles: ##9'
 !    CALL local_flush( 9 )
@@ -3286,4 +3284,14 @@
 
     ENDDO   ! timestep loop
+
+
+!
+!-- Sort particles in the sequence the gridboxes are stored in the memory
+    time_sort_particles = time_sort_particles + dt_3d
+    IF ( time_sort_particles >= dt_sort_particles )  THEN
+       CALL sort_particles
+       time_sort_particles = MOD( time_sort_particles, &
+                                  MAX( dt_sort_particles, dt_3d ) )
+    ENDIF
 
 
Index: /palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- /palm/trunk/SOURCE/check_parameters.f90	(revision 115)
+++ /palm/trunk/SOURCE/check_parameters.f90	(revision 116)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! Multigrid solver allows topography
+! Multigrid solver allows topography, checking of dt_sort_particles
 !
 ! Former revisions:
@@ -1500,4 +1500,16 @@
 
 !
+!-- Check the interval for sorting particles.
+!-- Using particles as cloud droplets requires sorting after each timestep.
+    IF ( dt_sort_particles /= 0.0  .AND.  cloud_droplets )  THEN
+       dt_sort_particles = 0.0
+       IF ( myid == 0 )  THEN
+          PRINT*, '+++ WARNING: check_parameters:'
+          PRINT*, '    dt_sort_particles is reset to 0.0 because ', &
+                       'of cloud_droplets = .TRUE.'
+       ENDIF
+    ENDIF
+
+!
 !-- Set the default intervals for data output, if necessary
 !-- NOTE: dt_dosp has already been set in package_parin
Index: /palm/trunk/SOURCE/init_grid.f90
===================================================================
--- /palm/trunk/SOURCE/init_grid.f90	(revision 115)
+++ /palm/trunk/SOURCE/init_grid.f90	(revision 116)
@@ -789,5 +789,5 @@
 !--       Bit 4:  wall to the left
 !--       Bit 5:  wall to the right
-!--       Bit 6:  inside / outside building (1/0)
+!--       Bit 6:  inside building
 
           flags = 0
Index: /palm/trunk/SOURCE/modules.f90
===================================================================
--- /palm/trunk/SOURCE/modules.f90	(revision 115)
+++ /palm/trunk/SOURCE/modules.f90	(revision 116)
@@ -5,5 +5,5 @@
 ! Actual revisions:
 ! -----------------
-! +flags, wall_flags_1..10
+! +dt_sort_particles, time_sort_particles, flags, wall_flags_1..10
 !
 ! Former revisions:
@@ -876,5 +876,5 @@
     LOGICAL, DIMENSION(:), ALLOCATABLE ::  particle_mask, tail_mask
 
-    REAL    ::  c_0 = 3.0, dt_min_part = 0.0002,                               &
+    REAL    ::  c_0 = 3.0, dt_min_part = 0.0002, dt_sort_particles = 0.0,      &
                 dt_write_particle_data = 9999999.9, dvrp_psize = 9999999.9,    &
                 end_time_prel = 9999999.9, initial_weighting_factor = 1.0,     &
@@ -883,5 +883,5 @@
                 particle_advection_start = 0.0, sgs_wfu_part = 0.3333333,      &
                 sgs_wfv_part = 0.3333333, sgs_wfw_part = 0.3333333,            &
-                time_write_particle_data = 0.0
+                time_sort_particles = 0.0, time_write_particle_data = 0.0
 
     REAL, DIMENSION(max_number_of_particle_groups) ::  &
Index: /palm/trunk/SOURCE/package_parin.f90
===================================================================
--- /palm/trunk/SOURCE/package_parin.f90	(revision 115)
+++ /palm/trunk/SOURCE/package_parin.f90	(revision 116)
@@ -45,5 +45,5 @@
     NAMELIST /particles_par/      bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,    &
                                   density_ratio, radius, dt_dopts,             &
-                                  dt_min_part, dt_prel,                        &
+                                  dt_min_part, dt_prel, dt_sort_particles,     &
                                   dt_write_particle_data, dvrp_psize,          &
                                   end_time_prel, initial_weighting_factor,     &
Index: /palm/trunk/SOURCE/read_var_list.f90
===================================================================
--- /palm/trunk/SOURCE/read_var_list.f90	(revision 115)
+++ /palm/trunk/SOURCE/read_var_list.f90	(revision 116)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! +time_sort_particles
 !
 ! Former revisions:
@@ -46,4 +46,5 @@
     USE indices
     USE model_1d
+    USE particle_attributes
     USE pegrid
     USE profil_parameter
@@ -395,4 +396,6 @@
           CASE ( 'time_run_control' )
              READ ( 13 )  time_run_control
+          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 115)
+++ /palm/trunk/SOURCE/write_var_list.f90	(revision 116)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! +time_sort_particles
 !
 ! Former revisions:
@@ -46,4 +46,5 @@
     USE indices
     USE model_1d
+    USE particle_attributes
     USE pegrid
     USE profil_parameter
@@ -341,4 +342,6 @@
     WRITE ( 14 )  'time_run_control              '
     WRITE ( 14 )  time_run_control
+    WRITE ( 14 )  'time_sort_particles           '
+    WRITE ( 14 )  time_sort_particles
     WRITE ( 14 )  'timestep_scheme               '
     WRITE ( 14 )  timestep_scheme
