Index: palm/trunk/SOURCE/bulk_cloud_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/bulk_cloud_model_mod.f90	(revision 3870)
+++ 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
 
 
