Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 3241)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 3274)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id: check_parameters.f90 2520 2017-10-05 13:50:26Z gronemeier &
+! Modularization of all bulk cloud physics code components
+! 
+! 2520 2017-10-05 13:50:26Z gronemeier
 ! unused variables removed
 ! 
@@ -298,5 +301,5 @@
 !
 ! 1994 2016-08-15 09:52:21Z suehring
-! Add missing check for cloud_physics and cloud_droplets
+! Add missing check for bulk_cloud_model and cloud_droplets
 !
 ! 1992 2016-08-12 15:14:59Z suehring
@@ -665,10 +668,14 @@
 
     USE arrays_3d
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model, bcm_check_parameters, bcm_check_data_output,  &
+               bcm_check_data_output_pr
+
     USE chemistry_model_mod,                                                   &
         ONLY:  chem_boundary_conds, chem_check_data_output,                    &
-               chem_check_data_output_pr, chem_species                 
+               chem_check_data_output_pr, chem_species
     USE chem_modules
-    USE cloud_parameters
-    USE constants
+    USE basic_constants_and_equations_mod
     USE control_parameters
     USE dvrp_variables
@@ -1058,6 +1065,6 @@
           WRITE( action, '(A)' )  'galilei_transformation = .TRUE.'
        ENDIF
-       IF ( cloud_physics )  THEN
-          WRITE( action, '(A)' )  'cloud_physics = .TRUE.'
+       IF ( bulk_cloud_model )  THEN
+          WRITE( action, '(A)' )  'bulk_cloud_model = .TRUE.'
        ENDIF
        IF ( cloud_droplets )  THEN
@@ -1186,52 +1193,4 @@
 
     ENDIF
-!
-!-- Check cloud scheme
-    IF ( cloud_scheme == 'saturation_adjust' )  THEN
-       microphysics_sat_adjust = .TRUE.
-       microphysics_seifert    = .FALSE.
-       microphysics_kessler    = .FALSE.
-       precipitation           = .FALSE.
-    ELSEIF ( cloud_scheme == 'seifert_beheng' )  THEN
-       microphysics_sat_adjust = .FALSE.
-       microphysics_seifert    = .TRUE.
-       microphysics_kessler    = .FALSE.
-       microphysics_morrison  = .FALSE.
-       precipitation           = .TRUE.
-    ELSEIF ( cloud_scheme == 'kessler' )  THEN
-       microphysics_sat_adjust = .FALSE.
-       microphysics_seifert    = .FALSE.
-       microphysics_kessler    = .TRUE.
-       microphysics_morrison   = .FALSE.
-       precipitation           = .TRUE.
-    ELSEIF ( cloud_scheme == 'morrison' )  THEN
-       microphysics_sat_adjust = .FALSE.
-       microphysics_seifert    = .TRUE.
-       microphysics_kessler    = .FALSE.
-       microphysics_morrison   = .TRUE.
-       precipitation           = .TRUE.
-    ELSE
-       message_string = 'unknown cloud microphysics scheme cloud_scheme ="' // &
-                        TRIM( cloud_scheme ) // '"'
-       CALL message( 'check_parameters', 'PA0357', 1, 2, 0, 6, 0 )
-    ENDIF
-!
-!-- Check aerosol
-    IF ( aerosol_bulk == 'nacl' )  THEN
-       aerosol_nacl   = .TRUE.
-       aerosol_c3h4o4 = .FALSE.
-       aerosol_nh4no3 = .FALSE.
-    ELSEIF ( aerosol_bulk == 'c3h4o4' )  THEN
-       aerosol_nacl   = .FALSE.
-       aerosol_c3h4o4 = .TRUE.
-       aerosol_nh4no3 = .FALSE.
-    ELSEIF ( aerosol_bulk == 'nh4no3' )  THEN
-       aerosol_nacl   = .FALSE.
-       aerosol_c3h4o4 = .FALSE.
-       aerosol_nh4no3 = .TRUE.
-    ELSE
-       message_string = 'unknown aerosol = "' // TRIM( aerosol_bulk ) // '"'
-       CALL message( 'check_parameters', 'PA0469', 1, 2, 0, 6, 0 )
-    ENDIF
 
 !
@@ -1352,6 +1311,6 @@
 !
 !-- Check for proper settings for microphysics
-    IF ( cloud_physics  .AND.  cloud_droplets )  THEN
-       message_string = 'cloud_physics = .TRUE. is not allowed with ' //       &
+    IF ( bulk_cloud_model  .AND.  cloud_droplets )  THEN
+       message_string = 'bulk_cloud_model = .TRUE. is not allowed with ' //    &
                         'cloud_droplets = .TRUE.'
        CALL message( 'check_parameters', 'PA0442', 1, 2, 0, 6, 0 )
@@ -1458,7 +1417,7 @@
     ENDIF
 
-    IF ( cloud_physics  .AND.  .NOT.  humidity )  THEN
-       WRITE( message_string, * ) 'cloud_physics = ', cloud_physics, ' is ',   &
-              'not allowed with humidity = ', humidity
+    IF ( bulk_cloud_model  .AND.  .NOT.  humidity )  THEN
+       WRITE( message_string, * ) 'bulk_cloud_model = ', bulk_cloud_model,     &
+              ' is not allowed with humidity = ', humidity
        CALL message( 'check_parameters', 'PA0034', 1, 2, 0, 6, 0 )
     ENDIF
@@ -1483,4 +1442,7 @@
 !-- When land surface model is used, perform additional checks
     IF ( land_surface )  CALL lsm_check_parameters
+!
+!-- When microphysics module is used, perform additional checks
+    IF ( bulk_cloud_model )  CALL bcm_check_parameters
 
 !
@@ -2394,19 +2356,4 @@
 
 !
-!-- Set the default value for the integration interval of precipitation amount
-    IF ( microphysics_seifert  .OR.  microphysics_kessler )  THEN
-       IF ( precipitation_amount_interval == 9999999.9_wp )  THEN
-          precipitation_amount_interval = dt_do2d_xy
-       ELSE
-          IF ( precipitation_amount_interval > dt_do2d_xy )  THEN
-             WRITE( message_string, * )  'precipitation_amount_interval = ',   &
-                 precipitation_amount_interval, ' must not be larger than ',   &
-                 'dt_do2d_xy = ', dt_do2d_xy
-             CALL message( 'check_parameters', 'PA0090', 1, 2, 0, 6, 0 )
-          ENDIF
-       ENDIF
-    ENDIF
-
-!
 !-- Determine the number of output profiles and check whether they are
 !-- permissible
@@ -2447,5 +2394,5 @@
 
           CASE ( 'pt', '#pt' )
-             IF ( .NOT. cloud_physics ) THEN
+             IF ( .NOT. bulk_cloud_model ) THEN
                 dopr_index(i) = 4
                 dopr_unit(i)  = 'K'
@@ -2682,5 +2629,5 @@
 
           CASE ( 'qv', '#qv' )
-             IF ( .NOT. cloud_physics ) THEN
+             IF ( .NOT. bulk_cloud_model ) THEN
                 dopr_index(i) = 41
                 dopr_unit(i)  = 'kg/kg'
@@ -2705,8 +2652,8 @@
 
           CASE ( 'lpt', '#lpt' )
-             IF ( .NOT. cloud_physics ) THEN
+             IF ( .NOT. bulk_cloud_model ) THEN
                 message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_physics = .FALSE.'
+                                 'lemented for bulk_cloud_model = .FALSE.'
                 CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
              ELSE
@@ -2821,9 +2768,9 @@
 
           CASE ( 'w"qv"' )
-             IF ( humidity  .AND.  .NOT.  cloud_physics )  THEN
+             IF ( humidity  .AND.  .NOT.  bulk_cloud_model )  THEN
                 dopr_index(i) = 48
                 dopr_unit(i)  = TRIM ( waterflux_output_unit )
                 hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 )
-             ELSEIF ( humidity  .AND.  cloud_physics )  THEN
+             ELSEIF ( humidity  .AND.  bulk_cloud_model )  THEN
                 dopr_index(i) = 51
                 dopr_unit(i)  = TRIM ( waterflux_output_unit )
@@ -2832,16 +2779,15 @@
                 message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_physics = .FALSE. an'  // &
-                                 'd humidity = .FALSE.'
+                                 'lemented for bulk_cloud_model = .FALSE. ' // &
+                                 'and humidity = .FALSE.'
                 CALL message( 'check_parameters', 'PA0095', 1, 2, 0, 6, 0 )
              ENDIF
 
           CASE ( 'w*qv*' )
-             IF ( humidity  .AND.  .NOT. cloud_physics )                       &
-             THEN
+             IF ( humidity  .AND.  .NOT. bulk_cloud_model )  THEN
                 dopr_index(i) = 49
                 dopr_unit(i)  = TRIM ( waterflux_output_unit )
                 hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 )
-             ELSEIF( humidity .AND. cloud_physics ) THEN
+             ELSEIF( humidity .AND. bulk_cloud_model ) THEN
                 dopr_index(i) = 52
                 dopr_unit(i)  = TRIM ( waterflux_output_unit )
@@ -2850,15 +2796,15 @@
                 message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_physics = .FALSE. an'  // &
-                                 'd humidity = .FALSE.'
+                                 'lemented for bulk_cloud_model = .FALSE. ' // &
+                                 'and humidity = .FALSE.'
                 CALL message( 'check_parameters', 'PA0095', 1, 2, 0, 6, 0 )
              ENDIF
 
           CASE ( 'wqv' )
-             IF ( humidity  .AND.  .NOT.  cloud_physics )  THEN
+             IF ( humidity  .AND.  .NOT.  bulk_cloud_model )  THEN
                 dopr_index(i) = 50
                 dopr_unit(i)  = TRIM ( waterflux_output_unit )
                 hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 )
-             ELSEIF ( humidity  .AND.  cloud_physics )  THEN
+             ELSEIF ( humidity  .AND.  bulk_cloud_model )  THEN
                 dopr_index(i) = 53
                 dopr_unit(i)  = TRIM ( waterflux_output_unit )
@@ -2867,15 +2813,15 @@
                 message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_physics = .FALSE. an'  // &
-                                 'd humidity = .FALSE.'
+                                 'lemented for bulk_cloud_model = .FALSE. ' // &
+                                 'and humidity = .FALSE.'
                 CALL message( 'check_parameters', 'PA0095', 1, 2, 0, 6, 0 )
              ENDIF
 
           CASE ( 'ql' )
-             IF (  .NOT.  cloud_physics  .AND.  .NOT.  cloud_droplets )  THEN
+             IF (  .NOT.  bulk_cloud_model  .AND.  .NOT.  cloud_droplets )  THEN
                 message_string = 'data_output_pr = ' //                        &
                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_physics = .FALSE. and' // &
-                                 'cloud_droplets = .FALSE.'
+                                 'lemented for bulk_cloud_model = .FALSE. ' // &
+                                 'and cloud_droplets = .FALSE.'
                 CALL message( 'check_parameters', 'PA0096', 1, 2, 0, 6, 0 )
              ELSE
@@ -3034,84 +2980,4 @@
              hom(:,2,120,:) = SPREAD( zw, 2, statistic_regions+1 )
 
-          CASE ( 'nc' )
-             IF (  .NOT.  cloud_physics )  THEN
-                message_string = 'data_output_pr = ' //                        &
-                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_physics = .FALSE.'
-                CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
-             ELSEIF ( .NOT.  microphysics_morrison )  THEN
-                message_string = 'data_output_pr = ' //                        &
-                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_scheme /= morrison'
-                CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 )
-             ELSE
-                dopr_index(i) = 89
-                dopr_unit(i)  = '1/m3'
-                hom(:,2,89,:)  = SPREAD( zu, 2, statistic_regions+1 )
-             ENDIF
-
-          CASE ( 'nr' )
-             IF (  .NOT.  cloud_physics )  THEN
-                message_string = 'data_output_pr = ' //                        &
-                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_physics = .FALSE.'
-                CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
-             ELSEIF ( .NOT.  microphysics_seifert )  THEN
-                message_string = 'data_output_pr = ' //                        &
-                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_scheme /= seifert_beheng'
-                CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 )
-             ELSE
-                dopr_index(i) = 73
-                dopr_unit(i)  = '1/m3'
-                hom(:,2,73,:)  = SPREAD( zu, 2, statistic_regions+1 )
-             ENDIF
-
-          CASE ( 'qr' )
-             IF (  .NOT.  cloud_physics )  THEN
-                message_string = 'data_output_pr = ' //                        &
-                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_physics = .FALSE.'
-                CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
-             ELSEIF ( .NOT.  microphysics_seifert )  THEN
-                message_string = 'data_output_pr = ' //                        &
-                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_scheme /= seifert_beheng'
-                CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 )
-             ELSE
-                dopr_index(i) = 74
-                dopr_unit(i)  = 'kg/kg'
-                hom(:,2,74,:)  = SPREAD( zu, 2, statistic_regions+1 )
-             ENDIF
-
-          CASE ( 'qc' )
-             IF (  .NOT.  cloud_physics )  THEN
-                message_string = 'data_output_pr = ' //                        &
-                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_physics = .FALSE.'
-                CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
-             ELSE
-                dopr_index(i) = 75
-                dopr_unit(i)  = 'kg/kg'
-                hom(:,2,75,:)  = SPREAD( zu, 2, statistic_regions+1 )
-             ENDIF
-
-          CASE ( 'prr' )
-             IF (  .NOT.  cloud_physics )  THEN
-                message_string = 'data_output_pr = ' //                        &
-                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
-                                 'lemented for cloud_physics = .FALSE.'
-                CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
-             ELSEIF ( microphysics_sat_adjust )  THEN
-                message_string = 'data_output_pr = ' //                        &
-                                 TRIM( data_output_pr(i) ) // ' is not ava' // &
-                                 'ilable for cloud_scheme = saturation_adjust'
-                CALL message( 'check_parameters', 'PA0422', 1, 2, 0, 6, 0 )
-             ELSE
-                dopr_index(i) = 76
-                dopr_unit(i)  = 'kg/kg m/s'
-                hom(:,2,76,:)  = SPREAD( zu, 2, statistic_regions+1 )
-             ENDIF
-
           CASE ( 'ug' )
              dopr_index(i) = 78
@@ -3154,4 +3020,10 @@
              CALL lsm_check_data_output_pr( data_output_pr(i), i, unit,        &
                                             dopr_unit(i) )
+!
+!--          Block of microphysics module profile outputs
+             IF ( unit == 'illegal'  .AND.  bulk_cloud_model  )  THEN
+                   CALL bcm_check_data_output_pr(data_output_pr(i), i, unit,   &
+                                                 dopr_unit(i) )
+             ENDIF
 
              IF ( unit == 'illegal' )  THEN
@@ -3260,34 +3132,10 @@
 
           CASE ( 'lpt' )
-             IF (  .NOT.  cloud_physics )  THEN
+             IF (  .NOT.  bulk_cloud_model )  THEN
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                         'res cloud_physics = .TRUE.'
+                         'res bulk_cloud_model = .TRUE.'
                 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
              ENDIF
              unit = 'K'
-
-          CASE ( 'nc' )
-             IF (  .NOT.  cloud_physics )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                         'res cloud_physics = .TRUE.'
-                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
-             ELSEIF ( .NOT.  microphysics_morrison )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                         'res = morrison '
-                CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
-             ENDIF
-             unit = '1/m3'
-
-          CASE ( 'nr' )
-             IF (  .NOT.  cloud_physics )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                         'res cloud_physics = .TRUE.'
-                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
-             ELSEIF ( .NOT.  microphysics_seifert )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                         'res cloud_scheme = seifert_beheng'
-                CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
-             ENDIF
-             unit = '1/m3'
 
           CASE ( 'pc', 'pr' )
@@ -3301,16 +3149,4 @@
              IF ( TRIM( var ) == 'pr' )  unit = 'm'
 
-          CASE ( 'prr' )
-             IF (  .NOT.  cloud_physics )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                         'res cloud_physics = .TRUE.'
-                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
-             ELSEIF ( microphysics_sat_adjust )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" is ' //    &
-                         'not available for cloud_scheme = saturation_adjust'
-                CALL message( 'check_parameters', 'PA0423', 1, 2, 0, 6, 0 )
-             ENDIF
-             unit = 'kg/kg m/s'
-
           CASE ( 'q', 'vpt' )
              IF (  .NOT.  humidity )  THEN
@@ -3322,16 +3158,8 @@
              IF ( TRIM( var ) == 'vpt' )  unit = 'K'
 
-          CASE ( 'qc' )
-             IF (  .NOT.  cloud_physics )  THEN
+          CASE ( 'ql' )
+             IF ( .NOT.  ( bulk_cloud_model  .OR.  cloud_droplets ) )  THEN
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                         'res cloud_physics = .TRUE.'
-                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
-             ENDIF
-             unit = 'kg/kg'
-
-          CASE ( 'ql' )
-             IF ( .NOT.  ( cloud_physics  .OR.  cloud_droplets ) )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                         'res cloud_physics = .TRUE. or cloud_droplets = .TRUE.'
+                      'res bulk_cloud_model = .TRUE. or cloud_droplets = .TRUE.'
                 CALL message( 'check_parameters', 'PA0106', 1, 2, 0, 6, 0 )
              ENDIF
@@ -3348,20 +3176,8 @@
              IF ( TRIM( var ) == 'ql_vp' )  unit = 'none'
 
-          CASE ( 'qr' )
-             IF (  .NOT.  cloud_physics )  THEN
+          CASE ( 'qv' )
+             IF (  .NOT.  bulk_cloud_model )  THEN
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                         'res cloud_physics = .TRUE.'
-                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
-             ELSEIF ( .NOT.  microphysics_seifert ) THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                         'res cloud_scheme = seifert_beheng'
-                CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
-             ENDIF
-             unit = 'kg/kg'
-
-          CASE ( 'qv' )
-             IF (  .NOT.  cloud_physics )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                                 'res cloud_physics = .TRUE.'
+                                 'res bulk_cloud_model = .TRUE.'
                 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
              ENDIF
@@ -3400,5 +3216,5 @@
              CONTINUE
 
-          CASE ( 'ghf*', 'lwp*', 'ol*', 'pra*', 'prr*', 'qsws*', 'r_a*',       &
+          CASE ( 'ghf*', 'lwp*', 'ol*', 'qsws*', 'r_a*',                       &
                  'shf*', 'ssws*', 't*', 'tsurf*', 'u*', 'z0*', 'z0h*', 'z0q*' )
              IF ( k == 0  .OR.  data_output(i)(ilen-2:ilen) /= '_xy' )  THEN
@@ -3409,25 +3225,8 @@
              ENDIF
 
-             IF ( TRIM( var ) == 'lwp*'  .AND.  .NOT. cloud_physics )  THEN
+             IF ( TRIM( var ) == 'lwp*'  .AND.  .NOT. bulk_cloud_model )  THEN
                 message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                                 'res cloud_physics = .TRUE.'
+                                 'res bulk_cloud_model = .TRUE.'
                 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
-             ENDIF
-             IF ( TRIM( var ) == 'pra*'  .AND.                                 &
-                  .NOT. ( microphysics_kessler .OR. microphysics_seifert ) )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                                 'res cloud_scheme = kessler or seifert_beheng'
-                CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 )
-             ENDIF
-             IF ( TRIM( var ) == 'pra*'  .AND.  j == 1 )  THEN
-                message_string = 'temporal averaging of precipitation ' //     &
-                          'amount "' // TRIM( var ) // '" is not possible'
-                CALL message( 'check_parameters', 'PA0113', 1, 2, 0, 6, 0 )
-             ENDIF
-             IF ( TRIM( var ) == 'prr*'  .AND.                                 &
-                  .NOT. ( microphysics_kessler .OR. microphysics_seifert ) )  THEN
-                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
-                                 'res cloud_scheme = kessler or seifert_beheng'
-                CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 )
              ENDIF
              IF ( TRIM( var ) == 'qsws*'  .AND.  .NOT.  humidity )  THEN
@@ -3460,6 +3259,4 @@
              IF ( TRIM( var ) == 'lwp*'   )  unit = 'kg/m2'
              IF ( TRIM( var ) == 'ol*'    )  unit = 'm'
-             IF ( TRIM( var ) == 'pra*'   )  unit = 'mm'
-             IF ( TRIM( var ) == 'prr*'   )  unit = 'mm/s'
              IF ( TRIM( var ) == 'qsws*'  )  unit = 'kgm/kgs'
              IF ( TRIM( var ) == 'r_a*'   )  unit = 's/m'     
@@ -3483,4 +3280,10 @@
 
              CALL tcm_check_data_output ( var, unit )
+
+!
+!--          Block of microphysics module outputs
+             IF ( unit == 'illegal'  .AND.  bulk_cloud_model  )  THEN
+                CALL bcm_check_data_output ( var, unit )
+             ENDIF
 
              IF ( unit == 'illegal' )  THEN
