<p><b>mpetersen@lanl.gov</b> 2012-02-02 16:19:41 -0700 (Thu, 02 Feb 2012)</p><p>BRANCH COMMIT<br>
<br>
Adding flag:<br>
 &amp;grid<br>
   config_pressure_type = 'pressure'<br>
<br>
can be 'MontgomeryPotential' to use grad M as pressure gradient<br>
or can be 'pressure' for z-level pressure formulation.<br>
<br>
I added the flag so that one can run in isopycnal coordinates but with<br>
a zlevel-type pressure formulation, rather than Montgomery Potential.<br>
<br>
It looks as if we can run with split explicit timestepping in<br>
isopycnal coordinates, with<br>
   config_pressure_type = 'pressure'<br>
This will require more testing, but initial tests look promising.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/ale_split_exp/namelist.input.ocean
===================================================================
--- branches/ocean_projects/ale_split_exp/namelist.input.ocean        2012-02-02 22:42:04 UTC (rev 1456)
+++ branches/ocean_projects/ale_split_exp/namelist.input.ocean        2012-02-02 23:19:41 UTC (rev 1457)
@@ -20,6 +20,7 @@
 /
 &amp;grid
    config_vert_grid_type = 'zlevel'
+   config_pressure_type = 'pressure'
    config_rho0 = 1000
 /
 &amp;split_explicit_ts

Modified: branches/ocean_projects/ale_split_exp/src/core_ocean/Registry
===================================================================
--- branches/ocean_projects/ale_split_exp/src/core_ocean/Registry        2012-02-02 22:42:04 UTC (rev 1456)
+++ branches/ocean_projects/ale_split_exp/src/core_ocean/Registry        2012-02-02 23:19:41 UTC (rev 1457)
@@ -20,6 +20,7 @@
 namelist logical   restart  config_do_restart          false
 namelist character restart  config_restart_interval    none
 namelist character grid     config_vert_grid_type      isopycnal
+namelist character grid     config_pressure_type       pressure
 namelist real      grid     config_rho0                1028
 namelist integer   split_explicit_ts config_n_ts_iter     2
 namelist integer   split_explicit_ts config_n_bcl_iter_beg   2

Modified: branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_mpas_core.F
===================================================================
--- branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_mpas_core.F        2012-02-02 22:42:04 UTC (rev 1456)
+++ branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_mpas_core.F        2012-02-02 23:19:41 UTC (rev 1457)
@@ -98,6 +98,8 @@
 
       call ocn_compute_max_level(domain)
 
+      call ocn_init_z_level(domain)
+
       print *, ' Vertical grid type is: ',config_vert_grid_type
 
       if (config_vert_grid_type.ne.'isopycnal'.and. &amp;
@@ -109,8 +111,11 @@
          call mpas_dmpar_abort(dminfo)
       endif
 
-      if (config_vert_grid_type.ne.'isopycnal') then
-         call ocn_init_z_level(domain)
+      print *, ' Pressure type is: ',config_pressure_type
+      if (config_pressure_type.ne.'pressure'.and. &amp;
+          config_pressure_type.ne.'MontgomeryPotential') then
+         print *, ' Incorrect choice of config_pressure_type.'
+         call mpas_dmpar_abort(dminfo)
       endif
 
       !

Modified: branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tendency.F
===================================================================
--- branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tendency.F        2012-02-02 22:42:04 UTC (rev 1456)
+++ branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tendency.F        2012-02-02 23:19:41 UTC (rev 1457)
@@ -236,9 +236,7 @@
       ! velocity tendency: pressure gradient
       !
       call mpas_timer_start(&quot;pressure grad&quot;, .false., velPgradTimer)
-! mrp changing isopycnal formulation for testing
- if (1==2) then
-!      if (config_vert_grid_type.eq.'isopycnal') then
+      if (config_pressure_type.eq.'MontgomeryPotential') then
           call ocn_vel_pressure_grad_tend(grid, MontPot,  zMid, rho, tend_u, err)
       else
           call ocn_vel_pressure_grad_tend(grid, pressure, zMid, rho, tend_u, err)
@@ -787,9 +785,7 @@
       ! This section must be after computing rho
       !
       ! dwj: 10/25/2011 - Need to explore isopycnal vs zlevel flags
-! mrp changing isopycnal formulation for testing
- if (1==2) then
-!      if (config_vert_grid_type.eq.'isopycnal') then
+      if (config_pressure_type.eq.'MontgomeryPotential') then
 
         ! For Isopycnal model.
         ! Compute pressure at top of each layer, and then

Modified: branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_vadv.F
===================================================================
--- branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_vadv.F        2012-02-02 22:42:04 UTC (rev 1456)
+++ branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_vadv.F        2012-02-02 23:19:41 UTC (rev 1457)
@@ -123,6 +123,11 @@
 
       err = 0
 
+      ! mrp 120202 efficiency note:
+      ! The following if statement is not needed, since wTop is set to 
+      ! zero for isopycnal coordinates.  This if statment saves flops
+      ! for isopycnal coordinates.  However, if the loops are pushed
+      ! out, we could get rid of this if statement.
       if(.not.vadvOn) return
 
       call ocn_tracer_vadv_stencil_tend(grid, h, wTop, tracers, tend, err1)

Modified: branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_pressure_grad.F
===================================================================
--- branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_pressure_grad.F        2012-02-02 22:42:04 UTC (rev 1456)
+++ branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_pressure_grad.F        2012-02-02 23:19:41 UTC (rev 1457)
@@ -186,13 +186,9 @@
 
       err = 0
 
-      if (config_vert_grid_type.eq.'isopycnal') then
-! mrp changing isopycnal formulation for testing
-        rho0Inv = 1.0/config_rho0
-        grho0Inv = gravity/config_rho0
-!        rho0Inv = 1.0
-!        grho0Inv = 0.0
-! mrp changing isopycnal formulation for testing end.
+      if (config_pressure_type.eq.'MontgomeryPotential') then
+        rho0Inv = 1.0
+        grho0Inv = 0.0
       else 
         rho0Inv = 1.0/config_rho0
         grho0Inv = gravity/config_rho0

Modified: branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_vadv.F
===================================================================
--- branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_vadv.F        2012-02-02 22:42:04 UTC (rev 1456)
+++ branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_vadv.F        2012-02-02 23:19:41 UTC (rev 1457)
@@ -112,6 +112,11 @@
       real (kind=RKIND) :: wTopEdge
       real (kind=RKIND), dimension(:), allocatable :: w_dudzTopEdge
 
+      ! mrp 120202 efficiency note:
+      ! The following if statement is not needed, since wTop is set to 
+      ! zero for isopycnal coordinates.  This if statment saves flops
+      ! for isopycnal coordinates.  However, if the loops are pushed
+      ! out, we could get rid of this if statement.
       if(.not.velVadvOn) return
 
       err = 0

</font>
</pre>