<p><b>duda</b> 2011-07-22 11:42:55 -0600 (Fri, 22 Jul 2011)</p><p>BRANCH COMMIT<br>
<br>
Fixes to vertical coordinate smoothing code in non-hydrostatic initialization;<br>
hybrid vertical coordinate is now enabled by default.<br>
<br>
<br>
M    src/core_init_nhyd_atmos/module_test_cases.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_init_nhyd_atmos/module_test_cases.F
===================================================================
--- branches/atmos_physics/src/core_init_nhyd_atmos/module_test_cases.F        2011-07-20 23:31:21 UTC (rev 926)
+++ branches/atmos_physics/src/core_init_nhyd_atmos/module_test_cases.F        2011-07-22 17:42:55 UTC (rev 927)
@@ -2759,7 +2759,7 @@
                                      / dcEdge(edgesOnCell(j,iCell))    &amp;
                                      *   (ter(cellsOnCell(j,iCell))-ter(iCell))
             end do
-            hs(iCell) = ter(iCell) + 0.125*hs(iCell)
+            hs(iCell) = ter(iCell) + 0.25*hs(iCell)
          end do
 
          do iCell=1,grid %nCells
@@ -2769,7 +2769,7 @@
                                      / dcEdge(edgesOnCell(j,iCell))    &amp;
                                      *    (hs(cellsOnCell(j,iCell))-hs(iCell))
             end do
-            ter(iCell) = hs(iCell) - 0.125*ter(iCell)
+            ter(iCell) = hs(iCell) - 0.25*ter(iCell)
          end do
 
          call dmpar_exch_halo_field1dReal(dminfo, ter(:), &amp;
@@ -2804,13 +2804,14 @@
 !           ah(k) = 1.-zw(k)/zt is the basic terrain-following coordinate
 !           ah(k) = 0           is a height coordinate
  
-!      hybrid = .true.
-      hybrid = .false.
+      hybrid = .true.
+!      hybrid = .false.
 
       kz = nz
       if (hybrid) then
       
          zh = zt
+!         zh = 0.5*zt
 
          do k=1,nz
             if (zw(k) &lt; zh) then
@@ -2878,8 +2879,7 @@
 
       if (smooth) then
 
-         dzmin = 0.2
-!         dzmin = 0.4
+         dzmin = 0.3
 
          do k=2,kz-1
             hx(k,:) = hx(k-1,:)
@@ -2887,8 +2887,8 @@
 
 !            dzmin = max(.5,1.-.5*zw(k)/hm)
 
-            sm = .0625*min(.5*zw(k)/hm,1.)
-
+            sm = .05*min(.5*zw(k)/hm,1.)
+          
             do i=1,50
                do iCell=1,grid %nCells
                   hs1(iCell) = 0.
@@ -2901,11 +2901,11 @@
                   hs1(iCell) = hx(k,iCell) + sm*hs1(iCell)
 
                   hs(iCell) = 0.
-                  do j = 1,nEdgesOnCell(iCell)
-                     hs(iCell) = hs(iCell) + dvEdge(edgesOnCell(j,iCell))    &amp;
-                                           / dcEdge(edgesOnCell(j,iCell))    &amp;
-                                           *  (hs1(cellsOnCell(j,iCell))-hs1(iCell))
-                  end do
+              !    do j = 1,nEdgesOnCell(iCell)
+              !       hs(iCell) = hs(iCell) + dvEdge(edgesOnCell(j,iCell))    &amp;
+              !                             / dcEdge(edgesOnCell(j,iCell))    &amp;
+              !                             *  (hs1(cellsOnCell(j,iCell))-hs1(iCell))
+              !    end do
                   hs(iCell) = hs1(iCell) - 0.*hs(iCell)
 
                end do
@@ -2914,7 +2914,9 @@
                                                 grid % nCells, &amp;
                                                 parinfo % cellsToSend, parinfo % cellsToRecv)
 
-               dzmina = minval(hs(:)-hx(k-1,:))
+             !  dzmina = minval(hs(:)-hx(k-1,:))
+               dzmina = minval(zw(k)+ah(k)*hs(:)-zw(k-1)-ah(k-1)*hx(k-1,:))
+             !  write(6,*) ' k,i, dzmina, dzmin, zw(k)-zw(k-1) ', k,i, dzmina, dzmin, zw(k)-zw(k-1)
                if (dzmina &gt;= dzmin*(zw(k)-zw(k-1))) then
                   hx(k,:)=hs(:)
                   dzminf = dzmina

</font>
</pre>