Index: palm/trunk/SOURCE/netcdf_data_input_mod.f90
===================================================================
--- palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 3106)
+++ palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 3182)
@@ -20,5 +20,7 @@
 ! Current revisions:
 ! -----------------
-! 
+! Adjust input of dynamic driver according to revised Inifor version. 
+! Replace simulated_time by time_since_reference_point.
+! Rename variables in mesoscale-offline nesting mode.
 ! 
 ! Former revisions:
@@ -199,5 +201,5 @@
 !-- Define data type for nesting in larger-scale models like COSMO.
 !-- Data type comprises u, v, w, pt, and q at lateral and top boundaries.
-    TYPE force_type
+    TYPE nest_offl_type
 
        CHARACTER(LEN=100), DIMENSION(:), ALLOCATABLE ::  var_names
@@ -206,9 +208,8 @@
        INTEGER(iwp) ::  nzu    !< number of vertical levels on scalar grid in dynamic input file
        INTEGER(iwp) ::  nzw    !< number of vertical levels on w grid in dynamic input file
-       INTEGER(iwp) ::  tind   !< time index for reference time in large-scale forcing data
-       INTEGER(iwp) ::  tind_p !< time index for following time in large-scale forcing data
+       INTEGER(iwp) ::  tind   !< time index for reference time in mesoscale-offline nesting
+       INTEGER(iwp) ::  tind_p !< time index for following time in mesoscale-offline nesting
 
        LOGICAL      ::  init         = .FALSE.
-       LOGICAL      ::  interpolated = .FALSE.
        LOGICAL      ::  from_file    = .FALSE.
 
@@ -251,5 +252,5 @@
        REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pt_top   !< potentital temperautre at top boundary
 
-    END TYPE force_type
+    END TYPE nest_offl_type
 
     TYPE init_type
@@ -474,5 +475,5 @@
     TYPE(dims_xy)    ::  dim_static  !< data structure for x, y-dimension in static input file
 
-    TYPE(force_type) ::  force     !< data structure for data input at lateral and top boundaries (provided by Inifor)
+    TYPE(nest_offl_type) ::  nest_offl  !< data structure for data input at lateral and top boundaries (provided by Inifor)  
 
     TYPE(init_type) ::  init_3d    !< data structure for the initialization of the 3D flow and soil fields
@@ -606,7 +607,7 @@
 !-- Public variables
     PUBLIC albedo_pars_f, albedo_type_f, basal_area_density_f, buildings_f,    &
-           building_id_f, building_pars_f, building_type_f, force, init_3d,    &
+           building_id_f, building_pars_f, building_type_f, init_3d,           &
            init_model, input_file_static, input_pids_static,                   &
-           input_pids_dynamic, leaf_area_density_f,                            &
+           input_pids_dynamic, leaf_area_density_f, nest_offl,                 &
            pavement_pars_f, pavement_subsurface_pars_f, pavement_type_f,       &
            root_area_density_lad_f, root_area_density_lsm_f, soil_pars_f,      &
@@ -719,5 +720,5 @@
 !--    sun-zenith angles. To avoid this, longitude and latitude in each model
 !--    domain will be set to the values of the root model. Please note, this
-!--    synchronization is required already here.
+!--    synchronization is required already here. 
 #if defined( __parallel )
        CALL MPI_BCAST( init_model%latitude,  1, MPI_REAL, 0,                   &
@@ -726,5 +727,4 @@
                        MPI_COMM_WORLD, ierr )
 #endif
-
 
     END SUBROUTINE netcdf_data_input_init
@@ -2057,9 +2057,9 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  q, pt, u, v, w
+           ONLY:  q, pt, u, v, w, zu, zw
 
        USE control_parameters,                                                 &
-           ONLY:  bc_lr_cyc, bc_ns_cyc, forcing, humidity, land_surface,       &
-                  message_string, neutral, surface_pressure
+           ONLY:  bc_lr_cyc, bc_ns_cyc, humidity, land_surface, message_string,&
+                  nesting_offline, neutral, surface_pressure
 
        USE indices,                                                            &
@@ -2119,5 +2119,5 @@
        CALL get_dimension_length( id_dynamic, init_3d%nzu, 'z'     )
        CALL get_dimension_length( id_dynamic, init_3d%nzw, 'zw'    )
-       CALL get_dimension_length( id_dynamic, init_3d%nzs, 'depth' )
+       CALL get_dimension_length( id_dynamic, init_3d%nzs, 'zsoil' )
 !
 !--    Read also the horizontal dimensions. These are used just used fo
@@ -2142,5 +2142,5 @@
        ENDIF
 
-       IF ( init_3d%nzu-1 /= nz )  THEN
+       IF ( init_3d%nzu /= nz )  THEN
           message_string = 'Number of inifor vertical grid points ' //         &
                            'does not match the number of numeric grid '//      &
@@ -2159,28 +2159,51 @@
           CALL get_variable( id_dynamic, 'zw', init_3d%zw_atmos )
        ENDIF
-       IF ( check_existence( var_names, 'depth' ) )  THEN
+       IF ( check_existence( var_names, 'zsoil' ) )  THEN
           ALLOCATE( init_3d%z_soil(1:init_3d%nzs) )
-          CALL get_variable( id_dynamic, 'depth', init_3d%z_soil )
-       ENDIF
-!
-!--    Read initial geostrophic wind components at t = 0 (index 1 in file).
-!        IF ( check_existence( var_names, 'tend_ug' ) )  THEN
+          CALL get_variable( id_dynamic, 'zsoil', init_3d%z_soil )
+       ENDIF
+!
+!--    Check for consistency between vertical coordinates in dynamic 
+!--    driver and numeric grid. 
+!--    Please note, depending on compiler options both may be 
+!--    equal up to a certain threshold, and differences between
+!--    the numeric grid and vertical coordinate in the driver can built-
+!--    up to 10E-1-10E-0 m. For this reason, the check is performed not
+!--    for exactly matching values. 
+       IF ( ANY( ABS( zu(1:nzt)   - init_3d%zu_atmos(1:init_3d%nzu) )    &
+                      > 10E-1 )  .OR.                                    &
+            ANY( ABS( zw(1:nzt-1) - init_3d%zw_atmos(1:init_3d%nzw) )    &
+                      > 10E-1 ) )  THEN
+          message_string = 'Vertical grid in dynamic driver does not '// &
+                           'match the numeric grid.'
+          CALL message( 'netcdf_data_input_mod', 'NDI003', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Read initial geostrophic wind components at 
+!--    t = 0 (index 1 in file). 
        IF ( check_existence( var_names, 'ls_forcing_ug' ) )  THEN
           ALLOCATE( init_3d%ug_init(nzb:nzt+1) )
-!           CALL get_variable_pr( id_dynamic, 'tend_ug', 1,                      &
-!                                 init_3d%ug_init )
-          CALL get_variable_pr( id_dynamic, 'ls_forcing_ug', 1,                &
-                                init_3d%ug_init )
+          init_3d%ug_init = 0.0_wp
+
+          CALL get_variable_pr( id_dynamic, 'ls_forcing_ug', 1,          &
+                                init_3d%ug_init(1:nzt) )
+!
+!--       Set top-boundary condition (Neumann)
+          init_3d%ug_init(nzt+1) = init_3d%ug_init(nzt)
+
           init_3d%from_file_ug = .TRUE.
        ELSE
           init_3d%from_file_ug = .FALSE.
        ENDIF
-!        IF ( check_existence( var_names, 'tend_vg' ) )  THEN
        IF ( check_existence( var_names, 'ls_forcing_vg' ) )  THEN
           ALLOCATE( init_3d%vg_init(nzb:nzt+1) )
-!           CALL get_variable_pr( id_dynamic, 'tend_vg', 1,                      &
-!                                 init_3d%vg_init )
-          CALL get_variable_pr( id_dynamic, 'ls_forcing_vg', 1,                &
-                                init_3d%vg_init )
+          init_3d%vg_init = 0.0_wp
+
+          CALL get_variable_pr( id_dynamic, 'ls_forcing_vg', 1,          &
+                                init_3d%vg_init(1:nzt) )
+!
+!--       Set top-boundary condition (Neumann)
+          init_3d%vg_init(nzt+1) = init_3d%vg_init(nzt)
+
           init_3d%from_file_vg = .TRUE.
        ELSE
@@ -2195,11 +2218,11 @@
 !--    into separate loops.  
 !--    Read u-component
-       IF ( check_existence( var_names, 'init_u' ) )  THEN
+       IF ( check_existence( var_names, 'init_atmosphere_u' ) )  THEN
 !
 !--       Read attributes for the fill value and level-of-detail
           CALL get_attribute( id_dynamic, char_fill, init_3d%fill_u,           &
-                              .FALSE., 'init_u' )
+                              .FALSE., 'init_atmosphere_u' )
           CALL get_attribute( id_dynamic, char_lod, init_3d%lod_u,             &
-                              .FALSE., 'init_u' )
+                              .FALSE., 'init_atmosphere_u' )
 !
 !--       level-of-detail 1 - read initialization profile
@@ -2208,15 +2231,28 @@
              init_3d%u_init = 0.0_wp
 
-             CALL get_variable( id_dynamic, 'init_u',                          &
-                                init_3d%u_init(nzb+1:nzt+1) )
+             CALL get_variable( id_dynamic, 'init_atmosphere_u',               &
+                                init_3d%u_init(nzb+1:nzt) )
+!
+!--          Set top-boundary condition (Neumann)
+             init_3d%u_init(nzt+1) = init_3d%u_init(nzt)
 !
 !--       level-of-detail 2 - read 3D initialization data
           ELSEIF ( init_3d%lod_u == 2 )  THEN
-
-             CALL get_variable( id_dynamic, 'init_u',                          &
-                                u(nzb+1:nzt+1,nys:nyn,nxlu:nxr),               &
+             CALL get_variable( id_dynamic, 'init_atmosphere_u',               &
+                                u(nzb+1:nzt,nys:nyn,nxlu:nxr),                 &
                                 nxlu, nys+1, nzb+1,                            &
                                 nxr-nxlu+1, nyn-nys+1, init_3d%nzu,            &
                                 dynamic_3d )
+!
+!--          Set value at leftmost model grid point nxl = 0. This is because
+!--          Inifor provides data only from 1:nx-1 since it assumes non-cyclic
+!--          conditions.
+             IF ( nxl == 0 )                                                   &
+                u(nzb+1:nzt,nys:nyn,nxl) = u(nzb+1:nzt,nys:nyn,nxlu)
+!
+!--          Set bottom and top-boundary
+             u(nzb,:,:)   = u(nzb+1,:,:)
+             u(nzt+1,:,:) = u(nzt,:,:)
+             
           ENDIF
           init_3d%from_file_u = .TRUE.
@@ -2224,11 +2260,11 @@
 !
 !--    Read v-component
-       IF ( check_existence( var_names, 'init_v' ) )  THEN
+       IF ( check_existence( var_names, 'init_atmosphere_v' ) )  THEN
 !
 !--       Read attributes for the fill value and level-of-detail
           CALL get_attribute( id_dynamic, char_fill, init_3d%fill_v,           &
-                              .FALSE., 'init_v' )
+                              .FALSE., 'init_atmosphere_v' )
           CALL get_attribute( id_dynamic, char_lod, init_3d%lod_v,             &
-                              .FALSE., 'init_v' )
+                              .FALSE., 'init_atmosphere_v' )
 !
 !--       level-of-detail 1 - read initialization profile
@@ -2237,16 +2273,28 @@
              init_3d%v_init = 0.0_wp
 
-             CALL get_variable( id_dynamic, 'init_v',                          &
-                                init_3d%v_init(nzb+1:nzt+1) )
-
+             CALL get_variable( id_dynamic, 'init_atmosphere_v',               &
+                                init_3d%v_init(nzb+1:nzt) )
+!
+!--          Set top-boundary condition (Neumann)
+             init_3d%v_init(nzt+1) = init_3d%v_init(nzt)
 !
 !--       level-of-detail 2 - read 3D initialization data
           ELSEIF ( init_3d%lod_v == 2 )  THEN
-
-             CALL get_variable( id_dynamic, 'init_v',                          &
-                                v(nzb+1:nzt+1,nysv:nyn,nxl:nxr),               &
+          
+             CALL get_variable( id_dynamic, 'init_atmosphere_v',               &
+                                v(nzb+1:nzt,nysv:nyn,nxl:nxr),                 &
                                 nxl+1, nysv, nzb+1,                            &
                                 nxr-nxl+1, nyn-nysv+1, init_3d%nzu,            &
                                 dynamic_3d )
+!
+!--          Set value at southmost model grid point nys = 0. This is because
+!--          Inifor provides data only from 1:ny-1 since it assumes non-cyclic
+!--          conditions.
+             IF ( nys == 0 )                                                   &
+                v(nzb+1:nzt,nys,nxl:nxr) = v(nzb+1:nzt,nysv,nxl:nxr)                                
+!
+!--          Set bottom and top-boundary
+             v(nzb,:,:)   = v(nzb+1,:,:)
+             v(nzt+1,:,:) = v(nzt,:,:)
              
           ENDIF
@@ -2255,11 +2303,11 @@
 !
 !--    Read w-component
-       IF ( check_existence( var_names, 'init_w' ) )  THEN
+       IF ( check_existence( var_names, 'init_atmosphere_w' ) )  THEN
 !
 !--       Read attributes for the fill value and level-of-detail
           CALL get_attribute( id_dynamic, char_fill, init_3d%fill_w,           &
-                              .FALSE., 'init_w' )
+                              .FALSE., 'init_atmosphere_w' )
           CALL get_attribute( id_dynamic, char_lod, init_3d%lod_w,             &
-                              .FALSE., 'init_w' )
+                              .FALSE., 'init_atmosphere_w' )
 !
 !--       level-of-detail 1 - read initialization profile
@@ -2268,16 +2316,23 @@
              init_3d%w_init = 0.0_wp
 
-             CALL get_variable( id_dynamic, 'init_w',                          &
-                                init_3d%w_init(nzb+1:nzt) )
-
+             CALL get_variable( id_dynamic, 'init_atmosphere_w',               &
+                                init_3d%w_init(nzb+1:nzt-1) )
+!
+!--          Set top-boundary condition (Neumann)
+             init_3d%w_init(nzt:nzt+1) = init_3d%w_init(nzt-1)
 !
 !--       level-of-detail 2 - read 3D initialization data
           ELSEIF ( init_3d%lod_w == 2 )  THEN
 
-             CALL get_variable( id_dynamic, 'init_w',                           &
-                                w(nzb+1:nzt,nys:nyn,nxl:nxr),                   &
+             CALL get_variable( id_dynamic, 'init_atmosphere_w',                &
+                                w(nzb+1:nzt-1,nys:nyn,nxl:nxr),                 &
                                 nxl+1, nys+1, nzb+1,                            &
                                 nxr-nxl+1, nyn-nys+1, init_3d%nzw,              &
                                 dynamic_3d )
+!
+!--          Set bottom and top-boundary                                
+             w(nzb,:,:)   = 0.0_wp  
+             w(nzt,:,:)   = w(nzt-1,:,:)
+             w(nzt+1,:,:) = w(nzt-1,:,:)
 
           ENDIF
@@ -2287,11 +2342,11 @@
 !--    Read potential temperature
        IF ( .NOT. neutral )  THEN
-          IF ( check_existence( var_names, 'init_pt' ) )  THEN
+          IF ( check_existence( var_names, 'init_atmosphere_pt' ) )  THEN
 !
 !--          Read attributes for the fill value and level-of-detail
              CALL get_attribute( id_dynamic, char_fill, init_3d%fill_pt,       &
-                                 .FALSE., 'init_pt' )
+                                 .FALSE., 'init_atmosphere_pt' )
              CALL get_attribute( id_dynamic, char_lod, init_3d%lod_pt,         &
-                                 .FALSE., 'init_pt' )
+                                 .FALSE., 'init_atmosphere_pt' )
 !
 !--          level-of-detail 1 - read initialization profile
@@ -2299,19 +2354,25 @@
                 ALLOCATE( init_3d%pt_init(nzb:nzt+1) )
 
-                CALL get_variable( id_dynamic, 'init_pt',                      &
-                                   init_3d%pt_init(nzb+1:nzt+1) )
-!
-!--             Set Neumann surface boundary condition for initial profil
-                init_3d%pt_init(nzb) = init_3d%pt_init(nzb+1)
+                CALL get_variable( id_dynamic, 'init_atmosphere_pt',           &
+                                   init_3d%pt_init(nzb+1:nzt) )
+!
+!--             Set Neumann top and surface boundary condition for initial 
+!--             profil
+                init_3d%pt_init(nzb)   = init_3d%pt_init(nzb+1)
+                init_3d%pt_init(nzt+1) = init_3d%pt_init(nzt)
 !
 !--          level-of-detail 2 - read 3D initialization data
              ELSEIF ( init_3d%lod_pt == 2 )  THEN
 
-                CALL get_variable( id_dynamic, 'init_pt',                      &
-                                   pt(nzb+1:nzt+1,nys:nyn,nxl:nxr),            &
+                CALL get_variable( id_dynamic, 'init_atmosphere_pt',           &
+                                   pt(nzb+1:nzt,nys:nyn,nxl:nxr),              &
                                    nxl+1, nys+1, nzb+1,                        &
                                    nxr-nxl+1, nyn-nys+1, init_3d%nzu,          &
                                    dynamic_3d )
-
+                                   
+!
+!--             Set bottom and top-boundary
+                pt(nzb,:,:)   = pt(nzb+1,:,:)
+                pt(nzt+1,:,:) = pt(nzt,:,:)             
 
              ENDIF
@@ -2322,11 +2383,11 @@
 !--    Read mixing ratio
        IF ( humidity )  THEN
-          IF ( check_existence( var_names, 'init_qv' ) )  THEN
+          IF ( check_existence( var_names, 'init_atmosphere_qv' ) )  THEN
 !
 !--          Read attributes for the fill value and level-of-detail
              CALL get_attribute( id_dynamic, char_fill, init_3d%fill_q,        &
-                                 .FALSE., 'init_qv' )
+                                 .FALSE., 'init_atmosphere_qv' )
              CALL get_attribute( id_dynamic, char_lod, init_3d%lod_q,          &
-                                 .FALSE., 'init_qv' )
+                                 .FALSE., 'init_atmosphere_qv' )
 !
 !--          level-of-detail 1 - read initialization profile
@@ -2334,22 +2395,25 @@
                 ALLOCATE( init_3d%q_init(nzb:nzt+1) )
 
-                CALL get_variable( id_dynamic, 'init_qv',                      &
-                                   init_3d%q_init(nzb+1:nzt+1) )
-!
-!--             Set Neumann surface boundary condition for initial profil
-                init_3d%q_init(nzb) = init_3d%q_init(nzb+1)
-
+                CALL get_variable( id_dynamic, 'init_atmosphere_qv',           &
+                                    init_3d%q_init(nzb+1:nzt) )
+!
+!--             Set bottom and top boundary condition (Neumann)
+                init_3d%q_init(nzb)   = init_3d%q_init(nzb+1)
+                init_3d%q_init(nzt+1) = init_3d%q_init(nzt)
 !
 !--          level-of-detail 2 - read 3D initialization data
              ELSEIF ( init_3d%lod_q == 2 )  THEN
              
-                CALL get_variable( id_dynamic, 'init_qv',                      &
-                                   q(nzb+1:nzt+1,nys:nyn,nxl:nxr),             &
+                CALL get_variable( id_dynamic, 'init_atmosphere_qv',           &
+                                   q(nzb+1:nzt,nys:nyn,nxl:nxr),               &
                                    nxl+1, nys+1, nzb+1,                        &
                                    nxr-nxl+1, nyn-nys+1, init_3d%nzu,          &
                                    dynamic_3d )
-
-
-
+                                   
+!
+!--             Set bottom and top-boundary
+                q(nzb,:,:)   = q(nzb+1,:,:)
+                q(nzt+1,:,:) = q(nzt,:,:)
+                
              ENDIF
              init_3d%from_file_q = .TRUE.
@@ -2382,6 +2446,6 @@
 
                CALL get_variable( id_dynamic, 'init_soil_m',                   &   
-                                  init_3d%msoil(0:init_3d%nzs-1,nys:nyn,nxl:nxr),&
-                                  nxl, nxr, nys, nyn, 0, init_3d%nzs-1 )
+                                init_3d%msoil(0:init_3d%nzs-1,nys:nyn,nxl:nxr),&
+                                nxl, nxr, nys, nyn, 0, init_3d%nzs-1 )
 
              ENDIF
@@ -2413,6 +2477,6 @@
                 
                 CALL get_variable( id_dynamic, 'init_soil_t',                  &   
-                                  init_3d%tsoil(0:init_3d%nzs-1,nys:nyn,nxl:nxr),&
-                                  nxl, nxr, nys, nyn, 0, init_3d%nzs-1 )
+                                init_3d%tsoil(0:init_3d%nzs-1,nys:nyn,nxl:nxr),&
+                                nxl, nxr, nys, nyn, 0, init_3d%nzs-1 )
              ENDIF
              init_3d%from_file_tsoil = .TRUE.
@@ -2439,6 +2503,6 @@
           ENDIF
           IF ( .NOT. check_passed )  THEN
-             message_string = 'NetCDF input for u_init must not contain ' //   &
-                              'any _FillValues'
+             message_string = 'NetCDF input for init_atmosphere_u must ' //    &
+                              'not contain any _FillValues'
              CALL message( 'netcdf_data_input_mod', 'NDI004', 2, 2, 0, 6, 0 )
           ENDIF
@@ -2455,6 +2519,6 @@
           ENDIF
           IF ( .NOT. check_passed )  THEN
-             message_string = 'NetCDF input for v_init must not contain ' //   &
-                              'any _FillValues'
+             message_string = 'NetCDF input for init_atmosphere_v must ' //    &
+                              'not contain any _FillValues'
              CALL message( 'netcdf_data_input_mod', 'NDI005', 2, 2, 0, 6, 0 )
           ENDIF
@@ -2471,6 +2535,6 @@
           ENDIF
           IF ( .NOT. check_passed )  THEN
-             message_string = 'NetCDF input for w_init must not contain ' //   &
-                              'any _FillValues'
+             message_string = 'NetCDF input for init_atmosphere_w must ' //    &
+                              'not contain any _FillValues'
              CALL message( 'netcdf_data_input_mod', 'NDI006', 2, 2, 0, 6, 0 )
           ENDIF
@@ -2487,6 +2551,6 @@
           ENDIF
           IF ( .NOT. check_passed )  THEN
-             message_string = 'NetCDF input for pt_init must not contain ' //  &
-                              'any _FillValues'
+             message_string = 'NetCDF input for init_atmosphere_pt must ' //   &
+                              'not contain any _FillValues'
              CALL message( 'netcdf_data_input_mod', 'NDI007', 2, 2, 0, 6, 0 )
           ENDIF
@@ -2503,6 +2567,6 @@
           ENDIF
           IF ( .NOT. check_passed )  THEN
-             message_string = 'NetCDF input for q_init must not contain ' //   &
-                              'any _FillValues'
+             message_string = 'NetCDF input for init_atmosphere_q must ' //    &
+                              'not contain any _FillValues'
              CALL message( 'netcdf_data_input_mod', 'NDI008', 2, 2, 0, 6, 0 )
           ENDIF
@@ -2524,8 +2588,8 @@
 
        USE control_parameters,                                                 &
-           ONLY:  bc_lr_cyc, bc_ns_cyc, force_bound_l, force_bound_n,          &
-                  force_bound_r, force_bound_s,                                &
-                  forcing, humidity, message_string, neutral, simulated_time
-
+           ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
+                  bc_dirichlet_s, bc_lr_cyc, bc_ns_cyc, humidity,              &
+                  message_string, neutral, nesting_offline,                    &
+                  time_since_reference_point
 
        USE indices,                                                            &
@@ -2533,6 +2597,4 @@
 
        IMPLICIT NONE
-
-       LOGICAL      ::  dynamic_3d = .TRUE. !< flag indicating that 3D data is read from dynamic file
        
        INTEGER(iwp) ::  i          !< running index along x-direction
@@ -2545,8 +2607,8 @@
        REAL(wp) ::  dum           !< dummy variable to skip columns while reading topography file
 
-       force%from_file = MERGE( .TRUE., .FALSE., input_pids_dynamic )
+       nest_offl%from_file = MERGE( .TRUE., .FALSE., input_pids_dynamic ) 
 !
 !--    Skip input if no forcing from larger-scale models is applied.
-       IF ( .NOT. forcing )  RETURN
+       IF ( .NOT. nesting_offline )  RETURN
 
 !
@@ -2560,6 +2622,6 @@
                             TRIM( coupling_char ), id_dynamic )
 !
-!--    Initialize INIFOR forcing.
-       IF ( .NOT. force%init )  THEN
+!--    Initialize INIFOR forcing. 
+       IF ( .NOT. nest_offl%init )  THEN
 !
 !--       At first, inquire all variable names.
@@ -2567,40 +2629,40 @@
 !
 !--       Allocate memory to store variable names.
-          ALLOCATE( force%var_names(1:num_vars) )
-          CALL inquire_variable_names( id_dynamic, force%var_names )
+          ALLOCATE( nest_offl%var_names(1:num_vars) )
+          CALL inquire_variable_names( id_dynamic, nest_offl%var_names )
 !
 !--       Read time dimension, allocate memory and finally read time array
-          CALL get_dimension_length( id_dynamic, force%nt, 'time' )
-
-          IF ( check_existence( force%var_names, 'time' ) )  THEN
-             ALLOCATE( force%time(0:force%nt-1) )
-             CALL get_variable( id_dynamic, 'time', force%time )
+          CALL get_dimension_length( id_dynamic, nest_offl%nt, 'time' )
+
+          IF ( check_existence( nest_offl%var_names, 'time' ) )  THEN
+             ALLOCATE( nest_offl%time(0:nest_offl%nt-1) )
+             CALL get_variable( id_dynamic, 'time', nest_offl%time )
           ENDIF
 !
 !--       Read vertical dimension of scalar und w grid
-          CALL get_dimension_length( id_dynamic, force%nzu, 'z' )
-          CALL get_dimension_length( id_dynamic, force%nzw, 'zw' )
-
-          IF ( check_existence( force%var_names, 'z' ) )  THEN
-             ALLOCATE( force%zu_atmos(1:force%nzu) )
-             CALL get_variable( id_dynamic, 'z', force%zu_atmos )
-          ENDIF
-          IF ( check_existence( force%var_names, 'zw' ) )  THEN
-             ALLOCATE( force%zw_atmos(1:force%nzw) )
-             CALL get_variable( id_dynamic, 'zw', force%zw_atmos )
+          CALL get_dimension_length( id_dynamic, nest_offl%nzu, 'z' )
+          CALL get_dimension_length( id_dynamic, nest_offl%nzw, 'zw' )
+
+          IF ( check_existence( nest_offl%var_names, 'z' ) )  THEN
+             ALLOCATE( nest_offl%zu_atmos(1:nest_offl%nzu) )
+             CALL get_variable( id_dynamic, 'z', nest_offl%zu_atmos )
+          ENDIF
+          IF ( check_existence( nest_offl%var_names, 'zw' ) )  THEN
+             ALLOCATE( nest_offl%zw_atmos(1:nest_offl%nzw) )
+             CALL get_variable( id_dynamic, 'zw', nest_offl%zw_atmos )
           ENDIF
 
 !
 !--       Read surface pressure
-          IF ( check_existence( force%var_names,                               &
-                            'surface_forcing_surface_pressure' ) )  THEN
-             ALLOCATE( force%surface_pressure(0:force%nt-1) )
+          IF ( check_existence( nest_offl%var_names,                           &
+                                'surface_forcing_surface_pressure' ) )  THEN
+             ALLOCATE( nest_offl%surface_pressure(0:nest_offl%nt-1) )
              CALL get_variable( id_dynamic,                                    &
                                 'surface_forcing_surface_pressure',            &
-                                force%surface_pressure )
+                                nest_offl%surface_pressure )
           ENDIF
 !
 !--       Set control flag to indicate that initialization is already done
-          force%init = .TRUE.
+          nest_offl%init = .TRUE.
 
        ENDIF
@@ -2610,20 +2672,21 @@
 !--    @todo: At the moment time, in INIFOR and simulated time correspond
 !--           to each other. If required, adjust to daytime.
-       force%tind = MINLOC( ABS( force%time - simulated_time ), DIM = 1 )      &
-                    - 1
-       force%tind_p = force%tind + 1       
+       nest_offl%tind = MINLOC( ABS( nest_offl%time -                          &
+                                     time_since_reference_point ), DIM = 1 )   &
+                        - 1
+       nest_offl%tind_p = nest_offl%tind + 1       
 !
 !--    Read geostrophic wind components. In case of forcing, this is only
 !--    required if cyclic boundary conditions are applied.
        IF ( bc_lr_cyc  .AND.  bc_ns_cyc )  THEN
-          DO  t = force%tind, force%tind_p
+          DO  t = nest_offl%tind, nest_offl%tind_p
 !              CALL get_variable_pr( id_dynamic, 'tend_ug', t+1,           &
-!                                    force%ug(t-force%tind,:) )
+!                                    nest_offl%ug(t-nest_offl%tind,:) )
 !              CALL get_variable_pr( id_dynamic, 'tend_vg', t+1,           &
-!                                    force%ug(t-force%tind,:) )
+!                                    nest_offl%ug(t-nest_offl%tind,:) )
              CALL get_variable_pr( id_dynamic, 'ls_forcing_ug', t+1,           &
-                                   force%ug(t-force%tind,:) )
+                                   nest_offl%ug(t-nest_offl%tind,:) )
              CALL get_variable_pr( id_dynamic, 'ls_forcing_vg', t+1,           &
-                                   force%ug(t-force%tind,:) )
+                                   nest_offl%ug(t-nest_offl%tind,:) )
           ENDDO
        ENDIF
@@ -2633,153 +2696,159 @@
 !--    For the v-component, the data starts at nysv, while for the other
 !--    quantities the data starts at nys. This is equivalent at the north
-!--    and south domain boundary for the u-component.
-       IF ( force_bound_l )  THEN
+!--    and south domain boundary for the u-component. 
+!--    Further, lateral data is not accessed by parallel IO, indicated by the 
+!--    last passed flag in the subroutine get_variable(). This is because
+!--    not every PE participates in this collective blocking read operation. 
+       IF ( bc_dirichlet_l )  THEN
           CALL get_variable( id_dynamic, 'ls_forcing_left_u',                  &
-                           force%u_left(0:1,nzb+1:nzt+1,nys:nyn),              &
-                           nys+1, nzb+1, force%tind+1,                         &
-                           nyn-nys+1, force%nzu, 2, dynamic_3d )
-          
+                           nest_offl%u_left(0:1,nzb+1:nzt,nys:nyn),            &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzu, 2, .FALSE. )
+      
           CALL get_variable( id_dynamic, 'ls_forcing_left_v',                  &
-                           force%v_left(0:1,nzb+1:nzt+1,nysv:nyn),             &
-                           nysv, nzb+1, force%tind+1,                          &
-                           nyn-nysv+1, force%nzu, 2, dynamic_3d )
+                           nest_offl%v_left(0:1,nzb+1:nzt,nysv:nyn),           &
+                           nysv, nzb+1, nest_offl%tind+1,                      &
+                           nyn-nysv+1, nest_offl%nzu, 2, .FALSE. )
 
           CALL get_variable( id_dynamic, 'ls_forcing_left_w',                  &
-                           force%w_left(0:1,nzb+1:nzt,nys:nyn),                &
-                           nys+1, nzb+1, force%tind+1,                         &
-                           nyn-nys+1, force%nzw, 2, dynamic_3d )
+                           nest_offl%w_left(0:1,nzb+1:nzt-1,nys:nyn),          &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzw, 2, .FALSE. )
 
           IF ( .NOT. neutral )  THEN
              CALL get_variable( id_dynamic, 'ls_forcing_left_pt',              &
-                           force%pt_left(0:1,nzb+1:nzt+1,nys:nyn),             &
-                           nys+1, nzb+1, force%tind+1,                         &
-                           nyn-nys+1, force%nzu, 2, dynamic_3d )
-          ENDIF
+                           nest_offl%pt_left(0:1,nzb+1:nzt,nys:nyn),           &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+
           IF ( humidity )  THEN
              CALL get_variable( id_dynamic, 'ls_forcing_left_qv',              &
-                           force%q_left(0:1,nzb+1:nzt+1,nys:nyn),              &
-                           nys+1, nzb+1, force%tind+1,                         &
-                           nyn-nys+1, force%nzu, 2, dynamic_3d )
-          ENDIF
-       ENDIF
-
-       IF ( force_bound_r )  THEN
+                           nest_offl%q_left(0:1,nzb+1:nzt,nys:nyn),            &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+
+       ENDIF
+
+       IF ( bc_dirichlet_r )  THEN
           CALL get_variable( id_dynamic, 'ls_forcing_right_u',                 &
-                           force%u_right(0:1,nzb+1:nzt+1,nys:nyn),             &
-                           nys+1, nzb+1, force%tind+1,                         &
-                           nyn-nys+1, force%nzu, 2, dynamic_3d )
+                           nest_offl%u_right(0:1,nzb+1:nzt,nys:nyn),           &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzu, 2, .FALSE. )
                            
           CALL get_variable( id_dynamic, 'ls_forcing_right_v',                 &
-                           force%v_right(0:1,nzb+1:nzt+1,nysv:nyn),            &
-                           nysv, nzb+1, force%tind+1,                          &
-                           nyn-nysv+1, force%nzu, 2, dynamic_3d )
+                           nest_offl%v_right(0:1,nzb+1:nzt,nysv:nyn),          &
+                           nysv, nzb+1, nest_offl%tind+1,                      &
+                           nyn-nysv+1, nest_offl%nzu, 2, .FALSE. )
                            
           CALL get_variable( id_dynamic, 'ls_forcing_right_w',                 &
-                           force%w_right(0:1,nzb+1:nzt,nys:nyn),               &
-                           nys+1, nzb+1, force%tind+1,                         &
-                           nyn-nys+1, force%nzw, 2, dynamic_3d )
+                           nest_offl%w_right(0:1,nzb+1:nzt-1,nys:nyn),         &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzw, 2, .FALSE. )
                            
           IF ( .NOT. neutral )  THEN
              CALL get_variable( id_dynamic, 'ls_forcing_right_pt',             &
-                           force%pt_right(0:1,nzb+1:nzt+1,nys:nyn),            &
-                           nys+1, nzb+1, force%tind+1,                         &
-                           nyn-nys+1, force%nzu, 2, dynamic_3d )
+                           nest_offl%pt_right(0:1,nzb+1:nzt,nys:nyn),          &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzu, 2, .FALSE. )
           ENDIF
           IF ( humidity )  THEN
              CALL get_variable( id_dynamic, 'ls_forcing_right_qv',             &
-                           force%q_right(0:1,nzb+1:nzt+1,nys:nyn),             &
-                           nys+1, nzb+1, force%tind+1,                         &
-                           nyn-nys+1, force%nzu, 2, dynamic_3d )
-          ENDIF
-       ENDIF
-
-       IF ( force_bound_n )  THEN
+                           nest_offl%q_right(0:1,nzb+1:nzt,nys:nyn),           &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+       ENDIF
+
+       IF ( bc_dirichlet_n )  THEN
        
           CALL get_variable( id_dynamic, 'ls_forcing_north_u',                 &
-                           force%u_north(0:1,nzb+1:nzt+1,nxlu:nxr),            &
-                           nxlu, nzb+1, force%tind+1,                          &
-                           nxr-nxlu+1, force%nzu, 2, dynamic_3d )
-
+                           nest_offl%u_north(0:1,nzb+1:nzt,nxlu:nxr),          &
+                           nxlu, nzb+1, nest_offl%tind+1,                      &
+                           nxr-nxlu+1, nest_offl%nzu, 2, .FALSE. )
+                           
           CALL get_variable( id_dynamic, 'ls_forcing_north_v',                 &
-                           force%v_north(0:1,nzb+1:nzt+1,nxl:nxr),             &
-                           nxl+1, nzb+1, force%tind+1,                         &
-                           nxr-nxl+1, force%nzu, 2, dynamic_3d )
+                           nest_offl%v_north(0:1,nzb+1:nzt,nxl:nxr),           &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzu, 2, .FALSE. )
                            
           CALL get_variable( id_dynamic, 'ls_forcing_north_w',                 &
-                           force%w_north(0:1,nzb+1:nzt,nxl:nxr),               &
-                           nxl+1, nzb+1, force%tind+1,                         &
-                           nxr-nxl+1, force%nzw, 2, dynamic_3d )
+                           nest_offl%w_north(0:1,nzb+1:nzt-1,nxl:nxr),         &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzw, 2, .FALSE. )
                            
           IF ( .NOT. neutral )  THEN
              CALL get_variable( id_dynamic, 'ls_forcing_north_pt',             &
-                           force%pt_north(0:1,nzb+1:nzt+1,nxl:nxr),            &
-                           nxl+1, nzb+1, force%tind+1,                         &
-                           nxr-nxl+1, force%nzu, 2, dynamic_3d )
+                           nest_offl%pt_north(0:1,nzb+1:nzt,nxl:nxr),          &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzu, 2, .FALSE. )
           ENDIF
           IF ( humidity )  THEN
              CALL get_variable( id_dynamic, 'ls_forcing_north_qv',             &
-                           force%q_north(0:1,nzb+1:nzt+1,nxl:nxr),             &
-                           nxl+1, nzb+1, force%tind+1,                         &
-                           nxr-nxl+1, force%nzu, 2, dynamic_3d )
-          ENDIF
-       ENDIF
-
-       IF ( force_bound_s )  THEN
+                           nest_offl%q_north(0:1,nzb+1:nzt,nxl:nxr),           &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+       ENDIF
+
+       IF ( bc_dirichlet_s )  THEN
           CALL get_variable( id_dynamic, 'ls_forcing_south_u',                 &
-                           force%u_south(0:1,nzb+1:nzt+1,nxlu:nxr),            &
-                           nxlu, nzb+1, force%tind+1,                          &
-                           nxr-nxlu+1, force%nzu, 2, dynamic_3d )
+                           nest_offl%u_south(0:1,nzb+1:nzt,nxlu:nxr),          &
+                           nxlu, nzb+1, nest_offl%tind+1,                      &
+                           nxr-nxlu+1, nest_offl%nzu, 2, .FALSE. )
 
           CALL get_variable( id_dynamic, 'ls_forcing_south_v',                 &
-                           force%v_south(0:1,nzb+1:nzt+1,nxl:nxr),             &
-                           nxl+1, nzb+1, force%tind+1,                         &
-                           nxr-nxl+1, force%nzu, 2, dynamic_3d )
+                           nest_offl%v_south(0:1,nzb+1:nzt,nxl:nxr),           &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzu, 2, .FALSE. )
                            
           CALL get_variable( id_dynamic, 'ls_forcing_south_w',                 &
-                           force%w_south(0:1,nzb+1:nzt,nxl:nxr),               &
-                           nxl+1, nzb+1, force%tind+1,                         &
-                           nxr-nxl+1, force%nzw, 2, dynamic_3d )
+                           nest_offl%w_south(0:1,nzb+1:nzt-1,nxl:nxr),         &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzw, 2, .FALSE. )
                            
           IF ( .NOT. neutral )  THEN
              CALL get_variable( id_dynamic, 'ls_forcing_south_pt',             &
-                           force%pt_south(0:1,nzb+1:nzt+1,nxl:nxr),            &
-                           nxl+1, nzb+1, force%tind+1,                         &
-                           nxr-nxl+1, force%nzu, 2, dynamic_3d )
+                           nest_offl%pt_south(0:1,nzb+1:nzt,nxl:nxr),          &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzu, 2, .FALSE. )
           ENDIF
           IF ( humidity )  THEN
              CALL get_variable( id_dynamic, 'ls_forcing_south_qv',             &
-                           force%q_south(0:1,nzb+1:nzt+1,nxl:nxr),             &
-                           nxl+1, nzb+1, force%tind+1,                         &
-                           nxr-nxl+1, force%nzu, 2, dynamic_3d )
-          ENDIF
-       ENDIF
+                           nest_offl%q_south(0:1,nzb+1:nzt,nxl:nxr),           &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+       ENDIF
+
 !
 !--    Top boundary
        CALL get_variable( id_dynamic, 'ls_forcing_top_u',                      &
-                             force%u_top(0:1,nys:nyn,nxlu:nxr),                &
-                             nxlu, nys+1, force%tind+1,                        &
-                             nxr-nxlu+1, nyn-nys+1, 2, dynamic_3d )
+                             nest_offl%u_top(0:1,nys:nyn,nxlu:nxr),            &
+                             nxlu, nys+1, nest_offl%tind+1,                    &
+                             nxr-nxlu+1, nyn-nys+1, 2, .TRUE. )
 
        CALL get_variable( id_dynamic, 'ls_forcing_top_v',                      &
-                             force%v_top(0:1,nysv:nyn,nxl:nxr),                &
-                             nxl+1, nysv, force%tind+1,                        &
-                             nxr-nxl+1, nyn-nysv+1, 2, dynamic_3d )
+                             nest_offl%v_top(0:1,nysv:nyn,nxl:nxr),            &
+                             nxl+1, nysv, nest_offl%tind+1,                    &
+                             nxr-nxl+1, nyn-nysv+1, 2, .TRUE. )
                              
        CALL get_variable( id_dynamic, 'ls_forcing_top_w',                      &
-                             force%w_top(0:1,nys:nyn,nxl:nxr),                 &
-                             nxl+1, nys+1, force%tind+1,                       &
-                             nxr-nxl+1, nyn-nys+1, 2, dynamic_3d )
+                             nest_offl%w_top(0:1,nys:nyn,nxl:nxr),             &
+                             nxl+1, nys+1, nest_offl%tind+1,                   &
+                             nxr-nxl+1, nyn-nys+1, 2, .TRUE. )
                              
        IF ( .NOT. neutral )  THEN
           CALL get_variable( id_dynamic, 'ls_forcing_top_pt',                  &
-                                force%pt_top(0:1,nys:nyn,nxl:nxr),             &
-                                nxl+1, nys+1, force%tind+1,                    &
-                                nxr-nxl+1, nyn-nys+1, 2, dynamic_3d )
+                                nest_offl%pt_top(0:1,nys:nyn,nxl:nxr),         &
+                                nxl+1, nys+1, nest_offl%tind+1,                &
+                                nxr-nxl+1, nyn-nys+1, 2, .TRUE. )
        ENDIF
        IF ( humidity )  THEN
           CALL get_variable( id_dynamic, 'ls_forcing_top_qv',                  &
-                                force%q_top(0:1,nys:nyn,nxl:nxr),              &
-                                nxl+1, nys+1, force%tind+1,                    &
-                                nxr-nxl+1, nyn-nys+1, 2, dynamic_3d )
+                                nest_offl%q_top(0:1,nys:nyn,nxl:nxr),          &
+                                nxl+1, nys+1, nest_offl%tind+1,                &
+                                nxr-nxl+1, nyn-nys+1, 2, .TRUE. )
        ENDIF
 
@@ -2792,11 +2861,4 @@
        CALL cpu_log( log_point_s(86), 'NetCDF input forcing', 'stop' )
 
-!
-!--    Finally, after data input set control flag indicating that vertical
-!--    inter- and/or extrapolation is required.
-!--    Please note, inter/extrapolation of INIFOR data is only a workaroud,
-!--    as long as INIFOR delivers vertically equidistant data.
-       force%interpolated = .FALSE.
-
     END SUBROUTINE netcdf_data_input_lsf
 
@@ -2810,5 +2872,5 @@
 
        USE control_parameters,                                                 &
-           ONLY:  initializing_actions, forcing, message_string
+           ONLY:  initializing_actions, message_string, nesting_offline 
 
        IMPLICIT NONE
@@ -2816,6 +2878,7 @@
 !
 !--    In case of forcing, check whether dynamic input file is present
-       IF ( .NOT. input_pids_dynamic  .AND.  forcing )  THEN
-          message_string = 'forcing = .TRUE. requires dynamic input file ' //  &
+       IF ( .NOT. input_pids_dynamic  .AND.  nesting_offline  )  THEN
+          message_string = 'nesting_offline = .TRUE. requires dynamic '  //    &
+                            'input file ' //                                   &
                             TRIM( input_file_dynamic ) // TRIM( coupling_char )
           CALL message( 'netcdf_data_input_mod', 'NDI009', 1, 2, 0, 6, 0 )
@@ -4514,5 +4577,7 @@
 !------------------------------------------------------------------------------!
     SUBROUTINE get_variable_3d_real_dynamic( id, variable_name, var,           &
-                            i1s, i2s, i3s, count_1, count_2, count_3, dynamic)
+                                             i1s, i2s, i3s,                    &
+                                             count_1, count_2, count_3,        &
+                                             par_access )
                                 
        USE indices
@@ -4523,5 +4588,5 @@
        CHARACTER(LEN=*)              ::  variable_name   !< variable name
 
-       LOGICAL                       ::  dynamic         !< additional flag just used to select correct overloaded routine from interface block 
+       LOGICAL                       ::  par_access      !< additional flag indicating whether parallel read operations should be performed or not 
        
        INTEGER(iwp)                  ::  count_1         !< number of elements to be read along 1st dimension (with respect to file)
@@ -4550,10 +4615,14 @@
 #if defined( __netcdf )
 !
-!--    Inquire variable id
+!--    Inquire variable id.
        nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
 !
 !--    Check for collective read-operation and set respective NetCDF flags if
 !--    required. 
-       IF ( collective_read )  THEN
+!--    Please note, in contrast to the other input routines where each PEs 
+!--    reads its subdomain data, dynamic input data not by all PEs, only
+!--    by those which encompass lateral model boundaries. Hence, collective
+!--    read operations are only enabled for top-boundary data.
+       IF ( collective_read  .AND.  par_access )  THEN
           nc_stat = NF90_VAR_PAR_ACCESS (id, id_var, NF90_COLLECTIVE)
        ENDIF    
