Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 1700)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 1701)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Bugfix: definition of rad_net timeseries was missing
 ! 
 ! Former revisions:
@@ -3116,4 +3116,17 @@
              ENDIF
 
+          CASE ( 'rad_net' )
+             IF ( (.NOT. radiation) .OR. radiation_scheme == 'constant' )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not ava' // &
+                                 'lable for radiation = .FALSE. or ' //        &
+                                 'radiation_scheme = "constant"'
+                CALL message( 'check_parameters', 'PA0408', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 101
+                dopr_unit(i)  = 'W/m2'
+                hom(:,2,101,:)  = SPREAD( zw, 2, statistic_regions+1 )
+             ENDIF
+
           CASE ( 'rad_lw_in' )
              IF ( (.NOT. radiation) .OR. radiation_scheme == 'constant' )  THEN
Index: palm/trunk/SOURCE/data_output_2d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_2d.f90	(revision 1700)
+++ palm/trunk/SOURCE/data_output_2d.f90	(revision 1701)
@@ -15,9 +15,9 @@
 !
 ! Copyright 1997-2015 Leibniz Universitaet Hannover
-!--------------------------------------------------------------------------------!
+ !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Bugfix in output of RRTGM data
 ! 
 ! Former revisions:
@@ -953,4 +953,5 @@
                    to_be_resorted => rad_lw_in_av
                 ENDIF
+                IF ( mode == 'xy' )  level_z = zu
 
              CASE ( 'rad_lw_out_xy', 'rad_lw_out_xz', 'rad_lw_out_yz' )
@@ -960,4 +961,5 @@
                    to_be_resorted => rad_lw_out_av
                 ENDIF
+                IF ( mode == 'xy' )  level_z = zu
 
              CASE ( 'rad_lw_cs_hr_xy', 'rad_lw_cs_hr_xz', 'rad_lw_cs_hr_yz' )
@@ -967,4 +969,5 @@
                    to_be_resorted => rad_lw_cs_hr_av
                 ENDIF
+                IF ( mode == 'xy' )  level_z = zw
 
              CASE ( 'rad_lw_hr_xy', 'rad_lw_hr_xz', 'rad_lw_hr_yz' )
@@ -974,4 +977,5 @@
                    to_be_resorted => rad_lw_hr_av
                 ENDIF
+                IF ( mode == 'xy' )  level_z = zw
 
              CASE ( 'rad_sw_in_xy', 'rad_sw_in_xz', 'rad_sw_in_yz' )
@@ -981,4 +985,5 @@
                    to_be_resorted => rad_sw_in_av
                 ENDIF
+                IF ( mode == 'xy' )  level_z = zu
 
              CASE ( 'rad_sw_out_xy', 'rad_sw_out_xz', 'rad_sw_out_yz' )
@@ -988,4 +993,5 @@
                    to_be_resorted => rad_sw_out_av
                 ENDIF
+                IF ( mode == 'xy' )  level_z = zu
 
              CASE ( 'rad_sw_cs_hr_xy', 'rad_sw_cs_hr_xz', 'rad_sw_cs_hr_yz' )
@@ -995,4 +1001,5 @@
                    to_be_resorted => rad_sw_cs_hr_av
                 ENDIF
+                IF ( mode == 'xy' )  level_z = zw
 
              CASE ( 'rad_sw_hr_xy', 'rad_sw_hr_xz', 'rad_sw_hr_yz' )
@@ -1002,4 +1009,5 @@
                    to_be_resorted => rad_sw_hr_av
                 ENDIF
+                IF ( mode == 'xy' )  level_z = zw
 
              CASE ( 'rho_xy', 'rho_xz', 'rho_yz' )
Index: palm/trunk/SOURCE/flow_statistics.f90
===================================================================
--- palm/trunk/SOURCE/flow_statistics.f90	(revision 1700)
+++ palm/trunk/SOURCE/flow_statistics.f90	(revision 1701)
@@ -1196,5 +1196,5 @@
                    sums_l(k,108,tn)  = sums_l(k,108,tn)  + rad_sw_cs_hr(k,j,i) &
                                        * rmask(j,i,sr)
-                   sums_l(k,109,tn)  = sums_l(k,108,tn)  + rad_sw_hr(k,j,i)    &
+                   sums_l(k,109,tn)  = sums_l(k,109,tn)  + rad_sw_hr(k,j,i)    &
                                        * rmask(j,i,sr)
                 ENDDO
@@ -1401,4 +1401,5 @@
 
           IF ( radiation_scheme == 'rrtmg' )  THEN
+#if defined ( __rrtmg )
              hom(:,1,106,sr) = sums(:,106)            ! rad_lw_cs_hr
              hom(:,1,107,sr) = sums(:,107)            ! rad_lw_hr
@@ -1406,5 +1407,4 @@
              hom(:,1,109,sr) = sums(:,109)            ! rad_sw_hr
 
-#if defined ( __rrtmg )
              hom(:,1,110,sr) = sums(:,110)            ! rrtm_aldif
              hom(:,1,111,sr) = sums(:,111)            ! rrtm_aldir
@@ -1588,6 +1588,6 @@
           ts_value(dots_rad+1,sr) = hom(nzb,1,102,sr)          ! rad_lw_in
           ts_value(dots_rad+2,sr) = hom(nzb,1,103,sr)          ! rad_lw_out
-          ts_value(dots_rad+3,sr) = hom(nzb,1,104,sr)          ! rad_lw_in
-          ts_value(dots_rad+4,sr) = hom(nzb,1,105,sr)          ! rad_lw_out
+          ts_value(dots_rad+3,sr) = hom(nzb,1,104,sr)          ! rad_sw_in
+          ts_value(dots_rad+4,sr) = hom(nzb,1,105,sr)          ! rad_sw_out
 
 #if defined ( __rrtmg )
@@ -3529,6 +3529,6 @@
           ts_value(dots_rad+1,sr) = hom(nzb,1,102,sr)          ! rad_lw_in
           ts_value(dots_rad+2,sr) = hom(nzb,1,103,sr)          ! rad_lw_out
-          ts_value(dots_rad+3,sr) = hom(nzb,1,104,sr)          ! rad_lw_in
-          ts_value(dots_rad+4,sr) = hom(nzb,1,105,sr)          ! rad_lw_out
+          ts_value(dots_rad+3,sr) = hom(nzb,1,104,sr)          ! rad_sw_in
+          ts_value(dots_rad+4,sr) = hom(nzb,1,105,sr)          ! rad_sw_out
 
 #if defined ( __rrtmg )
Index: palm/trunk/SOURCE/radiation_model.f90
===================================================================
--- palm/trunk/SOURCE/radiation_model.f90	(revision 1700)
+++ palm/trunk/SOURCE/radiation_model.f90	(revision 1701)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Bugfixes: wrong index for output of timeseries, setting of nz_snd_end
 ! 
 ! Former revisions:
@@ -628,9 +628,9 @@
        dots_num = dots_num + 5
 
-       dots_label(dots_rad+1) = "rad_net"
-       dots_label(dots_rad+2) = "rad_lw_in"
-       dots_label(dots_rad+3) = "rad_lw_out"
-       dots_label(dots_rad+4) = "rad_sw_in"
-       dots_label(dots_rad+5) = "rad_sw_out"
+       dots_label(dots_rad) = "rad_net"
+       dots_label(dots_rad+1) = "rad_lw_in"
+       dots_label(dots_rad+2) = "rad_lw_out"
+       dots_label(dots_rad+3) = "rad_sw_in"
+       dots_label(dots_rad+4) = "rad_sw_out"
        dots_unit(dots_rad:dots_rad+4) = "W/m2"
 
@@ -1161,5 +1161,5 @@
 !
 ! !--    Allocate temporary array for storing pressure data
-       ALLOCATE( hyp_snd_tmp(nzb+1:nz_snd) )
+       ALLOCATE( hyp_snd_tmp(1:nz_snd) )
        hyp_snd_tmp = 0.0_wp
 
@@ -1173,5 +1173,5 @@
 !
 !--    Allocate temporary array for storing temperature data
-       ALLOCATE( t_snd_tmp(nzb+1:nz_snd) )
+       ALLOCATE( t_snd_tmp(1:nz_snd) )
        t_snd_tmp = 0.0_wp
 
@@ -1186,5 +1186,5 @@
 !--    Calculate start of sounding data
        nz_snd_start = nz_snd + 1
-       nz_snd_end   = nz_snd_end
+       nz_snd_end   = nz_snd + 1
 
 !
@@ -1199,5 +1199,5 @@
 
        IF ( nz_snd_start <= nz_snd )  THEN
-          nz_snd_end = nz_snd - 1
+          nz_snd_end = nz_snd
        END IF
 
@@ -1205,5 +1205,5 @@
 !
 !--    Calculate of total grid points for RRTMG calculations
-       nzt_rad = nzt + nz_snd_end - nz_snd_start + 2
+       nzt_rad = nzt + nz_snd_end - nz_snd_start + 1
 
 !
