Index: palm/trunk/SOURCE/land_surface_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 4117)
+++ palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 4118)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Initialization of soil temperature and moisture via dynamic input file only
+! for vegetation and pavement surfaces. 
+! 
+! 4110 2019-07-22 17:05:21Z suehring
 ! Relax checks for non-consistent initialization in case static or dynamic 
 ! input is provided. For example, soil_temperature or deep_soil_temperature
@@ -4568,6 +4572,8 @@
              IF ( init_3d%lod_msoil == 1 )  THEN
                 DO  m = 1, surf_lsm_h%ns
-
-                   CALL netcdf_data_input_interpolate(                         &
+                   IF ( surf_lsm_h%vegetation_surface(m)  .OR.                 &
+                        surf_lsm_h%pavement_surface(m) )  THEN
+
+                      CALL netcdf_data_input_interpolate(                      &
                                        m_soil_h%var_2d(nzb_soil:nzt_soil,m),   &
                                        init_3d%msoil_1d(:),                    &
@@ -4575,9 +4581,11 @@
                                        nzb_soil, nzt_soil,                     &
                                        nzb_soil, init_3d%nzs-1 )
+                   ENDIF
                 ENDDO
                 DO  l = 0, 3
                    DO  m = 1, surf_lsm_v(l)%ns
-
-                      CALL netcdf_data_input_interpolate(                      &
+                      IF ( surf_lsm_v(l)%vegetation_surface(m)  .OR.           &
+                           surf_lsm_v(l)%pavement_surface(m) )  THEN
+                         CALL netcdf_data_input_interpolate(                   &
                                        m_soil_v(l)%var_2d(nzb_soil:nzt_soil,m),&
                                        init_3d%msoil_1d(:),                    &
@@ -4585,4 +4593,5 @@
                                        nzb_soil, nzt_soil,                     &
                                        nzb_soil, init_3d%nzs-1 )
+                      ENDIF
                    ENDDO
                 ENDDO
@@ -4590,9 +4599,11 @@
 
                 DO  m = 1, surf_lsm_h%ns
-                   i = surf_lsm_h%i(m)
-                   j = surf_lsm_h%j(m)
-
-                   IF ( init_3d%msoil_3d(0,j,i) /= init_3d%fill_msoil )        &
-                      CALL netcdf_data_input_interpolate(                      &
+                   IF ( surf_lsm_h%vegetation_surface(m)  .OR.                 &
+                        surf_lsm_h%pavement_surface(m) )  THEN
+                      i = surf_lsm_h%i(m)
+                      j = surf_lsm_h%j(m)
+
+                      IF ( init_3d%msoil_3d(0,j,i) /= init_3d%fill_msoil )     &
+                         CALL netcdf_data_input_interpolate(                   &
                                        m_soil_h%var_2d(nzb_soil:nzt_soil,m),   &
                                        init_3d%msoil_3d(:,j,i),                &
@@ -4600,17 +4611,20 @@
                                        nzb_soil, nzt_soil,                     &
                                        nzb_soil, init_3d%nzs-1 )
+                   ENDIF
                 ENDDO
                 DO  l = 0, 3
                    DO  m = 1, surf_lsm_v(l)%ns
-!
-!--                   Note, in contrast to the static input data the dynamic
-!--                   input do not need to be checked whether a grid point
-!--                   is building covered. This is because soil data in the
-!--                   dynamic input is provided for the whole domain.  
-                      i = surf_lsm_v(l)%i(m)
-                      j = surf_lsm_v(l)%j(m)
-
-                      IF ( init_3d%msoil_3d(0,j,i) /= init_3d%fill_msoil )     &
-                         CALL netcdf_data_input_interpolate(                   &
+                      IF ( surf_lsm_v(l)%vegetation_surface(m)  .OR.           &
+                           surf_lsm_v(l)%pavement_surface(m) )  THEN
+!
+!--                      Note, in contrast to the static input data the dynamic
+!--                      input do not need to be checked whether a grid point
+!--                      is building covered. This is because soil data in the
+!--                      dynamic input is provided for the whole domain.  
+                         i = surf_lsm_v(l)%i(m)
+                         j = surf_lsm_v(l)%j(m)
+                         
+                         IF ( init_3d%msoil_3d(0,j,i) /= init_3d%fill_msoil )  &
+                            CALL netcdf_data_input_interpolate(                &
                                        m_soil_v(l)%var_2d(nzb_soil:nzt_soil,m),&
                                        init_3d%msoil_3d(:,j,i),                &
@@ -4618,4 +4632,5 @@
                                        nzb_soil, nzt_soil,                     &
                                        nzb_soil, init_3d%nzs-1 )
+                      ENDIF
                    ENDDO
                 ENDDO
@@ -4628,6 +4643,7 @@
              IF ( init_3d%lod_tsoil == 1 )  THEN ! change to 1 if provided correctly by INIFOR
                 DO  m = 1, surf_lsm_h%ns
-
-                   CALL netcdf_data_input_interpolate(                         &
+                   IF ( surf_lsm_h%vegetation_surface(m)  .OR.                 &
+                        surf_lsm_h%pavement_surface(m) )  THEN
+                      CALL netcdf_data_input_interpolate(                      &
                                        t_soil_h%var_2d(nzb_soil:nzt_soil,m),   &
                                        init_3d%tsoil_1d(:),                    &
@@ -4635,10 +4651,14 @@
                                        nzb_soil, nzt_soil,                     &
                                        nzb_soil, init_3d%nzs-1 )
-                   t_soil_h%var_2d(nzt_soil+1,m) = t_soil_h%var_2d(nzt_soil,m)
+!
+!--                   Set boundary condition, i.e. deep soil temperature
+                      t_soil_h%var_2d(nzt_soil+1,m) = t_soil_h%var_2d(nzt_soil,m)
+                   ENDIF
                 ENDDO
                 DO  l = 0, 3
                    DO  m = 1, surf_lsm_v(l)%ns
-
-                      CALL netcdf_data_input_interpolate(                      &
+                      IF ( surf_lsm_v(l)%vegetation_surface(m)  .OR.           &
+                           surf_lsm_v(l)%pavement_surface(m) )  THEN
+                        CALL netcdf_data_input_interpolate(                    &
                                        t_soil_v(l)%var_2d(nzb_soil:nzt_soil,m),&
                                        init_3d%tsoil_1d(:),                    &
@@ -4646,6 +4666,9 @@
                                        nzb_soil, nzt_soil,                     &
                                        nzb_soil, init_3d%nzs-1 )
-                      t_soil_v(l)%var_2d(nzt_soil+1,m) =                       &
+!
+!--                      Set boundary condition, i.e. deep soil temperature
+                         t_soil_v(l)%var_2d(nzt_soil+1,m) =                    &
                                                  t_soil_v(l)%var_2d(nzt_soil,m)
+                      ENDIF
                    ENDDO
                 ENDDO
@@ -4653,9 +4676,11 @@
 
                 DO  m = 1, surf_lsm_h%ns
-                   i = surf_lsm_h%i(m)
-                   j = surf_lsm_h%j(m)
-
-                   IF ( init_3d%tsoil_3d(0,j,i) /= init_3d%fill_tsoil )        &
-                      CALL netcdf_data_input_interpolate(                      &
+                   IF ( surf_lsm_h%vegetation_surface(m)  .OR.                 &
+                        surf_lsm_h%pavement_surface(m) )  THEN
+                      i = surf_lsm_h%i(m)
+                      j = surf_lsm_h%j(m)
+                      
+                      IF ( init_3d%tsoil_3d(0,j,i) /= init_3d%fill_tsoil )     &
+                         CALL netcdf_data_input_interpolate(                   &
                                        t_soil_h%var_2d(nzb_soil:nzt_soil,m),   &
                                        init_3d%tsoil_3d(:,j,i),                &
@@ -4663,18 +4688,23 @@
                                        nzb_soil, nzt_soil,                     &
                                        nzb_soil, init_3d%nzs-1 )
-                   t_soil_h%var_2d(nzt_soil+1,m) = t_soil_h%var_2d(nzt_soil,m)
+!
+!--                   Set boundary condition, i.e. deep soil temperature
+                      t_soil_h%var_2d(nzt_soil+1,m) = t_soil_h%var_2d(nzt_soil,m)
+                   ENDIF
                 ENDDO
                 DO  l = 0, 3
                    DO  m = 1, surf_lsm_v(l)%ns
-!
-!--                   Note, in contrast to the static input data the dynamic
-!--                   input do not need to be checked whether a grid point
-!--                   is building covered. This is because soil data in the
-!--                   dynamic input is provided for the whole domain.  
-                      i = surf_lsm_v(l)%i(m)
-                      j = surf_lsm_v(l)%j(m)
-
-                      IF ( init_3d%tsoil_3d(0,j,i) /= init_3d%fill_tsoil )     &
-                         CALL netcdf_data_input_interpolate(                   &
+                      IF ( surf_lsm_v(l)%vegetation_surface(m)  .OR.           &
+                           surf_lsm_v(l)%pavement_surface(m) )  THEN
+!
+!--                      Note, in contrast to the static input data the dynamic
+!--                      input do not need to be checked whether a grid point
+!--                      is building covered. This is because soil data in the
+!--                      dynamic input is provided for the whole domain.  
+                         i = surf_lsm_v(l)%i(m)
+                         j = surf_lsm_v(l)%j(m)
+                         
+                         IF ( init_3d%tsoil_3d(0,j,i) /= init_3d%fill_tsoil )  &
+                            CALL netcdf_data_input_interpolate(                &
                                        t_soil_v(l)%var_2d(nzb_soil:nzt_soil,m),&
                                        init_3d%tsoil_3d(:,j,i),                &
@@ -4682,6 +4712,9 @@
                                        nzb_soil, nzt_soil,                     &
                                        nzb_soil, init_3d%nzs-1 )
-                      t_soil_v(l)%var_2d(nzt_soil+1,m) =                       &
+!
+!--                      Set boundary condition, i.e. deep soil temperature
+                         t_soil_v(l)%var_2d(nzt_soil+1,m) =                    &
                                                  t_soil_v(l)%var_2d(nzt_soil,m)
+                      ENDIF
                    ENDDO
                 ENDDO
@@ -4710,7 +4743,7 @@
                      surf_lsm_v(l)%pavement_surface(m) )  THEN
                    DO  k = nzb_soil, nzt_soil
-                      IF ( m_soil_v(l)%var_2d(k,m) > surf_lsm_v(l)%m_sat(k,m) )  &
+                      IF ( m_soil_v(l)%var_2d(k,m) > surf_lsm_v(l)%m_sat(k,m) )&
                       THEN
-                         WRITE( message_string, * )                               &
+                         WRITE( message_string, * )                            &
                             'soil moisture is higher than ' //                 &
                             'its saturation value at (k,j,i) ', k,             &
Index: palm/trunk/SOURCE/salsa_mod.f90
===================================================================
--- palm/trunk/SOURCE/salsa_mod.f90	(revision 4117)
+++ palm/trunk/SOURCE/salsa_mod.f90	(revision 4118)
@@ -21,4 +21,9 @@
 ! Current revisions:
 ! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
 ! - When Dirichlet condition is applied in decycling, the boundary conditions are
 !   only set at the ghost points and not at the prognostic grid points as done
@@ -32,10 +37,8 @@
 !   Moreover, salsa_advc_flags_s considers extended zones around buildings where
 !   the first-order upwind scheme is applied for the horizontal advection terms.
-!   This is doneto overcome high concentration peaks due to stationary numerical
+!   This is done to overcome high concentration peaks due to stationary numerical
 !   oscillations caused by horizontal advection discretization.
 ! 
-! Former revisions:
-! -----------------
-! $Id$
+! 4117 2019-07-25 08:54:02Z monakurppa
 ! Pass integer flag array as well as boundary flags to WS scalar advection 
 ! routine
