Index: palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_3d_model.f90	(revision 3398)
+++ palm/trunk/SOURCE/init_3d_model.f90	(revision 3404)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Set bottom boundary condition for geostrophic wind components in inifor
+! initialization
+! 
+! 3347 2018-10-15 14:21:08Z suehring
 ! - Separate offline nesting from large_scale_nudging_mod
 ! - Improve the synthetic turbulence generator
@@ -1214,7 +1218,10 @@
              vg(:) = init_3d%vg_init(:)
           ENDIF
-          
+!
+!--       Set bottom and top boundary condition for geostrophic wind
           ug(nzt+1) = ug(nzt)
           vg(nzt+1) = vg(nzt)
+          ug(nzb)   = ug(nzb+1)
+          vg(nzb)   = vg(nzb+1)
 !
 !--       Set inital w to 0
Index: palm/trunk/SOURCE/nesting_offl_mod.f90
===================================================================
--- palm/trunk/SOURCE/nesting_offl_mod.f90	(revision 3398)
+++ palm/trunk/SOURCE/nesting_offl_mod.f90	(revision 3404)
@@ -25,4 +25,7 @@
 ! -----------------
 !
+! Consider time-dependent geostrophic wind components in offline nesting
+! 
+! 
 ! Initial Revision: 
 ! - separate offline nesting from large_scale_nudging_mod
@@ -656,10 +659,12 @@
 !
 !-- Update geostrophic wind components from dynamic input file. 
-!-- Note, at the moment this is not available. As a workaround, use reference
-!-- profiles derived from the boundary values. 
-!-- This will be revised as soon as geostrophic wind components are provided by
-!-- dynamic input file.
-    ug = u_init
-    vg = v_init
+    DO  k = nzb+1, nzt
+       ug(k) = interpolate_in_time( nest_offl%ug(0,k), nest_offl%ug(1,k),      &
+                                    fac_dt )
+       vg(k) = interpolate_in_time( nest_offl%vg(0,k), nest_offl%vg(1,k),      &
+                                    fac_dt )
+    ENDDO
+    ug(nzt+1) = ug(nzt)
+    vg(nzt+1) = vg(nzt)
     
     CALL  cpu_log( log_point(58), 'offline nesting', 'stop' )
@@ -959,11 +964,7 @@
 
 !--    Allocate arrays for geostrophic wind components. Arrays will 
-!--    incorporate 2 time levels in order to interpolate in between. Please
-!--    note, forcing using geostrophic wind components is only required in 
-!--    case of cyclic boundary conditions.
-!        IF ( bc_lr_cyc  .AND.  bc_ns_cyc )  THEN
-!           ALLOCATE( nest_offl%ug(0:1,nzb:nzt+1) )
-!           ALLOCATE( nest_offl%vg(0:1,nzb:nzt+1) )
-!        ENDIF
+!--    incorporate 2 time levels in order to interpolate in between. 
+       ALLOCATE( nest_offl%ug(0:1,1:nzt) )
+       ALLOCATE( nest_offl%vg(0:1,1:nzt) )
 !
 !--    Allocate arrays for reading boundary values. Arrays will incorporate 2 
@@ -1008,5 +1009,5 @@
        CALL netcdf_data_input_offline_nesting
 !
-!--    Initialize boundary data 
+!--    Initialize boundary data.
        IF ( bc_dirichlet_l )  THEN
           u(nzb+1:nzt,nys:nyn,0)    = nest_offl%u_left(0,nzb+1:nzt,nys:nyn)
@@ -1046,4 +1047,17 @@
        ENDIF
 !
+!--    Initialize geostrophic wind components. Actually this is already done in
+!--    init_3d_model when initializing_action = 'inifor', however, in speical 
+!--    case of user-defined initialization this will be done here again, in 
+!--    order to have a consistent initialization. 
+       ug(nzb+1:nzt) = nest_offl%ug(0,nzb+1:nzt)
+       vg(nzb+1:nzt) = nest_offl%vg(0,nzb+1:nzt)
+!
+!--    Set bottom and top boundary condition for geostrophic wind components
+       ug(nzt+1) = ug(nzt)
+       vg(nzt+1) = vg(nzt)
+       ug(nzb)   = ug(nzb+1)
+       vg(nzb)   = vg(nzb+1)
+!
 !--    Initial calculation of the boundary layer depth from the prescribed 
 !--    boundary data. This is requiered for initialize the synthetic turbulence
Index: palm/trunk/SOURCE/netcdf_data_input_mod.f90
===================================================================
--- palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 3398)
+++ palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 3404)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Consider time-dependent geostrophic wind components in offline nesting
+! 
+! 3376 2018-10-19 10:15:32Z suehring
 ! Additional check for consistent building initialization implemented
 ! 
@@ -3088,6 +3091,6 @@
        USE control_parameters,                                                 &
            ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
-                  bc_dirichlet_s, bc_lr_cyc, bc_ns_cyc, humidity,              &
-                  neutral, nesting_offline, time_since_reference_point
+                  bc_dirichlet_s, humidity, neutral, nesting_offline,          &
+                  time_since_reference_point
 
        USE indices,                                                            &
@@ -3170,18 +3173,11 @@
        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 = nest_offl%tind, nest_offl%tind_p
-!              CALL get_variable_pr( id_dynamic, 'tend_ug', t+1,           &
-!                                    nest_offl%ug(t-nest_offl%tind,:) )
-!              CALL get_variable_pr( id_dynamic, 'tend_vg', t+1,           &
-!                                    nest_offl%ug(t-nest_offl%tind,:) )
-             CALL get_variable_pr( id_dynamic, 'ls_forcing_ug', t+1,           &
-                                   nest_offl%ug(t-nest_offl%tind,:) )
-             CALL get_variable_pr( id_dynamic, 'ls_forcing_vg', t+1,           &
-                                   nest_offl%ug(t-nest_offl%tind,:) )
-          ENDDO
-       ENDIF
+!--    Read geostrophic wind components
+       DO  t = nest_offl%tind, nest_offl%tind_p
+          CALL get_variable_pr( id_dynamic, 'ls_forcing_ug', t+1,              &
+                                nest_offl%ug(t-nest_offl%tind,nzb+1:nzt) )
+          CALL get_variable_pr( id_dynamic, 'ls_forcing_vg', t+1,              &
+                                nest_offl%vg(t-nest_offl%tind,nzb+1:nzt) )
+       ENDDO
 !
 !--    Read data at lateral and top boundaries. Please note, at left and
