Setting up:

Type 'make' at the athena prompt.  This should compile the fortran
code.  

----------------------------------------------------------------------

Running the code:

You may play with the code, and modify it if you want to see how things
work.  Run it however you want.  Some simple ways to run the program 
are listed below.

--------
Method 1:
--------
You can run the code directly from the prompt by typing './mc2'.  The
program will prompt you for some constants, and output useful data
into a number of text files and to the term window.  

--------
Method 2:
--------
You can use the matlab script 'do_run.m'.  It has the input parameters
listed at the top of the file with some typical initial quantities.
Open 'do_run.m' in a text editor, change the input data as you wish,
and then type

>> do_run

at the matlap prompt.  The script makes some simple checks on the
parameters (which you may disable if you wish), and then writes the
parameters to the file 'input_data.txt'.  The line

!./mc2 < input_data.txt >! output_file.txt

runs the code, capturing output to output_file.txt.  'do_run' then
extracts some of the more useful information to 'output_file2.txt' and
displays it in the matlab window.  You may examine all of
'output_file.txt' at your leisure.  It has some information not
available elsewhere.  'do_run' saves to the structure 'run_data' the
following information:

1.  Most of the information from 'output_file.txt'
2.  All of the data from the files mc2 creates.
3.  All of the input parameters for the run. 

If you want to save this information, you should save run_data to
another strucutre before you use 'do_run' again.  This can be done by
the following command:

>> my_struct = run_data;

---------------------------------------------------------------------

Plotting the data
-----------------

Again, you may use any method you wish, but some suggestions are given below.

--------
Method 1:
--------
Use the matlab function 'load_data' to read the output files that mc2
produces.  

>> data = load_data;

will load some data from the mc2 output files into the structure
'data'.  It does not get information about input parameters,
viscosity, or pressure from the run.  You must take care of this
yourself if you did not use 'do_run'.  Then use 'make_plots'

>> make_plots(data)

to produce three figure windows with various plots.  You can make your
own plots by, for example,

>> plot(data.xcell,data.ave_ux)

--------
Method 2:
--------
If you used the do_run script to do your run, the data is already loaded
in the structure 'run_data'.  Thus you can type

>> make_plots(run_data)

or 

>> plot(run_data.xcell,run_data.ave_ux)

--------
Method 3:
--------
If you wish, you may use the script 'plotdsmc':

>>plotdsmc

This loads the files that mc2 makes: xcell.txt, ave_n.txt, ave_ux.txt,
ave_uy.txt, ave_uz.txt, and ave_T.txt and plots the data like
make_plots.  However, plotdsmc pollutes your namespace more than
make_plots.



