<p><b>mhoffman@lanl.gov</b> 2012-05-07 12:18:05 -0600 (Mon, 07 May 2012)</p><p>BRANCH COMMIT<br>
Created a 'test case' for running a Greenland simulation with instructions for how to setup a Greenland run.  Successfully running Greenland is still a work in progress, so this is just a starting place.<br>
Also modified the add_land_ice_variables script to assign default values to layerThicknessFractions, which is needed for the workflow in setting up a Greenland run.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/land_ice_projects/grid_tools/add_land_ice_variables_to_mpas_grid.py
===================================================================
--- branches/land_ice_projects/grid_tools/add_land_ice_variables_to_mpas_grid.py        2012-05-07 17:09:14 UTC (rev 1871)
+++ branches/land_ice_projects/grid_tools/add_land_ice_variables_to_mpas_grid.py        2012-05-07 18:18:05 UTC (rev 1872)
@@ -61,6 +61,9 @@
 # Note: it may be necessary to make sure the Time dimension has size 1, rather than the 0 it defaults to.  For now, letting it be 0 which seems to be fine.
 newvar = fileout.createVariable('layerThicknessFractions', 'd', ('nVertLevels', ))
 newvar[:] = numpy.zeros(newvar.shape)
+# Assign default values to layerThicknessFractions.  By default they will be uniform fractions.  Users can modify them in a subsequent step, but doing this here ensures the most likely values are already assigned. (Useful for e.g. setting up Greenland where the state variables are copied over but the grid variables are not modified.)
+newvar[:] = 1.0 / fileout.dimensions['nVertLevels']
+
 newvar = fileout.createVariable('thickness', 'd', ('Time', 'nCells'))
 newvar[:] = numpy.zeros(newvar.shape)
 newvar = fileout.createVariable('bedTopography', 'd', ('Time', 'nCells'))
@@ -73,6 +76,9 @@
 #newvar = fileout.createVariable('temperature', 'd', ('Time', 'nCells', 'nVertLevelsPlus2'))
 newvar[:] = numpy.zeros(newvar.shape)
 
+
+
+
 # Assign the global attributes
 # Copy over the two attributes that are required by MPAS.  If any others exist in the input file, give a warning.
 setattr(fileout, 'on_a_sphere', getattr(filein, 'on_a_sphere'))

Added: branches/land_ice_projects/test_cases/greenland_5km/README.txt
===================================================================
--- branches/land_ice_projects/test_cases/greenland_5km/README.txt                                (rev 0)
+++ branches/land_ice_projects/test_cases/greenland_5km/README.txt        2012-05-07 18:18:05 UTC (rev 1872)
@@ -0,0 +1,28 @@
+Instructions for setting up a Greenland run in MPAS
+MJH, May 7, 2012
+
+
+1. Create an appropriately sized mesh.  The namelist.input.Greenland.5km.periodoc_hex contains is setup for that.  Rename it:
+$ cp namelist.input.Greenland.5km.periodoc_hex namelist.input
+Link a working copy of the periodic_hex mesh generator (instructions for compiling it in the Land Ice Getting Started document in trunk/documents/land_ice/reference_manual/):
+$ ln -s ~/documents/mpas/mpasall/trunk/grid_gen/periodic_hex/periodic_grid .
+Run it:
+$ ./periodic_grid
+
+2. Generate a land ice grid from the newly created grid.
+$ python ~/documents/mpas/land_ice_projects/grid_tools/add_land_ice_variables_to_mpas_grid.py
+Optional: delete original grid:
+$ rm grid.nc
+
+3. Copy the I.C. from an existing regular grid CISM file (the needed file to copy from is not committed to the repository)
+$ python ~/documents/mpas/land_ice_projects/grid_tools/copy_CISM_grid_to_MPAS_grid.py gis_5km.180211.nc land_ice_grid.nc 
+
+4. A default namelist.config file for running the model is also included in this directory.  See notes in the file, as well as the Getting Started document about how to run it.

+
+
+That's it!  This workflow is meant to be a replacement to the tool in branches/land_ice_projects/grid_tools/icesheet_legacy/.  However there are two problems with this currently:
+1. The mesh generated by this procedure has not yet successfully been run with LifeV velocity solvers - so there may be a problem with the way it is generated.
+2. This procedure does not cull cells from the rectangular domain so the resulting mesh will be substantially larger than the comparable one generated by the old tool.
+
+

Added: branches/land_ice_projects/test_cases/greenland_5km/namelist.input.Greenland.5km.land_ice_core
===================================================================
--- branches/land_ice_projects/test_cases/greenland_5km/namelist.input.Greenland.5km.land_ice_core                                (rev 0)
+++ branches/land_ice_projects/test_cases/greenland_5km/namelist.input.Greenland.5km.land_ice_core        2012-05-07 18:18:05 UTC (rev 1872)
@@ -0,0 +1,22 @@
+! These settings have not been tested much and are provided as a starting place: The LifeV velocity solvers may not currently work with this mesh.  Also, this dt is likely to be too large and violate the CFL condition.
+&amp;land_ice_model
+   config_time_integration = 'ForwardEuler' 
+   config_dt_years = 1.0
+   config_start_time = '0000-01-01_00:00:00'
+   config_stop_time = '0001-01-01_00:00:00'
+   config_stats_interval = 0
+   config_dycore = 'FO'
+/
+
+&amp;io
+   config_input_name = 'land_ice_grid.nc'
+   config_output_name = 'output.nc'
+   config_restart_name = 'restart.nc'
+   config_output_interval = '00_00:01:00'
+   config_frames_per_outfile = 0
+/
+
+&amp;restart
+   config_restart_interval = '00_00:01:00'
+   config_do_restart = .false.
+/

Added: branches/land_ice_projects/test_cases/greenland_5km/namelist.input.Greenland.5km.periodoc_hex
===================================================================
--- branches/land_ice_projects/test_cases/greenland_5km/namelist.input.Greenland.5km.periodoc_hex                                (rev 0)
+++ branches/land_ice_projects/test_cases/greenland_5km/namelist.input.Greenland.5km.periodoc_hex        2012-05-07 18:18:05 UTC (rev 1872)
@@ -0,0 +1,8 @@
+&amp;periodic_grid
+   nx = 301,
+   ny = 648,
+   dc = 5000.,
+   nVertLevels = 9,
+   nTracers = 1,
+   nproc = 2, 4
+/

</font>
</pre>