Index: palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
===================================================================
--- palm/trunk/SOURCE/surface_layer_fluxes_mod.f90	(revision 2281)
+++ palm/trunk/SOURCE/surface_layer_fluxes_mod.f90	(revision 2292)
@@ -25,4 +25,9 @@
 ! -----------------
 ! $Id$
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2281 2017-06-13 11:34:50Z suehring
 ! Clean-up unnecessary index access to surface type
 ! 
@@ -178,6 +183,6 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  e, kh, nr, pt, q, ql, qr, s, u, v, vpt, w, zu, zw, drho_air_zw, &
-               rho_air_zw
+        ONLY:  e, kh, nc, nr, pt, q, ql, qc, qr, s, u, v, vpt, w, zu, zw,      &
+               drho_air_zw, rho_air_zw
 
     USE cloud_parameters,                                                      &
@@ -195,7 +200,7 @@
                intermediate_timestep_count, intermediate_timestep_count_max,   &
                land_surface, large_scale_forcing, lsf_surf,                    &
-               message_string, microphysics_seifert, most_method, neutral,     &
-               passive_scalar, pt_surface, q_surface, run_coupled,             &
-               surface_pressure, simulated_time, terminate_run,                &
+               message_string, microphysics_morrison, microphysics_seifert,    &
+               most_method, neutral, passive_scalar, pt_surface, q_surface,    &
+               run_coupled, surface_pressure, simulated_time, terminate_run,   &
                urban_surface, zeta_max, zeta_min
 
@@ -1526,5 +1531,5 @@
 
 !
-!-- Calculate the other MOST scaling parameters theta*, q*, (qr*, nr*)
+!-- Calculate the other MOST scaling parameters theta*, q*, (qc*, qr*, nc*, nr*)
     SUBROUTINE calc_scaling_parameters
 
@@ -1749,4 +1754,29 @@
        ENDIF
 
+!
+!--    If required compute qc* and nc*
+       IF ( cloud_physics  .AND.  microphysics_morrison  .AND.                 &
+            .NOT. surf_vertical )  THEN
+          !$OMP PARALLEL DO PRIVATE( i, j, k, z_mo )
+          DO  m = 1, surf%ns    
+
+             i    = surf%i(m)            
+             j    = surf%j(m)
+             k    = surf%k(m)
+
+             z_mo = surf%z_mo(m)
+
+             surf%qcs(m) = kappa * ( qc(k,j,i) - qc(k-1,j,i) )                 &
+                                 / ( LOG( z_mo / surf%z0q(m) )                 &
+                                 - psi_h( z_mo / surf%ol(m) )                  &
+                                 + psi_h( surf%z0q(m) / surf%ol(m) ) )
+
+             surf%ncs(m) = kappa * ( nc(k,j,i) - nc(k-1,j,i) )                 &
+                                 / ( LOG( z_mo / surf%z0q(m) )                 &
+                                 - psi_h( z_mo / surf%ol(m) )                  &
+                                 + psi_h( surf%z0q(m) / surf%ol(m) ) )
+          ENDDO
+
+       ENDIF
 
 !
@@ -1781,5 +1811,5 @@
 
 !
-!-- Calculate surface fluxes usws, vsws, shf, qsws, (qrsws, nrsws)
+!-- Calculate surface fluxes usws, vsws, shf, qsws, (qcsws, qrsws, ncsws, nrsws)
     SUBROUTINE calc_surface_fluxes
 
@@ -1927,8 +1957,22 @@
 
              ENDDO
-          ENDIF       
+          ENDIF   
+!
+!--       Compute (turbulent) fluxes of cloud water content and cloud drop conc.
+          IF ( cloud_physics  .AND.  microphysics_morrison  .AND.              &
+               .NOT. downward)  THEN
+             !$OMP PARALLEL DO PRIVATE( i, j )
+             DO  m = 1, surf%ns   
+
+                i    = surf%i(m)            
+                j    = surf%j(m)
+
+                surf%qcsws(m) = -surf%qcs(m) * surf%us(m)
+                surf%ncsws(m) = -surf%ncs(m) * surf%us(m)
+             ENDDO
+          ENDIF    
 !
 !--       Compute (turbulent) fluxes of rain water content and rain drop conc.
-          IF ( cloud_physics  .AND.  microphysics_seifert  .AND.              &
+          IF ( cloud_physics  .AND.  microphysics_seifert  .AND.               &
                .NOT. downward)  THEN
              !$OMP PARALLEL DO PRIVATE( i, j )
