Index: palm/trunk/SOURCE/plant_canopy_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 1954)
+++ palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 1960)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Separate humidity and passive scalar
 ! 
 ! Former revisions:
@@ -86,5 +86,5 @@
  
     USE arrays_3d,                                                             &
-        ONLY:  dzu, dzw, e, q, shf, tend, u, v, w, zu, zw 
+        ONLY:  dzu, dzw, e, q, s, shf, tend, u, v, w, zu, zw 
 
     USE indices,                                                               &
@@ -818,5 +818,5 @@
 
 !
-!--       scalar concentration
+!--       humidity
           CASE ( 5 )
              DO  i = nxl, nxr
@@ -866,4 +866,29 @@
                 ENDDO
              ENDDO 
+!
+!--       scalar concentration
+          CASE ( 7 )
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb_s_inner(j,i)+1, nzb_s_inner(j,i)+pch_index
+                      kk = k - nzb_s_inner(j,i)  !- lad arrays are defined flat
+                      tend(k,j,i) = tend(k,j,i) -                              &
+                                       lsec *                                  &
+                                       lad_s(kk,j,i) *                         &
+                                       SQRT( ( 0.5_wp * ( u(k,j,i) +           &
+                                                          u(k,j,i+1) )         &
+                                             )**2 +                            &
+                                             ( 0.5_wp * ( v(k,j,i) +           &
+                                                          v(k,j+1,i) )         &
+                                             )**2 +                            &
+                                             ( 0.5_wp * ( w(k-1,j,i) +         & 
+                                                          w(k,j,i) )           &
+                                             )**2                              &
+                                           ) *                                 &
+                                       ( s(k,j,i) - lsc )
+                   ENDDO
+                ENDDO
+             ENDDO    
+
 
 
@@ -1146,5 +1171,5 @@
 
 !
-!--       scalar concentration 
+!--       humidity
           CASE ( 5 )
              DO  k = nzb_s_inner(j,i)+1, nzb_s_inner(j,i)+pch_index
@@ -1186,4 +1211,25 @@
                                  e(k,j,i)
              ENDDO
+             
+!
+!--       scalar concentration 
+          CASE ( 7 )
+             DO  k = nzb_s_inner(j,i)+1, nzb_s_inner(j,i)+pch_index
+                kk = k - nzb_s_inner(j,i)  !- lad arrays are defined flat
+                tend(k,j,i) = tend(k,j,i) -                                    &
+                                 lsec *                                        &
+                                 lad_s(kk,j,i) *                               &
+                                 SQRT( ( 0.5_wp * ( u(k,j,i) +                 &
+                                                    u(k,j,i+1) )               &
+                                       )**2  +                                 &
+                                       ( 0.5_wp * ( v(k,j,i) +                 &
+                                                    v(k,j+1,i) )               &
+                                       )**2 +                                  &
+                                       ( 0.5_wp * ( w(k-1,j,i) +               &
+                                                    w(k,j,i) )                 &
+                                       )**2                                    &
+                                     ) *                                       &
+                                 ( s(k,j,i) - lsc )
+             ENDDO                
 
        CASE DEFAULT
