<p><b>dwj07@fsu.edu</b> 2012-04-04 11:50:49 -0600 (Wed, 04 Apr 2012)</p><p><br>
        -- TRUNK COMMIT --<br>
<br>
        core_ocean only.<br>
<br>
        Fixing check for monotonicity within advection routines.<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/mpas/src/core_ocean/mpas_ocn_tracer_advection_mono.F
===================================================================
--- trunk/mpas/src/core_ocean/mpas_ocn_tracer_advection_mono.F        2012-04-03 22:07:41 UTC (rev 1745)
+++ trunk/mpas/src/core_ocean/mpas_ocn_tracer_advection_mono.F        2012-04-04 17:50:49 UTC (rev 1746)
@@ -324,19 +324,17 @@
if (config_check_monotonicity) then
!build min and max bounds on old and new tracer for check on monotonicity.
- cur_min = minval(tracer_cur(:,1:nCellsSolve))
- cur_max = maxval(tracer_cur(:,1:nCellsSolve))
- new_min = minval(tracer_new(:,1:nCellsSolve))
- new_max = maxval(tracer_new(:,1:nCellsSolve))
+ do iCell = 1, nCellsSolve
+ do k = 1, maxLevelCell(iCell)
+ if(tracer_new(k,iCell) < tracer_min(k, iCell)-eps) then
+ write(*,*) 'Minimum out of bounds on tracer ', iTracer, tracer_min(k, iCell), tracer_new(k,iCell)
+ end if
- !check monotonicity
- if(new_min < cur_min-eps) then
- write(*,*) 'Minimum out of bounds on tracer ', iTracer, cur_min, new_min
- end if
-
- if(new_max > cur_max+eps) then
- write(*,*) 'Maximum out of bounds on tracer ', iTracer, cur_max, new_max
- end if
+ if(tracer_new(k,iCell) > tracer_max(k,iCell)+eps) then
+ write(*,*) 'Maximum out of bounds on tracer ', iTracer, tracer_max(k, iCell), tracer_new(k,iCell)
+ end if
+ end do
+ end do
end if
end do ! iTracer loop
</font>
</pre>