Index: /palm/trunk/SOURCE/check_for_restart.f90
===================================================================
--- /palm/trunk/SOURCE/check_for_restart.f90	(revision 1031)
+++ /palm/trunk/SOURCE/check_for_restart.f90	(revision 1032)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! minor reformatting
 !
 ! Former revisions:
@@ -97,11 +97,12 @@
 #if defined( __parallel )
        IF ( myid == 0 ) THEN
-          CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER,          &
-                             target_id, 0,                                      &
-                             terminate_coupled_remote, 1, MPI_INTEGER,          &
-                             target_id, 0,                                      &
+          CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER,         &
+                             target_id, 0,                                     &
+                             terminate_coupled_remote, 1, MPI_INTEGER,         &
+                             target_id, 0,                                     &
                              comm_inter, status, ierr )
        ENDIF
-       CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0, comm2d, ierr)
+       CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0, comm2d,  &
+                       ierr )
 #endif
     ENDIF
@@ -147,12 +148,12 @@
 #if defined( __parallel )
              IF ( myid == 0 ) THEN
-                CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER,    &
-                                   target_id,  0,                               &
-                                   terminate_coupled_remote, 1, MPI_INTEGER,    &
-                                   target_id,  0,                               &
+                CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER,   &
+                                   target_id,  0,                              &
+                                   terminate_coupled_remote, 1, MPI_INTEGER,   &
+                                   target_id,  0,                              &
                                    comm_inter, status, ierr )   
              ENDIF
-             CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0, comm2d, ierr)  
-            
+             CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0,  &
+                             comm2d, ierr )  
 #endif
           ENDIF
Index: /palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- /palm/trunk/SOURCE/init_3d_model.f90	(revision 1031)
+++ /palm/trunk/SOURCE/init_3d_model.f90	(revision 1032)
@@ -7,5 +7,6 @@
 ! Current revisions:
 ! ------------------
-! 
+! save memory by not allocating pt_2 in case of neutral = .T.
+!
 !
 ! Former revisions:
@@ -274,5 +275,4 @@
               e_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg),   &
               pt_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),  &
-              pt_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),  &
               pt_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg),  &
               u_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),   &
@@ -285,4 +285,7 @@
               w_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),   &
               w_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    IF ( .NOT. neutral )  THEN
+       ALLOCATE( pt_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ENDIF
 #endif
 
@@ -473,5 +476,9 @@
 !-- Initial assignment of the pointers
     e  => e_1;   e_p  => e_2;   te_m  => e_3
-    pt => pt_1;  pt_p => pt_2;  tpt_m => pt_3
+    IF ( .NOT. neutral )  THEN
+       pt => pt_1;  pt_p => pt_2;  tpt_m => pt_3
+    ELSE
+       pt => pt_1;  pt_p => pt_1;  tpt_m => pt_3
+    ENDIF
     u  => u_1;   u_p  => u_2;   tu_m  => u_3
     v  => v_1;   v_p  => v_2;   tv_m  => v_3
Index: /palm/trunk/SOURCE/init_masks.f90
===================================================================
--- /palm/trunk/SOURCE/init_masks.f90	(revision 1031)
+++ /palm/trunk/SOURCE/init_masks.f90	(revision 1032)
@@ -4,4 +4,5 @@
 ! Current revisions:
 ! -----------------
+! hotfix: mask locations determined based on scalar positions
 ! netCDF4 without parallel file support implemented
 !
@@ -464,5 +465,5 @@
              count = count + 1
              IF ( dim == 1 .OR. dim == 2 )  THEN
-                m = NINT( mask(mid,dim,count) * mask_scale(dim) * ddxyz )
+                m = NINT( mask(mid,dim,count) * mask_scale(dim) * ddxyz - 0.5 )
              ELSEIF ( dim == 3 )  THEN
                 ind_array =  &
@@ -515,7 +516,10 @@
                 CALL message( 'init_masks', 'PA0332', 1, 2, 0, 6, 0 )
              ENDIF
-             loop_begin  = NINT( mask_loop(mid,dim,1) * mask_scale(dim) * ddxyz )
-             loop_end    = NINT( mask_loop(mid,dim,2) * mask_scale(dim) * ddxyz )
-             loop_stride = NINT( mask_loop(mid,dim,3) * mask_scale(dim) * ddxyz )
+             loop_begin  = NINT( mask_loop(mid,dim,1) * mask_scale(dim) &
+                  * ddxyz - 0.5 )
+             loop_end    = NINT( mask_loop(mid,dim,2) * mask_scale(dim) &
+                  * ddxyz - 0.5 )
+             loop_stride = NINT( mask_loop(mid,dim,3) * mask_scale(dim) &
+                  * ddxyz )
           ELSEIF ( dim == 3 )  THEN
              IF ( mask_loop(mid,dim,2) < 0.0 )  THEN
Index: /palm/trunk/SOURCE/swap_timelevel.f90
===================================================================
--- /palm/trunk/SOURCE/swap_timelevel.f90	(revision 1031)
+++ /palm/trunk/SOURCE/swap_timelevel.f90	(revision 1032)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-!
+! save memory by not allocating pt_2 in case of neutral = .T.
 !
 ! Former revisions:
@@ -83,5 +83,7 @@
           v  => v_1;   v_p  => v_2
           w  => w_1;   w_p  => w_2
-          pt => pt_1;  pt_p => pt_2
+          IF ( .NOT. neutral )  THEN
+             pt => pt_1;  pt_p => pt_2
+          ENDIF
           IF ( .NOT. constant_diffusion )  THEN
              e => e_1;    e_p => e_2
@@ -100,5 +102,7 @@
           v  => v_2;   v_p  => v_1
           w  => w_2;   w_p  => w_1
-          pt => pt_2;  pt_p => pt_1
+          IF ( .NOT. neutral )  THEN
+             pt => pt_2;  pt_p => pt_1
+          ENDIF
           IF ( .NOT. constant_diffusion )  THEN
              e => e_2;    e_p => e_1
