Index: /palm/trunk/SOURCE/dynamics_mod.f90
===================================================================
--- /palm/trunk/SOURCE/dynamics_mod.f90	(revision 4844)
+++ /palm/trunk/SOURCE/dynamics_mod.f90	(revision 4845)
@@ -24,4 +24,8 @@
 ! -----------------
 ! $Id$
+! radiation boundary condition always uses maximum phase velocity, respective code for calculating
+! the phase velocity is removed
+!
+! 4843 2021-01-15 15:22:11Z raasch
 ! local namelist parameter added to switch off the module although the respective module namelist
 ! appears in the namelist file
@@ -83,6 +87,5 @@
 
     USE arrays_3d,                                                                                 &
-        ONLY:  c_u, c_u_m, c_u_m_l, c_v, c_v_m, c_v_m_l, c_w, c_w_m, c_w_m_l,                      &
-               diss,                                                                               &
+        ONLY:  diss,                                                                               &
                diss_p,                                                                             &
                dzu,                                                                                &
@@ -94,7 +97,7 @@
                q, q_1, q_2, q_p,                                                                   &
                s, s_1, s_2, s_p,                                                                   &
-               u, u_1, u_2, u_init, u_p, u_m_l, u_m_n, u_m_r, u_m_s,                               &
-               v, v_1, v_2, v_p, v_init, v_m_l, v_m_n, v_m_r, v_m_s,                               &
-               w, w_1, w_2, w_p, w_m_l, w_m_n, w_m_r, w_m_s,                                       &
+               u, u_1, u_2, u_init, u_p,                                                           &
+               v, v_1, v_2, v_p, v_init,                                                           &
+               w, w_1, w_2, w_p,                                                                   &
                zu
 
@@ -138,6 +141,5 @@
                rans_mode,                                                                          &
                rans_tke_e,                                                                         &
-               tsc,                                                                                &
-               use_cmax
+               tsc
 
     USE exchange_horiz_mod,                                                                        &
@@ -896,7 +898,4 @@
     INTEGER(iwp) ::  m  !< running index surface elements
 
-    REAL(wp)    ::  c_max !< maximum phase velocity allowed by CFL criterion, used for outflow boundary condition
-    REAL(wp)    ::  denom !< horizontal gradient of velocity component normal to the outflow boundary
-
 !
 !-- Bottom boundary
@@ -1128,564 +1127,33 @@
 !
 !-- Radiation boundary conditions for the velocities at the respective outflow.
-!-- The phase velocity is either assumed to the maximum phase velocity that ensures numerical
-!-- stability (CFL-condition) or calculated after Orlanski(1976) and averaged along the outflow
-!-- boundary.
+!-- The phase velocity is set to the maximum phase velocity that ensures numerical
+!-- stability (CFL-condition), i.e. a Courant number of one is assumed.
     IF ( bc_radiation_s )  THEN
-
-       IF ( use_cmax )  THEN
-          u_p(:,-1,:) = u(:,0,:)
-          v_p(:,0,:)  = v(:,1,:)
-          w_p(:,-1,:) = w(:,0,:)
-       ELSEIF ( .NOT. use_cmax )  THEN
-
-          c_max = dy / dt_3d
-
-          c_u_m_l = 0.0_wp
-          c_v_m_l = 0.0_wp
-          c_w_m_l = 0.0_wp
-
-          c_u_m = 0.0_wp
-          c_v_m = 0.0_wp
-          c_w_m = 0.0_wp
-
-!
-!--       Calculate the phase speeds for u, v, and w, first local and then average along the outflow
-!--       boundary.
-          DO  k = nzb+1, nzt+1
-             DO  i = nxl, nxr
-
-                denom = u_m_s(k,0,i) - u_m_s(k,1,i)
-
-                IF ( denom /= 0.0_wp )  THEN
-                   c_u(k,i) = -c_max * ( u(k,0,i) - u_m_s(k,0,i) ) / ( denom * tsc(2) )
-                   IF ( c_u(k,i) < 0.0_wp )  THEN
-                      c_u(k,i) = 0.0_wp
-                   ELSEIF ( c_u(k,i) > c_max )  THEN
-                      c_u(k,i) = c_max
-                   ENDIF
-                ELSE
-                   c_u(k,i) = c_max
-                ENDIF
-
-                denom = v_m_s(k,1,i) - v_m_s(k,2,i)
-
-                IF ( denom /= 0.0_wp )  THEN
-                   c_v(k,i) = -c_max * ( v(k,1,i) - v_m_s(k,1,i) ) / ( denom * tsc(2) )
-                   IF ( c_v(k,i) < 0.0_wp )  THEN
-                      c_v(k,i) = 0.0_wp
-                   ELSEIF ( c_v(k,i) > c_max )  THEN
-                      c_v(k,i) = c_max
-                   ENDIF
-                ELSE
-                   c_v(k,i) = c_max
-                ENDIF
-
-                denom = w_m_s(k,0,i) - w_m_s(k,1,i)
-
-                IF ( denom /= 0.0_wp )  THEN
-                   c_w(k,i) = -c_max * ( w(k,0,i) - w_m_s(k,0,i) ) / ( denom * tsc(2) )
-                   IF ( c_w(k,i) < 0.0_wp )  THEN
-                      c_w(k,i) = 0.0_wp
-                   ELSEIF ( c_w(k,i) > c_max )  THEN
-                      c_w(k,i) = c_max
-                   ENDIF
-                ELSE
-                   c_w(k,i) = c_max
-                ENDIF
-
-                c_u_m_l(k) = c_u_m_l(k) + c_u(k,i)
-                c_v_m_l(k) = c_v_m_l(k) + c_v(k,i)
-                c_w_m_l(k) = c_w_m_l(k) + c_w(k,i)
-
-             ENDDO
-          ENDDO
-
-#if defined( __parallel )
-          IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
-          CALL MPI_ALLREDUCE( c_u_m_l(nzb+1), c_u_m(nzb+1), nzt-nzb, MPI_REAL, MPI_SUM, comm1dx,   &
-                              ierr )
-          IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
-          CALL MPI_ALLREDUCE( c_v_m_l(nzb+1), c_v_m(nzb+1), nzt-nzb, MPI_REAL, MPI_SUM, comm1dx,   &
-                              ierr )
-          IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
-          CALL MPI_ALLREDUCE( c_w_m_l(nzb+1), c_w_m(nzb+1), nzt-nzb, MPI_REAL, MPI_SUM, comm1dx,   &
-                              ierr )
-#else
-          c_u_m = c_u_m_l
-          c_v_m = c_v_m_l
-          c_w_m = c_w_m_l
-#endif
-
-          c_u_m = c_u_m / (nx+1)
-          c_v_m = c_v_m / (nx+1)
-          c_w_m = c_w_m / (nx+1)
-
-!
-!--       Save old timelevels for the next timestep
-          IF ( intermediate_timestep_count == 1 )  THEN
-             u_m_s(:,:,:) = u(:,0:1,:)
-             v_m_s(:,:,:) = v(:,1:2,:)
-             w_m_s(:,:,:) = w(:,0:1,:)
-          ENDIF
-
-!
-!--       Calculate the new velocities
-          DO  k = nzb+1, nzt+1
-             DO  i = nxlg, nxrg
-                u_p(k,-1,i) = u(k,-1,i) - dt_3d * tsc(2) * c_u_m(k) *                              &
-                                          ( u(k,-1,i) - u(k,0,i) ) * ddy
-
-                v_p(k,0,i)  = v(k,0,i)  - dt_3d * tsc(2) * c_v_m(k) *                              &
-                                          ( v(k,0,i) - v(k,1,i) ) * ddy
-
-                w_p(k,-1,i) = w(k,-1,i) - dt_3d * tsc(2) * c_w_m(k) *                              &
-                                          ( w(k,-1,i) - w(k,0,i) ) * ddy
-             ENDDO
-          ENDDO
-
-!
-!--       Bottom boundary at the outflow
-          IF ( ibc_uv_b == 0 )  THEN
-             u_p(nzb,-1,:) = 0.0_wp
-             v_p(nzb,0,:)  = 0.0_wp
-          ELSE
-             u_p(nzb,-1,:) =  u_p(nzb+1,-1,:)
-             v_p(nzb,0,:)  =  v_p(nzb+1,0,:)
-          ENDIF
-          w_p(nzb,-1,:) = 0.0_wp
-
-!
-!--       Top boundary at the outflow
-          IF ( ibc_uv_t == 0 )  THEN
-             u_p(nzt+1,-1,:) = u_init(nzt+1)
-             v_p(nzt+1,0,:)  = v_init(nzt+1)
-          ELSE
-             u_p(nzt+1,-1,:) = u_p(nzt,-1,:)
-             v_p(nzt+1,0,:)  = v_p(nzt,0,:)
-          ENDIF
-          w_p(nzt:nzt+1,-1,:) = 0.0_wp
-
-       ENDIF
-
+       u_p(:,-1,:) = u(:,0,:)
+       v_p(:,0,:)  = v(:,1,:)
+       w_p(:,-1,:) = w(:,0,:)
     ENDIF
 
     IF ( bc_radiation_n )  THEN
-
-       IF ( use_cmax )  THEN
-          u_p(:,ny+1,:) = u(:,ny,:)
-          v_p(:,ny+1,:) = v(:,ny,:)
-          w_p(:,ny+1,:) = w(:,ny,:)
-       ELSEIF ( .NOT. use_cmax )  THEN
-
-          c_max = dy / dt_3d
-
-          c_u_m_l = 0.0_wp
-          c_v_m_l = 0.0_wp
-          c_w_m_l = 0.0_wp
-
-          c_u_m = 0.0_wp
-          c_v_m = 0.0_wp
-          c_w_m = 0.0_wp
-
-!
-!--       Calculate the phase speeds for u, v, and w, first local and then average along the outflow
-!--       boundary.
-          DO  k = nzb+1, nzt+1
-             DO  i = nxl, nxr
-
-                denom = u_m_n(k,ny,i) - u_m_n(k,ny-1,i)
-
-                IF ( denom /= 0.0_wp )  THEN
-                   c_u(k,i) = -c_max * ( u(k,ny,i) - u_m_n(k,ny,i) ) / ( denom * tsc(2) )
-                   IF ( c_u(k,i) < 0.0_wp )  THEN
-                      c_u(k,i) = 0.0_wp
-                   ELSEIF ( c_u(k,i) > c_max )  THEN
-                      c_u(k,i) = c_max
-                   ENDIF
-                ELSE
-                   c_u(k,i) = c_max
-                ENDIF
-
-                denom = v_m_n(k,ny,i) - v_m_n(k,ny-1,i)
-
-                IF ( denom /= 0.0_wp )  THEN
-                   c_v(k,i) = -c_max * ( v(k,ny,i) - v_m_n(k,ny,i) ) / ( denom * tsc(2) )
-                   IF ( c_v(k,i) < 0.0_wp )  THEN
-                      c_v(k,i) = 0.0_wp
-                   ELSEIF ( c_v(k,i) > c_max )  THEN
-                      c_v(k,i) = c_max
-                   ENDIF
-                ELSE
-                   c_v(k,i) = c_max
-                ENDIF
-
-                denom = w_m_n(k,ny,i) - w_m_n(k,ny-1,i)
-
-                IF ( denom /= 0.0_wp )  THEN
-                   c_w(k,i) = -c_max * ( w(k,ny,i) - w_m_n(k,ny,i) ) / ( denom * tsc(2) )
-                   IF ( c_w(k,i) < 0.0_wp )  THEN
-                      c_w(k,i) = 0.0_wp
-                   ELSEIF ( c_w(k,i) > c_max )  THEN
-                      c_w(k,i) = c_max
-                   ENDIF
-                ELSE
-                   c_w(k,i) = c_max
-                ENDIF
-
-                c_u_m_l(k) = c_u_m_l(k) + c_u(k,i)
-                c_v_m_l(k) = c_v_m_l(k) + c_v(k,i)
-                c_w_m_l(k) = c_w_m_l(k) + c_w(k,i)
-
-             ENDDO
-          ENDDO
-
-#if defined( __parallel )
-          IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
-          CALL MPI_ALLREDUCE( c_u_m_l(nzb+1), c_u_m(nzb+1), nzt-nzb, MPI_REAL, MPI_SUM, comm1dx,   &
-                              ierr )
-          IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
-          CALL MPI_ALLREDUCE( c_v_m_l(nzb+1), c_v_m(nzb+1), nzt-nzb, MPI_REAL, MPI_SUM, comm1dx,   &
-                              ierr )
-          IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
-          CALL MPI_ALLREDUCE( c_w_m_l(nzb+1), c_w_m(nzb+1), nzt-nzb, MPI_REAL, MPI_SUM, comm1dx,   &
-                              ierr )
-#else
-          c_u_m = c_u_m_l
-          c_v_m = c_v_m_l
-          c_w_m = c_w_m_l
-#endif
-
-          c_u_m = c_u_m / (nx+1)
-          c_v_m = c_v_m / (nx+1)
-          c_w_m = c_w_m / (nx+1)
-
-!
-!--       Save old timelevels for the next timestep
-          IF ( intermediate_timestep_count == 1 )  THEN
-                u_m_n(:,:,:) = u(:,ny-1:ny,:)
-                v_m_n(:,:,:) = v(:,ny-1:ny,:)
-                w_m_n(:,:,:) = w(:,ny-1:ny,:)
-          ENDIF
-
-!
-!--       Calculate the new velocities
-          DO  k = nzb+1, nzt+1
-             DO  i = nxlg, nxrg
-                u_p(k,ny+1,i) = u(k,ny+1,i) - dt_3d * tsc(2) * c_u_m(k) *                          &
-                                              ( u(k,ny+1,i) - u(k,ny,i) ) * ddy
-
-                v_p(k,ny+1,i) = v(k,ny+1,i)  - dt_3d * tsc(2) * c_v_m(k) *                         &
-                                               ( v(k,ny+1,i) - v(k,ny,i) ) * ddy
-
-                w_p(k,ny+1,i) = w(k,ny+1,i) - dt_3d * tsc(2) * c_w_m(k) *                          &
-                                              ( w(k,ny+1,i) - w(k,ny,i) ) * ddy
-             ENDDO
-          ENDDO
-
-!
-!--       Bottom boundary at the outflow
-          IF ( ibc_uv_b == 0 )  THEN
-             u_p(nzb,ny+1,:) = 0.0_wp
-             v_p(nzb,ny+1,:) = 0.0_wp
-          ELSE
-             u_p(nzb,ny+1,:) =  u_p(nzb+1,ny+1,:)
-             v_p(nzb,ny+1,:) =  v_p(nzb+1,ny+1,:)
-          ENDIF
-          w_p(nzb,ny+1,:) = 0.0_wp
-
-!
-!--       Top boundary at the outflow
-          IF ( ibc_uv_t == 0 )  THEN
-             u_p(nzt+1,ny+1,:) = u_init(nzt+1)
-             v_p(nzt+1,ny+1,:) = v_init(nzt+1)
-          ELSE
-             u_p(nzt+1,ny+1,:) = u_p(nzt,nyn+1,:)
-             v_p(nzt+1,ny+1,:) = v_p(nzt,nyn+1,:)
-          ENDIF
-          w_p(nzt:nzt+1,ny+1,:) = 0.0_wp
-
-       ENDIF
-
+       u_p(:,ny+1,:) = u(:,ny,:)
+       v_p(:,ny+1,:) = v(:,ny,:)
+       w_p(:,ny+1,:) = w(:,ny,:)
     ENDIF
 
     IF ( bc_radiation_l )  THEN
-
-       IF ( use_cmax )  THEN
-          u_p(:,:,0)  = u(:,:,1)
-          v_p(:,:,-1) = v(:,:,0)
-          w_p(:,:,-1) = w(:,:,0)
-       ELSEIF ( .NOT. use_cmax )  THEN
-
-          c_max = dx / dt_3d
-
-          c_u_m_l = 0.0_wp
-          c_v_m_l = 0.0_wp
-          c_w_m_l = 0.0_wp
-
-          c_u_m = 0.0_wp
-          c_v_m = 0.0_wp
-          c_w_m = 0.0_wp
-
-!
-!--       Calculate the phase speeds for u, v, and w, first local and then average along the outflow
-!--       boundary.
-          DO  k = nzb+1, nzt+1
-             DO  j = nys, nyn
-
-                denom = u_m_l(k,j,1) - u_m_l(k,j,2)
-
-                IF ( denom /= 0.0_wp )  THEN
-                   c_u(k,j) = -c_max * ( u(k,j,1) - u_m_l(k,j,1) ) / ( denom * tsc(2) )
-                   IF ( c_u(k,j) < 0.0_wp )  THEN
-                      c_u(k,j) = 0.0_wp
-                   ELSEIF ( c_u(k,j) > c_max )  THEN
-                      c_u(k,j) = c_max
-                   ENDIF
-                ELSE
-                   c_u(k,j) = c_max
-                ENDIF
-
-                denom = v_m_l(k,j,0) - v_m_l(k,j,1)
-
-                IF ( denom /= 0.0_wp )  THEN
-                   c_v(k,j) = -c_max * ( v(k,j,0) - v_m_l(k,j,0) ) / ( denom * tsc(2) )
-                   IF ( c_v(k,j) < 0.0_wp )  THEN
-                      c_v(k,j) = 0.0_wp
-                   ELSEIF ( c_v(k,j) > c_max )  THEN
-                      c_v(k,j) = c_max
-                   ENDIF
-                ELSE
-                   c_v(k,j) = c_max
-                ENDIF
-
-                denom = w_m_l(k,j,0) - w_m_l(k,j,1)
-
-                IF ( denom /= 0.0_wp )  THEN
-                   c_w(k,j) = -c_max * ( w(k,j,0) - w_m_l(k,j,0) ) / ( denom * tsc(2) )
-                   IF ( c_w(k,j) < 0.0_wp )  THEN
-                      c_w(k,j) = 0.0_wp
-                   ELSEIF ( c_w(k,j) > c_max )  THEN
-                      c_w(k,j) = c_max
-                   ENDIF
-                ELSE
-                   c_w(k,j) = c_max
-                ENDIF
-
-                c_u_m_l(k) = c_u_m_l(k) + c_u(k,j)
-                c_v_m_l(k) = c_v_m_l(k) + c_v(k,j)
-                c_w_m_l(k) = c_w_m_l(k) + c_w(k,j)
-
-             ENDDO
-          ENDDO
-
-#if defined( __parallel )
-          IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
-          CALL MPI_ALLREDUCE( c_u_m_l(nzb+1), c_u_m(nzb+1), nzt-nzb, MPI_REAL, MPI_SUM, comm1dy,   &
-                              ierr )
-          IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
-          CALL MPI_ALLREDUCE( c_v_m_l(nzb+1), c_v_m(nzb+1), nzt-nzb, MPI_REAL, MPI_SUM, comm1dy,   &
-                              ierr )
-          IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
-          CALL MPI_ALLREDUCE( c_w_m_l(nzb+1), c_w_m(nzb+1), nzt-nzb, MPI_REAL, MPI_SUM, comm1dy,   &
-                              ierr )
-#else
-          c_u_m = c_u_m_l
-          c_v_m = c_v_m_l
-          c_w_m = c_w_m_l
-#endif
-
-          c_u_m = c_u_m / (ny+1)
-          c_v_m = c_v_m / (ny+1)
-          c_w_m = c_w_m / (ny+1)
-
-!
-!--       Save old timelevels for the next timestep
-          IF ( intermediate_timestep_count == 1 )  THEN
-                u_m_l(:,:,:) = u(:,:,1:2)
-                v_m_l(:,:,:) = v(:,:,0:1)
-                w_m_l(:,:,:) = w(:,:,0:1)
-          ENDIF
-
-!
-!--       Calculate the new velocities
-          DO  k = nzb+1, nzt+1
-             DO  j = nysg, nyng
-                u_p(k,j,0)  = u(k,j,0) - dt_3d * tsc(2) * c_u_m(k) *                               &
-                                         ( u(k,j,0) - u(k,j,1) ) * ddx
-
-                v_p(k,j,-1) = v(k,j,-1) - dt_3d * tsc(2) * c_v_m(k) *                              &
-                                          ( v(k,j,-1) - v(k,j,0) ) * ddx
-
-                w_p(k,j,-1) = w(k,j,-1) - dt_3d * tsc(2) * c_w_m(k) *                              &
-                                          ( w(k,j,-1) - w(k,j,0) ) * ddx
-             ENDDO
-          ENDDO
-
-!
-!--       Bottom boundary at the outflow
-          IF ( ibc_uv_b == 0 )  THEN
-             u_p(nzb,:,0)  = 0.0_wp
-             v_p(nzb,:,-1) = 0.0_wp
-          ELSE
-             u_p(nzb,:,0)  =  u_p(nzb+1,:,0)
-             v_p(nzb,:,-1) =  v_p(nzb+1,:,-1)
-          ENDIF
-          w_p(nzb,:,-1) = 0.0_wp
-
-!
-!--       Top boundary at the outflow
-          IF ( ibc_uv_t == 0 )  THEN
-             u_p(nzt+1,:,0)  = u_init(nzt+1)
-             v_p(nzt+1,:,-1) = v_init(nzt+1)
-          ELSE
-             u_p(nzt+1,:,0)  = u_p(nzt,:,0)
-             v_p(nzt+1,:,-1) = v_p(nzt,:,-1)
-          ENDIF
-          w_p(nzt:nzt+1,:,-1) = 0.0_wp
-
-       ENDIF
-
+       u_p(:,:,0)  = u(:,:,1)
+       v_p(:,:,-1) = v(:,:,0)
+       w_p(:,:,-1) = w(:,:,0)
     ENDIF
 
     IF ( bc_radiation_r )  THEN
-
-       IF ( use_cmax )  THEN
-          u_p(:,:,nx+1) = u(:,:,nx)
-          v_p(:,:,nx+1) = v(:,:,nx)
-          w_p(:,:,nx+1) = w(:,:,nx)
-       ELSEIF ( .NOT. use_cmax )  THEN
-
-          c_max = dx / dt_3d
-
-          c_u_m_l = 0.0_wp
-          c_v_m_l = 0.0_wp
-          c_w_m_l = 0.0_wp
-
-          c_u_m = 0.0_wp
-          c_v_m = 0.0_wp
-          c_w_m = 0.0_wp
-
-!
-!--       Calculate the phase speeds for u, v, and w, first local and then average along the outflow
-!--       boundary.
-          DO  k = nzb+1, nzt+1
-             DO  j = nys, nyn
-
-                denom = u_m_r(k,j,nx) - u_m_r(k,j,nx-1)
-
-                IF ( denom /= 0.0_wp )  THEN
-                   c_u(k,j) = -c_max * ( u(k,j,nx) - u_m_r(k,j,nx) ) / ( denom * tsc(2) )
-                   IF ( c_u(k,j) < 0.0_wp )  THEN
-                      c_u(k,j) = 0.0_wp
-                   ELSEIF ( c_u(k,j) > c_max )  THEN
-                      c_u(k,j) = c_max
-                   ENDIF
-                ELSE
-                   c_u(k,j) = c_max
-                ENDIF
-
-                denom = v_m_r(k,j,nx) - v_m_r(k,j,nx-1)
-
-                IF ( denom /= 0.0_wp )  THEN
-                   c_v(k,j) = -c_max * ( v(k,j,nx) - v_m_r(k,j,nx) ) / ( denom * tsc(2) )
-                   IF ( c_v(k,j) < 0.0_wp )  THEN
-                      c_v(k,j) = 0.0_wp
-                   ELSEIF ( c_v(k,j) > c_max )  THEN
-                      c_v(k,j) = c_max
-                   ENDIF
-                ELSE
-                   c_v(k,j) = c_max
-                ENDIF
-
-                denom = w_m_r(k,j,nx) - w_m_r(k,j,nx-1)
-
-                IF ( denom /= 0.0_wp )  THEN
-                   c_w(k,j) = -c_max * ( w(k,j,nx) - w_m_r(k,j,nx) ) / ( denom * tsc(2) )
-                   IF ( c_w(k,j) < 0.0_wp )  THEN
-                      c_w(k,j) = 0.0_wp
-                   ELSEIF ( c_w(k,j) > c_max )  THEN
-                      c_w(k,j) = c_max
-                   ENDIF
-                ELSE
-                   c_w(k,j) = c_max
-                ENDIF
-
-                c_u_m_l(k) = c_u_m_l(k) + c_u(k,j)
-                c_v_m_l(k) = c_v_m_l(k) + c_v(k,j)
-                c_w_m_l(k) = c_w_m_l(k) + c_w(k,j)
-
-             ENDDO
-          ENDDO
-
-#if defined( __parallel )
-          IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
-          CALL MPI_ALLREDUCE( c_u_m_l(nzb+1), c_u_m(nzb+1), nzt-nzb, MPI_REAL, MPI_SUM, comm1dy,   &
-                              ierr )
-          IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
-          CALL MPI_ALLREDUCE( c_v_m_l(nzb+1), c_v_m(nzb+1), nzt-nzb, MPI_REAL, MPI_SUM, comm1dy,   &
-                              ierr )
-          IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
-          CALL MPI_ALLREDUCE( c_w_m_l(nzb+1), c_w_m(nzb+1), nzt-nzb, MPI_REAL, MPI_SUM, comm1dy,   &
-                              ierr )
-#else
-          c_u_m = c_u_m_l
-          c_v_m = c_v_m_l
-          c_w_m = c_w_m_l
-#endif
-
-          c_u_m = c_u_m / (ny+1)
-          c_v_m = c_v_m / (ny+1)
-          c_w_m = c_w_m / (ny+1)
-
-!
-!--       Save old timelevels for the next timestep
-          IF ( intermediate_timestep_count == 1 )  THEN
-                u_m_r(:,:,:) = u(:,:,nx-1:nx)
-                v_m_r(:,:,:) = v(:,:,nx-1:nx)
-                w_m_r(:,:,:) = w(:,:,nx-1:nx)
-          ENDIF
-
-!
-!--       Calculate the new velocities
-          DO  k = nzb+1, nzt+1
-             DO  j = nysg, nyng
-                u_p(k,j,nx+1) = u(k,j,nx+1) - dt_3d * tsc(2) * c_u_m(k) *                          &
-                                              ( u(k,j,nx+1) - u(k,j,nx) ) * ddx
-
-                v_p(k,j,nx+1) = v(k,j,nx+1) - dt_3d * tsc(2) * c_v_m(k) *                          &
-                                              ( v(k,j,nx+1) - v(k,j,nx) ) * ddx
-
-                w_p(k,j,nx+1) = w(k,j,nx+1) - dt_3d * tsc(2) * c_w_m(k) *                          &
-                                              ( w(k,j,nx+1) - w(k,j,nx) ) * ddx
-             ENDDO
-          ENDDO
-
-!
-!--       Bottom boundary at the outflow
-          IF ( ibc_uv_b == 0 )  THEN
-             u_p(nzb,:,nx+1) = 0.0_wp
-             v_p(nzb,:,nx+1) = 0.0_wp
-          ELSE
-             u_p(nzb,:,nx+1) =  u_p(nzb+1,:,nx+1)
-             v_p(nzb,:,nx+1) =  v_p(nzb+1,:,nx+1)
-          ENDIF
-          w_p(nzb,:,nx+1) = 0.0_wp
-
-!
-!--       Top boundary at the outflow
-          IF ( ibc_uv_t == 0 )  THEN
-             u_p(nzt+1,:,nx+1) = u_init(nzt+1)
-             v_p(nzt+1,:,nx+1) = v_init(nzt+1)
-          ELSE
-             u_p(nzt+1,:,nx+1) = u_p(nzt,:,nx+1)
-             v_p(nzt+1,:,nx+1) = v_p(nzt,:,nx+1)
-          ENDIF
-          w_p(nzt:nzt+1,:,nx+1) = 0.0_wp
-
-       ENDIF
-
+       u_p(:,:,nx+1) = u(:,:,nx)
+       v_p(:,:,nx+1) = v(:,:,nx)
+       w_p(:,:,nx+1) = w(:,:,nx)
     ENDIF
 
  END SUBROUTINE dynamics_boundary_conditions
+
+
 !--------------------------------------------------------------------------------------------------!
 ! Description:
@@ -1780,5 +1248,4 @@
 
     ENDIF
-
 
  END SUBROUTINE dynamics_3d_data_averaging
Index: /palm/trunk/SOURCE/header.f90
===================================================================
--- /palm/trunk/SOURCE/header.f90	(revision 4844)
+++ /palm/trunk/SOURCE/header.f90	(revision 4845)
@@ -24,4 +24,7 @@
 ! -----------------
 ! $Id$
+! output of use_cmax removed
+!
+! 4828 2021-01-05 11:21:41Z Giersch
 ! file re-formatted to follow the PALM coding standard
 !
@@ -940,5 +943,5 @@
     WRITE ( io, 317 )  bc_lr, bc_ns
     IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
-       WRITE ( io, 318 )  use_cmax, pt_damping_width, pt_damping_factor
+       WRITE ( io, 318 )  pt_damping_width, pt_damping_factor
        IF ( turbulent_inflow )  THEN
           IF ( y_shift == 0 )  THEN
@@ -1726,6 +1729,5 @@
             '       left/right:  ',A/                                                              &
             '       north/south: ',A)
-318 FORMAT (/'       use_cmax: ',L1 /                                                              &
-            '       pt damping layer width = ',F8.2,' m, pt ','damping factor =',F7.4)
+318 FORMAT (/'       pt damping layer width = ',F8.2,' m, pt ','damping factor =',F7.4)
 319 FORMAT ('       turbulence recycling at inflow switched on'/                                   &
             '       width of recycling domain: ',F7.1,' m   grid index: ',I4/                      &
Index: /palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- /palm/trunk/SOURCE/init_3d_model.f90	(revision 4844)
+++ /palm/trunk/SOURCE/init_3d_model.f90	(revision 4845)
@@ -24,4 +24,7 @@
 ! -----------------
 ! $Id$
+! removed allocation and initialization of arrays required for radiation boundary conditions
+!
+! 4828 2021-01-05 11:21:41Z Giersch
 ! Add possibility to initialize surface flux of passive scalar via static driver
 !
@@ -560,38 +563,4 @@
 
 !
-!-- Arrays to store velocity data from t-dt and the phase speeds which are needed for radiation
-!-- boundary conditions.
-    IF ( bc_radiation_l )  THEN
-       ALLOCATE( u_m_l(nzb:nzt+1,nysg:nyng,1:2),                                                   &
-                 v_m_l(nzb:nzt+1,nysg:nyng,0:1),                                                   &
-                 w_m_l(nzb:nzt+1,nysg:nyng,0:1) )
-    ENDIF
-    IF ( bc_radiation_r )  THEN
-       ALLOCATE( u_m_r(nzb:nzt+1,nysg:nyng,nx-1:nx),                                               &
-                 v_m_r(nzb:nzt+1,nysg:nyng,nx-1:nx),                                               &
-                 w_m_r(nzb:nzt+1,nysg:nyng,nx-1:nx) )
-    ENDIF
-    IF ( bc_radiation_l  .OR.  bc_radiation_r )  THEN
-       ALLOCATE( c_u(nzb:nzt+1,nysg:nyng), c_v(nzb:nzt+1,nysg:nyng), c_w(nzb:nzt+1,nysg:nyng) )
-    ENDIF
-    IF ( bc_radiation_s )  THEN
-       ALLOCATE( u_m_s(nzb:nzt+1,0:1,nxlg:nxrg),                                                   &
-                 v_m_s(nzb:nzt+1,1:2,nxlg:nxrg),                                                   &
-                 w_m_s(nzb:nzt+1,0:1,nxlg:nxrg) )
-    ENDIF
-    IF ( bc_radiation_n )  THEN
-       ALLOCATE( u_m_n(nzb:nzt+1,ny-1:ny,nxlg:nxrg),                                               &
-                 v_m_n(nzb:nzt+1,ny-1:ny,nxlg:nxrg),                                               &
-                 w_m_n(nzb:nzt+1,ny-1:ny,nxlg:nxrg) )
-    ENDIF
-    IF ( bc_radiation_s  .OR.  bc_radiation_n )  THEN
-       ALLOCATE( c_u(nzb:nzt+1,nxlg:nxrg), c_v(nzb:nzt+1,nxlg:nxrg), c_w(nzb:nzt+1,nxlg:nxrg) )
-    ENDIF
-    IF ( bc_radiation_l  .OR.  bc_radiation_r  .OR.  bc_radiation_s  .OR.  bc_radiation_n )  THEN
-       ALLOCATE( c_u_m_l(nzb:nzt+1), c_v_m_l(nzb:nzt+1), c_w_m_l(nzb:nzt+1) )
-       ALLOCATE( c_u_m(nzb:nzt+1), c_v_m(nzb:nzt+1), c_w_m(nzb:nzt+1) )
-    ENDIF
-
-!
 !-- Initial assignment of the pointers
     IF ( .NOT. neutral )  THEN
@@ -1344,31 +1313,4 @@
        message_string = 'unknown initializing problem'
        CALL message( 'init_3d_model', 'PA0193', 1, 2, 0, 6, 0 )
-    ENDIF
-
-
-    IF (  TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
-!
-!--    Initialize old timelevels needed for radiation boundary conditions
-       IF ( bc_radiation_l )  THEN
-          u_m_l(:,:,:) = u(:,:,1:2)
-          v_m_l(:,:,:) = v(:,:,0:1)
-          w_m_l(:,:,:) = w(:,:,0:1)
-       ENDIF
-       IF ( bc_radiation_r )  THEN
-          u_m_r(:,:,:) = u(:,:,nx-1:nx)
-          v_m_r(:,:,:) = v(:,:,nx-1:nx)
-          w_m_r(:,:,:) = w(:,:,nx-1:nx)
-       ENDIF
-       IF ( bc_radiation_s )  THEN
-          u_m_s(:,:,:) = u(:,0:1,:)
-          v_m_s(:,:,:) = v(:,1:2,:)
-          w_m_s(:,:,:) = w(:,0:1,:)
-       ENDIF
-       IF ( bc_radiation_n )  THEN
-          u_m_n(:,:,:) = u(:,ny-1:ny,:)
-          v_m_n(:,:,:) = v(:,ny-1:ny,:)
-          w_m_n(:,:,:) = w(:,ny-1:ny,:)
-       ENDIF
-
     ENDIF
 
Index: /palm/trunk/SOURCE/modules.f90
===================================================================
--- /palm/trunk/SOURCE/modules.f90	(revision 4844)
+++ /palm/trunk/SOURCE/modules.f90	(revision 4845)
@@ -24,4 +24,7 @@
 ! -----------------
 ! $Id$
+! -use_cmax and arrays required for radiation boundary conditions
+!
+! 4828 2021-01-05 11:21:41Z Giersch
 ! file re-formatted to follow the PALM coding standard
 !
@@ -216,16 +219,4 @@
     USE kinds
 
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_u_m                           !< mean phase velocity at outflow for u-component used
-                                                                            !< in radiation boundary condition
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_u_m_l                         !< mean phase velocity at outflow for u-component used
-                                                                            !< in radiation boundary condition (local subdomain value)
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_v_m                           !< mean phase velocity at outflow for v-component used
-                                                                            !< in radiation boundary condition
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_v_m_l                         !< mean phase velocity at outflow for v-component used
-                                                                            !< in radiation boundary condition (local subdomain value)
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_w_m                           !< mean phase velocity at outflow for w-component used
-                                                                            !< in radiation boundary condition
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_w_m_l                         !< mean phase velocity at outflow for w-component used
-                                                                            !< in radiation boundary condition (local subdomain value)
     REAL(wp), DIMENSION(:), ALLOCATABLE ::  d_exner                         !< ratio of potential and actual temperature
     REAL(wp), DIMENSION(:), ALLOCATABLE ::  ddzu                            !< 1/dzu
@@ -454,28 +445,4 @@
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  tric        !< coefficients of the tridiagonal matrix for solution of the Poisson
                                                             !< equation in Fourier space
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_l       !< velocity data (u at left boundary) from time level t-dt required for
-                                                            !< radiation boundary condition
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_n       !< velocity data (u at north boundary) from time level t-dt required for
-                                                            !< radiation boundary condition
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_r       !< velocity data (u at right boundary) from time level t-dt required for
-                                                            !< radiation boundary condition
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_s       !< velocity data (u at south boundary) from time level t-dt required for
-                                                            !< radiation boundary condition
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_l       !< velocity data (v at left boundary) from time level t-dt required for
-                                                            !< radiation boundary condition
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_n       !< velocity data (v at north boundary) from time level t-dt required for
-                                                            !< radiation boundary condition
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_r       !< velocity data (v at right boundary) from time level t-dt required for
-                                                            !< radiation boundary condition
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_s       !< velocity data (v at south boundary) from time level t-dt required for
-                                                            !< radiation boundary condition
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_l       !< velocity data (w at left boundary) from time level t-dt required for
-                                                            !< radiation boundary condition
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_n       !< velocity data (w at north boundary) from time level t-dt required for
-                                                            !< radiation boundary condition
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_r       !< velocity data (w at right boundary) from time level t-dt required for
-                                                            !< radiation boundary condition
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_s       !< velocity data (w at south boundary) from time level t-dt required for
-                                                            !< radiation boundary condition
 
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  diss_1  !< pointer for swapping of timelevels for respective quantity
@@ -1044,5 +1011,4 @@
     LOGICAL ::  turbulent_outflow = .FALSE.                      !< namelist parameter
     LOGICAL ::  urban_surface = .FALSE.                          !< use urban surface model?
-    LOGICAL ::  use_cmax = .TRUE.                                !< namelist parameter
     LOGICAL ::  use_fixed_date = .FALSE.                         !< date of simulation does not change (namelist parameter)
     LOGICAL ::  use_fixed_time = .FALSE.                         !< time of simulation does not change (namelist parameter)
Index: /palm/trunk/SOURCE/parin.f90
===================================================================
--- /palm/trunk/SOURCE/parin.f90	(revision 4844)
+++ /palm/trunk/SOURCE/parin.f90	(revision 4845)
@@ -24,4 +24,7 @@
 ! -----------------
 ! $Id$
+! -use_cmax
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more,
@@ -343,5 +346,5 @@
                                           use_ug_for_galilei_tr,                                   &
                                           use_subsidence_tendencies,                               &
-                                          use_surface_fluxes, use_cmax,                            &
+                                          use_surface_fluxes,                                      &
                                           use_top_fluxes,                                          &
                                           use_upstream_for_tke,                                    &
Index: /palm/trunk/SOURCE/read_restart_data_mod.f90
===================================================================
--- /palm/trunk/SOURCE/read_restart_data_mod.f90	(revision 4844)
+++ /palm/trunk/SOURCE/read_restart_data_mod.f90	(revision 4845)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! arrays removed that were required for radiation boundary conditions
+!
+! 4828 2021-01-05 11:21:41Z Giersch
 ! include time_indoor into restart mechanism
 !
@@ -149,6 +152,5 @@
         ONLY:  inflow_damping_factor, mean_inflow_profiles, pt_init,           &
                q_init, ref_state, sa_init, s_init, u_init, ug, v_init, vg,     &
-               e, kh, km, p, pt, q, ql, s, u, u_m_l, u_m_n, u_m_r, u_m_s,      &
-               v, v_m_l, v_m_n, v_m_r, v_m_s, vpt, w, w_m_l, w_m_n, w_m_r, w_m_s
+               e, kh, km, p, pt, q, ql, s, u, v, vpt, w
 
     USE averaging
@@ -2058,44 +2060,4 @@
                          tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
 
-                   CASE ( 'u_m_l' )
-                      IF ( k == 1 )  THEN
-                         ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,   &
-                                                       1:2) )
-                         READ ( 13 )  tmp_3d_non_standard
-                      ENDIF
-                      IF ( bc_radiation_l )  THEN
-                         u_m_l(:,nysc-nbgp:nync+nbgp,:) =  tmp_3d_non_standard(:,nysf-nbgp:nynf+nbgp,:)
-                      ENDIF
-
-                   CASE ( 'u_m_n' )
-                      IF ( k == 1 )  THEN
-                         ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,ny-1:ny,                             &
-                                                       nxl_on_file-nbgp:nxr_on_file+nbgp) )
-                         READ ( 13 )  tmp_3d_non_standard
-                      ENDIF
-                      IF ( bc_radiation_n )  THEN
-                         u_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3d_non_standard(:,:,nxlf-nbgp:nxrf+nbgp)
-                      ENDIF
-
-                   CASE ( 'u_m_r' )
-                      IF ( k == 1 )  THEN
-                         ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,   &
-                                                       nx-1:nx) )
-                         READ ( 13 )  tmp_3d_non_standard
-                      ENDIF
-                      IF ( bc_radiation_r )  THEN
-                         u_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3d_non_standard(:,nysf-nbgp:nynf+nbgp,:)
-                      ENDIF
-
-                   CASE ( 'u_m_s' )
-                      IF ( k == 1 )  THEN
-                         ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,0:1,                                 &
-                                                       nxl_on_file-nbgp:nxr_on_file+nbgp) )
-                         READ ( 13 )  tmp_3d_non_standard
-                      ENDIF
-                      IF ( bc_radiation_s )  THEN
-                         u_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3d_non_standard(:,:,nxlf-nbgp:nxrf+nbgp)
-                      ENDIF
-
                    CASE ( 'us_av' )
                       IF ( .NOT. ALLOCATED( us_av ) )  THEN
@@ -2119,44 +2081,4 @@
                          tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
 
-                   CASE ( 'v_m_l' )
-                      IF ( k == 1 )  THEN
-                         ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,   &
-                                                       0:1) )
-                         READ ( 13 )  tmp_3d_non_standard
-                      ENDIF
-                      IF ( bc_radiation_l )  THEN
-                         v_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3d_non_standard(:,nysf-nbgp:nynf+nbgp,:)
-                      ENDIF
-
-                   CASE ( 'v_m_n' )
-                      IF ( k == 1 )  THEN
-                         ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,ny-1:ny,                             &
-                                                       nxl_on_file-nbgp:nxr_on_file+nbgp) )
-                         READ ( 13 )  tmp_3d_non_standard
-                      ENDIF
-                      IF ( bc_radiation_n )  THEN
-                         v_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3d_non_standard(:,:,nxlf-nbgp:nxrf+nbgp)
-                      ENDIF
-
-                   CASE ( 'v_m_r' )
-                      IF ( k == 1 )  THEN
-                         ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,   &
-                                                       nx-1:nx) )
-                         READ ( 13 )  tmp_3d_non_standard
-                      ENDIF
-                      IF ( bc_radiation_r )  THEN
-                         v_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3d_non_standard(:,nysf-nbgp:nynf+nbgp,:)
-                      ENDIF
-
-                   CASE ( 'v_m_s' )
-                      IF ( k == 1 )  THEN
-                         ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,1:2,                                 &
-                                                       nxl_on_file-nbgp:nxr_on_file+nbgp) )
-                         READ ( 13 )  tmp_3d_non_standard
-                      ENDIF
-                      IF ( bc_radiation_s )  THEN
-                         v_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3d_non_standard(:,:,nxlf-nbgp:nxrf+nbgp)
-                      ENDIF
-
                    CASE ( 'vpt' )
                       IF ( k == 1 )  READ ( 13 )  tmp_3d
@@ -2184,44 +2106,4 @@
                       w_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =                               &
                          tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
-
-                   CASE ( 'w_m_l' )
-                      IF ( k == 1 )  THEN
-                         ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,   &
-                                                       0:1) )
-                         READ ( 13 )  tmp_3d_non_standard
-                      ENDIF
-                      IF ( bc_radiation_l )  THEN
-                         w_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3d_non_standard(:,nysf-nbgp:nynf+nbgp,:)
-                      ENDIF
-
-                   CASE ( 'w_m_n' )
-                      IF ( k == 1 )  THEN
-                         ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,ny-1:ny,                             &
-                                                       nxl_on_file-nbgp:nxr_on_file+nbgp) )
-                         READ ( 13 )  tmp_3d_non_standard
-                      ENDIF
-                      IF ( bc_radiation_n )  THEN
-                         w_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3d_non_standard(:,:,nxlf-nbgp:nxrf+nbgp)
-                      ENDIF
-
-                   CASE ( 'w_m_r' )
-                      IF ( k == 1 )  THEN
-                         ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,   &
-                                                       nx-1:nx) )
-                         READ ( 13 )  tmp_3d_non_standard
-                      ENDIF
-                      IF ( bc_radiation_r )  THEN
-                         w_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3d_non_standard(:,nysf-nbgp:nynf+nbgp,:)
-                      ENDIF
-
-                   CASE ( 'w_m_s' )
-                      IF ( k == 1 )  THEN
-                         ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,0:1,                                 &
-                                                       nxl_on_file-nbgp:nxr_on_file+nbgp) )
-                         READ ( 13 )  tmp_3d_non_standard
-                      ENDIF
-                      IF ( bc_radiation_s )  THEN
-                         w_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3d_non_standard(:,:,nxlf-nbgp:nxrf+nbgp)
-                      ENDIF
 
                    CASE ( 'z0_av' )
@@ -2488,28 +2370,4 @@
        ENDIF
 
-       CALL rd_mpi_io_check_array( 'u_m_l' , found = array_found )
-       IF ( array_found )  THEN
-          IF ( .NOT. ALLOCATED( u_m_l ) )  ALLOCATE( u_m_l(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          CALL rrd_mpi_io( 'u_m_l', u_m_l )
-       ENDIF
-
-       CALL rd_mpi_io_check_array( 'u_m_n' , found = array_found )
-       IF ( array_found )  THEN
-          IF ( .NOT. ALLOCATED( u_m_n ) )  ALLOCATE( u_m_n(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          CALL rrd_mpi_io( 'u_m_n', u_m_n )
-       ENDIF
-
-       CALL rd_mpi_io_check_array( 'u_m_r' , found = array_found )
-       IF ( array_found )  THEN
-          IF ( .NOT. ALLOCATED( u_m_r ) )  ALLOCATE( u_m_r(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          CALL rrd_mpi_io( 'u_m_r', u_m_r )
-       ENDIF
-
-       CALL rd_mpi_io_check_array( 'u_m_s' , found = array_found )
-       IF ( array_found )  THEN
-          IF ( .NOT. ALLOCATED( u_m_s ) )  ALLOCATE( u_m_s(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          CALL rrd_mpi_io( 'u_m_s', u_m_s )
-       ENDIF
-
        CALL rd_mpi_io_check_array( 'us_av' , found = array_found )
        IF ( array_found )  THEN
@@ -2526,28 +2384,4 @@
        ENDIF
 
-       CALL rd_mpi_io_check_array( 'v_m_l' , found = array_found )
-       IF ( array_found )  THEN
-          IF ( .NOT. ALLOCATED( v_m_l ) )  ALLOCATE( v_m_l(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          CALL rrd_mpi_io( 'v_m_l', v_m_l )
-       ENDIF
-
-       CALL rd_mpi_io_check_array( 'v_m_n' , found = array_found )
-       IF ( array_found )  THEN
-          IF ( .NOT. ALLOCATED( v_m_n ) )  ALLOCATE( v_m_n(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          CALL rrd_mpi_io( 'v_m_n', v_m_n )
-       ENDIF
-
-       CALL rd_mpi_io_check_array( 'v_m_r' , found = array_found )
-       IF ( array_found )  THEN
-          IF ( .NOT. ALLOCATED( v_m_r ) )  ALLOCATE( v_m_r(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          CALL rrd_mpi_io( 'v_m_r', v_m_r )
-       ENDIF
-
-       CALL rd_mpi_io_check_array( 'v_m_s' , found = array_found )
-       IF ( array_found )  THEN
-          IF ( .NOT. ALLOCATED( v_m_s ) )  ALLOCATE( v_m_s(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          CALL rrd_mpi_io( 'v_m_s', v_m_s )
-       ENDIF
-
        CALL rd_mpi_io_check_array( 'vpt' , found = array_found )
        IF ( array_found )  THEN
@@ -2567,28 +2401,4 @@
           IF ( .NOT. ALLOCATED( w_av ) )  ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
           CALL rrd_mpi_io( 'w_av', w_av )
-       ENDIF
-
-       CALL rd_mpi_io_check_array( 'w_m_l' , found = array_found )
-       IF ( array_found )  THEN
-          IF ( .NOT. ALLOCATED( w_m_l ) )  ALLOCATE( w_m_l(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          CALL rrd_mpi_io( 'w_m_l', w_m_l )
-       ENDIF
-
-       CALL rd_mpi_io_check_array( 'w_m_n' , found = array_found )
-       IF ( array_found )  THEN
-          IF ( .NOT. ALLOCATED( w_m_n ) )  ALLOCATE( w_m_n(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          CALL rrd_mpi_io( 'w_m_n', w_m_n )
-       ENDIF
-
-       CALL rd_mpi_io_check_array( 'w_m_r' , found = array_found )
-       IF ( array_found )  THEN
-          IF ( .NOT. ALLOCATED( w_m_r ) )  ALLOCATE( w_m_r(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          CALL rrd_mpi_io( 'w_m_r', w_m_r )
-       ENDIF
-
-       CALL rd_mpi_io_check_array( 'w_m_s' , found = array_found )
-       IF ( array_found )  THEN
-          IF ( .NOT. ALLOCATED( w_m_s ) )  ALLOCATE( w_m_s(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          CALL rrd_mpi_io( 'w_m_s', w_m_s )
        ENDIF
 
Index: /palm/trunk/SOURCE/write_restart_data_mod.f90
===================================================================
--- /palm/trunk/SOURCE/write_restart_data_mod.f90	(revision 4844)
+++ /palm/trunk/SOURCE/write_restart_data_mod.f90	(revision 4845)
@@ -24,4 +24,7 @@
 ! -----------------
 ! $Id$
+! arrays removed that were required for radiation boundary conditions
+!
+! 4828 2021-01-05 11:21:41Z Giersch
 ! include time_indoor into restart mechanism
 !
@@ -93,6 +96,5 @@
     USE arrays_3d,                                                                                 &
         ONLY:  e, inflow_damping_factor, kh, km, mean_inflow_profiles, p, pt, pt_init, q, q_init,  &
-               ql, ref_state, s, s_init, u, u_init, ug, u_m_l, u_m_n, u_m_r, u_m_s, v, v_init, vg, &
-               v_m_l, v_m_n, v_m_r, v_m_s, vpt, w, w_m_l, w_m_n, w_m_r, w_m_s
+               ql, ref_state, s, s_init, u, u_init, ug, v, v_init, vg, vpt, w
 
     USE averaging
@@ -1362,24 +1364,4 @@
        ENDIF
 
-       IF ( ALLOCATED( u_m_l ) )  THEN
-          CALL wrd_write_string( 'u_m_l' )
-          WRITE ( 14 )  u_m_l
-       ENDIF
-
-       IF ( ALLOCATED( u_m_n ) )  THEN
-          CALL wrd_write_string( 'u_m_n' )
-          WRITE ( 14 )  u_m_n
-       ENDIF
-
-       IF ( ALLOCATED( u_m_r ) )  THEN
-          CALL wrd_write_string( 'u_m_r' )
-          WRITE ( 14 )  u_m_r
-       ENDIF
-
-       IF ( ALLOCATED( u_m_s ) )  THEN
-          CALL wrd_write_string( 'u_m_s' )
-          WRITE ( 14 )  u_m_s
-       ENDIF
-
        IF ( ALLOCATED( us_av ) )  THEN
           CALL wrd_write_string( 'us_av' )
@@ -1393,24 +1375,4 @@
           CALL wrd_write_string( 'v_av' )
           WRITE ( 14 )  v_av
-       ENDIF
-
-       IF ( ALLOCATED( v_m_l  ) )  THEN
-          CALL wrd_write_string( 'v_m_l' )
-          WRITE ( 14 )  v_m_l
-       ENDIF
-
-       IF ( ALLOCATED( v_m_n ) )  THEN
-          CALL wrd_write_string( 'v_m_n' )
-         WRITE ( 14 )  v_m_n
-       ENDIF
-
-       IF ( ALLOCATED( v_m_r ) )  THEN
-          CALL wrd_write_string( 'v_m_r' )
-          WRITE ( 14 )  v_m_r
-       ENDIF
-
-       IF ( ALLOCATED( v_m_s ) )  THEN
-          CALL wrd_write_string( 'v_m_s' )
-          WRITE ( 14 )  v_m_s
        ENDIF
 
@@ -1433,24 +1395,4 @@
           CALL wrd_write_string( 'w_av' )
           WRITE ( 14 )  w_av
-       ENDIF
-
-       IF ( ALLOCATED( w_m_l ) )  THEN
-          CALL wrd_write_string( 'w_m_l' )
-          WRITE ( 14 )  w_m_l
-       ENDIF
-
-       IF ( ALLOCATED( w_m_n ) )  THEN
-          CALL wrd_write_string( 'w_m_n' )
-          WRITE ( 14 )  w_m_n
-       ENDIF
-
-       IF ( ALLOCATED( w_m_r ) )  THEN
-          CALL wrd_write_string( 'w_m_r' )
-          WRITE ( 14 )  w_m_r
-       ENDIF
-
-       IF ( ALLOCATED( w_m_s ) )  THEN
-          CALL wrd_write_string( 'w_m_s' )
-          WRITE ( 14 )  w_m_s
        ENDIF
 
@@ -1560,15 +1502,7 @@
        CALL wrd_mpi_io( 'u', u)
        IF ( ALLOCATED( u_av ) )  CALL wrd_mpi_io( 'u_av', u_av )
-       IF ( ALLOCATED( u_m_l ) )  CALL wrd_mpi_io( 'u_m_l', u_m_l )
-       IF ( ALLOCATED( u_m_n ) )  CALL wrd_mpi_io( 'u_m_n', u_m_n )
-       IF ( ALLOCATED( u_m_r ) )  CALL wrd_mpi_io( 'u_m_r', u_m_r )
-       IF ( ALLOCATED( u_m_s ) )  CALL wrd_mpi_io( 'u_m_s', u_m_s )
        IF ( ALLOCATED( us_av ) )  CALL wrd_mpi_io( 'us_av', us_av )
        CALL wrd_mpi_io( 'v', v )
        IF ( ALLOCATED( v_av ) )  CALL wrd_mpi_io( 'v_av', v_av )
-       IF ( ALLOCATED( v_m_l ) )  CALL wrd_mpi_io( 'v_m_l', v_m_l )
-       IF ( ALLOCATED( v_m_n ) )  CALL wrd_mpi_io( 'v_m_n', v_m_n )
-       IF ( ALLOCATED( v_m_r ) )  CALL wrd_mpi_io( 'v_m_r', v_m_r )
-       IF ( ALLOCATED( v_m_s ) )  CALL wrd_mpi_io( 'v_m_s', v_m_s )
        IF ( humidity )  THEN
           CALL wrd_mpi_io( 'vpt',  vpt )
@@ -1577,8 +1511,4 @@
        CALL wrd_mpi_io( 'w', w)
        IF ( ALLOCATED( w_av ) )  CALL wrd_mpi_io( 'w_av', w_av )
-       IF ( ALLOCATED( w_m_l ) )  CALL wrd_mpi_io( 'w_m_l', w_m_l )
-       IF ( ALLOCATED( w_m_n ) )  CALL wrd_mpi_io( 'w_m_n', w_m_n )
-       IF ( ALLOCATED( w_m_r ) )  CALL wrd_mpi_io( 'w_m_r', w_m_r )
-       IF ( ALLOCATED( w_m_s ) )  CALL wrd_mpi_io( 'w_m_s', w_m_s )
        IF ( ALLOCATED( z0_av ) )  CALL wrd_mpi_io( 'z0_av', z0_av )
        IF ( ALLOCATED( z0h_av ) )  CALL wrd_mpi_io( 'z0h_av', z0h_av )
