Index: palm/trunk/SOURCE/plant_canopy_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 4340)
+++ palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 4341)
@@ -27,4 +27,14 @@
 ! -----------------
 ! $Id$
+! - Unification of variable names: pc_-variables now pcm_-variables 
+!   (pc_latent_rate, pc_heating_rate, pc_transpiration_rate)
+! - Removal of pcm_bowenratio output
+! - Renamed canopy-mode 'block' to 'homogeneous'
+! - Renamed value 'read_from_file_3d' to 'read_from_file'
+! - Removal of confusing comment lines
+! - Replacement of k_wall by topo_top_ind
+! - Removal of Else-Statement in tendency-calculation
+! 
+! 4335 2019-12-12 16:39:05Z suehring
 ! Fix for LAD at building edges also implemented in vector branch.
 ! 
@@ -140,5 +150,5 @@
 
 
-    CHARACTER (LEN=30)   ::  canopy_mode = 'block'                 !< canopy coverage
+    CHARACTER (LEN=30)   ::  canopy_mode = 'homogeneous'           !< canopy coverage
     LOGICAL              ::  plant_canopy_transpiration = .FALSE.  !< flag to switch calculation of transpiration and corresponding latent heat
                                                                    !< for resolved plant canopy inside radiation model
@@ -177,7 +187,7 @@
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  cum_lai_hf               !< cumulative lai for heatflux calc.
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  lad_s                    !< lad on scalar-grid
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pc_heating_rate          !< plant canopy heating rate
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pc_transpiration_rate    !< plant canopy transpiration rate
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pc_latent_rate           !< plant canopy latent heating rate
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pcm_heating_rate         !< plant canopy heating rate
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pcm_transpiration_rate   !< plant canopy transpiration rate
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pcm_latent_rate          !< plant canopy latent heating rate
 
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pcm_heatrate_av          !< array for averaging plant canopy sensible heating rate
@@ -199,5 +209,5 @@
 !
 !-- Public variables and constants
-    PUBLIC cdc, pc_heating_rate, pc_transpiration_rate, pc_latent_rate,       &
+    PUBLIC cdc, pcm_heating_rate, pcm_transpiration_rate, pcm_latent_rate,    &
            canopy_mode, cthf, dt_plant_canopy, lad, lad_s, pch_index,         &
            plant_canopy_transpiration
@@ -398,7 +408,4 @@
           unit = 'K s-1'
 
-       CASE ( 'pcm_bowenratio' )
-          unit = 'K s-1'
-
        CASE ( 'pcm_lad' )
           unit = 'm2 m-3'
@@ -472,7 +479,7 @@
 !
 !--    If canopy shall be read from file, static input file must be present
-       IF ( TRIM( canopy_mode ) == 'read_from_file_3d' .AND.                   &
+       IF ( TRIM( canopy_mode ) == 'read_from_file' .AND.                   &
             .NOT. input_pids_static )  THEN
-          message_string = 'canopy_mode = read_from_file_3d requires ' //      &
+          message_string = 'canopy_mode = read_from_file requires ' //      &
                            'static input file'
           CALL message( 'pcm_check_parameters', 'PA0672', 1, 2, 0, 6, 0 )
@@ -547,5 +554,5 @@
                       IF ( pch_index_ji(j,i) /= 0 )  THEN
                          DO  k = 0, pch_index_ji(j,i)
-                            pcm_heatrate_av(k,j,i) = pcm_heatrate_av(k,j,i) + pc_heating_rate(k,j,i)
+                            pcm_heatrate_av(k,j,i) = pcm_heatrate_av(k,j,i) + pcm_heating_rate(k,j,i)
                          ENDDO
                       ENDIF
@@ -561,5 +568,5 @@
                       IF ( pch_index_ji(j,i) /= 0 )  THEN
                          DO  k = 0, pch_index_ji(j,i)
-                            pcm_latentrate_av(k,j,i) = pcm_latentrate_av(k,j,i) + pc_latent_rate(k,j,i)
+                            pcm_latentrate_av(k,j,i) = pcm_latentrate_av(k,j,i) + pcm_latent_rate(k,j,i)
                          ENDDO
                       ENDIF
@@ -575,5 +582,5 @@
                       IF ( pch_index_ji(j,i) /= 0 )  THEN
                          DO  k = 0, pch_index_ji(j,i)
-                            pcm_transpirationrate_av(k,j,i) = pcm_transpirationrate_av(k,j,i) + pc_transpiration_rate(k,j,i)
+                            pcm_transpirationrate_av(k,j,i) = pcm_transpirationrate_av(k,j,i) + pcm_transpiration_rate(k,j,i)
                          ENDDO
                       ENDIF
@@ -693,5 +700,5 @@
                 DO  j = nys, nyn
                    DO  k = MAX( 1, nzb_do ), MIN( pch_index, nzt_do )
-                      local_pf(i,j,k) = pc_heating_rate(k,j,i)
+                      local_pf(i,j,k) = pcm_heating_rate(k,j,i)
                    ENDDO
                 ENDDO
@@ -712,5 +719,5 @@
                 DO  j = nys, nyn
                    DO  k = MAX( 1, nzb_do ), MIN( pch_index, nzt_do )
-                      local_pf(i,j,k) = pc_latent_rate(k,j,i)
+                      local_pf(i,j,k) = pcm_latent_rate(k,j,i)
                    ENDDO
                 ENDDO
@@ -731,5 +738,5 @@
                 DO  j = nys, nyn
                    DO  k = MAX( 1, nzb_do ), MIN( pch_index, nzt_do )
-                      local_pf(i,j,k) = pc_transpiration_rate(k,j,i)
+                      local_pf(i,j,k) = pcm_transpiration_rate(k,j,i)
                    ENDDO
                 ENDDO
@@ -745,29 +752,4 @@
           ENDIF
 
-       CASE ( 'pcm_bowenratio' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = MAX( 1, nzb_do ), MIN( pch_index, nzt_do )
-                      IF ( pc_latent_rate(k,j,i) /= 0.0_wp ) THEN
-                         local_pf(i,j,k) = pc_heating_rate(k,j,i) /            &
-                                           pc_latent_rate(k,j,i)
-                      ENDIF
-                   ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = MAX( 1, nzb_do ), MIN( pch_index, nzt_do )
-                      IF ( pcm_latentrate_av(k,j,i) /= 0.0_wp ) THEN
-                         local_pf(i,j,k) = pcm_heatrate_av(k,j,i) /            &
-                                           pcm_latentrate_av(k,j,i)
-                      ENDIF
-                   ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
        CASE ( 'pcm_lad' )
           IF ( av == 0 )  THEN
@@ -812,5 +794,5 @@
      SELECT CASE ( TRIM( var ) )
 
-        CASE ( 'pcm_heatrate', 'pcm_lad', 'pcm_transpirationrate', 'pcm_latentrate', 'pcm_bowenratio')
+        CASE ( 'pcm_heatrate', 'pcm_lad', 'pcm_transpirationrate', 'pcm_latentrate')
            grid_x = 'x'
            grid_y = 'y'
@@ -1087,9 +1069,9 @@
 !
 !--    Initialization of the canopy coverage in the model domain:
-!--    Setting the parameter canopy_mode = 'block' initializes a canopy, which
+!--    Setting the parameter canopy_mode = 'homogeneous' initializes a canopy, which
 !--    fully covers the domain surface
        SELECT CASE ( TRIM( canopy_mode ) )
 
-          CASE( 'block' )
+          CASE( 'homogeneous' )
 
              DO  i = nxlg, nxrg
@@ -1099,5 +1081,5 @@
              ENDDO
 
-          CASE ( 'read_from_file_3d' )
+          CASE ( 'read_from_file' )
 !
 !--          Initialize LAD with data from file. If LAD is given in NetCDF file,
@@ -1219,13 +1201,13 @@
 #endif
 
-!--    Allocation of arrays pc_heating_rate, pc_transpiration_rate and pc_latent_rate
-       ALLOCATE( pc_heating_rate(0:pch_index,nysg:nyng,nxlg:nxrg) )
-       pc_heating_rate = 0.0_wp
+!--    Allocation of arrays pcm_heating_rate, pcm_transpiration_rate and pcm_latent_rate
+       ALLOCATE( pcm_heating_rate(0:pch_index,nysg:nyng,nxlg:nxrg) )
+       pcm_heating_rate = 0.0_wp
        
        IF ( humidity )  THEN
-          ALLOCATE( pc_transpiration_rate(0:pch_index,nysg:nyng,nxlg:nxrg) )
-          pc_transpiration_rate = 0.0_wp
-          ALLOCATE( pc_latent_rate(0:pch_index,nysg:nyng,nxlg:nxrg) )
-          pc_latent_rate = 0.0_wp
+          ALLOCATE( pcm_transpiration_rate(0:pch_index,nysg:nyng,nxlg:nxrg) )
+          pcm_transpiration_rate = 0.0_wp
+          ALLOCATE( pcm_latent_rate(0:pch_index,nysg:nyng,nxlg:nxrg) )
+          pcm_latent_rate = 0.0_wp
        ENDIF
 !
@@ -1241,9 +1223,7 @@
 !--    73â96). This approach has been applied e.g. by Shaw & Schumann (1992;
 !--    Bound.-Layer Meteorol. 61, 47â64).
-!--    When using the radiation_interactions, canopy heating (pc_heating_rate)
-!--    and plant canopy transpiration (pc_transpiration_rate, pc_latent_rate)
+!--    When using the radiation_interactions, canopy heating (pcm_heating_rate)
+!--    and plant canopy transpiration (pcm_transpiration_rate, pcm_latent_rate)
 !--    are calculated in the RTM after the calculation of radiation.
-!--    We cannot use variable radiation_interactions here to determine the situation
-!--    as it is assigned in init_3d_model after the call of pcm_init.
        IF ( cthf /= 0.0_wp )  THEN
 
@@ -1314,5 +1294,5 @@
 !--       canopy. 
 !--       Within the different canopy layers the plant-canopy heating
-!--       rate (pc_heating_rate) is calculated as the vertical 
+!--       rate (pcm_heating_rate) is calculated as the vertical 
 !--       divergence of the canopy heat fluxes at the top and bottom
 !--       of the respective layer
@@ -1321,5 +1301,5 @@
                 DO  k = 1, pch_index_ji(j,i)
                    IF ( cum_lai_hf(0,j,i) /= 0.0_wp )  THEN
-                      pc_heating_rate(k,j,i) = cthf *                          &
+                      pcm_heating_rate(k,j,i) = cthf *                          &
                                 ( exp(-ext_coef*cum_lai_hf(k,j,i)) -           &
                                   exp(-ext_coef*cum_lai_hf(k-1,j,i) ) ) / dzw(k)
@@ -1566,5 +1546,4 @@
        INTEGER(iwp) ::  j         !< running index
        INTEGER(iwp) ::  k         !< running index
-       INTEGER(iwp) ::  k_wall    !< vertical index of topography top
        INTEGER(iwp) ::  kk        !< running index for flat lad arrays
 
@@ -1604,8 +1583,7 @@
 !
 !--                Determine topography-top index on u-grid
-                   k_wall = topo_top_ind(j,i,1)
-                   DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
-
-                      kk = k - k_wall   !- lad arrays are defined flat
+                   DO  k = topo_top_ind(j,i,1)+1, topo_top_ind(j,i,1) + pch_index_ji(j,i)
+
+                      kk = k - topo_top_ind(j,i,1)   !- lad arrays are defined flat
 !
 !--                   In order to create sharp boundaries of the plant canopy, 
@@ -1660,6 +1638,4 @@
                       IF ( SIGN(pre_u,u(k,j,i)) /= pre_u )  THEN
                          pre_tend = - u(k,j,i) * ddt_3d
-                      ELSE
-                         pre_tend = pre_tend
                       ENDIF
 !
@@ -1687,9 +1663,7 @@
 !
 !--                Determine topography-top index on v-grid
-                   k_wall = topo_top_ind(j,i,2)
-
-                   DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
-
-                      kk = k - k_wall   !- lad arrays are defined flat
+                   DO  k = topo_top_ind(j,i,2)+1, topo_top_ind(j,i,2) + pch_index_ji(j,i)
+
+                      kk = k - topo_top_ind(j,i,2)   !- lad arrays are defined flat
 !
 !--                   In order to create sharp boundaries of the plant canopy, 
@@ -1762,9 +1736,7 @@
 !
 !--                Determine topography-top index on w-grid
-                   k_wall = topo_top_ind(j,i,3)
-
-                   DO  k = k_wall+1, k_wall + pch_index_ji(j,i) - 1
-
-                      kk = k - k_wall   !- lad arrays are defined flat
+                   DO  k = topo_top_ind(j,i,3)+1, topo_top_ind(j,i,3) + pch_index_ji(j,i) - 1
+
+                      kk = k - topo_top_ind(j,i,3)   !- lad arrays are defined flat
 
                       pre_tend = 0.0_wp
@@ -1814,8 +1786,7 @@
                    DO  j = nys, nyn
 !--                   Determine topography-top index on scalar-grid
-                      k_wall = topo_top_ind(j,i,0)
-                      DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
-                         kk = k - k_wall   !- lad arrays are defined flat
-                         tend(k,j,i) = tend(k,j,i) + pc_heating_rate(kk,j,i) - pc_latent_rate(kk,j,i)
+                      DO  k = topo_top_ind(j,i,0)+1, topo_top_ind(j,i,0) + pch_index_ji(j,i)
+                         kk = k - topo_top_ind(j,i,0)   !- lad arrays are defined flat
+                         tend(k,j,i) = tend(k,j,i) + pcm_heating_rate(kk,j,i) - pcm_latent_rate(kk,j,i)
                       ENDDO
                    ENDDO
@@ -1825,8 +1796,7 @@
                    DO  j = nys, nyn
 !--                   Determine topography-top index on scalar-grid
-                      k_wall = topo_top_ind(j,i,0)
-                      DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
-                         kk = k - k_wall   !- lad arrays are defined flat
-                         tend(k,j,i) = tend(k,j,i) + pc_heating_rate(kk,j,i)
+                      DO  k = topo_top_ind(j,i,0)+1, topo_top_ind(j,i,0) + pch_index_ji(j,i)
+                         kk = k - topo_top_ind(j,i,0)   !- lad arrays are defined flat
+                         tend(k,j,i) = tend(k,j,i) + pcm_heating_rate(kk,j,i)
                       ENDDO
                    ENDDO
@@ -1841,16 +1811,14 @@
 !
 !--                Determine topography-top index on scalar-grid
-                   k_wall = topo_top_ind(j,i,0)
-
-                   DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
-
-                      kk = k - k_wall   !- lad arrays are defined flat
+                   DO  k = topo_top_ind(j,i,0)+1, topo_top_ind(j,i,0) + pch_index_ji(j,i)
+
+                      kk = k - topo_top_ind(j,i,0)   !- lad arrays are defined flat
 
                       IF ( .NOT. plant_canopy_transpiration ) THEN
-                         ! pc_transpiration_rate is calculated in radiation model
+                         ! pcm_transpiration_rate is calculated in radiation model
                          ! in case of plant_canopy_transpiration = .T.
                          ! to include also the dependecy to the radiation
                          ! in the plant canopy box
-                         pc_transpiration_rate(kk,j,i) =  - lsec               &
+                         pcm_transpiration_rate(kk,j,i) =  - lsec               &
                                           * lad_s(kk,j,i) *                    &
                                           SQRT( ( 0.5_wp * ( u(k,j,i) +        &
@@ -1867,5 +1835,5 @@
                       ENDIF
 
-                      tend(k,j,i) = tend(k,j,i) + pc_transpiration_rate(kk,j,i)
+                      tend(k,j,i) = tend(k,j,i) + pcm_transpiration_rate(kk,j,i)
                    ENDDO
                 ENDDO
@@ -1879,9 +1847,7 @@
 !
 !--                Determine topography-top index on scalar-grid
-                   k_wall = topo_top_ind(j,i,0)
-
-                   DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
-
-                      kk = k - k_wall   !- lad arrays are defined flat
+                   DO  k = topo_top_ind(j,i,0)+1, topo_top_ind(j,i,0) + pch_index_ji(j,i)
+
+                      kk = k - topo_top_ind(j,i,0)   !- lad arrays are defined flat
                       tend(k,j,i) = tend(k,j,i) -                              &
                                        2.0_wp * cdc *                          &
@@ -1908,9 +1874,7 @@
 !
 !--                Determine topography-top index on scalar-grid
-                   k_wall = topo_top_ind(j,i,0)
-
-                   DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
-
-                      kk = k - k_wall   !- lad arrays are defined flat
+                   DO  k = topo_top_ind(j,i,0)+1, topo_top_ind(j,i,0) + pch_index_ji(j,i)
+
+                      kk = k - topo_top_ind(j,i,0)   !- lad arrays are defined flat
                       tend(k,j,i) = tend(k,j,i) -                              &
                                        lsec *                                  &
@@ -1981,5 +1945,4 @@
        INTEGER(iwp) ::  j         !< running index
        INTEGER(iwp) ::  k         !< running index
-       INTEGER(iwp) ::  k_wall    !< vertical index of topography top
        INTEGER(iwp) ::  kk        !< running index for flat lad arrays
 
@@ -2016,8 +1979,7 @@
 !
 !--          Determine topography-top index on u-grid
-             k_wall = topo_top_ind(j,i,1)
-             DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
-
-                kk = k - k_wall  !- lad arrays are defined flat
+             DO  k = topo_top_ind(j,i,1) + 1, topo_top_ind(j,i,1) + pch_index_ji(j,i)
+
+                kk = k - topo_top_ind(j,i,1)  !- lad arrays are defined flat
 
 !
@@ -2096,8 +2058,7 @@
 !
 !--          Determine topography-top index on v-grid
-             k_wall = topo_top_ind(j,i,2)
-             DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
-
-                kk = k - k_wall  !- lad arrays are defined flat
+             DO  k = topo_top_ind(j,i,2) + 1, topo_top_ind(j,i,2) + pch_index_ji(j,i)
+
+                kk = k - topo_top_ind(j,i,2)  !- lad arrays are defined flat
 !
 !--             In order to create sharp boundaries of the plant canopy, 
@@ -2166,9 +2127,7 @@
 !
 !--          Determine topography-top index on w-grid
-             k_wall = topo_top_ind(j,i,3)
-
-             DO  k = k_wall + 1, k_wall + pch_index_ji(j,i) - 1
-
-                kk = k - k_wall  !- lad arrays are defined flat
+             DO  k = topo_top_ind(j,i,3) + 1, topo_top_ind(j,i,3) + pch_index_ji(j,i) - 1
+
+                kk = k - topo_top_ind(j,i,3)  !- lad arrays are defined flat
 
                 pre_tend = 0.0_wp
@@ -2213,16 +2172,14 @@
 !
 !--          Determine topography-top index on scalar grid
-             k_wall = topo_top_ind(j,i,0)
-
              IF ( humidity ) THEN
-                DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
-                   kk = k - k_wall  !- lad arrays are defined flat
-                   tend(k,j,i) = tend(k,j,i) + pc_heating_rate(kk,j,i) -       &
-                                 pc_latent_rate(kk,j,i)
+                DO  k = topo_top_ind(j,i,0) + 1, topo_top_ind(j,i,0) + pch_index_ji(j,i)
+                   kk = k - topo_top_ind(j,i,0)  !- lad arrays are defined flat
+                   tend(k,j,i) = tend(k,j,i) + pcm_heating_rate(kk,j,i) -       &
+                                 pcm_latent_rate(kk,j,i)
                 ENDDO
              ELSE
-                DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
-                   kk = k - k_wall  !- lad arrays are defined flat
-                   tend(k,j,i) = tend(k,j,i) + pc_heating_rate(kk,j,i)
+                DO  k = topo_top_ind(j,i,0) + 1, topo_top_ind(j,i,0) + pch_index_ji(j,i)
+                   kk = k - topo_top_ind(j,i,0)  !- lad arrays are defined flat
+                   tend(k,j,i) = tend(k,j,i) + pcm_heating_rate(kk,j,i)
                 ENDDO
              ENDIF
@@ -2233,14 +2190,12 @@
 !
 !--          Determine topography-top index on scalar grid
-             k_wall = topo_top_ind(j,i,0)
-
-             DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
-                kk = k - k_wall  !- lad arrays are defined flat
+             DO  k = topo_top_ind(j,i,0) + 1, topo_top_ind(j,i,0) + pch_index_ji(j,i)
+                kk = k - topo_top_ind(j,i,0)  !- lad arrays are defined flat
                 IF ( .NOT. plant_canopy_transpiration ) THEN
-                   ! pc_transpiration_rate is calculated in radiation model
+                   ! pcm_transpiration_rate is calculated in radiation model
                    ! in case of plant_canopy_transpiration = .T.
                    ! to include also the dependecy to the radiation
                    ! in the plant canopy box
-                   pc_transpiration_rate(kk,j,i) = - lsec                      &
+                   pcm_transpiration_rate(kk,j,i) = - lsec                      &
                                     * lad_s(kk,j,i) *                          &
                                     SQRT( ( 0.5_wp * ( u(k,j,i) +              &
@@ -2257,5 +2212,5 @@
                 ENDIF
 
-                tend(k,j,i) = tend(k,j,i) + pc_transpiration_rate(kk,j,i)
+                tend(k,j,i) = tend(k,j,i) + pcm_transpiration_rate(kk,j,i)
 
              ENDDO   
@@ -2266,9 +2221,7 @@
 !
 !--          Determine topography-top index on scalar grid
-             k_wall = topo_top_ind(j,i,0)
-
-             DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
-
-                kk = k - k_wall
+             DO  k = topo_top_ind(j,i,0) + 1, topo_top_ind(j,i,0) + pch_index_ji(j,i)
+
+                kk = k - topo_top_ind(j,i,0)
                 tend(k,j,i) = tend(k,j,i) -                                    &
                                  2.0_wp * cdc *                                &
@@ -2292,9 +2245,7 @@
 !
 !--          Determine topography-top index on scalar grid
-             k_wall = topo_top_ind(j,i,0)
-
-             DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
-
-                kk = k - k_wall
+             DO  k = topo_top_ind(j,i,0) + 1, topo_top_ind(j,i,0) + pch_index_ji(j,i)
+
+                kk = k - topo_top_ind(j,i,0)
                 tend(k,j,i) = tend(k,j,i) -                                    &
                                  lsec *                                        &
Index: palm/trunk/SOURCE/radiation_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/radiation_model_mod.f90	(revision 4340)
+++ palm/trunk/SOURCE/radiation_model_mod.f90	(revision 4341)
@@ -28,4 +28,8 @@
 ! -----------------
 ! $Id$
+! Renamed pc_heating_rate, pc_transpiration_rate, pc_transpiration_rate to
+! pcm_heating_rate, pcm_latent_rate, pcm_transpiration_rate
+! 
+! 4340 2019-12-16 08:17:03Z Giersch
 ! Albedo indices for building_surface_pars are now declared as parameters to 
 ! prevent an error if the gfortran compiler with -Werror=unused-value is used
@@ -302,6 +306,10 @@
 
     USE plant_canopy_model_mod,                                                &
-        ONLY:  lad_s, pc_heating_rate, pc_transpiration_rate, pc_latent_rate,  &
-               plant_canopy_transpiration, pcm_calc_transpiration_rate
+        ONLY:  lad_s,                                                          &
+               pcm_heating_rate,                                               &
+               pcm_transpiration_rate,                                         &
+               pcm_latent_rate,                                                &
+               plant_canopy_transpiration,                                     &
+               pcm_calc_transpiration_rate
 
     USE pegrid
@@ -6150,5 +6158,5 @@
 !--  push heat flux absorbed by plant canopy to respective 3D arrays
      IF ( npcbl > 0 )  THEN
-         pc_heating_rate(:,:,:) = 0.0_wp
+         pcm_heating_rate(:,:,:) = 0.0_wp
          DO ipcgb = 1, npcbl
              j = pcbl(iy, ipcgb)
@@ -6158,5 +6166,5 @@
 !--          Following expression equals former kk = k - nzb_s_inner(j,i)
              kk = k - topo_top_ind(j,i,0)  !- lad arrays are defined flat
-             pc_heating_rate(kk, j, i) = (pcbinsw(ipcgb) + pcbinlw(ipcgb)) &
+             pcm_heating_rate(kk, j, i) = (pcbinsw(ipcgb) + pcbinlw(ipcgb)) &
                  * pchf_prep(k) * pt(k, j, i) !-- = dT/dt
          ENDDO
@@ -6164,6 +6172,6 @@
          IF ( humidity .AND. plant_canopy_transpiration ) THEN
 !--          Calculation of plant canopy transpiration rate and correspondidng latent heat rate
-             pc_transpiration_rate(:,:,:) = 0.0_wp
-             pc_latent_rate(:,:,:) = 0.0_wp
+             pcm_transpiration_rate(:,:,:) = 0.0_wp
+             pcm_latent_rate(:,:,:) = 0.0_wp
              DO ipcgb = 1, npcbl
                  i = pcbl(ix, ipcgb)
@@ -6172,5 +6180,5 @@
                  kk = k - topo_top_ind(j,i,0)  !- lad arrays are defined flat
                  CALL pcm_calc_transpiration_rate( i, j, k, kk, pcbinsw(ipcgb), pcbinlw(ipcgb), &
-                                                   pc_transpiration_rate(kk,j,i), pc_latent_rate(kk,j,i) )
+                                                   pcm_transpiration_rate(kk,j,i), pcm_latent_rate(kk,j,i) )
               ENDDO
          ENDIF
Index: palm/trunk/SOURCE/user_init_plant_canopy.f90
===================================================================
--- palm/trunk/SOURCE/user_init_plant_canopy.f90	(revision 4340)
+++ palm/trunk/SOURCE/user_init_plant_canopy.f90	(revision 4341)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Renamed canopy_mode 'block' to 'homogeneous'
+! 
+! 4182 2019-08-22 15:20:23Z scharf
 ! Corrected "Former revisions" section
 ! 
@@ -69,5 +72,5 @@
     SELECT CASE ( TRIM( canopy_mode ) )
 
-       CASE ( 'block' )
+       CASE ( 'homogeneous' )
 !
 !--       Not allowed here since this is the standard case used in init_3d_model.
