<p><b>duda</b> 2009-10-27 17:35:15 -0600 (Tue, 27 Oct 2009)</p><p>Move computation of vh for NCAR_FORMULATION from compute_tend() to<br>
compute_solve_diagnostics() with other diagnostic fields.<br>
<br>
M    swmodel/src/module_time_integration.F<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/swmodel/src/module_time_integration.F
===================================================================
--- trunk/swmodel/src/module_time_integration.F        2009-10-27 20:45:53 UTC (rev 67)
+++ trunk/swmodel/src/module_time_integration.F        2009-10-27 23:35:15 UTC (rev 68)
@@ -227,9 +227,7 @@
    ! Input: s - current model state
    !        grid - grid metadata
    !
-   ! Output: tend - computed diagnostics (parallel velocities, v; mass fluxes, vh; 
-   !                circulation; vorticity; and kinetic energy, ke) and the 
-   !                tendencies for height (h) and u (u)
+   ! Output: tend - computed tendencies for prognostic variables
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
 
       implicit none
@@ -261,6 +259,7 @@
       divergence  =&gt; s % divergence % array
       ke          =&gt; s % ke % array
       pv_edge     =&gt; s % pv_edge % array
+      vh          =&gt; s % vh % array
 
       weightsOnEdge     =&gt; grid % weightsOnEdge % array
       kiteAreasOnVertex =&gt; grid % kiteAreasOnVertex % array
@@ -280,7 +279,6 @@
       fVertex           =&gt; grid % fVertex % array
       fEdge             =&gt; grid % fEdge % array
 
-      vh          =&gt; tend % vh % array
       tend_h      =&gt; tend % h % array
       tend_u      =&gt; tend % u % array
                   
@@ -355,19 +353,6 @@
 
 #ifdef NCAR_FORMULATION
       !
-      ! Compute mass fluxes tangential to each edge (i.e., through the faces of dual grid cells)
-      !
-      vh(:,:) = 0.0
-      do iEdge=1,grid % nEdgesSolve
-         do j=1,nEdgesOnEdge(iEdge)
-            eoe = edgesOnEdge(j,iEdge)
-            do k=1,nVertLevels
-               vh(k,iEdge) = vh(k,iEdge) + weightsOnEdge(j,iEdge) * u(k,eoe) * h_edge(k,eoe)
-            end do
-         end do
-      end do
-
-      !
       ! Compute u (normal) velocity tendency for each edge (cell face)
       !
       tend_u(:,:) = 0.0
@@ -601,7 +586,22 @@
          end do
       end do
 
+#ifdef NCAR_FORMULATION
+      !
+      ! Compute mass fluxes tangential to each edge (i.e., through the faces of dual grid cells)
+      !
+      vh(:,:) = 0.0
+      do iEdge=1,grid % nEdgesSolve
+         do j=1,nEdgesOnEdge(iEdge)
+            eoe = edgesOnEdge(j,iEdge)
+            do k=1,nVertLevels
+               vh(k,iEdge) = vh(k,iEdge) + weightsOnEdge(j,iEdge) * u(k,eoe) * h_edge(k,eoe)
+            end do
+         end do
+      end do
+#endif
 
+
       ! tdr
       !
       ! Compute height at vertices, pv at vertices, and average pv to edge locations

</font>
</pre>