<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, &
land_ice_lifev_finalize, &
land_ice_lifev_block_init, &
- land_ice_lifev_solve
+ land_ice_lifev_solve, &
+ land_ice_phg_init
+
!--------------------------------------------------------------------
!
! Private module variables
@@ -60,7 +62,7 @@
!> \date 18 January 2012
!> \version SVN:$Id$
!> \details
-!> This routine initializes the ice velocity solver.
+!> This routine initializes lifeV ice velocity solver.
!
!-----------------------------------------------------------------------
@@ -113,6 +115,65 @@
!***********************************************************************
!
+! routine land_ice_phg_init
+!
+!> \brief Initializes phg velocity solver
+!> \author Xylar Asay-Davis
+!> \date 18 January 2012
+!> \version SVN:$Id$
+!> \details
+!> 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 !< 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(*,*) "PHG needed to run Stokes model"
+ err = 1
+ return
+#endif
+
+ !--------------------------------------------------------------------
+
+ end subroutine land_ice_phg_init
+
+
+!***********************************************************************
+!
! routine land_ice_lifev_finalize
!
!> \brief Initializes velocity solver
@@ -403,6 +464,7 @@
case ('L1L2')
call mpas_timer_start("velocity_solver_solve_L1L2")
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("velocity_solver_solve_L1L2")
! Optional calls to have LifeV output data files
call mpas_timer_start("velocity_solver export")
@@ -412,7 +474,7 @@
case ('FO')
call mpas_timer_start("velocity_solver_solve_FO")
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("velocity_solver_solve_FO")
call mpas_timer_start("velocity_solver export")
!         call velocity_solver_init_L1L2(LayerThicknessFractions)
@@ -420,7 +482,6 @@
call velocity_solver_export_FO_velocity()
call mpas_timer_stop("velocity_solver export")
case ('Stokes')
- ! call stokes
#ifdef USE_PHG
call mpas_timer_start("velocity_solver_solve_stokes")
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>