<p><b>mhoffman@lanl.gov</b> 2012-04-30 14:56:33 -0600 (Mon, 30 Apr 2012)</p><p>TRUNK COMMIT- land ice documents only<br>
<br>
Updated the land ice core Getting Started guide to include how to compile MPAS with LifeV libraries, information about namelist options, using MpasDraw to view output.<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/documents/land_ice/reference_manual/getting_started.txt
===================================================================
--- trunk/documents/land_ice/reference_manual/getting_started.txt        2012-04-30 19:54:09 UTC (rev 1843)
+++ trunk/documents/land_ice/reference_manual/getting_started.txt        2012-04-30 20:56:33 UTC (rev 1844)
@@ -36,18 +36,20 @@
 
 =======================
 Building MPAS: Land Ice
-========================
+=======================
 $ setenv CORE land_ice (or export CORE=land_ice)
 $ setenv NETCDF /usr/local/netcdf-gfortran (or export NETCDF=/usr/local/netcdf-gfortran)
 
 $ cd ~/mpas/land_ice_projects/implement_core
 $ make clean
-$ make gfortran SERIAL=true ( or make gfortran if MPI is installed, and compiled with gfortran; replace gfortran with the compiler of your choice)
+$ make gfortran DEBUG=true 
+Iif you do not have MPI installed and working properly, you can compile with &quot;make gfortran SERIAL=true&quot;.  However the option to do a serial build will soon be deprecated.)
+(You can replace gfortran with the compiler of your choice - see Makefile for options)
 
 look for the link to land_ice_model.exe to make sure the build succeeded
 
 Notes on building:
-* Starting with netcdf4, linking to the netcdf fortran libraries requires both netcdf.a and netcdff.a.  The Makefile needs to be modified to include -lnetcdff on the LIBS line.  (Same for periodic_hex's Makefile.)  If you are using netcdf version 3.x, this doesn not apply.
+* Starting with netcdf4, linking to the netcdf fortran libraries requires both netcdf.a and netcdff.a.  The Makefile needs to be modified to include -lnetcdff on the LIBS line.  (Same for periodic_hex's Makefile.)  If you are using netcdf version 3.x, this doesn not apply.  NOTE: The MPAS Makefile has now been modified to automatically detect if you are using netcdf4 and make the change for you.
 * On bluefire 'make' will not work - gmake needs to be used instead.  One way to avoid having to replace all instances of 'make' with 'gmake' in all Makefiles is to set up a link named 'make' to /usr/local/bin/gmake in your home directory.  For example:
 cd ~
 mkdir bin
@@ -57,6 +59,29 @@
 Just remember that from now on you will always be using gmake when you invoke 'make'!
 
 
+=============================
+Building with and using LifeV
+=============================
+If you want to compile with the LifeV velocity solvers, you will need to have LifeV compiled and tested successfully.  LifeV requires Trilinos (10.10.1), ParMetis (3.2), HDF5 (1.8.8).  Parentheses indicate versions that I was successful with - not all versions (and not necessarily the newest) of each will work.
+
+To compile MPAS with LifeV libraries use:
+$ make gfortran DEBUG=true LIFEV=true
+but you first need to define an environment variable called EXTERNAL_LIBS that specifies all of the needed LifeV libraries.  You should be able to obtain the needed information from the Makefile.export.LifeV_install file in your LifeV build directory.  You will need the information from LifeV_LIBRARY_DIRS, LifeV_LIBRARIES, LifeV_TPL_LIBRARY_DIRS, LifeV_TPL_LIBRARIES.  You may also need: -lsz -lmpi_cxx -lmpi_f90 -lstdc++
+For example, I use:
+export TRILINOS=/Users/mhoffman/software/trilinos/trilinos-10.10.1-GCC-MPI-OPT
+export LIFEV=/Users/mhoffman/software/lifev/lifev-build/lifev
+export EXTERNAL_LIBS=&quot;-L$LIFEV/ice_sheet/ -llifevicesheetinterface -L$LIFEV/core -llifevcore \
+-L/$TRILINOS/lib \
+-lpiro -lmoochothyra -lmoocho -lrythmos -llocathyra -llocaepetra -llocalapack -lloca -lnoxthyra -lnoxepetra -lnoxlapack -lnox -lanasazitpetra -lModeLaplace -lanasaziepetra -lanasazi -lstratimikos -lstratimikosbelos -lstratimikosaztecoo -lstratimikosamesos -lstratimikosml -lstratimikosifpack -lbelostpetra -lbelosepetra -lbelos -lml -lifpack -lamesos -lgaleri -laztecoo -lisorropia -loptipack -lthyratpetra -lthyraepetraext -lthyraepetra -lthyracore -lepetraext -ltpetraext -ltpetrainout -ltpetra -ltriutils -lglobipack -lzoltan -lepetra -lkokkoslinalg -lkokkosnodeapi -lkokkos -lrtop -lsacado -ltpi -lteuchos \
+-lpiro -lmoochothyra -lmoocho -lrythmos -lmoertel -llocathyra -llocaepetra -llocalapack -lloca -lnoxthyra -lnoxepetra -lnoxlapack -lnox -lintrepid -lanasazitpetra -lModeLaplace -lanasaziepetra -lanasazi -lfei_trilinos -lfei_base -lstratimikos -lstratimikosbelos -lstratimikosaztecoo -lstratimikosamesos -lstratimikosml -lstratimikosifpack -lifpack2 -lbelostpetra -lbelosepetra -lbelos -lml -lkomplex -lifpack -lpamgen_extras -lpamgen -lamesos -lgaleri -laztecoo -ldpliris -lisorropia -loptipack -lthyratpetra -lthyraepetraext -lthyraepetra -lthyracore -lthyratpetra -lthyraepetraext -lthyraepetra -lthyracore -lepetraext -ltpetraext -ltpetrainout -ltpetra -ltriutils -lglobipack -lshards -lzoltan -lepetra -lkokkoslinalg -lkokkosnodeapi -lkokkos -lrtop -lsacado -ltpi -lteuchos \
+/Users/mhoffman/software/hdf/hdf5-1.8.8-mpif90-gcc4.5/lib/libhdf5.a /Users/mhoffman/software/hdf/hdf5-1.8.8-mpif90-gcc4.5/lib/libhdf5_hl.a /usr/lib/libz.dylib /opt/local/lib/libz.dylib /opt/local/lib/libnetcdf.dylib /Users/mhoffman/software/parmetis/ParMetis-3.1.1/libparmetis.a /Users/mhoffman/software/parmetis/ParMetis-3.1.1/libmetis.a /usr/lib/liblapack.dylib /usr/lib/libblas.dylib /usr/lib/libpthread.dylib /Users/mhoffman/software/parmetis/ParMetis-3.1.1/libparmetis.a /Users/mhoffman/software/parmetis/ParMetis-3.1.1/libmetis.a /usr/lib/liblapack.dylib /usr/lib/libblas.dylib \
+-L/opt/local/lib -lsz \
+-lmpi_cxx -lmpi_f90 -lstdc++&quot;
+
+
+To actually perform calls to LifeV, your namelist.config file needs to specify either 'L1L2', 'FO', or 'Stokes' for the config_dycore option.  You can still run the model without calling LifeV if you've compiled with LifeV (e.g. set config_dycore = 'SIA' to use the MPAS-based SIA velocity solver).  If you modify your LifeV libraries, MPAS' Makefile won't know about it - you'll need to 'make clean; make ...', or, faster, 'rm src/land_ice_model.exe; make ...'.
+
+
 =============
 Making a grid
 =============
@@ -163,8 +188,25 @@
 
 Now look for output.nc
 
-Currently, there is no call to a dycore (LifeV) enabled, so land_ice_model.exe simply spits out the initial conditions that it was fed.  To check if it worked use one of the viz options below (or ncdump -v).
+The default velocity solver is a SIA solver written in MPAS.  To use a higher-order solver, you need to have MPAS compiled with LifeV support (see above).
 
+
+========================
+Important Config Options
+========================
+Runs in MPAS are controlled by options set in the namelist.config file in the directory where you execute the run.  Any options not specified in the namelist.config file are determined from defaults set in src/core_land_ice/Registry.  Browse that file to see what valid options exist (though not all are implemented yet).  Here are the more important options:
+   config_time_integration = 'ForwardEuler'  ! This is the only currently supported time integration scheme
+   config_dycore = 'FO'   ! This is where you select the velocity solver.  Valid dycores are SIA, L1L2, FO, Stokes. All but SIA require compiling with LifeV libraries.
+! Specify run duration with these.  MPAS uses a calendar system, so start/stop times need to be specified in this format.  You can alternatively specify a config_run_duration, but it would have to be in seconds.  It is possible to specify dt in seconds instead of years with config_dt_seconds.
+   config_dt_years = 1.0
+   config_start_time = '0000-01-01_00:00:00'
+   config_stop_time = '0005-01-01_00:00:00'
+! I/O specified with these:
+   config_input_name = 'land_ice_grid.nc'
+   config_output_name = 'output.nc'
+   config_restart_name = 'restart.nc'
+
+
 ================
 Examining Output
 ================
@@ -175,10 +217,13 @@
 It can take commandline arguments to visualize a different time step (default=the first) or file (default=output.nc) and to save the plots to files.  Get details with: python visualize_dome.py -h
 
 2. Use paraview to visualize output.nc (this will have to be a separate tutorial).
-However, paraview is limited to variables with dimensions that include nCells (or nVertices), nVertLevels.  Few land ice variables meet that criterion.  Hopefully this will be remedied in a future version of the paraview MPAS plugin.
+However, paraview's MPAS support is currently limited to variables with dimensions that include [nCells (or nVertices), nVertLevels], i.e. 3d fields only.  Few land ice variables meet that criterion.  Hopefully this will be remedied in a future version of the paraview MPAS plugin.
 
 3. An alternative is to convert the output file to a regular grid that can be viewed (somwhat sloppily) in ncview (or similar tool).  A script that does that conversion is here:
 land_ice_projects/grid_tools/convert_mpas_grid_to_regular_grid_netcdf.py
 
-4. For more rigorous examination of the output, python or Matlab can be used.  
+4. By far the best option for casually browsing output is a tool written by Doug Jacobsen called MpasDraw.  It is located here: branches/tools/mpas_draw, so you will need to checkout that directory if you have not checked out the entire repository.  To compile it, simply make sure the Makefile has properly set the NETCDF and PLATFORM variables, and then run 'make'.  The README file has detailed instructions for how to use it.
 
+5. For more rigorous examination/analysis of the output, python or Matlab can be used.  
+
+

</font>
</pre>