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

sue at geodynamics.org sue at geodynamics.org
Tue Aug 14 13:18:45 PDT 2007


Author: sue
Date: 2007-08-14 13:18:43 -0700 (Tue, 14 Aug 2007)
New Revision: 7815

Modified:
   geodyn/3D/MAG/trunk/doc/mag_book.lyx
Log:
fixed citation

Modified: geodyn/3D/MAG/trunk/doc/mag_book.lyx
===================================================================
--- geodyn/3D/MAG/trunk/doc/mag_book.lyx	2007-08-14 03:33:21 UTC (rev 7814)
+++ geodyn/3D/MAG/trunk/doc/mag_book.lyx	2007-08-14 20:18:43 UTC (rev 7815)
@@ -1,5877 +1,5877 @@
-#LyX 1.4.3-4 created this file. For more info see http://www.lyx.org/
-\lyxformat 245
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-\usepackage{hyperref}
-
-\date{\today}
-\let\myUrl\url
-\renewcommand{\url}[1]{(\myUrl{#1})}
-\end_preamble
-\language english
-\inputencoding auto
-\fontscheme default
-\graphics default
-\paperfontsize default
-\spacing single
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\cite_engine basic
-\use_bibtopic false
-\paperorientation portrait
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 5
-\paragraph_separation indent
-\defskip medskip
-\quotes_language swedish
-\papercolumns 1
-\papersides 2
-\paperpagestyle headings
-\tracking_changes false
-\output_changes true
-\end_header
-
-\begin_body
-
-\begin_layout Standard
-\noindent
-\align center
-
-\color none
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-thispagestyle{empty}
-\end_layout
-
-\end_inset
-
-
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\begin_inset Graphics
-	filename mag-cover.pdf
-	display color
-	width 75page%
-	rotateOrigin centerTop
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Title
-\noindent
-MAG
-\end_layout
-
-\begin_layout Author
-© California Institute of Technology
-\newline
-Peter Olson and Wei Mi
-\newline
-Version 1.0.2
-\end_layout
-
-\begin_layout Date
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-today
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\begin_inset LatexCommand \tableofcontents{}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset FloatList figure
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Part
-Preface
-\end_layout
-
-\begin_layout Chapter*
-Preface
-\end_layout
-
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-raggedbottom
-\end_layout
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section*
-About This Document
-\end_layout
-
-\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 MAG version 1.0.2 and its capabilities
- and proceeds to the details of implementation.
- Part III provides appendices and references.
-\end_layout
-
-\begin_layout Standard
-The style of this publication is based on the 
-\begin_inset LatexCommand \htmlurl[Apple Publications Style Guide]{developer.apple.com/documentation/UserExperience/Conceptual/APStyleGuide/AppleStyleGuide2003.pdf}
-
-\end_inset
-
-, as recommended by 
-\begin_inset LatexCommand \htmlurl[Python.org]{www.python.org}
-
-\end_inset
-
-.
- The documentation was produced using 
-\begin_inset LatexCommand \htmlurl[LyX]{www.lyx.org}
-
-\end_inset
-
- to facilitate the transformation of files from one format to another.
- LyX is a document processor that encourages an approach to writing based
- on the structure of your documents, not their appearance.
- It is released under a Free Software/Open Source license.
-\end_layout
-
-\begin_layout Standard
-Errors and bug fixes in this manual should be directed to the 
-\begin_inset LatexCommand \url[CIG Geodynamo Mailing List]{cig-geodyn at geodynamics.org}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Section*
-Who Will Use This Document
-\end_layout
-
-\begin_layout Standard
-This documentation is aimed at scientists who prefer to use prepackaged
- and specialized analysis tools.
- Users are likely to be experienced computational Earth scientists and have
- familiarity with basic scripting, software installation, and programming;
- 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 Section*
-Citation
-\end_layout
-
-\begin_layout Standard
-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 Fortran code was donated to CIG in July of 2006.
- A number of individuals have contributed a significant portion of their
- 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.
- 
-\end_layout
-
-\begin_layout Standard
-The MAG development team asks that you cite the following:
-\end_layout
-
-\begin_layout Itemize
-Olson, P., G.A.
- Glatzmaier (1993), Highly supercritical thermal convection in a rotating
- spherical shell: centrifugal vs.
- radial gravity.
- 
-\emph on
-Geophys.
- Astrophys.
- Fluid Dyn.,
-\series bold
-\emph default
- 
-\series default
-\emph on
-70
-\series bold
-, 
-\series default
-\emph default
-113-136.
-\end_layout
-
-\begin_layout Itemize
-Olson, P., G.A.
- Glatzmaier (1995), Magnetoconvection in a rotating spherical shell: structure
- of flow in the outer core.
-
-\emph on
- Phys.
- Earth Planet Int., 92, 
-\emph default
-109-118.
-\end_layout
-
-\begin_layout Itemize
-Olson, P., G.A.
- Glatzmaier (1996), Magnetoconvection and Thermal Coupling of the Earth's
- Core and Mantle.
- 
-\emph on
-Phil.
- Trans.
- R.
- Soc.
- Lond., A354,
-\emph default
- 1413-1424.
-\end_layout
-
-\begin_layout Itemize
-Christensen, U.R., J.
- Aubert (2006), Scaling properties of convection-driven dynamos in rotating
- spherical shells and application to planetary magnetic fields.
- 
-\emph on
-Geophys J.
- Int.
- 166
-\emph default
-, 97-114.
- 
-\end_layout
-
-\begin_layout Itemize
-Olson, P., U.
- Christensen, G.A.
- Glatzmaier (1999), Numerical Modeling of the Geodynamo: Mechanisms of Field
- Generation and Equilibration.
- 
-\emph on
-J.
- Geophys.
- Res., 104
-\emph default
-, 10,383-10,404.
-\end_layout
-
-\begin_layout Itemize
-Christensen, U., P.
- Olson, G.A.
- Glatzmaier (1999), Numerical modelling of the geodynamo: a systematic parameter
- study.
- 
-\emph on
-Geophys.
- J.
- Int., 138
-\emph default
-, 393-409.
-\end_layout
-
-\begin_layout Itemize
-Christensen, et al.
- (2001), A numerical dynamo benchmark.
-
-\emph on
- Phys.
- Earth Planet Int., 128
-\emph default
-, 25-34 (benchmark cases).
-\end_layout
-
-\begin_layout Standard
-[Note: there are more recent papers by the same authors.] The developers
- also request that in your oral presentations and in your paper acknowledgements
- that you indicate your use of this code, the authors of this code (G.
- Glatzmaier, U.
- Christensen, P.
- Olson), and 
-\begin_inset LatexCommand \htmlurl[CIG]{geodynamics.org}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Section*
-Support
-\end_layout
-
-\begin_layout Standard
-MAG development was funded by grants from NASA HPC and NSF Geophysics.
- Continued support of MAG is made possible under NSF EAR-0406751.
-\end_layout
-
-\begin_layout Part
-Chapters
-\end_layout
-
-\begin_layout Chapter
-Introduction
-\end_layout
-
-\begin_layout Standard
-Dynamo codes represent a powerful new tool for the quantitative study of
- a broad range of geophysical processes, ranging from short time-scale phenomena
- such as magnetic variations, rotational variations, and flow in the core,
- to long-term phenomena such as magnetic excursions, reversals, superchrons,
- and the evolution of the core and its thermal and chemical interaction
- with the mantle.
- The primary objective of CIG in this area is to provide the Earth Science
- community with robust, reliable, efficient, flexible, state-of-the-art
- numerical codes for modeling dynamo processes in the Earth's core and in
- the interiors of other planets.
- Another CIG objective is to support graphical- and user-interfaces for
- these codes that allow Earth scientists to analyze, display, and interpret
- dynamo code results, and to compare results from the various codes that
- we support, as well as with geomagnetic, space magnetic, and paleomagnetic
- data.
- 
-\end_layout
-
-\begin_layout Section
-About MAG
-\end_layout
-
-\begin_layout Standard
-MAG is a serial version of Gary Glatzmaier's rotating spherical convection/magne
-toconvection/dynamo code, modified by Uli Christensen and Peter Olson.
- The code solves the non-dimensional Boussinesq equations for time-dependent
- thermal convection in a rotating spherical shell filled with an electrically
- conducting fluid.
- The equations of motion are: the Navier-Stokes equation including Coriolis,
- Lorentz, Buoyancy, pressure, viscous, and inertial terms; the heat equation
- including advection, diffusion, and uniform-density heat sources; the continuit
-y equation for velocity and Gauss' law for magnetic field; and the induction
- equation for the magnetic field.
-\end_layout
-
-\begin_layout Standard
-All variables are non-dimensional (see Appendix 
-\begin_inset LatexCommand \ref{cha:Variables-used-in}
-
-\end_inset
-
-); time scale is viscous diffusion, length scale is shell thickness, temperature
- scale is boundary temperature difference, magnetic field and electric currents
- use Elsasser number scaling.
- A variety of boundary and initial conditions has been selected as options.
-\end_layout
-
-\begin_layout Standard
-Mag uses toroidal-poloidal decomposition for velocity and magnetic field
- with explicit time steps.
- Linear terms are evaluated spectrally (spherical harmonics plus Chebyshev
- polynomials in radius) and nonlinear terms are evaluated on a spherical
- grid.
-\end_layout
-
-\begin_layout Standard
-Additional technical information is found in 
-\begin_inset LatexCommand \cite{key-1}
-
-\end_inset
-
--
-\begin_inset LatexCommand \cite{key-8}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Section
-Governing Equations
-\end_layout
-
-\begin_layout Standard
-MAG solves the following non-dimensional Boussinesq magnetohydrodynamics
- equations for dynamo action due to thermal convection of an electrically
- conducting fluid in a rotating spherical shell (e.g., Olson et al.
- 1999)
-\begin_inset LatexCommand \cite{key-5}
-
-\end_inset
-
-.
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\mathbf{\mathit{E}}\left(\frac{\partial\boldsymbol{u}}{\partial t}+\boldsymbol{u}\cdot\nabla\boldsymbol{u}-\nabla^{2}\boldsymbol{u}\right)+2\hat{z}\times\boldsymbol{u}+\nabla P=Ra\frac{r}{r_{o}}T+\frac{1}{Pm}\left(\nabla\times\boldsymbol{B}\right)\times\boldsymbol{B}\label{eq:1}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\frac{\partial\boldsymbol{B}}{\partial t}=\nabla\times\left(\boldsymbol{u}\times\boldsymbol{B}\right)+\frac{1}{Pm}\nabla^{2}\boldsymbol{B}\label{eq:2}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\frac{\partial T}{\partial t}+\boldsymbol{u}\cdot\nabla T=\frac{1}{Pr}\nabla^{2}T+\epsilon\label{eq:3}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\nabla\cdot\boldsymbol{u}=0,\,\,\,\nabla\cdot\boldsymbol{B}=0\label{eq:4}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-where 
-\emph on
-u
-\emph default
- is the velocity, 
-\emph on
-B
-\emph default
- is the magnetic field, 
-\emph on
-T
-\emph default
- is temperature, 
-\emph on
-t
-\emph default
- is time, 
-\begin_inset Formula $\hat{z}$
-\end_inset
-
- is a unit vector in the direction of the rotation axis, 
-\emph on
-P
-\emph default
- is pressure, and 
-\emph on
-r
-\emph default
- is the position vector in the spherical coordinates 
-\begin_inset Formula $r\theta\phi$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-Four basic non-dimensional parameters in 
-\begin_inset LatexCommand \ref{eq:1}
-
-\end_inset
-
- - 
-\begin_inset LatexCommand \ref{eq:4}
-
-\end_inset
-
- control the dynamo action.
- The Rayleigh number represents the strength of buoyancy force driving the
- convection
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-Ra=\frac{\alpha g_{0}\Delta TD^{3}}{\nu\kappa}\label{eq:5}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-where 
-\begin_inset Formula $\alpha$
-\end_inset
-
- is thermal expansivity, 
-\begin_inset Formula $g_{0}$
-\end_inset
-
- is gravitational acceleration on the outer boundary at radius R, 
-\begin_inset Formula $\Delta T$
-\end_inset
-
- is the temperature difference between the inner and outer boundaries, 
-\emph on
-D
-\emph default
- is shell thickness, 
-\begin_inset Formula $\nu$
-\end_inset
-
- is kinematic viscosity, and 
-\begin_inset Formula $\kappa$
-\end_inset
-
- is thermal diffusivity.
- The Ekman number represents the ratio of viscous and Coriolis forces
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-E=\frac{\nu}{\Omega D^{2}}\label{eq:6}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-Here 
-\begin_inset Formula $\Omega$
-\end_inset
-
- is rotation rate.
- The Prandtl number is the ratio of kinematic viscosity to thermal diffusivity
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-Pr=\frac{\nu}{\kappa}\label{eq:7}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-and the magnetic Prandtl number is the ratio of kinematic viscosity to magnetic
- diffusivity 
-\begin_inset Formula $\lambda$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-P_{m}=\frac{\nu}{\lambda}\label{eq:8}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-An additional (optional) control parameter is the non-dimensional volumetric
- heat source (or heat sink) strength 
-\begin_inset Formula $\epsilon$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Chapter
-Installation and Getting Help
-\end_layout
-
-\begin_layout Section
-Introduction
-\end_layout
-
-\begin_layout Standard
-To test run MAG, download the source package (in the form of a compressed
- 
-\family typewriter
-tar
-\family default
- file) from the 
-\begin_inset LatexCommand \htmlurl[Geodynamics Software Packages web page]{geodynamics.org/cig/software/packages}
-
-\end_inset
-
-.
- After unpacking the source, use the 
-\family typewriter
-make
-\family default
- utility to build MAG from source, and background execute MAG with the provided
- benchmark 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,
- instead of using the prepared source package.
- See Section 
-\begin_inset LatexCommand \ref{sec:Software-Repository}
-
-\end_inset
-
- later in this chapter.
- MAG has been tested on Linux, Mac OS X, and Windows.
-\end_layout
-
-\begin_layout Section
-Getting Help
-\end_layout
-
-\begin_layout Standard
-For help, send e-mail to the 
-\begin_inset LatexCommand \url[CIG Geodynamo Mailing List]{cig-geodyn at geodynamics.org}
-
-\end_inset
-
-.
- You can subscribe to the Mailing List and view archived discussion at 
-\begin_inset LatexCommand \htmlurl[Geodynamics Mail Lists]{geodynamics.org/cig/lists}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Section
-System Requirements
-\end_layout
-
-\begin_layout Standard
-MAG requires the following:
-\end_layout
-
-\begin_layout Itemize
-A Fortran compiler, g77 or gFortran.
-\end_layout
-
-\begin_layout Itemize
-For Windows you need to install 
-\begin_inset LatexCommand \htmlurl[cygwin]{cygwin.com}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout Section
-Downloading and Unpacking Source
-\end_layout
-
-\begin_layout Standard
-Download MAG from the 
-\begin_inset LatexCommand \htmlurl[Geodynamics website]{geodynamics.org}
-
-\end_inset
-
-.
- Click the ``software'' tab at the top of the page.
- Then click ``Software Packages'' and then ``Geodynamo.'' Once you click
- the MAG link, download the source archive and unpack it using the 
-\family typewriter
-tar
-\family default
- command:
-\end_layout
-
-\begin_layout LyX-Code
-$ tar xzf MAG-1.0.2.tar.gz
-\end_layout
-
-\begin_layout Standard
-If you don't have GNU Tar, try the following command instead: 
-\end_layout
-
-\begin_layout LyX-Code
-$ gunzip -c MAG-1.0.2.tar.gz | tar xf -
-\end_layout
-
-\begin_layout Section
-Installation Procedure
-\end_layout
-
-\begin_layout Subsection
-\begin_inset LatexCommand \label{sub:MAG-file-structure}
-
-\end_inset
-
-MAG File Structure
-\end_layout
-
-\begin_layout Standard
-After unpacking the source, you will find the following directories:
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-~/src
-\family default
- Contains the set of FORTRAN source code files with suffix ``
-\family typewriter
-.f
-\family default
-.'' This includes sample grid parameter value files with names like 
-\family typewriter
-\size small
-param32s4.f
-\family default
-\size default
- for a coarse grid (up to 32 spherical harmonics, 24 radial grid intervals,
- and 4-fold symmetry in 
-\begin_inset Formula $\phi$
-\end_inset
-
-).
- A makefile named 
-\family typewriter
-\size small
-makefile
-\family default
-\size default
-.
- Sample files with input parameters, 
-\family typewriter
-\size small
-par.XXX
-\family default
-\size default
-.
- The case 
-\family typewriter
-\size small
-par.bnch0
-\family default
-\size default
- is for rotating convection at an Ekman number of 1E-3, starting from a
- conductive temperature perturbation with imposed perturbation with l=4,
- m=4, and running for a short time.
- This is the ``benchmark0'' test case in Christensen et al., 2001
-\begin_inset LatexCommand \cite{benchmark cases}
-
-\end_inset
-
-.
- Another input file is 
-\family typewriter
-\size small
-par.bnch1
-\family default
-\size default
-, the dynamo ``benchmark1'' case in Christensen et al.
- 
-\begin_inset LatexCommand \cite{benchmark cases}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-~/doc
-\family default
- The directory where you will find this manual and other documentation files.
- 
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-~/bench-data
-\family default
- Contains output files 
-\family typewriter
-\size small
-ls.benchX
-\family default
-\size default
-, 
-\family typewriter
-\size small
-l.benchX
-\family default
-\size default
-, 
-\family typewriter
-\size small
-g.benchx
-\family default
-\size default
-, and 
-\family typewriter
-\size small
-d.benchx
-\family default
-\size default
- obtained with short runs of benchmark0 and benchmark1 on a Linux workstation.
- Explanations of the contents of these files are found in Appendix 
-\begin_inset LatexCommand \ref{cha:MAG-Output-File}
-
-\end_inset
-
-.
- These data files can be used for comparison with the result obtained by
- your local run of MAG.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-~/rev-data
-\family default
- Contains output files from runs of the reversal dynamo case; movie files
- are also included.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-~/idl
-\family default
- This is where the postprocessing IDL (Interactive Data Language) routines
- reside.
-\end_layout
-
-\begin_layout Subsection
-\begin_inset LatexCommand \label{sub:Prepare-MAG-for}
-
-\end_inset
-
-Prepare MAG for Running
-\end_layout
-
-\begin_layout Enumerate
-First you need to create a path for execution of 
-\family typewriter
-\size small
-magx
-\family default
-\size default
- (below is an example; use your path):
-\end_layout
-
-\begin_deeper
-\begin_layout LyX-Code
-printenv PATH $ PATH=$PATH:/your_mag_dir_path $ export PATH
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-Compile the program using 
-\family typewriter
-make
-\family default
- in the source directory, which by default uses the existing 
-\family typewriter
-\size small
-param.f 
-\family default
-\size default
-grid and symmetry 
-\end_layout
-
-\begin_deeper
-\begin_layout LyX-Code
-$ make 
-\end_layout
-
-\begin_layout Standard
-Note that makefile uses -g77 or other Fortran compiler, and creates executables,
- either 
-\family typewriter
-\size small
-magx
-\family default
-\size default
- (default) or 
-\family typewriter
-\size small
-magxYYsZ
-\family default
-\size default
-, where 
-\family typewriter
-\size small
-YY
-\family default
-\size default
-=spherical harmonic truncation and 
-\family typewriter
-\size small
-Z
-\family default
-\size default
-=longitudinal symmetry.
- 
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-To delete all the object files and executables, type:
-\end_layout
-
-\begin_deeper
-\begin_layout LyX-Code
-$ make clean
-\end_layout
-
-\end_deeper
-\begin_layout Section
-\begin_inset LatexCommand \label{sec:Software-Repository}
-
-\end_inset
-
-Installing from the Software Repository
-\end_layout
-
-\begin_layout Standard
-The MAG source code is available via a Subversion server at the 
-\begin_inset LatexCommand \htmlurl[Geodynamics website]{geodynamics.org}
-
-\end_inset
-
-.
- This allows users to view the revision history of the code, and check out
- the most recent development version of the software.
-\end_layout
-
-\begin_layout Quote
-
-\series bold
-NOTE: 
-\series default
-If you are content with the prepared source package, you may skip this section.
-\end_layout
-
-\begin_layout Subsection
-Tools You Will Need
-\end_layout
-
-\begin_layout Standard
-In addition to the usual system requirements, you must have a Subversion
- client installed in order to work with the source from the CIG software
- repository.
- To check whether you have a subversion client installed on your machine,
- type:
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-$ svn help
-\family default
- 
-\end_layout
-
-\begin_layout Standard
-It should return a usage message.
- For more information on Subversion, visit the 
-\begin_inset LatexCommand \htmlurl[Subversion website]{subversion.tigris.org}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout Subsection
-Download Source from Subversion
-\end_layout
-
-\begin_layout Standard
-To check out the latest version of the software, use the 
-\family typewriter
-svn checkout
-\family default
- command:
-\end_layout
-
-\begin_layout LyX-Code
-$ svn checkout http://geodynamics.org/svn/cig/geodyn/3D/MAG/trunk MAG
-\end_layout
-
-\begin_layout Standard
-where 
-\begin_inset Quotes sld
-\end_inset
-
-MAG
-\begin_inset Quotes srd
-\end_inset
-
- is the directory created with the file structure mentioned in 
-\begin_inset LatexCommand \ref{sub:MAG-file-structure}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Chapter
-Running MAG
-\end_layout
-
-\begin_layout Section
-Using MAG
-\end_layout
-
-\begin_layout Standard
-For test-running the code, perform the following steps:
-\end_layout
-
-\begin_layout Enumerate
-Uncompress all files, and create a path (see 
-\begin_inset LatexCommand \ref{sub:Prepare-MAG-for}
-
-\end_inset
-
-) 
-\end_layout
-
-\begin_layout Enumerate
-Link the grid parameter file to 
-\family typewriter
-\size small
-param.f
-\family default
-\size default
-,
-\begin_inset Foot
-status collapsed
-
-\begin_layout Standard
-To change grids or symmetry (in 
-\family typewriter
-\size small
-param.f
-\family default
-\size default
-), MAG needs to be recompiled.
- The code looks for 
-\family typewriter
-\size small
-param.f
-\family default
-\size default
-, which needs to be changed for remaking.
- Examples of 
-\family typewriter
-\size small
-param.f 
-\family default
-\size default
-are 
-\family typewriter
-\size small
-param32s6.f
-\family default
-\size default
- and 
-\family typewriter
-\size small
-param32s4.f
-\family default
-\size default
-.
- 
-\end_layout
-
-\end_inset
-
- which enters into most subroutines through ``include'' statements.
- For example, a grid parameter file named 
-\family typewriter
-\size small
-param32f4.f
-\family default
-\size default
- (32 spherical harmonics truncation degree, longitude symmetry is 4) is
- linked using
-\end_layout
-
-\begin_deeper
-\begin_layout LyX-Code
-$ ln -sf param32s4.f param.f 
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-Compile the program with:
-\end_layout
-
-\begin_deeper
-\begin_layout LyX-Code
-$ make
-\end_layout
-
-\begin_layout LyX-Code
-$ mv magx magx32s4 
-\family roman
-\size small
-(Renaming is optional)
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-MAG uses a standard input file.
- Background execute using 
-\family typewriter
-\size small
-par.XXX
-\family default
-\size default
- as the input file and 
-\family typewriter
-\size small
-.YYY
-\family default
-\size default
- as the output file's extension:
-\end_layout
-
-\begin_deeper
-\begin_layout LyX-Code
-$ magx32s4 <par.XXX >p.YYY &
-\end_layout
-
-\begin_layout Standard
-For running with the benchmark input files (
-\family typewriter
-\size small
-par.bnch0
-\family default
-\size default
- or 
-\family typewriter
-\size small
-par.bnch1
-\family default
-\size default
-) , the execution statement should be:
-\end_layout
-
-\begin_layout LyX-Code
-$ magx32s4 <par.bnch0 >p.bench0 &
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-If there is a problem with the input file list, it is often the final three
- lines; with some systems, a ``
-\family typewriter
-\size small
-$
-\family default
-\size default
-'' may be required at the end.
-\end_layout
-
-\begin_layout Enumerate
-MAG produces a series of output files.
- For example, when using input file 
-\family typewriter
-\size small
-par.bnch0
-\family default
-\size default
- (the example in step 4) MAG generates: 
-\family typewriter
-l.bench0,
-\family default
-\size small
- 
-\family typewriter
-\size default
-ls.bench0, g[i].bench0 
-\family default
-and 
-\family typewriter
-d[i].bench0
-\family default
-, where i=0,1,2...9.
- See Appendix 
-\begin_inset LatexCommand \ref{cha:MAG-Output-File}
-
-\end_inset
-
- for details on MAG's output files.
- Compare your output files with the data provided in the directory 
-\family typewriter
-\size small
-~/bench-data/data_bench0
-\family default
-\size default
-.
-\end_layout
-
-\begin_layout Quote
-
-\color red
-Warning:
-\color none
- You must delete, move, or rename all of the output files in the current
- directory before re-running with the same ``output'' filename.
- 
-\series bold
-Retaining same-named output files in the current directory causes MAG to
- crash.
- 
-\end_layout
-
-\begin_layout Section
-Changing Parameters
-\end_layout
-
-\begin_layout Standard
-Physical and time-step parameters can be changed in the par-file namelist
- without re-compiling MAG.
- See Appendix B for a list of the input parameter names and definitions.
- Grid parameters must be changed in 
-\family typewriter
-\size small
-param.f
-\family default
-\size default
- and MAG must be then re-compiled.
- There are some numerical restrictions on the grid parameter combinations,
- which are given in Appendix A.
- 
-\end_layout
-
-\begin_layout Chapter
-\begin_inset LatexCommand \label{cha:Postprocessing-and-Graphics}
-
-\end_inset
-
-Postprocessing and Graphics
-\end_layout
-
-\begin_layout Section
-Introduction
-\end_layout
-
-\begin_layout Standard
-Once you finish running MAG, you should have a series of output data files.
- To visualize your results, the MAG software package provides a set of IDL
- routines found in the directory called 
-\family typewriter
-PREFIX/idl
-\family default
-, where 
-\family typewriter
-PREFIX
-\family default
- is the directory under which you installed MAG.
- We should mention here that IDL is a commercial visualization tool by 
-\begin_inset LatexCommand \htmlurl[ITT Visual Information Solutions]{www.ittvis.com/idl}
-
-\end_inset
-
-.
- A free IDL compatible program called 
-\begin_inset LatexCommand \htmlurl[GDL]{gnudatalanguage.sourceforge.net}
-
-\end_inset
-
- works with MAG's line plot IDL procedure 
-\family typewriter
-\size small
-MAGTS.pro
-\family default
-\size default
-, but not with the interactive IDL procedures in MAG.
-\end_layout
-
-\begin_layout Section
-Time Series and Spectra Plots
-\end_layout
-
-\begin_layout Standard
-Procedures 
-\family typewriter
-\size small
-MAGTS.pro
-\family default
-\size default
- and 
-\family typewriter
-\size small
-MAGXY.pro
-\family default
-\size default
- take data from l-files generated by MAG and create time series plots and
- statistics.
- This version reads an l-file consisting of 17 time series, the first record
- being dimensionless time (see Appendix 
-\begin_inset LatexCommand \ref{cha:MAG-Output-File}
-
-\end_inset
-
- for details on output file format).
- Energies and rms magnetic field and velocity are scaled as in MAG; tilt
- is dipole vector colatitude; pole longitude is dipole vector longitude.
- Figures 
-\begin_inset LatexCommand \ref{fig:Time-series-plot}
-
-\end_inset
-
- and 
-\begin_inset LatexCommand \ref{fig:Spectra-plot-of}
-
-\end_inset
-
- show the energy time series plot and spectra plot from a time-dependent
- dynamo.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Graphics
-	filename images/F6en.eps
-	scale 90
-	BoundingBox 30bp 10bp 492bp 505bp
-	rotateOrigin center
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Caption
-\begin_inset LatexCommand \label{fig:Time-series-plot}
-
-\end_inset
-
-Time series plot of energy
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Graphics
-	filename images/F6spct.ps
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Caption
-\begin_inset LatexCommand \label{fig:Spectra-plot-of}
-
-\end_inset
-
-Spectra plot of a time depentant dynamo
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-Interactive IDL Procedures 
-\end_layout
-
-\begin_layout Standard
-
-\family typewriter
-\size small
-MAGSYM.pro
-\family default
-\size default
- is an interactive procedure display which results from a g-file produced
- by MAG.
- This version uses modified IDL color tables and assumes formatted input.
- It creates either postscript 
-\family typewriter
-\size small
-.ps
-\family default
-\size default
- or 
-\family typewriter
-\size small
-.gif
-\family default
-\size default
- files.
- If other output file formats are required, you must modify ``LABELOUT.''
- MAGSYM has many plot options: map, closeup, equator, slice, etc.
- Producing each plot is straightforward and accomplished by choosing from
- the option menu.
- Figure 
-\begin_inset LatexCommand \ref{fig:IDL-figure-with}
-
-\end_inset
-
- is plotted with the map option.
- 
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Graphics
-	filename images/map.jpeg
-	lyxscale 30
-	scale 30
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Caption
-\begin_inset LatexCommand \label{fig:IDL-figure-with}
-
-\end_inset
-
-IDL figure with Map option
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-MAGVOL.pro is another interactive IDL procedure to display volume results
- from rotating convection, magnetoconvection and dynamo calculations (written
- by P.
- Olson).
- It uses g-files produced by MAG (some longitudinal symmetry may be assumed
- in the g-file).
- This version uses modified IDL color tables and assumes formatted or unformatte
-d input (it asks for 
-\family typewriter
-\size small
-.gif
-\family default
-\size default
- but creates 
-\family typewriter
-.jpg
-\family default
- files); if other output file formats are required, modifications of ``labelout'
-' are required.
- This version assumes x-window screen graphics; for other graphics devices,
- change the 
-\family typewriter
-set_plot
-\family default
-,'
-\family typewriter
-x
-\family default
-' and 
-\family typewriter
-tvrd()
-\family default
- commands accordingly.
- MAGVOL procedure creates volume-rendered images of temperature, helicity,
- the z-component of vorticity, kinetic and magnetic energy, joule heating,
- work by Lorentz forces and buoyancy forces.
- Figure 
-\begin_inset LatexCommand \ref{fig:Kinetic-energy-(yellow)}
-
-\end_inset
-
- shows a plot of kinetic energy and magnetic energy obtained from a numerical
- dynamo model.
- 
-\end_layout
-
-\begin_layout Standard
-\align center
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\align center
-\begin_inset Graphics
-	filename images/MKenergy.gif
-	lyxscale 50
-	scale 40
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Caption
-\begin_inset LatexCommand \label{fig:Kinetic-energy-(yellow)}
-
-\end_inset
-
-Kinetic energy (yellow) and Magnetic energy (blue) plot by the MAGVOL procedure
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Chapter
-Examples
-\end_layout
-
-\begin_layout Standard
-Included in this chapter are two benchmark cases and a reversal dynamo case.
- We will present the cases with their input parameters and a typical run
- of the case with output data analysis.
-\end_layout
-
-\begin_layout Section
-Benchmark Cases 
-\end_layout
-
-\begin_layout Standard
-Historically, these are the cases defined in the benchmark study published
- in the 2001 paper by Gary Glatzmaier et al.
- 
-\begin_inset LatexCommand \cite{benchmark cases}
-
-\end_inset
-
-.
- Case 0 is a benchmark of rotating non-magnetic convection.
- Case 1 is a dynamo with an insulating inner core co-rotating with the outer
- boundary.
- The regions outside the fluid shell are electrical insulators and the magnetic
- field on the boundaries matches with appropriate potential fields in the
- exterior that imply no external sources of the field.
- 
-\end_layout
-
-\begin_layout Standard
-In both cases the Ekman number is 
-\begin_inset Formula $E=10$
-\end_inset
-
-
-\begin_inset Formula $^{-3}$
-\end_inset
-
- and the Prandtl number is 
-\begin_inset Formula $Pr=1$
-\end_inset
-
-.
- The Rayleigh number is set to 
-\begin_inset Formula $Ra=100000$
-\end_inset
-
-.
- Note that the definition of the Rayleigh number differs from the one in
- the published cases 
-\begin_inset LatexCommand \cite{benchmark cases}
-
-\end_inset
-
- by a factor of Ekman number 
-\begin_inset Formula $E,$
-\end_inset
-
- i.e., 
-\begin_inset Formula $Ra=\frac{Ra}{E}$
-\end_inset
-
-.
-\begin_inset LatexCommand \cite{benchmark cases}
-
-\end_inset
-
- The magnetic Prandtl number is zero in the non-magnetic convection case
- 0, and is 
-\begin_inset Formula $Pm=5$
-\end_inset
-
- in case 1.
- The spherical harmonic expansion is truncated at degree 
-\begin_inset Formula $lmax=32$
-\end_inset
-
- and a four-fold symmetry is assumed in the longitudinal direction (
-\family typewriter
-param.f
-\family default
- should be linked to 
-\family typewriter
-param32s4.f
-\family default
- when you compile MAG).
- The input parameter files are 
-\family typewriter
-par.bench0
-\family default
- for case 0 and 
-\family typewriter
-par.bench1
-\family default
- in case 1; both files reside in the 
-\family typewriter
-~/src
-\family default
- directory.
-\end_layout
-
-\begin_layout Standard
-The output files of the benchmark cases are stored in the directory 
-\family typewriter
-~/bench-data/data_bench0
-\family default
- and 
-\family typewriter
-~/bench-data/data-bench1
-\family default
- respectively.
- In the following table we see the solutions from MAG agree with the benchmark
- suggested value with a small difference margin.
- In both case 0 and case 1, the values listed were obtained with low resolution
- and a relatively short run of MAG.
- 
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Tabular
-<lyxtabular version="3" rows="7" columns="5">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Case 0 Suggested Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Mag Case 0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Case 1 Suggested Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Mag Case 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
-\begin_inset Formula $E_{kin}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $58.348\pm0.050$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $58.35$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $30.733\pm0.020$
-\end_inset
-
-
-\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_inset Formula $30.72$
-\end_inset
-
-
-\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
-\begin_inset Formula $E_{mag}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $ $
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $626.41\pm0.40$
-\end_inset
-
-
-\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_inset Formula $627.15$
-\end_inset
-
-
-\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
-\begin_inset Formula $T$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $0.42812\pm0.00012$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $0.37338\pm0.00040$
-\end_inset
-
-
-\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
-\begin_inset Formula $\mu_{\phi}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $-10.1571\pm0.0020$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $-10.80$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $-7.6250\pm0.0060$
-\end_inset
-
-
-\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_inset Formula $-7.84$
-\end_inset
-
-
-\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
-\begin_inset Formula $B_{\theta}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $-4.9289\pm0.0060$
-\end_inset
-
-
-\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
-\begin_inset Formula $\omega$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $0.1824\pm0.0050$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $-3.1017\pm0.0040$
-\end_inset
-
-
-\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
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-
-\end_layout
-
-\begin_layout Section
-Reversal Dynamo Case
-\end_layout
-
-\begin_layout Standard
-In this example, we produce a magnetic field reversal using MAG.
- The input parameter in the source directory for this case is 
-\family typewriter
-~/src/par.Rev
-\family default
-.
- There is no longitudinal symmetry in this case, so when you compile MAG,
- use 
-\family typewriter
-param32s1.f
-\family default
- linking to 
-\family typewriter
-param.f
-\family default
-.
- The Ekman number is 
-\begin_inset Formula $E=0.02$
-\end_inset
-
-, the Prandtl number is 
-\begin_inset Formula $Pr=1$
-\end_inset
-
- and the magnetic Prandtl number is 
-\begin_inset Formula $Pm=10$
-\end_inset
-
-.
- The Rayleigh number is 
-\begin_inset Formula $Ra=12000$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Subsection
-Results and Discussions
-\end_layout
-
-\begin_layout Standard
-This case has run on 32-bit and 64-bit Intel processors.
- Figure 
-\begin_inset LatexCommand \ref{fig:Field-Plot1}
-
-\end_inset
-
- shows a plot of mean velocity Vrms, mean magnetic field Brms, the axial
- dipole and the dipole tilt on the outer boundary.
- It indicated a magnetic field reversal between time steps 25 and 30.
- Figure 
-\begin_inset LatexCommand \ref{fig:Field-Plot2}
-
-\end_inset
-
- shows a longer run of MAG, where we see the magnetic field reversed again.
- At this time, the magnetic field had weakened substantially.
- In Figure 
-\begin_inset LatexCommand \ref{fig:The-pole}
-
-\end_inset
-
-, the top is the pole plot before the second field reversal and the bottom
- is the pole plot after the second field reversal.
- 
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement h
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Graphics
-	filename images/field-64.ps
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Caption
-\begin_inset LatexCommand \label{fig:Field-Plot1}
-
-\end_inset
-
-Field Plot for Reversal Dynamo Case
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Graphics
-	filename images/field-64-revR.ps
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Caption
-\begin_inset LatexCommand \label{fig:Field-Plot2}
-
-\end_inset
-
- Field Plot for Reversal Dynamo Case (longer run)
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Graphics
-	filename images/g1revR.ps
-	lyxscale 50
-	scale 40
-	clip
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Graphics
-	filename images/g7revR.ps
-	lyxscale 50
-	scale 40
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Caption
-\begin_inset LatexCommand \label{fig:The-pole}
-
-\end_inset
-
-Magnetic Field Pole Plot.
- The top is the pole plot at the begining of the second field reversal;
- the bottom is the pole plot at the end of the second field reversal.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Creating a Reversal Dynamo Movie
-\end_layout
-
-\begin_layout Subsubsection
-Generating Movie Files
-\end_layout
-
-\begin_layout Standard
-MAG has the function to record a movie.
- The input paramter 
-\family typewriter
-\size small
-imovopt
-\family default
-\size default
- gives the option to write 
-\begin_inset Formula $B_{r}$
-\end_inset
-
- at the outer surface, the output file is produced with prefix ``
-\family typewriter
-\size small
-mm.
-\family default
-\size default
-'' when 
-\family typewriter
-\size small
-imovopt=100
-\family default
-\size default
- or the digit at the hundreds is larger than zero.
- For our reversal dynamo case we examine the field plot and decide to record
- the first field reversal.
- As shown the figure 
-\begin_inset LatexCommand \ref{fig:Interval-to-record}
-
-\end_inset
-
-, we pick the time interval to generate the movie file.
- The input parameter for movie recording is in 
-\family typewriter
-\size small
-~/src/par.revRmv
-\family default
-\size default
-.
- We choose restart file d5 as our starting point, and set to record the
- movie at time 
-\begin_inset Formula $t=22$
-\end_inset
-
-.
- This records 400 frames over an 8 time unit.
- The sample output files are in 
-\family typewriter
-\size small
-~/rev-data
-\family default
-\size default
-.
- 
-\end_layout
-
-\begin_layout Standard
-This version of MAG provides an IDL routine 
-\family typewriter
-\size small
-magmovieCIG.pro
-\family default
-\size default
- (
-\family typewriter
-\size small
-~/idl/magmovieCIG.pro
-\family default
-\size default
-), it reads in the movie file 
-\family typewriter
-\size small
-mm.
-
-\family default
-\size default
- and displays the magnetic field at the outer surface.
- This procedure can also create JPG files of the movie-frame images.
- Figure 
-\begin_inset LatexCommand \ref{fig:a:-first-frame}
-
-\end_inset
-
- shows the first and the last frames of the reversal dynamo movie.
- 
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Graphics
-	filename images/ex3fp.eps
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Caption
-\begin_inset LatexCommand \label{fig:Interval-to-record}
-
-\end_inset
-
-Interval to record movie
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Graphics
-	filename images/revmv006.JPG
-	lyxscale 45
-	scale 45
-
-\end_inset
-
-\InsetSpace ~
-\InsetSpace ~
-
-\begin_inset Graphics
-	filename images/revmv398.JPG
-	lyxscale 45
-	scale 45
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Caption
-\begin_inset LatexCommand \label{fig:a:-first-frame}
-
-\end_inset
-
- Reversal Dynamo Movie.
- Left: first frame of movie; right: last frame of movie
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Creating MPEGs with IDL
-\end_layout
-
-\begin_layout Standard
-IDL provides an IDLgrMPEG class that allows the user to save an array of
- image frames as an MPEG movie.
- See the 
-\begin_inset LatexCommand \htmlurl[IDL Reference Guide]{www.rsinc.com/idl/pdfs/refguide.pdf}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-The MPEG_PUT procedure stores the specified image array at a specified frame
- index in an MPEG sequence.
- The MPEG_SAVE procedure encodes and saves an open MPEG sequence.
- The images can be read using the READ_IMAGE function.
-\end_layout
-
-\begin_layout Standard
-The module 
-\family typewriter
-\size small
-mpg.pro
-\family default
-\size default
- reads a sequence of images (named 
-\family typewriter
-\size small
-prefix00001.suffix
-\family default
-\size default
-) and produces an MPEG1 or MPEG2 movie.
- Supported formats are BMP, GIF, JPEG, PNG, PPM, SRF, TIFF, and DICOM.
- 
-\family typewriter
-\size small
-mpg.pro
-\family default
-\size default
- runs with the following parameters:
-\end_layout
-
-\begin_layout Description
-prefix string (required).
- A string specifying the prefix of the images to read included the path,
- e.g., ``
-\family typewriter
-\size small
-/home/data/images/Image
-\family default
-\size default
-''
-\end_layout
-
-\begin_layout Description
-suffix string (required).
- A string specifying the suffix of the images to read, e.g., ``
-\family typewriter
-\size small
-jpg
-\family default
-\size default
-''
-\end_layout
-
-\begin_layout Description
-n_start integer (required).
- An integer specifying the first image in the sequence
-\end_layout
-
-\begin_layout Description
-n_end integer (required).
- An integer specifying the last image in the sequence
-\end_layout
-
-\begin_layout Description
-digits integer (required).
- An integer specifying the number of digits of the number field in the sequence,
- e.g., 
-\family typewriter
-\size small
-image00001.jpg
-\family default
-\size default
- would require digits=5
-\end_layout
-
-\begin_layout Description
-dims integer (optional).
- An integer array specifying the size of the output image; if not specified
- the size of the first image is used
-\end_layout
-
-\begin_layout Description
-format integer (optional).
- An integer with values 0 for MPEG1 and 1 for MPEG2 (default is MPEG1)
-\end_layout
-
-\begin_layout Description
-frame_rate integer (optional).
- An integer with values
-\end_layout
-
-\begin_layout LyX-Code
-1 = 23.976 frames/sec: NTSC encapsulated film rate
-\end_layout
-
-\begin_layout LyX-Code
-2 = 24 frames/sec: standard film rate
-\end_layout
-
-\begin_layout LyX-Code
-3 = 25 frames/sec: PAL video frame rate
-\end_layout
-
-\begin_layout LyX-Code
-4 = 29.97 frames/sec: NTSC video frame rate
-\end_layout
-
-\begin_layout LyX-Code
-5 = 30 frames/sec: NTSC drop frame video rate (the default)
-\end_layout
-
-\begin_layout LyX-Code
-6 = 50 frames/sec: double frame rate/progressive PAL
-\end_layout
-
-\begin_layout LyX-Code
-7 = 59.94 frames/sec: double frame rate NTSC
-\end_layout
-
-\begin_layout LyX-Code
-8 = 60 frames/sec: double frame rate NTSC
-\end_layout
-
-\begin_layout Description
-mpeg_file string (optional).
- A string specifying the output MPEG file (default 
-\family typewriter
-outfile.mpg
-\family default
-)
-\end_layout
-
-\begin_layout Description
-tmp_dir string (optional).
- A string specifying the temporary directory to use for the temporary image
- files
-\end_layout
-
-\begin_layout Standard
-To run the IDL movie generator, type in a shell:
-\end_layout
-
-\begin_layout LyX-Code
-$ idl
-\end_layout
-
-\begin_layout LyX-Code
-> .compile mpg.pro
-\end_layout
-
-\begin_layout LyX-Code
-> make_mpg, prefix='image', suffix='JPG', n_start=0, n_end=100, digits=3,
- 
-\hfill
-
-\end_layout
-
-\begin_layout LyX-Code
-            dims=[512,512], frame_rate=2,mpeg_file='mympeg.mpg'
-\end_layout
-
-\begin_layout Standard
-A movie file (
-\family typewriter
-magrev#.mpg
-\family default
-) produced by 
-\family typewriter
-magmovieCIG.pro
-\family default
- and 
-\family typewriter
-mpg.pro
-\family default
- is also included in the 
-\family typewriter
-~/rev-data
-\family default
- directory.
- 
-\end_layout
-
-\begin_layout Section
-Gauss Coefficients Conversion
-\end_layout
-
-\begin_layout Standard
-Making the MAG output useful to the broader geomagnetism community is one
- of CIG's top priorities.
- In this release, we have added the option of output files consisting of
- the Gauss coefficients of the external magnetic field computed as a function
- of time.
-\end_layout
-
-\begin_layout Standard
-Here is some background: The standard procedure for extrapolating the main
- geomagnetic field from the core to the Earth's surface and nearby space
- assumes the mantle, crust, and atmosphere can be treated as current-free
- regions.
- In these regions the geomagnetic potential of the core field satisfies
- Laplace's equation and can be expressed as a series of spherical harmonics.
- MAG uses fully-normalized, complex-valued spherical harmonics for its magnetic
- field and other internal variables, and in addition, the MAG spherical
- harmonics are packed into one-dimensional arrays for optimal computation
- and they have non-dimensional coefficients.
- In contrast, the geomagnetism scientific community uses real-valued Schmidt-typ
-e spherical harmonics for representing the main field, with dimensional
- coefficients called the Gauss coefficients (see 
-\begin_inset LatexCommand \cite{key-8,key-9}
-
-\end_inset
-
- for their exact definitions).
- Gauss coefficients are denoted by g(l,m) and h(l,m) respectively, where
- (l,m) are harmonic degree and order, respectively, and are usually expressed
- in nanoTesla units.
- For example, the present-day axial dipole field has a Gauss coefficient
- near g(1,0)=-29,500 nT, the minus sign indicating the field points radially
- inward in the northern hemisphere.
-\end_layout
-
-\begin_layout Standard
-MAG now provides the option for converting its fully-normalized, complex
- harmonics of the field to the standard geomagnetic format, by requesting
- an output file (prefix 
-\family typewriter
-cg.
-\family default
-) that consists of the model Gauss coefficients in nanoTesla at the same
- times as the output for the movie files (prefixes 
-\family typewriter
-me
-\family default
- and 
-\family typewriter
-mm
-\family default
-).
- The conversion from non-dimensional to dimensional coefficients is based
- on Elsasser number magnetic field scaling and assumes nominal values of
- the Earth's core radius, rotation rate, and electrical conductivity.
- This option is invoked with the IMOVOPT command in the MAG par-file list.
- 
-\end_layout
-
-\begin_layout Part
-Appendices
-\end_layout
-
-\begin_layout Chapter
-\start_of_appendix
-\begin_inset LatexCommand \label{cha:Variables-used-in}
-
-\end_inset
-
-Variables Used in MAG
-\end_layout
-
-\begin_layout Standard
-This is a list of variables and names used in the program set in MAG.
- The list is in alphabetical order for ease of reference.
-\end_layout
-
-\begin_layout Description
-adrke axisymmetric toroidal kinetic energy (diagnostic) 
-\end_layout
-
-\begin_layout Description
-ai imaginary unit = complex(0,1) 
-\end_layout
-
-\begin_layout Description
-aj\InsetSpace ~
-(nlma,nn+1) poloidal magnetic field potential (spectral form); the second
- index is either the Chebyshev degree (n) or the radial grid point (kc)
-\end_layout
-
-\begin_layout Description
-ajmat\InsetSpace ~
-(nn,nn,lmax) LU-decomposed matrix from Chebyshev collocation of toroidal
- induction equation.
- Built in ludc, used in amhd.
-\end_layout
-
-\begin_layout Description
-aleg1\InsetSpace ~
-(nlma,ni) Value of associated Legendre function at grid points
-\end_layout
-
-\begin_layout Description
-aleg2\InsetSpace ~
-(nlma,ni) Value of associated Legendre function, multiplied with Gaussian
- weight, at grid points
-\end_layout
-
-\begin_layout Description
-aleg3\InsetSpace ~
-(nlma,ni) Value of derivative of associated Legendre function multiplied
- with sin(theta) at grid points 
-\end_layout
-
-\begin_layout Description
-alfilt [INPUT] Filter parameter for B_r in graphics output, see nfilt 
-\end_layout
-
-\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
-
-\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
-
-\begin_layout Description
-alumn0 Factor for scaling heat flow in output amcke: axisymmetric poloidal
- kinetic energy 
-\end_layout
-
-\begin_layout Description
-amhd [SUBROUTINE] The ``workhorse'' of the program: advance solution by
- nstep time steps 
-\end_layout
-
-\begin_layout Description
-amps [INPUT] can be used to re-scale entropy 
-\end_layout
-
-\begin_layout Description
-ampj [INPUT] can be used to re-scale toroidal magnetic field 
-\end_layout
-
-\begin_layout Description
-ampb [INPUT] can be used to re-scale poloidal magnetic field 
-\end_layout
-
-\begin_layout Description
-ampw [INPUT] can be used to re-scale poloidal velocity 
-\end_layout
-
-\begin_layout Description
-ampz [INPUT] can be used to re-scale toroidal velocity 
-\end_layout
-
-\begin_layout Description
-anorm = sqrt(2/[nn+1]) 
-\end_layout
-
-\begin_layout Description
-apome axisymmetric poloidal magnetic field energy 
-\end_layout
-
-\begin_layout Description
-atome axisymmetric toroidal magnetic field energy 
-\end_layout
-
-\begin_layout Description
-b\InsetSpace ~
-(nlma,nn+1) poloidal magnetic field potential (spectral form, see aj) 
-\end_layout
-
-\begin_layout Description
-bleg1\InsetSpace ~
-(lmax) auxiliary array for calculation of aleg1
-\end_layout
-
-\begin_layout Description
-bleg2\InsetSpace ~
-(lmax) auxiliary array for calculation of aleg2 
-\end_layout
-
-\begin_layout Description
-bleg3\InsetSpace ~
-(lmax) auxiliary array for calculation of aleg3 
-\end_layout
-
-\begin_layout Description
-bmat(nn,nn,lmax) LU-decomposed matrix from Chebyshev collocation of poloidal
- induction equation.
- Built in ludc, used in amhd.
- 
-\end_layout
-
-\begin_layout Description
-bnlc1\InsetSpace ~
-(nja/2,ni) bnlr1 stored in complex form 
-\end_layout
-
-\begin_layout Description
-bnlc2\InsetSpace ~
-(nja/2,ni) bnlr2 stored in complex form 
-\end_layout
-
-\begin_layout Description
-bnlc3\InsetSpace ~
-(nja/2,ni) bnlr3 stored in complex form 
-\end_layout
-
-\begin_layout Description
-bnlr1\InsetSpace ~
-(nja,ni) nonlinear products for updating b (on grid points) 
-\end_layout
-
-\begin_layout Description
-bnlr2\InsetSpace ~
-(nja,ni) nonlinear products for updating aj (on grid points) 
-\end_layout
-
-\begin_layout Description
-bnlr3\InsetSpace ~
-(nja,ni) nonlinear products for updating aj (on grid points) 
-\end_layout
-
-\begin_layout Description
-bots(0:lmax,0:mmax) [INPUT] harmonic coefficients of prescribed temperature
- (entropy) on inner boundary 
-\end_layout
-
-\begin_layout Description
-br\InsetSpace ~
-(nja,ni) = r^2 * B_r on gridpoints 
-\end_layout
-
-\begin_layout Description
-brc br stored as complex array 
-\end_layout
-
-\begin_layout Description
-bscl = dt * radtop^2 
-\end_layout
-
-\begin_layout Description
-bt\InsetSpace ~
-(nja,ni) = r * sin(theta) *b_theta 
-\end_layout
-
-\begin_layout Description
-btrdt\InsetSpace ~
-(ni) used in movmout to calculate j_phi 
-\end_layout
-
-\begin_layout Description
-bts\InsetSpace ~
-(ni,3) used in movmout to calculate j_phi 
-\end_layout
-
-\begin_layout Description
-btc bt stored as complex array 
-\end_layout
-
-\begin_layout Description
-bp\InsetSpace ~
-(nja,ni) = r * sin(theta) * b_phi 
-\end_layout
-
-\begin_layout Description
-bpc bp stored as complex array 
-\end_layout
-
-\begin_layout Description
-bpeak [INPUT] maximum value of imposed field on boundaries 
-\end_layout
-
-\begin_layout Description
-bpeakbot maximum value of imposed field on inner boundary 
-\end_layout
-
-\begin_layout Description
-bpeaktop maximum value of imposed field on outer boundary 
-\end_layout
-
-\begin_layout Description
-cbr\InsetSpace ~
-(nja,ni) = r^2 * curl (B) * e_r 
-\end_layout
-
-\begin_layout Description
-cbrc cbr stored as complex array
-\end_layout
-
-\begin_layout Description
-cbt\InsetSpace ~
-(nja,ni) = r * sin(theta) * curl (B) * e_theta 
-\end_layout
-
-\begin_layout Description
-cbtc ctr stored as complex array 
-\end_layout
-
-\begin_layout Description
-cbp\InsetSpace ~
-(nja,ni) = r * sin(theta) * curl (B) * e_phi
-\end_layout
-
-\begin_layout Description
-cbpc cpb stored as complex array 
-\end_layout
-
-\begin_layout Description
-cheb\InsetSpace ~
-(nn,nn) cheb(i,j) = value of Chebyshev polynomial i at grid point j
- 
-\end_layout
-
-\begin_layout Description
-chebi [SUBROUTINE] initialize subroutine chebtf 
-\end_layout
-
-\begin_layout Description
-chebtf [SUBROUTINE] multiple fast Chebyshev transform 
-\end_layout
-
-\begin_layout Description
-clm\InsetSpace ~
-(lmax,mmax) normalization factors of spherical harmonics 
-\end_layout
-
-\begin_layout Description
-cmb [INPUT] integrated conductivity of thin D"-layer 
-\end_layout
-
-\begin_layout Description
-colat\InsetSpace ~
-(ni) vector of colatitudes (Gauss points), local array in subroutine
- prep 
-\end_layout
-
-\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
-
-\begin_layout Description
-cvr\InsetSpace ~
-(nja,ni) = r^2 * curl(v) * e_r 
-\end_layout
-
-\begin_layout Description
-cvrc cvr stored as complex array 
-\end_layout
-
-\begin_layout Description
-db\InsetSpace ~
-(nlma,nn+1) radial derivative of poloidal magetic potential (spectral
- form, see aj) 
-\end_layout
-
-\begin_layout Description
-dbdt\InsetSpace ~
-(nlma,nn,2) time derivative of poloidal magnetic potential b 
-\end_layout
-
-\begin_layout Description
-dcheb\InsetSpace ~
-(nn,nn) dcheb(i,j) = 1st derivative of Chebyshev polynomial i at grid
- point j 
-\end_layout
-
-\begin_layout Description
-d2cheb\InsetSpace ~
-(nn,nn) d2cheb(i,j) = 2nd derivative of Chebyshev polynomial i at
- grid point j 
-\end_layout
-
-\begin_layout Description
-d3cheb\InsetSpace ~
-(nn,nn) d2cheb(i,j) = 3rd derivative of Chebyshev polynomial i at
- grid point j 
-\end_layout
-
-\begin_layout Description
-ddb\InsetSpace ~
-(nlma,nn+1) 2nd radial derivative of poloidal magetic potential b 
-\end_layout
-
-\begin_layout Description
-ddj\InsetSpace ~
-(nlma,nn+1) 2nd radial derivatic of toroidal magnetic potential aj 
-\end_layout
-
-\begin_layout Description
-ddw\InsetSpace ~
-(nlma,nn+1) 0.25 * 2nd radial derivative of poloidal velocity potential
- w 
-\end_layout
-
-\begin_layout Description
-ddz\InsetSpace ~
-(nlma,nn+1) 0.25 * 2nd radial derivative of toroidal velocity potential
- z
-\end_layout
-
-\begin_layout Description
-djdt\InsetSpace ~
-(nlma,nn,2) time derivative of toroidal magnetic potential z 
-\end_layout
-
-\begin_layout Description
-dpdt\InsetSpace ~
-(nlma,nn,2) time derivative of pressure 
-\end_layout
-
-\begin_layout Description
-dsdt\InsetSpace ~
-nlma,nn,2) time derivative of temperature (entropy) 
-\end_layout
-
-\begin_layout Description
-dw\InsetSpace ~
-(nlma,nn+1) 0.50 * radial derivative of poloidal velocity potential w
-\end_layout
-
-\begin_layout Description
-dwdt\InsetSpace ~
-(nlma,nn,2) time derivative of poloidal velocity potential w 
-\end_layout
-
-\begin_layout Description
-dz\InsetSpace ~
-(nlma,nn+1) 0.50 * radial derivative of toroidal velocity potential z 
-\end_layout
-
-\begin_layout Description
-dzdt\InsetSpace ~
-(nlma,nn,2) time derivative of toroidal velocity potential z 
-\end_layout
-
-\begin_layout Description
-delxh\InsetSpace ~
-(nn) horizontal Courant length squared 
-\end_layout
-
-\begin_layout Description
-delxr\InsetSpace ~
-(nn) radial Courant length 
-\end_layout
-
-\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 Description
-dipfilt [INPUT] If nfilt>0 multiply axial dipole component of B_r on outer
- surface by dipfilt in graphics file 
-\end_layout
-
-\begin_layout Description
-dj\InsetSpace ~
-(nlma,nn+1) radial derivative of toroidal magnetic potential (spectral
- form, see aj) 
-\end_layout
-
-\begin_layout Description
-dt current time step 
-\end_layout
-
-\begin_layout Description
-dtchck [SUBROUTINE] controls time step 
-\end_layout
-
-\begin_layout Description
-dth Courant time based on horizontal velocity + Alfven velocity
-\end_layout
-
-\begin_layout Description
-dtmax [INPUT] Upper limit on time step (and initial step) 
-\end_layout
-
-\begin_layout Description
-dtmin Lower limit on time step (stop when dt < dtmin) 
-\end_layout
-
-\begin_layout Description
-dtold Time step of previous iterative step 
-\end_layout
-
-\begin_layout Description
-dtr Courant time based on radial velocity + Alfven velocity
-\end_layout
-
-\begin_layout Description
-dtstart [INPUT] Initial time step.
- If =0, dtmax, or when beginning from restart file, the old dt is taken
- 
-\end_layout
-
-\begin_layout Description
-dvpdr\InsetSpace ~
-(nja,ni) = d [r * sin(theta) * v_phi]/dr on gridpoints 
-\end_layout
-
-\begin_layout Description
-dvpdrc dvpdr stored as complex array 
-\end_layout
-
-\begin_layout Description
-dvpdp\InsetSpace ~
-(nja,ni) = d [r * sin(theta) * v_phi]/dphi on gridpoints 
-\end_layout
-
-\begin_layout Description
-dvpdpc dvpdp stored as complex array
-\end_layout
-
-\begin_layout Description
-dvrdp\InsetSpace ~
-(nja,ni) = d [r^2 * v_r]/dphi on gridpoints 
-\end_layout
-
-\begin_layout Description
-dvrdpc dvrdp stored as complex array 
-\end_layout
-
-\begin_layout Description
-dvrdr\InsetSpace ~
-(nja,ni) = d [r^2 * v_r]/dr on gridpoints 
-\end_layout
-
-\begin_layout Description
-dvrdrc dvrdr stored as complex array
-\end_layout
-
-\begin_layout Description
-dvrdt\InsetSpace ~
-(nja,ni) = sin(theta) * d [r^2 * v_r]/dtheta on gridpoints 
-\end_layout
-
-\begin_layout Description
-dvrdtc dvrdt stored as complex array 
-\end_layout
-
-\begin_layout Description
-dvtdp\InsetSpace ~
-(nja,ni) = d [r *sin(theta) * v_theta]/dphi on gridpoints 
-\end_layout
-
-\begin_layout Description
-dvtdpc dvtdp stored as complex array 
-\end_layout
-
-\begin_layout Description
-dvtdr\InsetSpace ~
-(nja,ni) = d [r * sin(theta) * v_theta]/dr on gridpoints 
-\end_layout
-
-\begin_layout Description
-dvtdrc dvtdr stored as complex array
-\end_layout
-
-\begin_layout Description
-dw\InsetSpace ~
-(nlma,nn+1) 0.5 * radial derivative of poloidal velocity potential w 
-\end_layout
-
-\begin_layout Description
-dz\InsetSpace ~
-(nlma,nn+1) 0.5 * radial derivative of toroidal velocity potential z 
-\end_layout
-
-\begin_layout Description
-escale scaling factor for energies in output
-\end_layout
-
-\begin_layout Description
-ek [INPUT] Ekman number 
-\end_layout
-
-\begin_layout Description
-enb [OUTPUT] magnetic energy 
-\end_layout
-
-\begin_layout Description
-ens [OUTPUT] thermal energy 
-\end_layout
-
-\begin_layout Description
-enscale [INPUT] in output listing, energies are multiplied by enscale 
-\end_layout
-
-\begin_layout Description
-ent [OUTPUT] total energy 
-\end_layout
-
-\begin_layout Description
-env [OUTPUT] kinetic energy 
-\end_layout
-
-\begin_layout Description
-epsc0 [INPUT] internal heating rate 
-\end_layout
-
-\begin_layout Description
-flmb1\InsetSpace ~
-(nlma+..) r-component of (v x B) term 
-\end_layout
-
-\begin_layout Description
-flmb2\InsetSpace ~
-(nlma+..) theta-component of (v x B) term 
-\end_layout
-
-\begin_layout Description
-flmb3\InsetSpace ~
-(nlma+..) phi-component of (v x B) term 
-\end_layout
-
-\begin_layout Description
-flms1\InsetSpace ~
-(nlma+..) r-component of entropy advection term 
-\end_layout
-
-\begin_layout Description
-flms2\InsetSpace ~
-(nlma+..) theta-component of entropy advection term 
-\end_layout
-
-\begin_layout Description
-flms3\InsetSpace ~
-(nlma+..) phi-component of entropy advection term 
-\end_layout
-
-\begin_layout Description
-flmw1\InsetSpace ~
-(nlma+..) r-component of v*grad(v) + Lorentz force term 
-\end_layout
-
-\begin_layout Description
-flmw2\InsetSpace ~
-(nlma+..) theta-component of v*grad(v) + Lorentz force term 
-\end_layout
-
-\begin_layout Description
-flmw3\InsetSpace ~
-(nlma+..) phi-component of v*grad(v) + Lorentz force term 
-\end_layout
-
-\begin_layout Description
-gauss\InsetSpace ~
-(ni) vector with Gaussian weighting factors, local array in subroutine
- prep 
-\end_layout
-
-\begin_layout Description
-gquad [SUBROUTINE] finds zeros and Gaussian weight of associated Legendre
- function
-\end_layout
-
-\begin_layout Description
-grafile [CHARACT] file name for data on spatial grid for graphics with prefix
- ``g.''; added to outfile set
-\end_layout
-
-\begin_layout Description
-grav\InsetSpace ~
-(nn) gravity at radial levels
-\end_layout
-
-\begin_layout Description
-ib\InsetSpace ~
-(nn,lmax) pivot array for LU-decomposition of matrix bmat created in sgefa,
- used in sgesl 
-\end_layout
-
-\begin_layout Description
-ic stepping variable commonly used for steps in colatitude
-\end_layout
-
-\begin_layout Description
-icour [INPUT] Courant criterion is checked each ICOUR'th time step 
-\end_layout
-
-\begin_layout Description
-idiftype [INPUT] controls radial variation of diffusivity; =0, no variation
-\end_layout
-
-\begin_layout Description
-ifaxc [13] auxiliary array (factorization) for Chebyshev transform
-\end_layout
-
-\begin_layout Description
-ifaxf [13] auxiliary array (factorization) for Fourier transform
-\end_layout
-
-\begin_layout Description
-ifbfrz [INPUT] logical; if .TRUE., do not update magnetic field 
-\end_layout
-
-\begin_layout Description
-ifirst =1 before first call of time-step checking routine, =0 thereafter
- 
-\end_layout
-
-\begin_layout Description
-iframes [INPUT] write altogether iframes frames on the movie files (see
- description under imovopt) 
-\end_layout
-
-\begin_layout Description
-ifsfrz [INPUT] logical; if .TRUE., do not update temperature (entropy) 
-\end_layout
-
-\begin_layout Description
-ifvfrz [INPUT] logical; if .TRUE., do not update velocity
-\end_layout
-
-\begin_layout Description
-ij\InsetSpace ~
-(nn,lmax) pivot array for LU-decomposition of matrix ajmat created in
- sgefa, used in sgesl
-\end_layout
-
-\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
-
-\begin_layout Description
-imovopt [INPUT] four-digit integer number, controls options for generating
- movie files.
- 
-\end_layout
-
-\begin_deeper
-\begin_layout Description
-Last\InsetSpace ~
-digit>0 write B_z, W_z (vortic) and T in the equatorial plane on file
- with prefix ``me.'', imovopt=0001
-\end_layout
-
-\begin_layout Description
-2nd\InsetSpace ~
-last\InsetSpace ~
-digit>0 write longitudinally averaged B_phi, j_phi and v_phi on file
- with prefix ``ma.'', imovopt=0010
-\end_layout
-
-\begin_layout Description
-3rd\InsetSpace ~
-last\InsetSpace ~
-digit>0 write B_r at outer surface on file with prefix ``mm.'', imovopt=01
-00
-\end_layout
-
-\begin_layout Description
-4th\InsetSpace ~
-last\InsetSpace ~
-digit>0 write spherical harmonic coefficients for poloidal field
- at outer boundary and for velocity potentials at radial level on file with
- prefix ``cc.''.
- (This option works only when any or all of the movie options are turned
- on, i.e., any of the ``m?'' files are also produced.
- imovopt=1000 will not produce a ``cc.'' file.)
-\end_layout
-
-\end_deeper
-\begin_layout Description
-imovct counter variable for movie frames 
-\end_layout
-
-\begin_layout Description
-infile [CHARACT INPUT] name of input file for initial values (restart) 
-\end_layout
-
-\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
-
-\begin_layout Description
-ip0\InsetSpace ~
-(nn) pivot array for LU-decomposition of matrix p0mat created in sgefa,
- used in sgesl 
-\end_layout
-
-\begin_layout Description
-iprnt counting blocks in time iteration sequence with printed output created
- at completion of block 
-\end_layout
-
-\begin_layout Description
-is\InsetSpace ~
-(nn,lmax) pivot array for LU-decomposition of matrix smat created in sgefa,
- used in sgesl
-\end_layout
-
-\begin_layout Description
-is0\InsetSpace ~
-(nn) pivot array for LU-decomposition of matrix s0mat created in sgefa,
- used in sgesl 
-\end_layout
-
-\begin_layout Description
-iscale [INPUT] determines which diffusivity is used for scaling of time,
- velocity, energy.
- 1=viscous, 2=thermal, 3=magnetic 
-\end_layout
-
-\begin_layout Description
-istep time step counter (routine amh) 
-\end_layout
-
-\begin_layout Description
-istor counting superblocks in time iteration sequence, upon completion of
- superblock disk file with data saved
-\end_layout
-
-\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
-
-\begin_layout Description
-iwp\InsetSpace ~
-(nn,lmax) pivot array for LU-decomposition of matrix wpmat created in
- sgefa, used in sgesl 
-\end_layout
-
-\begin_layout Description
-iz\InsetSpace ~
-(nn,lmax) pivot array for LU-decomposition of matrix zmat created in sgefa,
- used in sgesl 
-\end_layout
-
-\begin_layout Description
-k2k\InsetSpace ~
-(nn1) auxiliary array for Chebyshev transform 
-\end_layout
-
-\begin_layout Description
-kc stepping variable commonly used for steps in radius 
-\end_layout
-
-\begin_layout Description
-kcour auxiliary variable for time step checking procedure 
-\end_layout
-
-\begin_layout Description
-kbotb [INPUT] magnetic bottom condition; =1 insulating, =2 perfect condition
-\end_layout
-
-\begin_layout Description
-kbotv [INPUT] mechanical bottom condition; =1 free, =2 rigid 
-\end_layout
-
-\begin_layout Description
-kbots [INPUT] thermal bottom condition; =1 fixed entropy, =2 flux
-\end_layout
-
-\begin_layout Description
-kei [SUBROUTINE] calculates kinetic energy
-\end_layout
-
-\begin_layout Description
-kstep global time step counter
-\end_layout
-
-\begin_layout Description
-ktops [INPUT] thermal top condition; =1 fixed entropy, =2 flux 
-\end_layout
-
-\begin_layout Description
-ktopb [INPUT] magnetic top condition; =1 insulating, =2 perfect condition
-\end_layout
-
-\begin_layout Description
-ktopv [INPUT] mechanical top condition; =1 free, =2 rigid 
-\end_layout
-
-\begin_layout Description
-ldif [INPUT] control parameter for hyperdiffusivity, see difamp 
-\end_layout
-
-\begin_layout Description
-ldifexp [INPUT] control parameter for hyperdiffusivity, see difamp 
-\end_layout
-
-\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
-
-\begin_layout Description
-lmax maximum harmonic degree, calculated as (nj-1)/3
-\end_layout
-
-\begin_layout Description
-logfile [CHARACT] file name for continuous log of energies and other data
- prefix ``l.''; added to outfile set 
-\end_layout
-
-\begin_layout Description
-lot [PARAM] = 2 * nlma (twice the number of harmonic modes)
-\end_layout
-
-\begin_layout Description
-lpfile [CHARACT] file name for continuous log of specified values with prefix
- ``lp.''; added to outfile set 
-\end_layout
-
-\begin_layout Description
-lsfile: [CHARACT] file name for power spectra of magnetic and kinetic as
- function of l and m with prefix ``ls.''; added to outfile set 
-\end_layout
-
-\begin_layout Description
-ludc: [SUBROUTINE] Chebyshev collocation 
-\end_layout
-
-\begin_layout Description
-mclm\InsetSpace ~
-(nlma) used to unscramble harmonic order m from variable lm 
-\end_layout
-
-\begin_layout Description
-mclma\InsetSpace ~
-(nlma) = m/minc+1 for given lm (storage order of m) 
-\end_layout
-
-\begin_layout Description
-kei [SUBROUTINE] calculates magnetic energy 
-\end_layout
-
-\begin_layout Description
-minc [PARAM] if >1, minc-fold symmetry in longitude assumed 
-\end_layout
-
-\begin_layout Description
-mmax maximum harmonic order, is the largest integer <= lmax divisible by
- minc
-\end_layout
-
-\begin_layout Description
-movafile [CHARACT] file name for movie data (longitudinal averages) with
- prefix ``ma.''; added to outfile set 
-\end_layout
-
-\begin_layout Description
-movefile [CHARACT] file name for movie data in equatorial plane with prefix
- ``me.'' ; added to outfile set
-\end_layout
-
-\begin_layout Description
-movmfile [CHARACT] file name for movie data in map views with prefix ``mm.''
- ; added to outfile set
-\end_layout
-
-\begin_layout Description
-n,\InsetSpace ~
-nc stepping variables commonly used for steps over Chebyshev polynomial
-\end_layout
-
-\begin_layout Description
-ncp [PARAM] = nja/2 used for storage of points in phi in complex array
-\end_layout
-
-\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
-
-\begin_layout Description
-ngcolat [INPUT] graphics output on each ngcolat'th point in latitude 
-\end_layout
-
-\begin_layout Description
-ngform [INPUT] if .ne.
- 0, graphics output is written each time a restart 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
-
-\begin_layout Description
-nglon [INPUT] graphics output for each nglon'th point in longitude 
-\end_layout
-
-\begin_layout Description
-ngrad [INPUT] graphics output on each ngrad'th radial level 
-\end_layout
-
-\begin_layout Description
-ni [PARAM] # of grid points in colatide; must be even
-\end_layout
-
-\begin_layout Description
-nip1 [PARAM] = ni+1 
-\end_layout
-
-\begin_layout Description
-nj [PARAM] # of grid points in longitude; nj/minc must be multiple of four
-\end_layout
-
-\begin_layout Description
-nja = nj/minc, # of actually needed grid points in phi 
-\end_layout
-
-\begin_layout Description
-njp1 [PARAM] = nj+1 
-\end_layout
-
-\begin_layout Description
-nlaf [PARAM] = lmax+1 
-\end_layout
-
-\begin_layout Description
-nlafp1 [PARAM] = lmax+2 
-\end_layout
-
-\begin_layout Description
-nlm [PARAM] = (mmax+1)*(mmax+2)/2
-\end_layout
-
-\begin_layout Description
-nlma [PARAM] # of angular modes employed nlma = mmax*(lmax+1)/minc - mmax*(mmax-
-minc)/(2*minc) + lmax-mmax+1.
- 
-\end_layout
-
-\begin_layout Description
-nlmpa [PARAM] = nlma + mmax/minc + 1
-\end_layout
-
-\begin_layout Description
-nlogstep [INPUT] write data on logfile (prefix l.) after each nlogstep steps.
- 
-\end_layout
-
-\begin_layout Description
-nmaf [PARAM] = mmax+1 
-\end_layout
-
-\begin_layout Description
-nmafa [PARAM] = mmax/minc+1 
-\end_layout
-
-\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
-
-\begin_layout Description
-nn1 [PARAM] = nn-1 
-\end_layout
-
-\begin_layout Description
-nn2 [PARAM] = nn-2 
-\end_layout
-
-\begin_layout Description
-nn3 [PARAM] = nn-3 
-\end_layout
-
-\begin_layout Description
-nnp1 [PARAM] = nn+1
-\end_layout
-
-\begin_layout Description
-nnp2 [PARAM] = nn+2 
-\end_layout
-
-\begin_layout Description
-nnaf [PARAM] # of radial Chebyshev modes, must be <= nn 
-\end_layout
-
-\begin_layout Description
-nnx2 [PARAM] = 2*nn 
-\end_layout
-
-\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 (for arrays,
- see vrpoint, vppoint, vtpoint in subroutine amhd for details) 
-\end_layout
-
-\begin_layout Description
-nprnt [INPUT] # of printed output blocks created until next data storage
- for restart 
-\end_layout
-
-\begin_layout Description
-nps2 [PARAM] = (nn+1)/2 
-\end_layout
-
-\begin_layout Description
-nrp [PARAM] = nja+2 (# of points in phi +2) 
-\end_layout
-
-\begin_layout Description
-ns2 [PARAM] =( nn-1)/2
-\end_layout
-
-\begin_layout Description
-nstep [INPUT] # of time steps done until next printed output (total # of
- time steps is nstep*nprnt*nstor) 
-\end_layout
-
-\begin_layout Description
-nstor [INPUT] # of data storages before program termination
-\end_layout
-
-\begin_layout Description
-ntf [PARAM] =3*nja/2+1, used for Fourier transform array trigsf 
-\end_layout
-
-\begin_layout Description
-ocorevol volume of spherical shell (outer core) 
-\end_layout
-
-\begin_layout Description
-oek = 1.
- / Ekman number 
-\end_layout
-
-\begin_layout Description
-oekpm = 1.
- / (Ekman number * Magnetic Prandtl number) 
-\end_layout
-
-\begin_layout Description
-oodt = 1.
- / dt (inverse time step) 
-\end_layout
-
-\begin_layout Description
-oosscl = 1.
- / dt 
-\end_layout
-
-\begin_layout Description
-opr = 1.
- / Prandtl number 
-\end_layout
-
-\begin_layout Description
-outfile [CHARACT INPUT] Name of output files (pre-fixes d.,l.,ls.,g.,me.,ma.,mm.,
- lp.
- added) 
-\end_layout
-
-\begin_layout Description
-p0mat\InsetSpace ~
-(nn,nn) LU-decomposed matrix from Chebyshev collocation of pol.
- equation of motion, l=0-term for pressure.
- Constructed in ludc, used in amhd 
-\end_layout
-
-\begin_layout Description
-pbar [SUBROUTINE] Calculates value of associated Legendre function 
-\end_layout
-
-\begin_layout Description
-pscale scaling pressure in output 
-\end_layout
-
-\begin_layout Description
-pr [INPUT] Prandtl number 
-\end_layout
-
-\begin_layout Description
-prmag [INPUT] Magnetic Prandtl number 
-\end_layout
-
-\begin_layout Description
-prnt [SUBROUTINE] print diagnostic data 
-\end_layout
-
-\begin_layout Description
-pscl = radtop^2 
-\end_layout
-
-\begin_layout Description
-qi\InsetSpace ~
-(ni,5) array with various coefficients depending on colatitude (look in
- subroutine prep, loop ``do 32'' for details) 
-\end_layout
-
-\begin_layout Description
-qk\InsetSpace ~
-(nn,16) array with various coefficients depending on radius (look in subroutin
-e prep for details)
-\end_layout
-
-\begin_layout Description
-ql\InsetSpace ~
-(nlma,10) various expressions depending on l and m (look in subroutine
- prep, loop ``do 35'' for details) 
-\end_layout
-
-\begin_layout Description
-qn\InsetSpace ~
-(nn,6) Chebyshev integrals 
-\end_layout
-
-\begin_layout Description
-r\InsetSpace ~
-(nn) vector with radial levels, r(1)=radtop, r(nn)=radbot
-\end_layout
-
-\begin_layout Description
-ra [INPUT] Rayleigh number 
-\end_layout
-
-\begin_layout Description
-rapr = Rayleigh number / Prandtl number 
-\end_layout
-
-\begin_layout Description
-radbot radius of inner boundary 
-\end_layout
-
-\begin_layout Description
-radratio [INPUT] ratio of inner radius to outer radius 
-\end_layout
-
-\begin_layout Description
-radtop radius of outer boundary 
-\end_layout
-
-\begin_layout Description
-rderiv [SUBROUTINE] radial derivative 
-\end_layout
-
-\begin_layout Description
-rffti [SUBROUTINE] subroutine called in chebi
-\end_layout
-
-\begin_layout Description
-rstfile [CHARACT] file name for data in spectral form ('restart data') with
- prefix ``d.'' or ``d0.'', ``d1.'' ...; added to outfile set
-\end_layout
-
-\begin_layout Description
-runid [CHAR*64] text identifying the run 
-\end_layout
-
-\begin_layout Description
-rva\InsetSpace ~
-(nn) auxiliary array used in prep
-\end_layout
-
-\begin_layout Description
-rvap\InsetSpace ~
-(nn) auxiliary array used in kei, mei
-\end_layout
-
-\begin_layout Description
-rvat\InsetSpace ~
-(nn) auxiliary array used in kei, mei 
-\end_layout
-
-\begin_layout Description
-rvb\InsetSpace ~
-(nn) auxiliary array used in prep, kei, mei 
-\end_layout
-
-\begin_layout Description
-rvc\InsetSpace ~
-(nn) auxiliary array used in kei, mei 
-\end_layout
-
-\begin_layout Description
-p\InsetSpace ~
-(nlma,nn+1) pressure (spectral form) 
-\end_layout
-
-\begin_layout Description
-p00co = 4/sqrt(3)
-\end_layout
-
-\begin_layout Description
-prep [SUBROUTINE] parameter input, set up auxiliary arrays, set initial
- conditions, etc.
- 
-\end_layout
-
-\begin_layout Description
-s\InsetSpace ~
-(nlma,nn+1) entropy perturbation (spectral form) 
-\end_layout
-
-\begin_layout Description
-sc\InsetSpace ~
-(ncp,ni) sr stored in complex form 
-\end_layout
-
-\begin_layout Description
-snlc1\InsetSpace ~
-(ncp,ni) slnr1 stored in complex form 
-\end_layout
-
-\begin_layout Description
-snlc2\InsetSpace ~
-(ncp,ni) slnr2 stored in complex form 
-\end_layout
-
-\begin_layout Description
-snlc3\InsetSpace ~
-(ncp,ni) slnr3 stored in complex form 
-\end_layout
-
-\begin_layout Description
-snlr1\InsetSpace ~
-(nrp,ni) nonlinear term (radial advection) for updating temperature
- 
-\end_layout
-
-\begin_layout Description
-snlr2\InsetSpace ~
-(nrp,ni) nonlinear term (theta advection) for updating temperature
- 
-\end_layout
-
-\begin_layout Description
-snlr3\InsetSpace ~
-(nrp,ni) nonlinear term (phi advection) for updating temperature 
-\end_layout
-
-\begin_layout Description
-sr\InsetSpace ~
-(nrp,ni) temperature (entropy) on grid points 
-\end_layout
-
-\begin_layout Description
-s0mat\InsetSpace ~
-(nn,nn) LU-decomposed matrix from Chebyshev collocation of temperature
- equation, l=0-term.
- Constructed in ludc, used in amhd 
-\end_layout
-
-\begin_layout Description
-samp [INPUT] amplitude of initial entropy perturbation 
-\end_layout
-
-\begin_layout Description
-smat\InsetSpace ~
-(nn,nn,lmax) LU-decomposed matrix from Chebyshev collocation of temperature
- equation.
- Built in ludc, used in amhd 
-\end_layout
-
-\begin_layout Description
-sr\InsetSpace ~
-(nja,ni) entropy on gridpoints 
-\end_layout
-
-\begin_layout Description
-src sr stored as complex array 
-\end_layout
-
-\begin_layout Description
-sscl = dt 
-\end_layout
-
-\begin_layout Description
-stor [SUBROUTINE] store data in restart file
-\end_layout
-
-\begin_layout Description
-tei [SUBROUTINE] calculates thermal energy 
-\end_layout
-
-\begin_layout Description
-time time 
-\end_layout
-
-\begin_layout Description
-timediff time 
-\end_layout
-
-\begin_layout Description
-tipdipole [INPUT] rotate poloidal dipole term when beginning from restart
- file 
-\end_layout
-
-\begin_layout Description
-tmovnext auxiliary variable (next output time) for movie file generation
- 
-\end_layout
-
-\begin_layout Description
-tmovstart [INPUT] time at which to start writing movie-frames on m.*-file
- 
-\end_layout
-
-\begin_layout Description
-tmovstep [INPUT] time increments for writing movie-frames on m.*-file 
-\end_layout
-
-\begin_layout Description
-tops\InsetSpace ~
-(0:lmax,0:mmax) [INPUT] harmonic coefficients of prescribed temperature
- (entropy) on outer boundary 
-\end_layout
-
-\begin_layout Description
-treset [INPUT; LOGICAL] if true reset time and step counter to zero when
- starting from a stored dataset 
-\end_layout
-
-\begin_layout Description
-trigsc\InsetSpace ~
-(nn) auxiliary array for Chebyshev transform routine created in chebi,
- used in chebtf
-\end_layout
-
-\begin_layout Description
-trigsf\InsetSpace ~
-(ntf) auxiliary array for Fourier transform routine created in fftrig,
- used in fourtf
-\end_layout
-
-\begin_layout Description
-tscale scaling of time in output
-\end_layout
-
-\begin_layout Description
-up\InsetSpace ~
-(nja,3) phi-component of velocity in equatorial plane for three consecutive
- radial levels; used in moveout to calculate vorticity 
-\end_layout
-
-\begin_layout Description
-urdp\InsetSpace ~
-(nja) derivative dv_r/dphi in equatorial plane; used in moveout to calculate
- vorticity 
-\end_layout
-
-\begin_layout Description
-vr\InsetSpace ~
-(nja,ni) = r^2 * v_r on grid points 
-\end_layout
-
-\begin_layout Description
-vrc vr stored as complex array
-\end_layout
-
-\begin_layout Description
-vp\InsetSpace ~
-(nja,ni) = c * sin(theta) * v_phi on grid points 
-\end_layout
-
-\begin_layout Description
-vpc vp stored as complex array 
-\end_layout
-
-\begin_layout Description
-vscale scaling of velocity in output
-\end_layout
-
-\begin_layout Description
-vt\InsetSpace ~
-(nja,ni) = r * sin(theta) * v_theta on grid points 
-\end_layout
-
-\begin_layout Description
-vtc vt stored as complex array 
-\end_layout
-
-\begin_layout Description
-w\InsetSpace ~
-(nlma,nn+1) poloidal velocity potential (spectral form)
-\end_layout
-
-\begin_layout Description
-wpmat\InsetSpace ~
-(nn,nn,lmax) LU-decomposed matrix from Chebyshev collocation of poloidal
- equation of motion; built in ludc, used in amhd
-\end_layout
-
-\begin_layout Description
-wnlc1\InsetSpace ~
-(nja/2,ni) wnlr1 stored in complex form 
-\end_layout
-
-\begin_layout Description
-wnlc2\InsetSpace ~
-(nja/2,ni) wnlr2 stored in complex form 
-\end_layout
-
-\begin_layout Description
-wnlc3\InsetSpace ~
-(nja/2,ni) wnlr3 stored in complex form 
-\end_layout
-
-\begin_layout Description
-wnlr1\InsetSpace ~
-(nja,ni) nonlinear products for updating w (on grid points) 
-\end_layout
-
-\begin_layout Description
-wnlr2\InsetSpace ~
-(nja,ni) nonlinear products for updating z (on grid points) 
-\end_layout
-
-\begin_layout Description
-wnlr3\InsetSpace ~
-(nja,ni) nonlinear products for updating z (on grid points)
-\end_layout
-
-\begin_layout Description
-work\InsetSpace ~
-(lot,nnp2) work array used in Fourier and Chebyshev transforms 
-\end_layout
-
-\begin_layout Description
-wsave\InsetSpace ~
-(nn) auxiliary array used for Chebyshev transform 
-\end_layout
-
-\begin_layout Description
-wscl = dt * radtop^2 
-\end_layout
-
-\begin_layout Description
-y00 = 1/sqrt(4*pi) 
-\end_layout
-
-\begin_layout Description
-z\InsetSpace ~
-(nlma,nn+1) toroidal velocity potential (spectral form) 
-\end_layout
-
-\begin_layout Description
-zscl = dt * radtop^2 
-\end_layout
-
-\begin_layout Description
-zmat\InsetSpace ~
-(nn,nn,lmax) LU-decomposed matrix from Chebyshev collocation of toroidal
- equation of motion; built in ludc, used in amhd
-\end_layout
-
-\begin_layout Chapter
-\begin_inset LatexCommand \label{cha:MAG-Input-File}
-
-\end_inset
-
-MAG Input File Format
-\end_layout
-
-\begin_layout Section*
-Introduction
-\end_layout
-
-\begin_layout Standard
-This is an overview of the components of the code, input parameters, structure
- of output files, etc.
- MAG expects Unix-styled ASCII files (i.e., no carriage-return 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.
- All parameters are in non-dimensional units unless specified.
- 
-\end_layout
-
-\begin_layout Section*
-Input Parameters 
-\end_layout
-
-\begin_layout Standard
-Parameters have pre-defined (default) values.
- They are read through a namelist in the subroutine ``prep.
-\begin_inset Quotes srd
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection*
-INPUT, OUTPUT, STEPPING CONTROL, INITIALIZATION OF THE RUN
-\end_layout
-
-\begin_layout Description
-outfile Name of output files (prefixes 
-\family typewriter
-d., g., l., ls., me., ma., mm.
-\family default
-, are added)
-\end_layout
-
-\begin_layout Description
-infile Complete name of file from which initial values are read (restart
- file)
-\end_layout
-
-\begin_layout Description
-runid Arbitrary text of up to 64 characters to describe the model 
-\end_layout
-
-\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 which 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 Description
-samp Amplitude of initial perturbation (whether random or single mode) 
-\end_layout
-
-\begin_layout Description
-nstep Do one block of nstep time steps before producing a summary printout
- of some diagnostics standard output; nstep should be an even number
-\end_layout
-
-\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 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 Description
-ngform Write data at grid points for graphics processing and other post-processi
-ng (programs column.f diagnos.f) into file 'g[0-9].<name>' each time a superblock
- is written.
- 
-\end_layout
-
-\begin_deeper
-\begin_layout Description
-ngform=2 unformatted file
-\end_layout
-
-\begin_layout Description
-ngform=1 formatted file 
-\end_layout
-
-\begin_layout Description
-ngform=0 nothing written
-\end_layout
-
-\begin_layout Description
-ngform=-1 comment lines are included into file for easier reading (cannot
- be used for graphics processing in this form)
-\end_layout
-
-\end_deeper
-\begin_layout Description
-ngrad Output on graphics file for each ngrad'th radial point
-\end_layout
-
-\begin_layout Description
-ngcolat Output on graphics file every ngcolat'th point in colatitude
-\end_layout
-
-\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 Description
-alfilt See under nfilt 
-\end_layout
-
-\begin_layout Description
-ivfilt If >0 apply the same filter as above to the radial velocity at radial
- level ivfilt and write the result into graphics file at the first radial
- location (kc=1) 
-\end_layout
-
-\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 Description
-nlogstep Writes data on logfile (prefix l.) after each nlogstep step 
-\end_layout
-
-\begin_layout Description
-nplog If >0, writes velocity values at specific points of the grid on separate
- logfile (prefix ``lp.'') after every nplog step (for arrays, see vrpoint,
- vppoint, vtpoint in subroutine amhd for details)
-\end_layout
-
-\begin_layout Description
-iscale Determines which diffusivity is used for scaling of time, velocity
- and energy.
- 1=viscous, 2=thermal, 3=magnetic 
-\end_layout
-
-\begin_layout Description
-enscale In output listings, energies are multiplied by enscale 
-\end_layout
-
-\begin_layout Description
-treset [LOGICAL] If true, reset time and step counter to zero when starting
- from a stored dataset 
-\end_layout
-
-\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 Description
-amps Option for rescaling temperature perturbation (from restart file) by
- factor amps (if not equal to 1) 
-\end_layout
-
-\begin_layout Description
-ampw Same for poloidal velocity 
-\end_layout
-
-\begin_layout Description
-ampz Same for toroidal velocity 
-\end_layout
-
-\begin_layout Description
-ampb Same for poloidal magnetic field 
-\end_layout
-
-\begin_layout Description
-ampj Same for toroidal magnetic field 
-\end_layout
-
-\begin_layout Description
-ifvfrz [LOGICAL] If true, do not update velocity during iteration 
-\end_layout
-
-\begin_layout Description
-ifbfrz [LOGICAL] If true, do not update magnetic field during iteration
- 
-\end_layout
-
-\begin_layout Description
-ifsfrz [LOGICAL] If true, do not update temperature during iteration
-\end_layout
-
-\begin_layout Subsubsection*
-TIME STEP CONTROL 
-\end_layout
-
-\begin_layout Description
-dtmin Minimum time step (in seconds).
- If the dynamically determined time step becomes less, the program terminates.
- 
-\end_layout
-
-\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 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 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 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 Description
-icour Check Courant criterion after each icour time step (even numbers)
- 
-\end_layout
-
-\begin_layout Subsubsection*
-PHYSICAL CONTROL PARAMETERS
-\end_layout
-
-\begin_layout Description
-ra Rayleigh number (defined with gravity on outer boundary) 
-\end_layout
-
-\begin_layout Description
-ek Ekman number 
-\end_layout
-
-\begin_layout Description
-pr Prandtl number 
-\end_layout
-
-\begin_layout Description
-prmag Magnetic Prandtl number 
-\end_layout
-
-\begin_layout Description
-radratio Ratio of inner to outer radius 
-\end_layout
-
-\begin_layout Description
-bpeak Peak value of magnetic field imposed by boundary conditions 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 Description
-epsc0 Volumetric rate of internal heating
-\end_layout
-
-\begin_layout Subsubsection*
-BOUNDARY CONDITIONS AT INNER AND OUTER RADII 
-\end_layout
-
-\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 Description
-kbots thermal boundary condition at ICB.
- As above.
- 
-\end_layout
-
-\begin_layout Description
-ktopv velocity condition at CMB.
- 1-free, 2-rigid.
- 
-\end_layout
-
-\begin_layout Description
-kbotv velocity condition at ICB.
- As above.
-\end_layout
-
-\begin_layout Description
-kbotb =1 for insulating inner core =2: ideally conducting inner core 
-\end_layout
-
-\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 Description
-cmb If >0, thin conducting layer at bottom of mantle (not tested!)
-\end_layout
-
-\begin_layout Subsubsection*
-HYPERDIFFUSIVITIES 
-\end_layout
-
-\begin_layout Description
-difamp Amplitude of hyperdiffusivities
-\end_layout
-
-\begin_layout Description
-ldif Hyperdiffusivites applied for harmonic degrees l >= ldif
-\end_layout
-
-\begin_layout Description
-ldifexp Exponent for increase of hyperdiffusivities with l (analytical details
- see definition of ql(lm,11) in prep.f)
-\end_layout
-
-\begin_layout Subsubsection*
-PARAMETERS FOR GENERATING MOVIE FILES 
-\end_layout
-
-\begin_layout Description
-imovopt Three-digit integer number, options for generating movie files 
-\end_layout
-
-\begin_deeper
-\begin_layout Description
-Last\InsetSpace ~
-digit>0 Write B_z, W_z (vorticity) and T in the equatorial plane on
- file with prefix ``me.'' 
-\end_layout
-
-\begin_layout Description
-2nd\InsetSpace ~
-last\InsetSpace ~
-digit>0 Write longitudinally averaged B_phi, j_phi and v_phi on file
- with prefix ``ma.'' 
-\end_layout
-
-\begin_layout Description
-3rd\InsetSpace ~
-last\InsetSpace ~
-digit>0 Write B_r at outer surface and B_r and v_r at mid- depth
- on file with prefix ``mm.'' 
-\end_layout
-
-\begin_layout Description
-4th\InsetSpace ~
-last\InsetSpace ~
-digit>0 Write spherical harmonic coefficients for poloidal field
- at outer boundary and for velocity potentials at radial level on file with
- prefix ``cc.'' 
-\end_layout
-
-\end_deeper
-\begin_layout Description
-iframes Write altogether iframes frames on the movie files 
-\end_layout
-
-\begin_layout Description
-tmovstart Time at which to start writing movie-frames 
-\end_layout
-
-\begin_layout Description
-tmovstep Time increments for writing movie-frames
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout Chapter
-\begin_inset LatexCommand \label{cha:MAG-Output-File}
-
-\end_inset
-
-MAG Output File Format
-\end_layout
-
-\begin_layout Standard
-MAG produces a set of output files for further processing.
- All outputs are in non-dimensional units unless specified.
- 
-\end_layout
-
-\begin_layout Description
-l.[outfile] Lists a set of diagnostic values each nlogstep time-steps.
-\end_layout
-
-\begin_layout Description
-ls.[outfile] Spectra of kinetic energy and magnetic field every nprint time
- steps, sorted for modes with equal l, and additionally sorted for modes
- with equal m.
- 
-\end_layout
-
-\begin_layout Description
-g.[outfile]\InsetSpace ~
-or\InsetSpace ~
-g[i].[outfile] where i=0,1,2,..9 (optional, written when ngstep>0).
- Contains temperature, velocity and magnetic field components for graphics
- processing (idl-program magts).
- 
-\end_layout
-
-\begin_layout Description
-d.[outfile]\InsetSpace ~
-or\InsetSpace ~
-d[i].outfile Restart files with the complete set of variables
- (stored as spectral values 
-\family typewriter
-l,m
-\family default
- in the angular coordinates for radial grid-levels).
- 
-\end_layout
-
-\begin_layout Description
-lp.[outfile] Written when nplog>0.
- Velocity at specific points written every nplog'th time step.
- 
-\end_layout
-
-\begin_layout Description
-me.[outfile] Written when first digit of imovopt>0, i.e., imovopt=
-\begin_inset Formula $ $
-\end_inset
-
-0001.
- Values in the equatorial plane for producing movie (idl-program: magmov
- EQ3.pro).
-\end_layout
-
-\begin_layout Description
-ma.[outfile] Written when second digit of imovopt>0, i.e, imovopt=0010.
- Longitudinal averages for producing movie (idl-program, not provided).
-\end_layout
-
-\begin_layout Description
-mm.[outfile] Written when third digit of imovopt>0, i.e., imovopt=0100.
- Values on spherical surfaces for producing movie (idl-program: magmovieCIG.pro,
- magmovCMB.pro).
-\end_layout
-
-\begin_layout Description
-cc.[outfile] Written when the last (fourth) digit and any of imovopt>0 and
- any of the other three digits is larger than zero, i.e.
- imovopt>1000.
- Record the spherical harmonic coefficients for poloidal field at outer
- boundary and their converted Gauss coefficients.
-\end_layout
-
-\begin_layout Quote
-
-\series bold
-Note: 
-\series default
-If one of the above files already exists, the program will not run.
-\end_layout
-
-\begin_layout Standard
-The standard output file contains summaries of grid paramaters and all process
- control and physical parameters that occur in the namelist statements.
- It lists the values of non-dimensional parameters and of the various diffusive
- time-scales.
- Then, at the end of each block, it lists a number of diagnostic values:
- 
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="11" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="5in">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\series bold
-Parameters
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\series bold
-Definitions
-\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
-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
-actual time step
-\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
-dtrmin
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Courant time calculated with radial velocities 
-\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
-dthmin  
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Courant time calculated with horizontal velocities
-\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
-cour
-\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 inverse Courant time based on radial fluid velocity 
-\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
-couh
-\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 inverse Courant time based on horizontal fluid velocity 
-\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
-alfr
-\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 inverse Courant time based on radial modified Alfven velocity 
-\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
-alfh
-\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 inverse Courant time based on horizontal modified Alfven velocity
- (in addition, the radial level at which the maximum is reached is indicated)
- 
-\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
-ent
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-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
-env
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-kinetic energy
-\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
-enb
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-magnetic energy
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-The meaning of other quantities is obvious.
-\end_layout
-
-\begin_layout Standard
-For the primary variables, the modes for which they assume their absolute
- maximum and the maximum are printed.
- Maxima are determined for the toroidal potential multiplied by 
-\begin_inset Formula $1/r$
-\end_inset
-
-, and for poloidal potentials multiplied by 
-\begin_inset Formula $l(l+1)/r{}^{2}$
-\end_inset
-
-, in order to find the modes which exhibit the maximum longitudinal toroidal
- velocity (field strength) and the maximum radial velocity (field strength),
- respectively.
-\end_layout
-
-\begin_layout Description
-l.[outfile] printed every nlogstep time step, one record is printed that
- contains 17 output fields: 
-\end_layout
-
-\begin_deeper
-\begin_layout List
-\labelwidthstring 00.00.0000
-1) time 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-2) mean kinetic energy density 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-3) mean poloidal kinetic energy density
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-4) mean magnetic energy density
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-5) mean poloidal magnetic energy density 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-6) mean axisymmetric toroidal kinetic energy density 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-7) mean axisymmetric poloidal kinetic energy density 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-8) mean axisymmetric poloidal magnetic energy density 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-9) mean axisymmetric toroidal magnetic energy density
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-10) mean top heatflow (nusselt number) 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-11) mean bottom heatflow (nusselt number) 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-12) mean magnetic field strength 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-13) rms dipole, outer boundary 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-14) rms axial dipole, outer boundary 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-15) dipole tilt, outer boundary 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-16) dipole longitude, outer boundary 
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-17) mean velocity
-\end_layout
-
-\end_deeper
-\begin_layout Description
-ls.[outfile] Printed each nprint time step are four records with time being
- the first variable followed by the spectral power of kinetic and magnetic
- energy, respectively, as a function of harmonic degree 
-\begin_inset Formula $l$
-\end_inset
-
-, from 
-\begin_inset Formula $l$
-\end_inset
-
-=0 to lmax (first two records in a block), and spectral power as a function
- of harmonic order m in the last two records of a block.
-\end_layout
-
-\begin_layout Standard
-
-\end_layout
-
-\begin_layout Chapter
-License 
-\end_layout
-
-\begin_layout Standard
-
-\series bold
-GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-\series default
- 
-\newline
-
-\series medium
-Everyone is permitted to copy and distribute verbatim copies of this license
- document, but changing it is not allowed.
-\end_layout
-
-\begin_layout Section*
-Preamble
-\end_layout
-
-\begin_layout Standard
-The licenses for most software are designed to take away your freedom to
- share and change it.
- By contrast, the GNU General Public License is intended to guarantee your
- freedom to share and change free software -- to make sure the software
- is free for all its users.
- This General Public License applies to most of the Free Software Foundation's
- software and to any other program whose authors commit to using it.
- (Some other Free Software Foundation software is covered by the GNU Library
- General Public License instead.) You can apply it to your programs, too.
-\end_layout
-
-\begin_layout Standard
-When we speak of free software, we are referring to freedom, not price.
- Our General Public Licenses are designed to make sure that you have the
- freedom to distribute copies of free software (and charge for this service
- if you wish), that you receive source code or can get it if you want it,
- that you can change the software or use pieces of it in new free programs;
- and that you know you can do these things.
-\end_layout
-
-\begin_layout Standard
-To protect your rights, we need to make restrictions that forbid anyone
- to deny you these rights or to ask you to surrender the rights.
- These restrictions translate to certain responsibilities for you if you
- distribute copies of the software, or if you modify it.
-\end_layout
-
-\begin_layout Standard
-For example, if you distribute copies of such a program, whether gratis
- or for a fee, you must give the recipients all the rights that you have.
- You must make sure that they, too, receive or can get the source code.
- And you must show them these terms so they know their rights.
-\end_layout
-
-\begin_layout Standard
-We protect your rights with two steps:
-\end_layout
-
-\begin_layout Enumerate
-Copyright the software, and 
-\end_layout
-
-\begin_layout Enumerate
-Offer you this license which gives you legal permission to copy, distribute
- and/or modify the software.
-\end_layout
-
-\begin_layout Standard
-Also, for each author's protection and ours, we want to make certain that
- everyone understands that there is no warranty for this free software.
- If the software is modified by someone else and passed on, we want its
- recipients to know that what they have is not the original, so that any
- problems introduced by others will not reflect on the original authors'
- reputations.
-\end_layout
-
-\begin_layout Standard
-Finally, any free program is threatened constantly by software patents.
- We wish to avoid the danger that redistributors of a free program will
- individually obtain patent licenses, in effect making the program proprietary.
- To prevent this, we have made it clear that any patent must be licensed
- for everyone's free use or not licensed at all.
- 
-\end_layout
-
-\begin_layout Standard
-The precise terms and conditions for copying, distribution and modification
- follow.
-\end_layout
-
-\begin_layout Section*
-GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION
- AND MODIFICATION 
-\end_layout
-
-\begin_layout Standard
-This License applies to any program or other work which contains a notice
- placed by the copyright holder saying it may be distributed under the terms
- of this General Public License.
- The ``Program,'' below refers to any such program or work, and a ``work
- based on the Program'' means either the Program or any derivative work
- under copyright law: that is to say, a work containing the Program or a
- portion of it, either verbatim or with modifications and/or translated
- into another language.
- (Hereinafter, translation is included without limitation in the term ``modifica
-tion.'') Each licensee is addressed as ``you.''
-\end_layout
-
-\begin_layout Standard
-Activities other than copying, distribution and modification are not covered
- by this License; they are outside its scope.
- The act of running the Program is not restricted, and the output from the
- Program is covered only if its contents constitute a work based on the
- Program (independent of having been made by running the Program).
- Whether that is true depends on what the Program does.
- 
-\end_layout
-
-\begin_layout Enumerate
-You may copy and distribute verbatim copies of the Program's source code
- as you receive it, in any medium, provided that you conspicuously and appropria
-tely publish on each copy an appropriate copyright notice and disclaimer
- of warranty; keep intact all the notices that refer to this License and
- to the absence of any warranty; and give any other recipients of the Program
- a copy of this License along with the Program.
- 
-\newline
-
-\newline
-You may charge a fee for the physical act of transferring a copy, and you
- may at your option offer warranty protection in exchange for a fee.
- 
-\end_layout
-
-\begin_layout Enumerate
-You may modify your copy or copies of the Program or any portion of it,
- thus forming a work based on the Program, and copy and distribute such
- modifications or work under the terms of Section 1 above, provided that
- you also meet all of these conditions: 
-\end_layout
-
-\begin_deeper
-\begin_layout Enumerate
-You must cause the modified files to carry prominent notices stating that
- you changed the files and the date of any change.
- 
-\end_layout
-
-\begin_layout Enumerate
-You must cause any work that you distribute or publish, that in whole or
- in part contains or is derived from the Program or any part thereof, to
- be licensed as a whole at no charge to all third parties under the terms
- of this License.
- 
-\end_layout
-
-\begin_layout Enumerate
-If the modified program normally reads commands interactively when run,
- you must cause it, when started running for such interactive use in the
- most ordinary way, to print or display an announcement including an appropriate
- copyright notice and a notice that there is no warranty (or else, saying
- that you provide a warranty) and that users may redistribute the program
- under these conditions, and telling the user how to view a copy of this
- License.
- (Exception: if the Program itself is interactive but does not normally
- print such an announcement, your work based on the Program is not required
- to print an announcement.) 
-\end_layout
-
-\begin_layout Standard
-These requirements apply to the modified work as a whole.
- If identifiable sections of that work are not derived from the Program,
- and can be reasonably considered independent and separate works in themselves,
- then this License, and its terms, do not apply to those sections when you
- distribute them as separate works.
- But when you distribute the same sections as part of a whole which is a
- work based on the Program, the distribution of the whole must be on the
- terms of this License, whose permissions for other licensees extend to
- the entire whole, and thus to each and every part regardless of who wrote
- it.
- 
-\newline
-
-\newline
-Thus, it is not the intent of this section to claim rights or contest your
- rights to work written entirely by you; rather, the intent is to exercise
- the right to control the distribution of derivative or collective works
- based on the Program.
- 
-\newline
-
-\newline
-In addition, mere aggregation of another work not based on the Program
- with the Program (or with a work based on the Program) on a volume of a
- storage or distribution medium does not bring the other work under the
- scope of this License.
- 
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-You may copy and distribute the Program (or a work based on it, under Section
- 2) in object code or executable form under the terms of Sections 1 and
- 2 above provided that you also do one of the following: 
-\end_layout
-
-\begin_deeper
-\begin_layout Enumerate
-Accompany it with the complete corresponding machine-readable source code,
- which must be distributed under the terms of Sections 1 and 2 above on
- a medium customarily used for software interchange; or, 
-\end_layout
-
-\begin_layout Enumerate
-Accompany it with a written offer, valid for at least three years, to give
- any third party, for a charge no more than your cost of physically performing
- source distribution, a complete machine-readable copy of the corresponding
- source code, to be distributed under the terms of Sections 1 and 2 above
- on a medium customarily used for software interchange; or, 
-\end_layout
-
-\begin_layout Enumerate
-Accompany it with the information you received as to the offer to distribute
- corresponding source code.
- (This alternative is allowed only for noncommercial distribution and only
- if you received the program in object code or executable form with such
- an offer, in accord with Subsection b above.) 
-\end_layout
-
-\begin_layout Standard
-The source code for a work means the preferred form of the work for making
- modifications to it.
- For an executable work, complete source code means all the source code
- for all modules it contains, plus any associated interface definition files,
- plus the scripts used to control compilation and installation of the executable.
- However, as a special exception, the source code distributed need not include
- anything that is normally distributed (in either source or binary form)
- with the major components (compiler, kernel, and so on) of the operating
- system on which the executable runs, unless that component itself accompanies
- the executable.
-\newline
-
-\newline
-If distribution of executable or object code is made by offering
- access to copy from a designated place, then offering equivalent access
- to copy the source code from the same place counts as distribution of the
- source code, even though third parties are not compelled to copy the source
- along with the object code.
- 
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-You may not copy, modify, sublicense, or distribute the Program except as
- expressly provided under this License.
- Any attempt otherwise to copy, modify, sublicense or distribute the Program
- is void, and will automatically terminate your rights under this License.
- However, parties who have received copies, or rights, from you under this
- License will not have their licenses terminated so long as such parties
- remain in full compliance.
- 
-\end_layout
-
-\begin_layout Enumerate
-You are not required to accept this License, since you have not signed it.
- However, nothing else grants you permission to modify or distribute the
- Program or its derivative works.
- These actions are prohibited by law if you do not accept this License.
- Therefore, by modifying or distributing the Program (or any work based
- on the Program), you indicate your acceptance of this License to do so,
- and all its terms and conditions for copying, distributing or modifying
- the Program or works based on it.
- 
-\end_layout
-
-\begin_layout Enumerate
-Each time you redistribute the Program (or any work based on the Program),
- the recipient automatically receives a license from the original licensor
- to copy, distribute or modify the Program subject to these terms and conditions.
- You may not impose any further restrictions on the recipients' exercise
- of the rights granted herein.
- You are not responsible for enforcing compliance by third parties to this
- License.
- 
-\end_layout
-
-\begin_layout Enumerate
-If, as a consequence of a court judgment or allegation of patent infringement
- or for any other reason (not limited to patent issues), conditions are
- imposed on you (whether by court order, agreement or otherwise) that contradict
- the conditions of this License, they do not excuse you from the conditions
- of this License.
- If you cannot distribute so as to satisfy simultaneously your obligations
- under this License and any other pertinent obligations, then as a consequence
- you may not distribute the Program at all.
- For example, if a patent license would not permit royalty-free redistribution
- of the Program by all those who receive copies directly or indirectly through
- you, then the only way you could satisfy both it and this License would
- be to refrain entirely from distribution of the Program.
-\newline
-
-\newline
-If any portion of
- this section is held invalid or unenforceable under any particular circumstance
-, the balance of the section is intended to apply and the section as a whole
- is intended to apply in other circumstances.
-\newline
-
-\newline
-It is not the purpose of this
- section to induce you to infringe any patents or other property right claims
- or to contest validity of any such claims; this section has the sole purpose
- of protecting the integrity of the free software distribution system, which
- is implemented by public license practices.
- Many people have made generous contributions to the wide range of software
- distributed through that system in reliance on consistent application of
- that system; it is up to the author/donor to decide if he or she is willing
- to distribute software through any other system and a licensee cannot impose
- that choice.
- 
-\newline
-
-\newline
-This section is intended to make thoroughly clear what is believed to be
- a consequence of the rest of this License.
- 
-\end_layout
-
-\begin_layout Enumerate
-If the distribution and/or use of the Program is restricted in certain countries
- either by patents or by copyrighted interfaces, the original copyright
- holder who places the Program under this License may add an explicit geographic
-al distribution limitation excluding those countries, so that distribution
- is permitted only in or among countries not thus excluded.
- In such case, this License incorporates the limitation as if written in
- the body of this License.
- 
-\end_layout
-
-\begin_layout Enumerate
-The Free Software Foundation may publish revised and/or new versions of
- the General Public License from time to time.
- Such new versions will be similar in spirit to the present version, but
- may differ in detail to address new problems or concerns.
- 
-\newline
-
-\newline
-Each version is given a distinguishing version number.
- If the Program specifies a version number of this License which applies
- to it and ``any later version,'' you have the option of following the terms
- and conditions either of that version or of any later version published
- by the Free Software Foundation.
- If the Program does not specify a version number of this License, you may
- choose any version ever published by the Free Software Foundation.
-\end_layout
-
-\begin_layout Enumerate
-If you wish to incorporate parts of the Program into other free programs
- whose distribution conditions are different, write to the author to ask
- for permission.
- For software which is copyrighted by the Free Software Foundation, write
- to the Free Software Foundation; we sometimes make exceptions for this.
- Our decision will be guided by the two goals of preserving the free status
- of all derivatives of our free software and of promoting the sharing and
- reuse of software generally.
- 
-\end_layout
-
-\begin_deeper
-\begin_layout Subsection*
-\noindent
-NO WARRANTY 
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
- THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
- EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
- PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER
- EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
- YOU.
- SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
- SERVICING, REPAIR OR CORRECTION.
- 
-\end_layout
-
-\begin_layout Enumerate
-IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
- ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
- THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING
- ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
- THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS
- OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
- THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
- EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY
- OF SUCH DAMAGES.
-\end_layout
-
-\begin_layout Section*
-END OF TERMS AND CONDITIONS 
-\end_layout
-
-\begin_layout Subsection*
-How to Apply These Terms to Your New Programs
-\end_layout
-
-\begin_layout Standard
-If you develop a new program, and you want it to be of the greatest possible
- use to the public, the best way to achieve this is to make it free software
- which everyone can redistribute and change under these terms.
- 
-\end_layout
-
-\begin_layout Standard
-To do so, attach the following notices to the program.
- It is safest to attach them to the start of each source file to most effectivel
-y convey the exclusion of warranty; and each file should have at least the
- ``copyright'' line and a pointer to where the full notice is found.
- For example:
-\end_layout
-
-\begin_layout Quote
-One line to give the program's name and a brief idea of what it does.
- Copyright (C) (year) (name of author) 
-\end_layout
-
-\begin_layout Quote
-This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at your option)
- any later version.
- 
-\end_layout
-
-\begin_layout Quote
-This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
- 
-\end_layout
-
-\begin_layout Quote
-You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
-\end_layout
-
-\begin_layout Standard
-Also add information on how to contact you by electronic and paper mail.
- 
-\end_layout
-
-\begin_layout Standard
-If the program is interactive, make it output a short notice like this when
- it starts in an interactive mode: 
-\end_layout
-
-\begin_layout Quote
-Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
- with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it under certain
- conditions; type `show c' for details.
- 
-\end_layout
-
-\begin_layout Standard
-The hypothetical commands `show w' and `show c' should show the appropriate
- parts of the General Public License.
- Of course, the commands you use may be called something other than `show
- w' and `show c'; they could even be mouse-clicks or menu items -- whatever
- suits your program.
- 
-\end_layout
-
-\begin_layout Standard
-You should also get your employer (if you work as a programmer) or your
- school, if any, to sign a ``copyright disclaimer'' for the program, if
- necessary.
- Here is a sample; alter the names: 
-\end_layout
-
-\begin_layout Quote
-Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovisi
-on' (which makes passes at compilers) written by James Hacker.
- 
-\end_layout
-
-\begin_layout Quote
-(signature of Ty Coon)
-\newline
-1 April 2006 
-\newline
-Ty Coon, President of Vice 
-\end_layout
-
-\begin_layout Standard
-This General Public License does not permit incorporating your program into
- proprietary programs.
- If your program is a subroutine library, you may consider it more useful
- to permit linking proprietary applications with the library.
- If this is what you want to do, use the GNU Library General Public License
- instead of this License.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [1]{key-1}
-Olson, P., G.A.
- Glatzmaier (1995), Highly supercritical thermal convection in a rotating
- spherical shell: centrifugal vs.
- radial gravity.
- 
-\emph on
-Geophys.
- Astrophys.
- Fluid Dyn.,
-\series bold
-\emph default
- 
-\series default
-\emph on
-70
-\series bold
-, 
-\series default
-\emph default
-113-136
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [2]{key-2}
-Olson, P., G.A.
- Glatzmaier (1995), Magnetoconvection in a rotating spherical shell: structure
- of flow in the outer core.
-
-\emph on
- Phys.
- Earth Planet Int., 92, 
-\emph default
-109-118
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [3]{key-3}
-Olson, P., G.A.
- Glatzmaier (1996), Magnetoconvection and Thermal Coupling of the Earth's
- Core and Mantle.
- 
-\emph on
-Phil.
- Trans.
- R.
- Soc.
- Lond., A354,
-\emph default
- 1413-1424
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [4]{key-4}
-Olson, P., U.
- Christensen, G.A.
- Glatzmaier (1999), Numerical Modeling of the Geodynamo: Mechanisms of Field
- Generation and Equilibration.
- 
-\emph on
-J.
- Geophys.
- Res., 104
-\emph default
-, 10,383-10,404
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [5]{key-5}
-Christensen, U., P.
- Olson, G.A.
- Glatzmaier (1999), Numerical modelling of the geodynamo: a systematic parameter
- study.
- 
-\emph on
-Geophys.
- J.
- Int., 138
-\emph default
-, 393-409
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [6]{benchmark cases}
-Christensen, et al.
- (2001), A numerical dynamo benchmark.
-
-\emph on
- Phys.
- Earth Planet Int., 128
-\emph default
-, 25-34 (benchmark cases)
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [7]{key-7}
-Olson, P., G.A.
- Glatzmaier (2005), Probing the geodynamo.
- 
-\emph on
-Scientific American 15
-\emph default
-(2)
-\emph on
-, 
-\emph default
-29-35
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem [8]{key-8}
-Christensen, U.R., J.
- Aubert (2006), Scaling properties of convection-driven dynamos in rotating
- spherical shells and application to planetary magnetic fields.
- 
-\emph on
-Geophys J.
- Int.
- 166
-\emph default
-, 97-114.
- 
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem {key-9}
- Backus, G., Parker, R., Constable, C.
- 
-\emph on
-Foundations of Geomagnetism
-\emph default
-, Cambridge University Press, 1996 
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem {key-10}
- Merrill, R.T., McElhinny, M.W., McFadden, P.L.,
-\emph on
- The Magnetic Field of the Earth, Paleomagnetism, the Core, and the Deep
- Mantle
-\emph default
-, Academic Press, 1998 
-\end_layout
-
-\end_body
-\end_document
+#LyX 1.4.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 245
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+\usepackage{hyperref}
+
+\date{\today}
+\let\myUrl\url
+\renewcommand{\url}[1]{(\myUrl{#1})}
+\end_preamble
+\language english
+\inputencoding auto
+\fontscheme default
+\graphics default
+\paperfontsize default
+\spacing single
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 1in
+\secnumdepth 3
+\tocdepth 5
+\paragraph_separation indent
+\defskip medskip
+\quotes_language swedish
+\papercolumns 1
+\papersides 2
+\paperpagestyle headings
+\tracking_changes false
+\output_changes true
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+\noindent
+\align center
+
+\color none
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+thispagestyle{empty}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Standard
+\begin_inset Graphics
+	filename mag-cover.pdf
+	display color
+	width 75page%
+	rotateOrigin centerTop
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Title
+\noindent
+MAG
+\end_layout
+
+\begin_layout Author
+© California Institute of Technology
+\newline
+Peter Olson and Wei Mi
+\newline
+Version 1.0.2
+\end_layout
+
+\begin_layout Date
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+today
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\begin_inset LatexCommand \tableofcontents{}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset FloatList figure
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Part
+Preface
+\end_layout
+
+\begin_layout Chapter*
+Preface
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+raggedbottom
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section*
+About This Document
+\end_layout
+
+\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 MAG version 1.0.2 and its capabilities
+ and proceeds to the details of implementation.
+ Part III provides appendices and references.
+\end_layout
+
+\begin_layout Standard
+The style of this publication is based on the 
+\begin_inset LatexCommand \htmlurl[Apple Publications Style Guide]{developer.apple.com/documentation/UserExperience/Conceptual/APStyleGuide/AppleStyleGuide2003.pdf}
+
+\end_inset
+
+, as recommended by 
+\begin_inset LatexCommand \htmlurl[Python.org]{www.python.org}
+
+\end_inset
+
+.
+ The documentation was produced using 
+\begin_inset LatexCommand \htmlurl[LyX]{www.lyx.org}
+
+\end_inset
+
+ to facilitate the transformation of files from one format to another.
+ LyX is a document processor that encourages an approach to writing based
+ on the structure of your documents, not their appearance.
+ It is released under a Free Software/Open Source license.
+\end_layout
+
+\begin_layout Standard
+Errors and bug fixes in this manual should be directed to the 
+\begin_inset LatexCommand \url[CIG Geodynamo Mailing List]{cig-geodyn at geodynamics.org}
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section*
+Who Will Use This Document
+\end_layout
+
+\begin_layout Standard
+This documentation is aimed at scientists who prefer to use prepackaged
+ and specialized analysis tools.
+ Users are likely to be experienced computational Earth scientists and have
+ familiarity with basic scripting, software installation, and programming;
+ 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 Section*
+Citation
+\end_layout
+
+\begin_layout Standard
+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 Fortran code was donated to CIG in July of 2006.
+ A number of individuals have contributed a significant portion of their
+ 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.
+ 
+\end_layout
+
+\begin_layout Standard
+The MAG development team asks that you cite the following:
+\end_layout
+
+\begin_layout Itemize
+Olson, P., G.A.
+ Glatzmaier (1993), Highly supercritical thermal convection in a rotating
+ spherical shell: centrifugal vs.
+ radial gravity.
+ 
+\emph on
+Geophys.
+ Astrophys.
+ Fluid Dyn.,
+\series bold
+\emph default
+ 
+\series default
+\emph on
+70
+\series bold
+, 
+\series default
+\emph default
+113-136.
+\end_layout
+
+\begin_layout Itemize
+Olson, P., G.A.
+ Glatzmaier (1995), Magnetoconvection in a rotating spherical shell: structure
+ of flow in the outer core.
+
+\emph on
+ Phys.
+ Earth Planet Int., 92, 
+\emph default
+109-118.
+\end_layout
+
+\begin_layout Itemize
+Olson, P., G.A.
+ Glatzmaier (1996), Magnetoconvection and Thermal Coupling of the Earth's
+ Core and Mantle.
+ 
+\emph on
+Phil.
+ Trans.
+ R.
+ Soc.
+ Lond., A354,
+\emph default
+ 1413-1424.
+\end_layout
+
+\begin_layout Itemize
+Christensen, U.R., J.
+ Aubert (2006), Scaling properties of convection-driven dynamos in rotating
+ spherical shells and application to planetary magnetic fields.
+ 
+\emph on
+Geophys J.
+ Int.
+ 166
+\emph default
+, 97-114.
+ 
+\end_layout
+
+\begin_layout Itemize
+Olson, P., U.
+ Christensen, G.A.
+ Glatzmaier (1999), Numerical Modeling of the Geodynamo: Mechanisms of Field
+ Generation and Equilibration.
+ 
+\emph on
+J.
+ Geophys.
+ Res., 104
+\emph default
+, 10,383-10,404.
+\end_layout
+
+\begin_layout Itemize
+Christensen, U., P.
+ Olson, G.A.
+ Glatzmaier (1999), Numerical modelling of the geodynamo: a systematic parameter
+ study.
+ 
+\emph on
+Geophys.
+ J.
+ Int., 138
+\emph default
+, 393-409.
+\end_layout
+
+\begin_layout Itemize
+Christensen, et al.
+ (2001), A numerical dynamo benchmark.
+
+\emph on
+ Phys.
+ Earth Planet Int., 128
+\emph default
+, 25-34 (benchmark cases).
+\end_layout
+
+\begin_layout Standard
+[Note: there are more recent papers by the same authors.] The developers
+ also request that in your oral presentations and in your paper acknowledgements
+ that you indicate your use of this code, the authors of this code (G.
+ Glatzmaier, U.
+ Christensen, P.
+ Olson), and 
+\begin_inset LatexCommand \htmlurl[CIG]{geodynamics.org}
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section*
+Support
+\end_layout
+
+\begin_layout Standard
+MAG development was funded by grants from NASA HPC and NSF Geophysics.
+ Continued support of MAG is made possible under NSF EAR-0406751.
+\end_layout
+
+\begin_layout Part
+Chapters
+\end_layout
+
+\begin_layout Chapter
+Introduction
+\end_layout
+
+\begin_layout Standard
+Dynamo codes represent a powerful new tool for the quantitative study of
+ a broad range of geophysical processes, ranging from short time-scale phenomena
+ such as magnetic variations, rotational variations, and flow in the core,
+ to long-term phenomena such as magnetic excursions, reversals, superchrons,
+ and the evolution of the core and its thermal and chemical interaction
+ with the mantle.
+ The primary objective of CIG in this area is to provide the Earth Science
+ community with robust, reliable, efficient, flexible, state-of-the-art
+ numerical codes for modeling dynamo processes in the Earth's core and in
+ the interiors of other planets.
+ Another CIG objective is to support graphical- and user-interfaces for
+ these codes that allow Earth scientists to analyze, display, and interpret
+ dynamo code results, and to compare results from the various codes that
+ we support, as well as with geomagnetic, space magnetic, and paleomagnetic
+ data.
+ 
+\end_layout
+
+\begin_layout Section
+About MAG
+\end_layout
+
+\begin_layout Standard
+MAG is a serial version of Gary Glatzmaier's rotating spherical convection/magne
+toconvection/dynamo code, modified by Uli Christensen and Peter Olson.
+ The code solves the non-dimensional Boussinesq equations for time-dependent
+ thermal convection in a rotating spherical shell filled with an electrically
+ conducting fluid.
+ The equations of motion are: the Navier-Stokes equation including Coriolis,
+ Lorentz, Buoyancy, pressure, viscous, and inertial terms; the heat equation
+ including advection, diffusion, and uniform-density heat sources; the continuit
+y equation for velocity and Gauss' law for magnetic field; and the induction
+ equation for the magnetic field.
+\end_layout
+
+\begin_layout Standard
+All variables are non-dimensional (see Appendix 
+\begin_inset LatexCommand \ref{cha:Variables-used-in}
+
+\end_inset
+
+); time scale is viscous diffusion, length scale is shell thickness, temperature
+ scale is boundary temperature difference, magnetic field and electric currents
+ use Elsasser number scaling.
+ A variety of boundary and initial conditions has been selected as options.
+\end_layout
+
+\begin_layout Standard
+Mag uses toroidal-poloidal decomposition for velocity and magnetic field
+ with explicit time steps.
+ Linear terms are evaluated spectrally (spherical harmonics plus Chebyshev
+ polynomials in radius) and nonlinear terms are evaluated on a spherical
+ grid.
+\end_layout
+
+\begin_layout Standard
+Additional technical information is found in 
+\begin_inset LatexCommand \cite{key-1}
+
+\end_inset
+
+-
+\begin_inset LatexCommand \cite{key-8}
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section
+Governing Equations
+\end_layout
+
+\begin_layout Standard
+MAG solves the following non-dimensional Boussinesq magnetohydrodynamics
+ equations for dynamo action due to thermal convection of an electrically
+ conducting fluid in a rotating spherical shell (e.g., Olson et al.
+ 1999)
+\begin_inset LatexCommand \cite{key-5}
+
+\end_inset
+
+.
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\mathbf{\mathit{E}}\left(\frac{\partial\boldsymbol{u}}{\partial t}+\boldsymbol{u}\cdot\nabla\boldsymbol{u}-\nabla^{2}\boldsymbol{u}\right)+2\hat{z}\times\boldsymbol{u}+\nabla P=Ra\frac{r}{r_{o}}T+\frac{1}{Pm}\left(\nabla\times\boldsymbol{B}\right)\times\boldsymbol{B}\label{eq:1}\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\frac{\partial\boldsymbol{B}}{\partial t}=\nabla\times\left(\boldsymbol{u}\times\boldsymbol{B}\right)+\frac{1}{Pm}\nabla^{2}\boldsymbol{B}\label{eq:2}\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\frac{\partial T}{\partial t}+\boldsymbol{u}\cdot\nabla T=\frac{1}{Pr}\nabla^{2}T+\epsilon\label{eq:3}\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\nabla\cdot\boldsymbol{u}=0,\,\,\,\nabla\cdot\boldsymbol{B}=0\label{eq:4}\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+where 
+\emph on
+u
+\emph default
+ is the velocity, 
+\emph on
+B
+\emph default
+ is the magnetic field, 
+\emph on
+T
+\emph default
+ is temperature, 
+\emph on
+t
+\emph default
+ is time, 
+\begin_inset Formula $\hat{z}$
+\end_inset
+
+ is a unit vector in the direction of the rotation axis, 
+\emph on
+P
+\emph default
+ is pressure, and 
+\emph on
+r
+\emph default
+ is the position vector in the spherical coordinates 
+\begin_inset Formula $r\theta\phi$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+Four basic non-dimensional parameters in 
+\begin_inset LatexCommand \ref{eq:1}
+
+\end_inset
+
+ - 
+\begin_inset LatexCommand \ref{eq:4}
+
+\end_inset
+
+ control the dynamo action.
+ The Rayleigh number represents the strength of buoyancy force driving the
+ convection
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+Ra=\frac{\alpha g_{0}\Delta TD^{3}}{\nu\kappa}\label{eq:5}\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+where 
+\begin_inset Formula $\alpha$
+\end_inset
+
+ is thermal expansivity, 
+\begin_inset Formula $g_{0}$
+\end_inset
+
+ is gravitational acceleration on the outer boundary at radius R, 
+\begin_inset Formula $\Delta T$
+\end_inset
+
+ is the temperature difference between the inner and outer boundaries, 
+\emph on
+D
+\emph default
+ is shell thickness, 
+\begin_inset Formula $\nu$
+\end_inset
+
+ is kinematic viscosity, and 
+\begin_inset Formula $\kappa$
+\end_inset
+
+ is thermal diffusivity.
+ The Ekman number represents the ratio of viscous and Coriolis forces
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+E=\frac{\nu}{\Omega D^{2}}\label{eq:6}\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+Here 
+\begin_inset Formula $\Omega$
+\end_inset
+
+ is rotation rate.
+ The Prandtl number is the ratio of kinematic viscosity to thermal diffusivity
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+Pr=\frac{\nu}{\kappa}\label{eq:7}\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+and the magnetic Prandtl number is the ratio of kinematic viscosity to magnetic
+ diffusivity 
+\begin_inset Formula $\lambda$
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+P_{m}=\frac{\nu}{\lambda}\label{eq:8}\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+An additional (optional) control parameter is the non-dimensional volumetric
+ heat source (or heat sink) strength 
+\begin_inset Formula $\epsilon$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Chapter
+Installation and Getting Help
+\end_layout
+
+\begin_layout Section
+Introduction
+\end_layout
+
+\begin_layout Standard
+To test run MAG, download the source package (in the form of a compressed
+ 
+\family typewriter
+tar
+\family default
+ file) from the 
+\begin_inset LatexCommand \htmlurl[Geodynamics Software Packages web page]{geodynamics.org/cig/software/packages}
+
+\end_inset
+
+.
+ After unpacking the source, use the 
+\family typewriter
+make
+\family default
+ utility to build MAG from source, and background execute MAG with the provided
+ benchmark 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,
+ instead of using the prepared source package.
+ See Section 
+\begin_inset LatexCommand \ref{sec:Software-Repository}
+
+\end_inset
+
+ later in this chapter.
+ MAG has been tested on Linux, Mac OS X, and Windows.
+\end_layout
+
+\begin_layout Section
+Getting Help
+\end_layout
+
+\begin_layout Standard
+For help, send e-mail to the 
+\begin_inset LatexCommand \url[CIG Geodynamo Mailing List]{cig-geodyn at geodynamics.org}
+
+\end_inset
+
+.
+ You can subscribe to the Mailing List and view archived discussion at 
+\begin_inset LatexCommand \htmlurl[Geodynamics Mail Lists]{geodynamics.org/cig/lists}
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section
+System Requirements
+\end_layout
+
+\begin_layout Standard
+MAG requires the following:
+\end_layout
+
+\begin_layout Itemize
+A Fortran compiler, g77 or gFortran.
+\end_layout
+
+\begin_layout Itemize
+For Windows you need to install 
+\begin_inset LatexCommand \htmlurl[cygwin]{cygwin.com}
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Section
+Downloading and Unpacking Source
+\end_layout
+
+\begin_layout Standard
+Download MAG from the 
+\begin_inset LatexCommand \htmlurl[Geodynamics website]{geodynamics.org}
+
+\end_inset
+
+.
+ Click the ``software'' tab at the top of the page.
+ Then click ``Software Packages'' and then ``Geodynamo.'' Once you click
+ the MAG link, download the source archive and unpack it using the 
+\family typewriter
+tar
+\family default
+ command:
+\end_layout
+
+\begin_layout LyX-Code
+$ tar xzf MAG-1.0.2.tar.gz
+\end_layout
+
+\begin_layout Standard
+If you don't have GNU Tar, try the following command instead: 
+\end_layout
+
+\begin_layout LyX-Code
+$ gunzip -c MAG-1.0.2.tar.gz | tar xf -
+\end_layout
+
+\begin_layout Section
+Installation Procedure
+\end_layout
+
+\begin_layout Subsection
+\begin_inset LatexCommand \label{sub:MAG-file-structure}
+
+\end_inset
+
+MAG File Structure
+\end_layout
+
+\begin_layout Standard
+After unpacking the source, you will find the following directories:
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+~/src
+\family default
+ Contains the set of FORTRAN source code files with suffix ``
+\family typewriter
+.f
+\family default
+.'' This includes sample grid parameter value files with names like 
+\family typewriter
+\size small
+param32s4.f
+\family default
+\size default
+ for a coarse grid (up to 32 spherical harmonics, 24 radial grid intervals,
+ and 4-fold symmetry in 
+\begin_inset Formula $\phi$
+\end_inset
+
+).
+ A makefile named 
+\family typewriter
+\size small
+makefile
+\family default
+\size default
+.
+ Sample files with input parameters, 
+\family typewriter
+\size small
+par.XXX
+\family default
+\size default
+.
+ The case 
+\family typewriter
+\size small
+par.bnch0
+\family default
+\size default
+ is for rotating convection at an Ekman number of 1E-3, starting from a
+ conductive temperature perturbation with imposed perturbation with l=4,
+ m=4, and running for a short time.
+ This is the ``benchmark0'' test case in Christensen et al., 2001
+\begin_inset LatexCommand \cite{benchmark cases}
+
+\end_inset
+
+.
+ Another input file is 
+\family typewriter
+\size small
+par.bnch1
+\family default
+\size default
+, the dynamo ``benchmark1'' case in Christensen et al.
+ 
+\begin_inset LatexCommand \cite{benchmark cases}
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+~/doc
+\family default
+ The directory where you will find this manual and other documentation files.
+ 
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+~/bench-data
+\family default
+ Contains output files 
+\family typewriter
+\size small
+ls.benchX
+\family default
+\size default
+, 
+\family typewriter
+\size small
+l.benchX
+\family default
+\size default
+, 
+\family typewriter
+\size small
+g.benchx
+\family default
+\size default
+, and 
+\family typewriter
+\size small
+d.benchx
+\family default
+\size default
+ obtained with short runs of benchmark0 and benchmark1 on a Linux workstation.
+ Explanations of the contents of these files are found in Appendix 
+\begin_inset LatexCommand \ref{cha:MAG-Output-File}
+
+\end_inset
+
+.
+ These data files can be used for comparison with the result obtained by
+ your local run of MAG.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+~/rev-data
+\family default
+ Contains output files from runs of the reversal dynamo case; movie files
+ are also included.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+~/idl
+\family default
+ This is where the postprocessing IDL (Interactive Data Language) routines
+ reside.
+\end_layout
+
+\begin_layout Subsection
+\begin_inset LatexCommand \label{sub:Prepare-MAG-for}
+
+\end_inset
+
+Prepare MAG for Running
+\end_layout
+
+\begin_layout Enumerate
+First you need to create a path for execution of 
+\family typewriter
+\size small
+magx
+\family default
+\size default
+ (below is an example; use your path):
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+printenv PATH $ PATH=$PATH:/your_mag_dir_path $ export PATH
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Compile the program using 
+\family typewriter
+make
+\family default
+ in the source directory, which by default uses the existing 
+\family typewriter
+\size small
+param.f 
+\family default
+\size default
+grid and symmetry 
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+$ make 
+\end_layout
+
+\begin_layout Standard
+Note that makefile uses -g77 or other Fortran compiler, and creates executables,
+ either 
+\family typewriter
+\size small
+magx
+\family default
+\size default
+ (default) or 
+\family typewriter
+\size small
+magxYYsZ
+\family default
+\size default
+, where 
+\family typewriter
+\size small
+YY
+\family default
+\size default
+=spherical harmonic truncation and 
+\family typewriter
+\size small
+Z
+\family default
+\size default
+=longitudinal symmetry.
+ 
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+To delete all the object files and executables, type:
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+$ make clean
+\end_layout
+
+\end_deeper
+\begin_layout Section
+\begin_inset LatexCommand \label{sec:Software-Repository}
+
+\end_inset
+
+Installing from the Software Repository
+\end_layout
+
+\begin_layout Standard
+The MAG source code is available via a Subversion server at the 
+\begin_inset LatexCommand \htmlurl[Geodynamics website]{geodynamics.org}
+
+\end_inset
+
+.
+ This allows users to view the revision history of the code, and check out
+ the most recent development version of the software.
+\end_layout
+
+\begin_layout Quote
+
+\series bold
+NOTE: 
+\series default
+If you are content with the prepared source package, you may skip this section.
+\end_layout
+
+\begin_layout Subsection
+Tools You Will Need
+\end_layout
+
+\begin_layout Standard
+In addition to the usual system requirements, you must have a Subversion
+ client installed in order to work with the source from the CIG software
+ repository.
+ To check whether you have a subversion client installed on your machine,
+ type:
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+$ svn help
+\family default
+ 
+\end_layout
+
+\begin_layout Standard
+It should return a usage message.
+ For more information on Subversion, visit the 
+\begin_inset LatexCommand \htmlurl[Subversion website]{subversion.tigris.org}
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Subsection
+Download Source from Subversion
+\end_layout
+
+\begin_layout Standard
+To check out the latest version of the software, use the 
+\family typewriter
+svn checkout
+\family default
+ command:
+\end_layout
+
+\begin_layout LyX-Code
+$ svn checkout http://geodynamics.org/svn/cig/geodyn/3D/MAG/trunk MAG
+\end_layout
+
+\begin_layout Standard
+where 
+\begin_inset Quotes sld
+\end_inset
+
+MAG
+\begin_inset Quotes srd
+\end_inset
+
+ is the directory created with the file structure mentioned in 
+\begin_inset LatexCommand \ref{sub:MAG-file-structure}
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Chapter
+Running MAG
+\end_layout
+
+\begin_layout Section
+Using MAG
+\end_layout
+
+\begin_layout Standard
+For test-running the code, perform the following steps:
+\end_layout
+
+\begin_layout Enumerate
+Uncompress all files, and create a path (see 
+\begin_inset LatexCommand \ref{sub:Prepare-MAG-for}
+
+\end_inset
+
+) 
+\end_layout
+
+\begin_layout Enumerate
+Link the grid parameter file to 
+\family typewriter
+\size small
+param.f
+\family default
+\size default
+,
+\begin_inset Foot
+status collapsed
+
+\begin_layout Standard
+To change grids or symmetry (in 
+\family typewriter
+\size small
+param.f
+\family default
+\size default
+), MAG needs to be recompiled.
+ The code looks for 
+\family typewriter
+\size small
+param.f
+\family default
+\size default
+, which needs to be changed for remaking.
+ Examples of 
+\family typewriter
+\size small
+param.f 
+\family default
+\size default
+are 
+\family typewriter
+\size small
+param32s6.f
+\family default
+\size default
+ and 
+\family typewriter
+\size small
+param32s4.f
+\family default
+\size default
+.
+ 
+\end_layout
+
+\end_inset
+
+ which enters into most subroutines through ``include'' statements.
+ For example, a grid parameter file named 
+\family typewriter
+\size small
+param32f4.f
+\family default
+\size default
+ (32 spherical harmonics truncation degree, longitude symmetry is 4) is
+ linked using
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+$ ln -sf param32s4.f param.f 
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Compile the program with:
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+$ make
+\end_layout
+
+\begin_layout LyX-Code
+$ mv magx magx32s4 
+\family roman
+\size small
+(Renaming is optional)
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+MAG uses a standard input file.
+ Background execute using 
+\family typewriter
+\size small
+par.XXX
+\family default
+\size default
+ as the input file and 
+\family typewriter
+\size small
+.YYY
+\family default
+\size default
+ as the output file's extension:
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+$ magx32s4 <par.XXX >p.YYY &
+\end_layout
+
+\begin_layout Standard
+For running with the benchmark input files (
+\family typewriter
+\size small
+par.bnch0
+\family default
+\size default
+ or 
+\family typewriter
+\size small
+par.bnch1
+\family default
+\size default
+) , the execution statement should be:
+\end_layout
+
+\begin_layout LyX-Code
+$ magx32s4 <par.bnch0 >p.bench0 &
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+If there is a problem with the input file list, it is often the final three
+ lines; with some systems, a ``
+\family typewriter
+\size small
+$
+\family default
+\size default
+'' may be required at the end.
+\end_layout
+
+\begin_layout Enumerate
+MAG produces a series of output files.
+ For example, when using input file 
+\family typewriter
+\size small
+par.bnch0
+\family default
+\size default
+ (the example in step 4) MAG generates: 
+\family typewriter
+l.bench0,
+\family default
+\size small
+ 
+\family typewriter
+\size default
+ls.bench0, g[i].bench0 
+\family default
+and 
+\family typewriter
+d[i].bench0
+\family default
+, where i=0,1,2...9.
+ See Appendix 
+\begin_inset LatexCommand \ref{cha:MAG-Output-File}
+
+\end_inset
+
+ for details on MAG's output files.
+ Compare your output files with the data provided in the directory 
+\family typewriter
+\size small
+~/bench-data/data_bench0
+\family default
+\size default
+.
+\end_layout
+
+\begin_layout Quote
+
+\color red
+Warning:
+\color none
+ You must delete, move, or rename all of the output files in the current
+ directory before re-running with the same ``output'' filename.
+ 
+\series bold
+Retaining same-named output files in the current directory causes MAG to
+ crash.
+ 
+\end_layout
+
+\begin_layout Section
+Changing Parameters
+\end_layout
+
+\begin_layout Standard
+Physical and time-step parameters can be changed in the par-file namelist
+ without re-compiling MAG.
+ See Appendix B for a list of the input parameter names and definitions.
+ Grid parameters must be changed in 
+\family typewriter
+\size small
+param.f
+\family default
+\size default
+ and MAG must be then re-compiled.
+ There are some numerical restrictions on the grid parameter combinations,
+ which are given in Appendix A.
+ 
+\end_layout
+
+\begin_layout Chapter
+\begin_inset LatexCommand \label{cha:Postprocessing-and-Graphics}
+
+\end_inset
+
+Postprocessing and Graphics
+\end_layout
+
+\begin_layout Section
+Introduction
+\end_layout
+
+\begin_layout Standard
+Once you finish running MAG, you should have a series of output data files.
+ To visualize your results, the MAG software package provides a set of IDL
+ routines found in the directory called 
+\family typewriter
+PREFIX/idl
+\family default
+, where 
+\family typewriter
+PREFIX
+\family default
+ is the directory under which you installed MAG.
+ We should mention here that IDL is a commercial visualization tool by 
+\begin_inset LatexCommand \htmlurl[ITT Visual Information Solutions]{www.ittvis.com/idl}
+
+\end_inset
+
+.
+ A free IDL compatible program called 
+\begin_inset LatexCommand \htmlurl[GDL]{gnudatalanguage.sourceforge.net}
+
+\end_inset
+
+ works with MAG's line plot IDL procedure 
+\family typewriter
+\size small
+MAGTS.pro
+\family default
+\size default
+, but not with the interactive IDL procedures in MAG.
+\end_layout
+
+\begin_layout Section
+Time Series and Spectra Plots
+\end_layout
+
+\begin_layout Standard
+Procedures 
+\family typewriter
+\size small
+MAGTS.pro
+\family default
+\size default
+ and 
+\family typewriter
+\size small
+MAGXY.pro
+\family default
+\size default
+ take data from l-files generated by MAG and create time series plots and
+ statistics.
+ This version reads an l-file consisting of 17 time series, the first record
+ being dimensionless time (see Appendix 
+\begin_inset LatexCommand \ref{cha:MAG-Output-File}
+
+\end_inset
+
+ for details on output file format).
+ Energies and rms magnetic field and velocity are scaled as in MAG; tilt
+ is dipole vector colatitude; pole longitude is dipole vector longitude.
+ Figures 
+\begin_inset LatexCommand \ref{fig:Time-series-plot}
+
+\end_inset
+
+ and 
+\begin_inset LatexCommand \ref{fig:Spectra-plot-of}
+
+\end_inset
+
+ show the energy time series plot and spectra plot from a time-dependent
+ dynamo.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Graphics
+	filename images/F6en.eps
+	scale 90
+	BoundingBox 30bp 10bp 492bp 505bp
+	rotateOrigin center
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Caption
+\begin_inset LatexCommand \label{fig:Time-series-plot}
+
+\end_inset
+
+Time series plot of energy
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Graphics
+	filename images/F6spct.ps
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Caption
+\begin_inset LatexCommand \label{fig:Spectra-plot-of}
+
+\end_inset
+
+Spectra plot of a time depentant dynamo
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Interactive IDL Procedures 
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+\size small
+MAGSYM.pro
+\family default
+\size default
+ is an interactive procedure display which results from a g-file produced
+ by MAG.
+ This version uses modified IDL color tables and assumes formatted input.
+ It creates either postscript 
+\family typewriter
+\size small
+.ps
+\family default
+\size default
+ or 
+\family typewriter
+\size small
+.gif
+\family default
+\size default
+ files.
+ If other output file formats are required, you must modify ``LABELOUT.''
+ MAGSYM has many plot options: map, closeup, equator, slice, etc.
+ Producing each plot is straightforward and accomplished by choosing from
+ the option menu.
+ Figure 
+\begin_inset LatexCommand \ref{fig:IDL-figure-with}
+
+\end_inset
+
+ is plotted with the map option.
+ 
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Graphics
+	filename images/map.jpeg
+	lyxscale 30
+	scale 30
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Caption
+\begin_inset LatexCommand \label{fig:IDL-figure-with}
+
+\end_inset
+
+IDL figure with Map option
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+MAGVOL.pro is another interactive IDL procedure to display volume results
+ from rotating convection, magnetoconvection and dynamo calculations (written
+ by P.
+ Olson).
+ It uses g-files produced by MAG (some longitudinal symmetry may be assumed
+ in the g-file).
+ This version uses modified IDL color tables and assumes formatted or unformatte
+d input (it asks for 
+\family typewriter
+\size small
+.gif
+\family default
+\size default
+ but creates 
+\family typewriter
+.jpg
+\family default
+ files); if other output file formats are required, modifications of ``labelout'
+' are required.
+ This version assumes x-window screen graphics; for other graphics devices,
+ change the 
+\family typewriter
+set_plot
+\family default
+,'
+\family typewriter
+x
+\family default
+' and 
+\family typewriter
+tvrd()
+\family default
+ commands accordingly.
+ MAGVOL procedure creates volume-rendered images of temperature, helicity,
+ the z-component of vorticity, kinetic and magnetic energy, joule heating,
+ work by Lorentz forces and buoyancy forces.
+ Figure 
+\begin_inset LatexCommand \ref{fig:Kinetic-energy-(yellow)}
+
+\end_inset
+
+ shows a plot of kinetic energy and magnetic energy obtained from a numerical
+ dynamo model.
+ 
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Standard
+\align center
+\begin_inset Graphics
+	filename images/MKenergy.gif
+	lyxscale 50
+	scale 40
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Caption
+\begin_inset LatexCommand \label{fig:Kinetic-energy-(yellow)}
+
+\end_inset
+
+Kinetic energy (yellow) and Magnetic energy (blue) plot by the MAGVOL procedure
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Chapter
+Examples
+\end_layout
+
+\begin_layout Standard
+Included in this chapter are two benchmark cases and a reversal dynamo case.
+ We will present the cases with their input parameters and a typical run
+ of the case with output data analysis.
+\end_layout
+
+\begin_layout Section
+Benchmark Cases 
+\end_layout
+
+\begin_layout Standard
+Historically, these are the cases defined in the benchmark study published
+ in the 2001 paper by Christensen et al.
+ 
+\begin_inset LatexCommand \cite{benchmark cases}
+
+\end_inset
+
+.
+ Case 0 is a benchmark of rotating non-magnetic convection.
+ Case 1 is a dynamo with an insulating inner core co-rotating with the outer
+ boundary.
+ The regions outside the fluid shell are electrical insulators and the magnetic
+ field on the boundaries matches with appropriate potential fields in the
+ exterior that imply no external sources of the field.
+ 
+\end_layout
+
+\begin_layout Standard
+In both cases the Ekman number is 
+\begin_inset Formula $E=10$
+\end_inset
+
+
+\begin_inset Formula $^{-3}$
+\end_inset
+
+ and the Prandtl number is 
+\begin_inset Formula $Pr=1$
+\end_inset
+
+.
+ The Rayleigh number is set to 
+\begin_inset Formula $Ra=100000$
+\end_inset
+
+.
+ Note that the definition of the Rayleigh number differs from the one in
+ the published cases 
+\begin_inset LatexCommand \cite{benchmark cases}
+
+\end_inset
+
+ by a factor of Ekman number 
+\begin_inset Formula $E,$
+\end_inset
+
+ i.e., 
+\begin_inset Formula $Ra=\frac{Ra}{E}$
+\end_inset
+
+.
+\begin_inset LatexCommand \cite{benchmark cases}
+
+\end_inset
+
+ The magnetic Prandtl number is zero in the non-magnetic convection case
+ 0, and is 
+\begin_inset Formula $Pm=5$
+\end_inset
+
+ in case 1.
+ The spherical harmonic expansion is truncated at degree 
+\begin_inset Formula $lmax=32$
+\end_inset
+
+ and a four-fold symmetry is assumed in the longitudinal direction (
+\family typewriter
+param.f
+\family default
+ should be linked to 
+\family typewriter
+param32s4.f
+\family default
+ when you compile MAG).
+ The input parameter files are 
+\family typewriter
+par.bench0
+\family default
+ for case 0 and 
+\family typewriter
+par.bench1
+\family default
+ in case 1; both files reside in the 
+\family typewriter
+~/src
+\family default
+ directory.
+\end_layout
+
+\begin_layout Standard
+The output files of the benchmark cases are stored in the directory 
+\family typewriter
+~/bench-data/data_bench0
+\family default
+ and 
+\family typewriter
+~/bench-data/data-bench1
+\family default
+ respectively.
+ In the following table we see the solutions from MAG agree with the benchmark
+ suggested value with a small difference margin.
+ In both case 0 and case 1, the values listed were obtained with low resolution
+ and a relatively short run of MAG.
+ 
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="7" columns="5">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Case 0 Suggested Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Mag Case 0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Case 1 Suggested Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Mag Case 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
+\begin_inset Formula $E_{kin}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $58.348\pm0.050$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $58.35$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $30.733\pm0.020$
+\end_inset
+
+
+\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_inset Formula $30.72$
+\end_inset
+
+
+\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
+\begin_inset Formula $E_{mag}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $ $
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $626.41\pm0.40$
+\end_inset
+
+
+\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_inset Formula $627.15$
+\end_inset
+
+
+\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
+\begin_inset Formula $T$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $0.42812\pm0.00012$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $0.37338\pm0.00040$
+\end_inset
+
+
+\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
+\begin_inset Formula $\mu_{\phi}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $-10.1571\pm0.0020$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $-10.80$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $-7.6250\pm0.0060$
+\end_inset
+
+
+\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_inset Formula $-7.84$
+\end_inset
+
+
+\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
+\begin_inset Formula $B_{\theta}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $-4.9289\pm0.0060$
+\end_inset
+
+
+\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
+\begin_inset Formula $\omega$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $0.1824\pm0.0050$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $-3.1017\pm0.0040$
+\end_inset
+
+
+\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
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Section
+Reversal Dynamo Case
+\end_layout
+
+\begin_layout Standard
+In this example, we produce a magnetic field reversal using MAG.
+ The input parameter in the source directory for this case is 
+\family typewriter
+~/src/par.Rev
+\family default
+.
+ There is no longitudinal symmetry in this case, so when you compile MAG,
+ use 
+\family typewriter
+param32s1.f
+\family default
+ linking to 
+\family typewriter
+param.f
+\family default
+.
+ The Ekman number is 
+\begin_inset Formula $E=0.02$
+\end_inset
+
+, the Prandtl number is 
+\begin_inset Formula $Pr=1$
+\end_inset
+
+ and the magnetic Prandtl number is 
+\begin_inset Formula $Pm=10$
+\end_inset
+
+.
+ The Rayleigh number is 
+\begin_inset Formula $Ra=12000$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection
+Results and Discussions
+\end_layout
+
+\begin_layout Standard
+This case has run on 32-bit and 64-bit Intel processors.
+ Figure 
+\begin_inset LatexCommand \ref{fig:Field-Plot1}
+
+\end_inset
+
+ shows a plot of mean velocity Vrms, mean magnetic field Brms, the axial
+ dipole and the dipole tilt on the outer boundary.
+ It indicated a magnetic field reversal between time steps 25 and 30.
+ Figure 
+\begin_inset LatexCommand \ref{fig:Field-Plot2}
+
+\end_inset
+
+ shows a longer run of MAG, where we see the magnetic field reversed again.
+ At this time, the magnetic field had weakened substantially.
+ In Figure 
+\begin_inset LatexCommand \ref{fig:The-pole}
+
+\end_inset
+
+, the top is the pole plot before the second field reversal and the bottom
+ is the pole plot after the second field reversal.
+ 
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement h
+wide false
+sideways false
+status open
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Graphics
+	filename images/field-64.ps
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Caption
+\begin_inset LatexCommand \label{fig:Field-Plot1}
+
+\end_inset
+
+Field Plot for Reversal Dynamo Case
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Graphics
+	filename images/field-64-revR.ps
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Caption
+\begin_inset LatexCommand \label{fig:Field-Plot2}
+
+\end_inset
+
+ Field Plot for Reversal Dynamo Case (longer run)
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Graphics
+	filename images/g1revR.ps
+	lyxscale 50
+	scale 40
+	clip
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Graphics
+	filename images/g7revR.ps
+	lyxscale 50
+	scale 40
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Caption
+\begin_inset LatexCommand \label{fig:The-pole}
+
+\end_inset
+
+Magnetic Field Pole Plot.
+ The top is the pole plot at the begining of the second field reversal;
+ the bottom is the pole plot at the end of the second field reversal.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Creating a Reversal Dynamo Movie
+\end_layout
+
+\begin_layout Subsubsection
+Generating Movie Files
+\end_layout
+
+\begin_layout Standard
+MAG has the function to record a movie.
+ The input paramter 
+\family typewriter
+\size small
+imovopt
+\family default
+\size default
+ gives the option to write 
+\begin_inset Formula $B_{r}$
+\end_inset
+
+ at the outer surface, the output file is produced with prefix ``
+\family typewriter
+\size small
+mm.
+\family default
+\size default
+'' when 
+\family typewriter
+\size small
+imovopt=100
+\family default
+\size default
+ or the digit at the hundreds is larger than zero.
+ For our reversal dynamo case we examine the field plot and decide to record
+ the first field reversal.
+ As shown the figure 
+\begin_inset LatexCommand \ref{fig:Interval-to-record}
+
+\end_inset
+
+, we pick the time interval to generate the movie file.
+ The input parameter for movie recording is in 
+\family typewriter
+\size small
+~/src/par.revRmv
+\family default
+\size default
+.
+ We choose restart file d5 as our starting point, and set to record the
+ movie at time 
+\begin_inset Formula $t=22$
+\end_inset
+
+.
+ This records 400 frames over an 8 time unit.
+ The sample output files are in 
+\family typewriter
+\size small
+~/rev-data
+\family default
+\size default
+.
+ 
+\end_layout
+
+\begin_layout Standard
+This version of MAG provides an IDL routine 
+\family typewriter
+\size small
+magmovieCIG.pro
+\family default
+\size default
+ (
+\family typewriter
+\size small
+~/idl/magmovieCIG.pro
+\family default
+\size default
+), it reads in the movie file 
+\family typewriter
+\size small
+mm.
+
+\family default
+\size default
+ and displays the magnetic field at the outer surface.
+ This procedure can also create JPG files of the movie-frame images.
+ Figure 
+\begin_inset LatexCommand \ref{fig:a:-first-frame}
+
+\end_inset
+
+ shows the first and the last frames of the reversal dynamo movie.
+ 
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Graphics
+	filename images/ex3fp.eps
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Caption
+\begin_inset LatexCommand \label{fig:Interval-to-record}
+
+\end_inset
+
+Interval to record movie
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Graphics
+	filename images/revmv006.JPG
+	lyxscale 45
+	scale 45
+
+\end_inset
+
+\InsetSpace ~
+\InsetSpace ~
+
+\begin_inset Graphics
+	filename images/revmv398.JPG
+	lyxscale 45
+	scale 45
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Caption
+\begin_inset LatexCommand \label{fig:a:-first-frame}
+
+\end_inset
+
+ Reversal Dynamo Movie.
+ Left: first frame of movie; right: last frame of movie
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Creating MPEGs with IDL
+\end_layout
+
+\begin_layout Standard
+IDL provides an IDLgrMPEG class that allows the user to save an array of
+ image frames as an MPEG movie.
+ See the 
+\begin_inset LatexCommand \htmlurl[IDL Reference Guide]{www.rsinc.com/idl/pdfs/refguide.pdf}
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+The MPEG_PUT procedure stores the specified image array at a specified frame
+ index in an MPEG sequence.
+ The MPEG_SAVE procedure encodes and saves an open MPEG sequence.
+ The images can be read using the READ_IMAGE function.
+\end_layout
+
+\begin_layout Standard
+The module 
+\family typewriter
+\size small
+mpg.pro
+\family default
+\size default
+ reads a sequence of images (named 
+\family typewriter
+\size small
+prefix00001.suffix
+\family default
+\size default
+) and produces an MPEG1 or MPEG2 movie.
+ Supported formats are BMP, GIF, JPEG, PNG, PPM, SRF, TIFF, and DICOM.
+ 
+\family typewriter
+\size small
+mpg.pro
+\family default
+\size default
+ runs with the following parameters:
+\end_layout
+
+\begin_layout Description
+prefix string (required).
+ A string specifying the prefix of the images to read included the path,
+ e.g., ``
+\family typewriter
+\size small
+/home/data/images/Image
+\family default
+\size default
+''
+\end_layout
+
+\begin_layout Description
+suffix string (required).
+ A string specifying the suffix of the images to read, e.g., ``
+\family typewriter
+\size small
+jpg
+\family default
+\size default
+''
+\end_layout
+
+\begin_layout Description
+n_start integer (required).
+ An integer specifying the first image in the sequence
+\end_layout
+
+\begin_layout Description
+n_end integer (required).
+ An integer specifying the last image in the sequence
+\end_layout
+
+\begin_layout Description
+digits integer (required).
+ An integer specifying the number of digits of the number field in the sequence,
+ e.g., 
+\family typewriter
+\size small
+image00001.jpg
+\family default
+\size default
+ would require digits=5
+\end_layout
+
+\begin_layout Description
+dims integer (optional).
+ An integer array specifying the size of the output image; if not specified
+ the size of the first image is used
+\end_layout
+
+\begin_layout Description
+format integer (optional).
+ An integer with values 0 for MPEG1 and 1 for MPEG2 (default is MPEG1)
+\end_layout
+
+\begin_layout Description
+frame_rate integer (optional).
+ An integer with values
+\end_layout
+
+\begin_layout LyX-Code
+1 = 23.976 frames/sec: NTSC encapsulated film rate
+\end_layout
+
+\begin_layout LyX-Code
+2 = 24 frames/sec: standard film rate
+\end_layout
+
+\begin_layout LyX-Code
+3 = 25 frames/sec: PAL video frame rate
+\end_layout
+
+\begin_layout LyX-Code
+4 = 29.97 frames/sec: NTSC video frame rate
+\end_layout
+
+\begin_layout LyX-Code
+5 = 30 frames/sec: NTSC drop frame video rate (the default)
+\end_layout
+
+\begin_layout LyX-Code
+6 = 50 frames/sec: double frame rate/progressive PAL
+\end_layout
+
+\begin_layout LyX-Code
+7 = 59.94 frames/sec: double frame rate NTSC
+\end_layout
+
+\begin_layout LyX-Code
+8 = 60 frames/sec: double frame rate NTSC
+\end_layout
+
+\begin_layout Description
+mpeg_file string (optional).
+ A string specifying the output MPEG file (default 
+\family typewriter
+outfile.mpg
+\family default
+)
+\end_layout
+
+\begin_layout Description
+tmp_dir string (optional).
+ A string specifying the temporary directory to use for the temporary image
+ files
+\end_layout
+
+\begin_layout Standard
+To run the IDL movie generator, type in a shell:
+\end_layout
+
+\begin_layout LyX-Code
+$ idl
+\end_layout
+
+\begin_layout LyX-Code
+> .compile mpg.pro
+\end_layout
+
+\begin_layout LyX-Code
+> make_mpg, prefix='image', suffix='JPG', n_start=0, n_end=100, digits=3,
+ 
+\hfill
+
+\end_layout
+
+\begin_layout LyX-Code
+            dims=[512,512], frame_rate=2,mpeg_file='mympeg.mpg'
+\end_layout
+
+\begin_layout Standard
+A movie file (
+\family typewriter
+magrev#.mpg
+\family default
+) produced by 
+\family typewriter
+magmovieCIG.pro
+\family default
+ and 
+\family typewriter
+mpg.pro
+\family default
+ is also included in the 
+\family typewriter
+~/rev-data
+\family default
+ directory.
+ 
+\end_layout
+
+\begin_layout Section
+Gauss Coefficients Conversion
+\end_layout
+
+\begin_layout Standard
+Making the MAG output useful to the broader geomagnetism community is one
+ of CIG's top priorities.
+ In this release, we have added the option of output files consisting of
+ the Gauss coefficients of the external magnetic field computed as a function
+ of time.
+\end_layout
+
+\begin_layout Standard
+Here is some background: The standard procedure for extrapolating the main
+ geomagnetic field from the core to the Earth's surface and nearby space
+ assumes the mantle, crust, and atmosphere can be treated as current-free
+ regions.
+ In these regions the geomagnetic potential of the core field satisfies
+ Laplace's equation and can be expressed as a series of spherical harmonics.
+ MAG uses fully-normalized, complex-valued spherical harmonics for its magnetic
+ field and other internal variables, and in addition, the MAG spherical
+ harmonics are packed into one-dimensional arrays for optimal computation
+ and they have non-dimensional coefficients.
+ In contrast, the geomagnetism scientific community uses real-valued Schmidt-typ
+e spherical harmonics for representing the main field, with dimensional
+ coefficients called the Gauss coefficients (see 
+\begin_inset LatexCommand \cite{key-8,key-9}
+
+\end_inset
+
+ for their exact definitions).
+ Gauss coefficients are denoted by g(l,m) and h(l,m) respectively, where
+ (l,m) are harmonic degree and order, respectively, and are usually expressed
+ in nanoTesla units.
+ For example, the present-day axial dipole field has a Gauss coefficient
+ near g(1,0)=-29,500 nT, the minus sign indicating the field points radially
+ inward in the northern hemisphere.
+\end_layout
+
+\begin_layout Standard
+MAG now provides the option for converting its fully-normalized, complex
+ harmonics of the field to the standard geomagnetic format, by requesting
+ an output file (prefix 
+\family typewriter
+cg.
+\family default
+) that consists of the model Gauss coefficients in nanoTesla at the same
+ times as the output for the movie files (prefixes 
+\family typewriter
+me
+\family default
+ and 
+\family typewriter
+mm
+\family default
+).
+ The conversion from non-dimensional to dimensional coefficients is based
+ on Elsasser number magnetic field scaling and assumes nominal values of
+ the Earth's core radius, rotation rate, and electrical conductivity.
+ This option is invoked with the IMOVOPT command in the MAG par-file list.
+ 
+\end_layout
+
+\begin_layout Part
+Appendices
+\end_layout
+
+\begin_layout Chapter
+\start_of_appendix
+\begin_inset LatexCommand \label{cha:Variables-used-in}
+
+\end_inset
+
+Variables Used in MAG
+\end_layout
+
+\begin_layout Standard
+This is a list of variables and names used in the program set in MAG.
+ The list is in alphabetical order for ease of reference.
+\end_layout
+
+\begin_layout Description
+adrke axisymmetric toroidal kinetic energy (diagnostic) 
+\end_layout
+
+\begin_layout Description
+ai imaginary unit = complex(0,1) 
+\end_layout
+
+\begin_layout Description
+aj\InsetSpace ~
+(nlma,nn+1) poloidal magnetic field potential (spectral form); the second
+ index is either the Chebyshev degree (n) or the radial grid point (kc)
+\end_layout
+
+\begin_layout Description
+ajmat\InsetSpace ~
+(nn,nn,lmax) LU-decomposed matrix from Chebyshev collocation of toroidal
+ induction equation.
+ Built in ludc, used in amhd.
+\end_layout
+
+\begin_layout Description
+aleg1\InsetSpace ~
+(nlma,ni) Value of associated Legendre function at grid points
+\end_layout
+
+\begin_layout Description
+aleg2\InsetSpace ~
+(nlma,ni) Value of associated Legendre function, multiplied with Gaussian
+ weight, at grid points
+\end_layout
+
+\begin_layout Description
+aleg3\InsetSpace ~
+(nlma,ni) Value of derivative of associated Legendre function multiplied
+ with sin(theta) at grid points 
+\end_layout
+
+\begin_layout Description
+alfilt [INPUT] Filter parameter for B_r in graphics output, see nfilt 
+\end_layout
+
+\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
+
+\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
+
+\begin_layout Description
+alumn0 Factor for scaling heat flow in output amcke: axisymmetric poloidal
+ kinetic energy 
+\end_layout
+
+\begin_layout Description
+amhd [SUBROUTINE] The ``workhorse'' of the program: advance solution by
+ nstep time steps 
+\end_layout
+
+\begin_layout Description
+amps [INPUT] can be used to re-scale entropy 
+\end_layout
+
+\begin_layout Description
+ampj [INPUT] can be used to re-scale toroidal magnetic field 
+\end_layout
+
+\begin_layout Description
+ampb [INPUT] can be used to re-scale poloidal magnetic field 
+\end_layout
+
+\begin_layout Description
+ampw [INPUT] can be used to re-scale poloidal velocity 
+\end_layout
+
+\begin_layout Description
+ampz [INPUT] can be used to re-scale toroidal velocity 
+\end_layout
+
+\begin_layout Description
+anorm = sqrt(2/[nn+1]) 
+\end_layout
+
+\begin_layout Description
+apome axisymmetric poloidal magnetic field energy 
+\end_layout
+
+\begin_layout Description
+atome axisymmetric toroidal magnetic field energy 
+\end_layout
+
+\begin_layout Description
+b\InsetSpace ~
+(nlma,nn+1) poloidal magnetic field potential (spectral form, see aj) 
+\end_layout
+
+\begin_layout Description
+bleg1\InsetSpace ~
+(lmax) auxiliary array for calculation of aleg1
+\end_layout
+
+\begin_layout Description
+bleg2\InsetSpace ~
+(lmax) auxiliary array for calculation of aleg2 
+\end_layout
+
+\begin_layout Description
+bleg3\InsetSpace ~
+(lmax) auxiliary array for calculation of aleg3 
+\end_layout
+
+\begin_layout Description
+bmat(nn,nn,lmax) LU-decomposed matrix from Chebyshev collocation of poloidal
+ induction equation.
+ Built in ludc, used in amhd.
+ 
+\end_layout
+
+\begin_layout Description
+bnlc1\InsetSpace ~
+(nja/2,ni) bnlr1 stored in complex form 
+\end_layout
+
+\begin_layout Description
+bnlc2\InsetSpace ~
+(nja/2,ni) bnlr2 stored in complex form 
+\end_layout
+
+\begin_layout Description
+bnlc3\InsetSpace ~
+(nja/2,ni) bnlr3 stored in complex form 
+\end_layout
+
+\begin_layout Description
+bnlr1\InsetSpace ~
+(nja,ni) nonlinear products for updating b (on grid points) 
+\end_layout
+
+\begin_layout Description
+bnlr2\InsetSpace ~
+(nja,ni) nonlinear products for updating aj (on grid points) 
+\end_layout
+
+\begin_layout Description
+bnlr3\InsetSpace ~
+(nja,ni) nonlinear products for updating aj (on grid points) 
+\end_layout
+
+\begin_layout Description
+bots(0:lmax,0:mmax) [INPUT] harmonic coefficients of prescribed temperature
+ (entropy) on inner boundary 
+\end_layout
+
+\begin_layout Description
+br\InsetSpace ~
+(nja,ni) = r^2 * B_r on gridpoints 
+\end_layout
+
+\begin_layout Description
+brc br stored as complex array 
+\end_layout
+
+\begin_layout Description
+bscl = dt * radtop^2 
+\end_layout
+
+\begin_layout Description
+bt\InsetSpace ~
+(nja,ni) = r * sin(theta) *b_theta 
+\end_layout
+
+\begin_layout Description
+btrdt\InsetSpace ~
+(ni) used in movmout to calculate j_phi 
+\end_layout
+
+\begin_layout Description
+bts\InsetSpace ~
+(ni,3) used in movmout to calculate j_phi 
+\end_layout
+
+\begin_layout Description
+btc bt stored as complex array 
+\end_layout
+
+\begin_layout Description
+bp\InsetSpace ~
+(nja,ni) = r * sin(theta) * b_phi 
+\end_layout
+
+\begin_layout Description
+bpc bp stored as complex array 
+\end_layout
+
+\begin_layout Description
+bpeak [INPUT] maximum value of imposed field on boundaries 
+\end_layout
+
+\begin_layout Description
+bpeakbot maximum value of imposed field on inner boundary 
+\end_layout
+
+\begin_layout Description
+bpeaktop maximum value of imposed field on outer boundary 
+\end_layout
+
+\begin_layout Description
+cbr\InsetSpace ~
+(nja,ni) = r^2 * curl (B) * e_r 
+\end_layout
+
+\begin_layout Description
+cbrc cbr stored as complex array
+\end_layout
+
+\begin_layout Description
+cbt\InsetSpace ~
+(nja,ni) = r * sin(theta) * curl (B) * e_theta 
+\end_layout
+
+\begin_layout Description
+cbtc ctr stored as complex array 
+\end_layout
+
+\begin_layout Description
+cbp\InsetSpace ~
+(nja,ni) = r * sin(theta) * curl (B) * e_phi
+\end_layout
+
+\begin_layout Description
+cbpc cpb stored as complex array 
+\end_layout
+
+\begin_layout Description
+cheb\InsetSpace ~
+(nn,nn) cheb(i,j) = value of Chebyshev polynomial i at grid point j
+ 
+\end_layout
+
+\begin_layout Description
+chebi [SUBROUTINE] initialize subroutine chebtf 
+\end_layout
+
+\begin_layout Description
+chebtf [SUBROUTINE] multiple fast Chebyshev transform 
+\end_layout
+
+\begin_layout Description
+clm\InsetSpace ~
+(lmax,mmax) normalization factors of spherical harmonics 
+\end_layout
+
+\begin_layout Description
+cmb [INPUT] integrated conductivity of thin D"-layer 
+\end_layout
+
+\begin_layout Description
+colat\InsetSpace ~
+(ni) vector of colatitudes (Gauss points), local array in subroutine
+ prep 
+\end_layout
+
+\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
+
+\begin_layout Description
+cvr\InsetSpace ~
+(nja,ni) = r^2 * curl(v) * e_r 
+\end_layout
+
+\begin_layout Description
+cvrc cvr stored as complex array 
+\end_layout
+
+\begin_layout Description
+db\InsetSpace ~
+(nlma,nn+1) radial derivative of poloidal magetic potential (spectral
+ form, see aj) 
+\end_layout
+
+\begin_layout Description
+dbdt\InsetSpace ~
+(nlma,nn,2) time derivative of poloidal magnetic potential b 
+\end_layout
+
+\begin_layout Description
+dcheb\InsetSpace ~
+(nn,nn) dcheb(i,j) = 1st derivative of Chebyshev polynomial i at grid
+ point j 
+\end_layout
+
+\begin_layout Description
+d2cheb\InsetSpace ~
+(nn,nn) d2cheb(i,j) = 2nd derivative of Chebyshev polynomial i at
+ grid point j 
+\end_layout
+
+\begin_layout Description
+d3cheb\InsetSpace ~
+(nn,nn) d2cheb(i,j) = 3rd derivative of Chebyshev polynomial i at
+ grid point j 
+\end_layout
+
+\begin_layout Description
+ddb\InsetSpace ~
+(nlma,nn+1) 2nd radial derivative of poloidal magetic potential b 
+\end_layout
+
+\begin_layout Description
+ddj\InsetSpace ~
+(nlma,nn+1) 2nd radial derivatic of toroidal magnetic potential aj 
+\end_layout
+
+\begin_layout Description
+ddw\InsetSpace ~
+(nlma,nn+1) 0.25 * 2nd radial derivative of poloidal velocity potential
+ w 
+\end_layout
+
+\begin_layout Description
+ddz\InsetSpace ~
+(nlma,nn+1) 0.25 * 2nd radial derivative of toroidal velocity potential
+ z
+\end_layout
+
+\begin_layout Description
+djdt\InsetSpace ~
+(nlma,nn,2) time derivative of toroidal magnetic potential z 
+\end_layout
+
+\begin_layout Description
+dpdt\InsetSpace ~
+(nlma,nn,2) time derivative of pressure 
+\end_layout
+
+\begin_layout Description
+dsdt\InsetSpace ~
+nlma,nn,2) time derivative of temperature (entropy) 
+\end_layout
+
+\begin_layout Description
+dw\InsetSpace ~
+(nlma,nn+1) 0.50 * radial derivative of poloidal velocity potential w
+\end_layout
+
+\begin_layout Description
+dwdt\InsetSpace ~
+(nlma,nn,2) time derivative of poloidal velocity potential w 
+\end_layout
+
+\begin_layout Description
+dz\InsetSpace ~
+(nlma,nn+1) 0.50 * radial derivative of toroidal velocity potential z 
+\end_layout
+
+\begin_layout Description
+dzdt\InsetSpace ~
+(nlma,nn,2) time derivative of toroidal velocity potential z 
+\end_layout
+
+\begin_layout Description
+delxh\InsetSpace ~
+(nn) horizontal Courant length squared 
+\end_layout
+
+\begin_layout Description
+delxr\InsetSpace ~
+(nn) radial Courant length 
+\end_layout
+
+\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 Description
+dipfilt [INPUT] If nfilt>0 multiply axial dipole component of B_r on outer
+ surface by dipfilt in graphics file 
+\end_layout
+
+\begin_layout Description
+dj\InsetSpace ~
+(nlma,nn+1) radial derivative of toroidal magnetic potential (spectral
+ form, see aj) 
+\end_layout
+
+\begin_layout Description
+dt current time step 
+\end_layout
+
+\begin_layout Description
+dtchck [SUBROUTINE] controls time step 
+\end_layout
+
+\begin_layout Description
+dth Courant time based on horizontal velocity + Alfven velocity
+\end_layout
+
+\begin_layout Description
+dtmax [INPUT] Upper limit on time step (and initial step) 
+\end_layout
+
+\begin_layout Description
+dtmin Lower limit on time step (stop when dt < dtmin) 
+\end_layout
+
+\begin_layout Description
+dtold Time step of previous iterative step 
+\end_layout
+
+\begin_layout Description
+dtr Courant time based on radial velocity + Alfven velocity
+\end_layout
+
+\begin_layout Description
+dtstart [INPUT] Initial time step.
+ If =0, dtmax, or when beginning from restart file, the old dt is taken
+ 
+\end_layout
+
+\begin_layout Description
+dvpdr\InsetSpace ~
+(nja,ni) = d [r * sin(theta) * v_phi]/dr on gridpoints 
+\end_layout
+
+\begin_layout Description
+dvpdrc dvpdr stored as complex array 
+\end_layout
+
+\begin_layout Description
+dvpdp\InsetSpace ~
+(nja,ni) = d [r * sin(theta) * v_phi]/dphi on gridpoints 
+\end_layout
+
+\begin_layout Description
+dvpdpc dvpdp stored as complex array
+\end_layout
+
+\begin_layout Description
+dvrdp\InsetSpace ~
+(nja,ni) = d [r^2 * v_r]/dphi on gridpoints 
+\end_layout
+
+\begin_layout Description
+dvrdpc dvrdp stored as complex array 
+\end_layout
+
+\begin_layout Description
+dvrdr\InsetSpace ~
+(nja,ni) = d [r^2 * v_r]/dr on gridpoints 
+\end_layout
+
+\begin_layout Description
+dvrdrc dvrdr stored as complex array
+\end_layout
+
+\begin_layout Description
+dvrdt\InsetSpace ~
+(nja,ni) = sin(theta) * d [r^2 * v_r]/dtheta on gridpoints 
+\end_layout
+
+\begin_layout Description
+dvrdtc dvrdt stored as complex array 
+\end_layout
+
+\begin_layout Description
+dvtdp\InsetSpace ~
+(nja,ni) = d [r *sin(theta) * v_theta]/dphi on gridpoints 
+\end_layout
+
+\begin_layout Description
+dvtdpc dvtdp stored as complex array 
+\end_layout
+
+\begin_layout Description
+dvtdr\InsetSpace ~
+(nja,ni) = d [r * sin(theta) * v_theta]/dr on gridpoints 
+\end_layout
+
+\begin_layout Description
+dvtdrc dvtdr stored as complex array
+\end_layout
+
+\begin_layout Description
+dw\InsetSpace ~
+(nlma,nn+1) 0.5 * radial derivative of poloidal velocity potential w 
+\end_layout
+
+\begin_layout Description
+dz\InsetSpace ~
+(nlma,nn+1) 0.5 * radial derivative of toroidal velocity potential z 
+\end_layout
+
+\begin_layout Description
+escale scaling factor for energies in output
+\end_layout
+
+\begin_layout Description
+ek [INPUT] Ekman number 
+\end_layout
+
+\begin_layout Description
+enb [OUTPUT] magnetic energy 
+\end_layout
+
+\begin_layout Description
+ens [OUTPUT] thermal energy 
+\end_layout
+
+\begin_layout Description
+enscale [INPUT] in output listing, energies are multiplied by enscale 
+\end_layout
+
+\begin_layout Description
+ent [OUTPUT] total energy 
+\end_layout
+
+\begin_layout Description
+env [OUTPUT] kinetic energy 
+\end_layout
+
+\begin_layout Description
+epsc0 [INPUT] internal heating rate 
+\end_layout
+
+\begin_layout Description
+flmb1\InsetSpace ~
+(nlma+..) r-component of (v x B) term 
+\end_layout
+
+\begin_layout Description
+flmb2\InsetSpace ~
+(nlma+..) theta-component of (v x B) term 
+\end_layout
+
+\begin_layout Description
+flmb3\InsetSpace ~
+(nlma+..) phi-component of (v x B) term 
+\end_layout
+
+\begin_layout Description
+flms1\InsetSpace ~
+(nlma+..) r-component of entropy advection term 
+\end_layout
+
+\begin_layout Description
+flms2\InsetSpace ~
+(nlma+..) theta-component of entropy advection term 
+\end_layout
+
+\begin_layout Description
+flms3\InsetSpace ~
+(nlma+..) phi-component of entropy advection term 
+\end_layout
+
+\begin_layout Description
+flmw1\InsetSpace ~
+(nlma+..) r-component of v*grad(v) + Lorentz force term 
+\end_layout
+
+\begin_layout Description
+flmw2\InsetSpace ~
+(nlma+..) theta-component of v*grad(v) + Lorentz force term 
+\end_layout
+
+\begin_layout Description
+flmw3\InsetSpace ~
+(nlma+..) phi-component of v*grad(v) + Lorentz force term 
+\end_layout
+
+\begin_layout Description
+gauss\InsetSpace ~
+(ni) vector with Gaussian weighting factors, local array in subroutine
+ prep 
+\end_layout
+
+\begin_layout Description
+gquad [SUBROUTINE] finds zeros and Gaussian weight of associated Legendre
+ function
+\end_layout
+
+\begin_layout Description
+grafile [CHARACT] file name for data on spatial grid for graphics with prefix
+ ``g.''; added to outfile set
+\end_layout
+
+\begin_layout Description
+grav\InsetSpace ~
+(nn) gravity at radial levels
+\end_layout
+
+\begin_layout Description
+ib\InsetSpace ~
+(nn,lmax) pivot array for LU-decomposition of matrix bmat created in sgefa,
+ used in sgesl 
+\end_layout
+
+\begin_layout Description
+ic stepping variable commonly used for steps in colatitude
+\end_layout
+
+\begin_layout Description
+icour [INPUT] Courant criterion is checked each ICOUR'th time step 
+\end_layout
+
+\begin_layout Description
+idiftype [INPUT] controls radial variation of diffusivity; =0, no variation
+\end_layout
+
+\begin_layout Description
+ifaxc [13] auxiliary array (factorization) for Chebyshev transform
+\end_layout
+
+\begin_layout Description
+ifaxf [13] auxiliary array (factorization) for Fourier transform
+\end_layout
+
+\begin_layout Description
+ifbfrz [INPUT] logical; if .TRUE., do not update magnetic field 
+\end_layout
+
+\begin_layout Description
+ifirst =1 before first call of time-step checking routine, =0 thereafter
+ 
+\end_layout
+
+\begin_layout Description
+iframes [INPUT] write altogether iframes frames on the movie files (see
+ description under imovopt) 
+\end_layout
+
+\begin_layout Description
+ifsfrz [INPUT] logical; if .TRUE., do not update temperature (entropy) 
+\end_layout
+
+\begin_layout Description
+ifvfrz [INPUT] logical; if .TRUE., do not update velocity
+\end_layout
+
+\begin_layout Description
+ij\InsetSpace ~
+(nn,lmax) pivot array for LU-decomposition of matrix ajmat created in
+ sgefa, used in sgesl
+\end_layout
+
+\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
+
+\begin_layout Description
+imovopt [INPUT] four-digit integer number, controls options for generating
+ movie files.
+ 
+\end_layout
+
+\begin_deeper
+\begin_layout Description
+Last\InsetSpace ~
+digit>0 write B_z, W_z (vortic) and T in the equatorial plane on file
+ with prefix ``me.'', imovopt=0001
+\end_layout
+
+\begin_layout Description
+2nd\InsetSpace ~
+last\InsetSpace ~
+digit>0 write longitudinally averaged B_phi, j_phi and v_phi on file
+ with prefix ``ma.'', imovopt=0010
+\end_layout
+
+\begin_layout Description
+3rd\InsetSpace ~
+last\InsetSpace ~
+digit>0 write B_r at outer surface on file with prefix ``mm.'', imovopt=01
+00
+\end_layout
+
+\begin_layout Description
+4th\InsetSpace ~
+last\InsetSpace ~
+digit>0 write spherical harmonic coefficients for poloidal field
+ at outer boundary and for velocity potentials at radial level on file with
+ prefix ``cc.''.
+ (This option works only when any or all of the movie options are turned
+ on, i.e., any of the ``m?'' files are also produced.
+ imovopt=1000 will not produce a ``cc.'' file.)
+\end_layout
+
+\end_deeper
+\begin_layout Description
+imovct counter variable for movie frames 
+\end_layout
+
+\begin_layout Description
+infile [CHARACT INPUT] name of input file for initial values (restart) 
+\end_layout
+
+\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
+
+\begin_layout Description
+ip0\InsetSpace ~
+(nn) pivot array for LU-decomposition of matrix p0mat created in sgefa,
+ used in sgesl 
+\end_layout
+
+\begin_layout Description
+iprnt counting blocks in time iteration sequence with printed output created
+ at completion of block 
+\end_layout
+
+\begin_layout Description
+is\InsetSpace ~
+(nn,lmax) pivot array for LU-decomposition of matrix smat created in sgefa,
+ used in sgesl
+\end_layout
+
+\begin_layout Description
+is0\InsetSpace ~
+(nn) pivot array for LU-decomposition of matrix s0mat created in sgefa,
+ used in sgesl 
+\end_layout
+
+\begin_layout Description
+iscale [INPUT] determines which diffusivity is used for scaling of time,
+ velocity, energy.
+ 1=viscous, 2=thermal, 3=magnetic 
+\end_layout
+
+\begin_layout Description
+istep time step counter (routine amh) 
+\end_layout
+
+\begin_layout Description
+istor counting superblocks in time iteration sequence, upon completion of
+ superblock disk file with data saved
+\end_layout
+
+\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
+
+\begin_layout Description
+iwp\InsetSpace ~
+(nn,lmax) pivot array for LU-decomposition of matrix wpmat created in
+ sgefa, used in sgesl 
+\end_layout
+
+\begin_layout Description
+iz\InsetSpace ~
+(nn,lmax) pivot array for LU-decomposition of matrix zmat created in sgefa,
+ used in sgesl 
+\end_layout
+
+\begin_layout Description
+k2k\InsetSpace ~
+(nn1) auxiliary array for Chebyshev transform 
+\end_layout
+
+\begin_layout Description
+kc stepping variable commonly used for steps in radius 
+\end_layout
+
+\begin_layout Description
+kcour auxiliary variable for time step checking procedure 
+\end_layout
+
+\begin_layout Description
+kbotb [INPUT] magnetic bottom condition; =1 insulating, =2 perfect condition
+\end_layout
+
+\begin_layout Description
+kbotv [INPUT] mechanical bottom condition; =1 free, =2 rigid 
+\end_layout
+
+\begin_layout Description
+kbots [INPUT] thermal bottom condition; =1 fixed entropy, =2 flux
+\end_layout
+
+\begin_layout Description
+kei [SUBROUTINE] calculates kinetic energy
+\end_layout
+
+\begin_layout Description
+kstep global time step counter
+\end_layout
+
+\begin_layout Description
+ktops [INPUT] thermal top condition; =1 fixed entropy, =2 flux 
+\end_layout
+
+\begin_layout Description
+ktopb [INPUT] magnetic top condition; =1 insulating, =2 perfect condition
+\end_layout
+
+\begin_layout Description
+ktopv [INPUT] mechanical top condition; =1 free, =2 rigid 
+\end_layout
+
+\begin_layout Description
+ldif [INPUT] control parameter for hyperdiffusivity, see difamp 
+\end_layout
+
+\begin_layout Description
+ldifexp [INPUT] control parameter for hyperdiffusivity, see difamp 
+\end_layout
+
+\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
+
+\begin_layout Description
+lmax maximum harmonic degree, calculated as (nj-1)/3
+\end_layout
+
+\begin_layout Description
+logfile [CHARACT] file name for continuous log of energies and other data
+ prefix ``l.''; added to outfile set 
+\end_layout
+
+\begin_layout Description
+lot [PARAM] = 2 * nlma (twice the number of harmonic modes)
+\end_layout
+
+\begin_layout Description
+lpfile [CHARACT] file name for continuous log of specified values with prefix
+ ``lp.''; added to outfile set 
+\end_layout
+
+\begin_layout Description
+lsfile: [CHARACT] file name for power spectra of magnetic and kinetic as
+ function of l and m with prefix ``ls.''; added to outfile set 
+\end_layout
+
+\begin_layout Description
+ludc: [SUBROUTINE] Chebyshev collocation 
+\end_layout
+
+\begin_layout Description
+mclm\InsetSpace ~
+(nlma) used to unscramble harmonic order m from variable lm 
+\end_layout
+
+\begin_layout Description
+mclma\InsetSpace ~
+(nlma) = m/minc+1 for given lm (storage order of m) 
+\end_layout
+
+\begin_layout Description
+kei [SUBROUTINE] calculates magnetic energy 
+\end_layout
+
+\begin_layout Description
+minc [PARAM] if >1, minc-fold symmetry in longitude assumed 
+\end_layout
+
+\begin_layout Description
+mmax maximum harmonic order, is the largest integer <= lmax divisible by
+ minc
+\end_layout
+
+\begin_layout Description
+movafile [CHARACT] file name for movie data (longitudinal averages) with
+ prefix ``ma.''; added to outfile set 
+\end_layout
+
+\begin_layout Description
+movefile [CHARACT] file name for movie data in equatorial plane with prefix
+ ``me.'' ; added to outfile set
+\end_layout
+
+\begin_layout Description
+movmfile [CHARACT] file name for movie data in map views with prefix ``mm.''
+ ; added to outfile set
+\end_layout
+
+\begin_layout Description
+n,\InsetSpace ~
+nc stepping variables commonly used for steps over Chebyshev polynomial
+\end_layout
+
+\begin_layout Description
+ncp [PARAM] = nja/2 used for storage of points in phi in complex array
+\end_layout
+
+\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
+
+\begin_layout Description
+ngcolat [INPUT] graphics output on each ngcolat'th point in latitude 
+\end_layout
+
+\begin_layout Description
+ngform [INPUT] if .ne.
+ 0, graphics output is written each time a restart 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
+
+\begin_layout Description
+nglon [INPUT] graphics output for each nglon'th point in longitude 
+\end_layout
+
+\begin_layout Description
+ngrad [INPUT] graphics output on each ngrad'th radial level 
+\end_layout
+
+\begin_layout Description
+ni [PARAM] # of grid points in colatide; must be even
+\end_layout
+
+\begin_layout Description
+nip1 [PARAM] = ni+1 
+\end_layout
+
+\begin_layout Description
+nj [PARAM] # of grid points in longitude; nj/minc must be multiple of four
+\end_layout
+
+\begin_layout Description
+nja = nj/minc, # of actually needed grid points in phi 
+\end_layout
+
+\begin_layout Description
+njp1 [PARAM] = nj+1 
+\end_layout
+
+\begin_layout Description
+nlaf [PARAM] = lmax+1 
+\end_layout
+
+\begin_layout Description
+nlafp1 [PARAM] = lmax+2 
+\end_layout
+
+\begin_layout Description
+nlm [PARAM] = (mmax+1)*(mmax+2)/2
+\end_layout
+
+\begin_layout Description
+nlma [PARAM] # of angular modes employed nlma = mmax*(lmax+1)/minc - mmax*(mmax-
+minc)/(2*minc) + lmax-mmax+1.
+ 
+\end_layout
+
+\begin_layout Description
+nlmpa [PARAM] = nlma + mmax/minc + 1
+\end_layout
+
+\begin_layout Description
+nlogstep [INPUT] write data on logfile (prefix l.) after each nlogstep steps.
+ 
+\end_layout
+
+\begin_layout Description
+nmaf [PARAM] = mmax+1 
+\end_layout
+
+\begin_layout Description
+nmafa [PARAM] = mmax/minc+1 
+\end_layout
+
+\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
+
+\begin_layout Description
+nn1 [PARAM] = nn-1 
+\end_layout
+
+\begin_layout Description
+nn2 [PARAM] = nn-2 
+\end_layout
+
+\begin_layout Description
+nn3 [PARAM] = nn-3 
+\end_layout
+
+\begin_layout Description
+nnp1 [PARAM] = nn+1
+\end_layout
+
+\begin_layout Description
+nnp2 [PARAM] = nn+2 
+\end_layout
+
+\begin_layout Description
+nnaf [PARAM] # of radial Chebyshev modes, must be <= nn 
+\end_layout
+
+\begin_layout Description
+nnx2 [PARAM] = 2*nn 
+\end_layout
+
+\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 (for arrays,
+ see vrpoint, vppoint, vtpoint in subroutine amhd for details) 
+\end_layout
+
+\begin_layout Description
+nprnt [INPUT] # of printed output blocks created until next data storage
+ for restart 
+\end_layout
+
+\begin_layout Description
+nps2 [PARAM] = (nn+1)/2 
+\end_layout
+
+\begin_layout Description
+nrp [PARAM] = nja+2 (# of points in phi +2) 
+\end_layout
+
+\begin_layout Description
+ns2 [PARAM] =( nn-1)/2
+\end_layout
+
+\begin_layout Description
+nstep [INPUT] # of time steps done until next printed output (total # of
+ time steps is nstep*nprnt*nstor) 
+\end_layout
+
+\begin_layout Description
+nstor [INPUT] # of data storages before program termination
+\end_layout
+
+\begin_layout Description
+ntf [PARAM] =3*nja/2+1, used for Fourier transform array trigsf 
+\end_layout
+
+\begin_layout Description
+ocorevol volume of spherical shell (outer core) 
+\end_layout
+
+\begin_layout Description
+oek = 1.
+ / Ekman number 
+\end_layout
+
+\begin_layout Description
+oekpm = 1.
+ / (Ekman number * Magnetic Prandtl number) 
+\end_layout
+
+\begin_layout Description
+oodt = 1.
+ / dt (inverse time step) 
+\end_layout
+
+\begin_layout Description
+oosscl = 1.
+ / dt 
+\end_layout
+
+\begin_layout Description
+opr = 1.
+ / Prandtl number 
+\end_layout
+
+\begin_layout Description
+outfile [CHARACT INPUT] Name of output files (pre-fixes d.,l.,ls.,g.,me.,ma.,mm.,
+ lp.
+ added) 
+\end_layout
+
+\begin_layout Description
+p0mat\InsetSpace ~
+(nn,nn) LU-decomposed matrix from Chebyshev collocation of pol.
+ equation of motion, l=0-term for pressure.
+ Constructed in ludc, used in amhd 
+\end_layout
+
+\begin_layout Description
+pbar [SUBROUTINE] Calculates value of associated Legendre function 
+\end_layout
+
+\begin_layout Description
+pscale scaling pressure in output 
+\end_layout
+
+\begin_layout Description
+pr [INPUT] Prandtl number 
+\end_layout
+
+\begin_layout Description
+prmag [INPUT] Magnetic Prandtl number 
+\end_layout
+
+\begin_layout Description
+prnt [SUBROUTINE] print diagnostic data 
+\end_layout
+
+\begin_layout Description
+pscl = radtop^2 
+\end_layout
+
+\begin_layout Description
+qi\InsetSpace ~
+(ni,5) array with various coefficients depending on colatitude (look in
+ subroutine prep, loop ``do 32'' for details) 
+\end_layout
+
+\begin_layout Description
+qk\InsetSpace ~
+(nn,16) array with various coefficients depending on radius (look in subroutin
+e prep for details)
+\end_layout
+
+\begin_layout Description
+ql\InsetSpace ~
+(nlma,10) various expressions depending on l and m (look in subroutine
+ prep, loop ``do 35'' for details) 
+\end_layout
+
+\begin_layout Description
+qn\InsetSpace ~
+(nn,6) Chebyshev integrals 
+\end_layout
+
+\begin_layout Description
+r\InsetSpace ~
+(nn) vector with radial levels, r(1)=radtop, r(nn)=radbot
+\end_layout
+
+\begin_layout Description
+ra [INPUT] Rayleigh number 
+\end_layout
+
+\begin_layout Description
+rapr = Rayleigh number / Prandtl number 
+\end_layout
+
+\begin_layout Description
+radbot radius of inner boundary 
+\end_layout
+
+\begin_layout Description
+radratio [INPUT] ratio of inner radius to outer radius 
+\end_layout
+
+\begin_layout Description
+radtop radius of outer boundary 
+\end_layout
+
+\begin_layout Description
+rderiv [SUBROUTINE] radial derivative 
+\end_layout
+
+\begin_layout Description
+rffti [SUBROUTINE] subroutine called in chebi
+\end_layout
+
+\begin_layout Description
+rstfile [CHARACT] file name for data in spectral form ('restart data') with
+ prefix ``d.'' or ``d0.'', ``d1.'' ...; added to outfile set
+\end_layout
+
+\begin_layout Description
+runid [CHAR*64] text identifying the run 
+\end_layout
+
+\begin_layout Description
+rva\InsetSpace ~
+(nn) auxiliary array used in prep
+\end_layout
+
+\begin_layout Description
+rvap\InsetSpace ~
+(nn) auxiliary array used in kei, mei
+\end_layout
+
+\begin_layout Description
+rvat\InsetSpace ~
+(nn) auxiliary array used in kei, mei 
+\end_layout
+
+\begin_layout Description
+rvb\InsetSpace ~
+(nn) auxiliary array used in prep, kei, mei 
+\end_layout
+
+\begin_layout Description
+rvc\InsetSpace ~
+(nn) auxiliary array used in kei, mei 
+\end_layout
+
+\begin_layout Description
+p\InsetSpace ~
+(nlma,nn+1) pressure (spectral form) 
+\end_layout
+
+\begin_layout Description
+p00co = 4/sqrt(3)
+\end_layout
+
+\begin_layout Description
+prep [SUBROUTINE] parameter input, set up auxiliary arrays, set initial
+ conditions, etc.
+ 
+\end_layout
+
+\begin_layout Description
+s\InsetSpace ~
+(nlma,nn+1) entropy perturbation (spectral form) 
+\end_layout
+
+\begin_layout Description
+sc\InsetSpace ~
+(ncp,ni) sr stored in complex form 
+\end_layout
+
+\begin_layout Description
+snlc1\InsetSpace ~
+(ncp,ni) slnr1 stored in complex form 
+\end_layout
+
+\begin_layout Description
+snlc2\InsetSpace ~
+(ncp,ni) slnr2 stored in complex form 
+\end_layout
+
+\begin_layout Description
+snlc3\InsetSpace ~
+(ncp,ni) slnr3 stored in complex form 
+\end_layout
+
+\begin_layout Description
+snlr1\InsetSpace ~
+(nrp,ni) nonlinear term (radial advection) for updating temperature
+ 
+\end_layout
+
+\begin_layout Description
+snlr2\InsetSpace ~
+(nrp,ni) nonlinear term (theta advection) for updating temperature
+ 
+\end_layout
+
+\begin_layout Description
+snlr3\InsetSpace ~
+(nrp,ni) nonlinear term (phi advection) for updating temperature 
+\end_layout
+
+\begin_layout Description
+sr\InsetSpace ~
+(nrp,ni) temperature (entropy) on grid points 
+\end_layout
+
+\begin_layout Description
+s0mat\InsetSpace ~
+(nn,nn) LU-decomposed matrix from Chebyshev collocation of temperature
+ equation, l=0-term.
+ Constructed in ludc, used in amhd 
+\end_layout
+
+\begin_layout Description
+samp [INPUT] amplitude of initial entropy perturbation 
+\end_layout
+
+\begin_layout Description
+smat\InsetSpace ~
+(nn,nn,lmax) LU-decomposed matrix from Chebyshev collocation of temperature
+ equation.
+ Built in ludc, used in amhd 
+\end_layout
+
+\begin_layout Description
+sr\InsetSpace ~
+(nja,ni) entropy on gridpoints 
+\end_layout
+
+\begin_layout Description
+src sr stored as complex array 
+\end_layout
+
+\begin_layout Description
+sscl = dt 
+\end_layout
+
+\begin_layout Description
+stor [SUBROUTINE] store data in restart file
+\end_layout
+
+\begin_layout Description
+tei [SUBROUTINE] calculates thermal energy 
+\end_layout
+
+\begin_layout Description
+time time 
+\end_layout
+
+\begin_layout Description
+timediff time 
+\end_layout
+
+\begin_layout Description
+tipdipole [INPUT] rotate poloidal dipole term when beginning from restart
+ file 
+\end_layout
+
+\begin_layout Description
+tmovnext auxiliary variable (next output time) for movie file generation
+ 
+\end_layout
+
+\begin_layout Description
+tmovstart [INPUT] time at which to start writing movie-frames on m.*-file
+ 
+\end_layout
+
+\begin_layout Description
+tmovstep [INPUT] time increments for writing movie-frames on m.*-file 
+\end_layout
+
+\begin_layout Description
+tops\InsetSpace ~
+(0:lmax,0:mmax) [INPUT] harmonic coefficients of prescribed temperature
+ (entropy) on outer boundary 
+\end_layout
+
+\begin_layout Description
+treset [INPUT; LOGICAL] if true reset time and step counter to zero when
+ starting from a stored dataset 
+\end_layout
+
+\begin_layout Description
+trigsc\InsetSpace ~
+(nn) auxiliary array for Chebyshev transform routine created in chebi,
+ used in chebtf
+\end_layout
+
+\begin_layout Description
+trigsf\InsetSpace ~
+(ntf) auxiliary array for Fourier transform routine created in fftrig,
+ used in fourtf
+\end_layout
+
+\begin_layout Description
+tscale scaling of time in output
+\end_layout
+
+\begin_layout Description
+up\InsetSpace ~
+(nja,3) phi-component of velocity in equatorial plane for three consecutive
+ radial levels; used in moveout to calculate vorticity 
+\end_layout
+
+\begin_layout Description
+urdp\InsetSpace ~
+(nja) derivative dv_r/dphi in equatorial plane; used in moveout to calculate
+ vorticity 
+\end_layout
+
+\begin_layout Description
+vr\InsetSpace ~
+(nja,ni) = r^2 * v_r on grid points 
+\end_layout
+
+\begin_layout Description
+vrc vr stored as complex array
+\end_layout
+
+\begin_layout Description
+vp\InsetSpace ~
+(nja,ni) = c * sin(theta) * v_phi on grid points 
+\end_layout
+
+\begin_layout Description
+vpc vp stored as complex array 
+\end_layout
+
+\begin_layout Description
+vscale scaling of velocity in output
+\end_layout
+
+\begin_layout Description
+vt\InsetSpace ~
+(nja,ni) = r * sin(theta) * v_theta on grid points 
+\end_layout
+
+\begin_layout Description
+vtc vt stored as complex array 
+\end_layout
+
+\begin_layout Description
+w\InsetSpace ~
+(nlma,nn+1) poloidal velocity potential (spectral form)
+\end_layout
+
+\begin_layout Description
+wpmat\InsetSpace ~
+(nn,nn,lmax) LU-decomposed matrix from Chebyshev collocation of poloidal
+ equation of motion; built in ludc, used in amhd
+\end_layout
+
+\begin_layout Description
+wnlc1\InsetSpace ~
+(nja/2,ni) wnlr1 stored in complex form 
+\end_layout
+
+\begin_layout Description
+wnlc2\InsetSpace ~
+(nja/2,ni) wnlr2 stored in complex form 
+\end_layout
+
+\begin_layout Description
+wnlc3\InsetSpace ~
+(nja/2,ni) wnlr3 stored in complex form 
+\end_layout
+
+\begin_layout Description
+wnlr1\InsetSpace ~
+(nja,ni) nonlinear products for updating w (on grid points) 
+\end_layout
+
+\begin_layout Description
+wnlr2\InsetSpace ~
+(nja,ni) nonlinear products for updating z (on grid points) 
+\end_layout
+
+\begin_layout Description
+wnlr3\InsetSpace ~
+(nja,ni) nonlinear products for updating z (on grid points)
+\end_layout
+
+\begin_layout Description
+work\InsetSpace ~
+(lot,nnp2) work array used in Fourier and Chebyshev transforms 
+\end_layout
+
+\begin_layout Description
+wsave\InsetSpace ~
+(nn) auxiliary array used for Chebyshev transform 
+\end_layout
+
+\begin_layout Description
+wscl = dt * radtop^2 
+\end_layout
+
+\begin_layout Description
+y00 = 1/sqrt(4*pi) 
+\end_layout
+
+\begin_layout Description
+z\InsetSpace ~
+(nlma,nn+1) toroidal velocity potential (spectral form) 
+\end_layout
+
+\begin_layout Description
+zscl = dt * radtop^2 
+\end_layout
+
+\begin_layout Description
+zmat\InsetSpace ~
+(nn,nn,lmax) LU-decomposed matrix from Chebyshev collocation of toroidal
+ equation of motion; built in ludc, used in amhd
+\end_layout
+
+\begin_layout Chapter
+\begin_inset LatexCommand \label{cha:MAG-Input-File}
+
+\end_inset
+
+MAG Input File Format
+\end_layout
+
+\begin_layout Section*
+Introduction
+\end_layout
+
+\begin_layout Standard
+This is an overview of the components of the code, input parameters, structure
+ of output files, etc.
+ MAG expects Unix-styled ASCII files (i.e., no carriage-return 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.
+ All parameters are in non-dimensional units unless specified.
+ 
+\end_layout
+
+\begin_layout Section*
+Input Parameters 
+\end_layout
+
+\begin_layout Standard
+Parameters have pre-defined (default) values.
+ They are read through a namelist in the subroutine ``prep.
+\begin_inset Quotes srd
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+INPUT, OUTPUT, STEPPING CONTROL, INITIALIZATION OF THE RUN
+\end_layout
+
+\begin_layout Description
+outfile Name of output files (prefixes 
+\family typewriter
+d., g., l., ls., me., ma., mm.
+\family default
+, are added)
+\end_layout
+
+\begin_layout Description
+infile Complete name of file from which initial values are read (restart
+ file)
+\end_layout
+
+\begin_layout Description
+runid Arbitrary text of up to 64 characters to describe the model 
+\end_layout
+
+\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 which 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 Description
+samp Amplitude of initial perturbation (whether random or single mode) 
+\end_layout
+
+\begin_layout Description
+nstep Do one block of nstep time steps before producing a summary printout
+ of some diagnostics standard output; nstep should be an even number
+\end_layout
+
+\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 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 Description
+ngform Write data at grid points for graphics processing and other post-processi
+ng (programs column.f diagnos.f) into file 'g[0-9].<name>' each time a superblock
+ is written.
+ 
+\end_layout
+
+\begin_deeper
+\begin_layout Description
+ngform=2 unformatted file
+\end_layout
+
+\begin_layout Description
+ngform=1 formatted file 
+\end_layout
+
+\begin_layout Description
+ngform=0 nothing written
+\end_layout
+
+\begin_layout Description
+ngform=-1 comment lines are included into file for easier reading (cannot
+ be used for graphics processing in this form)
+\end_layout
+
+\end_deeper
+\begin_layout Description
+ngrad Output on graphics file for each ngrad'th radial point
+\end_layout
+
+\begin_layout Description
+ngcolat Output on graphics file every ngcolat'th point in colatitude
+\end_layout
+
+\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 Description
+alfilt See under nfilt 
+\end_layout
+
+\begin_layout Description
+ivfilt If >0 apply the same filter as above to the radial velocity at radial
+ level ivfilt and write the result into graphics file at the first radial
+ location (kc=1) 
+\end_layout
+
+\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 Description
+nlogstep Writes data on logfile (prefix l.) after each nlogstep step 
+\end_layout
+
+\begin_layout Description
+nplog If >0, writes velocity values at specific points of the grid on separate
+ logfile (prefix ``lp.'') after every nplog step (for arrays, see vrpoint,
+ vppoint, vtpoint in subroutine amhd for details)
+\end_layout
+
+\begin_layout Description
+iscale Determines which diffusivity is used for scaling of time, velocity
+ and energy.
+ 1=viscous, 2=thermal, 3=magnetic 
+\end_layout
+
+\begin_layout Description
+enscale In output listings, energies are multiplied by enscale 
+\end_layout
+
+\begin_layout Description
+treset [LOGICAL] If true, reset time and step counter to zero when starting
+ from a stored dataset 
+\end_layout
+
+\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 Description
+amps Option for rescaling temperature perturbation (from restart file) by
+ factor amps (if not equal to 1) 
+\end_layout
+
+\begin_layout Description
+ampw Same for poloidal velocity 
+\end_layout
+
+\begin_layout Description
+ampz Same for toroidal velocity 
+\end_layout
+
+\begin_layout Description
+ampb Same for poloidal magnetic field 
+\end_layout
+
+\begin_layout Description
+ampj Same for toroidal magnetic field 
+\end_layout
+
+\begin_layout Description
+ifvfrz [LOGICAL] If true, do not update velocity during iteration 
+\end_layout
+
+\begin_layout Description
+ifbfrz [LOGICAL] If true, do not update magnetic field during iteration
+ 
+\end_layout
+
+\begin_layout Description
+ifsfrz [LOGICAL] If true, do not update temperature during iteration
+\end_layout
+
+\begin_layout Subsubsection*
+TIME STEP CONTROL 
+\end_layout
+
+\begin_layout Description
+dtmin Minimum time step (in seconds).
+ If the dynamically determined time step becomes less, the program terminates.
+ 
+\end_layout
+
+\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 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 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 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 Description
+icour Check Courant criterion after each icour time step (even numbers)
+ 
+\end_layout
+
+\begin_layout Subsubsection*
+PHYSICAL CONTROL PARAMETERS
+\end_layout
+
+\begin_layout Description
+ra Rayleigh number (defined with gravity on outer boundary) 
+\end_layout
+
+\begin_layout Description
+ek Ekman number 
+\end_layout
+
+\begin_layout Description
+pr Prandtl number 
+\end_layout
+
+\begin_layout Description
+prmag Magnetic Prandtl number 
+\end_layout
+
+\begin_layout Description
+radratio Ratio of inner to outer radius 
+\end_layout
+
+\begin_layout Description
+bpeak Peak value of magnetic field imposed by boundary conditions 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 Description
+epsc0 Volumetric rate of internal heating
+\end_layout
+
+\begin_layout Subsubsection*
+BOUNDARY CONDITIONS AT INNER AND OUTER RADII 
+\end_layout
+
+\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 Description
+kbots thermal boundary condition at ICB.
+ As above.
+ 
+\end_layout
+
+\begin_layout Description
+ktopv velocity condition at CMB.
+ 1-free, 2-rigid.
+ 
+\end_layout
+
+\begin_layout Description
+kbotv velocity condition at ICB.
+ As above.
+\end_layout
+
+\begin_layout Description
+kbotb =1 for insulating inner core =2: ideally conducting inner core 
+\end_layout
+
+\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 Description
+cmb If >0, thin conducting layer at bottom of mantle (not tested!)
+\end_layout
+
+\begin_layout Subsubsection*
+HYPERDIFFUSIVITIES 
+\end_layout
+
+\begin_layout Description
+difamp Amplitude of hyperdiffusivities
+\end_layout
+
+\begin_layout Description
+ldif Hyperdiffusivites applied for harmonic degrees l >= ldif
+\end_layout
+
+\begin_layout Description
+ldifexp Exponent for increase of hyperdiffusivities with l (analytical details
+ see definition of ql(lm,11) in prep.f)
+\end_layout
+
+\begin_layout Subsubsection*
+PARAMETERS FOR GENERATING MOVIE FILES 
+\end_layout
+
+\begin_layout Description
+imovopt Three-digit integer number, options for generating movie files 
+\end_layout
+
+\begin_deeper
+\begin_layout Description
+Last\InsetSpace ~
+digit>0 Write B_z, W_z (vorticity) and T in the equatorial plane on
+ file with prefix ``me.'' 
+\end_layout
+
+\begin_layout Description
+2nd\InsetSpace ~
+last\InsetSpace ~
+digit>0 Write longitudinally averaged B_phi, j_phi and v_phi on file
+ with prefix ``ma.'' 
+\end_layout
+
+\begin_layout Description
+3rd\InsetSpace ~
+last\InsetSpace ~
+digit>0 Write B_r at outer surface and B_r and v_r at mid- depth
+ on file with prefix ``mm.'' 
+\end_layout
+
+\begin_layout Description
+4th\InsetSpace ~
+last\InsetSpace ~
+digit>0 Write spherical harmonic coefficients for poloidal field
+ at outer boundary and for velocity potentials at radial level on file with
+ prefix ``cc.'' 
+\end_layout
+
+\end_deeper
+\begin_layout Description
+iframes Write altogether iframes frames on the movie files 
+\end_layout
+
+\begin_layout Description
+tmovstart Time at which to start writing movie-frames 
+\end_layout
+
+\begin_layout Description
+tmovstep Time increments for writing movie-frames
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Chapter
+\begin_inset LatexCommand \label{cha:MAG-Output-File}
+
+\end_inset
+
+MAG Output File Format
+\end_layout
+
+\begin_layout Standard
+MAG produces a set of output files for further processing.
+ All outputs are in non-dimensional units unless specified.
+ 
+\end_layout
+
+\begin_layout Description
+l.[outfile] Lists a set of diagnostic values each nlogstep time-steps.
+\end_layout
+
+\begin_layout Description
+ls.[outfile] Spectra of kinetic energy and magnetic field every nprint time
+ steps, sorted for modes with equal l, and additionally sorted for modes
+ with equal m.
+ 
+\end_layout
+
+\begin_layout Description
+g.[outfile]\InsetSpace ~
+or\InsetSpace ~
+g[i].[outfile] where i=0,1,2,..9 (optional, written when ngstep>0).
+ Contains temperature, velocity and magnetic field components for graphics
+ processing (idl-program magts).
+ 
+\end_layout
+
+\begin_layout Description
+d.[outfile]\InsetSpace ~
+or\InsetSpace ~
+d[i].outfile Restart files with the complete set of variables
+ (stored as spectral values 
+\family typewriter
+l,m
+\family default
+ in the angular coordinates for radial grid-levels).
+ 
+\end_layout
+
+\begin_layout Description
+lp.[outfile] Written when nplog>0.
+ Velocity at specific points written every nplog'th time step.
+ 
+\end_layout
+
+\begin_layout Description
+me.[outfile] Written when first digit of imovopt>0, i.e., imovopt=
+\begin_inset Formula $ $
+\end_inset
+
+0001.
+ Values in the equatorial plane for producing movie (idl-program: magmov
+ EQ3.pro).
+\end_layout
+
+\begin_layout Description
+ma.[outfile] Written when second digit of imovopt>0, i.e, imovopt=0010.
+ Longitudinal averages for producing movie (idl-program, not provided).
+\end_layout
+
+\begin_layout Description
+mm.[outfile] Written when third digit of imovopt>0, i.e., imovopt=0100.
+ Values on spherical surfaces for producing movie (idl-program: magmovieCIG.pro,
+ magmovCMB.pro).
+\end_layout
+
+\begin_layout Description
+cc.[outfile] Written when the last (fourth) digit and any of imovopt>0 and
+ any of the other three digits is larger than zero, i.e.
+ imovopt>1000.
+ Record the spherical harmonic coefficients for poloidal field at outer
+ boundary and their converted Gauss coefficients.
+\end_layout
+
+\begin_layout Quote
+
+\series bold
+Note: 
+\series default
+If one of the above files already exists, the program will not run.
+\end_layout
+
+\begin_layout Standard
+The standard output file contains summaries of grid paramaters and all process
+ control and physical parameters that occur in the namelist statements.
+ It lists the values of non-dimensional parameters and of the various diffusive
+ time-scales.
+ Then, at the end of each block, it lists a number of diagnostic values:
+ 
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="11" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="5in">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\series bold
+Parameters
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\series bold
+Definitions
+\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
+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
+actual time step
+\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
+dtrmin
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Courant time calculated with radial velocities 
+\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
+dthmin  
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Courant time calculated with horizontal velocities
+\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
+cour
+\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 inverse Courant time based on radial fluid velocity 
+\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
+couh
+\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 inverse Courant time based on horizontal fluid velocity 
+\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
+alfr
+\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 inverse Courant time based on radial modified Alfven velocity 
+\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
+alfh
+\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 inverse Courant time based on horizontal modified Alfven velocity
+ (in addition, the radial level at which the maximum is reached is indicated)
+ 
+\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
+ent
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+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
+env
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+kinetic energy
+\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
+enb
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+magnetic energy
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The meaning of other quantities is obvious.
+\end_layout
+
+\begin_layout Standard
+For the primary variables, the modes for which they assume their absolute
+ maximum and the maximum are printed.
+ Maxima are determined for the toroidal potential multiplied by 
+\begin_inset Formula $1/r$
+\end_inset
+
+, and for poloidal potentials multiplied by 
+\begin_inset Formula $l(l+1)/r{}^{2}$
+\end_inset
+
+, in order to find the modes which exhibit the maximum longitudinal toroidal
+ velocity (field strength) and the maximum radial velocity (field strength),
+ respectively.
+\end_layout
+
+\begin_layout Description
+l.[outfile] printed every nlogstep time step, one record is printed that
+ contains 17 output fields: 
+\end_layout
+
+\begin_deeper
+\begin_layout List
+\labelwidthstring 00.00.0000
+1) time 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+2) mean kinetic energy density 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+3) mean poloidal kinetic energy density
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+4) mean magnetic energy density
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+5) mean poloidal magnetic energy density 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+6) mean axisymmetric toroidal kinetic energy density 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+7) mean axisymmetric poloidal kinetic energy density 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+8) mean axisymmetric poloidal magnetic energy density 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+9) mean axisymmetric toroidal magnetic energy density
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+10) mean top heatflow (nusselt number) 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+11) mean bottom heatflow (nusselt number) 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+12) mean magnetic field strength 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+13) rms dipole, outer boundary 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+14) rms axial dipole, outer boundary 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+15) dipole tilt, outer boundary 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+16) dipole longitude, outer boundary 
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+17) mean velocity
+\end_layout
+
+\end_deeper
+\begin_layout Description
+ls.[outfile] Printed each nprint time step are four records with time being
+ the first variable followed by the spectral power of kinetic and magnetic
+ energy, respectively, as a function of harmonic degree 
+\begin_inset Formula $l$
+\end_inset
+
+, from 
+\begin_inset Formula $l$
+\end_inset
+
+=0 to lmax (first two records in a block), and spectral power as a function
+ of harmonic order m in the last two records of a block.
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Chapter
+License 
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+\series default
+ 
+\newline
+
+\series medium
+Everyone is permitted to copy and distribute verbatim copies of this license
+ document, but changing it is not allowed.
+\end_layout
+
+\begin_layout Section*
+Preamble
+\end_layout
+
+\begin_layout Standard
+The licenses for most software are designed to take away your freedom to
+ share and change it.
+ By contrast, the GNU General Public License is intended to guarantee your
+ freedom to share and change free software -- to make sure the software
+ is free for all its users.
+ This General Public License applies to most of the Free Software Foundation's
+ software and to any other program whose authors commit to using it.
+ (Some other Free Software Foundation software is covered by the GNU Library
+ General Public License instead.) You can apply it to your programs, too.
+\end_layout
+
+\begin_layout Standard
+When we speak of free software, we are referring to freedom, not price.
+ Our General Public Licenses are designed to make sure that you have the
+ freedom to distribute copies of free software (and charge for this service
+ if you wish), that you receive source code or can get it if you want it,
+ that you can change the software or use pieces of it in new free programs;
+ and that you know you can do these things.
+\end_layout
+
+\begin_layout Standard
+To protect your rights, we need to make restrictions that forbid anyone
+ to deny you these rights or to ask you to surrender the rights.
+ These restrictions translate to certain responsibilities for you if you
+ distribute copies of the software, or if you modify it.
+\end_layout
+
+\begin_layout Standard
+For example, if you distribute copies of such a program, whether gratis
+ or for a fee, you must give the recipients all the rights that you have.
+ You must make sure that they, too, receive or can get the source code.
+ And you must show them these terms so they know their rights.
+\end_layout
+
+\begin_layout Standard
+We protect your rights with two steps:
+\end_layout
+
+\begin_layout Enumerate
+Copyright the software, and 
+\end_layout
+
+\begin_layout Enumerate
+Offer you this license which gives you legal permission to copy, distribute
+ and/or modify the software.
+\end_layout
+
+\begin_layout Standard
+Also, for each author's protection and ours, we want to make certain that
+ everyone understands that there is no warranty for this free software.
+ If the software is modified by someone else and passed on, we want its
+ recipients to know that what they have is not the original, so that any
+ problems introduced by others will not reflect on the original authors'
+ reputations.
+\end_layout
+
+\begin_layout Standard
+Finally, any free program is threatened constantly by software patents.
+ We wish to avoid the danger that redistributors of a free program will
+ individually obtain patent licenses, in effect making the program proprietary.
+ To prevent this, we have made it clear that any patent must be licensed
+ for everyone's free use or not licensed at all.
+ 
+\end_layout
+
+\begin_layout Standard
+The precise terms and conditions for copying, distribution and modification
+ follow.
+\end_layout
+
+\begin_layout Section*
+GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION
+ AND MODIFICATION 
+\end_layout
+
+\begin_layout Standard
+This License applies to any program or other work which contains a notice
+ placed by the copyright holder saying it may be distributed under the terms
+ of this General Public License.
+ The ``Program,'' below refers to any such program or work, and a ``work
+ based on the Program'' means either the Program or any derivative work
+ under copyright law: that is to say, a work containing the Program or a
+ portion of it, either verbatim or with modifications and/or translated
+ into another language.
+ (Hereinafter, translation is included without limitation in the term ``modifica
+tion.'') Each licensee is addressed as ``you.''
+\end_layout
+
+\begin_layout Standard
+Activities other than copying, distribution and modification are not covered
+ by this License; they are outside its scope.
+ The act of running the Program is not restricted, and the output from the
+ Program is covered only if its contents constitute a work based on the
+ Program (independent of having been made by running the Program).
+ Whether that is true depends on what the Program does.
+ 
+\end_layout
+
+\begin_layout Enumerate
+You may copy and distribute verbatim copies of the Program's source code
+ as you receive it, in any medium, provided that you conspicuously and appropria
+tely publish on each copy an appropriate copyright notice and disclaimer
+ of warranty; keep intact all the notices that refer to this License and
+ to the absence of any warranty; and give any other recipients of the Program
+ a copy of this License along with the Program.
+ 
+\newline
+
+\newline
+You may charge a fee for the physical act of transferring a copy, and you
+ may at your option offer warranty protection in exchange for a fee.
+ 
+\end_layout
+
+\begin_layout Enumerate
+You may modify your copy or copies of the Program or any portion of it,
+ thus forming a work based on the Program, and copy and distribute such
+ modifications or work under the terms of Section 1 above, provided that
+ you also meet all of these conditions: 
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+You must cause the modified files to carry prominent notices stating that
+ you changed the files and the date of any change.
+ 
+\end_layout
+
+\begin_layout Enumerate
+You must cause any work that you distribute or publish, that in whole or
+ in part contains or is derived from the Program or any part thereof, to
+ be licensed as a whole at no charge to all third parties under the terms
+ of this License.
+ 
+\end_layout
+
+\begin_layout Enumerate
+If the modified program normally reads commands interactively when run,
+ you must cause it, when started running for such interactive use in the
+ most ordinary way, to print or display an announcement including an appropriate
+ copyright notice and a notice that there is no warranty (or else, saying
+ that you provide a warranty) and that users may redistribute the program
+ under these conditions, and telling the user how to view a copy of this
+ License.
+ (Exception: if the Program itself is interactive but does not normally
+ print such an announcement, your work based on the Program is not required
+ to print an announcement.) 
+\end_layout
+
+\begin_layout Standard
+These requirements apply to the modified work as a whole.
+ If identifiable sections of that work are not derived from the Program,
+ and can be reasonably considered independent and separate works in themselves,
+ then this License, and its terms, do not apply to those sections when you
+ distribute them as separate works.
+ But when you distribute the same sections as part of a whole which is a
+ work based on the Program, the distribution of the whole must be on the
+ terms of this License, whose permissions for other licensees extend to
+ the entire whole, and thus to each and every part regardless of who wrote
+ it.
+ 
+\newline
+
+\newline
+Thus, it is not the intent of this section to claim rights or contest your
+ rights to work written entirely by you; rather, the intent is to exercise
+ the right to control the distribution of derivative or collective works
+ based on the Program.
+ 
+\newline
+
+\newline
+In addition, mere aggregation of another work not based on the Program
+ with the Program (or with a work based on the Program) on a volume of a
+ storage or distribution medium does not bring the other work under the
+ scope of this License.
+ 
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+You may copy and distribute the Program (or a work based on it, under Section
+ 2) in object code or executable form under the terms of Sections 1 and
+ 2 above provided that you also do one of the following: 
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+Accompany it with the complete corresponding machine-readable source code,
+ which must be distributed under the terms of Sections 1 and 2 above on
+ a medium customarily used for software interchange; or, 
+\end_layout
+
+\begin_layout Enumerate
+Accompany it with a written offer, valid for at least three years, to give
+ any third party, for a charge no more than your cost of physically performing
+ source distribution, a complete machine-readable copy of the corresponding
+ source code, to be distributed under the terms of Sections 1 and 2 above
+ on a medium customarily used for software interchange; or, 
+\end_layout
+
+\begin_layout Enumerate
+Accompany it with the information you received as to the offer to distribute
+ corresponding source code.
+ (This alternative is allowed only for noncommercial distribution and only
+ if you received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.) 
+\end_layout
+
+\begin_layout Standard
+The source code for a work means the preferred form of the work for making
+ modifications to it.
+ For an executable work, complete source code means all the source code
+ for all modules it contains, plus any associated interface definition files,
+ plus the scripts used to control compilation and installation of the executable.
+ However, as a special exception, the source code distributed need not include
+ anything that is normally distributed (in either source or binary form)
+ with the major components (compiler, kernel, and so on) of the operating
+ system on which the executable runs, unless that component itself accompanies
+ the executable.
+\newline
+
+\newline
+If distribution of executable or object code is made by offering
+ access to copy from a designated place, then offering equivalent access
+ to copy the source code from the same place counts as distribution of the
+ source code, even though third parties are not compelled to copy the source
+ along with the object code.
+ 
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+You may not copy, modify, sublicense, or distribute the Program except as
+ expressly provided under this License.
+ Any attempt otherwise to copy, modify, sublicense or distribute the Program
+ is void, and will automatically terminate your rights under this License.
+ However, parties who have received copies, or rights, from you under this
+ License will not have their licenses terminated so long as such parties
+ remain in full compliance.
+ 
+\end_layout
+
+\begin_layout Enumerate
+You are not required to accept this License, since you have not signed it.
+ However, nothing else grants you permission to modify or distribute the
+ Program or its derivative works.
+ These actions are prohibited by law if you do not accept this License.
+ Therefore, by modifying or distributing the Program (or any work based
+ on the Program), you indicate your acceptance of this License to do so,
+ and all its terms and conditions for copying, distributing or modifying
+ the Program or works based on it.
+ 
+\end_layout
+
+\begin_layout Enumerate
+Each time you redistribute the Program (or any work based on the Program),
+ the recipient automatically receives a license from the original licensor
+ to copy, distribute or modify the Program subject to these terms and conditions.
+ You may not impose any further restrictions on the recipients' exercise
+ of the rights granted herein.
+ You are not responsible for enforcing compliance by third parties to this
+ License.
+ 
+\end_layout
+
+\begin_layout Enumerate
+If, as a consequence of a court judgment or allegation of patent infringement
+ or for any other reason (not limited to patent issues), conditions are
+ imposed on you (whether by court order, agreement or otherwise) that contradict
+ the conditions of this License, they do not excuse you from the conditions
+ of this License.
+ If you cannot distribute so as to satisfy simultaneously your obligations
+ under this License and any other pertinent obligations, then as a consequence
+ you may not distribute the Program at all.
+ For example, if a patent license would not permit royalty-free redistribution
+ of the Program by all those who receive copies directly or indirectly through
+ you, then the only way you could satisfy both it and this License would
+ be to refrain entirely from distribution of the Program.
+\newline
+
+\newline
+If any portion of
+ this section is held invalid or unenforceable under any particular circumstance
+, the balance of the section is intended to apply and the section as a whole
+ is intended to apply in other circumstances.
+\newline
+
+\newline
+It is not the purpose of this
+ section to induce you to infringe any patents or other property right claims
+ or to contest validity of any such claims; this section has the sole purpose
+ of protecting the integrity of the free software distribution system, which
+ is implemented by public license practices.
+ Many people have made generous contributions to the wide range of software
+ distributed through that system in reliance on consistent application of
+ that system; it is up to the author/donor to decide if he or she is willing
+ to distribute software through any other system and a licensee cannot impose
+ that choice.
+ 
+\newline
+
+\newline
+This section is intended to make thoroughly clear what is believed to be
+ a consequence of the rest of this License.
+ 
+\end_layout
+
+\begin_layout Enumerate
+If the distribution and/or use of the Program is restricted in certain countries
+ either by patents or by copyrighted interfaces, the original copyright
+ holder who places the Program under this License may add an explicit geographic
+al distribution limitation excluding those countries, so that distribution
+ is permitted only in or among countries not thus excluded.
+ In such case, this License incorporates the limitation as if written in
+ the body of this License.
+ 
+\end_layout
+
+\begin_layout Enumerate
+The Free Software Foundation may publish revised and/or new versions of
+ the General Public License from time to time.
+ Such new versions will be similar in spirit to the present version, but
+ may differ in detail to address new problems or concerns.
+ 
+\newline
+
+\newline
+Each version is given a distinguishing version number.
+ If the Program specifies a version number of this License which applies
+ to it and ``any later version,'' you have the option of following the terms
+ and conditions either of that version or of any later version published
+ by the Free Software Foundation.
+ If the Program does not specify a version number of this License, you may
+ choose any version ever published by the Free Software Foundation.
+\end_layout
+
+\begin_layout Enumerate
+If you wish to incorporate parts of the Program into other free programs
+ whose distribution conditions are different, write to the author to ask
+ for permission.
+ For software which is copyrighted by the Free Software Foundation, write
+ to the Free Software Foundation; we sometimes make exceptions for this.
+ Our decision will be guided by the two goals of preserving the free status
+ of all derivatives of our free software and of promoting the sharing and
+ reuse of software generally.
+ 
+\end_layout
+
+\begin_deeper
+\begin_layout Subsection*
+\noindent
+NO WARRANTY 
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
+ THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
+ PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER
+ EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
+ YOU.
+ SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
+ SERVICING, REPAIR OR CORRECTION.
+ 
+\end_layout
+
+\begin_layout Enumerate
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING
+ ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
+ THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS
+ OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
+ THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY
+ OF SUCH DAMAGES.
+\end_layout
+
+\begin_layout Section*
+END OF TERMS AND CONDITIONS 
+\end_layout
+
+\begin_layout Subsection*
+How to Apply These Terms to Your New Programs
+\end_layout
+
+\begin_layout Standard
+If you develop a new program, and you want it to be of the greatest possible
+ use to the public, the best way to achieve this is to make it free software
+ which everyone can redistribute and change under these terms.
+ 
+\end_layout
+
+\begin_layout Standard
+To do so, attach the following notices to the program.
+ It is safest to attach them to the start of each source file to most effectivel
+y convey the exclusion of warranty; and each file should have at least the
+ ``copyright'' line and a pointer to where the full notice is found.
+ For example:
+\end_layout
+
+\begin_layout Quote
+One line to give the program's name and a brief idea of what it does.
+ Copyright (C) (year) (name of author) 
+\end_layout
+
+\begin_layout Quote
+This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your option)
+ any later version.
+ 
+\end_layout
+
+\begin_layout Quote
+This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+ 
+\end_layout
+
+\begin_layout Quote
+You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
+\end_layout
+
+\begin_layout Standard
+Also add information on how to contact you by electronic and paper mail.
+ 
+\end_layout
+
+\begin_layout Standard
+If the program is interactive, make it output a short notice like this when
+ it starts in an interactive mode: 
+\end_layout
+
+\begin_layout Quote
+Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
+ with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it under certain
+ conditions; type `show c' for details.
+ 
+\end_layout
+
+\begin_layout Standard
+The hypothetical commands `show w' and `show c' should show the appropriate
+ parts of the General Public License.
+ Of course, the commands you use may be called something other than `show
+ w' and `show c'; they could even be mouse-clicks or menu items -- whatever
+ suits your program.
+ 
+\end_layout
+
+\begin_layout Standard
+You should also get your employer (if you work as a programmer) or your
+ school, if any, to sign a ``copyright disclaimer'' for the program, if
+ necessary.
+ Here is a sample; alter the names: 
+\end_layout
+
+\begin_layout Quote
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovisi
+on' (which makes passes at compilers) written by James Hacker.
+ 
+\end_layout
+
+\begin_layout Quote
+(signature of Ty Coon)
+\newline
+1 April 2006 
+\newline
+Ty Coon, President of Vice 
+\end_layout
+
+\begin_layout Standard
+This General Public License does not permit incorporating your program into
+ proprietary programs.
+ If your program is a subroutine library, you may consider it more useful
+ to permit linking proprietary applications with the library.
+ If this is what you want to do, use the GNU Library General Public License
+ instead of this License.
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem [1]{key-1}
+Olson, P., G.A.
+ Glatzmaier (1995), Highly supercritical thermal convection in a rotating
+ spherical shell: centrifugal vs.
+ radial gravity.
+ 
+\emph on
+Geophys.
+ Astrophys.
+ Fluid Dyn.,
+\series bold
+\emph default
+ 
+\series default
+\emph on
+70
+\series bold
+, 
+\series default
+\emph default
+113-136
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem [2]{key-2}
+Olson, P., G.A.
+ Glatzmaier (1995), Magnetoconvection in a rotating spherical shell: structure
+ of flow in the outer core.
+
+\emph on
+ Phys.
+ Earth Planet Int., 92, 
+\emph default
+109-118
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem [3]{key-3}
+Olson, P., G.A.
+ Glatzmaier (1996), Magnetoconvection and Thermal Coupling of the Earth's
+ Core and Mantle.
+ 
+\emph on
+Phil.
+ Trans.
+ R.
+ Soc.
+ Lond., A354,
+\emph default
+ 1413-1424
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem [4]{key-4}
+Olson, P., U.
+ Christensen, G.A.
+ Glatzmaier (1999), Numerical Modeling of the Geodynamo: Mechanisms of Field
+ Generation and Equilibration.
+ 
+\emph on
+J.
+ Geophys.
+ Res., 104
+\emph default
+, 10,383-10,404
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem [5]{key-5}
+Christensen, U., P.
+ Olson, G.A.
+ Glatzmaier (1999), Numerical modelling of the geodynamo: a systematic parameter
+ study.
+ 
+\emph on
+Geophys.
+ J.
+ Int., 138
+\emph default
+, 393-409
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem [6]{benchmark cases}
+Christensen, et al.
+ (2001), A numerical dynamo benchmark.
+
+\emph on
+ Phys.
+ Earth Planet Int., 128
+\emph default
+, 25-34 (benchmark cases)
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem [7]{key-7}
+Olson, P., G.A.
+ Glatzmaier (2005), Probing the geodynamo.
+ 
+\emph on
+Scientific American 15
+\emph default
+(2)
+\emph on
+, 
+\emph default
+29-35
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem [8]{key-8}
+Christensen, U.R., J.
+ Aubert (2006), Scaling properties of convection-driven dynamos in rotating
+ spherical shells and application to planetary magnetic fields.
+ 
+\emph on
+Geophys J.
+ Int.
+ 166
+\emph default
+, 97-114.
+ 
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem {key-9}
+ Backus, G., Parker, R., Constable, C.
+ 
+\emph on
+Foundations of Geomagnetism
+\emph default
+, Cambridge University Press, 1996 
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem {key-10}
+ Merrill, R.T., McElhinny, M.W., McFadden, P.L.,
+\emph on
+ The Magnetic Field of the Earth, Paleomagnetism, the Core, and the Deep
+ Mantle
+\emph default
+, Academic Press, 1998 
+\end_layout
+
+\end_body
+\end_document



More information about the cig-commits mailing list