Index: palm/trunk/SOURCE/average_3d_data.f90
===================================================================
--- palm/trunk/SOURCE/average_3d_data.f90	(revision 2765)
+++ palm/trunk/SOURCE/average_3d_data.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2742 2018-01-12 14:59:47Z suehring
 ! Enable output of surface temperature
 ! 
@@ -126,8 +129,6 @@
     USE averaging
 
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_3d_data_averaging
-#endif
 
     USE control_parameters,                                                    &
@@ -514,9 +515,7 @@
 !
 !--          Chemistry quantity
-#if defined( __chem )
              IF ( air_chemistry )  THEN
                 CALL chem_3d_data_averaging( 'average', doav(ii) )
              ENDIF
-#endif
 !
 !--          User-defined quantity
Index: palm/trunk/SOURCE/boundary_conds.f90
===================================================================
--- palm/trunk/SOURCE/boundary_conds.f90	(revision 2765)
+++ palm/trunk/SOURCE/boundary_conds.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
 ! Corrected "Former revisions" section
 ! 
@@ -179,8 +182,6 @@
                w, w_p, w_m_l, w_m_n, w_m_r, w_m_s, pt_init
 
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_boundary_conds 
-#endif
               
     USE control_parameters,                                                    &
@@ -525,7 +526,5 @@
 !
 !-- Top/bottom boundary conditions for chemical species
-#if defined( __chem )
     IF ( air_chemistry )  CALL chem_boundary_conds( 'set_bc_bottomtop' )
-#endif
 !
 !-- In case of inflow or nest boundary at the south boundary the boundary for v
@@ -630,8 +629,5 @@
 !
 !-- Lateral boundary conditions for chemical species
-#if defined( __chem )
     IF ( air_chemistry )  CALL chem_boundary_conds( 'set_bc_lateral' )    
-#endif
-
 
 !
Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 2765)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2765 2018-01-22 11:34:58Z maronga
 ! Renamed simulation_time_since_reference to 
 ! time_to_be_simulated_from_reference_point
@@ -578,10 +581,8 @@
 
     USE arrays_3d
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_boundary_conds, chem_check_data_output,                    &
                chem_check_data_output_pr, chem_species                 
     USE chem_modules
-#endif
     USE cloud_parameters
     USE constants
@@ -1401,5 +1402,4 @@
        IF ( ocean          )  sa_init = sa_surface
        IF ( passive_scalar )  s_init  = s_surface
-#if defined(__chem )                              
        IF ( air_chemistry )  THEN
          DO lsp = 1, nvar
@@ -1407,5 +1407,4 @@
          ENDDO
        ENDIF
-#endif 
 !
 !--
@@ -1619,5 +1618,4 @@
 !
 !--    Compute initial chemistry profile using the given chemical species gradients
-#if defined( __chem )
        IF ( air_chemistry )  THEN                                                          
          DO lsp = 1, nvar
@@ -1629,5 +1627,4 @@
          ENDDO
        ENDIF
-#endif
 !
 !
@@ -2113,7 +2110,5 @@
 !
 !-- Boundary conditions for chemical species
-#if defined( __chem )
     IF ( air_chemistry )  CALL chem_boundary_conds( 'init' )
-#endif
 
 !
@@ -3070,10 +3065,8 @@
              ENDIF
 
-#if defined( __chem )
              IF ( unit == 'illegal' )  THEN                                        
                 CALL chem_check_data_output_pr( data_output_pr(i), i,          &
                                                 unit, dopr_unit(i) )
              ENDIF 
-#endif
 
              IF ( unit == 'illegal' )  THEN
@@ -3386,10 +3379,8 @@
 !
 !--          Block of chemistry model outputs
-#if defined( __chem )
              IF ( unit == 'illegal'  .AND.  air_chemistry                      &
                                      .AND.  var(1:3) == 'kc_' )  THEN
                 CALL chem_check_data_output( var, unit, i, ilen, k )
              ENDIF
-#endif
 
 !
Index: palm/trunk/SOURCE/chem_gasphase_mod.f90
===================================================================
--- palm/trunk/SOURCE/chem_gasphase_mod.f90	(revision 2765)
+++ palm/trunk/SOURCE/chem_gasphase_mod.f90	(revision 2766)
@@ -1,4 +1,3 @@
 MODULE chem_gasphase_mod
-#if defined( __chem )
 !------------------------------------------------------------------------------!
 !
@@ -32,4 +31,7 @@
 ! -----------------
 ! $Id: module_header 2460 2017-09-13 14:47:48Z forkel $
+! Removed preprocessor directive __chem
+! 
+! 2460 2017-09-13 14:47:48Z forkel
 !
 ! 
@@ -2433,5 +2435,5 @@
  
   END   SUBROUTINE fill_temp
-#endif
+
 END MODULE chem_gasphase_mod
  
Index: palm/trunk/SOURCE/chem_modules.f90
===================================================================
--- palm/trunk/SOURCE/chem_modules.f90	(revision 2765)
+++ palm/trunk/SOURCE/chem_modules.f90	(revision 2766)
@@ -27,4 +27,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
 ! Initial revision
 !
@@ -45,5 +48,5 @@
 !
  MODULE chem_modules
-#if defined( __chem )  
+
     USE kinds 
     USE chem_gasphase_mod,                                                     &   
@@ -128,5 +131,5 @@
 
     SAVE
-#endif
+
  END MODULE chem_modules
 
Index: palm/trunk/SOURCE/chem_photolysis_mod.f90
===================================================================
--- palm/trunk/SOURCE/chem_photolysis_mod.f90	(revision 2765)
+++ palm/trunk/SOURCE/chem_photolysis_mod.f90	(revision 2766)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
 ! Initial revision
 !
@@ -43,5 +46,5 @@
 !------------------------------------------------------------------------------!
  MODULE chem_photolysis_mod
-#if defined( __chem )
+
     USE arrays_3d,                                                             &
         ONLY:  dzw, hyp, pt, q, ql, zu, zw
@@ -329,4 +332,4 @@
 
     END SUBROUTINE photolysis_simple
-#endif
+
  END MODULE chem_photolysis_mod
Index: palm/trunk/SOURCE/chemistry_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/chemistry_model_mod.f90	(revision 2765)
+++ palm/trunk/SOURCE/chemistry_model_mod.f90	(revision 2766)
@@ -27,4 +27,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2756 2018-01-16 18:11:14Z suehring
 ! Fill values in 3D output introduced.
 ! 
@@ -74,5 +77,5 @@
 
 MODULE chemistry_model_mod
-#if defined( __chem )
+
    USE kinds,              ONLY: wp, iwp
    USE indices,            ONLY: nz, nzb,nzt,nysg,nyng,nxlg,nxrg,nys,nyn
@@ -1808,5 +1811,4 @@
 
 
-#endif
  END MODULE chemistry_model_mod
 
Index: palm/trunk/SOURCE/data_output_3d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_3d.f90	(revision 2765)
+++ palm/trunk/SOURCE/data_output_3d.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2756 2018-01-16 18:11:14Z suehring
 ! Fill values for 3D output of chemical species introduced.
 ! 
@@ -185,8 +188,6 @@
     USE averaging
         
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_data_output_3d
-#endif        
 
     USE cloud_parameters,                                                      &
@@ -680,5 +681,4 @@
 !
 !--          Chemistry model output
-#if defined( __chem )
              IF ( .NOT. found  .AND.  air_chemistry )  THEN
                 CALL chem_data_output_3d( av, do3d(av,if), found,              &
@@ -686,5 +686,4 @@
                 resorted = .TRUE.
              ENDIF
-#endif
 
 !
Index: palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_3d_model.f90	(revision 2765)
+++ palm/trunk/SOURCE/init_3d_model.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2758 2018-01-17 12:55:21Z suehring
 ! In case of spinup of land- and urban-surface model, do not mask wind velocity
 ! at first computational grid level
@@ -411,8 +414,6 @@
     USE arrays_3d
 
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_emissions
-#endif
 
     USE cloud_parameters,                                                      &
@@ -2302,9 +2303,7 @@
 !-- If required, set chemical emissions
 !-- (todo(FK): This should later on be CALLed time-dependently in init_3d_model)
-#if defined( __chem )
     IF ( air_chemistry ) THEN
        CALL chem_emissions
     ENDIF
-#endif
 
 !
Index: palm/trunk/SOURCE/netcdf_interface_mod.f90
===================================================================
--- palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 2765)
+++ palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2746 2018-01-15 12:06:04Z suehring
 ! Move flag plant canopy to modules
 ! 
@@ -481,8 +484,6 @@
         ONLY:  zu, zw
 
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_define_netcdf_grid 
-#endif
 
     USE constants,                                                             &
@@ -930,5 +931,4 @@
 !
 !--                Check for chemistry quantities                   
-#if defined( __chem )
                    IF ( .NOT. found  .AND.  air_chemistry )  THEN
                       CALL chem_define_netcdf_grid( domask(mid,av,i),          &
@@ -936,5 +936,4 @@
                                                     grid_z )
                    ENDIF
-#endif
 
 !
@@ -1474,10 +1473,8 @@
 !
 !--                Check for chemistry quantities                   
-#if defined( __chem )
                    IF ( .NOT. found  .AND.  air_chemistry )  THEN
                       CALL chem_define_netcdf_grid( do3d(av,i), found,         &
                                                     grid_x, grid_y, grid_z )
                    ENDIF
-#endif
 
 !--                Check for user-defined quantities
@@ -2129,5 +2126,4 @@
 !
 !--                      Check for chemistry quantities
-#if defined( __chem )
                          IF ( .NOT. found  .AND.  air_chemistry )  THEN
                             CALL chem_define_netcdf_grid( do2d(av,i), found,   &
@@ -2135,5 +2131,4 @@
                                                           grid_z )
                          ENDIF
-#endif
 
 !
@@ -2849,5 +2844,4 @@
 !
 !--                   Check for chemistry quantities
-#if defined( __chem )
                       IF ( .NOT. found  .AND.  air_chemistry )  THEN
                          CALL chem_define_netcdf_grid( do2d(av,i), found,      &
@@ -2855,5 +2849,4 @@
                                                        grid_z )
                       ENDIF
-#endif
 
 !
@@ -3518,5 +3511,4 @@
 !
 !--                   Check for chemistry quantities
-#if defined( __chem )
                       IF ( .NOT. found  .AND.  air_chemistry )  THEN
                          CALL chem_define_netcdf_grid( do2d(av,i), found,      &
@@ -3524,5 +3516,4 @@
                                                        grid_z )
                       ENDIF
-#endif
 !
 !--                   Check for user-defined quantities
Index: palm/trunk/SOURCE/palm.f90
===================================================================
--- palm/trunk/SOURCE/palm.f90	(revision 2765)
+++ palm/trunk/SOURCE/palm.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2720 2018-01-02 16:27:15Z kanani
 ! Version update to 5.0
 ! 
@@ -205,10 +208,9 @@
     USE arrays_3d
 
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_init, chem_last_actions
+
     USE chem_photolysis_mod,                                                   &
         ONLY:  photolysis_init
-#endif
 
     USE control_parameters,                                                    &
@@ -374,5 +376,4 @@
 !-- Initialize chemistry (called before check_parameters due to dependencies)
 !-- --> Needs to be moved!! What is the dependency about?
-#if defined( __chem )
 ! IF (  TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
     IF ( air_chemistry )  THEN
@@ -381,5 +382,4 @@
     ENDIF
 ! END IF
-#endif
 !
 !-- Check control parameters and deduce further quantities
@@ -518,9 +518,7 @@
              CALL radiation_last_actions
           ENDIF
-#if defined( __chem )
           IF ( air_chemistry )  THEN
              CALL chem_last_actions
           ENDIF
-#endif
           
           CALL user_last_actions
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 2765)
+++ palm/trunk/SOURCE/parin.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
 ! Corrected "Former revisions" section
 ! 
@@ -330,10 +333,8 @@
                ug, u_init, v_init, vg
 
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_parin
         
     USE chem_modules
-#endif
 
     USE control_parameters
@@ -743,7 +744,5 @@
 !
 !--       Read chemistry variables
-#if defined( __chem )
           CALL chem_parin
-#endif
 !
 !--       Check if uv exposure model is used and read &uvexposure_par
Index: palm/trunk/SOURCE/plant_canopy_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 2765)
+++ palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Increased LEN of canopy mode to 30
+! 
+! 2746 2018-01-15 12:06:04Z suehring
 ! Move flag plant canopy to modules
 ! 
@@ -170,5 +173,5 @@
 
 
-    CHARACTER (LEN=20)   ::  canopy_mode = 'block' !< canopy coverage
+    CHARACTER (LEN=30)   ::  canopy_mode = 'block' !< canopy coverage
 
     INTEGER(iwp) ::  pch_index = 0                               !< plant canopy height/top index
Index: palm/trunk/SOURCE/prognostic_equations.f90
===================================================================
--- palm/trunk/SOURCE/prognostic_equations.f90	(revision 2765)
+++ palm/trunk/SOURCE/prognostic_equations.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2746 2018-01-15 12:06:04Z suehring
 ! Move flag plant canopy to modules
 ! 
@@ -266,5 +269,4 @@
                w, w_p
 
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_integrate, chem_species,                                   &
@@ -276,5 +278,4 @@
     USE chem_modules,                                                          &
         ONLY:  call_chem_at_all_substeps, chem_gasphase_on
-#endif
 
     USE control_parameters,                                                    &
@@ -444,5 +445,4 @@
 !-- since exchange of ghost points is required after this update of the
 !-- concentrations of chemical species                                    
-#if defined( __chem )
     IF ( air_chemistry )  THEN
 !
@@ -478,5 +478,4 @@
 
     ENDIF       
-#endif     
 
 !
@@ -1298,5 +1297,4 @@
 !
 !--       If required, compute prognostic equation for chemical quantites
-#if defined( __chem )
           IF ( air_chemistry )  THEN
              CALL cpu_log( log_point(83), '(chem advec+diff+prog)', 'start' )
@@ -1317,5 +1315,4 @@
              CALL cpu_log( log_point(83), '(chem advec+diff+prog)', 'stop' )             
           ENDIF   ! Chemicals equations                     
-#endif
 
        ENDDO
Index: palm/trunk/SOURCE/read_3d_binary.f90
===================================================================
--- palm/trunk/SOURCE/read_3d_binary.f90	(revision 2765)
+++ palm/trunk/SOURCE/read_3d_binary.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
 ! Corrected "Former revisions" section
 ! 
@@ -155,8 +158,6 @@
     USE averaging
 
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_read_restart_data, chem_species, nspec                                
-#endif
 
     USE control_parameters,                                                    &
@@ -1114,5 +1115,4 @@
 !
 !--    Read chemistry restart data
-#if defined( __chem )
        IF ( air_chemistry )  THEN
           CALL chem_read_restart_data( i, nxlfa, nxl_on_file, nxrfa,           &
@@ -1122,5 +1122,4 @@
                                        tmp_2d, tmp_3d )
        ENDIF
-#endif
 
 !
Index: palm/trunk/SOURCE/sum_up_3d_data.f90
===================================================================
--- palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 2765)
+++ palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2743 2018-01-12 16:03:39Z suehring
 ! In case of natural- and urban-type surfaces output surfaces fluxes in W/m2.
 ! 
@@ -172,8 +175,6 @@
                ts_av, tsurf_av, u_av, us_av, v_av, vpt_av, w_av, z0_av, z0h_av,&
                z0q_av
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_3d_data_averaging, chem_integrate, chem_species, nspec                                   
-#endif
 
     USE cloud_parameters,                                                      &
@@ -1023,9 +1024,7 @@
 !
 !--          Chemical quantity
-#if defined( __chem )                
              IF ( air_chemistry  .AND.  trimvar(1:3) == 'kc_')  THEN
                 CALL chem_3d_data_averaging( 'sum',doav(ii) )
              ENDIF
-#endif
 
 !
Index: palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
===================================================================
--- palm/trunk/SOURCE/surface_layer_fluxes_mod.f90	(revision 2765)
+++ palm/trunk/SOURCE/surface_layer_fluxes_mod.f90	(revision 2766)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
 ! Corrected "Former revisions" section
 ! 
@@ -207,8 +210,6 @@
                drho_air_zw, rho_air_zw
 
-#if defined( __chem )
     USE chem_modules,                                                          &
         ONLY:  constant_csflux, nvar
-#endif
 
     USE cloud_parameters,                                                      &
@@ -1814,5 +1815,4 @@
 !
 !--    If required compute cs* (chemical species)
-#if defined( __chem )
        IF ( air_chemistry  )  THEN  
 !
@@ -1842,5 +1842,4 @@
           ENDIF
        ENDIF
-#endif
 
 !
@@ -2050,5 +2049,4 @@
 !
 !--       Compute the vertical chemical species' flux
-#if defined( __chem )
           DO  lsp = 1, nvar
              IF (  .NOT.  constant_csflux(lsp)  .AND.  air_chemistry  .AND.    &
@@ -2062,5 +2060,4 @@
              ENDIF   
           ENDDO
-#endif
 
 !
Index: palm/trunk/SOURCE/surface_mod.f90
===================================================================
--- palm/trunk/SOURCE/surface_mod.f90	(revision 2765)
+++ palm/trunk/SOURCE/surface_mod.f90	(revision 2766)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2759 2018-01-17 16:24:59Z suehring
 ! Bugfix, consider density in vertical fluxes of passive scalar as well as 
 ! chemical species.
@@ -123,7 +126,5 @@
                rho_air, rho_air_zw, zu, zw, waterflux_input_conversion 
 
-#if defined( __chem )
     USE chem_modules
-#endif
 
     USE control_parameters               
@@ -968,10 +969,8 @@
 !
 !--    Scaling parameter (cs*) and surface flux of chemical species
-#if defined ( __chem )
        IF ( air_chemistry )  THEN
           ALLOCATE ( surfaces%css(1:nvar,1:surfaces%ns)   )   
           ALLOCATE ( surfaces%cssws(1:nvar,1:surfaces%ns) ) 
        ENDIF 
-#endif 
 !
 !--    Arrays for storing potential temperature and
@@ -1052,9 +1051,7 @@
 !
 !--    Chemical species flux
-#if defined( __chem )
        IF ( air_chemistry )  THEN
           ALLOCATE ( surfaces%cssws(1:nvar,1:surfaces%ns) ) 
        ENDIF 
-#endif 
 !
 !--       
@@ -1167,10 +1164,8 @@
 !
 !--    Scaling parameter (cs*) and surface flux of chemical species
-#if defined( __chem )
        IF ( air_chemistry )  THEN
              ALLOCATE ( surfaces%css(1:nvar,1:surfaces%ns)   )   
              ALLOCATE ( surfaces%cssws(1:nvar,1:surfaces%ns) ) 
        ENDIF 
-#endif
 !
 !--    Arrays for storing potential temperature and
@@ -1737,9 +1732,7 @@
              IF ( passive_scalar )  surf%ss(num_h) = 0.0_wp
 
-#if defined( __chem )
              DO  lsp = 1, nvar
                 IF ( air_chemistry )  surf%css(lsp,num_h) = 0.0_wp
              ENDDO
-#endif
 !
 !--          Set initial value for surface temperature
@@ -1819,5 +1812,4 @@
                 ENDIF
 
-#if defined( __chem )
                 IF ( air_chemistry )  THEN
                    lsp_pr = 1
@@ -1849,5 +1841,4 @@
                    ENDDO
                 ENDIF
-#endif
 
                 IF ( ocean )  THEN
@@ -1920,5 +1911,4 @@
 !
 !--          Prescribe top chemical species' flux
-#if defined( __chem )
              DO  lsp = 1, nvar
                 IF ( air_chemistry  .AND.  constant_top_csflux(lsp) )  THEN 
@@ -1926,5 +1916,4 @@
                 ENDIF
              ENDDO
-#endif
 !
 !--          Prescribe top salinity flux
@@ -2063,5 +2052,4 @@
              ENDIF
 
-#if defined( __chem )
              IF ( air_chemistry )  THEN        
                 DO  lsp = 1, nvar
@@ -2070,5 +2058,4 @@
                 ENDDO
              ENDIF
-#endif
 
 !
@@ -2271,5 +2258,4 @@
                    IF ( ALLOCATED( surf_def_h(l)%ssws ) )                      &
                       surf_h(l)%ssws(mm(l))    = surf_def_h(l)%ssws(m)
-#if defined( __chem )
                    IF ( ALLOCATED( surf_def_h(l)%css ) )  THEN 
                       DO  lsp = 1,nvar
@@ -2282,5 +2268,4 @@
                       ENDDO
                    ENDIF
-#endif
                    IF ( ALLOCATED( surf_def_h(l)%ncsws ) )                     &
                       surf_h(l)%ncsws(mm(l))   = surf_def_h(l)%ncsws(m)
@@ -2328,5 +2313,4 @@
                       IF ( ALLOCATED( surf_lsm_h%ssws ) )                      &
                          surf_h(0)%ssws(mm(0))    = surf_lsm_h%ssws(m)
-#if defined( __chem )
                       IF ( ALLOCATED( surf_lsm_h%css ) )  THEN                  
                          DO  lsp = 1, nvar
@@ -2339,5 +2323,4 @@
                          ENDDO 
                       ENDIF
-#endif
                       IF ( ALLOCATED( surf_lsm_h%ncsws ) )                     &
                          surf_h(0)%ncsws(mm(0))   = surf_lsm_h%ncsws(m)
@@ -2385,5 +2368,4 @@
                       IF ( ALLOCATED( surf_usm_h%ssws ) )                      &
                          surf_h(0)%ssws(mm(0))    = surf_usm_h%ssws(m)
-#if defined( __chem )
                       IF ( ALLOCATED( surf_usm_h%css ) )  THEN             
                          DO lsp = 1, nvar
@@ -2396,5 +2378,4 @@
                          ENDDO
                       ENDIF
-#endif
                       IF ( ALLOCATED( surf_usm_h%ncsws ) )                     &
                          surf_h(0)%ncsws(mm(0))   = surf_usm_h%ncsws(m)
@@ -2474,5 +2455,4 @@
                    IF ( ALLOCATED( surf_def_v(l)%ssws ) )                      &
                       surf_v(l)%ssws(mm(l))    = surf_def_v(l)%ssws(m)
-#if defined( __chem )
                    IF ( ALLOCATED( surf_def_v(l)%css ) )  THEN               
                       DO  lsp = 1, nvar
@@ -2485,5 +2465,4 @@
                       ENDDO
                    ENDIF
-#endif
                    IF ( ALLOCATED( surf_def_v(l)%ncsws ) )                     &
                       surf_v(l)%ncsws(mm(l))   = surf_def_v(l)%ncsws(m)
@@ -2536,5 +2515,4 @@
                    IF ( ALLOCATED( surf_lsm_v(l)%ssws ) )                      &
                       surf_v(l)%ssws(mm(l))    = surf_lsm_v(l)%ssws(m)
-#if defined( __chem )
                    IF ( ALLOCATED( surf_lsm_v(l)%css ) )  THEN              
                       DO  lsp = 1, nvar
@@ -2547,5 +2525,4 @@
                       ENDDO
                    ENDIF
-#endif
                    IF ( ALLOCATED( surf_lsm_v(l)%ncsws ) )                     &
                       surf_v(l)%ncsws(mm(l))   = surf_lsm_v(l)%ncsws(m)
@@ -2598,5 +2575,4 @@
                    IF ( ALLOCATED( surf_usm_v(l)%ssws ) )                      &
                       surf_v(l)%ssws(mm(l))    = surf_usm_v(l)%ssws(m)
-#if defined( __chem )
                    IF ( ALLOCATED( surf_usm_v(l)%css ) )  THEN              
                       DO  lsp = 1, nvar
@@ -2609,5 +2585,4 @@
                       ENDDO
                    ENDIF
-#endif
                    IF ( ALLOCATED( surf_usm_v(l)%ncsws ) )                     &
                       surf_v(l)%ncsws(mm(l))   = surf_usm_v(l)%ncsws(m)
@@ -2717,5 +2692,4 @@
              WRITE ( 14 )  surf_h(l)%ssws
           ENDIF
-#if defined ( __chem )
           WRITE ( 14 )  'surf_h(' // dum // ')%css                 '
           IF ( ALLOCATED ( surf_h(l)%css ) )  THEN 
@@ -2726,5 +2700,4 @@
              WRITE ( 14 )  surf_h(l)%cssws
           ENDIF
-#endif
           WRITE ( 14 )  'surf_h(' // dum // ')%qcsws               '  
           IF ( ALLOCATED ( surf_h(l)%qcsws ) )  THEN
@@ -2814,5 +2787,4 @@
              WRITE ( 14 )  surf_v(l)%ssws
           ENDIF
-#if defined( __chem )
           WRITE ( 14 )  'surf_v(' // dum // ')%css                 '  
           IF ( ALLOCATED ( surf_v(l)%css ) )  THEN
@@ -2823,5 +2795,4 @@
              WRITE ( 14 )  surf_v(l)%cssws
           ENDIF
-#endif
           WRITE ( 14 )  'surf_v(' // dum // ')%qcsws               '  
           IF ( ALLOCATED ( surf_v(l)%qcsws ) )  THEN
@@ -3059,5 +3030,4 @@
                       IF ( ALLOCATED( surf_h(0)%ssws )  .AND.  kk == 1 )       &
                          READ ( 13 )  surf_h(0)%ssws
-#if defined( __chem )
                    CASE ( 'surf_h(0)%css' )
                       IF ( ALLOCATED( surf_h(0)%css )  .AND.  kk == 1 )        &
@@ -3066,5 +3036,4 @@
                       IF ( ALLOCATED( surf_h(0)%cssws )  .AND.  kk == 1 )      &
                          READ ( 13 )  surf_h(0)%cssws
-#endif
                    CASE ( 'surf_h(0)%qcsws' )         
                       IF ( ALLOCATED( surf_h(0)%qcsws )  .AND.  kk == 1 )      &
@@ -3138,5 +3107,4 @@
                       IF ( ALLOCATED( surf_h(1)%ssws )  .AND.  kk == 1 )       &
                          READ ( 13 )  surf_h(1)%ssws
-#if defined( __chem )
                    CASE ( 'surf_h(1)%css' )
                       IF ( ALLOCATED( surf_h(1)%css )  .AND.  kk == 1 )        &
@@ -3145,5 +3113,4 @@
                       IF ( ALLOCATED( surf_h(1)%cssws )  .AND.  kk == 1 )      &
                          READ ( 13 )  surf_h(1)%cssws
-#endif
                    CASE ( 'surf_h(1)%qcsws' )         
                       IF ( ALLOCATED( surf_h(1)%qcsws )  .AND.  kk == 1 )      &
@@ -3214,5 +3181,4 @@
                       IF ( ALLOCATED( surf_h(2)%ssws )  .AND.  kk == 1 )       &
                          READ ( 13 )  surf_h(2)%ssws
-#if defined( __chem )
                    CASE ( 'surf_h(2)%css' )
                       IF ( ALLOCATED( surf_h(2)%css )  .AND.  kk == 1 )        &
@@ -3221,5 +3187,4 @@
                       IF ( ALLOCATED( surf_h(2)%cssws )  .AND.  kk == 1 )      &
                          READ ( 13 )  surf_h(2)%cssws
-#endif
                    CASE ( 'surf_h(2)%qcsws' )         
                       IF ( ALLOCATED( surf_h(2)%qcsws )  .AND.  kk == 1 )      &
@@ -3289,5 +3254,4 @@
                       IF ( ALLOCATED( surf_v(0)%ssws )  .AND.  kk == 1 )       &
                          READ ( 13 )  surf_v(0)%ssws
-#if defined( __chem )
                    CASE ( 'surf_v(0)%css' ) 
                       IF ( ALLOCATED( surf_v(0)%css )  .AND.  kk == 1 )        &
@@ -3296,5 +3260,4 @@
                       IF ( ALLOCATED( surf_v(0)%cssws )  .AND.  kk == 1 )      &
                          READ ( 13 )  surf_v(0)%cssws
-#endif
                    CASE ( 'surf_v(0)%qcsws' )         
                       IF ( ALLOCATED( surf_v(0)%qcsws )  .AND.  kk == 1 )      &
@@ -3371,5 +3334,4 @@
                       IF ( ALLOCATED( surf_v(1)%ssws )  .AND.  kk == 1 )       &
                          READ ( 13 )  surf_v(1)%ssws
-#if defined( __chem )
                    CASE ( 'surf_v(1)%css' ) 
                       IF ( ALLOCATED( surf_v(1)%css )  .AND.  kk == 1 )        &
@@ -3378,5 +3340,4 @@
                       IF ( ALLOCATED( surf_v(1)%cssws )  .AND.  kk == 1 )      &
                          READ ( 13 )  surf_v(1)%cssws
-#endif
                    CASE ( 'surf_v(1)%qcsws' )         
                       IF ( ALLOCATED( surf_v(1)%qcsws )  .AND.  kk == 1 )      &
@@ -3453,5 +3414,4 @@
                       IF ( ALLOCATED( surf_v(2)%ssws )  .AND.  kk == 1 )       &
                          READ ( 13 )  surf_v(2)%ssws
-#if defined( __chem )
                    CASE ( 'surf_v(2)%css' ) 
                       IF ( ALLOCATED( surf_v(2)%css )  .AND.  kk == 1 )        &
@@ -3460,5 +3420,4 @@
                       IF ( ALLOCATED( surf_v(2)%cssws )  .AND.  kk == 1 )      &
                          READ ( 13 )  surf_v(2)%cssws
-#endif
                    CASE ( 'surf_v(2)%qcsws' )         
                       IF ( ALLOCATED( surf_v(2)%qcsws )  .AND.  kk == 1 )      &
@@ -3535,5 +3494,4 @@
                       IF ( ALLOCATED( surf_v(3)%ssws )  .AND.  kk == 1 )       &
                          READ ( 13 )  surf_v(3)%ssws
-#if defined( __chem )
                    CASE ( 'surf_v(3)%css' ) 
                       IF ( ALLOCATED( surf_v(3)%css )  .AND.  kk == 1 )        &
@@ -3542,5 +3500,4 @@
                       IF ( ALLOCATED( surf_v(3)%cssws )  .AND.  kk == 1 )      &
                          READ ( 13 )  surf_v(3)%cssws
-#endif
                    CASE ( 'surf_v(3)%qcsws' )         
                       IF ( ALLOCATED( surf_v(3)%qcsws )  .AND.  kk == 1 )      &
@@ -3762,5 +3719,4 @@
              ENDIF
 
-#if defined( __chem )
              IF ( INDEX( TRIM( field_chr ), '%css' ) /= 0 )  THEN 
                 IF ( ALLOCATED( surf_target%css )  .AND.                     &
@@ -3779,5 +3735,4 @@
                 ENDIF
              ENDIF
-#endif
 
              IF ( INDEX( TRIM( field_chr ), '%qcs' ) /= 0 )  THEN 
Index: palm/trunk/SOURCE/swap_timelevel.f90
===================================================================
--- palm/trunk/SOURCE/swap_timelevel.f90	(revision 2765)
+++ palm/trunk/SOURCE/swap_timelevel.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
 ! Corrected "Former revisions" section
 ! 
@@ -130,8 +133,6 @@
 #endif
 
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_swap_timelevel 
-#endif
 
     USE land_surface_model_mod,                                                &
@@ -246,7 +247,5 @@
           ENDIF
 
-#if defined( __chem )
           IF ( air_chemistry )  CALL chem_swap_timelevel(0)
-#endif
 
           swap_level = 1
@@ -278,7 +277,5 @@
           ENDIF
 
-#if defined( __chem )
           IF ( air_chemistry )  CALL chem_swap_timelevel(1)
-#endif
 
           swap_level = 2
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 2765)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 2766)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
 ! Corrected "Former revisions" section
 ! 
@@ -314,5 +317,4 @@
         ONLY:  calc_mean_profile
 
-#if defined( __chem )
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_emissions, chem_species
@@ -320,5 +322,4 @@
     USE chem_modules,                                                          &
         ONLY:  nspec 
-#endif
 
     USE control_parameters,                                                    &
@@ -693,5 +694,4 @@
           ENDIF
           IF ( passive_scalar )  CALL exchange_horiz( s_p, nbgp )
-#if defined( __chem )
           IF ( air_chemistry )  THEN
              DO  n = 1, nspec     
@@ -699,5 +699,5 @@
              ENDDO
           ENDIF
-#endif
+
           CALL cpu_log( log_point(26), 'exchange-horiz-progn', 'stop' )
 
@@ -1005,13 +1005,11 @@
        ENDDO   ! Intermediate step loop
 !
-!--          If required, consider chemical emissions
-!--          (todo (FK): Implement hourly call of emissions, using time_utc from
-!--                      data_and_time_mod.f90;
-!--                      move the CALL to appropriate location)
-! #if defined( __chem )
-!              IF ( air_chemistry ) THEN
-!                 CALL chem_emissions
-!              ENDIF
-! #endif
+!--    If required, consider chemical emissions
+!--    (todo (FK): Implement hourly call of emissions, using time_utc from
+!--                data_and_time_mod.f90;
+!--                move the CALL to appropriate location)
+       IF ( air_chemistry ) THEN
+          CALL chem_emissions
+       ENDIF
 !
 !--    If required, do UV exposure calculations
Index: palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- palm/trunk/SOURCE/urban_surface_mod.f90	(revision 2765)
+++ palm/trunk/SOURCE/urban_surface_mod.f90	(revision 2766)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! Removed redundant commas, added some blanks
+! 
+! 2765 2018-01-22 11:34:58Z maronga
 ! Major bugfix in calculation of f_shf. Adjustment of roughness lengths in
 ! building_pars
@@ -5863,7 +5866,7 @@
                                               start_index_on_file,             &
                                               end_index_on_file ,              &
-                                              nxlc, nysc,           ,          &
+                                              nxlc, nysc,                      &
                                               nys_on_file, nyn_on_file,        &
-                                              nxl_on_file,nxr_on_file )
+                                              nxl_on_file, nxr_on_file )
 #else
                       IF ( kk == 1 )  THEN
@@ -6022,5 +6025,5 @@
                                               start_index_on_file,             &
                                               end_index_on_file ,              &
-                                              nxlc, nysc,           ,          &
+                                              nxlc, nysc,                      &
                                               nys_on_file, nyn_on_file,        &
                                               nxl_on_file,nxr_on_file )
@@ -6135,5 +6138,5 @@
                                               nxlf, nxrf, nysf, nynf,          &
                                               nys_on_file, nyn_on_file,        &
-                                              nxl_on_file,nxr_on_file )
+                                              nxl_on_file, nxr_on_file )
 #endif
                    CASE ( 't_window_v(0)' )
@@ -6152,5 +6155,5 @@
                                               nxlf, nxrf, nysf, nynf,          &
                                               nys_on_file, nyn_on_file,        &
-                                              nxl_on_file,nxr_on_file )
+                                              nxl_on_file, nxr_on_file )
 #else
                       IF ( kk == 1 )  THEN
@@ -6181,7 +6184,7 @@
                                               start_index_on_file,             &
                                               end_index_on_file ,              &
-                                              nxlc, nysc,           ,          &
+                                              nxlc, nysc,                      &
                                               nys_on_file, nyn_on_file,        &
-                                              nxl_on_file,nxr_on_file )
+                                              nxl_on_file, nxr_on_file )
 #else
                       IF ( kk == 1 )  THEN
