<p><b>dwj07@fsu.edu</b> 2011-08-30 10:03:43 -0600 (Tue, 30 Aug 2011)</p><p><br>
        Fixing comments.<br>
<br>
        Removing nCellsSolve from Vmix modules.<br>
        Changing some divisions to multiplications.<br>
<br>
        Modifying velocity forcing module to follow the older efficiency note.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnCoriolis.F
===================================================================
--- branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnCoriolis.F        2011-08-29 22:49:39 UTC (rev 960)
+++ branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnCoriolis.F        2011-08-30 16:03:43 UTC (rev 961)
@@ -2,16 +2,13 @@
 !
 !  OcnCoriolis
 !
-!&gt; \brief MPAS ocean horizontal tracer mixing driver
-!&gt; \author Phil Jones
+!&gt; \brief MPAS ocean coriolis tendency
+!&gt; \author Doug Jacobsen
 !&gt; \date   26 July 2011
 !&gt; \version SVN:$Id:$
 !&gt; \details
-!&gt;  This module contains the main driver routine for computing 
-!&gt;  horizontal mixing tendencies.  It primarily decides which mixing
-!&gt;  parameterizations are being used and calls them individually.
-!&gt;  Detailed mixing parameterizations are contained in their own
-!&gt;  modules.
+!&gt;  This module contains the routine for computing 
+!&gt;  tendencies from coriolis force.
 !
 !-----------------------------------------------------------------------
 
@@ -53,17 +50,12 @@
 !
 !  routine OcnCoriolisTend
 !
-!&gt; \brief   Computes tendency term for horizontal tracer mixing
-!&gt; \author  Phil Jones
+!&gt; \brief   Computes tendency term for coriolis force
+!&gt; \author  Doug Jacobsen
 !&gt; \date    26 July 2011
 !&gt; \version SVN:$Id$
 !&gt; \details 
-!&gt;  This routine computes the horizontal mixing tendency for tracers
-!&gt;  based on current state and user choices of mixing parameterization.
-!&gt;  Multiple parameterizations may be chosen and added together.  These
-!&gt;  tendencies are generally computed by calling the specific routine
-!&gt;  for the chosen parameterization, so this routine is primarily a
-!&gt;  driver for managing these choices.
+!&gt;  This routine computes the tendency from the coriolis force.
 !
 !-----------------------------------------------------------------------
 
@@ -120,6 +112,10 @@
       weightsOnEdge =&gt; grid % weightsOnEdge % array
       dcEdge =&gt; grid % dcEdge % array
 
+      !
+      ! velocity tendency: nonlinear Coriolis term and grad of kinetic energy
+      !
+
       do iEdge=1,grid % nEdgesSolve
          cell1 = cellsOnEdge(1,iEdge)
          cell2 = cellsOnEdge(2,iEdge)

Modified: branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnHmixVelDel4.F
===================================================================
--- branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnHmixVelDel4.F        2011-08-29 22:49:39 UTC (rev 960)
+++ branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnHmixVelDel4.F        2011-08-30 16:03:43 UTC (rev 961)
@@ -113,6 +113,7 @@
 
       real (kind=RKIND) :: &amp;
          invArea1, invArea2,         &amp;! reciprocal of cell areas
+         invLength1, invLength2,     &amp;! reciprocal of dv and dc edge
          flux                         ! flux across edge
 
       real (kind=RKIND), dimension(:), pointer :: &amp;
@@ -179,13 +180,16 @@
          vertex1 = verticesOnEdge(1,iEdge)
          vertex2 = verticesOnEdge(2,iEdge)
 
+         invLength1 = 1.d0/dcEdge(iEdge)
+         invLength2 = 1.d0/dvEdge(iEdge)
+
          do k=1,maxLevelEdgeTop(iEdge)
 
             delsq_u(k,iEdge) =                             &amp; 
                   ( divergence(k,cell2)  -                 &amp;
-                    divergence(k,cell1) ) / dcEdge(iEdge)  &amp;
+                    divergence(k,cell1) ) * invLength1     &amp;
                  -( vorticity(k,vertex2) -                 &amp;
-                    vorticity(k,vertex1)) / dvEdge(iEdge)
+                    vorticity(k,vertex1)) * invLength2
 
          end do
          do k=maxLevelEdgeTop(iEdge)+1,nVertLevels
@@ -250,13 +254,16 @@
          vertex1 = verticesOnEdge(1,iEdge)
          vertex2 = verticesOnEdge(2,iEdge)
 
+         invLength1 = 1.d0 / dcEdge(iEdge)
+         invLength2 = 1.d0 / dvEdge(iEdge)
+
          do k=1,maxLevelEdgeTop(iEdge)
 
             tend(k,iEdge) = tend(k,iEdge) - eddyVisc4 * (         &amp;
                 (  delsq_divergence(k,cell2  )                    &amp;
-                 - delsq_divergence(k,cell1  ) ) / dcEdge(iEdge)  &amp;
+                 - delsq_divergence(k,cell1  ) ) * invLength1     &amp;
                -(  delsq_vorticity (k,vertex2)                    &amp;
-                 - delsq_vorticity (k,vertex1) ) / dvEdge(iEdge))
+                 - delsq_vorticity (k,vertex1) ) * invLength2
  
          end do
       end do

Modified: branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnVelocityForcing.F
===================================================================
--- branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnVelocityForcing.F        2011-08-29 22:49:39 UTC (rev 960)
+++ branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnVelocityForcing.F        2011-08-30 16:03:43 UTC (rev 961)
@@ -116,29 +116,44 @@
 
       do iEdge=1,grid % nEdgesSolve
 
-        k = maxLevelEdgeTop(iEdge)
+!-------------------------------------------------------
+!       Original Method, commented out for now.
+!-------------------------------------------------------
+!       k = maxLevelEdgeTop(iEdge)
 
         ! efficiency note: it would be nice to avoid this
         ! if within a do.  This could be done with
         ! k =  max(maxLevelEdgeTop(iEdge),1)
         ! and then tend_u(1,iEdge) is just not used for land cells.
 
-        if (k&gt;0) then
+!       if (k&gt;0) then
 
            ! forcing in top layer only
-           tend(1,iEdge) =  tend(1,iEdge) &amp;
-              + u_src(1,iEdge)/rho_ref/hEdge(1,iEdge)
+!          tend(1,iEdge) =  tend(1,iEdge) &amp;
+!             + u_src(1,iEdge)/rho_ref/hEdge(1,iEdge)
 
            ! bottom drag is the same as POP:
            ! -c |u| u  where c is unitless and 1.0e-3.
            ! see POP Reference guide, section 3.4.4.
 
-           tend(k,iEdge) = tend(k,iEdge)  &amp;
-             - 1.0e-3*u(k,iEdge) &amp;
-               *sqrt(2.0*keEdge(k,iEdge))/hEdge(k,iEdge)
+!          tend(k,iEdge) = tend(k,iEdge)  &amp;
+!            - 1.0e-3*u(k,iEdge) &amp;
+!              *sqrt(2.0*keEdge(k,iEdge))/hEdge(k,iEdge)
 
-        endif
+!        endif
 
+
+!-------------------------------------------------------
+!       New method
+!-------------------------------------------------------
+        k = max(maxLevelEdgeTop(iEdge), 1)
+
+        tend(1,iEdge) = tend(1, iEdge) &amp;
+              + u_src(1,iEdge)/rho_ref/hEdge(1,iEdge)
+
+        tend(k,iedge) = tend(k,iEdge) &amp;
+              - 1.0e-3 * u(k,iEdge) &amp;
+              * sqrt(2.0 * keEdge(k,iEdge))/hEdge(k,iEdge)
       enddo
 
    !--------------------------------------------------------------------

Modified: branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnVmixTracer.F
===================================================================
--- branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnVmixTracer.F        2011-08-29 22:49:39 UTC (rev 960)
+++ branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnVmixTracer.F        2011-08-30 16:03:43 UTC (rev 961)
@@ -2,8 +2,8 @@
 !
 !  OcnVmixTracer
 !
-!&gt; \brief MPAS ocean horizontal tracer mixing driver
-!&gt; \author Phil Jones
+!&gt; \brief MPAS ocean vertical tracer mixing driver
+!&gt; \author Doug Jacobsen
 !&gt; \date   26 July 2011
 !&gt; \version SVN:$Id:$
 !&gt; \details
@@ -56,12 +56,12 @@
 !
 !  routine OcnVmixTracerTend
 !
-!&gt; \brief   Computes tendency term for horizontal tracer mixing
-!&gt; \author  Phil Jones
+!&gt; \brief   Computes tendency term for vertical tracer mixing
+!&gt; \author  Doug Jacobsen
 !&gt; \date    26 July 2011
 !&gt; \version SVN:$Id$
 !&gt; \details 
-!&gt;  This routine computes the horizontal mixing tendency for tracers
+!&gt;  This routine computes the vertical mixing tendency for tracers
 !&gt;  based on current state and user choices of mixing parameterization.
 !&gt;  Multiple parameterizations may be chosen and added together.  These
 !&gt;  tendencies are generally computed by calling the specific routine
@@ -70,7 +70,7 @@
 !
 !-----------------------------------------------------------------------
 
-   subroutine OcnVmixTracerTend(tend, tracers, hCell, nCellsSolve, grid, err)
+   subroutine OcnVmixTracerTend(tend, tracers, hCell, grid, err)
 
       !-----------------------------------------------------------------
       !
@@ -87,8 +87,6 @@
       type (mesh_type), intent(in) :: &amp;
          grid       !&lt; Input: grid information
 
-      integer, intent(in) :: nCellsSolve
-
       !-----------------------------------------------------------------
       !
       ! input/output variables
@@ -120,8 +118,8 @@
       !
       !-----------------------------------------------------------------
 
-      call OcnVmixTracerConstTend(tend, tracers, hCell, nCellsSolve, grid, err)
-      call OcnVmixTracerTanhTend(tend, tracers, hCell, nCellsSolve , grid, err)
+      call OcnVmixTracerConstTend(tend, tracers, hCell, grid, err)
+      call OcnVmixTracerTanhTend(tend, tracers, hCell, grid, err)
 
    !--------------------------------------------------------------------
 
@@ -131,13 +129,13 @@
 !
 !  routine OcnVmixTracerInit
 !
-!&gt; \brief   Initializes ocean tracer horizontal mixing quantities
-!&gt; \author  Phil Jones
+!&gt; \brief   Initializes ocean tracer vertical mixing quantities
+!&gt; \author  Doug Jacobsen
 !&gt; \date    26 July 2011
 !&gt; \version SVN:$Id$
 !&gt; \details 
 !&gt;  This routine initializes a variety of quantities related to 
-!&gt;  horizontal tracer mixing in the ocean. Since a variety of 
+!&gt;  vertical tracer mixing in the ocean. Since a variety of 
 !&gt;  parameterizations are available, this routine primarily calls the
 !&gt;  individual init routines for each parameterization. 
 !

Modified: branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnVmixTracerConst.F
===================================================================
--- branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnVmixTracerConst.F        2011-08-29 22:49:39 UTC (rev 960)
+++ branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnVmixTracerConst.F        2011-08-30 16:03:43 UTC (rev 961)
@@ -2,13 +2,13 @@
 !
 !  OcnVmixTracerConst
 !
-!&gt; \brief Ocean horizontal mixing - Laplacian parameterization 
-!&gt; \author Phil Jones
+!&gt; \brief Ocean vertical mixing - constant parameterization 
+!&gt; \author Doug Jacobsen
 !&gt; \date   1 August 2011
 !&gt; \version SVN:$Id:$
 !&gt; \details
-!&gt;  This module contains routines for computing horizontal mixing 
-!&gt;  tendencies using a Laplacian formulation.
+!&gt;  This module contains routines for computing vertical mixing 
+!&gt;  tendencies using a constant formulation.
 !
 !-----------------------------------------------------------------------
 
@@ -56,20 +56,16 @@
 !
 !  routine OcnVmixTracerConstTend
 !
-!&gt; \brief   Computes tendency term for Laplacian horizontal tracer mixing
-!&gt; \author  Phil Jones
+!&gt; \brief   Computes tendency term for constant vertical tracer mixing
+!&gt; \author  Doug Jacobsen
 !&gt; \date    1 August 2011
 !&gt; \version SVN:$Id$
 !&gt; \details 
-!&gt;  This routine computes the horizontal mixing tendency for tracers
-!&gt;  based on a Laplacian form for the mixing.  This tendency takes the
-!&gt;  form </font>
<font color="black">abla \cdot (h \kappa_2 </font>
<font color="gray">abla \phi), where \phi is the
-!&gt;  tracer, h is the thickness and \kappa_2 is a base horizontal
-!&gt;  diffusivity.
-!
+!&gt;  This routine computes the vertical mixing tendency for tracers
+!&gt;  based on a constant form for the mixing. 
 !-----------------------------------------------------------------------
 
-   subroutine OcnVmixTracerConstTend(tend, tracers, h, nCellsSolve, grid, err)
+   subroutine OcnVmixTracerConstTend(tend, tracers, h, grid, err)
 
       !-----------------------------------------------------------------
       !
@@ -80,9 +76,6 @@
       real (kind=RKIND), dimension(:,:,:), intent(in) :: &amp;
          tracers    !&lt; Input: array of tracers
 
-      integer, intent(in) :: &amp;
-         nCellsSolve      !&lt; Input: number of cells to solve
-
       type (mesh_type), intent(in) :: &amp;
          grid       !&lt; Input: grid information
 
@@ -114,7 +107,8 @@
 
       integer :: &amp;
          k, iCell, iTracer, &amp;! loop counters
-         nVertLevels, nTracers ! array sizes
+         nVertLevels, nTracers, &amp; ! array sizes
+         nCellsSolve
 
       integer, dimension(:), pointer :: maxLevelCell
 
@@ -139,6 +133,8 @@
 
       maxLevelCell =&gt; grid % maxLevelCell % array
 
+      nCellsSolve = grid % nCellsSolve
+
       nTracers = size(tracers,dim=1)
       nVertLevels = size(tracers, dim=2)
 
@@ -183,13 +179,13 @@
 !
 !  routine OcnVmixTracerConstInit
 !
-!&gt; \brief   Initializes ocean tracer Laplacian horizontal mixing
-!&gt; \author  Phil Jones
+!&gt; \brief   Initializes ocean tracer constant vertical mixing
+!&gt; \author  Doug Jacobsen
 !&gt; \date    26 July 2011
 !&gt; \version SVN:$Id$
 !&gt; \details 
 !&gt;  This routine initializes a variety of quantities related to 
-!&gt;  Laplacian horizontal tracer mixing in the ocean.  
+!&gt;  constant vertical tracer mixing in the ocean.  
 !
 !-----------------------------------------------------------------------
 

Modified: branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnVmixTracerTanh.F
===================================================================
--- branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnVmixTracerTanh.F        2011-08-29 22:49:39 UTC (rev 960)
+++ branches/ocean_projects/performance/mpas/src/core_ocean/module_OcnVmixTracerTanh.F        2011-08-30 16:03:43 UTC (rev 961)
@@ -2,13 +2,13 @@
 !
 !  OcnVmixTracerTanh
 !
-!&gt; \brief Ocean horizontal mixing - Laplacian parameterization 
-!&gt; \author Phil Jones
+!&gt; \brief Ocean vertical mixing - hyperbolic tangent parameterization 
+!&gt; \author Doug Jacobsen
 !&gt; \date   1 August 2011
 !&gt; \version SVN:$Id:$
 !&gt; \details
-!&gt;  This module contains routines for computing horizontal mixing 
-!&gt;  tendencies using a Laplacian formulation.
+!&gt;  This module contains routines for computing vertical mixing 
+!&gt;  tendencies using a hyperbolic tangent formulation.
 !
 !-----------------------------------------------------------------------
 
@@ -56,20 +56,20 @@
 !
 !  routine OcnVmixTracerTanhTend
 !
-!&gt; \brief   Computes tendency term for Laplacian horizontal tracer mixing
-!&gt; \author  Phil Jones
+!&gt; \brief   Computes tendency term for hyperbolic tangent vertical tracer mixing
+!&gt; \author  Doug Jacobsen
 !&gt; \date    1 August 2011
 !&gt; \version SVN:$Id$
 !&gt; \details 
-!&gt;  This routine computes the horizontal mixing tendency for tracers
-!&gt;  based on a Laplacian form for the mixing.  This tendency takes the
+!&gt;  This routine computes the vertical mixing tendency for tracers
+!&gt;  based on a hyperbolic tangent form for the mixing.  This tendency takes the
 !&gt;  form </font>
<font color="black">abla \cdot (h \kappa_2 </font>
<font color="gray">abla \phi), where \phi is the
-!&gt;  tracer, h is the thickness and \kappa_2 is a base horizontal
+!&gt;  tracer, h is the thickness and \kappa_2 is a base vertical
 !&gt;  diffusivity.
 !
 !-----------------------------------------------------------------------
 
-   subroutine OcnVmixTracerTanhTend(tend, tracers, hCell, nCellsSolve, grid, err)
+   subroutine OcnVmixTracerTanhTend(tend, tracers, hCell, grid, err)
 
       !-----------------------------------------------------------------
       !
@@ -80,9 +80,6 @@
       real (kind=RKIND), dimension(:,:,:), intent(in) :: &amp;
          tracers    !&lt; Input: array of tracers
 
-      integer , intent(in) :: &amp;
-         nCellsSolve !&lt; Input: number of cells
-
       type (mesh_type), intent(in) :: &amp;
          grid       !&lt; Input: grid information
 
@@ -114,7 +111,8 @@
 
       integer :: &amp;
          k, iCell, iTracer, &amp;! loop counters
-         nVertLevels, nTracers ! array sizes
+         nVertLevels, nTracers, &amp; ! array sizes
+         nCellsSolve
 
       integer, dimension(:), pointer :: maxLevelCell
 
@@ -143,6 +141,8 @@
       maxLevelCell =&gt; grid % maxLevelCell % array
       zTopZLevel =&gt; grid % zTopZLevel % array
 
+      nCellsSolve = grid % nCellsSolve
+
       nTracers = size(tracers,dim=1)
       nVertLevels = size(tracers, dim=2)
 
@@ -189,13 +189,13 @@
 !
 !  routine OcnVmixTracerTanhInit
 !
-!&gt; \brief   Initializes ocean tracer Laplacian horizontal mixing
-!&gt; \author  Phil Jones
+!&gt; \brief   Initializes ocean tracer hyperbolic tangent vertical mixing
+!&gt; \author  Doug Jacobsen
 !&gt; \date    26 July 2011
 !&gt; \version SVN:$Id$
 !&gt; \details 
 !&gt;  This routine initializes a variety of quantities related to 
-!&gt;  Laplacian horizontal tracer mixing in the ocean.  
+!&gt;  hyperbolic tangent vertical tracer mixing in the ocean.  
 !
 !-----------------------------------------------------------------------
 

Modified: branches/ocean_projects/performance/mpas/src/core_ocean/module_time_integration.F
===================================================================
--- branches/ocean_projects/performance/mpas/src/core_ocean/module_time_integration.F        2011-08-29 22:49:39 UTC (rev 960)
+++ branches/ocean_projects/performance/mpas/src/core_ocean/module_time_integration.F        2011-08-30 16:03:43 UTC (rev 961)
@@ -440,9 +440,6 @@
       call OcnHmixVelTend(tend_u, divergence, vorticity, grid)
 
       call timer_stop(&quot;vel dissipation&quot;)
-      !
-      ! velocity tendency: nonlinear Coriolis term and grad of kinetic energy
-      !
       call timer_start(&quot;coriolis&quot;)
 
       call OcnCoriolisTend(tend_u, pv_edge, h_edge, u, ke, nEdgesSolve, grid)
@@ -930,7 +927,7 @@
       ! tracer tendency: vertical diffusion h d/dz( \kappa_v d\phi/dz)
       !
       call timer_start(&quot;scalar vdiff&quot;)
-      call OcnVmixTracerTend(tend_tr, tracers, h, nCellsSolve, grid, err)
+      call OcnVmixTracerTend(tend_tr, tracers, h, grid, err)
 
       if(err .ne. 0) then
         call dmpar_abort(dminfo)

</font>
</pre>