Index: palm/trunk/SOURCE/advec_ws.f90
===================================================================
--- palm/trunk/SOURCE/advec_ws.f90	(revision 3022)
+++ palm/trunk/SOURCE/advec_ws.f90	(revision 3182)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! Rename variables for boundary-condition flags and for offline nesting mode 
 ! 
 ! Former revisions:
@@ -460,8 +460,7 @@
 
        USE control_parameters,                                                 &
-           ONLY:  force_bound_l, force_bound_n, force_bound_r, force_bound_s,  &
-                  inflow_l, inflow_n, inflow_r, inflow_s, momentum_advec,      &
-                  nest_bound_l, nest_bound_n, nest_bound_r, nest_bound_s,      &
-                  outflow_l, outflow_n, outflow_r, outflow_s, scalar_advec
+           ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
+                  bc_dirichlet_s, bc_radiation_l, bc_radiation_n,              &
+                  bc_radiation_r, bc_radiation_s, momentum_advec, scalar_advec
 
        USE indices,                                                            &
@@ -501,9 +500,7 @@
                     .OR.  .NOT. BTEST(wall_flags_0(k,j,i+2),0)                 &   
                     .OR.  .NOT. BTEST(wall_flags_0(k,j,i-1),0) )               &
-                      .OR.  ( ( inflow_l .OR. outflow_l .OR. nest_bound_l  .OR.&
-                                force_bound_l )                                &
+                      .OR.  ( ( bc_dirichlet_l .OR. bc_radiation_l )           &
                             .AND.  i == nxl   )                                &
-                      .OR.  ( ( inflow_r .OR. outflow_r .OR. nest_bound_r  .OR.&
-                                force_bound_r )                                &
+                      .OR.  ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
                             .AND.  i == nxr   ) )                              &
                    THEN
@@ -520,9 +517,7 @@
                             )                                                  &
                                                     .OR.                       &
-                            ( ( inflow_r .OR. outflow_r .OR. nest_bound_r  .OR.&
-                                force_bound_r )                                &
+                            ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
                               .AND. i == nxr-1 )    .OR.                       &
-                            ( ( inflow_l .OR. outflow_l .OR. nest_bound_l  .OR.&
-                                force_bound_l )                                &
+                            ( ( bc_dirichlet_l .OR. bc_radiation_l )           &
                               .AND. i == nxlu  ) )                             & ! why not nxl+1
                    THEN
@@ -542,9 +537,7 @@
                     .OR.  .NOT. BTEST(wall_flags_0(k,j+2,i),0)                 &   
                     .OR.  .NOT. BTEST(wall_flags_0(k,j-1,i),0))                &
-                      .OR.  ( ( inflow_s .OR. outflow_s .OR. nest_bound_s  .OR.&
-                                force_bound_s )                                &
+                      .OR.  ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
                             .AND.  j == nys   )                                &
-                      .OR.  ( ( inflow_n .OR. outflow_n .OR. nest_bound_n  .OR.&
-                                force_bound_n )                                &
+                      .OR.  ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
                             .AND.  j == nyn   ) )                              &
                    THEN
@@ -563,9 +556,7 @@
                             )                                                  &
                                                     .OR.                       &
-                            ( ( inflow_s .OR. outflow_s .OR. nest_bound_s  .OR.&
-                                force_bound_s )                                &
+                            ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
                               .AND. j == nysv  )    .OR.                       & ! why not nys+1
-                            ( ( inflow_n .OR. outflow_n .OR. nest_bound_n  .OR.&
-                                force_bound_n )                                &
+                            ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
                               .AND. j == nyn-1 ) )                             &          
                    THEN
@@ -655,9 +646,7 @@
 !--                WS1 (9), WS3 (10), WS5 (11)
                    IF ( .NOT. BTEST(wall_flags_0(k,j,i+1),1)  .OR.             &
-                            ( ( inflow_l .OR. outflow_l .OR. nest_bound_l  .OR.&
-                                force_bound_l )                                &
+                            ( ( bc_dirichlet_l .OR. bc_radiation_l )           &
                               .AND. i <= nxlu  )    .OR.                       &
-                            ( ( inflow_r .OR. outflow_r .OR. nest_bound_r  .OR.&
-                                force_bound_r )                                &
+                            ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
                               .AND. i == nxr   ) )                             &
                    THEN
@@ -667,9 +656,7 @@
                               .NOT. BTEST(wall_flags_0(k,j,i-1),1) )           &
                                                         .OR.                   &
-                            ( ( inflow_r .OR. outflow_r .OR. nest_bound_r  .OR.&
-                                force_bound_r )                                &
+                            ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
                               .AND. i == nxr-1 )    .OR.                       &
-                            ( ( inflow_l .OR. outflow_l .OR. nest_bound_l  .OR.&
-                                force_bound_l )                                &
+                            ( ( bc_dirichlet_l .OR. bc_radiation_l )           &
                               .AND. i == nxlu+1) )                             &
                    THEN
@@ -691,9 +678,7 @@
 !--                WS1 (12), WS3 (13), WS5 (14)
                    IF ( .NOT. BTEST(wall_flags_0(k,j+1,i),1)   .OR.            &
-                            ( ( inflow_s .OR. outflow_s .OR. nest_bound_s  .OR.&
-                                force_bound_s )                                &
+                            ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
                               .AND. j == nys   )    .OR.                       &
-                            ( ( inflow_n .OR. outflow_n .OR. nest_bound_n  .OR.&
-                                force_bound_n )                                &
+                            ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
                               .AND. j == nyn   ) )                             &
                    THEN
@@ -703,9 +688,7 @@
                               .NOT. BTEST(wall_flags_0(k,j-1,i),1) )           &
                                                         .OR.                   &
-                            ( ( inflow_s .OR. outflow_s .OR. nest_bound_s  .OR.&
-                                force_bound_s )                                &
+                            ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
                               .AND. j == nysv  )    .OR.                       &
-                            ( ( inflow_n .OR. outflow_n .OR. nest_bound_n  .OR.&
-                                force_bound_n )                                &
+                            ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
                               .AND. j == nyn-1 ) )                             &
                    THEN
@@ -789,9 +772,7 @@
 !--                WS1 (18), WS3 (19), WS5 (20)
                    IF ( .NOT. BTEST(wall_flags_0(k,j,i+1),2)  .OR.             &
-                            ( ( inflow_l .OR. outflow_l .OR. nest_bound_l  .OR.&
-                                force_bound_l )                                &
+                            ( ( bc_dirichlet_l .OR. bc_radiation_l )           &
                               .AND. i == nxl   )    .OR.                       &
-                            ( ( inflow_r .OR. outflow_r .OR. nest_bound_r  .OR.&
-                                force_bound_r )                                &
+                            ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
                               .AND. i == nxr   ) )                             &
                   THEN
@@ -803,9 +784,7 @@
                               .NOT. BTEST(wall_flags_0(k,j,i-1),2)             &
                                                     .OR.                       &
-                            ( ( inflow_r .OR. outflow_r .OR. nest_bound_r  .OR.&
-                                force_bound_r )                                &
+                            ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
                               .AND. i == nxr-1 )    .OR.                       &
-                            ( ( inflow_l .OR. outflow_l .OR. nest_bound_l  .OR.&
-                                force_bound_l )                                &
+                            ( ( bc_dirichlet_l .OR. bc_radiation_l )           &
                               .AND. i == nxlu  ) )                             &
                    THEN
@@ -827,9 +806,7 @@
 !--                WS1 (21), WS3 (22), WS5 (23)
                    IF ( .NOT. BTEST(wall_flags_0(k,j+1,i),2) .OR.              &
-                            ( ( inflow_s .OR. outflow_s .OR. nest_bound_s  .OR.&
-                                force_bound_s )                                &
+                            ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
                               .AND. j <= nysv  )    .OR.                       &
-                            ( ( inflow_n .OR. outflow_n .OR. nest_bound_n  .OR.&
-                                force_bound_n )                                &
+                            ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
                               .AND. j == nyn   ) )                             &
                    THEN
@@ -839,9 +816,7 @@
                               .NOT. BTEST(wall_flags_0(k,j-1,i),2) )           &
                                                         .OR.                   &
-                            ( ( inflow_s .OR. outflow_s .OR. nest_bound_s  .OR.&
-                                force_bound_s )                                &
+                            ( (  bc_dirichlet_s .OR. bc_radiation_s )          &
                               .AND. j == nysv+1)    .OR.                       &
-                            ( ( inflow_n .OR. outflow_n .OR. nest_bound_n  .OR.&
-                                force_bound_n )                                &
+                            ( (  bc_dirichlet_n .OR. bc_radiation_n )          &
                               .AND. j == nyn-1 ) )                             &
                    THEN
@@ -924,9 +899,7 @@
 !--                WS1 (27), WS3 (28), WS5 (29)
                    IF ( .NOT. BTEST(wall_flags_0(k,j,i+1),3) .OR.              &
-                            ( ( inflow_l .OR. outflow_l .OR. nest_bound_l  .OR.&
-                                force_bound_l )                                &
+                            ( (  bc_dirichlet_l .OR. bc_radiation_l )          &
                               .AND. i == nxl   )    .OR.                       &
-                            ( ( inflow_r .OR. outflow_r .OR. nest_bound_r  .OR.&
-                                force_bound_r )                                &
+                            ( (  bc_dirichlet_r .OR. bc_radiation_r )          &
                               .AND. i == nxr   ) )                             &
                    THEN
@@ -936,9 +909,7 @@
                               .NOT. BTEST(wall_flags_0(k,j,i-1),3) )           &
                                                         .OR.                   &
-                            ( ( inflow_r .OR. outflow_r .OR. nest_bound_r  .OR.&
-                                force_bound_r )                                &
+                            ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
                               .AND. i == nxr-1 )    .OR.                       &
-                            ( ( inflow_l .OR. outflow_l .OR. nest_bound_l  .OR.&
-                                force_bound_l )                                &
+                            ( ( bc_dirichlet_l .OR.  bc_radiation_l )          &
                               .AND. i == nxlu  ) )                             &
                    THEN
@@ -960,9 +931,7 @@
 !--                WS1 (30), WS3 (31), WS5 (32)
                    IF ( .NOT. BTEST(wall_flags_0(k,j+1,i),3) .OR.              &
-                            ( ( inflow_s .OR. outflow_s .OR. nest_bound_s  .OR.&
-                                force_bound_s )                                &
+                            ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
                               .AND. j == nys   )    .OR.                       &
-                            ( ( inflow_n .OR. outflow_n .OR. nest_bound_n  .OR.&
-                                force_bound_n )                                &
+                            ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
                               .AND. j == nyn   ) )                             &
                    THEN
@@ -972,9 +941,7 @@
                               .NOT. BTEST(wall_flags_0(k,j-1,i),3) )           &
                                                         .OR.                   &
-                            ( ( inflow_s .OR. outflow_s .OR. nest_bound_s  .OR.&
-                                force_bound_s )                                &
+                            ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
                               .AND. j == nysv  )    .OR.                       &
-                            ( ( inflow_n .OR. outflow_n .OR. nest_bound_n  .OR.&
-                                force_bound_n )                                &
+                            ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
                               .AND. j == nyn-1 ) )                             &
                    THEN
@@ -1067,24 +1034,20 @@
 !--       Set boundary flags at inflow and outflow boundary in case of 
 !--       non-cyclic boundary conditions.
-          IF ( inflow_l      .OR.  outflow_l  .OR.                             &
-               nest_bound_l  .OR.  force_bound_l )  THEN
+          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
              advc_flags_1(:,:,nxl-1) = advc_flags_1(:,:,nxl)
              advc_flags_2(:,:,nxl-1) = advc_flags_2(:,:,nxl)
           ENDIF
 
-          IF ( inflow_r      .OR.  outflow_r  .OR.                             &
-               nest_bound_r  .OR.  force_bound_r )  THEN
+          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
             advc_flags_1(:,:,nxr+1) = advc_flags_1(:,:,nxr)
             advc_flags_2(:,:,nxr+1) = advc_flags_2(:,:,nxr)
           ENDIF
 
-          IF ( inflow_n      .OR.  outflow_n  .OR.                             &
-               nest_bound_n  .OR.  force_bound_n )  THEN
+          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
              advc_flags_1(:,nyn+1,:) = advc_flags_1(:,nyn,:)
              advc_flags_2(:,nyn+1,:) = advc_flags_2(:,nyn,:)
           ENDIF
 
-          IF ( inflow_s      .OR.  outflow_s  .OR.                             &
-               nest_bound_s  .OR.  force_bound_s )  THEN
+          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
              advc_flags_1(:,nys-1,:) = advc_flags_1(:,nys,:)
              advc_flags_2(:,nys-1,:) = advc_flags_2(:,nys,:)
