How to remake the standard set of mesa opacity tables for release.

   If you want to bump the version to force reloading:
      change table_version in the inlist files
      change min_version in load_co_kap.f in kap/private

   ./rebuild_all
   ./build_4_export
   
   optionally, install the new ones now
   
   cd ..
   ./build_data_and_export






How to preprocess your own opacity tables for use with MESA.


1. MESA kap/preprocessor requires three types of opacity tables as input:
	a) OPAL Type 1 (fixed heavy element mixture) -- one table
	b) OPAL Type 2 (varying C&O mass fractions)  -- many tables
           see http://opalopacity.llnl.gov/ for a&b
	c) Ferguson et al. (2005) low-T/molecular    -- many tables
           see http://webs.wichita.edu/physics/opacity/
       [d) Alexander & Ferguson (1994) -- same details as (c)]


   The file kap_input_data.tar.bz2 contains a variety of these including
   tables for GN93 and GS98 solar abundance mixtures as well as some GS98
   tables with different levels of [alpha/Fe] enhancement.
   
   The mk script will install unpack the input tables into kap_input_data.
   Look at the directories in kap_input_data/ to install your own tables.

2. To preprocess a set of tables, first run the mk script to build the
   preprocessor.  This will also upack the input tables if they do not
   already exist.

3. Edit the inlist according to your desired set of input tables.
   &kappa

      !default values of namelist variables
         !directories
         output_dir = 'data/kap_data'                   <-- where to put the MESA tables
         opal_data_dir = 'kap_input_data/opal'          <-- where to find the OPAL tables
         ferg_data_dir = 'kap_input_data/wichita/gs98'  <-- where to find the low-T tables
         
         !input file names
         opal_type1_table = 'GS98.OP17'                 <-- name of the input Type1 table to use
         ferg_prefix = 'gs98'                           <-- prefix of the input low-T tables

         !output options
         table_prefix = 'gs98_OP'                       <-- prefix for the MESA tables
         header_info = 'fixed metal distribution -- based on Grevesse & Sauval (1998) solar abundances'
         co_header_info = 'C/O enriched -- based on Grevesse & Noels (1993) solar abundances'
         table_version = 20

   /

       (Leave table_version alone unless you know what you're doing.)

   Currently, the Type 2 tables are fixed to the GN93 set.  If you want to change
   this, you will have to edit the source code.  Feel free to ask the mesa-developers
   mailing list (mesa-developers@lists.sourceforge.net) for guidance.

   If you wish to process opacity files using the older Alexander & Ferguson low-T opacities,
   set ferg_data_dir='kap_input_data/wichita/af94', ferg_prefix='g', and add AF94_lowT=.true.
   to the inlist. AF94 tables assume the GN93 abundances so it is a good idea to use GN93hz for 
   the OPAL type 1 table.

4. Execute the ./rn_all script to create a full set of tables according to the current inlist settings.

5. The output tables will be located in ./data/kap_data (or wherever you sent 
   them with with 'output_dir' in the inlist.  To make them readily available 
   to MESA/star, put the output tables into mesa/data/kap_data and set kappa_file_prefix
   in the controls namelist to whatever name you gave table_prefix above.





