<p><b>mpetersen@lanl.gov</b> 2011-06-07 13:04:07 -0600 (Tue, 07 Jun 2011)</p><p>Added a flag for the barotropic velocity correction.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/timesplitting_mrp/namelist.input.ocean
===================================================================
--- branches/ocean_projects/timesplitting_mrp/namelist.input.ocean        2011-06-06 22:40:49 UTC (rev 879)
+++ branches/ocean_projects/timesplitting_mrp/namelist.input.ocean        2011-06-07 19:04:07 UTC (rev 880)
@@ -29,6 +29,7 @@
config_n_btr_subcycles = 10
config_n_btr_cor_iter = 2
config_compute_tr_midstage = .true.
+ config_u_correction = .true.
/
&hmix
config_h_mom_eddy_visc2 = 1.0e5
Modified: branches/ocean_projects/timesplitting_mrp/src/core_ocean/Registry
===================================================================
--- branches/ocean_projects/timesplitting_mrp/src/core_ocean/Registry        2011-06-06 22:40:49 UTC (rev 879)
+++ branches/ocean_projects/timesplitting_mrp/src/core_ocean/Registry        2011-06-07 19:04:07 UTC (rev 880)
@@ -23,6 +23,7 @@
namelist integer timestep_higdon config_n_btr_subcycles 10
namelist integer timestep_higdon config_n_btr_cor_iter 1
namelist logical timestep_higdon config_compute_tr_midstage true
+namelist logical timestep_higdon config_u_correction true
namelist logical sw_model config_h_ScaleWithMesh false
namelist real hmix config_h_mom_eddy_visc2 0.0
namelist real hmix config_h_mom_eddy_visc4 0.0
Modified: branches/ocean_projects/timesplitting_mrp/src/core_ocean/module_time_integration.F
===================================================================
--- branches/ocean_projects/timesplitting_mrp/src/core_ocean/module_time_integration.F        2011-06-06 22:40:49 UTC (rev 879)
+++ branches/ocean_projects/timesplitting_mrp/src/core_ocean/module_time_integration.F        2011-06-07 19:04:07 UTC (rev 880)
@@ -379,7 +379,7 @@
real (kind=RKIND) :: uhSum, hSum, grav_rho0Inv, sshEdge, flux, &
uPerp, uCorr, tracerTemp
- integer :: nCells, nEdges, nVertLevels, num_tracers
+ integer :: nCells, nEdges, nVertLevels, num_tracers, ucorr_coef
real (kind=RKIND), dimension(:,:), pointer :: &
u, h, h_edge, vertViscTopOfEdge, vertDiffTopOfCell
real (kind=RKIND), dimension(:,:,:), pointer :: tracers
@@ -948,6 +948,12 @@
! - \sum_{k=1}^{N^{edge}} \left(\zeta_{k,n}^{*\;edge}+\Delta z_k\right) u_k^* \right)
!\left/ \sum_{k=1}^{N^{edge}} \left(\zeta_{k,n}^{*\;edge}+\Delta z_k\right) \right.
+ if (config_u_correction) then
+ ucorr_coef = 1
+ else
+ ucorr_coef = 0
+ endif
+
do iEdge=1,block % mesh % nEdges
cell1 = block % mesh % cellsOnEdge % array(1,iEdge)
cell2 = block % mesh % cellsOnEdge % array(2,iEdge)
@@ -969,13 +975,13 @@
hSum = hSum + block % mesh % hZLevel % array(k)
enddo
-! mrp temp 110602 testing split: remove correction term.
- uCorr = ( block % state % time_levs(1) % state % FBtr % array(iEdge) &
- /block % mesh % dvEdge % array(iEdge) &
- - uhSum)/hSum
-! uCorr = 0.0
-! mrp temp 110602 testing split end
+ uCorr = ucorr_coef*(( block % state % time_levs(1) % state % FBtr % array(iEdge) &
+ /block % mesh % dvEdge % array(iEdge) &
+ - uhSum)/(sshEdge + block % mesh % hZLevel % array(1)))
+
+
+
! put u^{tr}, the velocity for tracer transport, in uNew
! mrp 060611 not sure if boundary enforcement is needed here.
if (block % mesh % boundaryEdge % array(1,iEdge).eq.1) then
@@ -1157,12 +1163,17 @@
do k=1,block % mesh % maxLevelCell % array(iCell)
do i=1,block % state % time_levs(1) % state % num_tracers
! This is Phi at n+1
+! mrp temp orig
block % state % time_levs(2) % state % tracers % array(i,k,iCell) &
= ( block % state % time_levs(1) % state % tracers % array(i,k,iCell) &
* block % state % time_levs(1) % state % h % array(k,iCell) &
+ dt * block % tend % tracers % array(i,k,iCell) &
) / hNew(k)
+! mrp replace with this for constant tracers:
+! block % state % time_levs(2) % state % tracers % array(i,k,iCell) &
+! = block % state % time_levs(1) % state % tracers % array(i,k,iCell)
+
enddo
end do
end do
</font>
</pre>