Index: palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3223)
+++ palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3241)
@@ -28,4 +28,7 @@
 ! -----------------
 ! $Id$
+! unused variables removed
+! 
+! 3223 2018-08-30 13:48:17Z suehring
 ! Bugfix for commit 3222
 ! 
@@ -406,5 +409,4 @@
     INTEGER(iwp) ::  pedestrian_category = 2         !< default category for wall surface in pedestrian zone
     INTEGER(iwp) ::  roof_category = 2               !< default category for root surface
-    REAL(wp)     ::  roughness_concrete = 0.001_wp   !< roughness length of average concrete surface
 !
 !-- Indices of input attributes for (above) ground floor level 
@@ -587,5 +589,4 @@
 !-- arrays for time averages
 !-- Attention: the variable rad_net_av is also used in the 3d field variable in radiation_model_mod.f90. It may be better to rename it 
-    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  rad_net_av       !< average of rad_net_l
     REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinsw_av      !< average of sw radiation falling to local surface including radiation from reflections
     REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinlw_av      !< average of lw radiation falling to local surface including radiation from reflections
@@ -599,12 +600,4 @@
     REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfins_av       !< average of array of residua of sw radiation absorbed in surface after last reflection
     REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinl_av       !< average of array of residua of lw radiation absorbed in surface after last reflection
-    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfhf_av        !< average of total radiation flux incoming to minus outgoing from local surface  
-    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  wghf_eb_av       !< average of wghf_eb
-    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  wshf_eb_av       !< average of wshf_eb
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  t_wall_av        !< Average of t_wall
-    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  wghf_eb_green_av !< average of wghf_eb_green
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  t_green_av       !< Average of t_green
-    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  wghf_eb_window_av !< average of wghf_eb_window
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  t_window_av      !< Average of t_window    
     
 
@@ -704,13 +697,4 @@
     
 #endif
-    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_av          !< average of wall surface temperature (K)
-    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_window_av   !< average of window surface temperature (K)
-    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_green_av    !< average of green wall surface temperature (K)
-    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_10cm_av    !< average of whole wall surface temperature (K)
-
-!-- Temporal tendencies for time stepping            
-    REAL(wp), DIMENSION(:), ALLOCATABLE            :: tt_surface_m       !< surface temperature tendency of wall (K)
-    REAL(wp), DIMENSION(:), ALLOCATABLE            :: tt_surface_window_m !< surface temperature tendency of window (K)
-    REAL(wp), DIMENSION(:), ALLOCATABLE            :: tt_surface_green_m !< surface temperature tendency of green wall (K)
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -721,43 +705,33 @@
 #if defined( __nopointer )
     REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_wall_h             !< Wall temperature (K)
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_wall_h_av          !< Average of t_wall
     REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_wall_h_p           !< Prog. wall temperature (K)
     REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_window_h           !< Window temperature (K)
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_window_h_av        !< Average of t_window
     REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_window_h_p         !< Prog. window temperature (K)
     REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_green_h            !< Green temperature (K)
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_green_h_av         !< Average of t_green
     REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_green_h_p          !< Prog. green temperature (K)
 
     TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_wall_v             !< Wall temperature (K)
-    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_wall_v_av          !< Average of t_wall
     TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_wall_v_p           !< Prog. wall temperature (K)
     TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_window_v           !< Window temperature (K)
-    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_window_v_av        !< Average of t_window
     TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_window_v_p         !< Prog. window temperature (K)
     TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_green_v            !< Green temperature (K)
-    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_green_v_av         !< Average of t_green
     TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_green_v_p          !< Prog. green temperature (K)
 #else
     REAL(wp), DIMENSION(:,:), POINTER                :: t_wall_h, t_wall_h_p
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_wall_h_av, t_wall_h_1, t_wall_h_2
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_wall_h_1, t_wall_h_2
     REAL(wp), DIMENSION(:,:), POINTER                :: t_window_h, t_window_h_p
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_window_h_av, t_window_h_1, t_window_h_2
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_window_h_1, t_window_h_2
     REAL(wp), DIMENSION(:,:), POINTER                :: t_green_h, t_green_h_p
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_green_h_av, t_green_h_1, t_green_h_2
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_green_h_1, t_green_h_2
 
     TYPE(t_wall_vertical), DIMENSION(:), POINTER   :: t_wall_v, t_wall_v_p
-    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_wall_v_av, t_wall_v_1, t_wall_v_2
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_wall_v_1, t_wall_v_2
     TYPE(t_wall_vertical), DIMENSION(:), POINTER   :: t_window_v, t_window_v_p
-    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_window_v_av, t_window_v_1, t_window_v_2
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_window_v_1, t_window_v_2
     TYPE(t_wall_vertical), DIMENSION(:), POINTER   :: t_green_v, t_green_v_p
-    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_green_v_av, t_green_v_1, t_green_v_2
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_green_v_1, t_green_v_2
 #endif
 
-!-- Wall temporal tendencies for time stepping
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE          :: tt_wall_m          !< t_wall prognostic array 
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE          :: tt_window_m        !< t_window prognostic array 
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE          :: tt_green_m         !< t_green prognostic array 
-
+!
 !-- Surface and material parameters classes (surface_type)
 !-- albedo, emissivity, lambda_surf, roughness, thickness, volumetric heat capacity, thermal conductivity
@@ -1270,11 +1244,11 @@
         IMPLICIT NONE
 
-        CHARACTER (len=*), INTENT(IN) ::  mode
-        CHARACTER (len=*), INTENT(IN) :: variable
+        CHARACTER(LEN=*), INTENT(IN) ::  mode
+        CHARACTER(LEN=*), INTENT(IN) :: variable
   
         INTEGER(iwp)                                       :: i, j, k, l, m, ids, idsint, iwl, istat
-        CHARACTER (len=varnamelength)                      :: var, surfid
+        CHARACTER(LEN=varnamelength)                       :: var
         INTEGER(iwp), PARAMETER                            :: nd = 5
-        CHARACTER(len=6), DIMENSION(0:nd-1), PARAMETER     :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /)
+        CHARACTER(LEN=6), DIMENSION(0:nd-1), PARAMETER     :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /)
         INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER         :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /)
 
@@ -2440,5 +2414,4 @@
         INTEGER(iwp)                                           :: ids,idsint,idsidx,isurf,isvf,isurfs,isurflt
         INTEGER(iwp)                                           :: is,js,ks,i,j,k,iwl,istat, l, m
-        INTEGER(iwp)                                           :: k_topo    !< topography top index
 
         dirstart = (/ startland, startwall, startwall, startwall, startwall /)
@@ -3621,5 +3594,5 @@
         INTEGER(iwp) ::  st                  !< dummy  
 
-        REAL(wp)     ::  c, d, tin, twin
+        REAL(wp)     ::  c, tin, twin
         REAL(wp)     ::  ground_floor_level_l         !< local height of ground floor level
         REAL(wp)     ::  z_agl                        !< height above ground
@@ -5348,5 +5321,4 @@
                            naheatlayers,                                       &
                            pedestrian_category,                                &
-                           roughness_concrete,                                 &
                            read_wall_temp_3d,                                  &
                            roof_category,                                      &
@@ -5366,5 +5338,4 @@
                            naheatlayers,                                       &
                            pedestrian_category,                                &
-                           roughness_concrete,                                 &
                            read_wall_temp_3d,                                  &
                            roof_category,                                      &
@@ -5574,6 +5545,4 @@
            
        IMPLICIT NONE
-
-       CHARACTER (LEN=1)  ::  dum              !< dummy to create correct string for reading input variable
 
        INTEGER(iwp)       ::  l                !< index variable for surface type
@@ -6758,5 +6727,5 @@
         INTEGER(iwp), DIMENSION(0:17, nysg:nyng, nxlg:nxrg)   :: usm_par
         REAL(wp), DIMENSION(1:14, nysg:nyng, nxlg:nxrg)       :: usm_val
-        INTEGER(iwp)                                          :: k, l, d, iw, jw, kw, it, ip, ii, ij, m
+        INTEGER(iwp)                                          :: k, l, iw, jw, kw, it, ip, ii, ij, m
         INTEGER(iwp)                                          :: i, j
         INTEGER(iwp)                                          :: nz, roof, dirwe, dirsn
@@ -6769,7 +6738,4 @@
         REAL(wp)                                              :: wealbedo2, wethick2, snalbedo2, snthick2
         REAL(wp)                                              :: wealbedo3, wethick3, snalbedo3, snthick3
-        
-        LOGICAL                                               ::  surfpar
-        LOGICAL                                               ::  urbsurf
 
 !
@@ -7332,5 +7298,5 @@
         IMPLICIT NONE
 
-        INTEGER(iwp)                          :: i, j, k, l, d, m   !< running indices
+        INTEGER(iwp)                          :: i, j, k, l, m      !< running indices
         
         REAL(wp)                              :: stend              !< surface tendency
@@ -7839,10 +7805,9 @@
 !> called out from subroutine swap_timelevel
 !------------------------------------------------------------------------------!
-    SUBROUTINE usm_swap_timelevel ( mod_count )
+    SUBROUTINE usm_swap_timelevel( mod_count )
 
        IMPLICIT NONE
 
-       INTEGER(iwp), INTENT(IN) :: mod_count
-       INTEGER(iwp)             :: i
+       INTEGER(iwp), INTENT(IN) ::  mod_count
       
 #if defined( __nopointer )
