Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 1275)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 1276)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-!
+! Use LSF_DATA also in case of Dirichlet bottom boundary condition for scalars
 !
 ! Former revisions:
@@ -1613,11 +1613,21 @@
     ENDIF
 
-    IF ( surface_heatflux == 9999999.9  .AND.  .NOT. large_scale_forcing )  THEN
-        constant_heatflux     = .FALSE.
+    IF ( surface_heatflux == 9999999.9  )  THEN
+       constant_heatflux = .FALSE.
+       IF ( large_scale_forcing )  THEN
+          IF ( ibc_pt_b == 0 )  THEN
+             constant_heatflux = .FALSE.
+          ELSEIF ( ibc_pt_b == 1 )  THEN
+             constant_heatflux = .TRUE.
+             IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+                surface_heatflux = shf_surf(1)
+             ENDIF
+          ENDIF
+       ENDIF
     ELSE
-        constant_heatflux     = .TRUE.
+        constant_heatflux = .TRUE.
         IF ( TRIM( initializing_actions ) /= 'read_restart_data' .AND. &
                large_scale_forcing ) THEN
-           surface_heatflux      = shf_surf(1)
+           surface_heatflux = shf_surf(1)
         ENDIF
     ENDIF
@@ -1742,13 +1752,22 @@
        ENDIF
 
-       IF ( surface_waterflux == 9999999.9  .AND.  &
-                             .NOT. large_scale_forcing )  THEN
-           constant_waterflux     = .FALSE.
+       IF ( surface_waterflux == 9999999.9  )  THEN
+          constant_waterflux = .FALSE.
+          IF ( large_scale_forcing )  THEN
+             IF ( ibc_q_b == 0 )  THEN
+                constant_waterflux = .FALSE.
+             ELSEIF ( ibc_q_b == 1 )  THEN
+                constant_waterflux = .TRUE.
+                IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+                   surface_waterflux = qsws_surf(1)
+                ENDIF
+             ENDIF
+          ENDIF
        ELSE
-           constant_waterflux     = .TRUE.
-           IF ( TRIM( initializing_actions ) /= 'read_restart_data' .AND. &
-               large_scale_forcing ) THEN 
-              surface_waterflux      = qsws_surf(1)
-           ENDIF
+          constant_waterflux = .TRUE.
+          IF ( TRIM( initializing_actions ) /= 'read_restart_data' .AND. &
+                 large_scale_forcing ) THEN
+             surface_waterflux = qsws_surf(1)
+          ENDIF
        ENDIF
 
Index: palm/trunk/SOURCE/ls_forcing.f90
===================================================================
--- palm/trunk/SOURCE/ls_forcing.f90	(revision 1275)
+++ palm/trunk/SOURCE/ls_forcing.f90	(revision 1276)
@@ -238,7 +238,31 @@
        fac = ( time -time_surf(t) ) / ( time_surf(t+1) - time_surf(t) )
 
-       shf              = shf_surf(t) + fac * ( shf_surf(t+1) - shf_surf(t) )
-       qsws             = qsws_surf(t) + fac * ( qsws_surf(t+1) - qsws_surf(t) )
-       pt_surface       = pt_surf(t) + fac * ( pt_surf(t+1) - pt_surf(t) )
+       IF ( ibc_pt_b == 0 )  THEN
+!
+!--       In case of Dirichlet boundary condition shf must not 
+!--       be set - it is calculated via MOST in prandtl_fluxes
+          pt_surface = pt_surf(t) + fac * ( pt_surf(t+1) - pt_surf(t) )
+
+       ELSEIF ( ibc_pt_b == 1 )  THEN
+!
+!--       In case of Neumann boundary condition pt_surface is needed for 
+!--       calculation of reference density
+          shf        = shf_surf(t) + fac * ( shf_surf(t+1) - shf_surf(t) )
+          pt_surface = pt_surf(t) + fac * ( pt_surf(t+1) - pt_surf(t) )
+
+       ENDIF
+
+       IF ( ibc_q_b == 0 )  THEN
+!
+!--       In case of Dirichlet boundary condition qsws must not 
+!--       be set - it is calculated via MOST in prandtl_fluxes
+          q_surface = q_surf(t) + fac * ( q_surf(t+1) - q_surf(t) )
+
+       ELSEIF ( ibc_pt_b == 1 )  THEN
+
+          qsws = qsws_surf(t) + fac * ( qsws_surf(t+1) - qsws_surf(t) )
+
+       ENDIF
+
        surface_pressure = p_surf(t) + fac * ( p_surf(t+1) - p_surf(t) )
 
Index: palm/trunk/SOURCE/prandtl_fluxes.f90
===================================================================
--- palm/trunk/SOURCE/prandtl_fluxes.f90	(revision 1275)
+++ palm/trunk/SOURCE/prandtl_fluxes.f90	(revision 1276)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-!
+! Use LSF_DATA also in case of Dirichlet bottom boundary condition for scalars
 !
 ! Former revisions:
@@ -120,4 +120,9 @@
 !--    For a given surface temperature:
 !--    (the Richardson number is still the one from the previous time step)
+   
+       IF ( large_scale_forcing .AND. lsf_surf )  THEN
+          pt(0,:,:) = pt_surface
+       ENDIF
+
        !$OMP PARALLEL DO PRIVATE( a, b, k, z_p )
        !$acc kernels loop
@@ -334,4 +339,9 @@
        ELSE
           coupled_run = ( coupling_mode == 'atmosphere_to_ocean' .AND. run_coupled )
+
+           IF ( large_scale_forcing .AND. lsf_surf )  THEN
+              q(0,:,:) = q_surface
+           ENDIF
+
           !$OMP PARALLEL DO PRIVATE( a, b, k, z_p )
           !$acc kernels loop independent
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 1275)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 1276)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-!
+! Use LSF_DATA also in case of Dirichlet bottom boundary condition for scalars
 !
 ! Former revisions:
@@ -574,4 +574,14 @@
 
 !
+!--          Determine surface fluxes shf and qsws and surface values 
+!--          pt_surface and q_surface in dependence on data from external 
+!--          file LSF_DATA respectively
+             IF ( ( large_scale_forcing .AND. lsf_surf ) .AND. &
+                 intermediate_timestep_count == intermediate_timestep_count_max )&
+             THEN
+                CALL ls_forcing_surf ( simulated_time )
+             ENDIF
+
+!
 !--          First the vertical fluxes in the Prandtl layer are being computed
              IF ( prandtl_layer )  THEN
@@ -579,13 +589,4 @@
                 CALL prandtl_fluxes
                 CALL cpu_log( log_point(19), 'prandtl_fluxes', 'stop' )
-             ENDIF
-
-!
-!--          Determine shf and qsws in dependence on data from external file 
-!--          LSF_DATA
-             IF ( ( large_scale_forcing .AND. lsf_surf ) .AND. &
-                 intermediate_timestep_count == intermediate_timestep_count_max )&
-             THEN
-                CALL ls_forcing_surf ( simulated_time )
              ENDIF
 
