<p><b>mperego@fsu.edu</b> 2012-07-11 07:15:46 -0600 (Wed, 11 Jul 2012)</p><p>BRANCH COMMIT<br>
land_ice: Wei modifications to call PHG initialization<br>
</p><hr noshade><pre><font color="gray">Modified: branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_lifev.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_lifev.F        2012-07-10 22:31:21 UTC (rev 2011)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_lifev.F        2012-07-11 13:15:46 UTC (rev 2012)
@@ -39,7 +39,9 @@
    public :: land_ice_lifev_init, &amp;
              land_ice_lifev_finalize, &amp;
              land_ice_lifev_block_init, &amp;
-             land_ice_lifev_solve
+             land_ice_lifev_solve, &amp;
+             land_ice_phg_init
+
    !--------------------------------------------------------------------
    !
    ! Private module variables
@@ -60,7 +62,7 @@
 !&gt; \date    18 January 2012
 !&gt; \version SVN:$Id$
 !&gt; \details
-!&gt;  This routine initializes the ice velocity solver.
+!&gt;  This routine initializes lifeV ice velocity solver.
 !
 !-----------------------------------------------------------------------
 
@@ -113,6 +115,65 @@
 
 !***********************************************************************
 !
+!  routine land_ice_phg_init
+!
+!&gt; \brief   Initializes phg velocity solver
+!&gt; \author  Xylar Asay-Davis
+!&gt; \date    18 January 2012
+!&gt; \version SVN:$Id$
+!&gt; \details
+!&gt;  This routine initializes the ice velocity solver.
+!
+!-----------------------------------------------------------------------
+
+   subroutine land_ice_phg_init(domain, err)
+
+      !-----------------------------------------------------------------
+      !
+      ! input variables
+      !
+      !-----------------------------------------------------------------
+
+      type (domain_type), intent(inout) :: domain
+
+      !-----------------------------------------------------------------
+      !
+      ! input/output variables
+      !
+      !-----------------------------------------------------------------
+
+      !-----------------------------------------------------------------
+      !
+      ! output variables
+      !
+      !-----------------------------------------------------------------
+
+      integer, intent(out) :: err !&lt; Output: error flag
+
+      !-----------------------------------------------------------------
+      !
+      ! local variables
+      !
+      !-----------------------------------------------------------------
+
+      err = 0
+
+#ifdef USE_PHG
+      ! This call is needed for using any of the PHG velocity solvers
+      call phg_init(domain % dminfo % comm)
+#else
+      write(*,*) &quot;PHG needed to run Stokes model&quot;
+      err = 1
+      return
+#endif
+
+   !--------------------------------------------------------------------
+
+   end subroutine land_ice_phg_init
+
+
+!***********************************************************************
+!
 !  routine land_ice_lifev_finalize
 !
 !&gt; \brief   Initializes velocity solver
@@ -403,6 +464,7 @@
       case ('L1L2')
           call mpas_timer_start(&quot;velocity_solver_solve_L1L2&quot;)
           call velocity_solver_solve_L1L2(lowerSurface, thickness, beta, tracers(index_temperature,:,:), normalVelocity)
+!         call velocity_solver_estimate_SS_SMB(normalVelocity, mesh % sfcMassBal % array)
           call mpas_timer_stop(&quot;velocity_solver_solve_L1L2&quot;)
           ! Optional calls to have LifeV output data files
           call mpas_timer_start(&quot;velocity_solver export&quot;)
@@ -412,7 +474,7 @@
       case ('FO')
           call mpas_timer_start(&quot;velocity_solver_solve_FO&quot;)
           call velocity_solver_solve_FO(lowerSurface, thickness, beta, tracers(index_temperature,:,:), normalVelocity)
-!          call velocity_solver_estimate_SS_SMB(mesh % sfcMassBal % array)
+!          call velocity_solver_estimate_SS_SMB(normalVelocity, mesh % sfcMassBal % array)
           call mpas_timer_stop(&quot;velocity_solver_solve_FO&quot;)
           call mpas_timer_start(&quot;velocity_solver export&quot;)
 !          call velocity_solver_init_L1L2(LayerThicknessFractions)          
@@ -420,7 +482,6 @@
           call velocity_solver_export_FO_velocity()
           call mpas_timer_stop(&quot;velocity_solver export&quot;)
       case ('Stokes')
-          ! call stokes
 #ifdef USE_PHG
           call mpas_timer_start(&quot;velocity_solver_solve_stokes&quot;)
           call velocity_solver_solve_stokes(lowerSurface, thickness, beta, tracers(index_temperature,:,:), normalVelocity)

Modified: branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_vel.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_vel.F        2012-07-10 22:31:21 UTC (rev 2011)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_vel.F        2012-07-11 13:15:46 UTC (rev 2012)
@@ -106,6 +106,7 @@
           call land_ice_lifev_init(domain, err)
       case ('Stokes')
           call land_ice_lifev_init(domain, err)
+          call land_ice_phg_init(domain, err)
       case default
           write(*,*) trim(config_dycore), ' is not a valid land ice dycore option.'
           err = 1

</font>
</pre>