<p><b>mhoffman@lanl.gov</b> 2012-04-25 07:58:22 -0600 (Wed, 25 Apr 2012)</p><p>BRANCH COMMIT<br>
<br>
Setup additional vertical coordinate information (needed e.g. for temperature column diffusion).<br>
</p><hr noshade><pre><font color="gray">Modified: branches/land_ice_projects/implement_core/src/core_land_ice/Registry
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/Registry        2012-04-25 01:34:37 UTC (rev 1804)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/Registry        2012-04-25 13:58:22 UTC (rev 1805)
@@ -50,6 +50,7 @@
dim nVertLevels nVertLevels
% nvertLevels+2 is only needed if attaching b.c. to a 3-d field. We are unlikely to use this, but I am retaining it for now. MJH 04/19/12
% dim nVertLevelsPlus2 nVertLevels+2
+dim nVertLevelsPlus1 nVertLevels+1
%
% var persistence type name_in_file ( dims ) time_levs iro- name_in_code struct super-array array_class
@@ -119,6 +120,8 @@
% Sigma coordinate: read from input, saved in restart and written to output
var persistent real layerThicknessFractions ( nVertLevels ) 0 iro layerThicknessFractions mesh - -
+var persistent real layerCenterSigma ( nVertLevels ) 0 - layerCenterSigma mesh - -
+var persistent real layerInterfaceSigma ( nVertLevelsPlus1 ) 0 - layerInterfaceSigma mesh - -
% Prognostic variables: read from input, saved in restart, and written to output
var persistent real thickness ( nCells Time ) 2 iro thickness state - -
Modified: branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_mpas_core.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_mpas_core.F        2012-04-25 01:34:37 UTC (rev 1804)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_mpas_core.F        2012-04-25 13:58:22 UTC (rev 1805)
@@ -47,6 +47,8 @@
call simulation_clock_init(domain, dt, startTimeStamp)
+ !call land_ice_temp_init(domain, dt, err)
+
call land_ice_vel_init(domain, err)
block => domain % blocklist
@@ -157,6 +159,7 @@
state => block % state % time_levs(1) % state ! initial state
! Call init routines ====
+ call land_ice_setup_vertical_coords(mesh)
call compute_mesh_scaling(mesh)
call mpas_rbf_interp_initialize(mesh)
@@ -421,4 +424,70 @@
end subroutine compute_mesh_scaling
+
+!***********************************************************************
+!
+! routine and_ice_setup_vertical_coords
+!
+!> \brief Initializes vertical coord system
+!> \author Matt Hoffman
+!> \date 20 April 2012
+!> \version SVN:$Id$
+!> \details
+!> This routine initializes the vertical coord system.
+!
+!-----------------------------------------------------------------------
+
+ subroutine land_ice_setup_vertical_coords(mesh)
+
+ !-----------------------------------------------------------------
+ !
+ ! input variables
+ !
+ !-----------------------------------------------------------------
+
+
+ !-----------------------------------------------------------------
+ !
+ ! input/output variables
+ !
+ !-----------------------------------------------------------------
+ type (mesh_type), intent(inout) :: mesh
+
+ !-----------------------------------------------------------------
+ !
+ ! output variables
+ !
+ !-----------------------------------------------------------------
+
+
+ !-----------------------------------------------------------------
+ !
+ ! local variables
+ !
+ !-----------------------------------------------------------------
+
+ integer :: nVertLevels, k
+ real (kind=RKIND), dimension(:), pointer :: layerThicknessFractions, layerCenterSigma, layerInterfaceSigma
+
+ ! layerThicknessFractions is provided by input
+ layerThicknessFractions = mesh % layerThicknessFractions % array
+ ! layerCenterSigma is the fractional vertical position (0-1) of each layer center, with 0.0 at the ice surface and 1.0 at the ice bed
+ layerCenterSigma = mesh % layerCenterSigma % array
+ ! layerInterfaceSigma is the fractional vertical position (0-1) of each layer interface, with 0.0 at the ice surface and 1.0 at the ice bed. Interface 1 is the surface, interface 2 is between layers 1 and 2, etc., and interface nVertLevels+1 is the bed.
+ layerInterfaceSigma = mesh % layerInterfaceSigma % array
+
+ layerCenterSigma(1) = 0.5 * layerThicknessFractions(1)
+ layerInterfaceSigma(1) = 0.0
+ do k = 2, nVertLevels
+ layerCenterSigma(k) = layerCenterSigma(k-1) + 0.5 * layerThicknessFractions(k-1) &
+ + 0.5 * layerThicknessFractions(k)
+ layerInterfaceSigma(k) = layerInterfaceSigma(k-1) + layerThicknessFractions(k-1)
+ end do
+ layerInterfaceSigma(nVertLevels+1) = 1.0
+
+
+ end subroutine land_ice_setup_vertical_coords
+
+
end module mpas_core
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-04-25 01:34:37 UTC (rev 1804)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_vel.F        2012-04-25 13:58:22 UTC (rev 1805)
@@ -117,12 +117,12 @@
!
! routine land_ice_vel_finalize
!
-!> \brief Initializes velocity solver
+!> \brief Finalizes velocity solver
!> \author Xylar Asay-Davis
!> \date 18 January 2012
!> \version SVN:$Id$
!> \details
-!> This routine initializes the ice velocity solver.
+!> This routine finalizes the ice velocity solver.
!
!-----------------------------------------------------------------------
</font>
</pre>