PyREC scaffolding (from YREC development, 7be4133)/ surfopac.fGlossary

surfopac.f

44 lines · 1 definitions · on GitHub (7be4133)

Python version: surfopac.py, 23 lines, on the right (switch to Python above the code).

Variables on this page (1)

lopal95

Purpose

SURFOPAC sets up the opacity tables for the surface hydrogen abundance $X$ (XENV): if the OPAL 1995 tables are switched on (LOPAL95), it calls the routine that interpolates them in $X$. Its comment says the tables must already have been read. The low-temperature tables of Ferguson et al. (2005) (LALEX06), now the only molecular tables, need no set-up here: GETALEX06 rebuilds their table itself, through ALEX06TAB, whenever the $X$ or $Z$ of a point differs from that of the current table by more than $10^{-8}$ (settled from the code, Nov 9, 2026: getalex06.f, lines 26–33↗).

How it fits

  • Who calls it: STARIN, when the starting model is ready, and HPOINT, when the surface $X$ (HCOMP(1,M)) has changed by more than $10^{-8}$.
  • What it calls: OP95XTAB (OPAL95, if LOPAL95).
  • Modules: NMLPAR_MOD, for the namelist switch LOPAL95, read by PARMIN.

Definitions

subroutineSURFOPAC

lines 6–44 · GitHub

Interpolates the OPAL 1995 tables to the surface $X$, if they are switched on.

Uses modules NMLPAR_MOD

Called by HPOINT, STARIN

Flowchart of its calls, in order (1)

Change log

The changes since rp_1

Changed since rp_1. The OPAL 1992 and Alexander 1995 tables were removed from the code, and with them the calls to LL4TH and ALX8TH; COMMON NEWOPAC gave way to NMLPAR_MOD; IMPLICIT NONE. Question 1 of rp_1 (why the Alexander 2006, LAOL 1989 and Kurucz 1990 tables need no surface-$X$ set-up) is settled in part: LAOL 1989 and Kurucz 1990 are gone, so only Alexander 2006 remains, and the question is narrowed to it.