[cig-commits] r4519 - geodyn/3D/MAG/trunk/doc

wei at geodynamics.org wei at geodynamics.org
Tue Sep 12 16:53:42 PDT 2006


Author: wei
Date: 2006-09-12 16:53:34 -0700 (Tue, 12 Sep 2006)
New Revision: 4519

Modified:
   geodyn/3D/MAG/trunk/doc/mag_book.lyx
Log:
Update MAG manual, more  to come

Modified: geodyn/3D/MAG/trunk/doc/mag_book.lyx
===================================================================
--- geodyn/3D/MAG/trunk/doc/mag_book.lyx	2006-09-12 20:50:16 UTC (rev 4518)
+++ geodyn/3D/MAG/trunk/doc/mag_book.lyx	2006-09-12 23:53:34 UTC (rev 4519)
@@ -1,4 +1,4 @@
-#LyX 1.4.1 created this file. For more info see http://www.lyx.org/
+#LyX 1.4.2 created this file. For more info see http://www.lyx.org/
 \lyxformat 245
 \begin_document
 \begin_header
@@ -43,7 +43,7 @@
 placement H
 wide false
 sideways false
-status collapsed
+status open
 
 \begin_layout Standard
 \begin_inset Graphics
@@ -65,7 +65,7 @@
 \noindent
 \align center
 \begin_inset ERT
-status collapsed
+status open
 
 \begin_layout Standard
 
@@ -86,7 +86,7 @@
 \begin_layout Author
 California Institute of Technology
 \newline
-Version ?.0.?
+Version 1.0.0
 \end_layout
 
 \begin_layout Date
@@ -136,9 +136,9 @@
 \begin_layout Standard
 This document is organized into three parts.
  Part I consists of traditional book front matter, including this preface.
- Part II begins with an introduction to Pyre and the Pyre-compatible version
- of ?????? and their capabilities and proceeds to the details of implementation,
- including a "cookbook" of short tutorials.
+ Part II begins with an introduction to MAG version 1.0 and its capabilities
+ and proceeds to the details of implementation, including a "cookbook" of
+ short tutorials.
  Part III provides appendices and references.
 \end_layout
 
@@ -186,19 +186,8 @@
  but are not likely to be professional programmers.
  Of those, there are likely to be two classes of users: those who just run
  models and those who modify the source code.
- 
 \end_layout
 
-\begin_layout Standard
-The manual was written for the usage of Mag on a variety of different platforms.
- ??? MAG has run on shared memory computers (Sun, Hewlett-Packard, SGI,
- and IBM), commercial distributed memory machines (Intel and Cray/SGI),
- and Beowulf implementations (including Beowulfs at the California Institute
- of Technology's Center for Advanced Computing Research and Seismological
- Laboratory, Sydney University, and the Geological Survey of Norway).
- ????
-\end_layout
-
 \begin_layout Section*
 Citation
 \end_layout
@@ -207,10 +196,9 @@
 Computational Infrastructure for Geodynamics (CIG) is making this source
  code available to you in the hope that the software will enhance your research
  in geophysics.
- The underlying C code for the finite element package and the Python bindings
- for the framework were donated to CIG in July of 2005.
+ The underlying Fortran code were donated to CIG in July of 2006.
  A number of individuals have contributed a significant portion of their
- careers toward the development of MAG and Pyre.
+ careers toward the development of MAG.
  It is essential that you recognize these individuals in the normal scientific
  practice by citing the appropriate peer reviewed papers and making appropriate
  acknowledgements.
@@ -309,7 +297,7 @@
 \end_layout
 
 \begin_layout Standard
-??? Mag development is funded by the 
+MAG development is funded by the 
 \begin_inset LatexCommand \htmlurl[U.S. Dept. of Energy's Advanced Simulation and Computing program]{http://www.sandia.gov/NNSA/ASC/}
 
 \end_inset
@@ -341,13 +329,13 @@
 \end_layout
 
 \begin_layout Standard
-Mag is a serial version of Gary Glatzmaier's rotating spherical convection/magne
+MAG is a serial version of Gary Glatzmaier's rotating spherical convection/magne
 toconvection/dynamo code, modified by Uli Christensen and Peter Olson.
  
 \end_layout
 
 \begin_layout Section
-About CitComS
+About MAG
 \end_layout
 
 \begin_layout Standard
@@ -384,683 +372,27 @@
 History
 \end_layout
 
-\begin_layout Standard
-CitCom (for 
-\series bold
-C
-\series default
-alifornia 
-\series bold
-I
-\series default
-nstitute of 
-\series bold
-T
-\series default
-echnology 
-\series bold
-Co
-\series default
-nvection in the 
-\series bold
-M
-\series default
-antle) was originally written in the early 1990's by Louis Moresi.
- Although the code for three-dimensional problems was incorporated from
- its inception, early versions of the software only solved for time-dependent
- convection problems within two-dimensional Cartesian domains.
- Moresi's original code turned out to be incredibly modular and easily extensibl
-e.
- Consequently, the fundamental finite element infrastructure which Louis
- wrote is still in place and forms the basis for much of the code contained
- in the present release.
- 
-\end_layout
-
-\begin_layout Standard
-In the mid-1990's Moresi wrote versions of the code that solved the equations
- within three-dimensional Cartesian domains.
- Then Shijie Zhong successfully parallelized CitCom using message passing
- routines on a limited release Intel supercomputer.
- Zhong then created a spherical version of the code which he named CitComS.
- Lijie Han then created a regional version of CitComS as well as an alternate
- version of message passing for an arbitrarily large number of processors.
- Clint Conrad created the first Beowulf implementations of the code, then
- Conrad and Eh Tan re-coded the message passing of the fully spherical version
- so that problems run on arbitrarily large numbers of processors could also
- be solved.
- A plethora of different versions of CitCom exist both on computers at the
- California Institute of Technology and around the world.
- 
-\end_layout
-
-\begin_layout Standard
-Consequently, by 2002, there were so many different versions of the code
- that some rationalization was in order.
- The software was migrated into a version control system and Eh Tan and
- Eun-seo Choi created a version of the CitComS that generates either a fully
- spherical or regional model, 
-\family typewriter
-CitcomSFull
-\family default
- and 
-\family typewriter
-CitcomSRegional
-\family default
- respectively.
- CitComS was released to the community through the GeoFramework website
- as version 1.0 and 1.1, and is currently available from 
-\begin_inset LatexCommand \htmlurl[CIG]{http://www.geodynamics.org/}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-By 2004, in order to increase the functionality of CitComS, the developers
- began to reengineer the code into an object-oriented environment specifically
- so it could work with a Python-based modeling framework called Pyre.
- This release of the software, now named CitComS.py, is essentially the product
- of those reengineering efforts.
- Eh Tan was the principal developer of CitComS.py, with considerable help
- from Eun-seo Choi, Puru Thoutireddy, and Michael Aivazis.
-\end_layout
-
-\begin_layout Standard
-CitComS is one component of a larger collection of software encompassed
- by the GeoFramework, a collaborative project between the 
-\begin_inset LatexCommand \htmlurl[Center for Advanced Computing Research (CACR)]{http://www.cacr.caltech.edu/}
-
-\end_inset
-
- and the 
-\begin_inset LatexCommand \htmlurl[Seismological Laboratory]{http://www.gps.caltech.edu/seismo/}
-
-\end_inset
-
-, both at Caltech, and the 
-\begin_inset LatexCommand \htmlurl[Victorian Partnership for Advanced Computing]{http://www.vpac.org/}
-
-\end_inset
-
- in Australia.
- The GeoFramework project has been developing a suite of tools to model
- multi-scale deformation for Earth science problems.
- This effort was motivated by the need to understand interactions between
- the long-term evolution of plate tectonics and shorter term processes such
- as the evolution of faults during and between earthquakes.
- During 2005 and 2006 much of the remaining software developed by GeoFramework
- was donated to CIG.
-\end_layout
-
-\begin_layout Standard
-The second major release of CitComS (2.0) incorporates the software framework
- Pyre, free surface modeling methods, and stress boundary conditions around
- the top and bottom surfaces.
- In the summer of 2005, as part of the 2.0.1 release, the CIG replaced the
- old build procedure with the GNU Build System.
- A subsequent release, version 2.0.2, could compile and run on 64-bit systems.
-\end_layout
-
 \begin_layout Section
-About Pyre
-\end_layout
-
-\begin_layout Standard
-Pyre is an object-oriented environment capable of specifying and launching
- numerical simulations on multiple platforms, including Beowulf class parallel
- computers and grid computing systems.
- Pyre allows the binding of multiple components such as solid and fluid
- models used in Earth science simulations, and different meshers.
- The Pyre framework enables the elegant setup, modification and launching
- of massively parallel three-dimensional solver applications.
- 
-\end_layout
-
-\begin_layout Standard
-Pyre is a framework, a combination of software and design philosophy that
- promotes the reuse of code.
- In their canonical software design book, 
-\emph on
-Design Patterns
-\emph default
-, Erich Gamma 
-\emph on
-et al
-\emph default
- condense the concept of a framework concept down to, "When you use a framework,
- you reuse the main body and write the code it calls." In the context of
- frameworks and object-oriented programming, Pyre can be thought of as a
- collection of classes and the way their instances interact.
- Programming applications based on Pyre will look similar to those written
- in any other object-oriented language.
- The Pyre framework contains a subset of parts that make up the overall
- framework.
- Each of those parts is designed to solve a specific problem.
- 
-\end_layout
-
-\begin_layout Standard
-The framework approach to computation offers many advantages.
- It permits the exchange of codes and promotes the reuse of standardized
- software while preserving efficiency.
- Frameworks are also an efficient way to handle changes in computer architecture.
- They present programmers and scientists with a unified and well-defined
- task and allow for shared costs of the housekeeping aspects of software
- development.
- They provide greater institutional continuity to model development than
- piecemeal approaches.
-\end_layout
-
-\begin_layout Standard
-The Pyre framework incorporates features aimed at enabling the scientific
- non-expert to perform tasks easily without hindering the expert.
- Target features for end users allow complete and intuitive simulation specifica
-tion, reasonable defaults, consistency checks of input, good diagnostics,
- easy access to remote facilities, and status monitoring.
- Target features for developers include easy access to user input, a shorter
- development cycle, and good debugging support.
- 
-\end_layout
-
-\begin_layout Section
 Governing Equations
 \end_layout
 
 \begin_layout Standard
-With CitComS, the mantle is treated as an incompressible viscous spherical
- shell.
- With these assumptions, thermal convection is governed by the equations
- for conservation of mass, momentum, and energy:
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-u_{i,i}=0\label{eq:conservation of mass}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula $ $
-\end_inset
-
-
-\begin_inset Formula \begin{equation}
--P_{,i}+(\eta u_{i,j}+\eta u_{j,i})_{,j}+\delta\rho g\delta_{ir}=0\label{eq:conservation of momentum}\end{equation}
-
-\end_inset
-
- 
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-T_{,t}+u_{i}T_{,i}=\kappa T_{,ii}+H\label{eq:conservation of energy}\end{equation}
-
-\end_inset
-
- 
-\end_layout
-
-\begin_layout Standard
 \noindent
-where 
-\emph on
-u 
-\emph default
-is the velocity, 
-\emph on
-P
-\emph default
- is the dynamic pressure, 
-\begin_inset Formula $\delta\rho$
-\end_inset
 
- is the density anomaly, 
-\emph on
-g
-\emph default
- is the gravitational acceleration, 
-\begin_inset Formula $\eta$
-\end_inset
-
- is the viscosity, 
-\emph on
-T
-\emph default
- is the temperature, 
-\begin_inset Formula $\kappa$
-\end_inset
-
- is the thermal diffusivity, and 
-\emph on
-H
-\emph default
- is the heat production rate.
- 
-\begin_inset Formula $X_{,y}$
-\end_inset
-
- represents the derivative of 
-\emph on
-X
-\emph default
- with respect to 
-\emph on
-y
-\emph default
-, 
-\emph on
-i
-\emph default
- and 
-\emph on
-j
-\emph default
- are spatial indices, 
-\emph on
-r
-\emph default
- is the radial direction, and 
-\emph on
-t
-\emph default
- is time.
- Without phase transitions, the density anomalies are:
 \end_layout
 
 \begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-\delta\rho=-\alpha\rho_{0}(T-T_{0})\label{eq:density anomalies}\end{equation}
 
-\end_inset
-
- 
 \end_layout
 
-\begin_layout Standard
-These equations lead to the following normalization in which primed quantities
- are nondimensional:
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-x_{i}=R_{0}x_{i}^{'}\label{eq:5}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-u_{i}=\frac{\kappa}{R_{0}}u_{i}^{'}\label{eq:6}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-T=\Delta TT'+T_{0}\label{eq:7}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-t=\frac{R_{0}^{2}}{\kappa}t^{'}\label{eq:8}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-\gamma=\frac{HR_{0}^{2}}{\kappa\Delta T}\label{eq:9}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-\eta=\eta_{0}\eta^{'}\label{eq:10}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-P=\frac{\eta_{0}\kappa}{R_{0}^{2}}P^{'}\label{eq:11}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-where 
-\begin_inset Formula $R_{0}$
-\end_inset
-
- is the radius of the earth, 
-\begin_inset Formula $\eta_{0}$
-\end_inset
-
- is a reference viscosity, 
-\begin_inset Formula $\Delta T$
-\end_inset
-
- is the superadiabatic temperature drop from the core-mantle boundary (CMB)
- to the surface.
- Dropping the primes, the equations become:
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-u_{i,i}=0\label{eq:conservation of mass}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
--P_{,i}+(\eta u_{i,j}+\eta u_{j,i})_{,j}+RaT\delta_{ir}=0\label{eq:13}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-T_{,t}+u_{i}T_{,i}=T_{,ii}+\gamma\label{eq:14}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-where 
-\emph on
-Ra
-\emph default
-, a Rayleigh number, is defined as:
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-Ra=\frac{\rho g\alpha\Delta TR_{0}^{3}}{\eta_{0}\kappa}\label{eq:Ra, a Rayleigh number}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-If there is a phase change, 
-\begin_inset LatexCommand \ref{eq:13}
-
-\end_inset
-
- is modified to:
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
--P_{,i}+(\eta u_{i,j}+\eta u_{j,i})_{,j}+(RaT+R_{b}\Gamma)\delta_{ir}=0\label{eq:16}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-\Gamma=\frac{1}{2}\left(1+\tanh\left(\frac{1-r-d_{ph}-s(T-T_{ph})}{w_{ph}}\right)\right)\label{eq:17}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-where 
-\begin_inset Formula $d_{ph}$
-\end_inset
-
- and 
-\begin_inset Formula $T_{ph}$
-\end_inset
-
- are the ambient depth and temperature of a phase change,
-\emph on
- s
-\emph default
- is the Clapeyron slope of a phase change, and 
-\begin_inset Formula $w_{ph}$
-\end_inset
-
- is the width of a phase transition.
- The phase-change Rayleigh number, 
-\begin_inset Formula $R_{b}$
-\end_inset
-
-, is defined as:
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-R_{b}=\frac{\Delta\rho_{ph}gR_{0}^{3}}{\eta_{0}\kappa}\label{eq:Rb, the phase-change Rayleigh number}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-where 
-\begin_inset Formula $\Delta\rho_{ph}$
-\end_inset
-
- is the density jump across a phase change.
-\end_layout
-
-\begin_layout Standard
-
-\end_layout
-
 \begin_layout Section
 Numerical Methods
 \end_layout
 
 \begin_layout Standard
-The governing equations are solved with the finite element method, see 
-\begin_inset LatexCommand \cite{Hughes The Finite Element Method}
 
-\end_inset
-
-.
- CitComS employs an Uzawa algorithm to solve the momentum equation coupled
- with the incompressibility constraints 
-\begin_inset LatexCommand \cite{Moresi/Gurnis Contraints,Ramage/Wathen Iterative solution}
-
-\end_inset
-
-.
- The energy equation is solved with a Petrov-Galerkin method 
-\begin_inset LatexCommand \cite{Brooks A.N.}
-
-\end_inset
-
-.
- Brick elements are used, such as eight velocity nodes with trilinear shape
- functions and one constant pressure node for each element.
- The use of brick elements in 3D (or rectangular elements in 2D) is important
- for accurately determining the pressure, such as dynamic topography, in
- incompressible Stokes' flow 
-\begin_inset LatexCommand \cite{Hughes The Finite Element Method}
-
-\end_inset
-
-.
- The discrete form of equations 
-\begin_inset LatexCommand \ref{eq:conservation of mass}
-
-\end_inset
-
- and 
-\begin_inset LatexCommand \ref{eq:13}
-
-\end_inset
-
- may be written in the following matrix form 
-\begin_inset LatexCommand \cite{Zhong et al The role of temperature}
-
-\end_inset
-
-:
 \end_layout
 
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-\mathrm{\mathbf{B}^{\mathit{T}}\mathit{u=0}}\label{eq:19}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-\mathbf{A\mathit{u+}}\mathbf{B\mathit{p=f}}\label{eq:20}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-where 
-\begin_inset Formula $\mathbf{A}$
-\end_inset
-
- is the "stiffness" matrix, 
-\emph on
-u
-\emph default
- is a vector of unknown velocities; 
-\begin_inset Formula $\mathbf{B}$
-\end_inset
-
- is the discrete gradient operator, 
-\emph on
-p
-\emph default
- is a vector of unknown pressures, and 
-\emph on
-f 
-\emph default
-is a vector composed of the body and boundary forces acting on the fluid.
- The individual entries of 
-\begin_inset Formula $\mathbf{A}$
-\end_inset
-
-, 
-\begin_inset Formula $\mathbf{B}$
-\end_inset
-
-, and 
-\emph on
-f
-\emph default
- are obtained using a standard finite element formulation, see 
-\begin_inset LatexCommand \cite{Zhong et al The role of temperature}
-
-\end_inset
-
- for the explicit entries.
- Equation 
-\begin_inset LatexCommand \ref{eq:20}
-
-\end_inset
-
- can be transformed by premultiplying by 
-\begin_inset Formula $\mathrm{\mathbf{B}^{\mathit{T}}\mathit{\mathbf{A}^{\mathbf{\mathit{-1}}}}}$
-\end_inset
-
- and using equation 
-\begin_inset LatexCommand \ref{eq:19}
-
-\end_inset
-
- to eliminate the velocity unknowns:
-\end_layout
-
-\begin_layout Standard
-\align right
-\begin_inset Formula \begin{equation}
-\mathbf{B}^{\mathit{T}}\mathit{\mathbf{A}^{\mathbf{\mathit{-1}}}\mathbf{B}\mathit{p=\mathbf{B^{\mathit{T}}A^{\mathit{-1}}\mathit{f}}}}\label{eq:21}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-This equation is solved using the Uzawa algorithm, an established method
- for solving the minimization of a dual function 
-\begin_inset LatexCommand \cite{Cahouet/Chabard Some fast 3D}
-
-\end_inset
-
-, which simultaneously yields the velocity field.
- A conjugate gradient scheme for this iteration is described by 
-\begin_inset LatexCommand \cite{Ramage/Wathen Iterative solution,Atanga/Silvester Iterative methods}
-
-\end_inset
-
-, and forms the basis for the technique used in CitComS.
-\end_layout
-
 \begin_layout Chapter
 Installation and Getting Help
 \end_layout
@@ -1070,7 +402,7 @@
 \end_layout
 
 \begin_layout Standard
-To test run Mag, you will download the source package (in the form of a
+To test run MAG, you will download the source package (in the form of a
  compressed 
 \family typewriter
 tar
@@ -1081,19 +413,18 @@
 \end_inset
 
 .
- After unpacking the source, ???you will run a prepackaged shell script
- to configure Mag for your system.??? Then you will use the 
+ After unpacking the source, you will run you will use the 
 \family typewriter
 make
 \family default
- utility to build Mag from source, and background execute the bench input
+ utility to build MAG from source, and background execute the bench input
  file.
  
 \end_layout
 
 \begin_layout Standard
 Advanced users and software developers may be interested in downloading
- the latest Mag source code directly from the CIG source code repository,
+ the latest MAG source code directly from the CIG source code repository,
  instead of using the prepared source package.
  See the 
 \begin_inset LatexCommand \ref{sec:Software-Repository}
@@ -1101,8 +432,7 @@
 \end_inset
 
  section later in this chapter.
- ??? Mag has been tested on Linux, Mac OS X, and several NSF TeraGrid platforms.
- ????
+ MAG has been tested on Linux, Mac OS X, and Windows.
 \end_layout
 
 \begin_layout Section
@@ -1129,133 +459,30 @@
 \end_layout
 
 \begin_layout Standard
-Mag requires the following:
+MAG requires the following:
 \end_layout
 
 \begin_layout Itemize
-Python 2.3 or greater
+A Fortran compiler, g77 or gFortran
 \end_layout
 
-\begin_layout Itemize
-An MPI library which implements version 1 of the MPI standard (If you are
- using MPICH, MPICH version 1.2.3 or later is required.)
-\end_layout
-
-\begin_layout Itemize
-A modern C++ compiler
-\end_layout
-
-\begin_layout Itemize
-A C compiler
-\end_layout
-
-\begin_layout Standard
-
-\series bold
-Note:
-\series default
- Users familiar with older versions of CitComS may prefer to install only
- the legacy CitComS tools, CitcomSFull and CitcomSRegional, and forgo use
- of the Pyre framework.
- Installing the legacy tools requires simply:
-\end_layout
-
-\begin_layout Itemize
-An MPI library
-\end_layout
-
-\begin_layout Itemize
-A C compiler
-\end_layout
-
-\begin_layout Standard
-For more information, see the subsection 
-\begin_inset LatexCommand \ref{sec:Installing-without-Pyre}
-
-\end_inset
-
- on page 
-\begin_inset LatexCommand \pageref{sec:Installing-without-Pyre}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-You can download Python from the 
-\begin_inset LatexCommand \htmlurl[Python website]{http://www.python.org/}
-
-\end_inset
-
-.
- If your system is running a recent release of Linux or Mac OS X, chances
- are you already have a suitable Python interpreter installed.
- To check, type the 'python' command:
-\end_layout
-
 \begin_layout LyX-Code
-$ python -V
-\end_layout
 
-\begin_layout LyX-Code
-Python 2.3.4
 \end_layout
 
-\begin_layout Standard
-MPICH is a freely available, portable implementation of MPI.
- For more information, visit the 
-\begin_inset LatexCommand \htmlurl[MPICH home page]{http://www-unix.mcs.anl.gov/mpi/mpich/}
-
-\end_inset
-
-.
- 
-\end_layout
-
-\begin_layout Quote
-
-\series bold
-Note for Mac OS X Users
-\series default
-: You will need Xcode, which is freely available from 
-\begin_inset LatexCommand \htmlurl[Apple]{http://developer.apple.com/}
-
-\end_inset
-
-.
- Instead of using MPICH, you will probably want to use 
-\begin_inset LatexCommand \htmlurl[LAM/MPI]{http://www.lam-mpi.org/}
-
-\end_inset
-
-.
- LAM/MPI is available as a Fink package; if you have 
-\begin_inset LatexCommand \htmlurl[Fink]{http://fink.sourceforge.net/}
-
-\end_inset
-
- installed, simply enter the following command from a Terminal window to
- install LAM/MPI:
-\end_layout
-
-\begin_layout LyX-Code
-$ fink install lammpi lammpi-dev
-\end_layout
-
 \begin_layout Section
 Downloading and Unpacking Source
 \end_layout
 
 \begin_layout Standard
-Download Mag from the 
+Download MAG from the 
 \begin_inset LatexCommand \htmlurl[Geodynamics website]{http://www.geodynamics.org/}
 
 \end_inset
 
 .
  Click the "software" tab at the top of the page.
- Then click "Software Packages." Once you click the Mag link, downloaded
+ Then click "Software Packages." Once you click the MAG link, downloaded
  the source archive and unpack it using the 
 \family typewriter
 tar
@@ -1264,7 +491,7 @@
 \end_layout
 
 \begin_layout LyX-Code
-$ tar xzf CitcomS-2.0.2.tar.gz
+$ tar xzf Mag-1.0.tar.gz
 \end_layout
 
 \begin_layout Standard
@@ -1272,7 +499,7 @@
 \end_layout
 
 \begin_layout LyX-Code
-$ gunzip -c CitcomS-2.0.2.tar.gz | tar xf -
+$ gunzip -c Mag-1.0.tar.gz | tar xf -
 \end_layout
 
 \begin_layout Section
@@ -1280,800 +507,34 @@
 \end_layout
 
 \begin_layout Standard
-After unpacking the source, use the following procedure to install CitComS:
+After unpacking the source, use the following procedure to prepare MAG for
+ running
 \end_layout
 
-\begin_layout Enumerate
-Navigate (i.e., 
-\family typewriter
-cd
-\family default
-) to the directory containing the CitComS source and type .
-\family typewriter
-/configure
-\family default
- to configure the package for your system
-\newline
-
-\newline
-
-\family typewriter
-$ cd CitcomS-2.0.2
-\family default
-
-\newline
-
-\family typewriter
-$ ./configure
+\begin_layout Itemize
+First you need to create a path for execution of magx (an example; use your
+ path) :
 \end_layout
 
-\begin_layout Enumerate
-Type '
-\family typewriter
-make
-\family default
-' to build the package.
-\family typewriter
-
-\newline
-
-\newline
-$ make
-\end_layout
-
-\begin_layout Enumerate
-Become 
-\family typewriter
-root
-\family default
- and type 
-\family typewriter
-make install
-\family default
- to install CitcomS.
-\newline
-
-\newline
-
-\family typewriter
-$ su
-\newline
-Password:
-\newline
-# make install
-\end_layout
-
-\begin_layout Standard
-To install as an ordinary user instead of 
-\family typewriter
-root
-\family default
-, give 
-\family typewriter
-configure
-\family default
- the 
-\family typewriter
---prefix
-\family default
- option, specifying a directory to which you have write access:
-\end_layout
-
 \begin_layout LyX-Code
-$ cd CitcomS-2.0.2
+printenv PATH $ PATH=$PATH:/home/dynamo/magCIG $ export PATH
 \end_layout
 
-\begin_layout LyX-Code
-$ ./configure --prefix=$HOME/cig
-\end_layout
-
-\begin_layout LyX-Code
-$ make
-\end_layout
-
-\begin_layout LyX-Code
-$ make install
-\end_layout
-
-\begin_layout Standard
-For more details about 
-\family typewriter
-configure
-\family default
-, see the Configuration section below.
-\end_layout
-
-\begin_layout Quote
-
-\series bold
-NOTE:
-\series default
- If you install as an ordinary user using 
-\family typewriter
---prefix=PREFIX
-\family default
- be mindful of the fact that you may have to set various environment variables
- in order for CitComS to function properly under the given 
-\family typewriter
-PREFIX
-\family default
-.
- First, you will want to add 
-\family typewriter
-PREFIX/bin
-\family default
- to your 
-\family typewriter
-PATH.
-
-\family default
- You may need or want to add 
-\family typewriter
-PREFIX/lib/python2.3/site-packages
-\family default
- to your 
-\family typewriter
-PYTHONPATH
-\family default
-.
- Finally, on some obscure Unix systems, you may need to add 
-\family typewriter
-PREFIX/lib
-\family default
- to your 
-\family typewriter
-LD_LIBRARY_PATH
-\family default
- (or equivalent).
- 
-\end_layout
-
-\begin_layout Section
-Configuration
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-configure
-\family default
- script checks for various system features.
- As it runs, it prints messages informing you of which features it is checking
- for.
- Upon successful completion, it generates a 
-\family typewriter
-Makefile
-\family default
- in each source directory of the package.
- It also generates one or more 
-\family typewriter
-portinfo
-\family default
- header files, which contain system-dependent definitions (
-\family typewriter
-portinfo
-\family default
- is equivalent to 
-\family typewriter
-config.h
-\family default
- in other open-source software packages).
- 
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-configure
-\family default
- script will attempt to guess the correct values of various installation
- parameters.
- In the event that the default values used by 
-\family typewriter
-configure
-\family default
- are incorrect for your system, or 
-\family typewriter
-configure
-\family default
- is unable to guess the value a certain parameter, you may have to specify
- the correct value by hand.
- 
-\end_layout
-
-\begin_layout Section
-Configure Usage
-\end_layout
-
-\begin_layout Standard
-For a detailed list of 
-\family typewriter
-configure
-\family default
- variables and options, give 
-\family typewriter
-configure
-\family default
- the 
-\family typewriter
---help
-\family default
- option:
-\end_layout
-
-\begin_layout LyX-Code
-$ ./configure --help
-\end_layout
-
-\begin_layout Standard
-The following is a summary of the variables and options that are important
- when installing CitComS.
- 
-\end_layout
-
-\begin_layout Section
-Environment Variables
-\end_layout
-
-\begin_layout Standard
-Environment variables may be specified as arguments to 
-\family typewriter
-configure
-\family default
-, e.g.,
-\end_layout
-
-\begin_layout LyX-Code
-$ ./configure CXX=icpc # compile C++ using the Intel compiler
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="5" columns="2">
-<features>
-<column alignment="left" valignment="top" leftline="true" width="1in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Variable
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-PYTHON
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Python interpreter.
- This is useful if you have Python installed in a non-standard location,
- e.g.,
-\end_layout
-
-\begin_layout Standard
-
-\end_layout
-
-\begin_layout Standard
-
-\family typewriter
-\InsetSpace ~
-\InsetSpace ~
-./configure 
-\backslash
-
-\end_layout
-
-\begin_layout Standard
-
-\family typewriter
-\InsetSpace ~
-\InsetSpace ~
-\InsetSpace ~
-\InsetSpace ~
-\InsetSpace ~
-\InsetSpace ~
-PYTHON=/opt/python2.3/bin/python
-\family default
- 
-\end_layout
-
-\begin_layout Standard
-
-\end_layout
-
-\begin_layout Standard
-By default, 
-\family typewriter
-configure
-\family default
- will search for a suitable Python interpreter using your 
-\family typewriter
-PATH
-\family default
- environment variable.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-CC
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-C compiler command
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-CXX
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-C++ compiler command
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-MPICC
-\end_layout
-
-\begin_layout Standard
-MPICXX
-\end_layout
-
-\begin_layout Standard
-MPIINCLUDES
-\end_layout
-
-\begin_layout Standard
-MPILIBS
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-These variables collectively specify how to build MPI programs.
- The variables MPICC and MPICXX specify compiler commands; MPIINCLUDES specifies
- preprocessor flags, and MPILIBS specifies linker flags.
- See 
-\begin_inset LatexCommand \ref{sec:MPI-Configuration}
-
-\end_inset
-
- for details and examples.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-\begin_inset LatexCommand \label{sec:MPI-Configuration}
-
-\end_inset
-
-MPI Configuration
-\end_layout
-
-\begin_layout Standard
-By default, 
-\family typewriter
-configure
-\family default
- will search for MPI wrappers (such as
-\family typewriter
- mpicxx/mpic++
-\family default
- and 
-\family typewriter
-mpicc
-\family default
-) using your PATH environment variable.
- You may specify MPI wrappers manually using the variables MPICC and MPICXX.
- If found, the wrappers will be used to compile MPI-related source, and
- CC and CXX will default to underlying C/C++ compiler commands (e.g., CC will
- default to the result of 
-\family typewriter
-mpicc -compile_info
-\family default
- if you are using MPICH).
- You may also set CC and CXX manually.
- The commands specified by CXX and CC are used to compile ordinary C/C++
- source, and for linking shared libraries.
-\end_layout
-
-\begin_layout Subsection
-Manually specifying MPI wrappers
-\end_layout
-
-\begin_layout LyX-Code
-$ ./configure 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-MPICC=/opt/mpich-1.2.6/bin/mpicc 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-MPICXX=/opt/mpich-1.2.6/bin/mpicxx
-\end_layout
-
-\begin_layout Standard
-If MPI wrappers are not found, 
-\family typewriter
-configure
-\family default
- will set MPICC and MPICXX to CC and CXX, respectively (i.e., the same commands
- used to build ordinary C/C++ source).
- Then, configure will attempt to find 
-\family typewriter
-mpi.h
-\family default
- and an MPI library in the standard locations (e.g., 
-\family typewriter
-/usr/include
-\family default
- and 
-\family typewriter
-/usr/lib
-\family default
-) using the ordinary compiler.
- In this scenario, if your MPI header files and libraries are installed
- in a non-standard location, you must specify MPIINCLUDES and MPILIBS, so
- that the compiler can find the MPI header files and libraries.
-\end_layout
-
-\begin_layout Subsection
-Manually specifying MPI 
-\family typewriter
-include
-\family default
- and 
-\family typewriter
-lib
-\family default
- directories
-\end_layout
-
-\begin_layout LyX-Code
-$ ./configure 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-MPIINCLUDES="-I/opt/mpich-1.2.6/include" 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-MPILIBS="-L/opt/mpich-1.2.6/lib -lmpich"
-\end_layout
-
-\begin_layout Subsection
-Manually specifying MPI 
-\family typewriter
-include
-\family default
- and 
-\family typewriter
-lib
-\family default
- directories, and an alternative compiler
-\end_layout
-
-\begin_layout LyX-Code
-$ ./configure 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-CC=icc 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-CXX=icpc 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-MPIINCLUDES="-I/opt/mpich-1.2.6/include" 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-MPILIBS="-L/opt/mpich-1.2.6/lib -lmpich"
-\end_layout
-
-\begin_layout Standard
-Some words of caution when specifying the MPI configuration:
-\end_layout
-
 \begin_layout Itemize
-Specifying MPI commands and flags in general-purpose 
-\family typewriter
-configure
-\family default
- variables (such as CC, CXX, CPPFLAGS, and LDFLAGS) may work on some systems,
- but is not recommended unless you happen to have a shared version of the
- MPI library installed on your system (
-\family typewriter
-libmpich.so
-\family default
- or 
-\family typewriter
-libmpi.so
-\family default
-).
- 
+make, using existing param.f grid and symmetry 
 \end_layout
 
-\begin_layout Itemize
-If you explicitly specify both MPICXX and CXX, CXX will be used to compile
- all C++ source; MPICXX is invoked merely to determine the correct values
- for MPIINCLUDES and MPILIBS (if necessary).
- Likewise, if you explicitly specify both MPICC and CC, CC will be used
- to compile all C source; MPICC will only be used to determine the MPI flags.
-\end_layout
-
-\begin_layout Itemize
-Configuring CitComS with a different C++ compiler than was used to configure
- your MPI library may cause link errors.
- However, the 
-\family typewriter
-configure
-\family default
- script attempts to detect this scenario and automatically work around the
- problem for you.
-\end_layout
-
-\begin_layout Section
-Batch System Configuration
-\end_layout
-
-\begin_layout Standard
-If you are installing CitComS on a cluster with a batch system, you can
- configure CitComS such that the Pyre-based commands 
-\family typewriter
-citcomsregional.sh
-\family default
- and 
-\family typewriter
-citcomsfull.sh
-\family default
- automatically submit jobs to the batch queue.
- CitComS contains support for the LSF, PBS, and Globus batch systems.
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-configure
-\family default
- script searches for the 
-\family typewriter
-bsub
-\family default
-, 
-\family typewriter
-qsub
-\family default
-, and 
-\family typewriter
-globusrun
-\family default
- batch commands.
- If one of these is found, CitComS is configured to use the corresponding
- batch system (LSF, PBS, and Globus, respectively) instead of launching
- MPI jobs directly using 
-\family typewriter
-mpirun
-\family default
-.
- Run 
-\family typewriter
-./configure --help
-\family default
- for information on how to configure the batch system parameters manually.
-\end_layout
-
-\begin_layout Standard
-The proper commands to use in a batch script varies from one cluster to
- the next.
- On some systems, 
-\family typewriter
-mpirun
-\family default
- is invoked directly from the batch script.
- On others, a special wrapper is used instead.
- Therefore, after successfully installing CitComS, you must edit the following
- XML configuration file: 
-\end_layout
-
 \begin_layout LyX-Code
-PREFIX/etc/CitcomS/CitcomS.pml
+$ make 
 \end_layout
 
 \begin_layout Standard
-where PREFIX is the directory under which you installed CitcomS (default
- 
-\family typewriter
-/usr/local
-\family default
-).
- Edit the defaults as appropriate for your system.
- For example, if you are using LSF, first verify that CitComS is configured
- to use LSF: 
+note that makefile uses -g77 or other Fortran compiler, and creates executable,
+ either magx(default) or magxYYsZ, where yy=spherical harmonic trunction
+ and Z=longitudinal symmetry
 \end_layout
 
-\begin_layout LyX-Code
-<property name="launcher">lsf</property>
-\end_layout
-
-\begin_layout Standard
-Next, edit the LSF section: 
-\end_layout
-
-\begin_layout LyX-Code
-<component name="lsf"> 
-\end_layout
-
-\begin_layout LyX-Code
-      <property name="command">mpijob mpirun</property>
-\end_layout
-
-\begin_layout LyX-Code
-      <property name="batch-command">bsub</property> 
-\end_layout
-
-\begin_layout LyX-Code
-</component>
-\end_layout
-
-\begin_layout Standard
-In particular, set the 
-\family typewriter
-command
-\family default
- property to the correct command for launching MPI jobs from a batch script
- on your system.
- For example:
-\end_layout
-
-\begin_layout LyX-Code
-<property name="command">pam -g 1 gmmpirun_wrapper</property>
-\end_layout
-
-\begin_layout Standard
-You may find the 
-\family typewriter
---launcher.dry
-\family default
- option useful while debugging the batch system configuration: 
-\end_layout
-
-\begin_layout LyX-Code
-citcomsregional.sh --launcher.dry
-\end_layout
-
-\begin_layout Standard
-This option will cause CitcomS to perform a "dry run," dumping the batch
- script to the console, instead of actually submitting it for execution.
-\end_layout
-
 \begin_layout Section
-\begin_inset LatexCommand \label{sec:Installing-without-Pyre}
-
-\end_inset
-
-Installing without Pyre
-\end_layout
-
-\begin_layout Standard
-To build just the CitComS tools (or "drivers") from the legacy C code, give
- 
-\family typewriter
-configure
-\family default
- the 
-\family typewriter
---without-pyre
-\family default
- option:
-\end_layout
-
-\begin_layout LyX-Code
-$ ./configure --without-pyre
-\end_layout
-
-\begin_layout Standard
-The only system requirements for this configuration are an MPI library and
- a decent C compiler.
- The final 
-\family typewriter
-make install
-\family default
- step will install two command-line tools: 
-\family typewriter
-CitcomSFull
-\family default
- and 
-\family typewriter
-CitcomSRegional
-\family default
-.
-\end_layout
-
-\begin_layout Section
 \begin_inset LatexCommand \label{sec:Software-Repository}
 
 \end_inset
@@ -2082,7 +543,7 @@
 \end_layout
 
 \begin_layout Standard
-The CitcomS source code is available via a Subversion server at the 
+The MAG source code is available via a Subversion server at the 
 \begin_inset LatexCommand \htmlurl[Geodynamics website]{http://www.geodynamics.org/}
 
 \end_inset
@@ -2134,34 +595,6 @@
 Type 'svn help' for usage.
 \end_layout
 
-\begin_layout Standard
-Second, you must have the GNU tools Autoconf, Automake, and Libtool installed.
- To check, enter the following commands:
-\end_layout
-
-\begin_layout LyX-Code
-$ autoconf --version
-\end_layout
-
-\begin_layout LyX-Code
-$ automake --version
-\end_layout
-
-\begin_layout LyX-Code
-$ libtoolize --version
-\end_layout
-
-\begin_layout Standard
-For more information about these GNU tools, see the 
-\begin_inset LatexCommand \htmlurl[GNU website]{http://www.gnu.org/software/}
-
-\end_inset
-
-.
- The CitComS v2.0.2 source package was created with Autoconf 2.59, Automake
- 1.9.2, and Libtool 1.5.6.
-\end_layout
-
 \begin_layout Subsection
 Download Source from Subversion
 \end_layout
@@ -2175,726 +608,70 @@
 \end_layout
 
 \begin_layout LyX-Code
-$ svn checkout svn://geodynamics.org/cig/mc/3D/CitcomS/trunk CitcomS
+$ svn checkout svn://geodynamics.org/cig/geodyn/3D/MAG/trunk MAG
 \end_layout
 
-\begin_layout Standard
-Like the release version, the development version depends upon Pythia v0.8.
- In addition, the development version also depends upon a package called
- Exchanger.
- Unless you plan to build only the legacy CitComS tools (see 
-\begin_inset LatexCommand \ref{sec:Installing-without-Pyre}
-
-\end_inset
-
- earlier in this chapter), you will need to check out the Pythia and Exchanger
- packages as well.
- Like CitComS, Exchanger is available from the geodynamics.org server.
- For convenience, Pythia is also available from geodynamics.org.
- To check out Pythia and Exchanger, use the following commands:
-\end_layout
-
 \begin_layout LyX-Code
-$ svn checkout svn://geodynamics.org/cig/vendor/pythia/v0.8 pythia-0.8 
-\end_layout
 
-\begin_layout LyX-Code
-$ svn checkout svn://geodynamics.org/cig/cs/Exchanger/trunk Exchanger
 \end_layout
 
-\begin_layout Subsection
-Generating the GNU Build System
-\end_layout
-
-\begin_layout Standard
-Your working directory should now contain three subdirectories:
-\end_layout
-
-\begin_layout LyX-Code
-$ ls
-\end_layout
-
-\begin_layout LyX-Code
-CitcomS Exchanger pythia-0.8
-\end_layout
-
-\begin_layout Standard
-Each of the three packages must be configured and built separately, in the
- following order:
-\end_layout
-
-\begin_layout Enumerate
-pythia-0.8
-\end_layout
-
-\begin_layout Enumerate
-Exchanger
-\end_layout
-
-\begin_layout Enumerate
-CitcomS
-\end_layout
-
-\begin_layout Standard
-But before you can run 
-\family typewriter
-configure
-\family default
- or 
-\family typewriter
-make
-\family default
-, you must generate the necessary files using the GNU tools.
- The easiest way to do this is to run 
-\family typewriter
-autoreconf -i 
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-$ cd pythia-0.8
-\end_layout
-
-\begin_layout LyX-Code
-$ autoreconf -i
-\end_layout
-
-\begin_layout LyX-Code
-$ ./configure --prefix=$HOME/cig
-\end_layout
-
-\begin_layout LyX-Code
-$ make
-\end_layout
-
-\begin_layout LyX-Code
-$ make install
-\end_layout
-
-\begin_layout Standard
-Then, repeat this process for Exchanger and CitcomS:
-\end_layout
-
-\begin_layout LyX-Code
-$ cd ../Exchanger
-\end_layout
-
-\begin_layout LyX-Code
-$ autoreconf -i
-\end_layout
-
-\begin_layout LyX-Code
-$ ./configure --prefix=$HOME/cig
-\end_layout
-
-\begin_layout LyX-Code
-$ make
-\end_layout
-
-\begin_layout LyX-Code
-$ make install
-\end_layout
-
-\begin_layout LyX-Code
-$ # set PYTHONPATH  
-\family roman
-[so that CitComS can find the newly installed Exchanger]
-\end_layout
-
-\begin_layout LyX-Code
-$ export PYTHONPATH=$HOME/cig/lib/python2.4/site-packages:$PYTHONPATH
-\end_layout
-
-\begin_layout LyX-Code
-$ cd ../CitcomS
-\end_layout
-
-\begin_layout LyX-Code
-$ autoreconf -i
-\end_layout
-
-\begin_layout LyX-Code
-$ ./configure --prefix=$HOME/cig
-\end_layout
-
-\begin_layout LyX-Code
-$ make
-\end_layout
-
-\begin_layout LyX-Code
-$ make install
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-autoreconf
-\family default
- tool runs Autoconf to generate the 
-\family typewriter
-configure
-\family default
- script from 
-\family typewriter
-configure.ac
-\family default
-.
- It also runs Automake to generate 
-\family typewriter
-Makefile.in
-\family default
- from 
-\family typewriter
-Makefile.am
-\family default
- in each source directory.
-\end_layout
-
 \begin_layout Chapter
-Running CitComS.py
+Running MAG
 \end_layout
 
-\begin_layout Standard
-
-\end_layout
-
 \begin_layout Section
-Using CitComS.py
+Using MAG
 \end_layout
 
 \begin_layout Standard
-CitComS.py usage is similar to that of previous versions of CitComS.
- Installed under the 
-\family typewriter
-bin
-\family default
- directory (default 
-\family typewriter
-/usr/local/bin
-\family default
-), 
-\family typewriter
-citcomsregional.sh
-\family default
- is used for regional models and 
-\family typewriter
-citcomsfull.sh
-\family default
- for full spherical models.
- The program
-\family typewriter
- citcomsregional.sh
-\family default
- can be executed without any command line options and will run with default
- parameters; 
-\family typewriter
-citcomsfull.sh
-\family default
- requires at least 12 processors to run.
- To do so, you must specify the 
-\family typewriter
-launcher
-\family default
- parameters, which are called "facilities."
+Execution statement examples:
 \end_layout
 
-\begin_layout Standard
-Since you will likely want to specify the parameters of your CitComS runs,
- you will need to alter both computational details (such as the number of
- time steps) and controlling parameters specific to your problem (such as
- the Rayleigh number).
- Most of the properties you will set using CitComS.py have identical names
- as the parameters for the old CitComS.
- 
+\begin_layout Description
+* input from par.bnch0, screen output, foreground 
 \end_layout
 
-\begin_layout Section
-Changing Parameters
-\end_layout
-
-\begin_layout Standard
-Pyre has the following syntax to change parameters from their default values.
- To change the value of a property of a component, use:
-\end_layout
-
 \begin_layout LyX-Code
---[component].[property]=[value]
+$ magx32s4 <par.bnch0 
 \end_layout
 
-\begin_layout Standard
-Each component is attached to a facility, so the option above can also be
- written as: 
+\begin_layout Description
+* input from par.bnch0, screen output to p.bench0, background 
 \end_layout
 
 \begin_layout LyX-Code
---[facility].[property]=[value]
+$ magx32s4 <par.bnch0 >p.bench0 &
 \end_layout
 
-\begin_layout Standard
-A different component can be attached to a facility by:
+\begin_layout Description
+* to restart run using d-file from same directory, changes in par-file:
+ infile="filename", init=0,
 \end_layout
 
-\begin_layout LyX-Code
---[facility]=[new_component] 
-\end_layout
-
-\begin_layout Section
-Coordinate System and Mesh
-\end_layout
-
-\begin_layout Standard
-In general, CitComS uses meshes that are regular, although considerable
- flexibility exists for grid refinement in the regional models.
- In regional meshes, 
-\emph on
-theta
-\emph default
- is the colatitude measured from the north pole, 
-\emph on
-fi
-\emph default
- is the east longitude, and z is the radius.
- 
-\emph on
-theta
-\emph default
- and 
-\emph on
-fi
-\emph default
- are in units of radians.
- Figure 3.1 shows the organization of the mesh in a regional problem.
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status collapsed
-
 \begin_layout Description
-\begin_inset Graphics
-	filename CitcomS/manual/graphics/c_fig3.jpg
-
-\end_inset
-
-
+* to change grids or symmetry (in param.f) needs recompile parameter (nn=25,ni=14
+4,nj=288,nnaf=23,minc=6) minc is the m-fold symmetry and nj/3 gives lmax
+ param32s6.f and param32s4.f are examples of param.f param.f is what the code
+ looks for and needs to be changed for remaking
 \end_layout
 
-\begin_layout Caption
-Global\InsetSpace ~
-Node\InsetSpace ~
-Numbering.
- Left: Global node numbering starts at the base of arrow A (theta
-\size scriptsize
-min
-\size default
-, fi
-\size scriptsize
-min
-\size default
-, r
-\size scriptsize
-min
-\size default
-), and advances from 1 at the base to 
-\emph on
-nz
-\emph default
- at the tip.
- Upon reaching the tip, numbering continues from the base of arrow B (
-\emph on
-nz
-\emph default
-+1) to its tip (2 
-\emph on
-nz
-\emph default
-), and so on for all nodes on the plane fi = fi
-\size scriptsize
-min
-\size default
-.
- Right: After completing each theta radius plane, the fi index is incremented
- and numbering commences from (theta
-\size scriptsize
-min
-\size default
-, r
-\size scriptsize
-min
-\size default
-) as on the left.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
 \begin_layout Section
-A Simple CitComS Test
+Changing Parameters
 \end_layout
 
-\begin_layout Standard
-CitComS runs similarly in full spherical or regional modes.
- For the purpose of this example, you will perform a test run of the regional
- version.
- Instructions for using the full version can be found at 
-\begin_inset LatexCommand \vref{sec:Cookbook-1:-Global}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-Execute the following on the command line:
-\end_layout
-
-\begin_layout Paragraph
-\begin_inset LatexCommand \label{sub:Uniprocessor-CitComS-from}
-
-\end_inset
-
-Example: Uniprocessor CitComS from the Command Line
-\end_layout
-
 \begin_layout LyX-Code
-citcomsregional.sh --steps=10 
-\end_layout
 
-\begin_layout LyX-Code
---controller.monitoringFrequency=5 --solver.datafile=example 
 \end_layout
 
-\begin_layout LyX-Code
---solver.mesher.nodex=17 --solver.mesher.nodey=17
-\end_layout
-
 \begin_layout Standard
-This runs a default convection problem in a regional domain for 10 time
- steps and with a mesh of 17 
-\begin_inset Formula $\times$
-\end_inset
 
- 17 
-\begin_inset Formula $\times$
-\end_inset
-
- 9 nodal points.
- See Chapter 
-\begin_inset LatexCommand \vref{cha:Postprocessing-and-Graphics}
-
-\end_inset
-
- for instructions to immediately visualize your results with OpenDX.
 \end_layout
 
 \begin_layout Section
-Multiprocessor Example
+A Simple MAG Test
 \end_layout
 
 \begin_layout Standard
-On input, CitComS needs numerous parameters specified (see Appendix A for
- full list).
- Most parameters have sensible default values.
- Depending on those input parameters, CitComS could also require numerous
- input files, such as velocity boundary conditions which could be used for
- time dependent, plate tectonic problems.
- Finally, CitComS will potentially output a large number of files which
- will be spread throughout the file systems contained in the individual
- nodes of your Beowulf.
- This means that you will have to organize your directories carefully when
- running CitComS so that you can find your way through these files as well
- as use a post-processing program contained with this distribution.
- (In the example that follows, these output files would be placed in 
-\family typewriter
-/scratch/username
-\family default
- with a filename prefix 
-\family typewriter
-example1
-\family default
- on each individual node.)
-\end_layout
-
-\begin_layout Standard
-It is possible to input the parameters relevant to your test run from the
- command line:
-\end_layout
-
-\begin_layout Paragraph
-Example: Multiprocessor CitComS from the Command Line
-\end_layout
-
-\begin_layout LyX-Code
-$ citcomsregional.sh --launcher.nodes=4 
-\end_layout
-
-\begin_layout LyX-Code
---launcher.nodegen="n%03d" --launcher.nodelist=[101-102] 
-\end_layout
-
-\begin_layout LyX-Code
---solver.mesher.nprocx=2 --solver.mesher.nprocy=2 
-\end_layout
-
-\begin_layout LyX-Code
---solver.datafile="/scratch/username/example1"
-\end_layout
-
-\begin_layout Standard
-However, entering all those parameters via the command line involves the
- risk of typographical errors, which can lead to undesired results.
- So, you may find it easier to write a brief shell script that contains
- the parameters.
- The file should have the suffix 
-\family typewriter
-.sh
-\family default
-.
- When you downloaded the CitComS source, this included an 
-\family typewriter
-examples
-\family default
- directory.
- In this directory, you will find a script called 
-\family typewriter
-example1.sh
-\family default
-.
- 
-\end_layout
-
-\begin_layout Paragraph
-Example: Simple Regional CitComS Shell Script, example1.sh 
-\end_layout
-
-\begin_layout LyX-Code
-#!/bin/sh
-\newline
-
-\end_layout
-
-\begin_layout LyX-Code
-citcomsregional.sh 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---steps=71 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---controller.monitoringFrequency=10 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---launcher.nodes=4 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---launcher.nodegen="n%03d" 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---launching.nodelist=[101-102,101-102] 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---solver.datafile=/scratch/username/example1 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---solver.mesher.nprocx=2 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---solver.mesher.nprocy=2 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---solver.mesher.nodex=17 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---solver.mesher.nodey=17 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---solver.mesher.nodez=9 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-# End of file
-\end_layout
-
-\begin_layout Standard
-This is a basic problem with 2 processors in colatitude (x-coordinate),
- 2 in longitude (y-direction), and 1 in the radial (z-direction).
- In addition, there will be 17 nodes in x, 17 nodes in y, and 9 nodes in
- z.
-\end_layout
-
-\begin_layout Standard
-It is important to realize that within the code (and in finite element analysis)
- the term "node" refers to the mesh points defining the corners of the elements.
- Unfortunately, "nodes" also refers to the individual computers which make
- up the Beowulf PC cluster.
- In 
-\family typewriter
-example1.sh
-\family default
-, this is indicated with:
-\end_layout
-
-\begin_layout LyX-Code
---solver.mesher.nprocx=2 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---solver.mesher.nprocy=2 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---solver.mesher.nodex=17 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---solver.mesher.nodey=17 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---solver.mesher.nodez=9 
-\backslash
- 
-\end_layout
-
-\begin_layout Standard
-These quantities refer to the total number of FEM nodes in a given direction
- for the complete problem and for the example it works out that within a
- given processor there will be 9 x 9 x 9 nodes.
- Note that in the x-direction (or y) that for the entire problem there are
- 17 nodes and there is one node shared between two processors.
- This shared node is duplicated in two adjacent processors.
- The global numbering of FEM nodes is z-direction first, then x-direction,
- then y-direction.
- This numbering convention is used for the input and output data.
-\end_layout
-
-\begin_layout Standard
-In order to run this example you should be on your front end and be in the
- directory in which the input file is located, in this case, the 
-\family typewriter
-examples
-\family default
- directory.
- To run the test example, invoke the following:
-\end_layout
-
-\begin_layout LyX-Code
-$ ./example1.sh
-\end_layout
-
-\begin_layout Standard
-Once you have completed your run, you will notice that it generates a file
- called 
-\family typewriter
-mpirun.nodes
-\family default
-.
- It will contain a list of the nodes where CitComS has run.
- You may want to login to one of the nodes to check that the data appears
- to have been properly generated.
- You should also check the log file for any error messages.
- 
-\end_layout
-
-\begin_layout Standard
-If you receive a message such as 
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-bash: --solver.mesher.nodez=9: command not found
-\end_layout
-
-\begin_layout Standard
-chances are your script is missing a line continuation or has an extra space.
- However, most of the time CitComS will just run using the default values
- -- even if it finds a typographical error such as "nnode" instead of "node."
- So, along with double-checking your parameters as you type them in, you
- should check your results to be sure they make sense.
- 
-\end_layout
-
-\begin_layout Standard
 Following your successful run, you will want to retrieve the output files
  from all the nodes and process them so they can be visualized with the
  visualization program OpenDX and proceed to the next chapter.
@@ -2917,8 +694,7 @@
 \end_layout
 
 \begin_layout Standard
-Once you have run CitComS, you should have a series of output files (potentially
- spread throughout the file systems of your Beowulf).
+Once you have run MAG, you should have a series of output files.
  You will have to retrieve and combine the data for the time-step (age)
  of interest.
 \end_layout
@@ -2948,1018 +724,46 @@
  
 \end_layout
 
-\begin_layout Section
-Processing on a Beowulf Cluster
-\end_layout
-
-\begin_layout Standard
-Generally, the results from your CitComS run will be distributed on disks
- attached to individual nodes of your Beowulf cluster.
- The output files are written in each node under the directory that you
- specified as your datafile in the input file.
- To examine those files, login to a node and change directories to the one
- you specified with a prefix.
- For example, if you selected your datafile to be called 
-\family typewriter
-datafile="/scratch/username/test-case"
-\family default
-, then your output file will be written to 
-\family typewriter
-/scratch/username
-\family default
- and will have the prefix 
-\family typewriter
-test-case
-\family default
-.
- An example of a filename for the velocity output is 
-\family typewriter
-test-case.velo.2.10
-\family default
- where 
-\family typewriter
-test-case
-\family default
- is the model prefix, 
-\family typewriter
-velo
-\family default
- means that this is a velocity data file, 
-\family typewriter
-2
-\family default
- corresponds to the processor number (so it is output by the 2nd processor)
- , and 
-\family typewriter
-10
-\family default
- corresponds to the time-step.
- 
-\end_layout
-
-\begin_layout Standard
-To choose an age to export for postprocessing, you have to find out which
- time step corresponds to the age that interests you.
- This is done by looking at the log or time file, for example, 
-\family typewriter
-test-case.log
-\family default
-.
- The log file contains data that describes the details of the computation.
- It also has a 
-\family typewriter
-current age
-\family default
- field that lists the time step numbers and their corresponding times.
- The time step value you selected is what will be exported for postprocessing.
- The time file contains the non-dimensional model time.
- The format of the time file can be found in Appendix C.
- 
-\end_layout
-
-\begin_layout Standard
-These output files need to be post-processed before you can do the visualization.
- There are two scripts and both can post-process (retrieve and combine)
- CitComS output: 
-\family typewriter
-autocombine.py
-\family default
- and 
-\family typewriter
-batchcombine.py
-\family default
-.
- It is recommened to use 
-\family typewriter
-autocombine.py
-\family default
- over 
-\family typewriter
-batchcombine.py
-\family default
-, as the former is easier to use.
- 
-\end_layout
-
-\begin_layout Standard
-To use 
-\family typewriter
-autocombine.py
-\family default
-, you have to run CitComS.py in a slightly different way.
- CitComS.py prints out the input parameters to the screen.
- That printout can be redirected to a file, which can be used later to retrieve
- input parameters.
- This is done with: 
-\end_layout
-
 \begin_layout LyX-Code
-$ my_citcoms.py_script > input_param 
-\end_layout
 
-\begin_layout Standard
-Then, you can retrieve and combine data of step 10 by using: 
 \end_layout
 
-\begin_layout LyX-Code
-$ autocombine.py mpirun.nodes input_param 10 
-\end_layout
-
-\begin_layout Standard
-This reads the MPI machinefile (
-\family typewriter
-mpirun.nodes
-\family default
-) and CitComS.py input parameters (
-\family typewriter
-input_param
-\family default
-), then calls 
-\family typewriter
-batchcombine.py
-\family default
- to do the actual job.
- The general usage for 
-\family typewriter
-autocombine.py
-\family default
- is: 
-\end_layout
-
-\begin_layout LyX-Code
-$ autocombine.py [machinefile] [input_param] 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
-[step1] [step2 or more ...] 
-\end_layout
-
-\begin_layout Standard
-If you do not have the input parameters saved to a file, you have to use
- 
-\family typewriter
-batchcombine.py
-\family default
- to retrieve and combine the data.
- The general usage for 
-\family typewriter
-batchcombine.py
-\family default
- is: 
-\end_layout
-
-\begin_layout LyX-Code
-$ batchcombine.py [machinefile] [modeldir] [modelname] 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-[timestep] [nodex] [nodey] [nodez] [n-surf-cap] 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
-[nprocx] [nprocy] [nprocz] 
-\end_layout
-
-\begin_layout Standard
-where 
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-machinefile
-\family default
- is the file with a list of all the machines you are using, which under
- normal circumstances are the same as the launching nodes.
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-modeldir
-\family default
- is the scratch directory where all your files are located.
- This should correspond to the first part of the 
-\family typewriter
-datafile
-\family default
- entry, e.g., 
-\family typewriter
-/scratch/username
-\family default
-.
- 
-\family typewriter
-modelname
-\family default
- is the model prefix for example 
-\family typewriter
-test_case
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-timestep
-\family default
- is the time step you want to export.
- This corresponds to the last term in the filename of the velocity file.
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-nodex
-\family default
-, 
-\family typewriter
-nodey
-\family default
-, 
-\family typewriter
-nodez
-\family default
- are the same values as those used in the input file.
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-n-surf-cap
-\family default
- is equal to 1 for regional CitComS and 12 for full CitComS.
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-nprocx
-\family default
-, 
-\family typewriter
-nprocy
-\family default
-, 
-\family typewriter
-nprocz
-\family default
- are the same values as those used in the input file.
-\end_layout
-
-\begin_layout Standard
-If your Beowulf cluster uses ssh (rather than rsh) to access the computation
- nodes, you have to manually edit 
-\family typewriter
-bin/batchpaste.sh
-\family default
- and replace 'rsh' to 'ssh' in the file.
- If your cluster forbids access to the computation nodes, you can still
- post-process your output files (if they all reside in one directory) by
- following the instructions in the next section.
- 
-\end_layout
-
-\begin_layout Standard
-Once 
-\family typewriter
-autocombine.py
-\family default
- or 
-\family typewriter
-batchcombine.py
-\family default
- has been run, you should end up with 2 files (or 24 files for full CitComS)
- that resemble these: 
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-test-case.cap0.10.general
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-test-case.cap0.10
-\end_layout
-
-\begin_layout Standard
-The latter file is the data file containing simulation results; its format
- can be found in Appendix C.
- The former file is the OpenDX header for the data.
-\end_layout
-
 \begin_layout Section
-Postprocessing in a Non-Cluster Environment
+Using IDL for Visualization
 \end_layout
 
 \begin_layout Standard
-If you have run CitComS in a non-cluster environment or all of your data
- resides in a single directory, you can still use 
+IDL routines designed for MAG can be found in the directory called 
 \family typewriter
-autocombine.py
+PREFIX/idl
 \family default
- or 
-\family typewriter
-batchcombine.py
-\family default
- to combine the data.
- The 
-\family typewriter
-machinefile
-\family default
- is not needed and can be replaced by 
-\family typewriter
-localhost
-\family default
-, such as: 
-\end_layout
-
-\begin_layout LyX-Code
-$ autocombine.py localhost [input_param] 
-\backslash
+, where PREFIX is the directory under which you installed MAG.
  
 \end_layout
 
-\begin_layout LyX-Code
-[step1] [step2 or more ...] 
-\end_layout
-
 \begin_layout Standard
-or 
+In this example, 
 \end_layout
 
 \begin_layout LyX-Code
-$ batchcombine.py localhost [modeldir] [modelname] [timestep] 
-\backslash
 
 \end_layout
 
 \begin_layout LyX-Code
-[nodex] [nodey] [nodez] [n-surf-cap] 
-\backslash
- 
-\end_layout
 
-\begin_layout LyX-Code
-[nprocx] [nprocy] [nprocz] 
 \end_layout
 
-\begin_layout Section
-Using OpenDX for Regional Visualization
-\end_layout
-
-\begin_layout Standard
-OpenDX modules designed for CitComS can be found in the directory called
- 
-\family typewriter
-PREFIX/share/CitcomS/visual
-\family default
-, where PREFIX is the directory under which you installed CitcomS (default
- 
-\family typewriter
-/usr/local
-\family default
-).
- You will need both the 
-\family typewriter
-.net
-\family default
- and 
-\family typewriter
-.cfg
-\family default
- files.
- 
-\end_layout
-
-\begin_layout Standard
-In this example, you will use 
-\family typewriter
-visRegional.net
-\family default
- to visualize the result of regional CitComS.py.
- (You will use 
-\family typewriter
-visFull.net
-\family default
- to visualize the result of full CitComS.py.) You should launch OpenDX by
- typing: 
-\end_layout
-
-\begin_layout LyX-Code
-$ dx 
-\end_layout
-
-\begin_layout Standard
-You will see an OpenDX 
-\family sans
-Data Explorer
-\family default
- window.
- Click 
-\family sans
-Edit Visual Programs
-\family default
- and select 
-\family typewriter
-visRegional.net
-\family default
- from the file selector.
- You will see a 
-\family sans
-Visual Program Editor
-\family default
- window.
- Then select the 
-\family sans
-import
-\family default
- tab in the main window and double-click on the 
-\family sans
-FileSelector
-\family default
- block, which will open a 
-\family sans
-Control Panel
-\family default
- window.
- In the 
-\family sans
-CitcomSImport
-\family default
- filename input box, select your postprocessed data file, e.g.,
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-test-case.cap0.10.general
-\end_layout
-
-\begin_layout Standard
-(For the global model,  double-click on the 
-\family sans
-FileSelector
-\family default
- block, select one of the 12 processed data files in 
-\family sans
-CitcomsFullImport format_string
-\family default
- field.
- Then, edit the filename with the cap number replaced by 
-\family typewriter
-%d
-\family default
-, e.g.,
-\family typewriter
- test-case.cap%d.10.general
-\family default
-.) In the pulldown menu, select
-\family typewriter
- 
-\family sans
-Execute\SpecialChar \menuseparator
-Execute Once
-\family default
- or 
-\family sans
-Execute on Change
-\family default
-.
- A new window will appear with the image of the model.
- If you want to zoom, rotate, change projection, and otherwise manipulate
- the view of the model, experiment with the menu 
-\family sans
-Options\SpecialChar \menuseparator
-View Control
-\family default
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\begin_inset Graphics
-	filename CitcomS/manual/graphics/c_fig5.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Caption
-Regional Model Visualized with OpenDX.
- A snapshot of an upwelling (blue isosurface) with a slice of the temperature
- field (bisecting plane).
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Additional options in the control panel window for the regional model include:
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-CitcomSImport reduced
-\family default
-, can increase or reduce the resolution.
- 
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Core radius
-\family default
- is the size of the orange sphere which represents the core-mantle boundary.
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Isosurface value
-\family default
- is the temperature isosurfaces.
- You can change the values of the isosurfaces, including adding additional
- isosurfaces or deleting existing ones.
- 
-\end_layout
-
-\begin_layout Itemize
- 
-\family sans
-Slab cut dimension
-\family default
- is the direction of the slab (an OpenDX term of cross-section).
- 
-\end_layout
-
-\begin_layout Itemize
- 
-\family sans
-Slab cut position
-\family default
- is the position of the slab.
-  
-\end_layout
-
-\begin_layout Standard
-After changing any of these parameters, you must select 
-\family sans
-Execute\SpecialChar \menuseparator
-Execute Once
-\family default
- to redraw the model.
- You can change any of the parameters, visualization, or set-up by going
- back to the main window and clicking on each tab.
- If you click on each block, you will be able to change the settings for
- that function.
- 
-\end_layout
-
-\begin_layout Chapter
-Cookbooks
-\end_layout
-
-\begin_layout Section
-Introduction
-\end_layout
-
-\begin_layout Standard
-These cookbook examples are meant to serve as a guide to some of the types
- of problems CitComS.py can solve.
- Cookbook examples range from regional to full spherical shell problems
- that address traditional convection problems.
-\end_layout
-
-\begin_layout Section
-\begin_inset LatexCommand \label{sec:Cookbook-1:-Global}
-
-\end_inset
-
-Cookbook 1: Global Model Using 
-\family sans
-fullcitcoms
-\end_layout
-
-\begin_layout Subsection
-Problem
-\end_layout
-
-\begin_layout Standard
-You would like to solve for thermal convection within a full spherical shell
- domain.
- One of the versions of CitComS.py is designed to run on a cluster that decompose
-s the shell into 12 equal "caps" and then distributes the calculation for
- caps onto separate processors.
- To run CitComS.py with the full solver parameter set, it is recommended
- that you have a minimum of 12 processors available on your cluster.
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement h
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\begin_inset Graphics
-	filename CitcomS/manual/graphics/cookbook1.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Caption
-\begin_inset LatexCommand \label{fig:Global-Model-"Caps":}
-
-\end_inset
-
-Global\InsetSpace ~
-Model\InsetSpace ~
-"Caps": Left (A): Three-dimensional perspective image showing
- the 12 spherical caps used in a full CitComS.py run.
- Right (B): The temperature field at 1081 km depth from a Cookbook 1 run.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Solution
-\end_layout
-
-\begin_layout Standard
-You will be running 
-\family sans
-cookbook1.sh
-\family default
- which calls the script 
-\family sans
-citcomsfull.sh
-\family default
-.
- The first set of parameters specifies the number of nodes (12) and their
- names on your cluster through Pyre's 
-\family sans
-launcher
-\family default
- facility.
-\end_layout
-
-\begin_layout LyX-Code
---launcher.nodes=12 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---launcher.nodegen="n%03d" 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---launcher.nodelist=[101-106,101-106] 
-\backslash
-  
-\end_layout
-
-\begin_layout Standard
-The second set of parameters specifies the number of time steps (101), and
- how often the computation should be monitored (25).
-\end_layout
-
-\begin_layout LyX-Code
---steps=101 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---controller.monitoringFrequency=25 
-\backslash
- 
-\end_layout
-
-\begin_layout Standard
-The last set of parameters includes 
-\end_layout
-
-\begin_layout Itemize
-the location of the output, e.g.,
-\family typewriter
- /scratch/username/cookbook1
-\end_layout
-
-\begin_layout Itemize
-the number of perturbations (1)
-\end_layout
-
-\begin_layout Itemize
-the number of nodal lines in the longitudinal direction (4), e.g., spherical
- harmonic in terms of time-step order or 
-\family typewriter
-perturbm=2
-\family default
-,
-\end_layout
-
-\begin_layout Itemize
-the number of nodal lines in the latitudinal direction, e.g., spherical harmonic
- degree 
-\family typewriter
-perturbl=3
-\end_layout
-
-\begin_layout Quote
-Note that although the number of perturbations is assigned here as 
-\family typewriter
-solver.ic.num_perturbations=1
-\family default
-, that is actually the default value.
-\end_layout
-
-\begin_layout Standard
-
-\end_layout
-
-\begin_layout LyX-Code
---solver.datafile="/scratch/username/cookbook1" 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---solver.ic.num_perturbations=1 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---solver.ic.perturbl=3 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---solver.ic.perturbm=2 
-\end_layout
-
-\begin_layout Standard
-Assuming your script is named 
-\family typewriter
-cookbook1.sh
-\family default
-, it is run by typing 
-\end_layout
-
-\begin_layout Standard
-
-\end_layout
-
-\begin_layout LyX-Code
-$ ./cookbook1.sh
-\end_layout
-
-\begin_layout Subsection
-Cookbook 1: Global Model
-\end_layout
-
-\begin_layout LyX-Code
-#!/bin/sh
-\newline
-
-\newline
-../../tests/citcomsfull.sh 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---launcher.nodes=12 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---launcher.nodegen="n%03d" 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---launcher.nodelist=[141-146,141-146] 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---steps=101 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---controller.monitoringFrequency=25 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---solver.datafile="/scratch/username/Test/cookbook1" 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---solver.ic.num_perturbations=1 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---solver.ic.perturbl=3 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---solver.ic.perturbm=2 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---solver.rayleigh=5.0e+4
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-# End of file
-\end_layout
-
-\begin_layout Standard
-Once you have run the model, you can visualize it using OpenDX, described
- in the previous chapter.
- When you invoke "Edit Visual Program," you will need to select 
-\family typewriter
-visFull.net
-\family default
-.
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\begin_inset Graphics
-	filename CitcomS/manual/graphics/cookbook1.2.jpg
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Caption
-Cookbook 1: Global Model.
- This image depicts a slice through a spherical model of convection, with
- warmer colors indicating upwelling and the cooler colors showing downwelling.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Discussion
-\end_layout
-
-\begin_layout Standard
-You have generated a simple example of the full CitComS model, with minimal
- parameter alterations.
- With a default Rayleigh number of 
-\begin_inset Formula $10^{5}$
-\end_inset
-
- and perturbation on the initial temperature field which has a degree-3
- and an order-2 pattern, after 100 time steps, the convection pattern remains
- relatively steady.
-\end_layout
-
-\begin_layout Standard
-As a note, it is not required that 12 processors, with one spherical cap
- per processor, be used.
- As an end-member possibility, 12 different jobs could be run on a single
- computer by invoking:
-\end_layout
-
-\begin_layout LyX-Code
---launcher.node=12 
-\backslash
-
-\end_layout
-
-\begin_layout LyX-Code
---launcher.node="n%03d" 
-\backslash
- 
-\end_layout
-
-\begin_layout LyX-Code
---launcher.nodelist=[101,101,101,101,101,101,101,101,101,101,101,101]
-\backslash
-
-\end_layout
-
-\begin_layout Standard
-This is not particularly efficient, but it does illustrate the flexibility
- of both 
-\family typewriter
-mpi
-\family default
- and Pyre.
-\end_layout
-
 \begin_layout Part
 Appendices
 \end_layout
 
 \begin_layout Chapter
 \start_of_appendix
-\begin_inset LatexCommand \label{cha:Appendix-A:-Facilities,}
+\begin_inset LatexCommand \label{cha:Appendix-A:-Parameters}
 
 \end_inset
 
-Facilities, Properties, and Parameters
+Properties, and Parameters
 \end_layout
 
 \begin_layout Section*
@@ -3982,4985 +786,1361 @@
 \end_layout
 
 \begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="8" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-datafile=""
+This is a list of variables and names used in the program set in MAG.
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\family typewriter
-datafile
-\family default
- controls the location of output files and the prefix of their names.
- In this case the directory /scratch/ must be created a priori.
- Files such as test.xxx, e.g., 
+\begin_layout Description
+adrke: : axisymmetric toroidal kinetic energy (diagnostic) 
 \end_layout
 
-\begin_layout Standard
-
-\family typewriter
-\size small
-datafile="/scratch/test"
+\begin_layout Description
+ai: : imaginary unit = complex(0,1) 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-file_vbcs=0 
+\begin_layout Description
+aj:(nlma,nn+1) : poloidal magnetic field potential (spectral form) the second
+ index is either the Chebycheff degree (n) or the radial grid point (kc)
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-If 
-\family typewriter
-file_vbcs
-\family default
- is true (it is set=1) then the top surface velocity boundary conditions
- are read in from files which have location and name specified by 
-\family typewriter
-vel_bound_file.
-
-\family default
- The conditions on the top surface must be correctly set, as indicated below.
- If you wish to have a uniform top surface velocity boundary condition or
- some simple geometric pattern, then 
-\family typewriter
-file_vbcs
-\family default
- should be set to zero.
- 
+\begin_layout Description
+ajmat(nn,nn,lmax): LU-decomposed matrix from Chebycheff collocation of tor.
+ induction equation.
+ Built in ludc, used in amhd.
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-vel_bound_file=""
+\begin_layout Description
+aleg1: (nlma,ni) : Value of associated Legendre function at grid points
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-See explanation for 
-\family typewriter
-file_vbcs
-\family default
-, above.
- Velocity boundary conditions are read by setting the pathway to the boundary
- conditions file, e.g., 
-\family typewriter
-\size footnotesize
-vel_bound_file="/username/Models/New_Tonga/Vel/bvel.dat" 
+\begin_layout Description
+aleg2: (nlma,ni) : Value of associated Legendre function, multiplied with
+ Gaussian weight, at grid points
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-coor=off
+\begin_layout Description
+aleg3: (nlma,ni) : Value of derivative of associated Legendre function multiplie
+d with sin(theta) at grid points 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-If you wish to have a regular, but uneven, spacing between elements then
- 
-\family typewriter
-coor
-\family default
- should be set to on.
- If 
-\family typewriter
-coor
-\family default
- is set to off, then there will be uniform mesh in the latitudinal, longitudinal
-, and radial directions, e.g.,  
-\family typewriter
-\size small
-coor_file="/username/Models/New_Tonga/Case2/coor.dat"
+\begin_layout Description
+alfilt: INPUT: Filter parameter for B_r in graphics output, see nfilt 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-coor_file=""
+\begin_layout Description
+alffac: INPUT: controls the contribution of the (modified) Alfven velocity
+ to the Courant time step limit (see under "courfac").
+ The modified Alfven velocity is given by v_alfven' = (v_a)^2 / {(v_a)^2
+ +[pi*(eta+nu)/delx]^2} where v_a = B/sqrt(mu*rho) and delx is the Courant
+ length (either delxr or delxh) 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-See 
-\family typewriter
-coor
-\family default
-, above, e.g., 
-\family typewriter
-\size small
-coor_file="/username/Models/New_Tonga/Case2/coor.dat"
+\begin_layout Description
+alpha: INPUT: =0 linear terms in the equations are treated fully explicit,
+ =1 linear terms are treated fully implicit, =0.5: Crank-N.
+ 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" newpage="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-mat_control=0
+\begin_layout Description
+alumn0: : factor for scaling heat flow in output amcke: : axisymmetric poloidal
+ kinetic energy 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\family typewriter
-\size small
-mat_file="/home/clint/back/ra8/mat.dat"
-\family default
-\size default
- If mat_control is true (it is set=1) then the time- and positional-dependent
- viscosity factor is defined by file having location and name specified
- bymat_file.
- These parameters allow you to define the material group of each element
- (such as a moving weak zone).
- 
+\begin_layout Description
+amhd: SUBROUTINE: the "workhorse" of the program, advance solution by nstep
+ time steps 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-lith_age=0
+\begin_layout Description
+amps: INPUT: can be used to re-scale entropy ampj: INPUT: can be used to
+ re-scale toroidal magn.
+ field 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\family typewriter
-\size footnotesize
-lith_age_file="/username/Models/New_Tonga/Case6/age.dat"
-\family default
-\size default
- If lith_age is true (it is set=1) then the lith_age_file is read.
- These parameters control the thermal age of the top thermal boundary condition.
- 
+\begin_layout Description
+ampb: INPUT: can be used to re-scale poloidal magn.
+ field 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-tracer=0
+\begin_layout Description
+ampw: INPUT: can be used to re-scale poloidal velocity 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\family typewriter
-\size small
-tracer_file=""
-\family default
-\size default
- This controls the tracer particles which are advected passively by the
- flow.
- This part of the code has not been made parallel and must be used with
- caution with the present implementation.
- 
+\begin_layout Description
+ampz: INPUT: can be used to re-scale toroidal velocity 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+anorm: : = sqrt(2/[nn+1]) 
 \end_layout
 
-\begin_layout Section*
-Mesh Set-up and Processors
+\begin_layout Description
+apome: : axisymmetric poloidal magnetic field energy 
 \end_layout
 
-\begin_layout Standard
-Parameters control the logical set-up of the mesh as well as the number
- of processors in the three coordinate directions.
+\begin_layout Description
+atome: : axisymmetric toroidal magnetic field energy 
 \end_layout
 
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="5" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nproc_surf=1
+\begin_layout Description
+b: (nlma,nn+1) : poloidal mag.
+ field potential (spectral form, see aj) 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-This specifies the number of spherical caps of the mesh, must be 1 for CitComS.py
- and 12 for fullCitComS.
- 
+\begin_layout Description
+bleg1: (lmax) : auxiliary array for calculation of aleg1
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nprocx=2
-\newline
-nprocy=2
-\newline
-nprocz=1
+\begin_layout Description
+bleg2: (lmax) : auxiliary array for calculation of aleg2 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-These specify the number of processors in each spherical cap.
+\begin_layout Description
+bleg3: (lmax) : auxiliary array for calculation of aleg3 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nodex=17
-\newline
-nodey=17
-\newline
-nodez=9
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-These specify the number of FEM nodes in each spherical cap.
+\begin_layout Description
+bmat(nn,nn,lmax):: LU-decomposed matrix from Chebycheff collocation of pol.
+ induction equation.
+ Built in ludc, used in amhd.
  
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-mgunitx=8
-\newline
-mgunity=8
-\newline
-mgunitz=8
-\newline
-levels=1
+\begin_layout Description
+bnlc1: (nja/2,ni): bnlr1 stored in complex form 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-These specify the nested level of multigrid unit.
- Used by multigrid solver only.
- These parameters are not completely independent to each other.
- Some constraints must be satisfied:
-\newline
-
-\newline
-nodex = 1 + nprocx * mgunitx * 2 **
- (levels-1)
-\newline
-nodey = 1 + nprocy * mgunity * 2 ** (levels-1)
-\newline
-nodez = 1 + nprocz
- * mgunitz * 2 ** (levels-1)
+\begin_layout Description
+bnlc2: (nja/2,ni): bnlr2 stored in complex form 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nprocx=nprocy; 
-\newline
-nodex=nodey;
-\newline
-mgunitx=mgunity
+\begin_layout Description
+bnlc3: (nja/2,ni): bnlr3 stored in complex form 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-For fullCitComS only
+\begin_layout Description
+bnlr1: (nja,ni) : nonlinear products for updating b (on grid points) 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+bnlr2: (nja,ni) : nonlinear products for updating aj (on grid points) 
 \end_layout
 
-\begin_layout Section*
-\noindent
-Domain Size
+\begin_layout Description
+bnlr3: (nja,ni) : nonlinear products for updating aj (on grid points) 
 \end_layout
 
-\begin_layout Standard
-\noindent
-Parameters which control the actual physical size of the domain (a cut out
- of a sphere).
+\begin_layout Description
+bots(0:lmax,0:mmax): INPUT: harmonic coefficients of prescribed temperature
+ (entropy) on inner boundary 
 \end_layout
 
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="2" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-theta_min=1.0780
-\newline
-theta_max=2.0708
-\newline
-fi_min=0
-\newline
-fi_max=1
+\begin_layout Description
+br: (nja,ni) : = r^2 * B_r on gridpoints 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-theta_min and theta_max are the colatitude measured in radians from the
- north pole.
- fi_min and fi_max are the longitudes measured from the prime meridian eastward
- in radians.
- Only in CitComS.py.
+\begin_layout Description
+brc: : br stored as complex array 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-radius_inner=0.55
-\newline
-radius_outer=1.0 
+\begin_layout Description
+bscl: : = dt * radtop^2 bt: (nja,ni) : = r * sin(theta) *b_theta 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-radius_inner and radius_outer are the inner and outer radius in non-dimensional
- units.
- It is probably most convenient to normalize lengths by the radius of the
- Earth.
- If you do this, then the Rayleigh number, given below, must be calculated
- with the radius of the Earth, not the thickness of the mantle.
- The core mantle boundary is close to having a non-dimensional radius of
- 0.55.
+\begin_layout Description
+btrdt: (ni) : used in movmout to calculate j_phi 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+bts: (ni,3) : used in movmout to calculate j_phi 
 \end_layout
 
-\begin_layout Section*
-Restarting the Code
+\begin_layout Description
+btc: : bt stored as complex array 
 \end_layout
 
-\begin_layout Standard
-Parameters which control the restarting of the code.
+\begin_layout Description
+bp: (nja,ni) : = r * sin(theta) * b_phi 
 \end_layout
 
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="2" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-restart=0
-\newline
-post_p=0
-\newline
-datafile_old=""
-\newline
-solution_cycles_init=100
+\begin_layout Description
+bpc: : bp stored as complex array 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-If restart is true, for example, processor #5 will read its initial temperature
- field formfile 
-\family typewriter
-/scratch/test.velo.5.100
-\family default
- in this case.
- If post_p is true, e.g., processor #5 will read its initial temperature field
- form file
-\family typewriter
- /scratch/test.velo.5.100
-\family default
- in this case, just like when restart is true.
- But the program will run for 1 time step only.
+\begin_layout Description
+bpeak: INPUT: maximum value of imposed field on boundaries 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-zero_elapsed_time=1 
+\begin_layout Description
+bpeakbot: : maximum value of imposed field on inner boundary 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-If zero_elapsed_time is true, the initial time is set to zero.
- If it is false and restart or post_p is true, the initial time is read
- in from previous output files.
+\begin_layout Description
+bpeaktop: : maximum value of imposed field on outer boundary 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+cbr: (nja,ni) : = r^2 * curl (B) * e_r 
 \end_layout
 
-\begin_layout Section*
-Run Length, Output Interval
+\begin_layout Description
+cbrc: : cbr stored as complex array
 \end_layout
 
-\begin_layout Standard
-Parameters which control the length of the run and the interval between
- writing output files.
+\begin_layout Description
+cbt: (nja,ni) : = r * sin(theta) * curl (B) * e_theta 
 \end_layout
 
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="1" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-minstep=1
-\newline
-run=8001
-\newline
-maxtotstep=8001
-\newline
-monitoringFrequency=10
-\newline
-cpu_limits_in_seconds=
-  \InsetSpace ~
-\InsetSpace ~
-\InsetSpace ~
-360000000
+\begin_layout Description
+cbtc: : ctr stored as complex array 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-The maximum number of time steps is set with run and maxtotstep.
- It is recommended that these be set to the same value.
- Add one to the total number of steps; in this example, the total steps
- is 8000.
- The minimum number of time steps is set with minstep; monitoringFrequency
- controls the interval between output files.
- CitComS dynamically determines the non-dimensional time step (such as _t);
- this means that you might not get an output at the exact time required,
- but you can always get close depending on how small monitoringFrequency
- is.
- Do not make this number too small since outputs slow the code down and
- you may end up with an unmanageable number of output files.
- You can also control the termination of the code based on total wall clock
- time using cpu_limits_in_seconds.
- If you are just learning to use the code, you might want to give this a
- small value so that it doesn't burn up valuable computer time.
+\begin_layout Description
+cbp: (nja,ni) : = r * sin(theta) * curl (B) * e_phi
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+cbpc: : cpb stored as complex array 
 \end_layout
 
-\begin_layout Section*
-Initial Conditions
+\begin_layout Description
+cheb: (nn,nn) : cheb(i,j) = value of Ch.
+ polyn.
+ i at grid point j 
 \end_layout
 
-\begin_layout Standard
-\align center
-\begin_inset Tabular
-<lyxtabular version="3" rows="1" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\align left
-num_perturbations=1
-\newline
-perturbmag=0.05
-\newline
-perturbl=1 
-\newline
-perturbm=1  
-\newline
-perturblayer=5
+\begin_layout Description
+chebi: SUBROUTINE: initialize subroutine chebtf 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-The initial temperature is a linear temperature gradient with some perturbations
-, and num_perturbations specifies the number of perturbations.
- The amplitude of the perturbations is specified in the list of real numbers
- by perturbmag.
- In fullCitComS, perturbl and perturbm specify the shape of the perturbations
- in spherical harmonic degree and order; perturblayer specifies the layers
- to be perturbed.
- In regitcoms, perturbl and preturbm specify the number of nodal lines in
- longitudinal and latitudinal directions; perturblayer is not used, although
- the pertublayer represents the number of the mesh node in radiad direction.
- There must be as many entries in a comma-separated list as in num_perturbations.
- No spaces are allowed in the list.
- 
+\begin_layout Description
+chebtf: SUBROUTINE: multiple fast Chebycheff transform 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+clm: (lmax,mmax) : normalization factors of spherical harmonics 
 \end_layout
 
-\begin_layout Section*
-Boundary Conditions
+\begin_layout Description
+cmb: INPUT: integrated conductivity of thin D"-layer 
 \end_layout
 
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="5" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-topvbc=0
-\newline
-topvbxval=0.0
-\newline
-topvbyval=0.0
+\begin_layout Description
+colat: (ni) : vector of colatitudes (Gauss points), local array in subroutine
+ prep 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Surface velocity boundary condition parameters.
- If topvbc is 0, the topvbxval and topvbyval specify the tangential surface
- stress (forced BC).
- If topvbc is 1, topvbxval and topvbyval specify the tangential surface
- velocity (fixed BC).
- The surface normal velocity is zero in these two cases (impermeable BC).
- If topvbc is 2, the surface normal and tangential stress are zero (permeable
- BC).
+\begin_layout Description
+courfac: INPUT: factor controlling the time step as fraction of courant
+ advection length.
+ The time step is limited to dt < min( dx/[ courfac * v + alffac * v_alfven'
+ ] ) 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-botvbc=0
-\newline
-botvbxval=0.0
-\newline
-botvbyval=0.0
+\begin_layout Description
+cvr: (nja,ni) : =r^2 * curl(v) * e_r 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-As above, but for bottom velocity boundary conditions.
+\begin_layout Description
+cvrc: : cvr stored as complex array 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-toptbc=1
-\newline
-toptbcval=0.0 
+\begin_layout Description
+db: (nlma,nn+1) : radial deriv.
+ of pol.
+ mag.
+ potential (spectral form, see aj) 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Surface temperature boundary conditions.
- If toptbc is 0, the toptbcval specifies the surface heatflux.
- If toptbc is 1, the toptbcval specifies the surface temperature.
- 
+\begin_layout Description
+dbdt: (nlma,nn,2) : time derivative of pol.
+ magn.
+ pot.
+ b 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-bottbc=1
-\newline
-bottbcval=1.0
+\begin_layout Description
+dcheb: (nn,nn) : dcheb(i,j) = 1st derivative of Ch.
+ polyn.
+ i at grid point j 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-As above, but for bottom temperature boundary conditions.
- 
+\begin_layout Description
+d2cheb: (nn,nn) : d2cheb(i,j) = 2nd derivative of Ch.
+ polyn.
+ i at grid point j 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-lith_age_time=0  lith_age_depth=0.031400  mantle_temp=1.000000  temperature_bound_
-adj=0  depth_bound_adj=0.157000  width_bound_adj=0.087270 
+\begin_layout Description
+d3cheb: (nn,nn) : d2cheb(i,j) = 3rd derivative of Ch.
+ polyn.
+ i at grid point j 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Boundary condition when lith_age is true.
+\begin_layout Description
+ddb:(nlma,nn+1) : 2nd rad.
+ derivative of pol.
+ mag.
+ potential b 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+ddj:(nlma,nn+1) : 2nd rad.
+ deriv.
+ of tor.
+ magn.
+ potential aj 
 \end_layout
 
-\begin_layout Section*
-Miscellaneous
+\begin_layout Description
+ddw:(nlma,nn+1) : 0.25 * 2nd radial derivative of pol.
+ velocity pot.
+ w 
 \end_layout
 
-\begin_layout Standard
-The following are some miscellaneous parameters.
+\begin_layout Description
+ddz:(nlma,nn+1) : 0.25 * 2nd radial derivative of tor.
+ velocity pot.
+ z
 \end_layout
 
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="2" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-stokes_flow_only=0 inputdiffusivity= 0.001000
+\begin_layout Description
+djdt:(nlma,nn,2) : time derivative of tor.
+ magn.
+ pot.
+ z 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-stokes_flow_only is a parameter which can lead to confusion.
- If you wish only to solve for the velocity once (e.g., Stokes flow) then
- make this parameter true (i.e.
- ,1 or on).
- However, if you want to do a convection problem then this should be false,
- as indicated in the example.
- At this point, don't change the parameter inputdiffusivity -- this may
- play a role in problems which are integrated backward in time.
+\begin_layout Description
+dpdt:(nlma,nn,2) : time derivative of pressure 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-rayleigh=1.357e+08 
+\begin_layout Description
+dsdt:(nlma,nn,2) : time derivative of temperature (entropy) 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-This specifies the Rayleigh number, which is one of the most important parameter
-s you may want to change.
- It is defined as Q0=0.0 This specifies the internal heating number.
- 
+\begin_layout Description
+dw:(nlma,nn+1) : 0.50 * radial derivative of pol.
+ velocity pot.
+ w
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+dwdt:(nlma,nn,2) : time derivative of pol.
+ velocity pot.
+ w 
 \end_layout
 
-\begin_layout Section*
-Required Information
+\begin_layout Description
+dz:(nlma,nn+1) : 0.50 * radial derivative of tor.
+ velocity pot.
+ z 
 \end_layout
 
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="1" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Problem=convection
-\newline
-Geometry=sphere
-\newline
-Spacing=regular 
-\newline
-Solver=cgrad 
-\newline
-node_assemble=1
+\begin_layout Description
+dzdt:(nlma,nn,2) : time derivative of tor.
+ velocity pot.
+ z 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-For the version of CitComS you received in your distribution, all of these
- parameters must be set as indicated.
- You need other versions of CitComS if you wish these parameters to take
- on different geometries, problems, or mesh spacing, or use different solvers.
+\begin_layout Description
+delxh(nn) : horizontal Courant length squared 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+delxr(nn) : radial Courant length 
 \end_layout
 
-\begin_layout Section*
-Depth Information
+\begin_layout Description
+difamp: INPUT: amplitude of hyperdiffusivity D=D*(1 + difamp *[(l+1-ldif)/(lmax+
+1-ldif)]^ldifexp) when l>ldif 
 \end_layout
 
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="1" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-z_lith=0.014
-\newline
-z_410=0.06435
-\newline
-z_lmantle=0.105
-\newline
-z_cmb=0.439
+\begin_layout Description
+dipfilt: INPUT: If nfilt>0 multiply axial dipole component of B_r on outer
+ surface by dipfilt in graphics file 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Specify the non-dimensional depth of Moho, 410km discontinuity, 660km discontinu
-ity and D".
- These parameters are used to determine the depth of material interfaces
- and phase changes (see next two sections).
- The names are only suggestive.
- You are free to refer z_lith to an arbitrary depth, for example.
+\begin_layout Description
+dj: (nlma,nn+1) : radial deriv.
+ of tor.
+ magn.
+ potential (spectral form, see aj) 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+dt: : current time step 
 \end_layout
 
-\begin_layout Section*
-Viscosity
+\begin_layout Description
+dtchck:SUBROUTINE: controls time step 
 \end_layout
 
-\begin_layout Standard
-Parameters which control the viscosity.
- 
+\begin_layout Description
+dth: : Courant time based on horiz.
+ velocity + Alfven veloc.
 \end_layout
 
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="7" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Viscosity=system
-\newline
-rheol=3 
+\begin_layout Description
+dtmax: INPUT: Upper limit on time step (and initial step) 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-For the version of CitComS you received in your distribution, all of these
- parameters must be set as indicated.
- When rheol=3, temperature dependent viscosity is computed by: 
-\family typewriter
-\size footnotesize
-viscosity = visc0 * exp( viscE/(T+viscT) - viscE/(1+viscT) )
-\family default
-\size default
- 
+\begin_layout Description
+dtmin: : Lower limit on time step (stop when dt < dtmin) 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-visc_smooth_method=3 
+\begin_layout Description
+dtold: : Time step of previous iterative step 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-This specifies which method to smooth viscosity projection for multigrid
- solver.
- 
+\begin_layout Description
+dtr: : Courant time based on radial velocity + Alfven veloc.
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-VISC_UPDATE=on 
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-If visc_update is true (i.e., 1 or on), viscosity is updated every time step
- by the following parameters.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-num_mat=4
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-This specifies the number of material layers.
- Material 1 is at depth between 0 and z_lith, material 2 is between z_lith
- and z_410, material 3 is between z_410 and z_lmantle, and material 4 is
- between z_lmantle and (radius_outer - radius_inner).
- If mat_control is true, then a multiplicative factor is applied to the
- viscosity, as defined below.
+\begin_layout Description
+dtstart: INPUT: Initial time step.
+ If =0, dtmax, or when beginning from restart file, the old dt is taken
  
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-TDEPV=on  viscE=0.1,0.1,1.0,1.0  viscT=-1.02126,-1.01853, -1.32722,-1.32722
-\newline
-visc0=1.0e2,2.e
--3, 2.e0,2.e1
+\begin_layout Description
+dvpdr: (nja,ni) : = d [r * sin(theta) * v_phi]/dr on gridpoints 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-If TDEPV is true (i.e., 1 or on), viscE, viscT, and visc0 are parameters defining
- viscosity law.
- See the equation above.
- There must be as many entries in a comma-separated list as num_mat.
- No space is allowed in the list.
- 
+\begin_layout Description
+dvpdrc: : dvpdr stored as complex array 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-SDEPV=off  sdepv_expt=1,1,1,1,1,1,1,1 sdepv_misfit=0.020
+\begin_layout Description
+dvpdp: (nja,ni) : = d [r * sin(theta) * v_phi]/dphi on gridpoints 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-If SDEPV is true (i.e., 1 or on), these specify the exponent in the viscosity
- law and the criterion of convergence test.
- There must be as many entries in a comma-separated list as num_mat.
- No space is allowed in the list.
- 
+\begin_layout Description
+dvpdpc: : dvpdp stored as complex array
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-VMIN=on visc_min=1.e-4 VMAX=on visc_max=1.e3
+\begin_layout Description
+dvrdp: (nja,ni) : = d [r^2 * v_r]/dphi on gridpoints 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-If VMIN is true (i.e., 1 or on), minimum viscosity is cut off at visc_min.
- VMAX and visc_max are for the maximum viscosity cutoff.
- 
+\begin_layout Description
+dvrdpc: : dvrdp stored as complex array 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+dvrdr: (nja,ni) : = d [r^2 * v_r]/dr on gridpoints 
 \end_layout
 
-\begin_layout Section*
-Phase Change Information
+\begin_layout Description
+dvrdrc: : dvrdr stored as complex array
 \end_layout
 
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="3" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Ra_410=0.0
-\newline
-clapeyron410=0.0235
-\newline
-transT410=0.78
-\newline
-width410=0.0058 
+\begin_layout Description
+dvrdt: (nja,ni) : = sin(theta) * d [r^2 * v_r]/dtheta on gridpoints 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-These specify the phase change parameters (density change, Clapeyron slope,
- ambient temperature, and phase change width, respectively).
- The depth of this phase change is specified by z_410.
+\begin_layout Description
+dvrdtc: : dvrdt stored as complex array d
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Ra_670=0.0
-\newline
-clapeyron670=-0.0235
-\newline
-transT670=0.875
-\newline
-width670=0.0058
+\begin_layout Description
+vtdp: (nja,ni) : = d [r *sin(theta) * v_theta]/dphi on gridpoints 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-As above.
- The depth of this phase change is specified by z_lmantle.
+\begin_layout Description
+dvtdpc: : dvtdp stored as complex array 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Ra_cmb=0.0
-\newline
-clapeyroncmb=-0.0235
-\newline
-transTcmb=0.875
-\newline
-widthcmb=0.0058
+\begin_layout Description
+dvtdr: (nja,ni) : = d [r * sin(theta) * v_theta]/dr on gridpoints 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-As above.
- The depth of this phase change is specified by z_cmb.
+\begin_layout Description
+dvtdrc: : dvtdr stored as complex array
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+dw: (nlma,nn+1) : 0.5*times radial deriv of pol.
+ velocity potential w 
 \end_layout
 
-\begin_layout Section*
-Dimensional Information
+\begin_layout Description
+dz: (nlma,nn+1) : 0.5*times radial deriv of tor.
+ velocity potential z 
 \end_layout
 
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="1" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-layerd=6371e3
-\newline
-density=3500.0
-\newline
-thermdiff=1.0e-6
-\newline
-gravacc=10.0
-\newline
-thermexp=3.0e-5
-\newline
-refvisc=1e21
-\newline
-cp
-=1250
-\newline
-wdensity=0.0 
+\begin_layout Description
+escale: : scaling factor for energies in output
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Various dimensional information.
- 
+\begin_layout Description
+ek: INPUT: Ekman number 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+enb: OUTPUT: magnetic energy 
 \end_layout
 
-\begin_layout Section*
-Data input and program debugging
+\begin_layout Description
+ens: OUTPUT: thermal energy 
 \end_layout
 
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="3" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-DESCRIBE=off  BEGINNER=off 
-\newline
-VERBOSE=off
+\begin_layout Description
+enscale: INPUT: in output listing, energies are multiplied by enscale 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-These parameters affect the echo behavior of the CitComS parser.
- 
+\begin_layout Description
+ent: OUTPUT: total energy 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-verbose=off 
+\begin_layout Description
+env: OUTPUT: kinetic energy 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-This is used for debugging.
- If verbose is true, additional information is output to a .info file.
- 
+\begin_layout Description
+epsc0: INPUT: internal heating rate 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-see_convergence=1 
+\begin_layout Description
+flmb1: (nlma+..) : r-component of (v x B) term 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-If see_convergence is true, the velocity residual will be output on the
- screen for every iteration.
+\begin_layout Description
+flmb2: (nlma+..) : theta-component of (v x B) term 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+flmb3: (nlma+..) : phi-component of (v x B) term 
 \end_layout
 
-\begin_layout Section*
-Solver Related Parameters
+\begin_layout Description
+flms1: (nlma+..) : r-component of entropy advection term 
 \end_layout
 
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="10" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-mg_cycle=1
-\newline
-down_heavy=3
-\newline
-up_heavy=3
-\newline
-vlowstep=2000
-\newline
-vhighstep=3
+\begin_layout Description
+flms2: (nlma+..) : theta-component of entropy advection term 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Multigrid parameters.
- 
+\begin_layout Description
+flms3: (nlma+..) : phi-component of entropy advection term 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-piterations=375
+\begin_layout Description
+flmw1: (nlma+..) : r-component of v*grad(v) + Lorentz force term 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Maximum iterations for momentum solver.
+\begin_layout Description
+flmw2: (nlma+..) : theta-component of v*grad(v) + Lorentz force term 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-accuracy=1.0e-6  tole_compressibility=1.0e-7
+\begin_layout Description
+flmw3: (nlma+..) : phi-component of v*grad(v) + Lorentz force term 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Convergence criterion for momentum solver.
- 
+\begin_layout Description
+gauss: (ni) : vector with Gaussian weighting factors, local array in subroutine
+ prep 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-ADV=on
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-If true, solve energy equation.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-fixed_timestep=0.0 
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Set fixed time step.
- If it is 0, the size of time step is variable and is determined dynamically.
+\begin_layout Description
+gquad: SUBROUTINE: finds zeros and Gauss.
+ weight of assc.
+ Legendre fct.
  
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-finetunedt=0.7
+\begin_layout Description
+grafile: CHARACT : file name for data on spatial grid for graphics prefix
+ "g." added to outfile 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Set fraction of maximum advection time step.
+\begin_layout Description
+grav(nn): : gravity at radial levels
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-adv_sub_iterations=2
+\begin_layout Description
+ib(nn,lmax): : pivot array for LU-decomposition of matrix bmat created in
+ sgefa, used in sgesl 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Set the number of iterations for energy solver.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-maxadvtime=10
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Maximum elapsed non-dimensional advection time.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-precond=on
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Pre-conditioning flag.
+\begin_layout Description
+ic: : stepping variable commonly used for steps in colatid.
  
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-aug_lagr=on aug_number=2.0e3
+\begin_layout Description
+icour: INPUT: Courant criterion is checked each ICOUR'th time step 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Augmented stiff matrix flag and value.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section*
-Age Information
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="2" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-start_age=40.0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Set initial age (in Myrs).
- This age determines which vel_bound_file and mat_file to read in.
+\begin_layout Description
+idiftype: INPUT: controls radial variation of diffusivity, =0: no var.
  
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-reset_startage=0 
+\begin_layout Description
+ifaxc: (13) : auxiliary array (factorization) for Chebycheff transform
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-If reset_startage is true, the initial age is set to start_age.
- If it is false and restart or post_p is true, the initial age is read in
- from previous output.
- 
+\begin_layout Description
+ifaxf: (13) : auxiliary array (factorization) for Fourier transform
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+ifbfrz: INPUT: logical, if .T., do not update magnetic field 
 \end_layout
 
-\begin_layout Section*
-Spherical Harmonics Information
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="1" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-ll_max=20
-\newline
-output_ll_max=20
-\newline
-nlong=361
-\newline
-nlati=181 
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-These parameters control the resolution of spherical harmonics.
- Currently not used.
+\begin_layout Description
+ifirst: : =1 before first call of time-step checking routine, =0 thereafter
  
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+iframes: INPUT: write altogether iframes frames on the movie files (see
+ description under imovopt) 
 \end_layout
 
-\begin_layout Section*
-launcher
+\begin_layout Description
+ifsfrz: INPUT: logical, if .T., do not update temperature (entropy) 
 \end_layout
 
-\begin_layout Standard
-The Pyre facility 
-\family typewriter
-\size footnotesize
-launcher
-\family default
-\size default
- controls how CitComS.py, an MPI application, is executed on multiple processors.
- It is the equivalent to mpirun in MPICH.
- 
+\begin_layout Description
+ifvfrz: INPUT: logical, if .T., do not update velocity
 \end_layout
 
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="5" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-dry
+\begin_layout Description
+ij(nn,lmax): : pivot array for LU-decomposition of matrix ajmat created
+ in sgefa, used in sgesl
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-If on, print command line and exit.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nodegen
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-A printf-style format string, used in conjunction with nodelist to generate
- list of machine names.
- Example: 
-\family typewriter
-n%
-\begin_inset Formula $\textrm{\O}$
-\end_inset
-
-3d
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nodelist 
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-A comma-separated list of machine names in square brackets.
- Example: 
-\family typewriter
- [101-103,105,107] 
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nodes
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Number of machine nodes.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-machinefile
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Filename of machine file.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section*
-journal 
-\end_layout
-
-\begin_layout Standard
-The Pyre facility 
-\family typewriter
-\size footnotesize
-journal
-\family default
-\size default
- provides five types of debugging output for conceptually different types
- of information.
- The journal output stream can be instantiated as separated channels multiple
- times, and each channel can be individually activated or deactivated, and
- sent to different locations (the terminal, sockets, files, devices, etc.).
- The streams and their default states of the journal streams are: 
-\newline
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="5" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="1.75in">
-<column alignment="left" valignment="top" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-debug
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Filename of machine file.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-error
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Unrecoverable runtime error.
- Default on.
+\begin_layout Description
+imagcon: INPUT: <0 imposed poloidal field (l=1,m=0) at ICB >=0 imposed toroidal
+ field (l=2,m=0) at ICB >=10 additionally imposed field at CMB, field is
+ of same sign and amplitude if imagcon=10 and of opposite sign if imagcon=11
  
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-firewall
+\begin_layout Description
+imovopt: INPUT: three-digit integer number, controls options for generating
+ movie-files.
+ Last digit>0 - write B_z, W_z (vortic) and T in the equatorial plane on
+ file with prefix "me." 2nd last digit>0 - write longitud.
+ averaged B_phi, j_phi and v_phi on file with prefix "ma." 3rd last digit>0
+ - write B_r at outer surface and v_p and v_t at level given bi this digit
+ on file with prefix "mm." 4th last digit>0 - write spherical harmonic coefs
+ for poloidal field at outer boundary and for velocity potentials at radial
+ level given by this digit on file with prefix "cc." 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Fatal programming error.
- Default on.
- 
+\begin_layout Description
+imovct: : counter variable for movie frames 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-info
+\begin_layout Description
+infile: CHA INPUT: name of input file for initial values (restart) 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Descriptive information.
- Default off.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-warning
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Recoverable runtime error.
- Default off.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-The journal facility is not used in the uncoupled CitComS solver.
- For coupled solvers, there is a large amount of debugging information that
- outputs through the journal facility.
- That output can be turned on/off with command line options.
- The most important ones are  
-\family typewriter
-journal.debug.Exchanger
-\family default
-  and 
-\family typewriter
-journal.debug.CitComSExchanger
-\family default
-.
-  Try running the scripts with
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
---journal.debug.Exchanger=on --journal.debug.CitComSExchanger=on 
-\end_layout
-
-\begin_layout Section*
-controller
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="1" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-monitoringFrequency=100
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-The time step interval between disk output.
- It replaces the storage_spacing parameter in the (old) CitComS input file.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section*
-solver 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="16" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-mesher 
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Can be either full-sphere or regional-sphere.
- It is set by the solver facility automatically.
+\begin_layout Description
+init: INPUT: =0 start from dat-file, =1: random initial cond., =-1: hydro.
+ condition from dat-file, magnetic random >=100: initial temperature perturbatio
+n in a single mode l,m.
+ Here m is given by the last two digits of init and l by the preceding digits.
  
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-tsolver 
+\begin_layout Description
+ip0(nn): : pivot array for LU-decomposition of matrix p0mat created in sgefa,
+ used in sgesl 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-A temperature solver using Petrov-Galerkin time integration.
- 
+\begin_layout Description
+iprnt: : counting blocks in time iteration sequence with printed output
+ created at completion of block is(nn,lmax): : pivot array for LU-decomposition
+ of matrix smat created in sgefa, used in sgesl
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-vsolver 
+\begin_layout Description
+is0(nn): : pivot array for LU-decomposition of matrix s0mat created in sgefa,
+ used in sgesl 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-A velocity solver using Boussinesq approximation and Uzawa algorithm.
+\begin_layout Description
+iscale: INPUT: determines which diffusivity is used for scaling of time,
+ velocity, energy.
+ 1=viscous, 2=therm., 3=magn.
  
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-bc 
+\begin_layout Description
+istep: : time step counter (routine amh) 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Boundary conditions.
+\begin_layout Description
+istor: : counting superblocks in time iteration sequence, upon completion
+ of superblock disk file with data saved
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-const
+\begin_layout Description
+ivfilt: INPUT: Apply filter to v_r at radial level ivfilt and right into
+ first radial position in graphics file, see nfilt 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Dimensional constants.
+\begin_layout Description
+iwp(nn,lmax): : pivot array for LU-decomposition of matrix wpmat created
+ in sgefa, used in sgesl 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-ic
+\begin_layout Description
+iz(nn,lmax): : pivot array for LU-decomposition of matrix zmat created in
+ sgefa, used in sgesl 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Initial conditions.
+\begin_layout Description
+k2k: (nn1) : auxiliary array for Chebycheff transform 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-param
+\begin_layout Description
+kc: : stepping variable commonly used for steps in radius 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Some additional input parameter files.
+\begin_layout Description
+kcour: : auxiliary variable for time step checking procedure 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-phase 
+\begin_layout Description
+kbotb: INPUT: magnetic bot condition =1 insulat., =2 perfect cond.
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Phase change.
+\begin_layout Description
+kbotv: INPUT: mechan.
+ bottom condition =1 free, =2 rigid 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-visc
+\begin_layout Description
+kbots: INPUT: thermal bottom condition =1 fixed entropy, =2 flux
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Viscosity.
+\begin_layout Description
+kei: SUBROUTINE: calculates kinetic energy
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-datafile
+\begin_layout Description
+kstep: : global time step counter
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-default="regtest"
+\begin_layout Description
+ktops: INPUT: thermal top condition =1 fixed entropy, =2 flux 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-datafile_old
+\begin_layout Description
+ktopb: INPUT: magnetic top condition =1 insulat., =2 perfect cond
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-default="regtest"
+\begin_layout Description
+ktopv: INPUT: mechan.
+ top condition =1 free, =2 rigid 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-rayleigh
+\begin_layout Description
+ldif: INPUT: control parameter for hyperdiffusivity, see difamp 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-default=1e+08
+\begin_layout Description
+ldifexp: INPUT: control parameter for hyperdiffusivity, see difamp 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Q0 =0
+\begin_layout Description
+lm: : stepping variable used to cover all l and m lm = m*(lmax+1)/minc -
+ m*(m-minc)/(2*minc) +l-m+1 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+lmax: : max.
+ harmonic degree, calculated as (nj-1)/3
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-stokes_flow_only =0 
+\begin_layout Description
+logfile: CHARACT : file name for continuous log of enregies and other data
+ prefix "l." added to outfile 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+lot: PARAM: =2*nlma (twice the number of harmonic modes)
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-verbos =0 
+\begin_layout Description
+lpfile: CHARACT : file name continuous log of specified values pre-fix "lp."
+ added to outfile 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+lsfile: CHARACT : file name for power spectra of magnetic and kinetic as
+ function of l and m; pre-fix "ls." 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-see_convergence =1
+\begin_layout Description
+ludc: SUBROUTINE: Chebychev collocation 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+mclm: (nlma) : used to unscramble harmonic order m from variable lm 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+mclma: (nlma) : = m/minc+1 for given lm (storage order of m) 
 \end_layout
 
-\begin_layout Section*
-solver.mesher
+\begin_layout Description
+kei: SUBROUTINE: calculates magnetic energy 
 \end_layout
 
-\begin_layout Standard
-Available properties and default values include:
+\begin_layout Description
+minc: PARAM: if >1, minc-fold symmetry in longitude assumed 
 \end_layout
 
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="20" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nproc_surf=1
+\begin_layout Description
+mmax: : max.
+ harmonic order, is the largest integer <= lmax divisible by minc
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+movafile: CHARACT: file name for movie data (longitudinal averages) prefix
+ "ma." 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nprocx=1
+\begin_layout Description
+movefile: CHARACT: file name for movie data in equatorial plane prefix "me."
+ 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+movmfile: CHARACT: file name for movie data in map views prefix "mm." 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nprocy=1
+\begin_layout Description
+n, nc: : stepping variables commonly used for steps over Chebycheff polynomia
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+ncp: PARAM: =nja/2 used for storage of points in phi in complex array
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nprocz=1 
+\begin_layout Description
+nfilt: INPUT: Apply filter F(l)=exp(-[l/lfilt]^nfilt) to B_r on outer surface
+ in graphics output file (if nfilt>0 and alfilt>0) When nfilt>0, alfilt<0,
+ apply cos-tapered filtered with cutoff at nfilt and taper width |alfilt|
+ 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+ngcolat: INPUT: graphics output on each ngcolat'th point in latitude 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-coor=0 
+\begin_layout Description
+ngform: INPUT: if .ne.
+ 0, graphics output is written each time a re- start file is (finally) written.
+ ngform=1 or -1: formatted graphics file, ngform=2: unformatted for ngform=-1
+ additional comment lines are inserted (this is to look at the file, not
+ for graphics)
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+nglon: INPUT: graphics output for each nglon'th point in longitude 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-coor_file="coor.dat"
+\begin_layout Description
+ngrad: INPUT: graphics output on each ngrad'th radial level ni: PARAM: #
+ of grid points in colatide , must be even.
+ 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+nip1: PARAM: =ni+1 nj: PARAM: # of grid points in longitude, nj/minc must
+ be multiple of four.
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nodex=9
+\begin_layout Description
+nja:: : =nj/minc, # of actually needed grid points in phi 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+njp1: PARAM: =nj+1 nlaf: PARAM: = lmax+1 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nodey=9
+\begin_layout Description
+nlafp1: PARAM: = lmax+2 nlm: PARAM: = (mmax+1)*(mmax+2)/2
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+nlma: PARAM: # of angular modes employed nlma = mmax*(lmax+1)/minc - mmax*(mmax-
+minc)/(2*minc) + lmax-mmax+1.
+ 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nodez=9
+\begin_layout Description
+nlmpa: PARAM: = nlma + mmax/minc + 1
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+nlogstep: INPUT: write data on logfile (prefix l.) after each nlogstep steps.
+ 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-levels=1 
+\begin_layout Description
+nmaf: PARAM: = mmax+1 nmafa: PARAM: = mmax/minc+1 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+nn: PARAM: # of radial grid points, nn-1 must be multiple of 4, and contain
+ no prime factors larger than 5 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-radius_outer=1
+\begin_layout Description
+nn1: PARAM: =nn-1 nn2: PARAM: =nn-2 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+nn3: PARAM: =nn-3 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-radius_inner=0.55
+\begin_layout Description
+nnp1: PARAM: =nn+1
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+nnp2: PARAM: =nn+2 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-theta_min=1.5
+\begin_layout Description
+nnaf: PARAM: # of radial chebychev modes, must be <= nn 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+nnx2: PARAM: =2*nn 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-theta_max=1.8
+\begin_layout Description
+nplog: INPUT: if >0 write velocity values at specific points of the grid
+ on separate logfile (prefix "lp.") after every nplog steps (see for arrays
+ vrpoint, vppoint, vtpoint in subroutine amhd for details) 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+nprnt: INPUT: # of printed output blocks created until next data storage
+ for restart 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-fi_min=0 
+\begin_layout Description
+nps2: PARAM: =(nn+1)/2 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+nrp: PARAM: =nja+2 (# of points in phi +2) 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-fi_max=0.4
+\begin_layout Description
+ns2: PARAM: =(nn-1)/2
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+nstep: INPUT: # of time steps done until next printed output (total # of
+ time steps is nstep*nprnt*nstor) 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-ll_max=20 
+\begin_layout Description
+nstor: INPUT: # of data storages before program termination
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+ntf: PARAM: =3*nja/2+1, used for Fourier transform array trigsf 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nlong=361
+\begin_layout Description
+ocorevol: : volume of spherical shell (outer core) 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+oek: : = 1.
+ / Ekman number 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-nlati=181
+\begin_layout Description
+oekpm: : = 1.
+ / (Ekman number * Mag.Prandtl number) 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+oodt: : = 1.
+ / dt (inverse time step) 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-output_ll_max=20
+\begin_layout Description
+oosscl: : = 1.
+ / dt 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+opr: : = 1.
+ / Prandtl number 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+outfile: CH INPUT: Name of output files (pre-fixes d.,l.,ls.,g.,me.,ma.,mm., lp.
+ added) 
 \end_layout
 
-\begin_layout Section*
-solver.tsolver
+\begin_layout Description
+p0mat(nn,nn): : LU-decomposed matrix from Chebycheff collocation of pol.
+ equation of motion, l=0-term for pressure.
+ Constructed in ludc, used in amhd 
 \end_layout
 
-\begin_layout Standard
-Available properties and default values include: 
+\begin_layout Description
+pbar: SUBROUTINE: Calculates value of assoc.
+ Legendre function 
 \end_layout
 
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="8" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-inputdiffusivity=1
+\begin_layout Description
+pscale: : scaling pressure in output 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+pr: INPUT: Prandtl number 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-ADV=1
+\begin_layout Description
+prmag: INPUT: Magnetic Prandtl number 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+prnt: SUBROUTINE: print diagnostic data 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-fixed_timestep=0
+\begin_layout Description
+pscl: : = radtop^2 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+qi: (ni,5) : array with various coefficients depending on colatid.
+ (look in subroutine prep, loop "do 32 " for details 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-finetunedt=0.9
+\begin_layout Description
+qk: (nn,16) : array with various coefficients depending on radius (look
+ in subroutine prep for details)
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+ql: (nlma,10) : various expressions depending on l and m (look in subrout.
+ prep, loop "do 35" for details) 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-adv_sub_iterations=2
+\begin_layout Description
+qn: (nn,6) : Chebycheff integrals 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+r: (nn) : vector with radial levels, r(1)=radtop, r(nn)=radbot
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-maxadvtime=10
+\begin_layout Description
+ra: INPUT: Rayleigh number 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+rapr: : = Rayleigh number / Prandtl number radbot: : radius of inner boundary
+ 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-aug_lagr=1
+\begin_layout Description
+radratio: INPUT: ratio of inner radius to outer radius 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+radtop: : radius of outer boundary 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-aug_number=2000
+\begin_layout Description
+rderiv:SUBROUTINE: ?? radial derivative 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+rffti: SUBROUTINE: ?? 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+rstfile: CHARACT : file name for data in spectral form ('restart data')
+ prefix "d." or "d0.", "d1." ....
+ added to outfile 
 \end_layout
 
-\begin_layout Section*
-solver.vsolver
+\begin_layout Description
+runid: CHAR*64 : text identifying the run 
 \end_layout
 
-\begin_layout Standard
-Available properties and default values include:
+\begin_layout Description
+rva(nn): : auxiliary array used in prep
 \end_layout
 
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="10" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-node_assemble=1
+\begin_layout Description
+rvap(nn): : auxiliary array used in kei, mei
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+rvat(nn): : auxiliary array used in kei, mei 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-precond=1
+\begin_layout Description
+rvb(nn): : auxiliary array used in prep, kei, mei 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+rvc(nn): : auxiliary array used in kei, mei 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-accuracy=1e-06
+\begin_layout Description
+p: (nlma,nn+1) : pressure (spectral form) 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+p00co: : = 4/sqrt(3)
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-tole_compressibility=1e-07
+\begin_layout Description
+prep: SUBROUTINE: parameter input, set up auxiliary arrays, set initial
+ conditions, etc 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+s: (nlma,nn+1) : entropy perturbation (spectral form) 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-mg_cycle=1 
+\begin_layout Description
+sc: (ncp,ni) : sr stored in complex form 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+snlc1: (ncp,ni) : slnr1 stored in complex form 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-down_heavy=3
+\begin_layout Description
+snlc2: (ncp,ni) : slnr2 stored in complex form 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+snlc3: (ncp,ni) : slnr3 stored in complex form 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-up_heavy=3
+\begin_layout Description
+snlr1: (nrp,ni) : nonlinear term (radial advection) for updating temperature
+ 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+snlr2: (nrp,ni) : nonlinear term (theta advection) for updating temperature
+ 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-vlowstep=1000
+\begin_layout Description
+snlr3: (nrp,ni) : nonlinear term (phi advection) for updating temperature
+ 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+sr: (nrp,ni) : temperature (entropy) on grid points 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-vhighstep=3
+\begin_layout Description
+s0mat(nn,nn): : LU-decomposed matrix from Chebycheff collocation of temperature
+ equation, l=0-term.
+ Constructed in ludc, used in amhd 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+samp: INPUT: amplitude of initial entropy perturbation 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-piterations=1000
+\begin_layout Description
+smat(nn,nn,lmax):: LU-decomposed matrix from Chebycheff collocation of temperatu
+re equation.
+ Built in ludc, used in amhd.
+ 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+sr: (nja,ni) : entropy on gridpoints 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+src: : sr stored as complex array 
 \end_layout
 
-\begin_layout Section*
-solver.bc 
+\begin_layout Description
+sscl: : = dt stor: SUBROUTINE: store data in restart file
 \end_layout
 
-\begin_layout Standard
-Available properties and default values are 0, 1, or 2 (open top).
- You cannot use "yes" or "no" for these values.
+\begin_layout Description
+tei: SUBROUTINE: calculates thermal energy 
 \end_layout
 
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="14" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-side_sbcs=0 
+\begin_layout Description
+time: : time timediff: : time 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+tipdipole: INPUT: rotate poloidal dipole term when beginning from restart
+ file 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-topvbc=0
+\begin_layout Description
+tmovnext: : auxiliary variable (next output time) for movie file generation
+ 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+tmovstart: INPUT: time at which to start writing movie-frames on m.*-file
+ 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-topvbxval=0
+\begin_layout Description
+tmovstep: INPUT: time increments for writing movie-frames on m.*-file 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+tops(0:lmax,0:mmax): INPUT: harmonic coefficients of prescribed temperature
+ (entropy) on outer boundary 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-topvbyval=0
+\begin_layout Description
+treset: INPUT: (LOGICAL) if true reset time and step counter to zero when
+ starting from a stored dataset 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+trigsc: (nn) : auxiliary array for Chebycheff transform routine created
+ in chebi, used in chebtf
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-botvbc=0
+\begin_layout Description
+trigsf: (ntf) : auxiliary array for Fourier transform routine created in
+ fftrig, used in fourtf
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+tscale: : scaling of time in output
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-botvbxval=0
+\begin_layout Description
+up: (nja,3) : phi-component of velocity in equatorial plane for three consecutiv
+e radial levels.
+ Used in moveout to calculate vorticity 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+urdp: (nja) : derivative dv_r/dphi in equatorial plane, used in moveout
+ to calculate vorticity 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-botvbyval=0
+\begin_layout Description
+vr: (nja,ni) : = r^2 * v_r on grid points vrc: : vr stored as complex array
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+vp: (nja,ni) : = c * sin(theta) * v_phi on grid points vpc: : vp stored
+ as complex array 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-toptbc=1
+\begin_layout Description
+vscale: : scaling of velocity in output
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+vt: (nja,ni) : = r * sin(theta) * v_theta on grid points 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-toptbcval=0
+\begin_layout Description
+vtc: : vt stored as complex array 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+w: (nlma,nn+1) : poloidal velocity potential (spectral form)
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-bottbc=1
+\begin_layout Description
+wpmat(nn,nn,lmax): LU-decomposed matrix from Chebycheff collocation of pol.
+ equation of motion.
+ Built in ludc, used in amhd.
+ 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+wnlc1: (nja/2,ni): wnlr1 stored in complex form 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-bottbcval=1
+\begin_layout Description
+wnlc2: (nja/2,ni): wnlr2 stored in complex form 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+wnlc3: (nja/2,ni): wnlr3 stored in complex form 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-temperature_bound_adj=0
+\begin_layout Description
+wnlr1: (nja,ni) : nonlinear products for updating w (on grid points) 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+wnlr2: (nja,ni) : nonlinear products for updating z (on grid points) 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-depth_bound_adj=0.157
+\begin_layout Description
+wnlr3: (nja,ni) : nonlinear products for updating z (on grid points)
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+work: (lot,nnp2) : work array used in Fourier and Chebycheff transforms
+ 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-width_bound_adj=0.08727
+\begin_layout Description
+wsave: (nn) : auxiliary array used for Chebycheff transform 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
+\begin_layout Description
+wscl: : = dt * radtop^2 
 \end_layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
+\begin_layout Description
+y00: : = 1/sqrt(4*pi) 
 \end_layout
 
-\begin_layout Section*
-solver.const 
+\begin_layout Description
+z: (nlma,nn+1) : toroidal velocity potential (spectral form) 
 \end_layout
 
-\begin_layout Standard
-Available properties and default values include:
+\begin_layout Description
+zscl: : = dt * radtop^2 
 \end_layout
 
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="13" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="1.75in">
-<column alignment="left" valignment="top" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-layerd=6.371e+06
+\begin_layout Description
+zmat(nn,nn,lmax):: LU-decomposed matrix from Chebycheff collocation of tor.
+ equation of motion.
+ Built in ludc, used in amhd.
+ 
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
+\begin_layout Chapter
+\begin_inset LatexCommand \label{cha:MAG-Input-File}
 
-\begin_layout Standard
-
-\end_layout
-
 \end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
 
-\begin_layout Standard
-density=3500
+MAG Input File Format
 \end_layout
 
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-thermdiff=1e-06
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-gravacc=10
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-thermexp=3e-05
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-refvisc=1e+21
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-cp=1250
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-wdensity=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-surftemp=273
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-depth_lith=89000
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-depth_410=410000
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-depth_660=660000
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-depth_cmb=2.691e+06
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
 \begin_layout Section*
-solver.ic 
-\end_layout
-
-\begin_layout Standard
-Available properties and default values include:
-\end_layout
-
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="9" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-restart=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-post_p=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-solution_cycles_init=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-zero_elapsed_time=1
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-num_perturbations=1
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-perturbl=1
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-perturbm=1
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-perturblayer=5 
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-perturbmag=0.05
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section*
-solver.param
-\end_layout
-
-\begin_layout Standard
-Available properties and default values include:
-\end_layout
-
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="13" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-file_vbcs=0 
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-vel_bound_file="bvel.dat"
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-mat_control=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-mat_file="mat.dat"
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-lith_age=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-lith_age_file="age.dat"
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-lith_age_time=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-lith_age_depth=0.0314
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-mantle_temp=1
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-tracer=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-tracer_file="tracer.dat"
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-start_age=40 
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-reset_startage=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section*
-solver.phase
-\end_layout
-
-\begin_layout Standard
-Available properties and default values include:
-\end_layout
-
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="12" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Ra_410=0 
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-clapeyron410=0.0235
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-transT410=0.78 
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-width410=0.0058
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Ra_670=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-clapeyron670=-0.0235
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-transT670=0.78
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-width670=0.0058
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Ra_cmb=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-clapeyroncmb=-0.0235
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-transTcmb=0.875
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-widthcmb=0.0058
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section*
-solver.visc
-\end_layout
-
-\begin_layout Standard
-Available properties and default values include:
-\end_layout
-
-\begin_layout Standard
-\noindent
-\begin_inset Tabular
-<lyxtabular version="3" rows="16" columns="2">
-<features islongtable="true">
-<column alignment="left" valignment="top" leftline="true" width="1.75in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="3.5in">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Viscosity="system"
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-rheol=3 
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-visc_smooth_method=3
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-VISC_UPDATE=on
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-num_mat=4
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-visc0=1,1,1,1,
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-TDEPV=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-viscE=1,1,1,1,
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-viscT=1,1,1,1, 
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-SDEPV=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-sdepv_misfit=0.02
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-sdepv_expt=1,1,1,1,
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-VMIN=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-visc_min=0.001
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-VMAX=0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-visc_max=1000
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
- 
-\end_layout
-
-\begin_layout Chapter
-CitComS Input File Format
-\end_layout
-
-\begin_layout Section*
 Introduction
 \end_layout
 
 \begin_layout Standard
-CitComS expects Unix-styled ASCII files (i.e., no carriage character following
+MAG expects Unix-styled ASCII files (i.e., no carriage character following
  new line character) for all input files.
  This can be a nuisance in DOS/Windows systems.
  You may want to find a text editor that can write Unix-style ASCII files.
@@ -8978,561 +2158,418 @@
 \end_layout
 
 \begin_layout Section*
-\begin_inset LatexCommand \label{sec:Coordinate-files}
-
-\end_inset
-
-Coordinate files
+INPUT PARAMETERS 
 \end_layout
 
 \begin_layout Standard
-For 
-\family typewriter
-regCitComS
-\family default
-, the mesh must be regular, but the mesh spacing may be unequal.
- The 
-\family typewriter
-coor_file
-\family default
- has the format: 
+Parameters have a pre-defined (default) values.
+ They are read through a namelist in the subroutine "prep".
 \end_layout
 
-\begin_layout LyX-Code
-nsd=1 
+\begin_layout Standard
+*************** NAMELIST "CONTRL" **************************************
 \end_layout
 
-\begin_layout LyX-Code
-1 
-\series bold
-    theta1
-\series default
+\begin_layout Standard
+***INPUT, OUTPUT, STEPPING CONTROL, INITIALIZATION OF THE RUN **********
  
 \end_layout
 
-\begin_layout LyX-Code
-2 
-\series bold
-    theta2
+\begin_layout Description
+outfile: Name of output files (pre-fixes d., g., l., ls., me., ma., mm., are added)
 \end_layout
 
-\begin_layout LyX-Code
-...
-   ...
+\begin_layout Description
+infile: Complete name of file from which initial values are read (restart-file).
  
 \end_layout
 
-\begin_layout LyX-Code
+\begin_layout Description
+runid: arbitrary text of up to 64 characters to describe the model 
+\end_layout
 
-\series bold
-nodex theta_nodex
-\series default
+\begin_layout Description
+init: set 1 to start from scratch (random noise initial condition) set 0
+ to start from a previous result obtained on the same grid and has been
+ written into a file named d[0-9].<name> set to a value >= 100 to start from
+ an initial temperature perturbation of one given mode l,m.
+ Here, m is given by the two last digits of init and l by the preceding
+ digits; for example init=606 means that a temperature perturbation of l=6
+ and m=6 is imposed.
  
 \end_layout
 
-\begin_layout LyX-Code
-nsd=2 
-\end_layout
-
-\begin_layout LyX-Code
-1 
-\series bold
-    phi1
-\series default
+\begin_layout Description
+samp: amplitude of initial perturbation (whether random or single mode)
  
 \end_layout
 
-\begin_layout LyX-Code
-2 
-\series bold
-    phi2
-\series default
+\begin_layout Description
+nstep: do one block of nstep time step before producing a summary printout
+ of some diagnostics standard output.
+ nstep should be even.
  
 \end_layout
 
-\begin_layout LyX-Code
-...
-   ...
+\begin_layout Description
+nprnt: do one 'superblock' consisting of nprnt blocks of nstep time steps
+ each, before saving all data in file 'd[0-9].name'.
+ If nstor=1 there is no number added after the 'd', if nstor>1 the number
+ is incremented by one for each new superblock, starting with zero.
  
 \end_layout
 
-\begin_layout LyX-Code
-
-\series bold
-nodey phi_nodey
-\series default
+\begin_layout Description
+nstor: do nstor 'superblocks' consisting of nstep*nprnt time steps before
+ terminating the process.
+ The total number of time steps is nstep*nprnt*nstor.
+ nstor must be <=10.
  
 \end_layout
 
-\begin_layout LyX-Code
-nsd=3 
+\begin_layout Description
+ngform: Write data at grid points for graphics processing and other post-process
+ing (programs column.f diagnos.f) into file 'g[0-9].<name>' each time a superblock
+ is written.
+ ngform=2: unformatted file, ngform=1: formatted file ngform=0: nothing
+ written, ngform=-1: comment lines are included into file for easier reading
+ (cannot be used for graphics processing in this form)
 \end_layout
 
-\begin_layout LyX-Code
-1 
-\series bold
-    r1
-\series default
+\begin_layout Description
+ngrad: Output on graphics file for each ngrad'th radial point.
  
 \end_layout
 
-\begin_layout LyX-Code
-2 
-\series bold
-    r2
-\series default
+\begin_layout Description
+ngcolat: Output on graphics file every ngcolat'th point in colatitude.
  
 \end_layout
 
-\begin_layout LyX-Code
-...
-   ...
+\begin_layout Description
+nglon: Output on graphics file every nglon'th point in longitude.
+\end_layout
+
+\begin_layout Description
+nfilt: If>0 apply filter of type F(l)=exp[-(l/alfilt)^nfil] to the radial
+ component of the magnetic field on the outer radius (kc=1) before writing
+ data into graphics file (for alfilt >0).
+ When alfilt<0 then apply filter F(l)=(1+sin(pi*(l-nfilt)/alfilt) as long
+ as |l-nfilt|<0.5*alfilt, and F=1 and F=0 respectively for small/large l.
  
 \end_layout
 
-\begin_layout LyX-Code
-
-\series bold
-nodez r_nodez
+\begin_layout Description
+alfilt: See under nfilt ivfilt: If >0 apply the same filter as above to
+ the radial velocity at radial level
 \end_layout
 
-\begin_layout Standard
-For 
-\family typewriter
-fullCitComS
-\family default
-, the mesh must be regular and equidistant in the horizontal dimension.
- Only vertical dimension is specified by 
-\family typewriter
-coor_file
-\family default
-.
- The 
-\family typewriter
-coor_file
-\family default
- has the format:
+\begin_layout Description
+ivfilt and write the result into graphics file at the first radial location
+ (kc=1) 
 \end_layout
 
-\begin_layout LyX-Code
-nsd=3 
+\begin_layout Description
+dipfilt: If nfilt>0 multiply axial dipole component of B_r on outer surface
+ by dipfilt in graphics output 
 \end_layout
 
-\begin_layout LyX-Code
-1 
-\series bold
-    r1
-\series default
+\begin_layout Description
+nlogstep: write data on logfile (prefix l.) after each nlogstep steps.
  
 \end_layout
 
-\begin_layout LyX-Code
-2 
-\series bold
-    r2
-\series default
- 
+\begin_layout Description
+nplog: if >0 write velocity values at specific points of the grid on separate
+ logfile (prefix "lp.") after every nplog steps (see for arrays vrpoint,
+ vppoint, vtpoint in subroutine amhd for details)
 \end_layout
 
-\begin_layout LyX-Code
-...
-   ...
+\begin_layout Description
+iscale: determines which diffusivity is used for scaling of time, velocity
+ and energy.
+ 1=viscous, 2=therm., 3=magn.
  
 \end_layout
 
-\begin_layout LyX-Code
+\begin_layout Description
+enscale: in output listings, energies are multiplied by enscale treset:
+ (LOGICAL) if true reset time and step counter to zero when starting from
+ a stored dataset 
+\end_layout
 
-\series bold
-nodez r_nodez
+\begin_layout Description
+tipdipole: when starting calculation without imposed symmetry (minc=1) from
+ a data file with symmetry (minc>1), add an equatorial dipole component
+ with tipdipole times the magnitude of the polar dipole 
 \end_layout
 
-\begin_layout Section*
-Velocity boundary condition files
+\begin_layout Description
+amps: Option for rescaling temperature perturbation (from restart file)
+ by factor amps (if not equal 1) 
 \end_layout
 
-\begin_layout Standard
-If 
-\family typewriter
-vel_bound_file
-\family default
- is set to 
-\family typewriter
-bvel.dat
-\family default
-, then it is necessary to have one 
-\family typewriter
-bvel.dat
-\family default
- file for each million year interval.
- For example, if 
-\family typewriter
-start_age=83
-\family default
-, then the following files are needed:  
+\begin_layout Description
+ampw: Same for poloidal velocity ampz: Same for toroidal velocity 
 \end_layout
 
-\begin_layout LyX-Code
-bvel.dat84 
+\begin_layout Description
+ampb: Same for poloidal magnetic field 
 \end_layout
 
-\begin_layout LyX-Code
-bvel.dat83 
+\begin_layout Description
+ampj: Same for toroidal magnetic field 
 \end_layout
 
-\begin_layout LyX-Code
-bvel.dat82 
+\begin_layout Description
+ifvfrz: (logical) if true, do not update velocity during iteration 
 \end_layout
 
-\begin_layout LyX-Code
-...
- 
+\begin_layout Description
+ifbfrz: (logical) if true, do not update mag.
+ field during iteration 
 \end_layout
 
-\begin_layout LyX-Code
-bvel.dat0
+\begin_layout Description
+ifsfrz: (logical) if true, do not update temperature during iteration
 \end_layout
 
-\begin_layout Quote
-
-\series bold
-TIP:
-\series default
- Even though the model starts at 83 million years before present, by default
- it will attempt to read in both a file for 84 and a file for 83 million
- years ago.
- To deal with this, just create a duplicate copy of 
-\family typewriter
-bvel.dat83
-\family default
- and call it 
-\family typewriter
-bvel.d
-\family default
+\begin_layout Standard
+***TIME STEP CONTROL **************************************************
  
 \end_layout
 
-\begin_layout LyX-Code
-
-\series bold
-Vx Vy
+\begin_layout Description
+dtmin: Minimum time step (in sec).
+ If the dynamically determined time step becomes less, the program terminates.
+ 
 \end_layout
 
-\begin_layout Section*
-Material files
+\begin_layout Description
+dtmax: Maximum (and usually initial) time step.
+ This must be less than 0.25*ek.
+ Between dtmax and dtmin the actual time step is controlled by a Courant
+ criterion (see below).
 \end_layout
 
-\begin_layout Standard
-If 
-\family typewriter
-mat_file
-\family default
- is set to 
-\family typewriter
-mat.dat
-\family default
-, then it is necessary to have one mat.dat file for each million year interval.
- For example, if 
-\family typewriter
-start_age=83
-\family default
-, then the following files are needed: 
+\begin_layout Description
+dtstart: Initial time step.
+ If dtmax=0, dtmax is used for the initial time step when init>0 and the
+ last time step used in the previous run (stored in the restart file) is
+ used when init=0.
+ 
 \end_layout
 
-\begin_layout LyX-Code
-mat.dat84 
+\begin_layout Description
+courfac: controls the contribution of the fluid velocity to the Courant
+ time step limit (a larger value leads to smaller dt) 
 \end_layout
 
-\begin_layout LyX-Code
-mat.dat83 
+\begin_layout Description
+alffac: controls the contribution of the (modified) Alfven velocity to the
+ Courant time step limit (a larger value leads to smaller dt) 
 \end_layout
 
-\begin_layout LyX-Code
-mat.dat82 
-\end_layout
-
-\begin_layout LyX-Code
-...
+\begin_layout Description
+icour: check Courant criterion after each icour time steps (even number)
  
 \end_layout
 
-\begin_layout LyX-Code
-mat.dat0
-\end_layout
-
 \begin_layout Standard
-The same note about 
-\family typewriter
-vel_bound_file
-\family default
- (see above) applies.
- The format of 
-\family typewriter
-mat_file
-\family default
- is: 
+***PHYSICAL CONTROL PARAMETERS ****************************************
 \end_layout
 
-\begin_layout LyX-Code
-
-\series bold
-n viscosity_factor
+\begin_layout Description
+ra: Rayleigh number (defined with gravity on outer boundary) 
 \end_layout
 
-\begin_layout Section*
-Lithosphere Age Files
+\begin_layout Description
+ek: Ekman number 
 \end_layout
 
-\begin_layout Standard
-If 
-\family typewriter
-lith_age_file
-\family default
- is set to 
-\family typewriter
-lith.dat
-\family default
-, then it is necessary to have one 
-\family typewriter
-bvel.dat
-\family default
- file for each million year interval.
- For example, if 
-\family typewriter
-start_age=83
-\family default
-, then the following files are needed: 
+\begin_layout Description
+pr: Prandtl number 
 \end_layout
 
-\begin_layout LyX-Code
-lith.dat84
+\begin_layout Description
+prmag: Magnetic Prandtl number 
 \end_layout
 
-\begin_layout LyX-Code
-lith.dat83 
+\begin_layout Description
+radratio: Ratio of inner to outer radius 
 \end_layout
 
-\begin_layout LyX-Code
-lith.dat82 
+\begin_layout Description
+bpeak: peak value of magnetic field imposed by bound.
+ cond.
+ at ICB (also when imagcon=0, bpeak controls the initial magnetic field:
+ toroidal when bpeak>0, poloidal dipole when bpeak<0!) 
 \end_layout
 
-\begin_layout LyX-Code
-...
- 
+\begin_layout Description
+epsc0: Volumetric rate of internal heating
 \end_layout
 
-\begin_layout LyX-Code
-lith.dat0
-\end_layout
-
 \begin_layout Standard
-The same note about 
-\family typewriter
-vel_bound_file
-\family default
- (see above) still applies.
- The input age is in millions of years.
- The format of 
-\family typewriter
-lith_age_file
-\family default
- is: 
+***BOUNDARY CONDITIONS AT INNER AND OUTER RADII *************************
+ 
 \end_layout
 
-\begin_layout LyX-Code
-
-\series bold
-n age
+\begin_layout Description
+ktops: thermal boundary condition at CMB.
+ 1-fixed temp, 2-fixed radial heat flow.
+ (ktops=2 not tested !).
+ 
 \end_layout
 
-\begin_layout Section*
-Tracer Files
+\begin_layout Description
+kbots: thermal boundary condition at ICB.
+ As above.
+ 
 \end_layout
 
-\begin_layout Standard
-In this version of CitComS, the implementation of tracer is neither parallelized
-, nor has it been tested.
- We strongly advise you not to use this feature.
- The format of 
-\family typewriter
-tracer_file
-\family default
- is described here for completion: 
+\begin_layout Description
+ktopv: velocity condition at CMB.
+ 1-free, 2-rigid.
+ 
 \end_layout
 
-\begin_layout LyX-Code
-num_tracers 
+\begin_layout Description
+kbotv: velocity condition at ICB.
+ As above.
 \end_layout
 
-\begin_layout LyX-Code
-type x y z
+\begin_layout Description
+kbotb: =1 for insulating inner core =2: ideally conducting inner core 
 \end_layout
 
-\begin_layout Chapter
-\begin_inset LatexCommand \label{cha:Appendix-C:-CitComS,}
-
-\end_inset
-
-CitComS Output File Format
+\begin_layout Description
+ktopb: =1 for insulating mantle =2: not implemented! imagcon: <0 imposed
+ poloidal field (l=1,m=0) at ICB >=0 imposed toroidal field (l=2,m=0) at
+ ICB >=10 imposed toroidal field (l=2,m=0) at both CMB and ICB (same amplitude
+ and same sign if =10, opposite sign if =11) 
 \end_layout
 
-\begin_layout Section*
-Introduction
+\begin_layout Description
+cmb: If >0, thin conducting layer at bottom of mantle (not tested!)
 \end_layout
 
 \begin_layout Standard
-All outputs are in non-dimensional units unless specified.
+***HYPERDIFFUSIVITIES **************************************************
 \end_layout
 
-\begin_layout Section*
-Postprocessed Cap Output
+\begin_layout Description
+difamp: Amplitude of hyperdiffusivities
 \end_layout
 
-\begin_layout Standard
-The commands 
-\family typewriter
-autocombine.py
-\family default
- and 
-\family typewriter
-batchcombine.py
-\family default
- produce 1 cap file for regional CitComS and 12 cap files for full CitComS,
- e.g., 
-\family typewriter
-test-case.cap0.10
-\family default
-.
- The first line of the cap file is a comment describing the node geometry
- (
-\family typewriter
-nodex
-\family default
- 
-\begin_inset Formula $\times$
-\end_inset
-
- 
-\family typewriter
-nodey
-\family default
- 
-\begin_inset Formula $\times$
-\end_inset
-
- 
-\family typewriter
-nodez
-\family default
-).
- The rest of the file is column-based, where the meaning of each column
- is: 
+\begin_layout Description
+ldif: Hyperdiffusivites applied for harmonic degrees l >= ldif
 \end_layout
 
-\begin_layout LyX-Code
-colatitude longitude radius vel_colat vel_lon vel_r temperature viscosity
+\begin_layout Description
+ldifexp: Exponent for increase of hyperdiffusities with l (analytical details
+ see definition of ql(lm,11) in prep.f)
 \end_layout
 
-\begin_layout Section*
-CitComS Output
+\begin_layout Standard
+***PARAMETERS FOR GENERATING MOVIE FILES *******************************
 \end_layout
 
-\begin_layout Standard
-The format of the raw output of CitComS.py is described here.
- In the following sections, the model prefix is assumed as 
-\family typewriter
-test-case
-\family default
-, the processor number as 0, and the time step as 10.
- 
+\begin_layout Description
+imovopt: three-digit integer number, options for generating movie files
+ Last digit>0 - write B_z, W_z (vorticity) and T in the equatorial plane
+ on file with prefix "me." 2nd last digit>0 - write longitudinally averaged
+ B_phi, j_phi and v_phi on file with prefix "ma." 3rd last digit>0 - write
+ B_r at outer surface and B_r and v_r at mid- depth on file with prefix
+ "mm." 4th last digit>0 - write spherical harmonic coeffs for poloidal field
+ at outer boundary and for velocity potentials at radial level given by
+ this digit on file with prefix "cc." 
 \end_layout
 
-\begin_layout Subsection*
-Time Output (test-case.time)
+\begin_layout Description
+iframes: write altogether iframes frames on the movie files tmovstart: time
+ at which to start writing movie-frames tmovstep: time increments for writing
+ movie-frames
 \end_layout
 
 \begin_layout Standard
-It reports non-dimensional elapsed model time and spent CPU time (in seconds).
- Only outputted on computer node 0.
- The meaning of each column is: 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 \end_layout
 
 \begin_layout LyX-Code
-step total_t delta_t total_cpu_time step_cpu_time 
-\end_layout
 
-\begin_layout Subsection*
-Coordinate Output (test-case.coord.0)
 \end_layout
 
-\begin_layout Standard
-Only outputted at 0th time step.
- The first line is a header.
- The rest of the file is column-based, where the meaning of each column
- is: 
-\end_layout
+\begin_layout Chapter
+\begin_inset LatexCommand \label{cha:Appendix-C:-MAG}
 
-\begin_layout LyX-Code
-colatitude longitude radius
+\end_inset
+
+MAG Output File Format
 \end_layout
 
-\begin_layout Subsection*
-Velocity and Temperature Output (test-case.velo.0.10)
+\begin_layout Section*
+Introduction
 \end_layout
 
 \begin_layout Standard
-The two lines are headers.
- The rest of the file is column-based, where the meaning of each column
- is: 
+MAG produces a set of output files for further processing.
+ All outputs are in non-dimensional units unless specified.
+ 
 \end_layout
 
-\begin_layout LyX-Code
-vel_colat vel_lon vel_r temperature
+\begin_layout Description
+l.[outfile] lists a set of diagnostic values each nlogstep time-steps
 \end_layout
 
-\begin_layout Subsection*
-Viscosity Output (test-case.visc.0.10)
+\begin_layout Description
+ls.[outfile] spectra of kinetic energy and magnetic field every nprint timesteps,
+ sorted for modes with equal l, and additionally sorted for modes with equal
+ m.
+ 
 \end_layout
 
-\begin_layout Standard
-The first line is a header.
- The rest of the file is column-based, where the meaning of each column
- is: 
+\begin_layout Description
+g.[outfile] or g[i].[outfile], where i=1,2,..9 (optional, written when ngstep>0):
+ contains temperature, velocity and mag.
+ field components for graphics processing (idl-program magsym on gibbs)
+ 
 \end_layout
 
-\begin_layout LyX-Code
-viscosity
+\begin_layout Description
+d.[outfile] or d[i].outfile: restart-files with the complete set of variables
+ (stored as spectral values l,m in the angular coordinates for radial grid-level
+s) 
 \end_layout
 
-\begin_layout Subsection*
-Material Output (test-case.mat.0)
+\begin_layout Description
+lp.[outfile] written when nplog>0.
+ Velocity at specific points written every nplog'th time step.
+ 
 \end_layout
 
-\begin_layout Standard
-Only output at 0th time step.
- There is no header.
- The meaning of each column is: 
+\begin_layout Description
+me.[outfile] written when last digit of imovopt>0.
+ Values in the equatorial plane for producing movie (idl-program movie2
+ on gibbs)
 \end_layout
 
-\begin_layout LyX-Code
-element_number layer material
+\begin_layout Description
+mm.[outfile] written when first digit of imovopt>0.
+ Values on spherical surfaces for producing movie (idl-program movie3 on
+ gibbs) 
 \end_layout
 
-\begin_layout Subsection*
-Surface Variables Output (test-case.surf.0.10 and 
-\newline
-test-case.botm.0.10)
+\begin_layout Description
+ma.[outfile] written when second digit of imovopt>0.
+ Longitudianal averages for producing movie (movie program does not yet
+ exist).
 \end_layout
 
 \begin_layout Standard
-The first line is a header.
- The rest of the file is column-based, where the meaning of each column
- is: 
+IF one of these files already exists, the program will not run 
 \end_layout
 
-\begin_layout LyX-Code
-topography heatflux vel_colat vel_lon
-\end_layout
-
 \begin_layout Chapter
 License 
 \end_layout
@@ -10055,253 +3092,8 @@
 \bibitem [1]{Moresi et al Plate tectonics}
 Moresi, L., M.
  Gurnis, and S.
- Zhong (2000), Plate tectonics and convection in the Earth's mantle: Toward
- a numerical simulation, 
-\emph on
-Comp.
- Sci.
- Engin., 
-\emph default
-2, 22-33.
+ Zhong (2000), Plate tectonics and convection 
 \end_layout
 
-\begin_layout Bibliography
-
-\bibitem [2]{Moresi/Solomatov Numerical}
-Moresi, L.
- N., and V.
- S.
- Solomatov (1995), Numerical investigation of 2D convection with extremely
- large viscosity variations, 
-\emph on
-Phys.
- Fluid,
-\emph default
- 7, 2,154-2,162.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [3]{Moresi/Gurnis Contraints}
-Moresi, L.
- N., and M.
- Gurnis (1996), Constraints on the lateral strength of slabs from three-dimensio
-nal dynamic flow models, 
-\emph on
-Earth Planet.
- Sci.
- Lett.,
-\emph default
- 138, 15-28.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [4]{Zhong/Moresi The role of faults}
-Zhong, S., M.
- Gurnis, and L.
- Moresi (1998), The role of faults, nonlinear rheology, and viscosity structure
- in generating plates from instantaneous mantle flow models, 
-\emph on
-J.
- Geophys.
- Res.,
-\emph default
- 103, 15,255-15,268.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [5]{Zhong et al The role of temperature}
-Zhong, S., M.
- T.
- Zuber, L.
- N.
- Moresi, and M.
- Gurnis (2000), The role of temperature-dependent viscosity and surface
- plates in spherical shell models of mantle convection, 
-\emph on
-J.
- Geophys.
- Res., 
-\emph default
-105, 11,063-11,082.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [6]{Tan et al Slabs in the lower}
-Tan, E., M.
- Gurnis, and L.
- Han (2002), Slabs in the lower mantle and their modulation of plume formation,
- 
-\emph on
-Geochem.
- Geophys.
- Geosys.,
-\emph default
- 3, 1067.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [7]{Conrad/Gurnis Seismic tomography}
-Conrad, C.
- P., and M.
- Gurnis (2003), Seismic tomography, surface uplift, and the breakup of Gondwanal
-and: Integrating mantle convection backwards in time, 
-\emph on
-Geochem.
- Geophys.
- Geosys.,
-\emph default
- 4(3), 1031, doi:10.1029/2001GC000299.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [8]{Hughes The Finite Element Method}
-Hughes, T.
- J.
- R.
- 
-\emph on
-The Finite Element Method: Linear Static and Dynamic Finite Element Analysis.
-
-\emph default
- Englewood Cliffs, New Jersey: Prentice-Hall, Inc.; 1987.
- 672 p.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [9]{Ramage/Wathen Iterative solution}
-Ramage, A., and A.
- J.
- Wathen (1994), Iterative solution techniques for the Stokes and Navier-Stokes
- equations, 
-\emph on
-Int.
- J.
- Numer.
- Methods.
- Fluids,
-\emph default
- 19, 67-83.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [10]{Brooks A.N.}
-Brooks, A.
- N.
-
-\emph on
- A Petrov-Galerkin Finite Element Formulation for Convecton Dominated Flows.
-
-\emph default
- Unpublished doctoral thesis, California Institute of Technology, Pasadena,
- CA, 1981.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [11]{Cahouet/Chabard Some fast 3D}
-Cahouet, J., and J.-P.
- Chabard (1988), Some fast 3D finite element solvers for the generalized
- Stokes problem
-\emph on
-, Int.
- J.
- Numer.
- Methods.
- Fluids,
-\emph default
- 8, 869-895.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [12]{Atanga/Silvester Iterative methods}
-Atanga, J., and D.
- Silvester (1992), Iterative methods for stabilized mixed velocity-pressure
- finite elements, 
-\emph on
-Int.
- J.
- Numer.
- Methods.
- Fluids,
-\emph default
- 14, 71-81.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [13]{Hager/OConnell A simple global}
-Hager, B.
- H., and R.
- J.
- O'Connell (1981), A simple global model of plate dynamics and mantle convection
-, 
-\emph on
-J.
- Geophys.
- Res.,
-\emph default
- 86, 4,843-4,867.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [14]{Tan et al GeoFramework Part I}
-Tan, E., E.
- Choi, P.
- Thoutireddy, M.
- Gurnis, and M.
- Aivazis (2006), GeoFramework: Coupling multiple models of mantle convection
- within a computational framework,  
-\emph on
-Geochem., Geophys., Geosyst.
- 7,
-\series bold
- 
-\series default
-\emph default
-Q06001, doi:10.1029/2005GC001155.
- 
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [15]{Zhong et al Free-surface formulation}
-Zhong, S., M.
- Gurnis, and L.
- Moresi (1996), Free-surface formulation of mantle convection--I.
- Basic theory and appication to plumes
-\emph on
-, Geophys.
- J.
- Int.
-\emph default
-, 127, 708-718.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [16]{Zhong et al Three-dimensional}
-Zhong, S., A.
- Paulson, and J.
- Wahr (2003), Three-dimensional finite-element modeling of Earth's viscoelastic
- deformation: effects of lateral variations in lithospheric thickness, 
-\emph on
-Geophys.
- J.
- Int.,
-\emph default
- 155, 679-695.
- 
-\end_layout
-
 \end_body
 \end_document



More information about the cig-commits mailing list