[IMAGE: horizontal bar]
[IMAGE: Canadian Institude for Theoretical Astrophysics]
[IMAGE: horizontal bar]
Arnold I. Boothroyd:   [Home]   [Papers/programs/data]   [Contact]

Fortran Subroutines for OPAL Stellar Opacities:

[IMAGE: Kappa; LINK: go to Download] [Download below]

NOTE: the present 7 September 2007 version now includes additional molecular opacity tables, as well as an example of an interactive driver program (plus a couple of minor bug-fixes from the 6 April 2007 version).
[As of 29 March 2007, the subroutines include optional extension to high densities via the updated Potekhin et al. (2006) conductive opacities, and to low temperatures via the updated Ferguson et al. (2005) molecular opacities.]
[As of 9 July 2018, three opacity files stored under incorrect filenames have been corrected (namely, the files 'AGS04hz_OFe.5_W95hz', 'AGS04hiCNONe_OFe.5_W95hz', and 'AGS04vhCNONe_OFe.5_W95hz' were corrected to become 'AGS04hz_OFe.5_W95', 'AGS04hiCNONe_OFe.5_W95', and 'AGS04vhCNONe_OFe.5_W95', respectively).]

Available below are a set of Fortran subroutines (in a downloadable plain text Fortran file), and a number of sets of opacity files.
    - These Fortran subroutines are designed to read in the 1995 OPAL astrophysical opacities (from the OPAL opacity files "Gz???.x??" and "GN93hz"), and to subsequently interpolate them in metallicity as well as in temperature, density, and mass fractions of hydrogen and of "excess" carbon and oxygen (Z, T6, R, X, exC, exO: where R=rho/T6^3).
- Opacity effects due to CNO variations at a given Z value (resulting from nuclear burning) can also be included, given the CNO-varied opacity files listed below.
- At the time the opacity files are read in, interpolation in [O/Fe] may be performed if desired (using "W95hz", "C95hz", "Alrd96a2", or some other non-CO-rich OPAL opacity file that has non-zero [O/Fe]).
- Opacities appropriate to mixes other than the Grevesse and Noels 1993 solar composition can be used, either by using the alternate opacity files listed below or by having the Livermore OPAL page compute a new set of opacity tables.
- A Fortran test program is also available below, to check that things are working correctly on your computer/compiler.
- For convenience, extension is possible via low-temperature molecular opacities and via high-density conductive opacities
    - [Note that the test program available further below does not presently test the molecular and conductive opacities.]

Brief History of Program Updates:
- As of 7 September 2007, if the user asks for molecular opacities to be included and specifies a non-zero [O/Fe] value, then the alpha-enhanced GS98 molecular opacity tables of Ferguson et al. will be checked for (in preference to their S92AE table) when reading the molecular opacities: this changes the default behavior for this case, and can lead to slightly different low-temperature opacities when [O/Fe] is non-zero.
- The interactive example driver program had a minor bug prior to 5 September 2007 (and the table-creation example driver program was not available prior to this date).
- Some versions prior to 26 August 2007 had a bug that led them to fail to notice out-of-range input metallicity values Z (returning spurious opacity values in some such cases); this is now fixed.
- Versions prior to 6 April 2007 had less-smooth extrapolation in temperature and density, and thus a less-smooth switchover between OPAL and conductive opacities (and also a minor CNO-interpolation bug, which occurred only at a hydrogen mass fraction of X = 0.03); these are now fixed.
- Prior to 29 March 2007, only the Hubbard and Lampe (1969) plus Itoh et al. (1984) conductive opacities were available [the updated (Potekhin et al. 2006) conductive opacities have now been added].
- Prior to 24 March 2007 (but only on or after 2 February 2007), there was a bug yielding errors in the Hubbard and Lampe (1969) conductive opacities; this is now fixed.
- Prior to 2 February 2007, only the outdated (Alexander and Ferguson 1994) molecular opacities were allowed [the updated (Ferguson et al. 2005) molecular opacities have now been added].
- Prior to 21 September 2006, the (optional) switchover to conductive opacities was not handled correctly; this is now fixed.
- Prior to 6 September 2006, no conductive or molecular opacities were available at all.
- If you used this program to produce unformatted (binary) opacity dumpfiles for later use, any opacity dumpfiles produced with a program version prior to 6 September 2006 are incompatible with later program versions (and would have to be recomputed).


OPAL opacity files required by the above subroutines:

All of the required opacity files are available below. The OPAL opacity files can also be obtained at the Livermore OPAL page (see C. A. Iglesias and F. J. Rogers 1996, Astrophysical Journal, 464, 943) [the (optional) updated conductive and molecular opacity files can also be obtained at the Potekhin and Ferguson web pages, respectively].
- The relevant compositions for these opacity files are listed in the manual (and in the comments to the Fortran files).
- The md5sum values [to check downloaded files] for all 77 OPAL opacity files are listed in the plain text file OPALmd5sum.txt
- The md5sum values for the new and old conductive opacities [and the old (1994) molecular opacities] are listed in the plain text file MOLCONDmd5sum.txt
- The md5sum values for the 1705 Ferguson et al. molecular opacity files [in subdirectories as obtained from the OPALkappa.tar files below] are listed in the plain text file MOLSUBmd5sum.txt
- The md5sum values for each individual set of 155 Ferguson et al. molecular opacity files can be obtained from their table further below

ALTERNATIVELY: You can download files individually below, either in gzip-compressed form or as ordinary plain text files:


BACK to papers/preprints ; or RETURN TO Arnold Boothroyd home page