Index: palm/trunk/SOURCE/dynamics_mod.f90
===================================================================
--- palm/trunk/SOURCE/dynamics_mod.f90	(revision 4356)
+++ palm/trunk/SOURCE/dynamics_mod.f90	(revision 4358)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Refine post-initialization check for realistically inital values of mixing ratio. Give an error
+! message for faulty initial values, but only a warning in a restart run. 
+! 
+! 4347 2019-12-18 13:18:33Z suehring
 ! Implement post-initialization check for realistically inital values of mixing ratio
 ! 
@@ -479,5 +483,7 @@
 !-- not exceed the saturation mixing ratio by more than 2 percent. Please note, the check is 
 !-- performed for each grid point (not just for a vertical profile), in order to cover also 
-!-- three-dimensional initialization.
+!-- three-dimensional initialization. Note, this check gives an error only for the initial run not
+!-- for a restart run. In case there are no cloud physics considered, the mixing ratio can exceed
+!-- the saturation moisture. This case a warning is given. 
     IF ( humidity  .AND.  .NOT. neutral )  THEN
        DO  i = nxl, nxr
@@ -502,7 +508,12 @@
 #endif
 
-       IF ( .NOT. realistic_q )  THEN
+       IF ( .NOT. realistic_q  .AND.                                                               &
+            TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
           message_string = 'The initial mixing ratio exceeds the saturation mixing ratio.'
           CALL message( 'dynamic_init_checks', 'PA0697', 2, 2, 0, 6, 0 )
+       ELSEIF ( .NOT. realistic_q  .AND.                                                           &
+                TRIM( initializing_actions ) == 'read_restart_data' )  THEN
+          message_string = 'The mixing ratio exceeds the saturation mixing ratio.'
+          CALL message( 'dynamic_init_checks', 'PA0697', 0, 1, 0, 6, 0 )
        ENDIF
     ENDIF
Index: palm/trunk/SOURCE/nesting_offl_mod.f90
===================================================================
--- palm/trunk/SOURCE/nesting_offl_mod.f90	(revision 4356)
+++ palm/trunk/SOURCE/nesting_offl_mod.f90	(revision 4358)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Bugfix, time coordinate is relative to origin_time rather than to 00:00:00 
+! UTC.
+! 
+! 4346 2019-12-18 11:55:56Z motisi
 ! Introduction of wall_flags_total_0, which currently sets bits based on static
 ! topography information used in wall_flags_static_0
@@ -213,7 +217,4 @@
                pids_id
 
-    USE palm_date_time_mod,                                                    &
-        ONLY:  get_date_time
-
     USE pegrid
 
@@ -304,5 +305,4 @@
 
     REAL(wp) ::  fac_dt              !< interpolation factor
-    REAL(wp) ::  time_utc_init       !< time in seconds-of-day of origin_date_time
     REAL(wp) ::  zi_ribulk = 0.0_wp  !< boundary-layer depth according to bulk Richardson criterion, i.e. the height where Ri_bulk exceeds the critical
                                      !< bulk Richardson number of 0.2
@@ -433,5 +433,5 @@
 !--    Check if dynamic driver data input is required.
        IF ( nest_offl%time(nest_offl%tind_p) <=                                &
-            MAX( time_since_reference_point, 0.0_wp) + time_utc_init  .OR.     &
+            MAX( time_since_reference_point, 0.0_wp)  .OR.                     &
             .NOT.  nest_offl%init )  THEN
           CONTINUE
@@ -447,10 +447,10 @@
 !
 !--    Obtain time index for current point in time. Note, the time coordinate
-!--    in the input file is relative to time_utc_init. Since time_since_...
-!--    is negativ when spinup is used, use MAX function to obtain correct 
-!--    time at the beginning. 
-       nest_offl%tind = MINLOC( ABS( nest_offl%time - (                        &
-                                     time_utc_init +                           &
-                                     MAX( time_since_reference_point, 0.0_wp) )&
+!--    in the input file is always relative to the initial time in UTC, i.e.
+!--    the time coordinate always starts at 0.0 even if the initial UTC is e.g.
+!--    7200.0. Further, since time_since_reference_point is negativ here when 
+!--    spinup is applied, use MAX function to obtain correct time index. 
+       nest_offl%tind = MINLOC( ABS( nest_offl%time -                          &
+                                     MAX( time_since_reference_point, 0.0_wp)  &
                                    ), DIM = 1 ) - 1
        nest_offl%tind_p = nest_offl%tind + 1
@@ -1582,5 +1582,5 @@
 !--    t+dt can slightly exceed time(tind_p) before boundary data is updated 
 !--    again. 
-       fac_dt = ( time_utc_init + time_since_reference_point                   &
+       fac_dt = ( time_since_reference_point                                   &
                 - nest_offl%time(nest_offl%tind) + dt_3d ) /                   &
            ( nest_offl%time(nest_offl%tind_p) - nest_offl%time(nest_offl%tind) )
@@ -1886,8 +1886,4 @@
            
        INTEGER(iwp) ::  n !< running index for chemical species
-
-!
-!--    Get time_utc_init from origin_date_time
-       CALL get_date_time( 0.0_wp, second_of_day = time_utc_init )
 
 !--    Allocate arrays for geostrophic wind components. Arrays will 
