Index: /palm/trunk/SOURCE/Makefile
===================================================================
--- /palm/trunk/SOURCE/Makefile	(revision 3873)
+++ /palm/trunk/SOURCE/Makefile	(revision 3874)
@@ -1510,5 +1510,4 @@
 	advec_ws.o \
 	advec_w_up.o \
-	bulk_cloud_model_mod.o \
 	buoyancy.o \
 	chemistry_model_mod.o \
Index: /palm/trunk/SOURCE/bulk_cloud_model_mod.f90
===================================================================
--- /palm/trunk/SOURCE/bulk_cloud_model_mod.f90	(revision 3873)
+++ /palm/trunk/SOURCE/bulk_cloud_model_mod.f90	(revision 3874)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Implemented non_transport_physics module interfaces
+! 
+! 3870 2019-04-08 13:44:34Z knoop
 ! Moving prognostic equations of bcm into bulk_cloud_model_mod
 ! 
@@ -360,5 +363,5 @@
            bcm_header, &
            bcm_actions, &
-           bcm_actions_micro, &
+           bcm_non_transport_physics, &
            bcm_prognostic_equations, &
            bcm_3d_data_averaging, &
@@ -420,8 +423,8 @@
     END INTERFACE bcm_actions
 
-    INTERFACE bcm_actions_micro
-       MODULE PROCEDURE bcm_actions_micro
-       MODULE PROCEDURE bcm_actions_micro_ij
-    END INTERFACE bcm_actions_micro
+    INTERFACE bcm_non_transport_physics
+       MODULE PROCEDURE bcm_non_transport_physics
+       MODULE PROCEDURE bcm_non_transport_physics_ij
+    END INTERFACE bcm_non_transport_physics
 
     INTERFACE bcm_prognostic_equations
@@ -1174,56 +1177,66 @@
 !> Control of microphysics for all grid points
 !------------------------------------------------------------------------------!
-    SUBROUTINE bcm_actions_micro
-
-       IMPLICIT NONE
-
-       IF ( large_scale_forcing  .AND.  lsf_surf ) THEN
-!
-!--       Calculate vertical profile of the hydrostatic pressure (hyp)
-          hyp    = barometric_formula(zu, pt_surface * exner_function(surface_pressure * 100.0_wp), surface_pressure * 100.0_wp)
-          d_exner = exner_function_invers(hyp)
-          exner = 1.0_wp / exner_function_invers(hyp)
-          hyrho  = ideal_gas_law_rho_pt(hyp, pt_init)
-!
-!--       Compute reference density
-          rho_surface = ideal_gas_law_rho(surface_pressure * 100.0_wp, pt_surface * exner_function(surface_pressure * 100.0_wp))
+    SUBROUTINE bcm_non_transport_physics
+
+
+       CALL cpu_log( log_point(51), 'microphysics', 'start' )
+
+       IF ( .NOT. microphysics_sat_adjust  .AND.         &
+            ( intermediate_timestep_count == 1  .OR.                              &
+              call_microphysics_at_all_substeps ) )                               &
+       THEN
+
+          IF ( large_scale_forcing  .AND.  lsf_surf ) THEN
+!
+!--          Calculate vertical profile of the hydrostatic pressure (hyp)
+             hyp    = barometric_formula(zu, pt_surface * exner_function(surface_pressure * 100.0_wp), surface_pressure * 100.0_wp)
+             d_exner = exner_function_invers(hyp)
+             exner = 1.0_wp / exner_function_invers(hyp)
+             hyrho  = ideal_gas_law_rho_pt(hyp, pt_init)
+!
+!--          Compute reference density
+             rho_surface = ideal_gas_law_rho(surface_pressure * 100.0_wp, pt_surface * exner_function(surface_pressure * 100.0_wp))
+          ENDIF
+
+!
+!--       Compute length of time step
+          IF ( call_microphysics_at_all_substeps )  THEN
+             dt_micro = dt_3d * weight_pres(intermediate_timestep_count)
+          ELSE
+             dt_micro = dt_3d
+          ENDIF
+
+!
+!--       Reset precipitation rate
+          IF ( intermediate_timestep_count == 1 )  prr = 0.0_wp
+
+!
+!--       Compute cloud physics
+          IF ( microphysics_kessler )  THEN
+
+             CALL autoconversion_kessler
+             IF ( cloud_water_sedimentation )  CALL sedimentation_cloud
+
+          ELSEIF ( microphysics_seifert )  THEN
+
+             CALL adjust_cloud
+             IF ( microphysics_morrison )  CALL activation
+             IF ( microphysics_morrison )  CALL condensation
+             CALL autoconversion
+             CALL accretion
+             CALL selfcollection_breakup
+             CALL evaporation_rain
+             CALL sedimentation_rain
+             IF ( cloud_water_sedimentation )  CALL sedimentation_cloud
+
+          ENDIF
+
+          CALL calc_precipitation_amount
+
        ENDIF
 
-!
-!--    Compute length of time step
-       IF ( call_microphysics_at_all_substeps )  THEN
-          dt_micro = dt_3d * weight_pres(intermediate_timestep_count)
-       ELSE
-          dt_micro = dt_3d
-       ENDIF
-
-!
-!--    Reset precipitation rate
-       IF ( intermediate_timestep_count == 1 )  prr = 0.0_wp
-
-!
-!--    Compute cloud physics
-       IF ( microphysics_kessler )  THEN
-
-          CALL autoconversion_kessler
-          IF ( cloud_water_sedimentation )  CALL sedimentation_cloud
-
-       ELSEIF ( microphysics_seifert )  THEN
-
-          CALL adjust_cloud
-          IF ( microphysics_morrison )  CALL activation
-          IF ( microphysics_morrison )  CALL condensation
-          CALL autoconversion
-          CALL accretion
-          CALL selfcollection_breakup
-          CALL evaporation_rain
-          CALL sedimentation_rain
-          IF ( cloud_water_sedimentation )  CALL sedimentation_cloud
-
-       ENDIF
-
-       CALL calc_precipitation_amount
-
-    END SUBROUTINE bcm_actions_micro
+       CALL cpu_log( log_point(51), 'microphysics', 'stop' )
+
+    END SUBROUTINE bcm_non_transport_physics
 
 
@@ -1234,58 +1247,64 @@
 !------------------------------------------------------------------------------!
 
-    SUBROUTINE bcm_actions_micro_ij( i, j )
-
-       IMPLICIT NONE
+    SUBROUTINE bcm_non_transport_physics_ij( i, j )
+
 
        INTEGER(iwp) ::  i                 !<
        INTEGER(iwp) ::  j                 !<
 
-       IF ( large_scale_forcing  .AND.  lsf_surf ) THEN
-!
-!--       Calculate vertical profile of the hydrostatic pressure (hyp)
-          hyp    = barometric_formula(zu, pt_surface * exner_function(surface_pressure * 100.0_wp), surface_pressure * 100.0_wp)
-          d_exner = exner_function_invers(hyp)
-          exner = 1.0_wp / exner_function_invers(hyp)
-          hyrho  = ideal_gas_law_rho_pt(hyp, pt_init)
-!
-!--       Compute reference density
-          rho_surface = ideal_gas_law_rho(surface_pressure * 100.0_wp, pt_surface * exner_function(surface_pressure * 100.0_wp))
+       IF ( .NOT. microphysics_sat_adjust  .AND.         &
+            ( intermediate_timestep_count == 1  .OR.                              &
+              call_microphysics_at_all_substeps ) )                               &
+       THEN
+
+          IF ( large_scale_forcing  .AND.  lsf_surf ) THEN
+!
+!--          Calculate vertical profile of the hydrostatic pressure (hyp)
+             hyp    = barometric_formula(zu, pt_surface * exner_function(surface_pressure * 100.0_wp), surface_pressure * 100.0_wp)
+             d_exner = exner_function_invers(hyp)
+             exner = 1.0_wp / exner_function_invers(hyp)
+             hyrho  = ideal_gas_law_rho_pt(hyp, pt_init)
+!
+!--          Compute reference density
+             rho_surface = ideal_gas_law_rho(surface_pressure * 100.0_wp, pt_surface * exner_function(surface_pressure * 100.0_wp))
+          ENDIF
+
+!
+!--       Compute length of time step
+          IF ( call_microphysics_at_all_substeps )  THEN
+             dt_micro = dt_3d * weight_pres(intermediate_timestep_count)
+          ELSE
+             dt_micro = dt_3d
+          ENDIF
+!
+!--       Reset precipitation rate
+          IF ( intermediate_timestep_count == 1 )  prr(:,j,i) = 0.0_wp
+
+!
+!--       Compute cloud physics
+          IF( microphysics_kessler )  THEN
+
+             CALL autoconversion_kessler_ij( i,j )
+             IF ( cloud_water_sedimentation )  CALL sedimentation_cloud_ij( i,j )
+
+          ELSEIF ( microphysics_seifert )  THEN
+
+             CALL adjust_cloud_ij( i,j )
+             IF ( microphysics_morrison ) CALL activation_ij( i,j )
+             IF ( microphysics_morrison ) CALL condensation_ij( i,j )
+             CALL autoconversion_ij( i,j )
+             CALL accretion_ij( i,j )
+             CALL selfcollection_breakup_ij( i,j )
+             CALL evaporation_rain_ij( i,j )
+             CALL sedimentation_rain_ij( i,j )
+             IF ( cloud_water_sedimentation )  CALL sedimentation_cloud_ij( i,j )
+
+          ENDIF
+
+          CALL calc_precipitation_amount_ij( i,j )
+
        ENDIF
 
-!
-!--    Compute length of time step
-       IF ( call_microphysics_at_all_substeps )  THEN
-          dt_micro = dt_3d * weight_pres(intermediate_timestep_count)
-       ELSE
-          dt_micro = dt_3d
-       ENDIF
-!
-!--    Reset precipitation rate
-       IF ( intermediate_timestep_count == 1 )  prr(:,j,i) = 0.0_wp
-
-!
-!--    Compute cloud physics
-       IF( microphysics_kessler )  THEN
-
-          CALL autoconversion_kessler_ij( i,j )
-          IF ( cloud_water_sedimentation )  CALL sedimentation_cloud_ij( i,j )
-
-       ELSEIF ( microphysics_seifert )  THEN
-
-          CALL adjust_cloud_ij( i,j )
-          IF ( microphysics_morrison ) CALL activation_ij( i,j )
-          IF ( microphysics_morrison ) CALL condensation_ij( i,j )
-          CALL autoconversion_ij( i,j )
-          CALL accretion_ij( i,j )
-          CALL selfcollection_breakup_ij( i,j )
-          CALL evaporation_rain_ij( i,j )
-          CALL sedimentation_rain_ij( i,j )
-          IF ( cloud_water_sedimentation )  CALL sedimentation_cloud_ij( i,j )
-
-       ENDIF
-
-       CALL calc_precipitation_amount_ij( i,j )
-
-    END SUBROUTINE bcm_actions_micro_ij
+    END SUBROUTINE bcm_non_transport_physics_ij
 
 
Index: /palm/trunk/SOURCE/module_interface.f90
===================================================================
--- /palm/trunk/SOURCE/module_interface.f90	(revision 3873)
+++ /palm/trunk/SOURCE/module_interface.f90	(revision 3874)
@@ -147,4 +147,5 @@
                bcm_header,                                                     &
                bcm_actions,                                                    &
+               bcm_non_transport_physics,                                      &
                bcm_prognostic_equations,                                       &
                bcm_swap_timelevel,                                             &
@@ -382,4 +383,5 @@
        module_interface_header,                                                &
        module_interface_actions,                                               &
+       module_interface_non_transport_physics,                                 &
        module_interface_prognostic_equations,                                  &
        module_interface_swap_timelevel,                                        &
@@ -443,4 +445,9 @@
        MODULE PROCEDURE module_interface_actions_ij
     END INTERFACE module_interface_actions
+
+    INTERFACE module_interface_non_transport_physics
+       MODULE PROCEDURE module_interface_non_transport_physics
+       MODULE PROCEDURE module_interface_non_transport_physics_ij
+    END INTERFACE module_interface_non_transport_physics
 
     INTERFACE module_interface_prognostic_equations
@@ -872,5 +879,5 @@
 ! Description:
 ! ------------
-!> Perform module-specific actions while in time-integration (cache-optimized)
+!> Perform module-specific actions while in time-integration (vector-optimized)
 !------------------------------------------------------------------------------!
  SUBROUTINE module_interface_actions( location )
@@ -893,5 +900,5 @@
 ! Description:
 ! ------------
-!> Perform module-specific actions while in time-integration (vector-optimized)
+!> Perform module-specific actions while in time-integration (cache-optimized)
 !------------------------------------------------------------------------------!
  SUBROUTINE module_interface_actions_ij( i, j, location )
@@ -916,5 +923,37 @@
 ! Description:
 ! ------------
+!> Compute module-specific prognostic_equations (vector-optimized)
+!------------------------------------------------------------------------------!
+ SUBROUTINE module_interface_non_transport_physics()
+
+
+    IF ( bulk_cloud_model    )  CALL bcm_non_transport_physics()
+
+
+ END SUBROUTINE module_interface_non_transport_physics
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
 !> Compute module-specific prognostic_equations (cache-optimized)
+!------------------------------------------------------------------------------!
+ SUBROUTINE module_interface_non_transport_physics_ij( i, j )
+
+
+    INTEGER(iwp), INTENT(IN) ::  i            !< grid index in x-direction
+    INTEGER(iwp), INTENT(IN) ::  j            !< grid index in y-direction
+
+
+    IF ( bulk_cloud_model    )  CALL bcm_non_transport_physics( i, j )
+
+
+ END SUBROUTINE module_interface_non_transport_physics_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute module-specific prognostic_equations (vector-optimized)
 !------------------------------------------------------------------------------!
  SUBROUTINE module_interface_prognostic_equations()
@@ -933,5 +972,5 @@
 ! Description:
 ! ------------
-!> Compute module-specific prognostic_equations (vector-optimized)
+!> Compute module-specific prognostic_equations (cache-optimized)
 !------------------------------------------------------------------------------!
  SUBROUTINE module_interface_prognostic_equations_ij( i, j, i_omp_start, tn )
Index: /palm/trunk/SOURCE/prognostic_equations.f90
===================================================================
--- /palm/trunk/SOURCE/prognostic_equations.f90	(revision 3873)
+++ /palm/trunk/SOURCE/prognostic_equations.f90	(revision 3874)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Added non_transport_physics module interfaces and moved bcm code into it
+! 
+! 3872 2019-04-08 15:03:06Z knoop
 ! Moving prognostic equations of bcm into bulk_cloud_model_mod
 ! 
@@ -378,8 +381,4 @@
                ug, u_init, u_p, v, vg, vpt, v_init, v_p, w, w_p
 
-    USE bulk_cloud_model_mod,                                                  &
-        ONLY:  call_microphysics_at_all_substeps, bulk_cloud_model,            &
-               bcm_actions_micro, microphysics_sat_adjust
-
     USE buoyancy_mod,                                                          &
         ONLY:  buoyancy
@@ -441,4 +440,5 @@
     USE module_interface,                                                      &
         ONLY:  module_interface_actions, &
+               module_interface_non_transport_physics, &
                module_interface_prognostic_equations
 
@@ -478,4 +478,5 @@
         ONLY:  wtm_tendencies
 
+    IMPLICIT NONE
 
     PRIVATE
@@ -510,6 +511,4 @@
 
 
-    IMPLICIT NONE
-
     INTEGER(iwp) ::  i                   !<
     INTEGER(iwp) ::  i_omp_start         !<
@@ -649,21 +648,16 @@
        ENDIF
 
-    ENDIF 
-
-!
-!-- If required, calculate cloud microphysics
-    IF ( bulk_cloud_model  .AND.  .NOT. microphysics_sat_adjust  .AND.         &
-         ( intermediate_timestep_count == 1  .OR.                              &
-           call_microphysics_at_all_substeps ) )                               &
-    THEN
-       !$OMP PARALLEL PRIVATE (i,j)
-       !$OMP DO
-       DO  i = nxlg, nxrg
-          DO  j = nysg, nyng
-             CALL bcm_actions_micro( i, j )
-           ENDDO
+    ENDIF
+
+    !$OMP PARALLEL PRIVATE (i,j)
+    !$OMP DO
+    DO  i = nxlg, nxrg
+       DO  j = nysg, nyng
+!
+!--       Calculate non transport physics for all other modules
+          CALL module_interface_non_transport_physics( i, j )
        ENDDO
-       !$OMP END PARALLEL
-    ENDIF
+    ENDDO
+    !$OMP END PARALLEL
 
 !
@@ -1238,6 +1232,4 @@
 
 
-    IMPLICIT NONE
-
     INTEGER(iwp) ::  i     !<
     INTEGER(iwp) ::  ib    !< index for aerosol size bins (salsa)
@@ -1299,16 +1291,9 @@
           ENDIF
        ENDIF
-    ENDIF 
-
-!
-!-- If required, calculate cloud microphysical impacts
-    IF ( bulk_cloud_model  .AND.  .NOT. microphysics_sat_adjust  .AND.         &
-         ( intermediate_timestep_count == 1  .OR.                              &
-           call_microphysics_at_all_substeps )                                 &
-       )  THEN
-       CALL cpu_log( log_point(51), 'microphysics', 'start' )
-       CALL bcm_actions_micro
-       CALL cpu_log( log_point(51), 'microphysics', 'stop' )
     ENDIF
+
+!
+!-- Calculate non transport physics for all other modules
+    CALL module_interface_non_transport_physics
 
 !
