Index: /palm/trunk/SOURCE/average_3d_data.f90
===================================================================
--- /palm/trunk/SOURCE/average_3d_data.f90	(revision 1554)
+++ /palm/trunk/SOURCE/average_3d_data.f90	(revision 1555)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Added output of r_a and r_s
 ! 
 ! Former revisions:
@@ -81,5 +81,6 @@
         ONLY:  c_liq_av, c_soil_av, c_veg_av, ghf_eb_av, lai_av, m_liq_eb_av,  &
                m_soil_av, nzb_soil, nzt_soil, qsws_eb_av, qsws_liq_eb_av,      &
-               qsws_soil_eb_av, qsws_veg_eb_av, shf_eb_av, t_soil_av
+               qsws_soil_eb_av, qsws_veg_eb_av, r_a, r_a_av, r_s, r_s_av,      &
+               shf_eb_av, t_soil_av
 
     USE radiation_model_mod,                                                   &
@@ -359,4 +360,18 @@
              ENDDO
 
+         CASE ( 'r_a*' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   r_a_av(j,i) = r_a_av(j,i) / REAL( average_count_3d, KIND=wp )
+                ENDDO
+             ENDDO
+
+         CASE ( 'r_s*' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   r_s_av(j,i) = r_s_av(j,i) / REAL( average_count_3d, KIND=wp )
+                ENDDO
+             ENDDO
+
           CASE ( 'rho' )
              DO  i = nxlg, nxrg
Index: /palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- /palm/trunk/SOURCE/check_parameters.f90	(revision 1554)
+++ /palm/trunk/SOURCE/check_parameters.f90	(revision 1555)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Added output of r_a and r_s. Renumbering of LSM PA-messages.
 ! 
 ! Former revisions:
@@ -990,8 +990,8 @@
  
           IF ( min_canopy_resistance == 9999999.9_wp)  THEN
-             message_string = 'veg_type = 0 (user_defined)'//                  &
+             message_string = 'veg_type = 0 (user defined)'//                  &
                               'requires setting of min_canopy_resistance'//    &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0415', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1000,5 +1000,5 @@
                               'requires setting of leaf_area_index'//          &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0416', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1007,5 +1007,5 @@
                               'requires setting of vegetation_coverage'//      &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0417', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1014,5 +1014,5 @@
                               'requires setting of'//                          &
                               'canopy_resistance_coefficient /= 9999999.9'
-             CALL message( 'check_parameters', 'PA0418', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1021,5 +1021,5 @@
                               'requires setting of lambda_surface_stable'//    &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0419', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1028,5 +1028,5 @@
                               'requires setting of lambda_surface_unstable'//  &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0420', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1035,5 +1035,5 @@
                               'requires setting of f_shortwave_incoming'//     &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0421', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1042,5 +1042,5 @@
                               'requires setting of z0_eb'//                   &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0422', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1049,5 +1049,5 @@
                               'requires setting of z0h_eb'//                  &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0423', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1061,5 +1061,5 @@
                               'requires setting of alpha_vangenuchten'//       &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0422', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1068,5 +1068,5 @@
                               'requires setting of l_vangenuchten'//           &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0423', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1075,5 +1075,5 @@
                               'requires setting of n_vangenuchten'//           &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0424', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1082,5 +1082,5 @@
                               'requires setting of hydraulic_conductivity'//   &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0425', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1089,5 +1089,5 @@
                               'requires setting of saturation_moisture'//      &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0426', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1096,5 +1096,5 @@
                               'requires setting of field_capacity'//           &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0427', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1103,5 +1103,5 @@
                               'requires setting of wilting_point'//            &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0428', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1110,5 +1110,5 @@
                               'requires setting of residual_moisture'//        &
                               '/= 9999999.9'
-             CALL message( 'check_parameters', 'PA0429', 1, 2, 0, 6, 0 )
+             CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
           ENDIF
 
@@ -1118,5 +1118,5 @@
           message_string = 'lsm requires '//                                   &
                            'radiation = .T.'
-          CALL message( 'check_parameters', 'PA0402', 1, 2, 0, 6, 0 )
+          CALL message( 'check_parameters', 'PA0400', 1, 2, 0, 6, 0 )
        ENDIF
 
@@ -1133,5 +1133,5 @@
           message_string = 'unknown radiation_scheme = '//                     &
                            TRIM( radiation_scheme )
-          CALL message( 'check_parameters', 'PA0430', 1, 2, 0, 6, 0 )
+          CALL message( 'check_parameters', 'PA0405', 1, 2, 0, 6, 0 )
        ENDIF
     ENDIF
@@ -3005,5 +3005,5 @@
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for land_surface = .FALSE.'
-                CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
+                CALL message( 'check_parameters', 'PA0402', 1, 2, 0, 6, 0 )
              ELSE
                 dopr_index(i) = 89
@@ -3022,5 +3022,5 @@
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
                                  'lemented for land_surface = .FALSE.'
-                CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
+                CALL message( 'check_parameters', 'PA0402', 1, 2, 0, 6, 0 )
              ELSE
                 dopr_index(i) = 91
@@ -3268,7 +3268,7 @@
           CASE ( 'c_liq*', 'c_soil*', 'c_veg*', 'ghf_eb*', 'lai*', 'lwp*',     &
                  'm_liq_eb*', 'pra*', 'prr*', 'qsws*', 'qsws_eb*',             &
-                 'qsws_liq_eb*', 'qsws_soil_eb*', 'qsws_veg_eb*',              &
-                 'rad_net*', 'rad_sw_in*', 'shf*', 'shf_eb*', 't*', 'u*',      &
-                 'z0*', 'z0h*' )
+                 'qsws_liq_eb*', 'qsws_soil_eb*', 'qsws_veg_eb*', 'rad_net*',  &
+                 'rad_sw_in*', 'r_a*', 'r_s*', 'shf*', 'shf_eb*', 't*',        &
+                 'u*', 'z0*', 'z0h*' )
              IF ( k == 0  .OR.  data_output(i)(ilen-2:ilen) /= '_xy' )  THEN
                 message_string = 'illegal value for data_output: "' //         &
@@ -3280,25 +3280,25 @@
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res land_surface = .TRUE.'
-                CALL message( 'check_parameters', 'PA0411', 1, 2, 0, 6, 0 )
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'c_soil*'  .AND.  .NOT. land_surface )  THEN
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res land_surface = .TRUE.'
-                CALL message( 'check_parameters', 'PA0412', 1, 2, 0, 6, 0 )
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'c_veg*'  .AND.  .NOT. land_surface )  THEN
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res land_surface = .TRUE.'
-                CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 )
+                CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'ghf_eb*'  .AND.  .NOT. land_surface )  THEN
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res land_surface = .TRUE.'
-                CALL message( 'check_parameters', 'PA0405', 1, 2, 0, 6, 0 )
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'lai*'  .AND.  .NOT. land_surface )  THEN
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res land_surface = .TRUE.'
-                CALL message( 'check_parameters', 'PA0414', 1, 2, 0, 6, 0 )
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'lwp*'  .AND.  .NOT. cloud_physics )  THEN
@@ -3310,5 +3310,5 @@
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res land_surface = .TRUE.'
-                CALL message( 'check_parameters', 'PA0406', 1, 2, 0, 6, 0 )
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'pra*'  .AND.  .NOT. precipitation )  THEN
@@ -3335,5 +3335,5 @@
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res land_surface = .TRUE.'
-                CALL message( 'check_parameters', 'PA0407', 1, 2, 0, 6, 0 )
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'qsws_liq_eb*'  .AND.  .NOT. land_surface )  &
@@ -3341,5 +3341,5 @@
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res land_surface = .TRUE.'
-                CALL message( 'check_parameters', 'PA0408', 1, 2, 0, 6, 0 )
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'qsws_soil_eb*'  .AND.  .NOT. land_surface ) &
@@ -3347,5 +3347,5 @@
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res land_surface = .TRUE.'
-                CALL message( 'check_parameters', 'PA0409', 1, 2, 0, 6, 0 )
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'qsws_veg_eb*'  .AND.  .NOT. land_surface )  &
@@ -3353,5 +3353,17 @@
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
                                  'res land_surface = .TRUE.'
-                CALL message( 'check_parameters', 'PA0410', 1, 2, 0, 6, 0 )
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( TRIM( var ) == 'r_a*'  .AND.  .NOT. land_surface ) &
+             THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                                 'res land_surface = .TRUE.'
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( TRIM( var ) == 'r_s*'  .AND.  .NOT. land_surface ) &
+             THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                                 'res land_surface = .TRUE.'
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
              ENDIF
 
@@ -3370,5 +3382,7 @@
              IF ( TRIM( var ) == 'qsws_veg_eb*'  ) unit = 'W/m2'
              IF ( TRIM( var ) == 'rad_net*')       unit = 'W/m2'     
-             IF ( TRIM( var ) == 'rad_sw_in*')     unit = 'W/m2'   
+             IF ( TRIM( var ) == 'rad_sw_in*')     unit = 'W/m2' 
+             IF ( TRIM( var ) == 'r_a*')     unit = 's/m'     
+             IF ( TRIM( var ) == 'r_s*')     unit = 's/m' 
              IF ( TRIM( var ) == 'shf*'   )  unit = 'K*m/s'
              IF ( TRIM( var ) == 'shf_eb*')  unit = 'W/m2'
Index: /palm/trunk/SOURCE/data_output_2d.f90
===================================================================
--- /palm/trunk/SOURCE/data_output_2d.f90	(revision 1554)
+++ /palm/trunk/SOURCE/data_output_2d.f90	(revision 1555)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Added output of r_a and r_s
 ! 
 ! Former revisions:
@@ -139,6 +139,6 @@
                m_soil_av, nzb_soil, nzt_soil, qsws_eb, qsws_eb_av,             &
                qsws_liq_eb, qsws_liq_eb_av, qsws_soil_eb, qsws_soil_eb_av,     &
-               qsws_veg_eb, qsws_veg_eb_av, shf_eb, shf_eb_av, t_soil,         &
-               t_soil_av, zs
+               qsws_veg_eb, qsws_veg_eb_av, r_a, r_a_av, r_s, r_s_av, shf_eb,  &
+               shf_eb_av, t_soil, t_soil_av, zs
     
     USE netcdf_control
@@ -934,4 +934,40 @@
                    to_be_resorted => rho_av
                 ENDIF
+
+             CASE ( 'r_a*_xy' )        ! 2d-array
+                IF ( av == 0 )  THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         local_pf(i,j,nzb+1) = r_a(j,i)
+                      ENDDO
+                   ENDDO
+                ELSE
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         local_pf(i,j,nzb+1) = r_a_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
+             CASE ( 'r_s*_xy' )        ! 2d-array
+                IF ( av == 0 )  THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         local_pf(i,j,nzb+1) = r_s(j,i)
+                      ENDDO
+                   ENDDO
+                ELSE
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         local_pf(i,j,nzb+1) = r_s_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
 
              CASE ( 's_xy', 's_xz', 's_yz' )
Index: /palm/trunk/SOURCE/flow_statistics.f90
===================================================================
--- /palm/trunk/SOURCE/flow_statistics.f90	(revision 1554)
+++ /palm/trunk/SOURCE/flow_statistics.f90	(revision 1555)
@@ -21,5 +21,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Added output of r_a and r_s.
 ! 
 ! Former revisions:
@@ -160,6 +160,6 @@
     USE land_surface_model_mod,                                                &
         ONLY:   dots_soil, ghf_eb, land_surface, m_soil, nzb_soil, nzt_soil,   &
-                qsws_eb, qsws_liq_eb, qsws_soil_eb, qsws_veg_eb, shf_eb,       &
-                t_soil
+                qsws_eb, qsws_liq_eb, qsws_soil_eb, qsws_veg_eb, r_a, r_s,     &
+                shf_eb, t_soil
 
     USE pegrid
@@ -717,15 +717,17 @@
 
              IF ( land_surface )  THEN
-                sums_l(nzb,93,tn) = sums_l(nzb,93,tn) + ghf_eb(j,i)
-                sums_l(nzb,94,tn) = sums_l(nzb,94,tn) + shf_eb(j,i)
-                sums_l(nzb,95,tn) = sums_l(nzb,95,tn) + qsws_eb(j,i)
-                sums_l(nzb,96,tn) = sums_l(nzb,96,tn) + qsws_liq_eb(j,i)
-                sums_l(nzb,97,tn) = sums_l(nzb,97,tn) + qsws_soil_eb(j,i)
-                sums_l(nzb,98,tn) = sums_l(nzb,98,tn) + qsws_veg_eb(j,i)
+                sums_l(nzb,93,tn)  = sums_l(nzb,93,tn) + ghf_eb(j,i)
+                sums_l(nzb,94,tn)  = sums_l(nzb,94,tn) + shf_eb(j,i)
+                sums_l(nzb,95,tn)  = sums_l(nzb,95,tn) + qsws_eb(j,i)
+                sums_l(nzb,96,tn)  = sums_l(nzb,96,tn) + qsws_liq_eb(j,i)
+                sums_l(nzb,97,tn)  = sums_l(nzb,97,tn) + qsws_soil_eb(j,i)
+                sums_l(nzb,98,tn)  = sums_l(nzb,98,tn) + qsws_veg_eb(j,i)
+                sums_l(nzb,99,tn)  = sums_l(nzb,99,tn) + r_a(j,i)
+                sums_l(nzb,100,tn) = sums_l(nzb,100,tn)+ r_s(j,i)
              ENDIF
 
              IF ( radiation )  THEN
-                sums_l(nzb,99,tn)  = sums_l(nzb,99,tn)  + rad_net(j,i)
-                sums_l(nzb,100,tn) = sums_l(nzb,100,tn) + rad_sw_in(j,i)
+                sums_l(nzb,101,tn)  = sums_l(nzb,101,tn)  + rad_net(j,i)
+                sums_l(nzb,102,tn) = sums_l(nzb,102,tn) + rad_sw_in(j,i)
              ENDIF
 
@@ -1293,15 +1295,18 @@
           hom(:,1,91,sr) = sums(:,91)              ! m_soil
                                                    ! 92 is initial m_soil profile
-          hom(:,1,93,sr) = sums(:,93)              ! ghf_eb
-          hom(:,1,94,sr) = sums(:,94)              ! shf_eb
-          hom(:,1,95,sr) = sums(:,95)              ! qsws_eb
-          hom(:,1,96,sr) = sums(:,96)              ! qsws_liq_eb
-          hom(:,1,97,sr) = sums(:,97)              ! qsws_soil_eb
-          hom(:,1,98,sr) = sums(:,98)              ! qsws_veg_eb
+          hom(:,1,93,sr)  = sums(:,93)             ! ghf_eb
+          hom(:,1,94,sr)  = sums(:,94)             ! shf_eb
+          hom(:,1,95,sr)  = sums(:,95)             ! qsws_eb
+          hom(:,1,96,sr)  = sums(:,96)             ! qsws_liq_eb
+          hom(:,1,97,sr)  = sums(:,97)             ! qsws_soil_eb
+          hom(:,1,98,sr)  = sums(:,98)             ! qsws_veg_eb
+          hom(:,1,99,sr)  = sums(:,99)             ! r_a
+          hom(:,1,100,sr) = sums(:,100)            ! r_s
+
        ENDIF
 
        IF ( radiation )  THEN
-          hom(:,1,99 ,sr) = sums(:,99)             ! rad_net
-          hom(:,1,100,sr) = sums(:,100)            ! rad_sw_in
+          hom(:,1,101 ,sr) = sums(:,101)            ! rad_net
+          hom(:,1,102,sr)  = sums(:,102)            ! rad_sw_in
        ENDIF
 
@@ -1460,4 +1465,6 @@
           ts_value(dots_soil+4,sr) = hom(nzb,1,97,sr)           ! qsws_soil_eb
           ts_value(dots_soil+5,sr) = hom(nzb,1,98,sr)           ! qsws_veg_eb
+          ts_value(dots_soil+6,sr) = hom(nzb,1,99,sr)           ! r_a
+          ts_value(dots_soil+7,sr) = hom(nzb,1,100,sr)          ! r_s
        ENDIF
 !
@@ -3263,4 +3270,6 @@
           ts_value(dots_soil+4,sr) = hom(nzb,1,97,sr)           ! qsws_soil_eb
           ts_value(dots_soil+5,sr) = hom(nzb,1,98,sr)           ! qsws_veg_eb
+          ts_value(dots_soil+6,sr) = hom(nzb,1,99,sr)           ! r_a
+          ts_value(dots_soil+7,sr) = hom(nzb,1,100,sr)          ! r_s
        ENDIF
 !
Index: /palm/trunk/SOURCE/land_surface_model.f90
===================================================================
--- /palm/trunk/SOURCE/land_surface_model.f90	(revision 1554)
+++ /palm/trunk/SOURCE/land_surface_model.f90	(revision 1555)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Added output of r_a and r_s
 ! 
 ! Former revisions:
@@ -236,8 +236,10 @@
               qsws_veg_eb_av,   & !: average of qsws_veg_eb
               r_a,              & !: aerodynamic resistance 
+              r_a_av,           & !: avergae of r_a
               r_canopy,         & !: canopy resistance
               r_soil,           & !: soil resitance
               r_soil_min,       & !: minimum soil resistance
-              r_s,              & !: total surface resistance (combination of r_soil and r_canopy)          
+              r_s,              & !: total surface resistance (combination of r_soil and r_canopy)
+              r_s_av,           & !: avergae of r_s
               r_canopy_min,     & !: minimum canopy (stomatal) resistance
               shf_eb,           & !: surface flux of sensible heat
@@ -474,5 +476,5 @@
            lai, lai_av, qsws_eb, qsws_eb_av, qsws_liq_eb, qsws_liq_eb_av,      &
            qsws_soil_eb, qsws_soil_eb_av, qsws_veg_eb, qsws_veg_eb_av,         &
-           shf_eb, shf_eb_av
+           r_a, r_a_av, r_s, r_s_av, shf_eb, shf_eb_av
 
 
@@ -888,6 +890,10 @@
        dots_unit(dots_num+1:dots_num+6) = "W/m2"
 
+       dots_label(dots_num+7) = "r_a"
+       dots_label(dots_num+8) = "r_s"
+       dots_unit(dots_num+7:dots_num+8) = "s/m"
+
        dots_soil = dots_num + 1
-       dots_num  = dots_num + 6
+       dots_num  = dots_num + 8
 
 
Index: /palm/trunk/SOURCE/sum_up_3d_data.f90
===================================================================
--- /palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 1554)
+++ /palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 1555)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Added output of r_a and r_s
 ! 
 ! Former revisions:
@@ -102,6 +102,6 @@
                m_soil_av, nzb_soil, nzt_soil, qsws_eb, qsws_eb_av,             &
                qsws_liq_eb, qsws_liq_eb_av, qsws_soil_eb, qsws_soil_eb_av,     &
-               qsws_veg_eb, qsws_veg_eb_av, shf_eb, shf_eb_av, t_soil,         &
-               t_soil_av
+               qsws_veg_eb, qsws_veg_eb_av, shf_eb, shf_eb_av, r_a, r_a_av,    &
+               r_s, r_s_av, t_soil, t_soil_av
 
     USE particle_attributes,                                                   &
@@ -334,4 +334,16 @@
                 ENDIF
                 rho_av = 0.0_wp
+
+             CASE ( 'r_a*' )
+                IF ( .NOT. ALLOCATED( r_a_av ) )  THEN
+                   ALLOCATE( r_a_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                r_a_av = 0.0_wp
+
+             CASE ( 'r_s*' )
+                IF ( .NOT. ALLOCATED( r_s_av ) )  THEN
+                   ALLOCATE( r_s_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                r_s_av = 0.0_wp
 
              CASE ( 's' )
@@ -724,4 +736,18 @@
              ENDDO
 
+          CASE ( 'r_a*' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   r_a_av(j,i) = r_a_av(j,i) + r_a(j,i)
+                ENDDO
+             ENDDO
+
+          CASE ( 'r_s*' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   r_s_av(j,i) = r_s_av(j,i) + r_s(j,i)
+                ENDDO
+             ENDDO
+
           CASE ( 'rho' )
              DO  i = nxlg, nxrg
