<p><b>laura@ucar.edu</b> 2011-07-07 16:14:55 -0600 (Thu, 07 Jul 2011)</p><p>makes local density dependent on water vapor<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_physics/module_physics_interface_nhyd.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_interface_nhyd.F        2011-07-07 22:13:45 UTC (rev 914)
+++ branches/atmos_physics/src/core_physics/module_physics_interface_nhyd.F        2011-07-07 22:14:55 UTC (rev 915)
@@ -194,12 +194,21 @@
  do k = kts, kte
  do i = its, ite
 
+    !moist arrays:
+    qv_p(i,k,j) = max(0.,state % scalars % array(state%index_qv,k,i))
+    qc_p(i,k,j) = max(0.,state % scalars % array(state%index_qc,k,i))
+    qr_p(i,k,j) = max(0.,state % scalars % array(state%index_qr,k,i))
+    qi_p(i,k,j) = max(0.,state % scalars % array(state%index_qi,k,i))
+    qs_p(i,k,j) = max(0.,state % scalars % array(state%index_qs,k,i))
+    qg_p(i,k,j) = max(0.,state % scalars % array(state%index_qg,k,i))
+    
     !arrays located at theta points:
     u_p(i,k,j) = u(k,i)
     v_p(i,k,j) = v(k,i)
 
     zz_p(i,k,j)  = zz(k,i)
     rho_p(i,k,j) = zz(k,i) * rho(k,i)
+    rho_p(i,k,j) = rho_p(i,k,j)*(1.+qv_p(i,k,j))
     th_p(i,k,j)  = theta(k,i) / (1. + R_v/R_d * qv(k,i))
     t_p(i,k,j)   = theta(k,i) * exner(k,i) / (1. + R_v/R_d * qv(k,i))
 
@@ -208,13 +217,6 @@
 
     dz_p(i,k,j) = zgrid(k+1,i)-zgrid(k,i)
 
-    qv_p(i,k,j) = max(0.,state % scalars % array(state%index_qv,k,i))
-    qc_p(i,k,j) = max(0.,state % scalars % array(state%index_qc,k,i))
-    qr_p(i,k,j) = max(0.,state % scalars % array(state%index_qr,k,i))
-    qi_p(i,k,j) = max(0.,state % scalars % array(state%index_qi,k,i))
-    qs_p(i,k,j) = max(0.,state % scalars % array(state%index_qs,k,i))
-    qg_p(i,k,j) = max(0.,state % scalars % array(state%index_qg,k,i))
-    
     !arrays located at w points:
     w_p(i,k,j) = w(k,i)
    

</font>
</pre>