Index: palm/trunk/SOURCE/calc_spectra.f90
===================================================================
--- palm/trunk/SOURCE/calc_spectra.f90	(revision 1002)
+++ palm/trunk/SOURCE/calc_spectra.f90	(revision 1003)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! adjustment of array tend for cases with unequal subdomain sizes removed
 !
 ! Former revisions:
@@ -73,12 +73,5 @@
     IF ( psolver == 'multigrid' )  THEN
        DEALLOCATE( d )
-       ALLOCATE( d(nzb+1:nzta,nys:nyna,nxl:nxra) )
-    ENDIF
-
-!
-!-- Enlarge the size of tend, used as a working array for the transpositions
-    IF ( nxra > nxr  .OR.  nyna > nyn  .OR.  nza > nz )  THEN
-       DEALLOCATE( tend )
-       ALLOCATE( tend(1:nza,nys:nyna,nxl:nxra) )
+       ALLOCATE( d(nzb+1:nzt,nys:nyn,nxl:nxr) )
     ENDIF
 
@@ -154,11 +147,4 @@
 !-- Increase counter for averaging process in routine plot_spectra
     average_count_sp = average_count_sp + 1
-
-!
-!-- Resize tend to its normal size
-    IF ( nxra > nxr  .OR.  nyna > nyn  .OR.  nza > nz )  THEN
-       DEALLOCATE( tend )
-       ALLOCATE( tend(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-    ENDIF
 
     CALL cpu_log( log_point(30), 'calc_spectra', 'stop' )
@@ -249,5 +235,5 @@
     REAL, DIMENSION(0:nx/2,100)::  sums_spectra
 
-    REAL, DIMENSION(0:nxa,nys_x:nyn_xa,nzb_x:nzt_xa) ::  ddd
+    REAL, DIMENSION(0:nx,nys_x:nyn_x,nzb_x:nzt_x) ::  ddd
 
 !
@@ -359,5 +345,5 @@
     REAL, DIMENSION(0:ny/2,100)::  sums_spectra
 
-    REAL, DIMENSION(0:nya,nxl_yd:nxr_yda,nzb_yd:nzt_yda) :: ddd
+    REAL, DIMENSION(0:ny,nxl_yd:nxr_yd,nzb_yd:nzt_yd) :: ddd
 
 
Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 1002)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 1003)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-!
+! checks for cases with unequal subdomain sizes removed
 !
 ! Former revisions:
@@ -597,13 +597,4 @@
        CALL message( 'check_parameters', 'PA0017', 1, 2, 0, 6, 0 )
     ENDIF
-    IF ( psolver == 'poisfft_hybrid'  .AND.                     &
-         ( nxra > nxr  .OR.  nyna > nyn  .OR.  nza > nz )  .OR. &
-          psolver == 'multigrid'      .AND.                     &
-         ( nxra > nxr  .OR.  nyna > nyn ) )  THEN
-       message_string = 'psolver = "' // TRIM( psolver ) // '" does not ' // &
-                        'work for subdomains with unequal size & please ' // &
-                        'set grid_matching = ''strict'' in the parameter file'
-       CALL message( 'check_parameters', 'PA0018', 1, 2, 0, 6, 0 )
-    ENDIF
 #else
     IF ( psolver == 'poisfft_hybrid' )  THEN
@@ -809,10 +800,4 @@
                         'is not allowed simultaneously'
        CALL message( 'check_parameters', 'PA0038', 1, 2, 0, 6, 0 )
-    ENDIF
-
-    IF ( grid_matching /= 'strict'  .AND.  grid_matching /= 'match' )  THEN
-       message_string = 'illegal value "' // TRIM( grid_matching ) // &
-                        '" found for parameter grid_matching'
-       CALL message( 'check_parameters', 'PA0040', 1, 2, 0, 6, 0 )
     ENDIF
 
Index: palm/trunk/SOURCE/header.f90
===================================================================
--- palm/trunk/SOURCE/header.f90	(revision 1002)
+++ palm/trunk/SOURCE/header.f90	(revision 1003)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-!
+! output of information about equal/unequal subdomain size removed
 !
 ! Former revisions:
@@ -433,11 +433,4 @@
     WRITE ( io, 254 )  nx, ny, nzt+1, MIN( nnx, nx+1 ), MIN( nny, ny+1 ), &
                        MIN( nnz+2, nzt+2 )
-    IF ( numprocs > 1 )  THEN
-       IF ( nxa == nx  .AND.  nya == ny  .AND.  nza == nz )  THEN
-          WRITE ( io, 255 )
-       ELSE
-          WRITE ( io, 256 )  nnx-(nxa-nx), nny-(nya-ny), nzt+2
-       ENDIF
-    ENDIF
     IF ( sloping_surface )  WRITE ( io, 260 )  alpha_surface
 
@@ -1693,8 +1686,4 @@
 254 FORMAT (' Number of gridpoints (x,y,z):  (0:',I4,', 0:',I4,', 0:',I4,')'/ &
             ' Subdomain size (x,y,z):        (  ',I4,',   ',I4,',   ',I4,')'/)
-255 FORMAT (' Subdomains have equal size')
-256 FORMAT (' Subdomains at the upper edges of the virtual processor grid ', &
-              'have smaller sizes'/                                          &
-            ' Size of smallest subdomain:    (  ',I4,',   ',I4,',   ',I4,')')
 260 FORMAT (/' The model has a slope in x-direction. Inclination angle: ',F6.2,&
              ' degrees')
Index: palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_3d_model.f90	(revision 1002)
+++ palm/trunk/SOURCE/init_3d_model.f90	(revision 1003)
@@ -7,5 +7,5 @@
 ! Current revisions:
 ! ------------------
-!
+! nxra,nyna, nzta replaced ny nxr, nyn, nzt
 !
 ! Former revisions:
@@ -235,5 +235,5 @@
               z0h(nysg:nyng,nxlg:nxrg) )
 
-    ALLOCATE( d(nzb+1:nzta,nys:nyna,nxl:nxra),     &
+    ALLOCATE( d(nzb+1:nzt,nys:nyn,nxl:nxr),        &
               e_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),  &
               e_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),  &
Index: palm/trunk/SOURCE/init_advec.f90
===================================================================
--- palm/trunk/SOURCE/init_advec.f90	(revision 1002)
+++ palm/trunk/SOURCE/init_advec.f90	(revision 1003)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-!
+! obsolete variables removed
 !
 ! Former revisions:
@@ -34,8 +34,6 @@
     IMPLICIT NONE
 
-    INTEGER :: i, intervals, j, k
-    REAL    :: delt, dn, dnneu, ex1, ex2, ex3, ex4, ex5, ex6, spl_alpha, &
-               spl_beta, sterm
-    REAL, DIMENSION(:), ALLOCATABLE ::  spl_u, temp
+    INTEGER :: i, intervals, j
+    REAL    :: delt, dn, dnneu, ex1, ex2, ex3, ex4, ex5, ex6, sterm
 
 
Index: palm/trunk/SOURCE/init_pegrid.f90
===================================================================
--- palm/trunk/SOURCE/init_pegrid.f90	(revision 1002)
+++ palm/trunk/SOURCE/init_pegrid.f90	(revision 1003)
@@ -1,8 +1,7 @@
  SUBROUTINE init_pegrid
-
 !------------------------------------------------------------------------------!
 ! Current revisions:
 ! -----------------
-!
+! subdomains must have identical size (grid matching = "match" removed)
 !
 ! Former revisions:
@@ -255,58 +254,9 @@
 
 !
-!-- Find a grid (used for array d) which will match the transposition demands
-    IF ( grid_matching == 'strict' )  THEN
-
-       nxa = nx;  nya = ny;  nza = nz
-
-    ELSE
-
-       found = .FALSE.
-   xn: DO  nxa = nx, 2*nx
-!
-!--       Meet conditions for nx
-          IF ( MOD( nxa+1, pdims(1) ) /= 0 .OR. &
-               MOD( nxa+1, pdims(2) ) /= 0 )  CYCLE xn
-
-      yn: DO  nya = ny, 2*ny
-!
-!--          Meet conditions for ny
-             IF ( MOD( nya+1, pdims(2) ) /= 0 .OR. &
-                  MOD( nya+1, pdims(1) ) /= 0 )  CYCLE yn
-
-
-         zn: DO  nza = nz, 2*nz
-!
-!--             Meet conditions for nz
-                IF ( ( MOD( nza, pdims(1) ) /= 0  .AND.  pdims(1) /= 1  .AND. &
-                       pdims(2) /= 1 )  .OR.                                  &
-                     ( MOD( nza, pdims(2) ) /= 0  .AND.  dt_dosp /= 9999999.9 &
-                     ) )  THEN
-                   CYCLE zn
-                ELSE
-                   found = .TRUE.
-                   EXIT xn
-                ENDIF
-
-             ENDDO zn
-
-          ENDDO yn
-
-       ENDDO xn
-
-       IF ( .NOT. found )  THEN
-          message_string = 'no matching grid for transpositions found'
-          CALL message( 'init_pegrid', 'PA0224', 1, 2, 0, 6, 0 )
-       ENDIF
-
-    ENDIF
-
-!
-!-- Calculate array bounds in x-direction for every PE.
-!-- The last PE along x may get less grid points than the others
+!-- Calculate array bounds along x-direction for every PE.
     ALLOCATE( nxlf(0:pdims(1)-1), nxrf(0:pdims(1)-1), nynf(0:pdims(2)-1), &
-              nysf(0:pdims(2)-1), nnx_pe(0:pdims(1)-1), nny_pe(0:pdims(2)-1) )
-
-    IF ( MOD( nxa+1 , pdims(1) ) /= 0 )  THEN
+              nysf(0:pdims(2)-1) )
+
+    IF ( MOD( nx+1 , pdims(1) ) /= 0 )  THEN
        WRITE( message_string, * ) 'x-direction: gridpoint number (',nx+1,') ',&
                                'is not an& integral divisor of the number ',  &
@@ -314,5 +264,5 @@
        CALL message( 'init_pegrid', 'PA0225', 1, 2, 0, 6, 0 )
     ELSE
-       nnx  = ( nxa + 1 ) / pdims(1)
+       nnx  = ( nx + 1 ) / pdims(1)
        IF ( nnx*pdims(1) - ( nx + 1) > nnx )  THEN
           WRITE( message_string, * ) 'x-direction: nx does not match the',    & 
@@ -329,10 +279,9 @@
        nxlf(i)   = i * nnx
        nxrf(i)   = ( i + 1 ) * nnx - 1
-       nnx_pe(i) = MIN( nx, nxrf(i) ) - nxlf(i) + 1
     ENDDO
 
 !
 !-- Calculate array bounds in y-direction for every PE.
-    IF ( MOD( nya+1 , pdims(2) ) /= 0 )  THEN
+    IF ( MOD( ny+1 , pdims(2) ) /= 0 )  THEN
        WRITE( message_string, * ) 'y-direction: gridpoint number (',ny+1,') ', &
                            'is not an& integral divisor of the number of',     &
@@ -340,5 +289,5 @@
        CALL message( 'init_pegrid', 'PA0227', 1, 2, 0, 6, 0 )
     ELSE
-       nny  = ( nya + 1 ) / pdims(2)
+       nny  = ( ny + 1 ) / pdims(2)
        IF ( nny*pdims(2) - ( ny + 1) > nny )  THEN
           WRITE( message_string, * ) 'y-direction: ny does not match the',    &
@@ -355,19 +304,15 @@
        nysf(j)   = j * nny
        nynf(j)   = ( j + 1 ) * nny - 1
-       nny_pe(j) = MIN( ny, nynf(j) ) - nysf(j) + 1
     ENDDO
 
 !
 !-- Local array bounds of the respective PEs
-    nxl  = nxlf(pcoord(1))
-    nxra = nxrf(pcoord(1))
-    nxr  = MIN( nx, nxra )
-    nys  = nysf(pcoord(2))
-    nyna = nynf(pcoord(2))
-    nyn  = MIN( ny, nyna )
-    nzb  = 0
-    nzta = nza
-    nzt  = MIN( nz, nzta )
-    nnz  = nza
+    nxl = nxlf(pcoord(1))
+    nxr = nxrf(pcoord(1))
+    nys = nysf(pcoord(2))
+    nyn = nynf(pcoord(2))
+    nzb = 0
+    nzt = nz
+    nnz = nz
 
 !
@@ -390,9 +335,8 @@
     IF ( pdims(2) /= 1 )  THEN
 
-       nys_x  = nys
-       nyn_xa = nyna
-       nyn_x  = nyn
-       nny_x  = nny
-       IF ( MOD( nza , pdims(1) ) /= 0 )  THEN
+       nys_x = nys
+       nyn_x = nyn
+       nny_x = nny
+       IF ( MOD( nz , pdims(1) ) /= 0 )  THEN
           WRITE( message_string, * ) 'transposition z --> x:',                &
                        '&nz=',nz,' is not an integral divisior of pdims(1)=', &
@@ -400,9 +344,7 @@
           CALL message( 'init_pegrid', 'PA0230', 1, 2, 0, 6, 0 )
        ENDIF
-       nnz_x  = nza / pdims(1)
-       nzb_x  = 1 + myidx * nnz_x
-       nzt_xa = ( myidx + 1 ) * nnz_x
-       nzt_x  = MIN( nzt, nzt_xa )
-
+       nnz_x = nz / pdims(1)
+       nzb_x = 1 + myidx * nnz_x
+       nzt_x = ( myidx + 1 ) * nnz_x
        sendrecvcount_zx = nnx * nny * nnz_x
 
@@ -412,9 +354,8 @@
 !---   the next step  x --> y
 !---   WARNING: This case has still to be clarified!!!!!!!!!!!!
-       nnz_x  = 1
-       nzb_x  = 1
-       nzt_xa = 1
-       nzt_x  = 1
-       nny_x  = nny
+       nnz_x = 1
+       nzb_x = 1
+       nzt_x = 1
+       nny_x = nny
 
     ENDIF
@@ -422,9 +363,8 @@
 !
 !-- 2. transposition  x --> y
-    nnz_y  = nnz_x
-    nzb_y  = nzb_x
-    nzt_ya = nzt_xa
-    nzt_y  = nzt_x
-    IF ( MOD( nxa+1 , pdims(2) ) /= 0 )  THEN
+    nnz_y = nnz_x
+    nzb_y = nzb_x
+    nzt_y = nzt_x
+    IF ( MOD( nx+1 , pdims(2) ) /= 0 )  THEN
        WRITE( message_string, * ) 'transposition x --> y:',                &
                          '&nx+1=',nx+1,' is not an integral divisor of ',&
@@ -432,9 +372,7 @@
        CALL message( 'init_pegrid', 'PA0231', 1, 2, 0, 6, 0 )
     ENDIF
-    nnx_y = (nxa+1) / pdims(2)
+    nnx_y = (nx+1) / pdims(2)
     nxl_y = myidy * nnx_y
-    nxr_ya = ( myidy + 1 ) * nnx_y - 1
-    nxr_y  = MIN( nx, nxr_ya )
-
+    nxr_y = ( myidy + 1 ) * nnx_y - 1
     sendrecvcount_xy = nnx_y * nny_x * nnz_y
 
@@ -447,9 +385,8 @@
 !--    This transposition is not neccessary in case of a 1d-decomposition
 !--    along x, except that the uptream-spline method is switched on
-       nnx_z  = nnx_y
-       nxl_z  = nxl_y
-       nxr_za = nxr_ya
-       nxr_z  = nxr_y
-       IF ( MOD( nya+1 , pdims(1) ) /= 0 )  THEN
+       nnx_z = nnx_y
+       nxl_z = nxl_y
+       nxr_z = nxr_y
+       IF ( MOD( ny+1 , pdims(1) ) /= 0 )  THEN
           WRITE( message_string, * ) 'transposition y --> z:',            &
                             '& ny+1=',ny+1,' is not an integral divisor of ',&
@@ -457,9 +394,7 @@
           CALL message( 'init_pegrid', 'PA0232', 1, 2, 0, 6, 0 )
        ENDIF
-       nny_z  = (nya+1) / pdims(1)
-       nys_z  = myidx * nny_z
-       nyn_za = ( myidx + 1 ) * nny_z - 1
-       nyn_z  = MIN( ny, nyn_za )
-
+       nny_z = (ny+1) / pdims(1)
+       nys_z = myidx * nny_z
+       nyn_z = ( myidx + 1 ) * nny_z - 1
        sendrecvcount_yz = nnx_y * nny_z * nnz_y
 
@@ -467,5 +402,5 @@
 !
 !--    x --> y. This condition must be fulfilled for a 1D-decomposition along x
-       IF ( MOD( nya+1 , pdims(1) ) /= 0 )  THEN
+       IF ( MOD( ny+1 , pdims(1) ) /= 0 )  THEN
           WRITE( message_string, * ) 'transposition x --> y:',               &
                             '& ny+1=',ny+1,' is not an integral divisor of ',&
@@ -479,5 +414,5 @@
 !-- Indices for direct transpositions z --> y (used for calculating spectra)
     IF ( dt_dosp /= 9999999.9 )  THEN
-       IF ( MOD( nza, pdims(2) ) /= 0 )  THEN
+       IF ( MOD( nz, pdims(2) ) /= 0 )  THEN
           WRITE( message_string, * ) 'direct transposition z --> y (needed ', &
                     'for spectra):& nz=',nz,' is not an integral divisor of ',&
@@ -485,12 +420,9 @@
           CALL message( 'init_pegrid', 'PA0234', 1, 2, 0, 6, 0 )
        ELSE
-          nxl_yd  = nxl
-          nxr_yda = nxra
-          nxr_yd  = nxr
-          nzb_yd  = 1 + myidy * ( nza / pdims(2) )
-          nzt_yda = ( myidy + 1 ) * ( nza / pdims(2) )
-          nzt_yd  = MIN( nzt, nzt_yda )
-
-          sendrecvcount_zyd = nnx * nny * ( nza / pdims(2) )
+          nxl_yd = nxl
+          nxr_yd = nxr
+          nzb_yd = 1 + myidy * ( nz / pdims(2) )
+          nzt_yd = ( myidy + 1 ) * ( nz / pdims(2) )
+          sendrecvcount_zyd = nnx * nny * ( nz / pdims(2) )
        ENDIF
     ENDIF
@@ -500,12 +432,10 @@
 !-- of a 1d-decomposition along x)
     IF ( pdims(2) == 1 )  THEN
-       nny_x  = nny / pdims(1)
-       nys_x  = myid * nny_x
-       nyn_xa = ( myid + 1 ) * nny_x - 1
-       nyn_x  = MIN( ny, nyn_xa )
-       nzb_x  = 1
-       nzt_xa = nza
-       nzt_x  = nz
-       sendrecvcount_xy = nnx * nny_x * nza
+       nny_x = nny / pdims(1)
+       nys_x = myid * nny_x
+       nyn_x = ( myid + 1 ) * nny_x - 1
+       nzb_x = 1
+       nzt_x = nz
+       sendrecvcount_xy = nnx * nny_x * nz
     ENDIF
 
@@ -514,12 +444,10 @@
 !-- of a 1d-decomposition along y)
     IF ( pdims(1) == 1 )  THEN
-       nnx_y  = nnx / pdims(2)
-       nxl_y  = myid * nnx_y
-       nxr_ya = ( myid + 1 ) * nnx_y - 1
-       nxr_y  = MIN( nx, nxr_ya )
-       nzb_y  = 1
-       nzt_ya = nza
-       nzt_y  = nz
-       sendrecvcount_xy = nnx_y * nny * nza
+       nnx_y = nnx / pdims(2)
+       nxl_y = myid * nnx_y
+       nxr_y = ( myid + 1 ) * nnx_y - 1
+       nzb_y = 1
+       nzt_y = nz
+       sendrecvcount_xy = nnx_y * nny * nz
     ENDIF
 
@@ -782,16 +710,13 @@
 !-- Array bounds when running on a single PE (respectively a non-parallel
 !-- machine)
-    nxl  = 0
-    nxr  = nx
-    nxra = nx
-    nnx  = nxr - nxl + 1
-    nys  = 0
-    nyn  = ny
-    nyna = ny
-    nny  = nyn - nys + 1
-    nzb  = 0
-    nzt  = nz
-    nzta = nz
-    nnz  = nz
+    nxl = 0
+    nxr = nx
+    nnx = nxr - nxl + 1
+    nys = 0
+    nyn = ny
+    nny = nyn - nys + 1
+    nzb = 0
+    nzt = nz
+    nnz = nz
 
     ALLOCATE( hor_index_bounds(4,0:0) )
@@ -804,24 +729,18 @@
 !-- Array bounds for the pressure solver (in the parallel code, these bounds
 !-- are the ones for the transposed arrays)
-    nys_x  = nys
-    nyn_x  = nyn
-    nyn_xa = nyn
-    nzb_x  = nzb + 1
-    nzt_x  = nzt
-    nzt_xa = nzt
-
-    nxl_y  = nxl
-    nxr_y  = nxr
-    nxr_ya = nxr
-    nzb_y  = nzb + 1
-    nzt_y  = nzt
-    nzt_ya = nzt
-
-    nxl_z  = nxl
-    nxr_z  = nxr
-    nxr_za = nxr
-    nys_z  = nys
-    nyn_z  = nyn
-    nyn_za = nyn
+    nys_x = nys
+    nyn_x = nyn
+    nzb_x = nzb + 1
+    nzt_x = nzt
+
+    nxl_y = nxl
+    nxr_y = nxr
+    nzb_y = nzb + 1
+    nzt_y = nzt
+
+    nxl_z = nxl
+    nxr_z = nxr
+    nys_z = nys
+    nyn_z = nyn
 
 #endif
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 1002)
+++ palm/trunk/SOURCE/modules.f90	(revision 1003)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-!
+! -grid_matching, nxa, nya, etc., nnx_pe, nny_pe, spl_*
 !
 ! Former revisions:
@@ -296,9 +296,5 @@
 !------------------------------------------------------------------------------!
 
-    REAL ::  spl_gamma_x, spl_gamma_y
-
-    REAL, DIMENSION(:), ALLOCATABLE   ::  aex, bex, dex, eex, spl_z_x, spl_z_y
-    REAL, DIMENSION(:,:), ALLOCATABLE ::  spl_tri_x, spl_tri_y, spl_tri_zu, &
-                                          spl_tri_zw
+    REAL, DIMENSION(:), ALLOCATABLE   ::  aex, bex, dex, eex
 
     SAVE
@@ -484,5 +480,4 @@
     CHARACTER (LEN=2)    ::  coupling_char = ''
     CHARACTER (LEN=5)    ::  write_binary = 'false'
-    CHARACTER (LEN=6)    ::  grid_matching = 'strict'
     CHARACTER (LEN=8)    ::  run_date, run_time
     CHARACTER (LEN=9)    ::  simulated_time_chr
@@ -926,8 +921,8 @@
 !------------------------------------------------------------------------------!
 
-    INTEGER ::  nbgp = 3, ngp_sums, nnx, nx = 0, nx_a, nx_o, nxa, nxl, nxlg,   &
-                nxlu, nxr, nxra, nxrg, nx_on_file, nny, ny = 0, ny_a, ny_o,    &
-                nya, nyn, nyna, nyng, nys, nysg, nysv, ny_on_file, nnz, nz = 0,&
-                nza, nzb, nzb_diff, nzb_max, nzt, nzta, nzt_diff
+    INTEGER ::  nbgp = 3, ngp_sums, nnx, nx = 0, nx_a, nx_o, nxl, nxlg,   &
+                nxlu, nxr, nxrg, nx_on_file, nny, ny = 0, ny_a, ny_o,    &
+                nyn, nyng, nys, nysg, nysv, ny_on_file, nnz, nz = 0,&
+                nzb, nzb_diff, nzb_max, nzt, nzt_diff
 
 
@@ -936,5 +931,5 @@
 
     INTEGER, DIMENSION(:), ALLOCATABLE ::                                      &
-                ngp_2dh, nnx_pe, nny_pe, nxl_mg, nxr_mg, nyn_mg, nys_mg, nzt_mg
+                ngp_2dh, nxl_mg, nxr_mg, nyn_mg, nys_mg, nzt_mg
 
 
@@ -1515,7 +1510,6 @@
 !------------------------------------------------------------------------------!
 
-    INTEGER ::  nxl_y, nxl_yd, nxl_z, nxr_y, nxr_ya, nxr_yd, nxr_yda, nxr_z, &
-                nxr_za, nyn_x, nyn_xa, nyn_z, nyn_za, nys_x, nys_z, nzb_x,   &
-                nzb_y, nzb_yd, nzt_x, nzt_xa, nzt_y, nzt_ya, nzt_yd, nzt_yda
+    INTEGER ::  nxl_y, nxl_yd, nxl_z, nxr_y, nxr_yd, nxr_z, nyn_x, nyn_z,      &
+                nys_x, nys_z, nzb_x, nzb_y, nzb_yd, nzt_x, nzt_y, nzt_yd
                 
 
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 1002)
+++ palm/trunk/SOURCE/parin.f90	(revision 1003)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-!
+! -grid_matching
 !
 ! Former revisions:
@@ -175,5 +175,5 @@
              dt, dt_pr_1d, dt_run_control_1d, dx, dy, dz, dz_max, & 
              dz_stretch_factor, dz_stretch_level, e_init, e_min, end_time_1d, &
-             fft_method, galilei_transformation, grid_matching, humidity, &
+             fft_method, galilei_transformation, humidity, &
              inflow_damping_height, inflow_damping_width, &
              inflow_disturbance_begin, inflow_disturbance_end, &
Index: palm/trunk/SOURCE/poisfft.f90
===================================================================
--- palm/trunk/SOURCE/poisfft.f90	(revision 1002)
+++ palm/trunk/SOURCE/poisfft.f90	(revision 1003)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-!
+! indices nxa, nya, etc. replaced by nx, ny, etc.
 !
 ! Former revisions:
@@ -157,5 +157,5 @@
        IMPLICIT NONE
 
-       REAL, DIMENSION(1:nza,nys:nyna,nxl:nxra) ::  ar, work
+       REAL, DIMENSION(1:nz,nys:nyn,nxl:nxr) ::  ar, work
 
 
@@ -315,5 +315,5 @@
 
 #if defined( __parallel )
-       REAL    ::  ar(nxl_z:nxr_za,nys_z:nyn_za,1:nza)
+       REAL    ::  ar(nxl_z:nxr_z,nys_z:nyn_z,1:nz)
 #else
        REAL    ::  ar(1:nz,nys_z:nyn_z,nxl_z:nxr_z)
@@ -462,5 +462,5 @@
           REAL    ::  tri(5,nxl_z:nxr_z,0:nz-1)
 #if defined( __parallel )
-          REAL    ::  ar(nxl_z:nxr_za,nys_z:nyn_za,1:nza)
+          REAL    ::  ar(nxl_z:nxr_z,nys_z:nyn_z,1:nz)
 #else
           REAL    ::  ar(1:nz,nys_z:nyn_z,nxl_z:nxr_z)
@@ -570,5 +570,5 @@
        CHARACTER (LEN=*) ::  direction
        INTEGER           ::  j, k
-       REAL              ::  ar(0:nxa,nys_x:nyn_xa,nzb_x:nzt_xa)
+       REAL              ::  ar(0:nx,nys_x:nyn_x,nzb_x:nzt_x)
 
 !
@@ -624,5 +624,5 @@
        CHARACTER (LEN=*) ::  direction
        INTEGER           ::  i, k
-       REAL              ::  ar(0:nya,nxl_y:nxr_ya,nzb_y:nzt_ya)
+       REAL              ::  ar(0:ny,nxl_y:nxr_y,nzb_y:nzt_y)
 
 !
@@ -698,7 +698,7 @@
        REAL, DIMENSION(0:ny+1,1:nz,nxl:nxr)             ::  work_ffty_vec
 #endif
-       REAL, DIMENSION(1:nza,0:nya,nxl:nxra)            ::  f_in
-       REAL, DIMENSION(nnx,1:nza,nys_x:nyn_xa,pdims(1)) ::  f_out
-       REAL, DIMENSION(nxl:nxra,1:nza,0:nya)            ::  work
+       REAL, DIMENSION(1:nz,0:ny,nxl:nxr)            ::  f_in
+       REAL, DIMENSION(nnx,1:nz,nys_x:nyn_x,pdims(1)) ::  f_out
+       REAL, DIMENSION(nxl:nxr,1:nz,0:ny)            ::  work
 
 !
@@ -814,7 +814,7 @@
        REAL, DIMENSION(0:ny+1,1:nz,nxl:nxr)             ::  work_ffty_vec
 #endif
-       REAL, DIMENSION(nnx,1:nza,nys_x:nyn_xa,pdims(1)) ::  f_in
-       REAL, DIMENSION(1:nza,0:nya,nxl:nxra)            ::  f_out
-       REAL, DIMENSION(nxl:nxra,1:nza,0:nya)            ::  work
+       REAL, DIMENSION(nnx,1:nz,nys_x:nyn_x,pdims(1)) ::  f_in
+       REAL, DIMENSION(1:nz,0:ny,nxl:nxr)             ::  f_out
+       REAL, DIMENSION(nxl:nxr,1:nz,0:ny)             ::  work
 
 !
@@ -931,8 +931,8 @@
        INTEGER ::  i, j, k, m, n, omp_get_thread_num, tn
 
-       REAL, DIMENSION(0:nx)                            ::  work_fftx
-       REAL, DIMENSION(0:nx,1:nz)                       ::  work_trix
-       REAL, DIMENSION(nnx,1:nza,nys_x:nyn_xa,pdims(1)) ::  ar
-       REAL, DIMENSION(:,:,:,:), ALLOCATABLE            ::  tri
+       REAL, DIMENSION(0:nx)                          ::  work_fftx
+       REAL, DIMENSION(0:nx,1:nz)                     ::  work_trix
+       REAL, DIMENSION(nnx,1:nz,nys_x:nyn_x,pdims(1)) ::  ar
+       REAL, DIMENSION(:,:,:,:), ALLOCATABLE          ::  tri
 
 
@@ -954,5 +954,5 @@
                 m = 0
                 DO  n = 1, pdims(1)
-                   DO  i = 1, nnx_pe( n-1 ) ! WARN: pcoord(i) should be used!!
+                   DO  i = 1, nnx
                       work_trix(m,k) = ar(i,k,j,n)
                       m = m + 1
@@ -971,5 +971,5 @@
                 m = 0
                 DO  n = 1, pdims(1)
-                   DO  i = 1, nnx_pe( n-1 ) ! WARN: pcoord(i) should be used!!
+                   DO  i = 1, nnx
                       work_fftx(m) = ar(i,k,j,n)
                       m = m + 1
@@ -1000,5 +1000,5 @@
                 m = 0
                 DO  n = 1, pdims(1)
-                   DO  i = 1, nnx_pe( n-1 ) ! WARN: pcoord(i) should be used!!
+                   DO  i = 1, nnx
                       ar(i,k,j,n) = work_trix(m,k)
                       m = m + 1
@@ -1021,5 +1021,5 @@
                 m = 0
                 DO  n = 1, pdims(1)
-                   DO  i = 1, nnx_pe( n-1 ) ! WARN: pcoord(i) should be used!!
+                   DO  i = 1, nnx
                       ar(i,k,j,n) = work_fftx(m)
                       m = m + 1
@@ -1062,8 +1062,8 @@
        INTEGER            ::  i, j, k
 
-       REAL, DIMENSION(0:nx,1:nz,nys:nyn)               ::  work_fftx
-       REAL, DIMENSION(1:nza,nys:nyna,0:nxa)            ::  f_in
-       REAL, DIMENSION(nny,1:nza,nxl_y:nxr_ya,pdims(2)) ::  f_out
-       REAL, DIMENSION(nys:nyna,1:nza,0:nxa)            ::  work
+       REAL, DIMENSION(0:nx,1:nz,nys:nyn)             ::  work_fftx
+       REAL, DIMENSION(1:nz,nys:nyn,0:nx)             ::  f_in
+       REAL, DIMENSION(nny,1:nz,nxl_y:nxr_y,pdims(2)) ::  f_out
+       REAL, DIMENSION(nys:nyn,1:nz,0:nx)             ::  work
 
 !
@@ -1166,8 +1166,8 @@
        INTEGER            ::  i, j, k
 
-       REAL, DIMENSION(0:nx,1:nz,nys:nyn)               ::  work_fftx
-       REAL, DIMENSION(nny,1:nza,nxl_y:nxr_ya,pdims(2)) ::  f_in
-       REAL, DIMENSION(1:nza,nys:nyna,0:nxa)            ::  f_out
-       REAL, DIMENSION(nys:nyna,1:nza,0:nxa)            ::  work
+       REAL, DIMENSION(0:nx,1:nz,nys:nyn)             ::  work_fftx
+       REAL, DIMENSION(nny,1:nz,nxl_y:nxr_y,pdims(2)) ::  f_in
+       REAL, DIMENSION(1:nz,nys:nyn,0:nx)             ::  f_out
+       REAL, DIMENSION(nys:nyn,1:nz,0:nx)             ::  work
 
 !
@@ -1271,8 +1271,8 @@
        INTEGER ::  i, j, k, m, n, omp_get_thread_num, tn
 
-       REAL, DIMENSION(0:ny)                            ::  work_ffty
-       REAL, DIMENSION(0:ny,1:nz)                       ::  work_triy
-       REAL, DIMENSION(nny,1:nza,nxl_y:nxr_ya,pdims(2)) ::  ar
-       REAL, DIMENSION(:,:,:,:), ALLOCATABLE            ::  tri
+       REAL, DIMENSION(0:ny)                          ::  work_ffty
+       REAL, DIMENSION(0:ny,1:nz)                     ::  work_triy
+       REAL, DIMENSION(nny,1:nz,nxl_y:nxr_y,pdims(2)) ::  ar
+       REAL, DIMENSION(:,:,:,:), ALLOCATABLE          ::  tri
 
 
@@ -1294,5 +1294,5 @@
                 m = 0
                 DO  n = 1, pdims(2)
-                   DO  j = 1, nny_pe( n-1 ) ! WARN: pcoord(j) should be used!!
+                   DO  j = 1, nny
                       work_triy(m,k) = ar(j,k,i,n)
                       m = m + 1
@@ -1311,5 +1311,5 @@
                 m = 0
                 DO  n = 1, pdims(2)
-                   DO  j = 1, nny_pe( n-1 ) ! WARN: pcoord(j) should be used!!
+                   DO  j = 1, nny
                       work_ffty(m) = ar(j,k,i,n)
                       m = m + 1
@@ -1340,5 +1340,5 @@
                 m = 0
                 DO  n = 1, pdims(2)
-                   DO  j = 1, nny_pe( n-1 ) ! WARN: pcoord(j) should be used!!
+                   DO  j = 1, nny
                       ar(j,k,i,n) = work_triy(m,k)
                       m = m + 1
@@ -1361,5 +1361,5 @@
                 m = 0
                 DO  n = 1, pdims(2)
-                   DO  j = 1, nny_pe( n-1 ) ! WARN: pcoord(j) should be used!!
+                   DO  j = 1, nny
                       ar(j,k,i,n) = work_ffty(m)
                       m = m + 1
Index: palm/trunk/SOURCE/pres.f90
===================================================================
--- palm/trunk/SOURCE/pres.f90	(revision 1002)
+++ palm/trunk/SOURCE/pres.f90	(revision 1003)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-!
+! adjustment of array tend for cases with unequal subdomain sizes removed
 !
 ! Former revisions:
@@ -279,7 +279,7 @@
     ELSE
        !$OMP PARALLEL DO SCHEDULE( STATIC )
-       DO  i = nxl, nxra
-          DO  j = nys, nyna
-             DO  k = nzb+1, nzta
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
                 d(k,j,i) = 0.0
              ENDDO
@@ -409,11 +409,4 @@
 
 !
-!--    Enlarge the size of tend, used as a working array for the transpositions
-       IF ( nxra > nxr  .OR.  nyna > nyn  .OR.  nza > nz )  THEN
-          DEALLOCATE( tend )
-          ALLOCATE( tend(1:nza,nys:nyna,nxl:nxra) )
-       ENDIF
-
-!
 !--    Solve Poisson equation via FFT and solution of tridiagonal matrices
        IF ( psolver == 'poisfft' )  THEN
@@ -427,11 +420,4 @@
 !--       are some optimization problems in poisfft
           CALL poisfft_hybrid( d )
-       ENDIF
-
-!
-!--    Resize tend to its normal size
-       IF ( nxra > nxr  .OR.  nyna > nyn  .OR.  nza > nz )  THEN
-          DEALLOCATE( tend )
-          ALLOCATE( tend(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
        ENDIF
 
Index: palm/trunk/SOURCE/read_var_list.f90
===================================================================
--- palm/trunk/SOURCE/read_var_list.f90	(revision 1002)
+++ palm/trunk/SOURCE/read_var_list.f90	(revision 1003)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! ------------------
-!
+! -grid_matching
 !
 ! Former revisions:
@@ -363,6 +363,4 @@
           CASE ( 'galilei_transformation' )
              READ ( 13 )  galilei_transformation
-          CASE ( 'grid_matching' )
-             READ ( 13 )  grid_matching
           CASE ( 'hom' )
              READ ( 13 )  hom
Index: palm/trunk/SOURCE/transpose.f90
===================================================================
--- palm/trunk/SOURCE/transpose.f90	(revision 1002)
+++ palm/trunk/SOURCE/transpose.f90	(revision 1003)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! indices nxa, nya, etc. replaced by nx, ny, etc.
 !
 ! Former revisions:
@@ -54,7 +54,7 @@
     INTEGER ::  i, j, k, l, m, ys
     
-    REAL ::  f_in(0:nxa,nys_x:nyn_xa,nzb_x:nzt_xa),                     &
-             f_inv(nys_x:nyn_xa,nzb_x:nzt_xa,0:nxa),                    &
-             f_out(0:nya,nxl_y:nxr_ya,nzb_y:nzt_ya),                    &
+    REAL ::  f_in(0:nx,nys_x:nyn_x,nzb_x:nzt_x),   &
+             f_inv(nys_x:nyn_x,nzb_x:nzt_x,0:nx),  &
+             f_out(0:ny,nxl_y:nxr_y,nzb_y:nzt_y),  &
              work(nnx*nny*nnz)
 
@@ -66,7 +66,7 @@
 !$OMP  PARALLEL PRIVATE ( i, j, k )
 !$OMP  DO
-    DO  i = 0, nxa
-       DO  k = nzb_x, nzt_xa
-          DO  j = nys_x, nyn_xa
+    DO  i = 0, nx
+       DO  k = nzb_x, nzt_x
+          DO  j = nys_x, nyn_x
              f_inv(j,k,i) = f_in(i,j,k)
           ENDDO
@@ -89,10 +89,10 @@
 !$OMP  DO
     DO  l = 0, pdims(2) - 1
-       m  = l * ( nxr_ya - nxl_y + 1 ) * ( nzt_ya - nzb_y + 1 ) * &
-                ( nyn_xa - nys_x + 1 )
-       ys = 0 + l * ( nyn_xa - nys_x + 1 )
-       DO  i = nxl_y, nxr_ya
-          DO  k = nzb_y, nzt_ya
-             DO  j = ys, ys + nyn_xa - nys_x
+       m  = l * ( nxr_y - nxl_y + 1 ) * ( nzt_y - nzb_y + 1 ) * &
+                ( nyn_x - nys_x + 1 )
+       ys = 0 + l * ( nyn_x - nys_x + 1 )
+       DO  i = nxl_y, nxr_y
+          DO  k = nzb_y, nzt_y
+             DO  j = ys, ys + nyn_x - nys_x
                 m = m + 1
                 f_out(j,i,k) = work(m)
@@ -128,7 +128,7 @@
     INTEGER ::  i, j, k, l, m, xs
     
-    REAL ::  f_in(0:nxa,nys_x:nyn_xa,nzb_x:nzt_xa),             &
-             f_inv(nys:nyna,nxl:nxra,1:nza),                    &
-             f_out(1:nza,nys:nyna,nxl:nxra),                    &
+    REAL ::  f_in(0:nx,nys_x:nyn_x,nzb_x:nzt_x),  &
+             f_inv(nys:nyn,nxl:nxr,1:nz),         &
+             f_out(1:nz,nys:nyn,nxl:nxr),         &
              work(nnx*nny*nnz)
 
@@ -144,9 +144,9 @@
 !$OMP  DO
        DO  l = 0, pdims(1) - 1
-          m  = l * ( nzt_xa - nzb_x + 1 ) * nnx * ( nyn_xa - nys_x + 1 )
+          m  = l * ( nzt_x - nzb_x + 1 ) * nnx * ( nyn_x - nys_x + 1 )
           xs = 0 + l * nnx
-          DO  k = nzb_x, nzt_xa
+          DO  k = nzb_x, nzt_x
              DO  i = xs, xs + nnx - 1
-                DO  j = nys_x, nyn_xa
+                DO  j = nys_x, nyn_x
                    m = m + 1
                    work(m) = f_in(i,j,k)
@@ -170,7 +170,7 @@
 !$OMP  PARALLEL PRIVATE ( i, j, k )
 !$OMP  DO
-       DO  k = 1, nza
-          DO  i = nxl, nxra
-             DO  j = nys, nyna
+       DO  k = 1, nz
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
                 f_out(k,j,i) = f_inv(j,i,k)
              ENDDO
@@ -183,7 +183,7 @@
 !$OMP  PARALLEL PRIVATE ( i, j, k )
 !$OMP  DO
-       DO  i = nxl, nxra
-          DO  j = nys, nyna
-             DO  k = 1, nza
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = 1, nz
                 f_inv(j,i,k) = f_in(i,j,k)
              ENDDO
@@ -194,7 +194,7 @@
 !$OMP  PARALLEL PRIVATE ( i, j, k )
 !$OMP  DO
-       DO  k = 1, nza
-          DO  i = nxl, nxra
-             DO  j = nys, nyna
+       DO  k = 1, nz
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
                 f_out(k,j,i) = f_inv(j,i,k)
              ENDDO
@@ -231,7 +231,7 @@
     INTEGER ::  i, j, k, l, m, ys
     
-    REAL ::  f_in(0:nya,nxl_y:nxr_ya,nzb_y:nzt_ya),                     &
-             f_inv(nys_x:nyn_xa,nzb_x:nzt_xa,0:nxa),                    &
-             f_out(0:nxa,nys_x:nyn_xa,nzb_x:nzt_xa),                    &
+    REAL ::  f_in(0:ny,nxl_y:nxr_y,nzb_y:nzt_y),  &
+             f_inv(nys_x:nyn_x,nzb_x:nzt_x,0:nx), &
+             f_out(0:nx,nys_x:nyn_x,nzb_x:nzt_x), &
              work(nnx*nny*nnz)
 
@@ -243,10 +243,10 @@
 !$OMP  DO
     DO  l = 0, pdims(2) - 1
-       m  = l * ( nxr_ya - nxl_y + 1 ) * ( nzt_ya - nzb_y + 1 ) * &
-                ( nyn_xa - nys_x + 1 )
-       ys = 0 + l * ( nyn_xa - nys_x + 1 )
-       DO  i = nxl_y, nxr_ya
-          DO  k = nzb_y, nzt_ya
-             DO  j = ys, ys + nyn_xa - nys_x
+       m  = l * ( nxr_y - nxl_y + 1 ) * ( nzt_y - nzb_y + 1 ) * &
+                ( nyn_x - nys_x + 1 )
+       ys = 0 + l * ( nyn_x - nys_x + 1 )
+       DO  i = nxl_y, nxr_y
+          DO  k = nzb_y, nzt_y
+             DO  j = ys, ys + nyn_x - nys_x
                 m = m + 1
                 work(m) = f_in(j,i,k)
@@ -270,7 +270,7 @@
 !$OMP  PARALLEL PRIVATE ( i, j, k )
 !$OMP  DO
-    DO  i = 0, nxa
-       DO  k = nzb_x, nzt_xa
-          DO  j = nys_x, nyn_xa
+    DO  i = 0, nx
+       DO  k = nzb_x, nzt_x
+          DO  j = nys_x, nyn_x
              f_out(i,j,k) = f_inv(j,k,i)
           ENDDO
@@ -306,6 +306,6 @@
     INTEGER ::  i, j, k, l, m, recvcount_yx, sendcount_yx, xs
 
-    REAL ::  f_in(1:nza,nys:nyna,nxl:nxra), f_inv(nxl:nxra,1:nza,nys:nyna), &
-             f_out(0:nxa,nys_x:nyn_xa,nzb_x:nzt_xa),                        &
+    REAL ::  f_in(1:nz,nys:nyn,nxl:nxr), f_inv(nxl:nxr,1:nz,nys:nyn), &
+             f_out(0:nx,nys_x:nyn_x,nzb_x:nzt_x),                     &
              work(nnx*nny*nnz)
 
@@ -315,7 +315,7 @@
 !-- Rearrange indices of input array in order to make data to be send
 !-- by MPI contiguous
-    DO  k = 1, nza
-       DO  j = nys, nyna
-          DO  i = nxl, nxra
+    DO  k = 1, nz
+       DO  j = nys, nyn
+          DO  i = nxl, nxr
              f_inv(i,k,j) = f_in(k,j,i)
           ENDDO
@@ -337,6 +337,6 @@
     DO  l = 0, pdims(1) - 1
        xs = 0 + l * nnx
-       DO  j = nys_x, nyn_xa
-          DO  k = 1, nza
+       DO  j = nys_x, nyn_x
+          DO  k = 1, nz
              DO  i = xs, xs + nnx - 1
                 m = m + 1
@@ -372,7 +372,7 @@
     INTEGER ::  i, j, k, l, m, zs
     
-    REAL ::  f_in(0:nya,nxl_y:nxr_ya,nzb_y:nzt_ya),                     &
-             f_inv(nxl_y:nxr_ya,nzb_y:nzt_ya,0:nya),                    &
-             f_out(nxl_z:nxr_za,nys_z:nyn_za,1:nza),                    &
+    REAL ::  f_in(0:ny,nxl_y:nxr_y,nzb_y:nzt_y),  &
+             f_inv(nxl_y:nxr_y,nzb_y:nzt_y,0:ny), &
+             f_out(nxl_z:nxr_z,nys_z:nyn_z,1:nz), &
              work(nnx*nny*nnz)
 
@@ -384,7 +384,7 @@
 !$OMP  PARALLEL PRIVATE ( i, j, k )
 !$OMP  DO
-    DO  j = 0, nya
-       DO  k = nzb_y, nzt_ya
-          DO  i = nxl_y, nxr_ya
+    DO  j = 0, ny
+       DO  k = nzb_y, nzt_y
+          DO  i = nxl_y, nxr_y
              f_inv(i,k,j) = f_in(j,i,k)
           ENDDO
@@ -401,7 +401,7 @@
 !$OMP  PARALLEL PRIVATE ( i, j, k )
 !$OMP  DO
-       DO  j = 0, nya
-          DO  k = nzb_y, nzt_ya
-             DO  i = nxl_y, nxr_ya
+       DO  j = 0, ny
+          DO  k = nzb_y, nzt_y
+             DO  i = nxl_y, nxr_y
                 f_out(i,j,k) = f_inv(i,k,j)
              ENDDO
@@ -426,10 +426,10 @@
 !$OMP  DO
     DO  l = 0, pdims(1) - 1
-       m  = l * ( nyn_za - nys_z + 1 ) * ( nzt_ya - nzb_y + 1 ) * &
-                ( nxr_za - nxl_z + 1 )
-       zs = 1 + l * ( nzt_ya - nzb_y + 1 )
-       DO  j = nys_z, nyn_za
-          DO  k = zs, zs + nzt_ya - nzb_y
-             DO  i = nxl_z, nxr_za
+       m  = l * ( nyn_z - nys_z + 1 ) * ( nzt_y - nzb_y + 1 ) * &
+                ( nxr_z - nxl_z + 1 )
+       zs = 1 + l * ( nzt_y - nzb_y + 1 )
+       DO  j = nys_z, nyn_z
+          DO  k = zs, zs + nzt_y - nzb_y
+             DO  i = nxl_z, nxr_z
                 m = m + 1
                 f_out(i,j,k) = work(m)
@@ -465,6 +465,6 @@
     INTEGER ::  i, j, k, l, m, xs
     
-    REAL ::  f_in(1:nza,nys:nyna,nxl:nxra), f_inv(nys:nyna,nxl:nxra,1:nza), &
-             f_out(0:nxa,nys_x:nyn_xa,nzb_x:nzt_xa),                        &
+    REAL ::  f_in(1:nz,nys:nyn,nxl:nxr), f_inv(nys:nyn,nxl:nxr,1:nz), &
+             f_out(0:nx,nys_x:nyn_x,nzb_x:nzt_x),                     &
              work(nnx*nny*nnz)
 
@@ -476,7 +476,7 @@
 !$OMP  PARALLEL PRIVATE ( i, j, k )
 !$OMP  DO
-    DO  k = 1,nza
-       DO  i = nxl, nxra
-          DO  j = nys, nyna
+    DO  k = 1,nz
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
              f_inv(j,i,k) = f_in(k,j,i)
           ENDDO
@@ -493,7 +493,7 @@
 !$OMP  PARALLEL PRIVATE ( i, j, k )
 !$OMP  DO
-       DO  k = 1, nza
-          DO  i = nxl, nxra
-             DO  j = nys, nyna
+       DO  k = 1, nz
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
                 f_out(i,j,k) = f_inv(j,i,k)
              ENDDO
@@ -518,9 +518,9 @@
 !$OMP  DO
     DO  l = 0, pdims(1) - 1
-       m  = l * ( nzt_xa - nzb_x + 1 ) * nnx * ( nyn_xa - nys_x + 1 )
+       m  = l * ( nzt_x - nzb_x + 1 ) * nnx * ( nyn_x - nys_x + 1 )
        xs = 0 + l * nnx
-       DO  k = nzb_x, nzt_xa
+       DO  k = nzb_x, nzt_x
           DO  i = xs, xs + nnx - 1
-             DO  j = nys_x, nyn_xa
+             DO  j = nys_x, nyn_x
                 m = m + 1
                 f_out(i,j,k) = work(m)
@@ -556,7 +556,7 @@
     INTEGER ::  i, j, k, l, m, zs
     
-    REAL ::  f_in(nxl_z:nxr_za,nys_z:nyn_za,1:nza),                     &
-             f_inv(nxl_y:nxr_ya,nzb_y:nzt_ya,0:nya),                    &
-             f_out(0:nya,nxl_y:nxr_ya,nzb_y:nzt_ya),                    &
+    REAL ::  f_in(nxl_z:nxr_z,nys_z:nyn_z,1:nz),  &
+             f_inv(nxl_y:nxr_y,nzb_y:nzt_y,0:ny), &
+             f_out(0:ny,nxl_y:nxr_y,nzb_y:nzt_y), &
              work(nnx*nny*nnz)
 
@@ -572,10 +572,10 @@
 !$OMP  DO
        DO  l = 0, pdims(1) - 1
-          m  = l * ( nyn_za - nys_z + 1 ) * ( nzt_ya - nzb_y + 1 ) * &
-                   ( nxr_za - nxl_z + 1 )
-          zs = 1 + l * ( nzt_ya - nzb_y + 1 )
-          DO  j = nys_z, nyn_za
-             DO  k = zs, zs + nzt_ya - nzb_y
-                DO  i = nxl_z, nxr_za
+          m  = l * ( nyn_z - nys_z + 1 ) * ( nzt_y - nzb_y + 1 ) * &
+                   ( nxr_z - nxl_z + 1 )
+          zs = 1 + l * ( nzt_y - nzb_y + 1 )
+          DO  j = nys_z, nyn_z
+             DO  k = zs, zs + nzt_y - nzb_y
+                DO  i = nxl_z, nxr_z
                    m = m + 1
                    work(m) = f_in(i,j,k)
@@ -599,7 +599,7 @@
 !$OMP  PARALLEL PRIVATE ( i, j, k )
 !$OMP  DO
-       DO  j = 0, nya
-          DO  k = nzb_y, nzt_ya
-             DO  i = nxl_y, nxr_ya
+       DO  j = 0, ny
+          DO  k = nzb_y, nzt_y
+             DO  i = nxl_y, nxr_y
                 f_out(j,i,k) = f_inv(i,k,j)
              ENDDO
@@ -612,7 +612,7 @@
 !$OMP  PARALLEL PRIVATE ( i, j, k )
 !$OMP  DO
-       DO  k = nzb_y, nzt_ya
-          DO  j = 0, nya
-             DO  i = nxl_y, nxr_ya
+       DO  k = nzb_y, nzt_y
+          DO  j = 0, ny
+             DO  i = nxl_y, nxr_y
                 f_inv(i,k,j) = f_in(i,j,k)
              ENDDO
@@ -624,7 +624,7 @@
 !$OMP  PARALLEL PRIVATE ( i, j, k )
 !$OMP  DO
-       DO  k = nzb_y, nzt_ya
-          DO  i = nxl_y, nxr_ya
-             DO  j = 0, nya
+       DO  k = nzb_y, nzt_y
+          DO  i = nxl_y, nxr_y
+             DO  j = 0, ny
                 f_out(j,i,k) = f_inv(i,k,j)
              ENDDO
@@ -662,6 +662,6 @@
     INTEGER ::  i, j, k, l, m, ys
     
-    REAL ::  f_in(1:nza,nys:nyna,nxl:nxra), f_inv(nys:nyna,nxl:nxra,1:nza), &
-             f_out(0:nya,nxl_yd:nxr_yda,nzb_yd:nzt_yda),                    &
+    REAL ::  f_in(1:nz,nys:nyn,nxl:nxr), f_inv(nys:nyn,nxl:nxr,1:nz), &
+             f_out(0:ny,nxl_yd:nxr_yd,nzb_yd:nzt_yd),                 &
              work(nnx*nny*nnz)
 
@@ -671,7 +671,7 @@
 !-- Rearrange indices of input array in order to make data to be send
 !-- by MPI contiguous
-    DO  i = nxl, nxra
-       DO  j = nys, nyna
-          DO  k = 1, nza
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = 1, nz
              f_inv(j,i,k) = f_in(k,j,i)
           ENDDO
@@ -685,7 +685,7 @@
 !-- of the data is necessary and no transposition has to be done.
     IF ( pdims(2) == 1 )  THEN
-       DO  k = 1, nza
-          DO  i = nxl, nxra
-             DO  j = nys, nyna
+       DO  k = 1, nz
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
                 f_out(j,i,k) = f_inv(j,i,k)
              ENDDO
@@ -709,6 +709,6 @@
     DO  l = 0, pdims(2) - 1
        ys = 0 + l * nny
-       DO  k = nzb_yd, nzt_yda
-          DO  i = nxl_yd, nxr_yda
+       DO  k = nzb_yd, nzt_yd
+          DO  i = nxl_yd, nxr_yd
              DO  j = ys, ys + nny - 1
                 m = m + 1
Index: palm/trunk/SOURCE/write_var_list.f90
===================================================================
--- palm/trunk/SOURCE/write_var_list.f90	(revision 1002)
+++ palm/trunk/SOURCE/write_var_list.f90	(revision 1003)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-!
+! -grid_matching
 !
 ! Former revisions:
@@ -285,6 +285,4 @@
     WRITE ( 14 )  'galilei_transformation        '
     WRITE ( 14 )  galilei_transformation
-    WRITE ( 14 )  'grid_matching                 '
-    WRITE ( 14 )  grid_matching
     WRITE ( 14 )  'hom                           '
     WRITE ( 14 )  hom
