<p><b>dwj07@fsu.edu</b> 2011-11-04 15:22:27 -0600 (Fri, 04 Nov 2011)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Removing if within the do loop, by adding another do loop that either does one iteration or no iterations.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_forcing_windstress.F
===================================================================
--- branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_forcing_windstress.F        2011-11-04 21:01:33 UTC (rev 1172)
+++ branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_forcing_windstress.F        2011-11-04 21:22:27 UTC (rev 1173)
@@ -126,17 +126,15 @@
do iEdge=1,nEdgesSolve
- 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>0) then
+ do k = 1,min(maxLevelEdgeTop(iEdge),1)
! forcing in top layer only
- tend(1,iEdge) = tend(1,iEdge) + edgeMask(k, iEdge) * (u_src(1,iEdge)/rho_ref/h_edge(1,iEdge))
- endif
+ tend(k,iEdge) = tend(k,iEdge) + edgeMask(k, iEdge) * (u_src(k,iEdge)/rho_ref/h_edge(k,iEdge))
+ enddo
enddo
</font>
</pre>