Index: palm/trunk/SOURCE/pmc_interface_mod.f90
===================================================================
--- palm/trunk/SOURCE/pmc_interface_mod.f90	(revision 3241)
+++ palm/trunk/SOURCE/pmc_interface_mod.f90	(revision 3274)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
 ! unused variables removed
 ! 
@@ -326,8 +329,7 @@
     USE control_parameters,                                                    &
         ONLY:  air_chemistry, bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,  &
-               bc_dirichlet_s, cloud_physics, child_domain,                    &
+               bc_dirichlet_s, child_domain,                                   &
                constant_diffusion, constant_flux_layer,                        &
                coupling_char, dt_3d, dz, humidity, message_string,             &
-               microphysics_morrison, microphysics_seifert,                    &
                neutral, passive_scalar, rans_mode, rans_tke_e,                 &
                roughness_length, simulated_time, topography, volume_flow
@@ -348,4 +350,7 @@
         ONLY:  nbgp, nx, nxl, nxlg, nxlu, nxr, nxrg, ny, nyn, nyng, nys, nysg, &
                nysv, nz, nzb, nzt, wall_flags_0
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY: bulk_cloud_model, microphysics_morrison, microphysics_seifert
 
     USE particle_attributes,                                                   &
@@ -1269,10 +1274,10 @@
           CALL pmc_set_dataarray_name( 'coarse', 'q'  ,'fine', 'q',  ierr )
 
-          IF ( cloud_physics  .AND.  microphysics_morrison )  THEN
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
             CALL pmc_set_dataarray_name( 'coarse', 'qc'  ,'fine', 'qc',  ierr )  
             CALL pmc_set_dataarray_name( 'coarse', 'nc'  ,'fine', 'nc',  ierr ) 
           ENDIF
 
-          IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
              CALL pmc_set_dataarray_name( 'coarse', 'qr'  ,'fine', 'qr',  ierr )
              CALL pmc_set_dataarray_name( 'coarse', 'nr'  ,'fine', 'nr',  ierr ) 
@@ -3842,5 +3847,5 @@
                                       r2yo, r1zo, r2zo, 's' )
 
-          IF ( cloud_physics  .AND.  microphysics_morrison )  THEN
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
              CALL pmci_interp_tril_all ( qc, qcc, ico, jco, kco, r1xo, r2xo,   &
                                           r1yo, r2yo, r1zo, r2zo, 's' ) 
@@ -3849,5 +3854,5 @@
           ENDIF
 
-          IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
              CALL pmci_interp_tril_all ( qr, qrc, ico, jco, kco, r1xo, r2xo,   &
                                          r1yo, r2yo, r1zo, r2zo, 's' )
@@ -4575,5 +4580,5 @@
                                           nzt_topo_nestbc_l, 'l', 's' )
 
-                IF ( cloud_physics  .AND.  microphysics_morrison )  THEN
+                IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
                    CALL pmci_interp_tril_lr( qc, qcc, ico, jco, kco, r1xo,     &
                                              r2xo, r1yo, r2yo, r1zo, r2zo,     &
@@ -4589,5 +4594,5 @@
                 ENDIF
 
-                IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
+                IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
                    CALL pmci_interp_tril_lr( qr, qrc, ico, jco, kco, r1xo,     &
                                              r2xo, r1yo, r2yo, r1zo, r2zo,     &
@@ -4683,5 +4688,5 @@
                                           nzt_topo_nestbc_r, 'r', 's' )
 
-                IF ( cloud_physics  .AND.  microphysics_morrison )  THEN
+                IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
 
                    CALL pmci_interp_tril_lr( qc, qcc, ico, jco, kco, r1xo,     &
@@ -4700,5 +4705,5 @@
                 ENDIF
 
-                IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
+                IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
 
      
@@ -4796,5 +4801,5 @@
                                           nzt_topo_nestbc_s, 's', 's' )
 
-                IF ( cloud_physics  .AND.  microphysics_morrison )  THEN
+                IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
 
                    CALL pmci_interp_tril_sn( qc, qcc, ico, jco, kco, r1xo,     &
@@ -4812,5 +4817,5 @@
                 ENDIF
 
-                IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
+                IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
 
                    CALL pmci_interp_tril_sn( qr, qrc, ico, jco, kco, r1xo,     &
@@ -4907,5 +4912,5 @@
                                           nzt_topo_nestbc_n, 'n', 's' )
 
-                IF ( cloud_physics  .AND.  microphysics_morrison )  THEN
+                IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
 
                    CALL pmci_interp_tril_sn( qc, qcc, ico, jco, kco, r1xo,     &
@@ -4923,5 +4928,5 @@
                 ENDIF
 
-                IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
+                IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
 
                    CALL pmci_interp_tril_sn( qr, qrc, ico, jco, kco, r1xo,     &
@@ -4994,5 +4999,5 @@
                                    r2yo, r1zo, r2zo, 's' )
 
-          IF ( cloud_physics  .AND.  microphysics_morrison )  THEN
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
 
              CALL pmci_interp_tril_t( qc, qcc, ico, jco, kco, r1xo, r2xo, r1yo,&
@@ -5004,5 +5009,5 @@
           ENDIF
 
-          IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
 
 
@@ -5078,5 +5083,5 @@
                                   kfuo, ijkfc_s, 'q' )
 
-         IF ( cloud_physics  .AND.  microphysics_morrison )  THEN
+         IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
 
             CALL pmci_anterp_tophat( qc, qcc, kctu, iflo, ifuo, jflo, jfuo,    &
@@ -5088,5 +5093,5 @@
          ENDIF
 
-         IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
+         IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
 
             CALL pmci_anterp_tophat( qr, qrc, kctu, iflo, ifuo, jflo, jfuo,    &
@@ -5902,5 +5907,5 @@
           ENDDO  
        ENDIF
-       IF ( cloud_physics  .AND.  microphysics_morrison )  THEN
+       IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
           DO  m = 1, bc_h(0)%ns
              i = bc_h(0)%i(m)            
@@ -5920,5 +5925,5 @@
        ENDIF
 
-       IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
+       IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
           DO  m = 1, bc_h(0)%ns
              i = bc_h(0)%i(m)            
