<p><b>mhoffman@lanl.gov</b> 2012-05-09 14:28:47 -0600 (Wed, 09 May 2012)</p><p>BRANCH COMMIT<br>
Minor cleanup to land ice Registry.<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-05-09 02:15:13 UTC (rev 1881)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/Registry        2012-05-09 20:28:47 UTC (rev 1882)
@@ -1,5 +1,4 @@
-%whl - This file originally created from shallow-water Registry
-%whl - Commented out fields that are not needed for land ice; delete later.
+% CONFIGURATION OPTIONS ==============
 %
 % namelist  type  namelist_record  name  default_value
 %
@@ -11,6 +10,10 @@
 namelist character   land_ice_model  config_start_time            0000-01-01_00:00:00
 namelist character   land_ice_model  config_stop_time             none
 namelist character   land_ice_model  config_run_duration          none
+namelist integer     land_ice_model  config_stats_interval        100
+% config_stats_interval is how many time steps before calculating &amp; outputting stats via the global_diagnostics module (which has not yet been setup to do much)
+
+% Land ice core-specific options:
 namelist character   land_ice_model  config_dycore                SIA
 % valid dycores are SIA, L1L2, FO, Stokes. All but SIA require compiling with LifeV libraries.
 namelist character   land_ice_model  config_time_integration      ForwardEuler
@@ -18,22 +21,32 @@
 namelist character   land_ice_model  config_advection             FO-Upwind
 % valid advection is FO-Upwind, None (currently only applies to thickness)
 namelist real        land_ice_model  config_ice_density           900.0
+
 % The following options are used by the ocean core and may be useful in the future
-namelist integer     land_ice_model  config_stats_interval        100
-namelist logical     land_ice_model  config_h_ScaleWithMesh       false
+%namelist logical     land_ice_model  config_h_ScaleWithMesh       false
 %namelist integer     land_ice_model  config_thickness_adv_order   1
 %namelist integer     land_ice_model  config_tracer_adv_order      2
 %namelist logical     land_ice_model  config_positive_definite     false
 %namelist logical     land_ice_model  config_monotonic             false
-namelist character   io        config_input_name            grid.nc
+
+% I/O options:
+namelist character   io        config_input_name            land_ice_grid.nc
 namelist character   io        config_output_name           output.nc
 namelist character   io        config_restart_name          restart.nc
-namelist character   io        config_output_interval       06:00:00
+namelist character   io        config_output_interval       0001-00-00_00:00:00
 namelist integer     io        config_frames_per_outfile    0
+% The number of output frames to include per output file (once filled, a new output file will be created).  0 is infinite (only one file will be written, regardless of how large it is)
 namelist character   io        config_decomp_file_prefix    graph.info.part.
+
+% Restart options:
+% A restart will read the grid information from the input field, and the restart state from the restart file.  It will perform a run normally, i.e. do all the same init.
 namelist logical     restart   config_do_restart            false
-namelist character   restart   config_restart_interval      none
+% To perform a restart, simply set this to true in the namelist.input file and modify the start time to be the time you want restart from.
+namelist character   restart   config_restart_interval      3650_00:00:00
+% This is the frequency with which to write out restart files.  Valid values are 'none' or a time in days, such as 3650_00:00:00 for ten years.  ** Currently only years and months are not supported, so you have to specify the restart interval in units of days! **  We could eventually propose a change to framework to fix this in subroutine mpas_set_timeInterval in mpas_timekeeping module.
 
+
+% DIMENSIONS ===================
 %
 % dim  name_in_file  name_in_code
 %
@@ -52,6 +65,9 @@
 % dim nVertLevelsPlus2 nVertLevels+2
 dim nVertLevelsPlus1 nVertLevels+1
 
+
+
+% VARIABLES =====================
 %
 % var persistence type  name_in_file  ( dims )  time_levs iro-  name_in_code struct super-array array_class
 %
@@ -59,7 +75,7 @@
 
 
 % MESH VARIABLES =====================
-
+% Required mesh variables - do not edit
 var persistent real    latCell ( nCells ) 0 iro latCell mesh - -
 var persistent real    lonCell ( nCells ) 0 iro lonCell mesh - -
 var persistent real    xCell ( nCells ) 0 iro xCell mesh - -
@@ -81,10 +97,6 @@
 var persistent real    zVertex ( nVertices ) 0 iro zVertex mesh - -
 var persistent integer indexToVertexID ( nVertices ) 0 iro indexToVertexID mesh - -
 
-var persistent real    meshDensity ( nCells ) 0 iro meshDensity mesh - -
-var persistent real    meshScalingDel2 ( nEdges ) 0 ro meshScalingDel2 mesh - -
-var persistent real    meshScalingDel4 ( nEdges ) 0 ro meshScalingDel4 mesh - -
-
 var persistent integer cellsOnEdge ( TWO nEdges ) 0 iro cellsOnEdge mesh - -
 var persistent integer nEdgesOnCell ( nCells ) 0 iro nEdgesOnCell mesh - -
 var persistent integer nEdgesOnEdge ( nEdges ) 0 iro nEdgesOnEdge mesh - -
@@ -109,39 +121,63 @@
 var persistent integer cellsOnVertex ( vertexDegree nVertices ) 0 iro cellsOnVertex mesh - -
 var persistent real    kiteAreasOnVertex ( vertexDegree nVertices ) 0 iro kiteAreasOnVertex mesh - -
 
+
+% May be needed for variable resolution meshes:
+%var persistent real    meshDensity ( nCells ) 0 iro meshDensity mesh - -
+%var persistent real    meshScalingDel2 ( nEdges ) 0 ro meshScalingDel2 mesh - -
+%var persistent real    meshScalingDel4 ( nEdges ) 0 ro meshScalingDel4 mesh - -
+
+% Mesh variables needed for FCT advection
 % Space needed for advection
-var persistent real    deriv_two ( FIFTEEN TWO nEdges ) 0 o deriv_two mesh - -
-var persistent integer advCells ( TWENTYONE nCells ) 0 - advCells mesh - -
+% This requires calling something from mpas_ocn_advection module in block_init to calculate deriv_two
+%var persistent real    deriv_two ( maxEdges2 TWO nEdges ) 0 - deriv_two mesh - -
+% Added for monotonic advection scheme
+%var persistent real    adv_coefs ( nAdvectionCells nEdges ) 0 - adv_coefs mesh - -
+%var persistent real    adv_coefs_2nd ( nAdvectionCells nEdges ) 0 - adv_coefs_2nd mesh - -
+%var persistent real    adv_coefs_3rd ( nAdvectionCells nEdges ) 0 - adv_coefs_3rd mesh - -
+%var persistent integer advCellsForEdge ( nAdvectionCells nEdges ) 0 - advCellsForEdge mesh - -
+%var persistent integer nAdvCellsForEdge ( nEdges ) 0 - nAdvCellsForEdge mesh - -
+%var persistent integer highOrderAdvectionMask ( nVertLevels nEdges ) 0 - highOrderAdvectionMask mesh - -
+%var persistent integer lowOrderAdvectionMask ( nVertLevels nEdges ) 0 - lowOrderAdvectionMask mesh - -
 
 % Arrays required for reconstruction of velocity field
 var persistent real    coeffs_reconstruct ( R3 maxEdges nCells ) 0 - coeffs_reconstruct mesh - -
 
-% Boundary conditions: read from input, saved in restart and written to output
-var persistent integer boundaryEdge ( nVertLevels nEdges ) 0 iro boundaryEdge mesh - -
-var persistent integer boundaryVertex ( nVertLevels nVertices ) 0 iro boundaryVertex mesh - -
-var persistent integer boundaryCell ( nVertLevels nCells ) 0 iro boundaryCell mesh - -
+% Boundary conditions: read from input, saved in restart and written to output (these are used by the ocean core but may be useful in this core eventually)
+%var persistent integer boundaryEdge ( nVertLevels nEdges ) 0 iro boundaryEdge mesh - -
+%var persistent integer boundaryVertex ( nVertLevels nVertices ) 0 iro boundaryVertex mesh - -
+%var persistent integer boundaryCell ( nVertLevels nCells ) 0 iro boundaryCell mesh - -
 
+% Mesh variables specific to land ice core
 % 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 - -
 
+% Boundary Conditions (defined as mesh variables because they are read in once and held constant for the simulation - at least for now)
+%
+% Note: beta should be moved to diagnostic fields when a process model comes online
+var persistent real    beta ( nCells ) 0 iro beta mesh - -
+var persistent real    basalHeatFlux ( nCells ) 0 iro basalHeatFlux mesh - -
+var persistent real    sfcAirTemp ( nCells ) 0 iro sfcAirTemp mesh - -
+var persistent real    sfcMassBal ( nCells ) 0 iro sfcMassBal mesh - -
 
+
 % STATE VARIABLES =====================
 
 % Prognostic variables: read from input, saved in restart, and written to output
 var persistent real    thickness ( nCells Time ) 2 iro thickness state - -
 var persistent real    bedTopography ( nCells Time ) 2 iro bedTopography state - -
-% Note: beta should be moved to diagnostic fields when a process model comes online
-var persistent real    beta ( nCells Time ) 2 iro beta state - -
 var persistent real    temperature ( nVertLevels nCells Time ) 2 iro temperature state tracers dynamics
 var persistent real    normalVelocity ( nVertLevels nEdges Time ) 2 iro normalVelocity state - -
 
+
 % Tendency variables
 var persistent real    tend_layerThickness ( nVertLevels nCells Time ) 1 - layerThickness tend - -
 var persistent real    tend_thickness ( nCells Time ) 1 o thickness tend - -
 var persistent real    tend_temperature ( nVertLevels nCells Time ) 1 - temperature tend tracers dynamics
 
+
 % Diagnostic fields: only written to output
 var persistent real    uReconstructX ( nVertLevels nCells Time ) 2 o uReconstructX state - -
 var persistent real    uReconstructY ( nVertLevels nCells Time ) 2 o uReconstructY state - -

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-05-09 02:15:13 UTC (rev 1881)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_lifev.F        2012-05-09 20:28:47 UTC (rev 1882)
@@ -9,7 +9,6 @@
 !&gt; \details
 !&gt;  This module contains the routines for interfacing with LifeV
 !&gt;
-!&gt; MJH: added interfaces following http://people.sc.fsu.edu/~jburkardt/f_src/f90_calls_c++/f90_calls_c++.html
 !
 !-----------------------------------------------------------------------
 
@@ -334,13 +333,13 @@
       
       ! Mesh variables
       LayerThicknessFractions =&gt; mesh % LayerThicknessFractions % array
+      beta =&gt; mesh % beta % array
 
       ! State variables
       normalVelocity =&gt; state % normalVelocity % array
       thickness =&gt; state % thickness % array
       lowerSurface =&gt; state % lowerSurface % array
       upperSurface =&gt; state % upperSurface % array
-      beta =&gt; state % beta % array
       tracers =&gt; state % tracers % array
       index_temperature = state % index_temperature
       vertexMask =&gt; state % vertexMask % array

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-05-09 02:15:13 UTC (rev 1881)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_mpas_core.F        2012-05-09 20:28:47 UTC (rev 1882)
@@ -168,7 +168,7 @@
       ! Call init routines ====
       call land_ice_setup_vertical_coords(mesh)
 
-      call compute_mesh_scaling(mesh) 
+      !call compute_mesh_scaling(mesh)   ! may be useful for variable resolution meshes
       call mpas_rbf_interp_initialize(mesh)
       call mpas_init_reconstruct(mesh)
 
@@ -415,38 +415,39 @@
    end subroutine mpas_core_finalize
 
 
-   subroutine compute_mesh_scaling(mesh)
+! May be useful for variable resolution meshes, but would likely need to be changed to output scaling variables relevant to the ice sheet model.
+!   subroutine compute_mesh_scaling(mesh)
+!
+!      use mpas_grid_types
+!
+!      implicit none
+!
+!      type (mesh_type), intent(inout) :: mesh
+!
+!      integer :: iEdge, cell1, cell2
+!      real (kind=RKIND), dimension(:), pointer :: meshDensity, meshScalingDel2, meshScalingDel4
+!
+!      meshDensity =&gt; mesh % meshDensity % array
+!      meshScalingDel2 =&gt; mesh % meshScalingDel2 % array
+!      meshScalingDel4 =&gt; mesh % meshScalingDel4 % array
+!
+!      !
+!      ! Compute the scaling factors to be used in the del2 and del4 dissipation
+!      !
+!      meshScalingDel2(:) = 1.0
+!      meshScalingDel4(:) = 1.0
+!      if (config_h_ScaleWithMesh) then
+!         do iEdge=1,mesh%nEdges
+!            cell1 = mesh % cellsOnEdge % array(1,iEdge)
+!            cell2 = mesh % cellsOnEdge % array(2,iEdge)
+!            meshScalingDel2(iEdge) = 1.0 / ( (meshDensity(cell1) + meshDensity(cell2) )/2.0)**(5.0/12.0)
+!            meshScalingDel4(iEdge) = 1.0 / ( (meshDensity(cell1) + meshDensity(cell2) )/2.0)**(5.0/6.0)
+!         end do
+!      end if
+!
+!   end subroutine compute_mesh_scaling
 
-      use mpas_grid_types
 
-      implicit none
-
-      type (mesh_type), intent(inout) :: mesh
-
-      integer :: iEdge, cell1, cell2
-      real (kind=RKIND), dimension(:), pointer :: meshDensity, meshScalingDel2, meshScalingDel4
-
-      meshDensity =&gt; mesh % meshDensity % array
-      meshScalingDel2 =&gt; mesh % meshScalingDel2 % array
-      meshScalingDel4 =&gt; mesh % meshScalingDel4 % array
-
-      !
-      ! Compute the scaling factors to be used in the del2 and del4 dissipation
-      !
-      meshScalingDel2(:) = 1.0
-      meshScalingDel4(:) = 1.0
-      if (config_h_ScaleWithMesh) then
-         do iEdge=1,mesh%nEdges
-            cell1 = mesh % cellsOnEdge % array(1,iEdge)
-            cell2 = mesh % cellsOnEdge % array(2,iEdge)
-            meshScalingDel2(iEdge) = 1.0 / ( (meshDensity(cell1) + meshDensity(cell2) )/2.0)**(5.0/12.0)
-            meshScalingDel4(iEdge) = 1.0 / ( (meshDensity(cell1) + meshDensity(cell2) )/2.0)**(5.0/6.0)
-         end do
-      end if
-
-   end subroutine compute_mesh_scaling
-
-
 !***********************************************************************
 !
 !  routine and_ice_setup_vertical_coords

</font>
</pre>