Index: palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_3d_model.f90	(revision 1114)
+++ palm/trunk/SOURCE/init_3d_model.f90	(revision 1115)
@@ -23,5 +23,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! unused variables removed
 !
 ! Former revisions:
@@ -392,44 +392,55 @@
              IF ( icloud_scheme == 0 )  THEN
 !
-!--             1D-rain sedimentation fluxes and rain drop size distribution
-!--             properties 
-                ALLOCATE ( dr(nzb:nzt+1), lambda_r(nzb:nzt+1),  &
-                           mu_r(nzb:nzt+1), sed_q(nzb:nzt+1),   &
-                           sed_qr(nzb:nzt+1), sed_nr(nzb:nzt+1),& 
-                           xr(nzb:nzt+1) ) 
-!
-!--             2D-rain water content and rain drop concentration arrays
-                ALLOCATE ( qrs(nysg:nyng,nxlg:nxrg),   &
-                   qrsws(nysg:nyng,nxlg:nxrg),         &
-                   qrswst(nysg:nyng,nxlg:nxrg),        &
-                   nrs(nysg:nyng,nxlg:nxrg),           &
-                   nrsws(nysg:nyng,nxlg:nxrg),         &
-                   nrswst(nysg:nyng,nxlg:nxrg) )
-!
-!--             3D-rain water content, rain drop concentration arrays
+!--             1D-arrays 
+                ALLOCATE ( nc_1d(nzb:nzt+1), pt_1d(nzb:nzt+1), &
+                           q_1d(nzb:nzt+1), qc_1d(nzb:nzt+1) ) 
+!
+!--             3D-cloud water content
 #if defined( __nopointer )
-                ALLOCATE( nr(nzb:nzt+1,nysg:nyng,nxlg:nxrg),         &
-                          nr_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
-                          qr(nzb:nzt+1,nysg:nyng,nxlg:nxrg),         &
-                          qr_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
-                          tnr_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg),      &
-                          tqr_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ALLOCATE( qc(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
 #else
-                ALLOCATE( nr_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
-                          nr_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
-                          nr_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
-                          qr_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
-                          qr_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
-                          qr_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ALLOCATE( qc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
 #endif
 !
 !--             3D-tendency arrays
-                ALLOCATE( tend_nr(nzb:nzt+1,nysg:nyng,nxlg:nxrg),    &
-                          tend_pt(nzb:nzt+1,nysg:nyng,nxlg:nxrg),    &
-                          tend_q(nzb:nzt+1,nysg:nyng,nxlg:nxrg),     &
-                          tend_qr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-!
-!--             3d-precipitation rate
+                ALLOCATE( tend_pt(nzb:nzt+1,nysg:nyng,nxlg:nxrg),    &
+                          tend_q(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+
                 IF ( precipitation )  THEN
+!
+!--                1D-arrays 
+                   ALLOCATE ( nr_1d(nzb:nzt+1), qr_1d(nzb:nzt+1) ) 
+!
+!
+!--                3D-tendency arrays
+                   ALLOCATE( tend_nr(nzb:nzt+1,nysg:nyng,nxlg:nxrg),    &
+                             tend_qr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+!
+!--                2D-rain water content and rain drop concentration arrays
+                   ALLOCATE ( qrs(nysg:nyng,nxlg:nxrg),                 &
+                              qrsws(nysg:nyng,nxlg:nxrg),               &
+                              qrswst(nysg:nyng,nxlg:nxrg),              &
+                              nrs(nysg:nyng,nxlg:nxrg),                 &
+                              nrsws(nysg:nyng,nxlg:nxrg),               &
+                              nrswst(nysg:nyng,nxlg:nxrg) )
+!
+!--                3D-rain water content, rain drop concentration arrays
+#if defined( __nopointer )
+                   ALLOCATE( nr(nzb:nzt+1,nysg:nyng,nxlg:nxrg),         &
+                             nr_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
+                             qr(nzb:nzt+1,nysg:nyng,nxlg:nxrg),         &
+                             qr_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
+                             tnr_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg),      &
+                             tqr_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#else
+                   ALLOCATE( nr_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
+                             nr_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
+                             nr_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
+                             qr_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
+                             qr_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),       &
+                             qr_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#endif
+!
+!--                3d-precipitation rate
                    ALLOCATE( prr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
                 ENDIF
@@ -582,6 +593,9 @@
              ql => ql_1
              IF ( icloud_scheme == 0 )  THEN
-                qr => qr_1;  qr_p  => qr_2;  tqr_m  => qr_3
-                nr => nr_1;  nr_p  => nr_2;  tnr_m  => nr_3
+                qc => qc_1
+                IF ( precipitation )  THEN
+                   qr => qr_1;  qr_p  => qr_2;  tqr_m  => qr_3
+                   nr => nr_1;  nr_p  => nr_2;  tnr_m  => nr_3
+                ENDIF
              ENDIF
           ENDIF
@@ -641,11 +655,16 @@
                 ENDDO
              ENDDO
-             IF ( cloud_physics .AND. icloud_scheme == 0 )  THEN
+             IF ( cloud_physics  .AND.  icloud_scheme == 0  .AND.  &
+                  precipitation )  THEN
                 DO  i = nxlg, nxrg
                    DO  j = nysg, nyng
-                      qr(:,j,i) = qr_init
-                      nr(:,j,i) = nr_init
+                      qr(:,j,i) = 0.0
+                      nr(:,j,i) = 0.0
                    ENDDO
                 ENDDO
+!
+!--             Initialze nc_1d with default value
+                nc_1d(:) = nc_const
+
              ENDIF
           ENDIF
@@ -693,5 +712,6 @@
           IF ( humidity  .OR.  passive_scalar )  THEN
              qs = 0.0
-             IF ( cloud_physics  .AND.  icloud_scheme == 0 )  THEN
+             IF ( cloud_physics  .AND.  icloud_scheme == 0  .AND.  &
+                  precipitation )  THEN
                 qrs = 0.0
                 nrs = 0.0
@@ -762,11 +782,18 @@
                 ENDDO
              ENDDO
-             IF ( cloud_physics .AND. icloud_scheme == 0 )  THEN
-                DO  i = nxlg, nxrg
-                   DO  j = nysg, nyng
-                      qr(:,j,i) = qr_init
-                      nr(:,j,i) = nr_init
+             IF ( cloud_physics  .AND.  icloud_scheme == 0 )  THEN
+!
+!--             Initialze nc_1d with default value
+                nc_1d(:) = nc_const
+
+                IF ( precipitation )  THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         qr(:,j,i) = 0.0
+                         nr(:,j,i) = 0.0
+                      ENDDO
                    ENDDO
-                ENDDO
+                ENDIF
+
              ENDIF
           ENDIF
@@ -910,11 +937,8 @@
 !--       Determine the near-surface water flux
           IF ( humidity  .OR.  passive_scalar )  THEN
-             IF ( cloud_physics  .AND.  icloud_scheme == 0 )  THEN
-                IF ( constant_waterflux_qr )  THEN
-                   qrsws = surface_waterflux_qr
-                ENDIF
-                IF (constant_waterflux_nr )  THEN
-                   nrsws = surface_waterflux_nr
-                ENDIF
+             IF ( cloud_physics  .AND.  icloud_scheme == 0  .AND.  &
+                  precipitation )  THEN
+                qrsws = 0.0
+                nrsws = 0.0
              ENDIF
              IF ( constant_waterflux )  THEN
@@ -951,5 +975,6 @@
              IF ( humidity  .OR.  passive_scalar )  THEN
                 qswst = 0.0
-                IF ( cloud_physics  .AND.  icloud_scheme == 0 ) THEN
+                IF ( cloud_physics  .AND.  icloud_scheme == 0  .AND.  &
+                     precipitation ) THEN
                    nrswst = 0.0
                    qrswst = 0.0
@@ -990,11 +1015,8 @@
           IF ( humidity  .OR.  passive_scalar )  THEN
              IF ( .NOT. constant_waterflux )  qsws   = 0.0
-             IF ( cloud_physics  .AND.  icloud_scheme == 0 )  THEN
-                IF ( .NOT. constant_waterflux_qr )  THEN
-                   qrsws = 0.0
-                ENDIF
-                IF ( .NOT. constant_waterflux_nr )  THEN
-                   nrsws = 0.0
-                ENDIF
+             IF ( cloud_physics  .AND.  icloud_scheme == 0  .AND.  &
+                  precipitation )  THEN
+                qrsws = 0.0
+                nrsws = 0.0
              ENDIF
           ENDIF
@@ -1021,4 +1043,8 @@
           ql = 0.0
           IF ( precipitation )  precipitation_amount = 0.0
+          IF ( icloud_scheme == 0 )  THEN
+             qc = 0.0
+             nc_1d = nc_const
+          ENDIF 
        ENDIF
 !
@@ -1046,13 +1072,5 @@
             q_surface_initial_change /= 0.0 )  THEN
           q(nzb,:,:) = q(nzb,:,:) + q_surface_initial_change
-          IF ( cloud_physics .AND. icloud_scheme == 0 )  THEN
-             IF ( qr_surface_initial_change /= 0.0 )  THEN
-                qr(nzb,:,:) = qr(nzb,:,:) + qr_surface_initial_change
-             ELSEIF ( nr_surface_initial_change /= 0.0 ) THEN
-                nr(nzb,:,:) = nr(nzb,:,:) + nr_surface_initial_change
-             ENDIF
-          ENDIF
-       ENDIF
-
+       ENDIF
 !
 !--    Initialize the random number generator (from numerical recipes)
@@ -1067,5 +1085,6 @@
           tq_m = 0.0
           q_p = q
-          IF ( cloud_physics .AND. icloud_scheme == 0 )  THEN
+          IF ( cloud_physics  .AND.  icloud_scheme == 0  .AND.  &
+               precipitation )  THEN
              tqr_m = 0.0
              qr_p = qr
@@ -1245,5 +1264,6 @@
        IF ( humidity  .OR.  passive_scalar )  THEN
           q_p = q
-          IF ( cloud_physics .AND. icloud_scheme == 0 )  THEN
+          IF ( cloud_physics  .AND.  icloud_scheme == 0  .AND.  &
+               precipitation )  THEN
              qr_p = qr
              nr_p = nr
@@ -1259,5 +1279,6 @@
        IF ( humidity  .OR.  passive_scalar )  THEN
           tq_m = 0.0
-          IF ( cloud_physics .AND. icloud_scheme == 0 )  THEN
+          IF ( cloud_physics  .AND.  icloud_scheme == 0  .AND.  &
+               precipitation )  THEN
              tqr_m = 0.0
              tnr_m = 0.0
