Index: palm/trunk/SOURCE/init_pegrid.f90
===================================================================
--- palm/trunk/SOURCE/init_pegrid.f90	(revision 3058)
+++ palm/trunk/SOURCE/init_pegrid.f90	(revision 3182)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! Rename variables and boundary conditions in mesoscale-offline nesting mode
 ! 
 ! Former revisions:
@@ -239,13 +239,11 @@
 
     USE control_parameters,                                                    &
-        ONLY:  bc_lr, bc_ns, coupling_mode, coupling_mode_remote,              &
-               coupling_topology, force_bound_l, force_bound_n, force_bound_r, &
-               force_bound_s, gathered_size, grid_level,                       &
-               grid_level_count, inflow_l, inflow_n, inflow_r, inflow_s,       &
-               maximum_grid_level, message_string,                             &
-               mg_switch_to_pe0_level, momentum_advec, nest_bound_l,           &
-               nest_bound_n, nest_bound_r, nest_bound_s, nest_domain, neutral, &
-               psolver, outflow_l, outflow_n, outflow_r, outflow_s,            &
-               outflow_source_plane, recycling_width, scalar_advec,            &
+        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, bc_dirichlet_s, &
+               bc_lr, bc_ns, bc_radiation_l, bc_radiation_n, bc_radiation_r,   &
+               bc_radiation_s, coupling_mode, coupling_mode_remote,            &
+               coupling_topology, gathered_size, grid_level,                   &
+               grid_level_count, maximum_grid_level, message_string,           &
+               mg_switch_to_pe0_level, momentum_advec, neutral,                &
+               psolver, outflow_source_plane, recycling_width, scalar_advec,   &
                subdomain_size, turbulent_outflow, y_shift
 
@@ -1232,12 +1230,9 @@
 !-- Setting of flags for inflow/outflow/nesting conditions.
     IF ( pleft == MPI_PROC_NULL )  THEN
-       IF ( bc_lr == 'dirichlet/radiation' )  THEN
-          inflow_l  = .TRUE.
+       IF ( bc_lr == 'dirichlet/radiation'  .OR.  bc_lr == 'nested'  .OR.      &
+            bc_lr == 'nesting_offline' )  THEN
+          bc_dirichlet_l  = .TRUE.
        ELSEIF ( bc_lr == 'radiation/dirichlet' )  THEN
-          outflow_l = .TRUE.
-       ELSEIF ( bc_lr == 'nested' )  THEN
-          nest_bound_l = .TRUE.
-       ELSEIF ( bc_lr == 'forcing' )  THEN
-          force_bound_l = .TRUE.
+          bc_radiation_l = .TRUE.
        ENDIF
     ENDIF
@@ -1245,11 +1240,8 @@
     IF ( pright == MPI_PROC_NULL )  THEN
        IF ( bc_lr == 'dirichlet/radiation' )  THEN
-          outflow_r = .TRUE.
-       ELSEIF ( bc_lr == 'radiation/dirichlet' )  THEN
-          inflow_r  = .TRUE.
-       ELSEIF ( bc_lr == 'nested' )  THEN
-          nest_bound_r = .TRUE.
-       ELSEIF ( bc_lr == 'forcing' )  THEN
-          force_bound_r = .TRUE.
+          bc_radiation_r = .TRUE.
+       ELSEIF ( bc_lr == 'radiation/dirichlet'  .OR.  bc_lr == 'nested'  .OR.  &
+                bc_lr == 'nesting_offline' )  THEN
+          bc_dirichlet_r  = .TRUE.
        ENDIF
     ENDIF
@@ -1257,23 +1249,17 @@
     IF ( psouth == MPI_PROC_NULL )  THEN
        IF ( bc_ns == 'dirichlet/radiation' )  THEN
-          outflow_s = .TRUE.
+          bc_radiation_s = .TRUE.
+       ELSEIF ( bc_ns == 'radiation/dirichlet'  .OR.  bc_ns == 'nested'  .OR.  &
+                bc_ns == 'nesting_offline' )  THEN
+          bc_dirichlet_s  = .TRUE.
+       ENDIF
+    ENDIF
+
+    IF ( pnorth == MPI_PROC_NULL )  THEN
+       IF ( bc_ns == 'dirichlet/radiation'  .OR.  bc_ns == 'nested'  .OR.      &
+            bc_ns == 'nesting_offline' )  THEN
+          bc_dirichlet_n  = .TRUE.
        ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
-          inflow_s  = .TRUE.
-       ELSEIF ( bc_ns == 'nested' )  THEN
-          nest_bound_s = .TRUE.
-       ELSEIF ( bc_ns == 'forcing' )  THEN
-          force_bound_s = .TRUE.
-       ENDIF
-    ENDIF
-
-    IF ( pnorth == MPI_PROC_NULL )  THEN
-       IF ( bc_ns == 'dirichlet/radiation' )  THEN
-          inflow_n  = .TRUE.
-       ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
-          outflow_n = .TRUE.
-       ELSEIF ( bc_ns == 'nested' )  THEN
-          nest_bound_n = .TRUE.
-       ELSEIF ( bc_ns == 'forcing' )  THEN
-          force_bound_n = .TRUE.
+          bc_radiation_n = .TRUE.
        ENDIF
     ENDIF
@@ -1283,20 +1269,20 @@
 !-- only at the left lateral boundary.
     IF ( use_syn_turb_gen )  THEN
-       IF ( force_bound_l  .OR.  nest_bound_l  .OR.  inflow_l )  THEN
+       IF ( bc_dirichlet_l )  THEN
           id_stg_left_l = myidx
        ELSE
           id_stg_left_l = 0
        ENDIF
-       IF ( force_bound_r  .OR.  nest_bound_r )  THEN
+       IF ( bc_dirichlet_r )  THEN
           id_stg_right_l = myidx
        ELSE
           id_stg_right_l = 0
        ENDIF
-       IF ( force_bound_s  .OR.  nest_bound_s )  THEN
+       IF ( bc_dirichlet_s )  THEN
           id_stg_south_l = myidy
        ELSE
           id_stg_south_l = 0
        ENDIF
-       IF ( force_bound_n  .OR.  nest_bound_n )  THEN
+       IF ( bc_dirichlet_n )  THEN
           id_stg_north_l = myidy
        ELSE
@@ -1324,5 +1310,5 @@
 !
 !-- Broadcast the id of the inflow PE
-    IF ( inflow_l )  THEN
+    IF ( bc_dirichlet_l )  THEN
        id_inflow_l = myidx
     ELSE
@@ -1350,5 +1336,5 @@
     IF ( turbulent_outflow )  THEN
 
-       IF ( outflow_r )  THEN
+       IF ( bc_radiation_r )  THEN
           id_outflow_l = myidx
        ELSE
@@ -1375,17 +1361,17 @@
 #else
     IF ( bc_lr == 'dirichlet/radiation' )  THEN
-       inflow_l  = .TRUE.
-       outflow_r = .TRUE.
+       bc_dirichlet_l = .TRUE.
+       bc_radiation_r = .TRUE.
     ELSEIF ( bc_lr == 'radiation/dirichlet' )  THEN
-       outflow_l = .TRUE.
-       inflow_r  = .TRUE.
+       bc_radiation_l = .TRUE.
+       bc_dirichlet_r = .TRUE.
     ENDIF
 
     IF ( bc_ns == 'dirichlet/radiation' )  THEN
-       inflow_n  = .TRUE.
-       outflow_s = .TRUE.
+       bc_dirichlet_n = .TRUE.
+       bc_radiation_s = .TRUE.
     ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
-       outflow_n = .TRUE.
-       inflow_s  = .TRUE.
+       bc_radiation_n = .TRUE.
+       bc_dirichlet_s = .TRUE.
     ENDIF
 #endif
@@ -1394,10 +1380,10 @@
 !-- At the inflow or outflow, u or v, respectively, have to be calculated for
 !-- one more grid point.
-    IF ( inflow_l .OR. outflow_l .OR. nest_bound_l .OR. force_bound_l )  THEN
+    IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
        nxlu = nxl + 1
     ELSE
        nxlu = nxl
     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
        nysv = nys + 1
     ELSE
