<p><b>mpetersen@lanl.gov</b> 2011-12-06 11:16:37 -0700 (Tue, 06 Dec 2011)</p><p>Revise branch to accomodate ALE vertical coordinate:<br>
<br>
1. move call ocn_wtop from end of diagnostics to beginning of each<br>
timestep. This is the ALE call that determines the vertical grid<br>
thickness.<br>
<br>
2. Change thickness tendency in mpas_ocn_thick_vadv.F to always use<br>
full thickness equation, regardless of vert grid type.<br>
<br>
3. Change hZLevel to h in wtop calc.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_mpas_core.F
===================================================================
--- branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_mpas_core.F        2011-12-02 22:11:13 UTC (rev 1236)
+++ branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_mpas_core.F        2011-12-06 18:16:37 UTC (rev 1237)
@@ -248,7 +248,7 @@
! :block % mesh % nVertLevels,iCell) = -1e34
! mrp 110516, added just to test for conservation of tracers
-! block % state % time_levs(1) % state % tracers % array(block % state % time_levs(1) % state % index_tracer1,:,iCell) = 1.0
+ block % state % time_levs(1) % state % tracers % array(block % state % time_levs(1) % state % index_tracer1,:,iCell) = 1.0
end do
@@ -495,8 +495,10 @@
! These should eventually be in an input file. For now
! I just read them in from h(:,1).
! Upon restart, the correct hZLevel should be in restart.nc
- if (.not. config_do_restart) hZLevel = h(:,1)
+ ! mrp 111206. hZLevel is read in from input file.
+ ! if (.not. config_do_restart) hZLevel = h(:,1)
+
! hZLevel should be in the grid.nc and restart.nc file,
! and h for k=1 must be specified there as well.
Modified: branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tendency.F
===================================================================
--- branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tendency.F        2011-12-02 22:11:13 UTC (rev 1236)
+++ branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tendency.F        2011-12-06 18:16:37 UTC (rev 1237)
@@ -1105,7 +1105,8 @@
endif
- call ocn_wtop(s,grid)
+! mrp 111206 remove
+! call ocn_wtop(s,grid)
call mpas_timer_stop("ocn_diagnostic_solve")
@@ -1148,7 +1149,7 @@
real (kind=RKIND), dimension(:), pointer :: &
h_s, fVertex, fEdge, dvEdge, dcEdge, areaCell, areaTriangle, &
hZLevel
- real (kind=RKIND), dimension(:,:), pointer :: u,wTop
+ real (kind=RKIND), dimension(:,:), pointer :: u,wTop, h_edge
real (kind=RKIND), dimension(:,:), allocatable:: div_u
integer, dimension(:,:), pointer :: cellsOnEdge, cellsOnVertex, &
@@ -1162,6 +1163,7 @@
u => s % u % array
wTop => s % wTop % array
+ h_edge => s % h_edge % array
areaCell => grid % areaCell % array
cellsOnEdge => grid % cellsOnEdge % array
@@ -1193,7 +1195,7 @@
cell1 = cellsOnEdge(1,iEdge)
cell2 = cellsOnEdge(2,iEdge)
do k=2,maxLevelEdgeBot(iEdge)
- flux = u(k,iEdge) * dvEdge(iEdge)
+ flux = u(k,iEdge) * dvEdge(iEdge) * h_edge(k,iEdge)
div_u(k,cell1) = div_u(k,cell1) + flux
div_u(k,cell2) = div_u(k,cell2) - flux
end do
@@ -1206,7 +1208,7 @@
wTop(maxLevelCell(iCell)+1,iCell) = 0.0
do k=maxLevelCell(iCell),2,-1
wTop(k,iCell) = wTop(k+1,iCell) &
- - div_u(k,iCell)/areaCell(iCell)*hZLevel(k)
+ - div_u(k,iCell)/areaCell(iCell)
end do
end do
deallocate(div_u)
Modified: branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_thick_vadv.F
===================================================================
--- branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_thick_vadv.F        2011-12-02 22:11:13 UTC (rev 1236)
+++ branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_thick_vadv.F        2011-12-06 18:16:37 UTC (rev 1237)
@@ -112,11 +112,9 @@
nCells = grid % nCells
- if (config_vert_grid_type.eq.'zlevel') then
- do iCell=1,nCells
- tend(1,iCell) = tend(1,iCell) + wTop(2,iCell)
- end do
- endif ! coordinate type
+ do iCell=1,nCells
+ tend(1,iCell) = tend(1,iCell) + wTop(2,iCell)
+ end do
!--------------------------------------------------------------------
Modified: branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_time_integration_rk4.F
===================================================================
--- branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_time_integration_rk4.F        2011-12-02 22:11:13 UTC (rev 1236)
+++ branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_time_integration_rk4.F        2011-12-06 18:16:37 UTC (rev 1237)
@@ -165,6 +165,10 @@
call mpas_timer_start("RK4-tendency computations")
block => domain % blocklist
do while (associated(block))
+
+ ! mrp 111206 put ocn_wtop call at top for ALE
+ call ocn_wtop(provis, block % mesh)
+
if (.not.config_implicit_vertical_mix) then
call ocn_vmix_coefs(block % mesh, provis, block % diagnostics, err)
end if
</font>
</pre>