<p><b>maltrud@lanl.gov</b> 2011-05-25 15:25:11 -0600 (Wed, 25 May 2011)</p><p>Mark P pointed out faulty logic in limiting of vertical mixing coefficients.<br>
this has been fixed, but is fairly clumsy, so should be revisited.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/module_time_integration.F
===================================================================
--- branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/module_time_integration.F        2011-05-25 21:04:15 UTC (rev 853)
+++ branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/module_time_integration.F        2011-05-25 21:25:11 UTC (rev 854)
@@ -2033,12 +2033,14 @@
vertViscTopOfEdge(k,iEdge) = config_bkrd_vert_visc &
+ config_rich_mix / (1.0 + 5.0*RiTopOfEdge(k,iEdge))**2
! maltrud do limiting of coefficient--should not be necessary
- if (vertViscTopOfEdge(k,iEdge) > config_convective_visc &
- .and. config_implicit_vertical_mix) then
- vertViscTopOfEdge(k,iEdge) = config_convective_visc
- else
- vertViscTopOfEdge(k,iEdge) = &
+ ! also probably better logic could be found
+ if (vertViscTopOfEdge(k,iEdge) > config_convective_visc) then
+ if( config_implicit_vertical_mix) then
+ vertViscTopOfEdge(k,iEdge) = config_convective_visc
+ else
+ vertViscTopOfEdge(k,iEdge) = &
((h_edge(k-1,iEdge)+h_edge(k,iEdge))/2.0)**2/config_dt/4.0
+ end if
end if
else
! mrp 110324 efficiency note: this if is inside iCell and k loops.
@@ -2100,12 +2102,14 @@
+ config_rich_mix / (1.0 + 5.0*RiTopOfCell(k,iCell))**2) &
/ (1.0 + 5.0*RiTopOfCell(k,iCell))
! maltrud do limiting of coefficient--should not be necessary
- if (vertDiffTopOfCell(k,iCell) > config_convective_diff &
- .and. config_implicit_vertical_mix) then
- vertDiffTopOfCell(k,iCell) = config_convective_diff
- else
- vertDiffTopOfCell(k,iCell) = &
- ((h(k-1,iCell)+h(k,iCell))/2.0)**2/config_dt/4.0
+ ! also probably better logic could be found
+ if (vertDiffTopOfCell(k,iCell) > config_convective_diff) then
+ if (config_implicit_vertical_mix) then
+ vertDiffTopOfCell(k,iCell) = config_convective_diff
+ else
+ vertDiffTopOfCell(k,iCell) = &
+ ((h(k-1,iCell)+h(k,iCell))/2.0)**2/config_dt/4.0
+ end if
end if
else
! mrp 110324 efficiency note: this if is inside iCell and k loops.
</font>
</pre>