Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 4048)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 4064)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Moved call to radiation module out of intermediate time loop
+! 
+! 4048 2019-06-21 21:00:21Z knoop
 ! Moved production_e_init call into turbulence_closure_mod
 ! 
@@ -1482,44 +1485,4 @@
           ENDIF
 
-!
-!--       If required, calculate radiative fluxes and heating rates
-          IF ( radiation  .AND.  intermediate_timestep_count == intermediate_timestep_count_max    &
-               .AND. time_since_reference_point > skip_time_do_radiation )  THEN
-
-               time_radiation = time_radiation + dt_3d
-
-             IF ( time_radiation >= dt_radiation  .OR.  force_radiation_call )  THEN
-
-                CALL cpu_log( log_point(50), 'radiation', 'start' )
-
-                IF ( .NOT. force_radiation_call )  THEN
-                   time_radiation = time_radiation - dt_radiation
-                ENDIF
-
-!
-!--             Adjust the current time to the time step of the radiation model.
-!--             Needed since radiation is pre-calculated and stored only on apparent 
-!--             solar positions
-                time_since_reference_point_save = time_since_reference_point
-                time_since_reference_point = REAL( FLOOR( time_since_reference_point /             &
-                                                          dt_radiation), wp ) * dt_radiation
-
-                CALL radiation_control
-
-                IF ( ( urban_surface  .OR.  land_surface )  .AND.  radiation_interactions )  THEN
-                   CALL cpu_log( log_point_s(46), 'radiation_interaction', 'start' )
-                   CALL radiation_interaction
-                   CALL cpu_log( log_point_s(46), 'radiation_interaction', 'stop' )
-                ENDIF
-    
-!
-!--             Return the current time to its original value
-                time_since_reference_point = time_since_reference_point_save
-
-                CALL cpu_log( log_point(50), 'radiation', 'stop' )
-
-             ENDIF
-          ENDIF
-
        ENDDO   ! Intermediate step loop
 
@@ -1544,4 +1507,43 @@
 
 !
+!--    If required, calculate radiative fluxes and heating rates
+       IF ( radiation  .AND.  time_since_reference_point > skip_time_do_radiation )  THEN
+
+          time_radiation = time_radiation + dt_3d
+
+          IF ( time_radiation >= dt_radiation  .OR.  force_radiation_call )  THEN
+
+             CALL cpu_log( log_point(50), 'radiation', 'start' )
+
+             IF ( .NOT. force_radiation_call )  THEN
+                time_radiation = time_radiation - dt_radiation
+             ENDIF
+
+!
+!--          Adjust the current time to the time step of the radiation model.
+!--          Needed since radiation is pre-calculated and stored only on apparent 
+!--          solar positions
+             time_since_reference_point_save = time_since_reference_point
+             time_since_reference_point = REAL( FLOOR( time_since_reference_point /             &
+                                                       dt_radiation ), wp ) * dt_radiation
+
+             CALL radiation_control
+
+             IF ( ( urban_surface  .OR.  land_surface )  .AND.  radiation_interactions )  THEN
+                CALL cpu_log( log_point_s(46), 'radiation_interaction', 'start' )
+                CALL radiation_interaction
+                CALL cpu_log( log_point_s(46), 'radiation_interaction', 'stop' )
+             ENDIF
+ 
+!
+!--          Return the current time to its original value
+             time_since_reference_point = time_since_reference_point_save
+
+             CALL cpu_log( log_point(50), 'radiation', 'stop' )
+
+          ENDIF
+       ENDIF
+
+!
 !--    If required, consider chemical emissions
        IF ( air_chemistry  .AND.  emissions_anthropogenic )  THEN
