<p><b>mpetersen@lanl.gov</b> 2012-07-24 13:56:49 -0600 (Tue, 24 Jul 2012)</p><p>TRUNK COMMIT: Ocean core only.<br>
<br>
Fix tracer normalization in RK4. Trunk now matches bit-for-bit<br>
against rich_vert_mix_bug branch commit r2031 using RK4 on 120km<br>
global. The normalization was missed in r2039 and the subsequent<br>
trunk merge.<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/mpas/src/core_ocean/mpas_ocn_time_integration_rk4.F
===================================================================
--- trunk/mpas/src/core_ocean/mpas_ocn_time_integration_rk4.F        2012-07-24 18:25:25 UTC (rev 2049)
+++ trunk/mpas/src/core_ocean/mpas_ocn_time_integration_rk4.F        2012-07-24 19:56:49 UTC (rev 2050)
@@ -258,6 +258,21 @@
!
call mpas_timer_start("RK4-cleaup phase")
+ block => domain % blocklist
+ do while (associated(block))
+
+ ! In main RK loop, tracer array is phi*h. Now divide by h^{n+1} to obtain phi^{n+1}.
+ do iCell=1,block % mesh % nCells
+ do k=1,block % mesh % maxLevelCell % array(iCell)
+ block % state % time_levs(2) % state % tracers % array(:,k,iCell) &
+ = block % state % time_levs(2) % state % tracers % array(:,k,iCell) &
+ /block % state % time_levs(2) % state % h % array(k,iCell)
+ end do
+ end do
+
+ block => block % next
+ end do
+
if (config_implicit_vertical_mix) then
call mpas_timer_start("RK4-implicit vert mix")
block => domain % blocklist
</font>
</pre>