Index: /palm/trunk/SOURCE/chem_emissions_mod.f90
===================================================================
--- /palm/trunk/SOURCE/chem_emissions_mod.f90	(revision 4156)
+++ /palm/trunk/SOURCE/chem_emissions_mod.f90	(revision 4157)
@@ -27,4 +27,7 @@
 ! -----------------
 ! $Id$
+! Replace global arrays also in mode_emis branch
+! 
+! 4154 2019-08-13 13:35:59Z suehring
 ! Replace global arrays for emissions by local ones.
 ! 
@@ -899,5 +902,5 @@
 
                 IF  (  .NOT.  ALLOCATED( emis_distribution) )  THEN
-                   ALLOCATE( emis_distribution(1,0:ny,0:nx,n_matched_vars) )
+                   ALLOCATE( emis_distribution(1,nys:nyn,nxl:nxr,n_matched_vars) )
                 ENDIF
 
@@ -907,5 +910,5 @@
 
                 IF  (  .NOT.  ALLOCATED( emis_distribution) )  THEN
-                   ALLOCATE( emis_distribution(1,0:ny,0:nx,n_matched_vars) )
+                   ALLOCATE( emis_distribution(1,nys:nyn,nxl:nxr,n_matched_vars) )
                 ENDIF
 
@@ -915,5 +918,5 @@
 
                 IF  (  .NOT.  ALLOCATED( emis_distribution) )  THEN
-                   ALLOCATE( emis_distribution(nzb:nzt+1,0:ny,0:nx,n_matched_vars) )
+                   ALLOCATE( emis_distribution(nzb:nzt+1,nys:nyn,nxl:nxr,n_matched_vars) )
                 ENDIF
  
Index: /palm/trunk/SOURCE/diagnostic_output_quantities_mod.f90
===================================================================
--- /palm/trunk/SOURCE/diagnostic_output_quantities_mod.f90	(revision 4156)
+++ /palm/trunk/SOURCE/diagnostic_output_quantities_mod.f90	(revision 4157)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Initialization restructured, in order to work also when data output during
+! spin-up is enabled. 
+! 
+! 4132 2019-08-02 12:34:17Z suehring
 ! Bugfix in masked data output
 ! 
@@ -158,5 +162,4 @@
            doq_output_mask,                                                    &
            doq_init,                                                           &
-           doq_prepare,                                                        &
            doq_wrd_local
 !          doq_rrd_local,                                                      &
@@ -816,7 +819,11 @@
     
     INTEGER(iwp) ::  ivar   !< loop index over all 2d/3d/mask output quantities
+
 !
 !-- Next line is to avoid compiler warnings about unused variables
     IF ( timestep_number_at_prev_calc == 0 )  CONTINUE
+!
+!-- Preparatory steps and initialization of output arrays
+    IF ( .NOT.  prepared_diagnostic_output_quantities )  CALL doq_prepare
 
     initialized_diagnostic_output_quantities = .FALSE.
@@ -882,8 +889,5 @@
 
 !     CALL cpu_log( log_point(41), 'calculate_quantities', 'start' )
-!
-!-- Preparatory steps and initialization of output arrays
-    IF ( .NOT.  prepared_diagnostic_output_quantities )     CALL doq_prepare
-    IF ( .NOT.  initialized_diagnostic_output_quantities )  CALL doq_init
+
 !
 !-- Save timestep number to check in time_integration if doq_calculate 
Index: /palm/trunk/SOURCE/module_interface.f90
===================================================================
--- /palm/trunk/SOURCE/module_interface.f90	(revision 4156)
+++ /palm/trunk/SOURCE/module_interface.f90	(revision 4157)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Call doq_init from module interface
+! 
+! 4132 2019-08-02 12:34:17Z suehring
 ! Bugfix in masked data output for diagnostic quantities
 ! 
@@ -270,4 +273,5 @@
                doq_check_data_output,                                          &
                doq_define_netcdf_grid,                                         &
+               doq_init,                                                       &
                doq_output_2d,                                                  &
                doq_output_3d,                                                  &
@@ -1030,4 +1034,6 @@
     IF ( radiation           )  CALL radiation_init
 
+    CALL doq_init
+
     IF ( user_module_enabled )  CALL user_init
 
Index: /palm/trunk/SOURCE/radiation_model_mod.f90
===================================================================
--- /palm/trunk/SOURCE/radiation_model_mod.f90	(revision 4156)
+++ /palm/trunk/SOURCE/radiation_model_mod.f90	(revision 4157)
@@ -28,4 +28,7 @@
 ! -----------------
 ! $Id$
+! Give informative message on raytracing distance only by core zero
+! 
+! 4148 2019-08-08 11:26:00Z suehring
 ! Comments added
 ! 
@@ -6301,5 +6304,5 @@
           WRITE(message_string, '(a,f6.1)') 'Max_raytracing_dist is set less than ' // &
                'double the urban surface layer height, i.e. ', mrl
-          CALL message('radiation_interaction_init', 'PA0521', 0, 0, -1, 6, 0)
+          CALL message('radiation_interaction_init', 'PA0521', 0, 0, 0, 6, 0 )
        ENDIF
 !        IF ( max_raytracing_dist <= mrl ) THEN
