<p><b>mpetersen@lanl.gov</b> 2011-10-25 10:56:13 -0600 (Tue, 25 Oct 2011)</p><p>Commiting this version, which can fill in IC to run a global flat bottom.  It turns out that the global flat bottom was not that useful, so I will remove it in the next revision.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/split_explicit_timestepping/src/core_ocean/Registry
===================================================================
--- branches/ocean_projects/split_explicit_timestepping/src/core_ocean/Registry        2011-10-25 16:53:58 UTC (rev 1128)
+++ branches/ocean_projects/split_explicit_timestepping/src/core_ocean/Registry        2011-10-25 16:56:13 UTC (rev 1129)
@@ -20,6 +20,7 @@
 namelist character restart  config_restart_interval    none
 namelist character grid     config_vert_grid_type      isopycnal
 namelist real      grid     config_rho0                1028
+namelist integer   grid     config_minMaxLevelCell     0
 namelist integer   split_explicit_ts config_n_ts_iter     2
 namelist integer   split_explicit_ts config_n_bcl_iter_beg   4
 namelist integer   split_explicit_ts config_n_bcl_iter_mid   4

Modified: branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_mpas_core.F
===================================================================
--- branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_mpas_core.F        2011-10-25 16:53:58 UTC (rev 1128)
+++ branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_mpas_core.F        2011-10-25 16:56:13 UTC (rev 1129)
@@ -609,7 +609,8 @@
 
    type (domain_type), intent(inout) :: domain
 
-   integer :: i, iCell, iEdge, iVertex, k
+   integer :: i, iCell, iEdge, iVertex, k, iTr, iter, count, level
+
    type (block_type), pointer :: block
 
    real (kind=RKIND), dimension(:,:), pointer :: h, u, u_src, rho
@@ -625,6 +626,116 @@
       cellsOnEdge, cellsOnVertex, boundaryEdge, boundaryCell, &amp;
       boundaryVertex, verticesOnEdge
 
+! mrp 110926 change maxleveledge minimum
+      print *, 'WARNING: changing T&amp;S, below max level'
+   block =&gt; domain % blocklist
+   do while (associated(block))
+      maxLevelCell =&gt; block % mesh % maxLevelCell % array
+
+           do iCell=1,block % mesh % nCells
+              do k=1, block % mesh % nVertLevels
+                 if (k.gt.maxLevelCell(iCell)) then
+                   block % state % time_levs(1) % state % tracers % array(1,k,iCell) =  8.5-.2*k
+                   block % state % time_levs(1) % state % tracers % array(2,k,iCell) =  34.8
+                 endif
+              end do
+           end do
+
+! mrp 110923 print
+      nCells      = block % mesh % nCells
+      do iCell=1,block % mesh % nCells
+         do k=35, block % mesh % nVertLevels
+
+           if (block % state % time_levs(1) % state % tracers % array(1,k,iCell)&gt;7) then
+              print '(a,3i5,100f20.14)', '&gt;7',k,iCell,maxLevelCell(iCell),block % state % time_levs(1) % state % tracers % array(1,:,iCell)
+                   block % state % time_levs(1) % state % tracers % array(1,k,iCell) =  8.5-.2*k
+                   block % state % time_levs(1) % state % tracers % array(2,k,iCell) =  34.8
+                
+           endif
+
+         enddo
+      enddo
+
+k=40
+print *, 'tracer T 0',k,minval(block % state % time_levs(1) % state % tracers % array(1,k,1:nCells)), &amp;
+                        maxval(block % state % time_levs(1) % state % tracers % array(1,k,1:nCells))
+print *, 'tracer S 0',k,minval(block % state % time_levs(1) % state % tracers % array(2,k,1:nCells)), &amp;
+                        maxval(block % state % time_levs(1) % state % tracers % array(2,k,1:nCells))
+! mrp 110923 print end
+
+      block =&gt; block % next
+   end do
+
+      ! smooth out with boundaries, just do a simple averaging with neighbors.
+      do iter=1,100
+   block =&gt; domain % blocklist
+   do while (associated(block))
+      nCells      = block % mesh % nCells
+      maxLevelCell =&gt; block % mesh % maxLevelCell % array
+      nVertLevels = block % mesh % nVertLevels
+
+        do iCell=1,block % mesh % nCells
+
+           do iTr=1,2
+               block % state % time_levs(2) % state % tracers % array(iTr,1:maxLevelCell(iCell),iCell)  &amp;
+             = block % state % time_levs(1) % state % tracers % array(iTr,1:maxLevelCell(iCell),iCell)
+            do k=maxLevelCell(iCell)+1,config_minMaxLevelCell
+             block % state % time_levs(2) % state % tracers % array(iTr,k,iCell) = 0.0
+             count=0
+             do i=1, block % mesh % nEdgesOnCell % array (iCell)
+   
+               if (block % mesh % CellsOnCell % array (i,iCell).lt.nCells+1) then
+                   block % state % time_levs(2) % state % tracers % array(iTr,k,iCell) &amp;
+                 = block % state % time_levs(2) % state % tracers % array(iTr,k,iCell) &amp;
+                 + block % state % time_levs(1) % state % tracers % array(iTr,k,block % mesh % CellsOnCell % array (i,iCell))
+                 count=count+1
+               endif
+             end do
+                   block % state % time_levs(2) % state % tracers % array(iTr,k,iCell) &amp;
+                 = block % state % time_levs(2) % state % tracers % array(iTr,k,iCell) &amp;
+                 / count
+            end do ! k
+            end do ! iTr
+        end do ! icell
+                   block % state % time_levs(1) % state % tracers % array &amp;
+                 = block % state % time_levs(2) % state % tracers % array
+   
+      block =&gt; block % next
+   end do
+
+        block =&gt; domain % blocklist
+        do while (associated(block))
+           call dmpar_exch_halo_field3dReal(domain % dminfo, block % state % time_levs(1) % state % tracers % array(:,:,:), &amp;
+                                            block % tend % num_tracers, block % mesh % nVertLevels, block % mesh % nCells, &amp;
+                                            block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
+           block =&gt; block % next
+        end do
+
+      enddo ! iter
+
+      print *, 'WARNING: changing topography, ',&amp;
+        'so minimimum MaxLevelCell is', config_minMaxLevelCell
+   block =&gt; domain % blocklist
+   do while (associated(block))
+      maxLevelCell =&gt; block % mesh % maxLevelCell % array
+
+      do iCell=1,block % mesh % nCells
+         maxLevelCell(iCell) = max(maxLevelCell(iCell),config_minMaxLevelCell)
+      enddo
+
+! mrp 110923 print
+print *, 'tracer T 1',minval(block % state % time_levs(1) % state % tracers % array(1,:,1:nCells)), &amp;
+                      maxval(block % state % time_levs(1) % state % tracers % array(1,:,1:nCells))
+print *, 'tracer S 1',minval(block % state % time_levs(1) % state % tracers % array(2,:,1:nCells)), &amp;
+                      maxval(block % state % time_levs(1) % state % tracers % array(2,:,1:nCells))
+! mrp 110923 print end
+
+      block =&gt; block % next
+   end do
+
+! mrp 110926 change maxleveledge minimum end
+
+
    ! Initialize z-level grid variables from h, read in from input file.
    block =&gt; domain % blocklist
    do while (associated(block))

</font>
</pre>