-
Notifications
You must be signed in to change notification settings - Fork 5
MAG is a serial version of a rotating spherical convection/magnetoconvection/dynamo code, developed by Gary Glatzmaier and modified by Uli Christensen and Peter Olson.
License
geodynamics/mag
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This version of MAG contains a serial version of Gary Glatzmaier's rotating spherical convection/magnetoconvection/dynamo code, modified by Uli Christensen and Peter Olson. The code solves the nondimensional 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 continuity equation for velocity and Gauss' law for magnetic field, and the induction equation for the magnetic field. All variables are nondimensional; 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 are selected as options. Mag uses toroidal-poloidal decomposition for velocity and magnetic field with explicit timesteps.Linear terms are evaluated spectrally (spherical harmonics plus Chebycheff polynomials in radius) and nonlinear terms are evaluated on a spherical grid. Additional technical information is found in: Olson, P. & Glatzmaier, G.A.,Geophys Astrophys Fluid Dyn 92, 109, 1995; Phil Trans R Soc Lond A354, 1413, 1996 Olson, P. Christensen, U, Glatzmaier, G.A. J Geophys.Res. 104, 10383, 1999 Christensen, U, Olson, P, Glatzmaier, G.A. Geophys. J. Int 138, 393, 1999 Christensen, et al, Phys Earth Planet Int 128, 25, 2001 (benchmark cases) (plus more recent papers by the same authors) This directory contains: 1) The set of FORTRAN source code files with suffix ".f". This includes sample grid parameter value files with names like "param32s4.f" for a coarse grid (up to 32 spherical harmonics, 24 radial grid intervals, and 4-fold symmetry in phi). 2) A makefile named "makefile". 3) Two documentation files named "MAGDOC" and "VARIABLES". The first gives an overview over the components of the code, input parameters, structure of output files, etc. The second explains the meaning of many of the important variables and arrays used in the code. Both documentation files may not be entirely up-to-date!! 4) Sample files with input parameters, par.XXX. The case par.bnch0 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. An other input file is par.bnch1, the dynamo "benchmark1" case in Christensen et al. 5) Output files "ls.benchX", "l.benchX", "g.benchx", and "d.benchx" obtained with short runs on a Appro (Opteron) workstation Explanations of the contents of these files are found in MAGDOC. For test-running the code, do the following steps: 0) Uncompress all files, and create a path (see PATHMAKE) 1) ln -sf param32s4.f param.f [Link grid parameter file to "param.f" which enters through "include" state- ments into most subroutines]. 2) make [Compile the program]. 3) mv magx magx32s6 [Renaming, optional] 4) magx32s4 <par.bnchX >p.benchX & [Background executin the bench input file] (If there is a problem with the par.bnch files, modify the last lines, which read: icour=4 &end &bounds &end (Also, instead of the "&", perhaps a "$" may be required). 5) Compare output files 6) REMEMBER TO DELETE, MOVE, or RENAME ALL OUTPUT FILES IN CURRENT DIRECTORY BEFORE RE-RUNNING WITH THE SAME "output" FILENAME -- RETAINING SAME-NAMED OUTPUT FILES IN THE CURRENT DIRECTORY CAUSES MAG TO CRASH!!
About
MAG is a serial version of a rotating spherical convection/magnetoconvection/dynamo code, developed by Gary Glatzmaier and modified by Uli Christensen and Peter Olson.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published