Index: palm/trunk/SOURCE/ocean_mod.f90
===================================================================
--- palm/trunk/SOURCE/ocean_mod.f90	(revision 3873)
+++ palm/trunk/SOURCE/ocean_mod.f90	(revision 4109)
@@ -20,5 +20,6 @@
 ! Current revisions:
 ! -----------------
-! 
+! Pass integer flag array as well as boundary flags to WS scalar advection 
+! routine
 ! 
 ! Former revisions:
@@ -1582,5 +1583,13 @@
 
     USE control_parameters,                                                    &
-        ONLY:  dt_3d, intermediate_timestep_count,                             &
+        ONLY:  bc_dirichlet_l,                                                 &
+               bc_dirichlet_n,                                                 &
+               bc_dirichlet_r,                                                 &
+               bc_dirichlet_s,                                                 &
+               bc_radiation_l,                                                 &
+               bc_radiation_n,                                                 &
+               bc_radiation_r,                                                 &
+               bc_radiation_s,                                                 &
+               dt_3d, intermediate_timestep_count,                             &
                intermediate_timestep_count_max, scalar_advec, simulated_time,  &
                timestep_scheme, tsc, ws_scheme_sca
@@ -1593,5 +1602,5 @@
 
     USE indices,                                                               &
-        ONLY:  nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0
+        ONLY:  advc_flags_s, nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0
 
     USE surface_mod,                                                           &
@@ -1647,5 +1656,9 @@
           IF ( timestep_scheme(1:5) == 'runge' )  THEN
              IF ( ws_scheme_sca )  THEN
-                CALL advec_s_ws( sa, 'sa' )
+                CALL advec_s_ws( advc_flags_s, sa, 'sa',                       &
+                                 bc_dirichlet_l  .OR.  bc_radiation_l,         &
+                                 bc_dirichlet_n  .OR.  bc_radiation_n,         &
+                                 bc_dirichlet_r  .OR.  bc_radiation_r,         &
+                                 bc_dirichlet_s  .OR.  bc_radiation_s )
              ELSE
                 CALL advec_s_pw( sa )
@@ -1745,5 +1758,13 @@
 
     USE control_parameters,                                                    &
-        ONLY:  dt_3d, intermediate_timestep_count,                             &
+        ONLY:  bc_dirichlet_l,                                                 &
+               bc_dirichlet_n,                                                 &
+               bc_dirichlet_r,                                                 &
+               bc_dirichlet_s,                                                 &
+               bc_radiation_l,                                                 &
+               bc_radiation_n,                                                 &
+               bc_radiation_r,                                                 &
+               bc_radiation_s,                                                 &
+               dt_3d, intermediate_timestep_count,                             &
                intermediate_timestep_count_max, simulated_time,                &
                timestep_scheme, tsc, ws_scheme_sca
@@ -1753,5 +1774,5 @@
 
     USE indices,                                                               &
-        ONLY:  nzb, nzt, wall_flags_0
+        ONLY:  advc_flags_s, nzb, nzt, wall_flags_0
 
     USE surface_mod,                                                           &
@@ -1790,6 +1811,11 @@
        THEN
           IF ( ws_scheme_sca )  THEN
-             CALL advec_s_ws( i, j, sa, 'sa', flux_s_sa,  diss_s_sa, flux_l_sa,&
-                              diss_l_sa, i_omp_start, tn  )
+             CALL advec_s_ws( advc_flags_s,                                    &
+                              i, j, sa, 'sa', flux_s_sa,  diss_s_sa, flux_l_sa,&
+                              diss_l_sa, i_omp_start, tn,                      &
+                              bc_dirichlet_l  .OR.  bc_radiation_l,            &
+                              bc_dirichlet_n  .OR.  bc_radiation_n,            &
+                              bc_dirichlet_r  .OR.  bc_radiation_r,            &
+                              bc_dirichlet_s  .OR.  bc_radiation_s )
           ELSE
              CALL advec_s_pw( i, j, sa )
