<p><b>qchen3@fsu.edu</b> 2013-03-21 10:41:03 -0600 (Thu, 21 Mar 2013)</p><p>BRANCH COMMIT<br>
<br>
Merged changes updates from trunk into the gm_implement branch.<br>
</p><hr noshade><pre><font color="gray">Index: branches/ocean_projects/gm_implement
===================================================================
--- branches/ocean_projects/gm_implement        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement        2013-03-21 16:41:03 UTC (rev 2644)

Property changes on: branches/ocean_projects/gm_implement
___________________________________________________________________
Modified: svn:mergeinfo
## -4,6 +4,7 ##
 /branches/ocean_projects/ale_vert_coord:1225-1383
 /branches/ocean_projects/ale_vert_coord_new:1387-1428
 /branches/ocean_projects/cesm_coupling:2147-2344
+/branches/ocean_projects/comment_cleanup:2626-2630
 /branches/ocean_projects/diagnostics_revision:2439-2462
 /branches/ocean_projects/explicit_vmix_removal:2486-2490
 /branches/ocean_projects/gmvar:1214-1514,1517-1738
## -31,4 +32,4 ##
 /branches/omp_blocks/multiple_blocks:1803-2084
 /branches/source_renaming:1082-1113
 /branches/time_manager:924-962
-/trunk/mpas:2424-2543
+/trunk/mpas:2424-2643
\ No newline at end of property
Index: branches/ocean_projects/gm_implement/src/core_ocean
===================================================================
--- branches/ocean_projects/gm_implement/src/core_ocean        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement/src/core_ocean        2013-03-21 16:41:03 UTC (rev 2644)

Property changes on: branches/ocean_projects/gm_implement/src/core_ocean
___________________________________________________________________
Modified: svn:mergeinfo
## -4,6 +4,7 ##
 /branches/ocean_projects/ale_vert_coord/src/core_ocean:1225-1383
 /branches/ocean_projects/ale_vert_coord_new/src/core_ocean:1387-1428
 /branches/ocean_projects/cesm_coupling/src/core_ocean:2147-2344
+/branches/ocean_projects/comment_cleanup/src/core_ocean:2626-2630
 /branches/ocean_projects/diagnostics_revision/src/core_ocean:2439-2462
 /branches/ocean_projects/explicit_vmix_removal/src/core_ocean:2486-2490
 /branches/ocean_projects/gmvar/src/core_ocean:1214-1514,1517-1738
## -33,4 +34,4 ##
 /branches/omp_blocks/openmp_test/src/core_ocean_elements:2161-2201
 /branches/source_renaming/src/core_ocean:1082-1113
 /branches/time_manager/src/core_ocean:924-962
-/trunk/mpas/src/core_ocean:2424-2543
+/trunk/mpas/src/core_ocean:2424-2643
\ No newline at end of property
Modified: branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_diagnostics.F
===================================================================
--- branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_diagnostics.F        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_diagnostics.F        2013-03-21 16:41:03 UTC (rev 2644)
@@ -173,8 +173,6 @@
       ! Compute height on cell edges at velocity locations
       !   Namelist options control the order of accuracy of the reconstructed h_edge value
       !
-      ! mrp 101115 note: in order to include flux boundary conditions, we will need to 
-      ! assign h_edge for maxLevelEdgeTop:maxLevelEdgeBot in the following section
 
       ! initialize h_edge to avoid divide by zero and NaN problems.
       h_edge = -1.0e34
@@ -241,13 +239,10 @@
          ! Compute v (tangential) velocities
          do i=1,nEdgesOnEdge(iEdge)
             eoe = edgesOnEdge(i,iEdge)
-            ! mrp 101115 note: in order to include flux boundary conditions,
-            ! the following loop may need to change to maxLevelEdgeBot
             do k = 1,maxLevelEdgeTop(iEdge) 
                v(k,iEdge) = v(k,iEdge) + weightsOnEdge(i,iEdge) * u(k, eoe)
             end do
          end do
-
       end do
 
       !
@@ -287,8 +282,6 @@
       !
       ! Compute ke on cell edges at velocity locations for quadratic bottom drag. 
       !
-      ! mrp 101025 efficiency note: we could get rid of ke_edge completely by 
-      ! using sqrt(u(k,iEdge)**2 + v(k,iEdge)**2) in its place elsewhere.
       do iEdge=1,nEdges
          cell1 = cellsOnEdge(1,iEdge)
          cell2 = cellsOnEdge(2,iEdge)
@@ -390,7 +383,6 @@
       ! Pressure
       ! This section must be after computing rho
       !
-      ! dwj: 10/25/2011 - Need to explore isopycnal vs zlevel flags
       if (config_pressure_gradient_type.eq.'MontgomeryPotential') then
 
         ! For Isopycnal model.
@@ -631,10 +623,7 @@
       type (state_type), intent(inout) :: s !&lt; Input/Output: State information
       type (mesh_type), intent(in) :: grid !&lt; Input: Grid information
 
-! mrp 110512 I just split compute_tend into compute_tend_u and compute_tend_h.
-!  Some of these variables can be removed, but at a later time.
       integer :: iEdge, cell1, cell2, eoe, i, j, k
-
       integer :: nEdgesSolve
       real (kind=RKIND), dimension(:), pointer :: fEdge
       real (kind=RKIND), dimension(:,:), pointer :: weightsOnEdge, u, uBcl
@@ -814,15 +803,13 @@
         endif
 
         if (trim(config_time_integrator) == 'RK4') then
-            ! for RK4, PV is really PV = (eta+f)/h
+            ! For RK4, PV includes f: PV = (eta+f)/h.
             fCoef = 1
         elseif (trim(config_time_integrator) == 'split_explicit' &amp;
           .or.trim(config_time_integrator) == 'unsplit_explicit') then
-            ! for split explicit, PV is eta/h because f is added separately to the momentum forcing.
-            ! mrp temp, new should be:
+            ! For split explicit, PV is eta/h because the Coriolis term 
+            ! is added separately to the momentum tendencies.
             fCoef = 0
-            ! old, for testing:
-            !         fCoef = 1
         end if
 
     end subroutine ocn_diagnostics_init!}}}

Modified: branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_mpas_core.F
===================================================================
--- branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_mpas_core.F        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_mpas_core.F        2013-03-21 16:41:03 UTC (rev 2644)
@@ -169,16 +169,10 @@
          block =&gt; block % next
       end do
 
-   ! mrp 100316 In order for this to work, we need to pass domain % dminfo as an 
-   ! input arguement into mpas_init.  Ask about that later.  For now, there will be
-   ! no initial statistics write.
-   
       if (config_write_stats_on_startup) then
           call mpas_timer_start(&quot;global diagnostics&quot;, .false., globalDiagTimer)
           call ocn_compute_global_diagnostics(domain, 1 , 0, dt)
           call mpas_timer_stop(&quot;global diagnostics&quot;, globalDiagTimer)
-!         call mpas_output_state_init(output_obj, domain, &quot;OUTPUT&quot;)
-!         call ocn_write_output_frame(output_obj, output_frame, domain)
       endif
 
       current_outfile_frames = 0
@@ -296,7 +290,6 @@
                        block % state % time_levs(1) % state % uReconstructMeridional % array    &amp;
                       )
 
-!TDR
       call mpas_reconstruct(mesh, mesh % u_src % array,                  &amp;
                        block % state % time_levs(1) % state % uSrcReconstructX % array,            &amp;
                        block % state % time_levs(1) % state % uSrcReconstructY % array,            &amp;
@@ -304,18 +297,12 @@
                        block % state % time_levs(1) % state % uSrcReconstructZonal % array,        &amp;
                        block % state % time_levs(1) % state % uSrcReconstructMeridional % array    &amp;
                       )
-!TDR
 
-      ! initialize velocities and tracers on land to be -1e34
-      ! The reconstructed velocity on land will have values not exactly
-      ! -1e34 due to the interpolation of reconstruction.
+      ! initialize velocities and tracers on land to be zero.
 
       block % mesh % areaCell % array(block % mesh % nCells+1) = -1.0e34
 
       do iEdge=1,block % mesh % nEdges
-         ! mrp 101115 note: in order to include flux boundary conditions, the following
-         ! line will need to change.  Right now, set boundary edges between land and 
-         ! water to have zero velocity.
          block % state % time_levs(1) % state % u % array( &amp;
              block % mesh % maxLevelEdgeTop % array(iEdge)+1 &amp;
             :block % mesh % maxLevelEdgeBot % array(iEdge), iEdge) = 0.0
@@ -323,15 +310,11 @@
          block % state % time_levs(1) % state % u % array( &amp;
              block % mesh % maxLevelEdgeBot % array(iEdge)+1: &amp;
              block % mesh % nVertLevels,iEdge) = 0.0
-! mrp changed to 0
-!             block % mesh % nVertLevels,iEdge) = -1e34
       end do
       do iCell=1,block % mesh % nCells
          block % state % time_levs(1) % state % tracers % array( &amp;
             :, block % mesh % maxLevelCell % array(iCell)+1 &amp;
               :block % mesh % nVertLevels,iCell) =  0.0
-! mrp changed to 0
-!              :block % mesh % nVertLevels,iCell) =  -1e34
       end do
 
       do i=2,nTimeLevs
@@ -598,11 +581,6 @@
          nVertLevels = block % mesh % nVertLevels
          num_tracers = size(tracers, dim=1)
 
-         ! mrp 120208 right now hZLevel is in the grid.nc file.
-         ! We would like to transition to using refBottomDepth
-         ! as the defining variable instead, and will transition soon.
-         ! When the transition is done, hZLevel can be removed from
-         ! registry and the following four lines deleted.
          refBottomDepth(1) = hZLevel(1)
          do k = 2,nVertLevels
             refBottomDepth(k) = refBottomDepth(k-1) + hZLevel(k)

Modified: branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_tendency.F
===================================================================
--- branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_tendency.F        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_tendency.F        2013-03-21 16:41:03 UTC (rev 2644)
@@ -187,7 +187,6 @@
       !
       ! velocity tendency: start accumulating tendency terms
       !
-      ! mrp 110516 efficiency: could remove next line and have first tend_u operation not be additive
       tend_u(:,:) = 0.0
 
       if(config_disable_u_all_tend) return
@@ -230,8 +229,6 @@
       !
       ! velocity tendency: forcing and bottom drag
       !
-      ! mrp 101115 note: in order to include flux boundary conditions, we will need to 
-      ! know the bottom edge with nonzero velocity and place the drag there.
 
       call mpas_timer_start(&quot;forcings&quot;, .false., velForceTimer)
       call ocn_vel_forcing_tend(grid, u, u_src, ke_edge, h_edge, tend_u, err)
@@ -304,10 +301,6 @@
       !
       ! tracer tendency: horizontal advection term -div( h \phi u)
       !
-      ! mrp 101115 note: in order to include flux boundary conditions, we will need to 
-      ! assign h_edge for maxLevelEdgeTop:maxLevelEdgeBot in the compute_solve_diagnostics
-      ! and then change maxLevelEdgeTop to maxLevelEdgeBot in the following section.
-      ! tracer_edge at the boundary will also need to be defined for flux boundaries.
 
       ! Monotonoic Advection, or standard advection
       call mpas_timer_start(&quot;adv&quot;, .false., tracerHadvTimer)
@@ -321,19 +314,6 @@
       call ocn_tracer_hmix_tend(grid, h_edge, tracers, tend_tr, err)
       call mpas_timer_stop(&quot;hmix&quot;, tracerHmixTimer)
 
-! mrp 110516 printing
-!print *, 'tend_tr 1',minval(tend_tr(3,1,1:nCells)),&amp;
-!                   maxval(tend_tr(3,1,1:nCells))
-!print *, 'tracer  1',minval(tracers(3,1,1:nCells)),&amp;
-!                   maxval(tracers(3,1,1:nCells))
-! mrp 110516 printing end
-
-
-! mrp 110516 printing
-!print *, 'tend_tr 2',minval(tend_tr(3,1,1:nCells)),&amp;
-!                   maxval(tend_tr(3,1,1:nCells))
-! mrp 110516 printing end
-
       !
       ! add restoring to T and S in top model layer
       !
@@ -343,7 +323,6 @@
 
       call mpas_timer_stop(&quot;restoring&quot;, tracerRestoringTimer)
 
- 10   format(2i8,10e20.10)
       call mpas_timer_stop(&quot;ocn_tend_tracer&quot;)
 
       deallocate(uh)

Modified: branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_time_integration_rk4.F
===================================================================
--- branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_time_integration_rk4.F        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_time_integration_rk4.F        2013-03-21 16:41:03 UTC (rev 2644)
@@ -278,7 +278,7 @@
         ! For Richardson vertical mixing, only rho, h_edge, and ke_edge need to 
         ! be computed.  For kpp, more variables may be needed.  Either way, this
         ! could be made more efficient by only computing what is needed for the
-        ! implicit vmix routine that follows. mrp 121023.
+        ! implicit vmix routine that follows. 
         call ocn_diagnostic_solve(dt, block % state % time_levs(2) % state, block % mesh)
 
         call ocn_vmix_implicit(dt, block % mesh, block % diagnostics, block % state % time_levs(2) % state, err)
@@ -327,7 +327,6 @@
                           block % state % time_levs(2) % state % uReconstructMeridional % array    &amp;
                          )
 
-!TDR
          call mpas_reconstruct(block % mesh, block % mesh % u_src % array,          &amp;
                           block % state % time_levs(2) % state % uSrcReconstructX % array,            &amp;
                           block % state % time_levs(2) % state % uSrcReconstructY % array,            &amp;
@@ -335,7 +334,6 @@
                           block % state % time_levs(2) % state % uSrcReconstructZonal % array,        &amp;
                           block % state % time_levs(2) % state % uSrcReconstructMeridional % array    &amp;
                          )
-!TDR
 
          call ocn_time_average_accumulate(block % state % time_levs(2) % state, block % state % time_levs(1) % state)
 

Modified: branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_time_integration_split.F
===================================================================
--- branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_time_integration_split.F        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_time_integration_split.F        2013-03-21 16:41:03 UTC (rev 2644)
@@ -421,7 +421,6 @@
                 ! config_btr_gam1_uWt1=  1     flux = uBtrNew*H
                 ! config_btr_gam1_uWt1=0.5     flux = 1/2*(uBtrNew+uBtrOld)*H
                 ! config_btr_gam1_uWt1=  0     flux = uBtrOld*H
-                ! mrp 120201 efficiency: could we combine the following edge and cell loops?
 
                 do iCell = 1, block % mesh % nCells
                   do i = 1, block % mesh % nEdgesOnCell % array(iCell)
@@ -561,7 +560,6 @@
                   ! config_btr_gam3_uWt2=  1     flux = uBtrNew*H
                   ! config_btr_gam3_uWt2=0.5     flux = 1/2*(uBtrNew+uBtrOld)*H
                   ! config_btr_gam3_uWt2=  0     flux = uBtrOld*H
-                  ! mrp 120201 efficiency: could we combine the following edge and cell loops?
 
                   do iCell = 1, block % mesh % nCells
                     do i = 1, block % mesh % nEdgesOnCell % array(iCell)
@@ -772,13 +770,8 @@
          !
          !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-         !TDR: it seems almost trivial to hold off on doing T, S and rho updates until the 
-         !TDR: dycore time step is complete. we might want to take this opportunity to clean-up
-         !TDR: Stage3 in order to faciliate the testing of not doing tracer updates after this code is committed to trunk.
-         !TDR: at this point, I am suggesting just pushing some of this code into subroutines. 
-         !TDR: see comments farther down
-
-         ! dwj: 02/22/12 splitting thickness and tracer tendency computations and halo updates to allow monotonic advection.
+         ! Thickness tendency computations and thickness halo updates are completed before tracer 
+         ! tendency computations to allow monotonic advection.
          block =&gt; domain % blocklist
          do while (associated(block))
 
@@ -820,9 +813,6 @@
             !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
             if (split_explicit_step &lt; config_n_ts_iter) then
 
-            !TDR: should we move this code into a subroutine called &quot;compute_intermediate_value_at_midtime&quot;
-            !TDR: this could be within a contains statement in this routine
-
                ! Only need T &amp; S for earlier iterations,
                ! then all the tracers needed the last time through.
                do iCell=1,block % mesh % nCells
@@ -873,8 +863,8 @@
 
                end do ! iEdge
 
-               ! mrp 110512  I really only need this to compute h_edge, density, pressure, and SSH
-               ! I can par this down later.
+               ! Efficiency note: We really only need this to compute h_edge, density, pressure, and SSH 
+               ! in this diagnostics solve.
                call ocn_diagnostic_solve(dt, block % state % time_levs(2) % state, block % mesh)
 
               ! Compute uBolusGM
@@ -893,9 +883,6 @@
             !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
             elseif (split_explicit_step == config_n_ts_iter) then
 
-            !TDR: should we move this code into a subroutine called &quot;compute_final_values_at_nplus1&quot;?
-            !TDR: this could be within a contains statement in this routine
-
                do iCell=1,block % mesh % nCells
                   do k=1,block % mesh % maxLevelCell % array(iCell)
 
@@ -955,7 +942,7 @@
         ! For Richardson vertical mixing, only rho, h_edge, and ke_edge need to 
         ! be computed.  For kpp, more variables may be needed.  Either way, this
         ! could be made more efficient by only computing what is needed for the
-        ! implicit vmix routine that follows. mrp 121023.
+        ! implicit vmix routine that follows.
         call ocn_diagnostic_solve(dt, block % state % time_levs(2) % state, block % mesh)
 
         call ocn_vmix_implicit(dt, block % mesh, block % diagnostics, block % state % time_levs(2) % state, err)
@@ -1007,7 +994,6 @@
                           block % state % time_levs(2) % state % uReconstructMeridional % array    &amp;
                          )
 
-!TDR
          call mpas_reconstruct(block % mesh, block % mesh % u_src % array,          &amp;
                           block % state % time_levs(2) % state % uSrcReconstructX % array,            &amp;
                           block % state % time_levs(2) % state % uSrcReconstructY % array,            &amp;
@@ -1015,7 +1001,6 @@
                           block % state % time_levs(2) % state % uSrcReconstructZonal % array,        &amp;
                           block % state % time_levs(2) % state % uSrcReconstructMeridional % array    &amp;
                          )
-!TDR
 
          call ocn_time_average_accumulate(block % state % time_levs(2) % state, block % state % time_levs(1) % state)
 

Modified: branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_tracer_vadv.F
===================================================================
--- branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_tracer_vadv.F        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_tracer_vadv.F        2013-03-21 16:41:03 UTC (rev 2644)
@@ -123,11 +123,6 @@
 
       err = 0
 
-      ! mrp 120202 efficiency note:
-      ! The following if statement is not needed, since wTop is set to 
-      ! zero for isopycnal coordinates.  This if statment saves flops
-      ! for isopycnal coordinates.  However, if the loops are pushed
-      ! out, we could get rid of this if statement.
       if(.not.vadvOn) return
 
       call ocn_tracer_vadv_stencil_tend(grid, h, wTop, tracers, tend, err1)

Modified: branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F
===================================================================
--- branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F        2013-03-21 16:41:03 UTC (rev 2644)
@@ -150,8 +150,6 @@
             depthTop(k+1) = depthTop(k) +     h(k,iCell)
          enddo
 
-         ! mrp 110201 efficiency note: push tracer loop down
-         ! into spline subroutines to improve efficiency
          do iTracer=1,num_tracers
 
             ! Place data in arrays to avoid creating new temporary arrays for every 

Modified: branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_vel_hmix_del4.F
===================================================================
--- branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_vel_hmix_del4.F        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_vel_hmix_del4.F        2013-03-21 16:41:03 UTC (rev 2644)
@@ -179,7 +179,7 @@
          do k=1,maxLevelEdgeTop(iEdge)
             ! Compute </font>
<font color="black">abla^2 u = </font>
<font color="black">abla divergence + k \times </font>
<font color="gray">abla vorticity
             delsq_u(k, iEdge) =          ( divergence(k,cell2)  - divergence(k,cell1) ) * invDcEdge  &amp;
-                -viscVortCoef *( vorticity(k,vertex2) - vorticity(k,vertex1)) * invDcEdge * sqrt(3.0)   ! TDR
+                -viscVortCoef *( vorticity(k,vertex2) - vorticity(k,vertex1)) * invDcEdge * sqrt(3.0)   
          end do
       end do
 
@@ -219,7 +219,7 @@
 
          do k=1,maxLevelEdgeTop(iEdge)
             u_diffusion = (delsq_divergence(k,cell2) - delsq_divergence(k,cell1)) * invDcEdge  &amp;
-                -viscVortCoef * (delsq_vorticity(k,vertex2) - delsq_vorticity(k,vertex1) ) * invDcEdge * sqrt(3.0) ! TDR
+                -viscVortCoef * (delsq_vorticity(k,vertex2) - delsq_vorticity(k,vertex1) ) * invDcEdge * sqrt(3.0) 
 
             tend(k,iEdge) = tend(k,iEdge) - edgeMask(k, iEdge) * u_diffusion * r_tmp
          end do

Modified: branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_vel_vadv.F
===================================================================
--- branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_vel_vadv.F        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_vel_vadv.F        2013-03-21 16:41:03 UTC (rev 2644)
@@ -112,11 +112,6 @@
       real (kind=RKIND) :: wTopEdge
       real (kind=RKIND), dimension(:), allocatable :: w_dudzTopEdge
 
-      ! mrp 120202 efficiency note:
-      ! The following if statement is not needed, since wTop is set to 
-      ! zero for isopycnal coordinates.  This if statment saves flops
-      ! for isopycnal coordinates.  However, if the loops are pushed
-      ! out, we could get rid of this if statement.
       if(.not.velVadvOn) return
 
       err = 0

Modified: branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_vmix_coefs_rich.F
===================================================================
--- branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_vmix_coefs_rich.F        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement/src/core_ocean/mpas_ocn_vmix_coefs_rich.F        2013-03-21 16:41:03 UTC (rev 2644)
@@ -223,13 +223,11 @@
 
       do iEdge = 1,nEdges
          do k = 2,maxLevelEdgeTop(iEdge)
-            ! mrp 110324 efficiency note: this if is inside iEdge and k loops.
+            ! efficiency note: these if statements are inside iEdge and k loops.
             ! Perhaps there is a more efficient way to do this.
             if (RiTopOfEdge(k,iEdge)&gt;0.0) then
                vertViscTopOfEdge(k,iEdge) = vertViscTopOfEdge(k, iEdge) + config_bkrd_vert_visc &amp;
                   + config_rich_mix / (1.0 + 5.0*RiTopOfEdge(k,iEdge))**2
-               ! maltrud do limiting of coefficient--should not be necessary
-               ! also probably better logic could be found
                if (vertViscTopOfEdge(k,iEdge) &gt; config_convective_visc) then
                   vertViscTopOfEdge(k,iEdge) = config_convective_visc
                end if
@@ -314,15 +312,13 @@
       coef = -gravity/config_rho0/2.0
       do iCell = 1,nCells
          do k = 2,maxLevelCell(iCell)
-            ! mrp 110324 efficiency note: this if is inside iCell and k loops.
+            ! efficiency note: these if statements are inside iEdge and k loops.
             ! Perhaps there is a more efficient way to do this.
             if (RiTopOfCell(k,iCell)&gt;0.0) then
                vertDiffTopOfCell(k,iCell) = vertDiffTopOfCell(k, iCell) + config_bkrd_vert_diff &amp;
                   + (config_bkrd_vert_visc &amp; 
                      + config_rich_mix / (1.0 + 5.0*RiTopOfCell(k,iCell))**2) &amp;
                   / (1.0 + 5.0*RiTopOfCell(k,iCell))
-            ! maltrud do limiting of coefficient--should not be necessary
-            ! also probably better logic could be found
                if (vertDiffTopOfCell(k,iCell) &gt; config_convective_diff) then
                   vertDiffTopOfCell(k,iCell) = config_convective_diff
                end if
@@ -432,16 +428,6 @@
          drhoTopOfCell(nVertLevels+1,nCells+1), drhoTopOfEdge(nVertLevels+1,nEdges), &amp;
          du2TopOfCell(nVertLevels+1,nCells+1), du2TopOfEdge(nVertLevels+1,nEdges))
 
-      ! compute density of parcel displaced to next deeper z-level,
-      ! in state % rhoDisplaced
-!maltrud make sure rho is current--check this for redundancy
-!     call OcnEquationOfStateRho(grid, 'relative', 0, indexT, indexS, &amp;
-!              tracers, rho, err) 
-      ! mrp 110324 In order to visualize rhoDisplaced, include the following
-!     call OcnEquationOfStateRho(grid, 'relative', 1, indexT, indexS, &amp;
-!              tracers, rhoDisplaced, err) 
-
-
       ! drhoTopOfCell(k) = $\rho^*_{k-1}-\rho^*_k$
       drhoTopOfCell = 0.0
       do iCell=1,nCells

Modified: branches/ocean_projects/gm_implement/src/framework/mpas_io.F
===================================================================
--- branches/ocean_projects/gm_implement/src/framework/mpas_io.F        2013-03-21 16:36:37 UTC (rev 2643)
+++ branches/ocean_projects/gm_implement/src/framework/mpas_io.F        2013-03-21 16:41:03 UTC (rev 2644)
@@ -1248,7 +1248,10 @@
             pio_ierr = PIO_get_var(handle % pio_file, field_cursor % fieldhandle % fieldid, start2, count2, tempchar)
             charVal(1:count2(1)) = tempchar(1)(1:count2(1))
          else
-            pio_ierr = PIO_get_var(handle % pio_file, field_cursor % fieldhandle % field_desc, charVal)
+            start1(1) = 1
+            count1(1) = field_cursor % fieldhandle % dims(1) % dimsize
+            pio_ierr = PIO_get_var(handle % pio_file, field_cursor % fieldhandle % fieldid, start1, count1, tempchar)
+            charVal(1:count1(1)) = tempchar(1)(1:count1(1))
          end if
       else if (present(realArray1d)) then
 !         write (0,*) '  value is real1'
@@ -1643,7 +1646,9 @@
             count2(1) = field_cursor % fieldhandle % dims(1) % dimsize
             pio_ierr = PIO_put_var(handle % pio_file, field_cursor % fieldhandle % fieldid, start2, count2, (/charVal/))
          else
-            pio_ierr = PIO_put_var(handle % pio_file, field_cursor % fieldhandle % field_desc, charVal)
+            start1(1) = 1
+            count1(1) = field_cursor % fieldhandle % dims(1) % dimsize
+            pio_ierr = PIO_put_var(handle % pio_file, field_cursor % fieldhandle % fieldid, start1, count1, (/charVal/))
          end if
       else if (present(realArray1d)) then
          call PIO_write_darray(handle % pio_file, field_cursor % fieldhandle % field_desc, field_cursor % fieldhandle % decomp % pio_iodesc, &amp;

</font>
</pre>