Index: /palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- /palm/trunk/SOURCE/init_3d_model.f90	(revision 4129)
+++ /palm/trunk/SOURCE/init_3d_model.f90	(revision 4130)
@@ -25,4 +25,9 @@
 ! -----------------
 ! $Id$
+! Effectively reduce 3D initialization to 1D initial profiles. This is because
+! 3D initialization produces structures in the w-component that are correlated
+! with the processor grid for some unknown reason  
+! 
+! 4090 2019-07-11 15:06:47Z Giersch
 ! Unused variables removed
 ! 
@@ -1191,78 +1196,24 @@
 
 !
-!--       Write initial profiles onto 3D arrays. Note, only in case of lod = 1, 
-!--       for lod = 2 data is already on 3D arrays.   
+!--       Write initial profiles onto 3D arrays. 
+!--       Work-around, 3D initialization of u,v,w creates artificial 
+!--       structures wich correlate with the processor grid. The reason
+!--       for this is still unknown. To work-around this, 3D initialization
+!--       will be effectively reduce to a 1D initialization where no such
+!--       artificial structures appear.
           DO  i = nxlg, nxrg
              DO  j = nysg, nyng
-                IF( init_3d%lod_u == 1 )  u(:,j,i) = u_init(:)
-                IF( init_3d%lod_v == 1 )  v(:,j,i) = v_init(:)
-                IF( .NOT. neutral  .AND.  init_3d%lod_pt == 1 )                &
+                IF( init_3d%lod_u == 1  .OR.  init_3d%lod_u == 2 )             &
+                   u(:,j,i) = u_init(:)
+                IF( init_3d%lod_v == 1  .OR.  init_3d%lod_u == 2 )             &
+                   v(:,j,i) = v_init(:)
+                IF( .NOT. neutral  .AND.                                       &
+                    ( init_3d%lod_pt == 1  .OR.  init_3d%lod_pt == 2 ) )       &
                    pt(:,j,i) = pt_init(:)
-                IF( humidity  .AND.  init_3d%lod_q == 1 )  q(:,j,i) = q_init(:)
+                IF( humidity  .AND.                                            &
+                    ( init_3d%lod_q == 1  .OR.  init_3d%lod_q == 2 ) )         &
+                   q(:,j,i) = q_init(:)
              ENDDO
           ENDDO
-!
-!--       Exchange ghost points and set boundary conditions in case of 
-!--       level-of-detail = 2
-          IF( init_3d%lod_u == 2 )  CALL exchange_horiz( u, nbgp )
-          IF( init_3d%lod_v == 2 )  CALL exchange_horiz( v, nbgp )
-          IF( init_3d%lod_w == 2 )  CALL exchange_horiz( w, nbgp )
-          IF( .NOT. neutral  .AND.  init_3d%lod_pt == 2 )                      &
-             CALL exchange_horiz( pt, nbgp )
-          IF( humidity  .AND.  init_3d%lod_q == 2 )                            &
-             CALL exchange_horiz( q, nbgp )
-          
-          IF ( bc_dirichlet_l )  THEN
-             DO  j = nysg, nyng
-                DO  k = nzb, nzt+1
-                   IF( init_3d%lod_u == 2 )  u(k,j,nxlg:nxl)   = u(k,j,nxlu)
-                   IF( init_3d%lod_v == 2 )  v(k,j,nxlg:nxl-1) = v(k,j,nxl)
-                   IF( init_3d%lod_w == 2 )  w(k,j,nxlg:nxl-1) = w(k,j,nxl)
-                   IF( .NOT. neutral  .AND.  init_3d%lod_pt == 2 )                      &
-                      pt(k,j,nxlg:nxl-1) = pt(k,j,nxl)
-                   IF( humidity  .AND.  init_3d%lod_q == 2 )                            &
-                      q(k,j,nxlg:nxl-1)  = q(k,j,nxl) 
-                ENDDO
-             ENDDO
-          ENDIF
-          IF ( bc_dirichlet_r )  THEN
-             DO  j = nysg, nyng
-                DO  k = nzb, nzt+1
-                   IF( init_3d%lod_u == 2 )  u(k,j,nxr+1:nxrg) = u(k,j,nxr)
-                   IF( init_3d%lod_v == 2 )  v(k,j,nxr+1:nxrg) = v(k,j,nxr)
-                   IF( init_3d%lod_w == 2 )  w(k,j,nxr+1:nxrg) = w(k,j,nxr)
-                   IF( .NOT. neutral  .AND.  init_3d%lod_pt == 2 )                      &
-                      pt(k,j,nxr+1:nxrg) = pt(k,j,nxr)
-                   IF( humidity  .AND.  init_3d%lod_q == 2 )                            &
-                      q(k,j,nxr+1:nxrg)  = q(k,j,nxr) 
-                ENDDO
-             ENDDO
-          ENDIF
-          IF ( bc_dirichlet_s )  THEN
-             DO  i = nxlg, nxrg
-                DO  k = nzb, nzt+1
-                   IF( init_3d%lod_u == 2 )  u(k,nysg:nys-1,i) = u(k,nys,i)
-                   IF( init_3d%lod_v == 2 )  v(k,nysg:nys,i)   = v(k,nysv,i)
-                   IF( init_3d%lod_w == 2 )  w(k,nysg:nys-1,i) = w(k,nys,i)
-                   IF( .NOT. neutral  .AND.  init_3d%lod_pt == 2 )                      &
-                      pt(k,nysg:nys-1,i) = pt(k,nys,i)
-                   IF( humidity  .AND.  init_3d%lod_q == 2 )                            &
-                      q(k,nysg:nys-1,i)  = q(k,nys,i)
-                ENDDO
-             ENDDO
-          ENDIF
-          IF ( bc_dirichlet_n )  THEN
-             DO  i = nxlg, nxrg
-                DO  k = nzb, nzt+1
-                   IF( init_3d%lod_u == 2 )  u(k,nyn+1:nyng,i) = u(k,nyn,i)
-                   IF( init_3d%lod_v == 2 )  v(k,nyn+1:nyng,i) = v(k,nyn,i)
-                   IF( init_3d%lod_w == 2 )  w(k,nyn+1:nyng,i) = w(k,nyn,i)
-                   IF( .NOT. neutral  .AND.  init_3d%lod_pt == 2 )                      &
-                      pt(k,nyn+1:nyng,i) = pt(k,nyn,i)
-                   IF( humidity  .AND.  init_3d%lod_q == 2 )                            &
-                      q(k,nyn+1:nyng,i)  = q(k,nyn,i)
-                ENDDO
-             ENDDO
-          ENDIF
 !
 !--       Set geostrophic wind components.  
