Index: palm/trunk/SOURCE/chemistry_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/chemistry_model_mod.f90	(revision 2766)
+++ palm/trunk/SOURCE/chemistry_model_mod.f90	(revision 2768)
@@ -27,4 +27,7 @@
 ! -----------------
 ! $Id$
+! Shorten lines to maximum length of 132 characters
+! 
+! 2766 2018-01-22 17:17:47Z kanani
 ! Removed preprocessor directive __chem
 ! 
@@ -813,5 +816,6 @@
 
             IF(myid == 0)  THEN
-               WRITE(6,'(a,3x,a,3x,a,e12.4)')  '   Species:     ',chem_species(lsp)%name(1:7),' Initial Value = ',chem_species(lsp)%conc(nzb,nysg,nxlg)
+               WRITE(6,'(a,3x,a,3x,a,e12.4)')  '   Species:     ',chem_species(lsp)%name(1:7),' & 
+                                        Initial Value = ',chem_species(lsp)%conc(nzb,nysg,nxlg)
             ENDIF
          ENDDO
@@ -1237,5 +1241,6 @@
        DO lsp=1,nspec
           IF (TRIM(spec_name) == TRIM(chem_species(lsp)%name))   THEN
-             IF(myid == 0 .AND. chem_debug0 )  WRITE(6,*) 'Output of species ',TRIM(variable),' ',TRIM(chem_species(lsp)%name)       
+             IF(myid == 0 .AND. chem_debug0 )  WRITE(6,*) 'Output of species ',TRIM(variable),'  &
+                                                          ',TRIM(chem_species(lsp)%name)       
              
              IF (av == 0) THEN
@@ -1507,5 +1512,7 @@
 !------------------------------------------------------------------------------!
 
- SUBROUTINE chem_tendency ( cs_scalar_p, cs_scalar, tcs_scalar_m, pr_init_cs, i, j, i_omp_start, tn, ilsp, flux_s_cs, diss_s_cs, flux_l_cs, diss_l_cs )
+ SUBROUTINE chem_tendency ( cs_scalar_p, cs_scalar, tcs_scalar_m, pr_init_cs,  &
+                            i, j, i_omp_start, tn, ilsp, flux_s_cs, diss_s_cs, &
+                            flux_l_cs, diss_l_cs )
     USE pegrid         
     USE advec_ws,        ONLY:  advec_s_ws 
@@ -1514,7 +1521,6 @@
     USE diffusion_s_mod, ONLY:  diffusion_s
     USE indices,         ONLY:  wall_flags_0
-    USE surface_mod,                                                                            &
-                         ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h,    &
-                                 surf_usm_v
+    USE surface_mod,     ONLY:  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h,    &
+                                surf_usm_v
 !> Only one chem_spcs recieved prog_eqns at time.
 !> cem_tendency is called in prog_eqns over loop => nvar
@@ -1522,5 +1528,5 @@
     IMPLICIT NONE
 
-    REAL(wp), DIMENSION(:,:,:), POINTER                         :: cs_scalar_p, cs_scalar, tcs_scalar_m
+    REAL(wp), DIMENSION(:,:,:), POINTER   :: cs_scalar_p, cs_scalar, tcs_scalar_m
 
     INTEGER(iwp),INTENT(IN) :: i, j, i_omp_start, tn, ilsp
Index: palm/trunk/SOURCE/plant_canopy_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 2766)
+++ palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 2768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Added check for output quantity pcm_heatrate, some formatting
+! 
+! 2766 2018-01-22 17:17:47Z kanani
 ! Increased LEN of canopy mode to 30
 ! 
@@ -194,6 +197,6 @@
     REAL(wp) ::  leaf_scalar_exch_coeff = 0.0_wp  !< canopy scalar exchange coeff.
     REAL(wp) ::  leaf_surface_conc = 0.0_wp       !< leaf surface concentration
+    REAL(wp) ::  lsc = 0.0_wp                     !< leaf surface concentration
     REAL(wp) ::  lsec = 0.0_wp                    !< leaf scalar exchange coeff.
-    REAL(wp) ::  lsc = 0.0_wp                     !< leaf surface concentration
     REAL(wp) ::  prototype_lad                    !< prototype leaf area density for computing effective optical depth
 
@@ -204,9 +207,7 @@
     REAL(wp), DIMENSION(:), ALLOCATABLE ::  pre_lad        !< preliminary lad
     
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::                                 &
-       pc_heating_rate                                    !< plant canopy heating rate
-    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 ::  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
 
     SAVE
@@ -287,4 +288,9 @@
 
        CASE ( 'pcm_heatrate' )
+          IF ( cthf == 0.0_wp )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                              'res setting of parameter cthf /= 0.0'
+             CALL message( 'pcm_check_data_output', 'PA1000', 1, 2, 0, 6, 0 )
+          ENDIF
           unit = 'K s-1'
     
@@ -323,5 +329,5 @@
           message_string = 'plant_canopy = .TRUE. requires a non-zero drag '// &
                            'coefficient & given value is canopy_drag_coeff = 0.0'
-          CALL message( 'check_parameters', 'PA0041', 1, 2, 0, 6, 0 )
+          CALL message( 'pcm_check_parameters', 'PA0041', 1, 2, 0, 6, 0 )
        ENDIF
     
@@ -331,5 +337,5 @@
                            'of the leaf area density profile requires '    //  &
                            'both alpha_lad and beta_lad to be /= 9999999.9'
-          CALL message( 'check_parameters', 'PA0118', 1, 2, 0, 6, 0 )
+          CALL message( 'pcm_check_parameters', 'PA0118', 1, 2, 0, 6, 0 )
        ENDIF
     
@@ -339,5 +345,5 @@
                            'a non-zero lai_beta, but given value is '      //  &
                            'lai_beta = 0.0'
-          CALL message( 'check_parameters', 'PA0119', 1, 2, 0, 6, 0 )
+          CALL message( 'pcm_check_parameters', 'PA0119', 1, 2, 0, 6, 0 )
        ENDIF
 
@@ -349,5 +355,5 @@
                            'function for the construction of the leaf area '// &
                            'density profile'
-          CALL message( 'check_parameters', 'PA0120', 1, 2, 0, 6, 0 )
+          CALL message( 'pcm_check_parameters', 'PA0120', 1, 2, 0, 6, 0 )
        ENDIF 
 
@@ -355,5 +361,5 @@
           message_string = 'plant_canopy = .TRUE. requires cloud_scheme /=' // &
                           ' seifert_beheng'
-          CALL message( 'check_parameters', 'PA0360', 1, 2, 0, 6, 0 )
+          CALL message( 'pcm_check_parameters', 'PA0360', 1, 2, 0, 6, 0 )
        ENDIF
 !
@@ -365,5 +371,5 @@
                            TRIM( coupling_char ) // ' requires ' //            &
                            'canopy_mode = read_from_file_3d'
-          CALL message( 'check_parameters', 'PA0999', 1, 2, 0, 6, 0 )
+          CALL message( 'pcm_check_parameters', 'PA0999', 1, 2, 0, 6, 0 )
        ENDIF
 
@@ -844,5 +850,5 @@
 !--    When using the urban surface model (USM), canopy heating (pc_heating_rate)
 !--    by radiation is calculated in the USM.
-       IF ( cthf /= 0.0_wp  .AND. .NOT.  urban_surface)  THEN
+       IF ( cthf /= 0.0_wp  .AND. .NOT.  urban_surface )  THEN
 
           ALLOCATE( cum_lai_hf(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                 &
