Index: /palm/trunk/SOURCE/CURRENT_MODIFICATIONS
===================================================================
--- /palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 118)
+++ /palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 119)
@@ -22,5 +22,5 @@
 
 Bugfix: pleft/pright changed to pnorth/psouth in sendrecv of particle tail
-numbers along y (advec_particles)
+numbers along y, small bugfixes in the SGS part (advec_particles)
 
 Bugfix: model_string needed a default value (combine_plot_fields)
Index: /palm/trunk/SOURCE/advec_particles.f90
===================================================================
--- /palm/trunk/SOURCE/advec_particles.f90	(revision 118)
+++ /palm/trunk/SOURCE/advec_particles.f90	(revision 119)
@@ -8,4 +8,5 @@
 ! Bugfix: pleft/pright changed to pnorth/psouth in sendrecv of particle tail
 ! numbers along y
+! Small bugfixes in the SGS part
 ! TEST: PRINT statements on unit 9 (commented out)
 !
@@ -1056,5 +1057,5 @@
                    gp_outside_of_building(1) = 1
                    location(num_gp,1) = i * dx
-                   location(num_gp,2) = j * dx
+                   location(num_gp,2) = j * dy
                    location(num_gp,3) = k * dz - 0.5 * dz
                    ei(num_gp)     = e(k,j,i)
@@ -1070,5 +1071,5 @@
                    gp_outside_of_building(2) = 1
                    location(num_gp,1) = i * dx
-                   location(num_gp,2) = (j+1) * dx
+                   location(num_gp,2) = (j+1) * dy
                    location(num_gp,3) = k * dz - 0.5 * dz
                    ei(num_gp)     = e(k,j+1,i)
@@ -1513,6 +1514,6 @@
 !--                Neumann boundary condition has to be applied
 !--                (only one case as only building beneath is possible)
-                   IF ( gp_outside_of_building(1) == 1  .AND. &
-                        gp_outside_of_building(3) == 0 )  THEN
+                   IF ( gp_outside_of_building(1) == 0  .AND. &
+                        gp_outside_of_building(3) == 1 )  THEN
                       num_gp = num_gp + 1
                       location(num_gp,1) = i * dx
@@ -1530,6 +1531,6 @@
 !--                Neumann boundary condition has to be applied
 !--                (only one case as only building beneath is possible)
-                   IF ( gp_outside_of_building(5) == 1  .AND. &
-                        gp_outside_of_building(7) == 0 )  THEN
+                   IF ( gp_outside_of_building(5) == 0  .AND. &
+                        gp_outside_of_building(7) == 1 )  THEN
                       num_gp = num_gp + 1
                       location(num_gp,1) = (i+1) * dx
@@ -1547,6 +1548,6 @@
 !--                Neumann boundary condition has to be applied
 !--                (only one case as only building beneath is possible)
-                   IF ( gp_outside_of_building(2) == 1  .AND. &
-                        gp_outside_of_building(4) == 0 )  THEN
+                   IF ( gp_outside_of_building(2) == 0  .AND. &
+                        gp_outside_of_building(4) == 1 )  THEN
                       num_gp = num_gp + 1
                       location(num_gp,1) = i * dx
@@ -1564,6 +1565,6 @@
 !--                Neumann boundary condition has to be applied
 !--                (only one case as only building beneath is possible)
-                   IF ( gp_outside_of_building(6) == 1  .AND. &
-                        gp_outside_of_building(8) == 0 )  THEN
+                   IF ( gp_outside_of_building(6) == 0  .AND. &
+                        gp_outside_of_building(8) == 1 )  THEN
                       num_gp = num_gp + 1
                       location(num_gp,1) = (i+1) * dx
@@ -1584,6 +1585,9 @@
 !--                   building, it follows that the values at the particle 
 !--                   location are the same as the gridpoint values
-                      e_int = ei(num_gp)
-
+                      e_int     = ei(num_gp)
+                      diss_int  = dissi(num_gp)
+                      de_dx_int = de_dxi(num_gp)
+                      de_dy_int = de_dyi(num_gp)
+                      de_dz_int = de_dzi(num_gp)
                    ELSE IF ( num_gp > 1 )  THEN
 
