Index: palm/trunk/SOURCE/chemistry_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/chemistry_model_mod.f90	(revision 3522)
+++ palm/trunk/SOURCE/chemistry_model_mod.f90	(revision 3524)
@@ -27,4 +27,7 @@
 ! -----------------
 ! $Id$
+! working precision added to make code Fortran 2008 conform
+! 
+! 3458 2018-10-30 14:51:23Z kanani
 ! from chemistry branch r3443, banzhafs, basit:
 ! replace surf_lsm_h%qv1(m) by q(k,j,i) for mixing ratio in chem_depo
@@ -4780,5 +4783,5 @@
 
          ! vapour pressure deficit influence
-         F_vpd = min(1.,((1.-F_min(lu))*(vpd_min(lu)-vpd)/(vpd_min(lu)-vpd_max(lu)) + F_min(lu) ))
+         F_vpd = MIN( 1.0_wp, ((1.0_wp-F_min(lu))*(vpd_min(lu)-vpd)/(vpd_min(lu)-vpd_max(lu)) + F_min(lu) ) )
          F_vpd = max(F_vpd,F_min(lu))
 
@@ -4861,9 +4864,9 @@
 
       ! Compute visible and near-infrared radiation
-      rv=max(0.1,rdu+rdv)
-      rn=max(0.01,rdm+rdn)
+      rv = MAX( 0.1_wp, rdu+rdv )
+      rn = MAX( 0.01_wp, rdm+rdn )
 
       ! Compute ratio between input global radiation and total radiation computed here
-      ratio=min(0.9,glrad/(rv+rn))
+      ratio = MIN( 0.9_wp, glrad/(rv+rn) )
 
       !     Calculate total visible radiation
@@ -4871,6 +4874,6 @@
 
       !     Calculate fraction of PAR in the direct beam
-      fv=min(0.99, (0.9-ratio)/0.7)            ! help variable
-      fv=max(0.01,rdu/rv*(1.0-fv**0.6667))     ! fraction of PAR in the direct beam
+      fv = MIN( 0.99_wp, (0.9_wp-ratio)/0.7_wp )            ! help variable
+      fv = MAX( 0.01_wp, rdu/rv*(1.0_wp-fv**0.6667_wp) )     ! fraction of PAR in the direct beam
 
       ! Compute direct and diffuse parts of PAR
Index: palm/trunk/SOURCE/header.f90
===================================================================
--- palm/trunk/SOURCE/header.f90	(revision 3522)
+++ palm/trunk/SOURCE/header.f90	(revision 3524)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! unused variables removed
+! 
+! 3467 2018-10-30 19:05:21Z suehring
 ! Implementation of a new aerosol module salsa.
 ! 
@@ -402,5 +405,5 @@
 
     USE basic_constants_and_equations_mod,                                     &
-        ONLY:  g, kappa, l_v, r_d
+        ONLY:  g, kappa, l_v
 
     USE biometeorology_mod,                                                    &
Index: palm/trunk/SOURCE/indoor_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/indoor_model_mod.f90	(revision 3522)
+++ palm/trunk/SOURCE/indoor_model_mod.f90	(revision 3524)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! working precision added to make code Fortran 2008 conform
+! 
+! 3469 2018-10-30 20:05:07Z kanani
 ! Initial revision (tlang, suehring, kanani, srissman)
 ! 
@@ -979,6 +982,6 @@
 !--          not less than 0.01 W/K to provide division by 0 in further calculations
 !--          with heat capacity of air 0.33 Wh/m2K
-             h_ve   = MAX( 0.01 , ( air_change * indoor_volume_per_facade *      &
-                                    0.33 * (1 - eta_ve ) ) )    !< [W/K] from ISO 13789 Eq.(10) 
+             h_ve   = MAX( 0.01_wp , ( air_change * indoor_volume_per_facade *      &
+                                    0.33_wp * (1 - eta_ve ) ) )    !< [W/K] from ISO 13789 Eq.(10)
 
 !--          Heat transfer coefficient auxiliary variables
@@ -1171,6 +1174,6 @@
 !--          not less than 0.01 W/K to provide division by 0 in further calculations
 !--          with heat capacity of air 0.33 Wh/m2K
-             h_ve   = MAX( 0.01 , ( air_change * indoor_volume_per_facade *      &
-                                    0.33 * (1 - eta_ve ) ) )                    !< [W/K] from ISO 13789 Eq.(10) 
+             h_ve   = MAX( 0.01_wp , ( air_change * indoor_volume_per_facade *      &
+                                    0.33_wp * (1 - eta_ve ) ) )                    !< [W/K] from ISO 13789 Eq.(10)
                                     
 !--          Heat transfer coefficient auxiliary variables
Index: palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_3d_model.f90	(revision 3522)
+++ palm/trunk/SOURCE/init_3d_model.f90	(revision 3524)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! preprocessor directive added to avoid the compiler to complain about unused
+! variable
+! 
+! 3473 2018-10-30 20:50:15Z suehring
 ! Add virtual measurement module
 ! 
@@ -615,6 +619,8 @@
         ONLY:  pcm_init
 
+#if defined( __parallel )
     USE pmc_interface,                                                         &
         ONLY:  nested_run
+#endif
 
     USE radiation_model_mod,                                                   &
Index: palm/trunk/SOURCE/lpm_init.f90
===================================================================
--- palm/trunk/SOURCE/lpm_init.f90	(revision 3522)
+++ palm/trunk/SOURCE/lpm_init.f90	(revision 3524)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! added missing working precision
+! 
+! 3361 2018-10-16 20:39:37Z knoop
 ! ocean renamed ocean_mode
 ! 
@@ -804,7 +807,7 @@
 !
 !--                            Determine the grid indices of the particle position
-                               ip = tmp_particle%x * ddx
-                               jp = tmp_particle%y * ddy
-                               kp = tmp_particle%z / dz(1) + 1 + offset_ocean_nzt                               
+                               ip = INT( tmp_particle%x * ddx )
+                               jp = INT( tmp_particle%y * ddy )
+                               kp = INT( tmp_particle%z / dz(1) + 1 + offset_ocean_nzt )
                                DO WHILE( zw(kp) < tmp_particle%z ) 
                                   kp = kp + 1
@@ -1184,5 +1187,5 @@
                 IF ( particles(n)%weight_factor - FLOOR(particles(n)%weight_factor,KIND=wp) &
                      .GT. random_function( iran_part ) )  THEN
-                   particles(n)%weight_factor = FLOOR(particles(n)%weight_factor,KIND=wp) + 1.0
+                   particles(n)%weight_factor = FLOOR(particles(n)%weight_factor,KIND=wp) + 1.0_wp
                 ELSE
                    particles(n)%weight_factor = FLOOR(particles(n)%weight_factor,KIND=wp)
Index: palm/trunk/SOURCE/palm.f90
===================================================================
--- palm/trunk/SOURCE/palm.f90	(revision 3522)
+++ palm/trunk/SOURCE/palm.f90	(revision 3524)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! unused variable removed
+! 
+! 3494 2018-11-06 14:51:27Z suehring
 ! Last actions for surface output added
 ! 
@@ -281,7 +284,6 @@
     USE control_parameters,                                                    &
         ONLY:  air_chemistry, constant_diffusion, child_domain,                &
-               coupling_char, coupling_mode, do2d_at_begin, do3d_at_begin,     &
-               humidity, initializing_actions, io_blocks, io_group,            &
-               message_string,                                                 &
+               coupling_char, do2d_at_begin, do3d_at_begin, humidity,          &
+               initializing_actions, io_blocks, io_group, message_string,      &
                neutral, passive_scalar, runnr, simulated_time_chr, spinup,     &
                time_since_reference_point, user_interface_current_revision,    &
@@ -392,12 +394,4 @@
 #if defined( __parallel )
     CALL MPI_COMM_RANK( comm_palm, myid, ierr )
-!
-!-- TEST OUTPUT (TO BE REMOVED)
-    WRITE(9,*) '*** coupling_mode = "', TRIM( coupling_mode ), '"'
-    FLUSH( 9 )
-    IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
-       PRINT*, '*** PE', myid, ' Global target PE:', target_id, &
-               TRIM( coupling_mode )
-    ENDIF
 #endif
 
Index: palm/trunk/SOURCE/plant_canopy_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 3522)
+++ palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 3524)
@@ -27,4 +27,7 @@
 ! -----------------
 ! $Id$
+! working precision added to make code Fortran 2008 conform
+! 
+! 3498 2018-11-07 10:53:03Z gronemeier
 ! corrected revisions section
 ! 
@@ -403,5 +406,5 @@
      temp = pt(k,j,i) * exner(k) - degc_to_k
 !--  Coefficient for conversion of radiation to grid to radiation to unit leaves surface
-     v_lad = 1.0_wp / ( MAX(lad_s(kk,j,i), 1.0e-10) * dx * dy * dz(1) )
+     v_lad = 1.0_wp / ( MAX( lad_s(kk,j,i), 1.0e-10_wp ) * dx * dy * dz(1) )
 !--  Magnus formula for the saturation pressure (see Ngao, Adam and Saudreau (2017) eq. 1)
 !--  There are updated formulas available, kept consistent with the rest of the parametrization
Index: palm/trunk/SOURCE/pmc_interface_mod.f90
===================================================================
--- palm/trunk/SOURCE/pmc_interface_mod.f90	(revision 3522)
+++ palm/trunk/SOURCE/pmc_interface_mod.f90	(revision 3524)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! declaration statements rearranged to avoid compile time errors
+! 
+! 3484 2018-11-02 14:41:25Z hellstea
 ! Introduction of reversibility correction to the interpolation routines in order to 
 ! guarantee mass and scalar conservation through the nest boundaries. Several errors 
@@ -5416,4 +5419,6 @@
       IMPLICIT NONE
 
+      INTEGER(iwp) ::  nzt_topo_nestbc   !<
+
       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
                                       INTENT(INOUT) ::  f       !<
@@ -5448,6 +5453,4 @@
 !AH      INTEGER(iwp), DIMENSION(0:kct,jcs:jcn,icl:icr), INTENT(IN) :: ijkfc !< number of child grid points contributing to a parent grid box
       INTEGER(iwp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr), INTENT(IN) :: ijkfc !< number of child grid points contributing to a parent grid box
-
-      INTEGER(iwp) ::  nzt_topo_nestbc   !<
 
       CHARACTER(LEN=1), INTENT(IN) ::  edge   !<
@@ -5706,4 +5709,6 @@
       IMPLICIT NONE
 
+      INTEGER(iwp) ::  nzt_topo_nestbc   !<
+
       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
                                       INTENT(INOUT) ::  f             !<
@@ -5737,6 +5742,4 @@
 !AH      INTEGER(iwp), DIMENSION(0:kct,jcs:jcn,icl:icr), INTENT(IN) :: ijkfc !< number of child grid points contributing to a parent grid box
       INTEGER(iwp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr), INTENT(IN) :: ijkfc !< number of child grid points contributing to a parent grid box
-
-      INTEGER(iwp) ::  nzt_topo_nestbc   !<
 
       CHARACTER(LEN=1), INTENT(IN) ::  edge   !<
Index: palm/trunk/SOURCE/poismg_mod.f90
===================================================================
--- palm/trunk/SOURCE/poismg_mod.f90	(revision 3522)
+++ palm/trunk/SOURCE/poismg_mod.f90	(revision 3524)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! mpi_abort arguments replaced to avoid compile errors
+! 
+! 3241 2018-09-12 15:02:00Z raasch
 ! unused variables removed
 ! 
@@ -1191,5 +1194,5 @@
              IF ( ind /= ind_even_odd )  THEN
                 WRITE (0,*) 'ERROR ==> illegal ind_even_odd ',ind,ind_even_odd,l
-                CALL MPI_ABORT(MPI_COMM_WORLD,i,j)
+                CALL MPI_ABORT( MPI_COMM_WORLD, 9999, ierr )
              ENDIF
 #endif
Index: palm/trunk/SOURCE/radiation_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/radiation_model_mod.f90	(revision 3522)
+++ palm/trunk/SOURCE/radiation_model_mod.f90	(revision 3524)
@@ -28,4 +28,7 @@
 ! -----------------
 ! $Id$
+! missing cpp-directives added
+! 
+! 3495 2018-11-06 15:22:17Z kanani
 ! Resort control_parameters ONLY list,
 ! From branch radiation@3491 moh.hefny:
@@ -2307,4 +2310,5 @@
 !--       Calculate initial surface albedo for different surfaces
           IF ( .NOT. constant_albedo )  THEN
+#if defined( __netcdf )
 !
 !--          Horizontally aligned natural and urban surfaces
@@ -2317,4 +2321,5 @@
                 CALL calc_albedo( surf_usm_v(l) )
              ENDDO
+#endif
           ELSE
 !
@@ -3089,4 +3094,5 @@
 !--    Calculate surface albedo. In case average radiation is applied, 
 !--    this is not required.
+#if defined( __netcdf )
        IF ( .NOT. constant_albedo )  THEN
 !
@@ -3101,4 +3107,5 @@
           ENDDO
        ENDIF
+#endif
 
 !
Index: palm/trunk/SOURCE/salsa_mod.f90
===================================================================
--- palm/trunk/SOURCE/salsa_mod.f90	(revision 3522)
+++ palm/trunk/SOURCE/salsa_mod.f90	(revision 3524)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! missing comma separator inserted
+! 
+! 3483 2018-11-02 14:19:26Z raasch
 ! bugfix: directives added to allow compilation without netCDF
 ! 
@@ -875,5 +878,5 @@
 14  FORMAT  (/'       dry deposition (on vegetation = ', L1,                   &
               '          and on topography = ', L1, ')')              
-8   FORMAT  (/'    Aerosol bin subrange limits (in metres): ',  3(ES10.2E3) /  &
+8   FORMAT  (/'    Aerosol bin subrange limits (in metres): ',  3(ES10.2E3), / &
               '    Number of size bins for each aerosol subrange: ', 2I3,/     &
               '    Aerosol bin limits (in metres): ', *(ES10.2E3))
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 3522)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 3524)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! unused variables removed
+! 
+! 3484 2018-11-02 14:41:25Z hellstea
 ! pmci_ensure_nest_mass_conservation is premanently removed
 ! 
@@ -422,6 +425,5 @@
 
     USE chem_modules,                                                          &
-        ONLY:  bc_cs_t_val, call_chem_at_all_substeps, cs_name,                &
-               constant_csflux, do_emis, nspec, nspec_out
+        ONLY:  bc_cs_t_val, cs_name, do_emis, nspec, nspec_out
 
     USE chemistry_model_mod,                                                   &
Index: palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3522)
+++ palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3524)
@@ -28,4 +28,7 @@
 ! -----------------
 ! $Id$
+! bugfix concerning allocation of t_surf_wall_v
+! 
+! 3502 2018-11-07 14:45:23Z suehring
 ! Disable initialization of building roofs with ground-floor-level properties, 
 ! since this causes strong oscillations of surface temperature during the 
@@ -7373,5 +7376,5 @@
                 IF ( k == 1 )  THEN
                    IF ( .NOT.  ALLOCATED( t_surf_wall_v(0)%t ) )                    &
-                      ALLOCATE( t_surf_v(0)%t(1:surf_usm_v(0)%ns) )
+                      ALLOCATE( t_surf_wall_v(0)%t(1:surf_usm_v(0)%ns) )
                    READ ( 13 )  tmp_surf_wall_v(0)%t
                 ENDIF
