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

op954d.f

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

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

Variables on this page (18)

bd, bdd, bt, btt, bx, bz, cappa2, jd, jt, jx, jz, lexh, lexth, lextl, nz, rho_t63l, rho_t63ll, rlh

Purpose

Gets the OPAL95 opacity from the full set of tables (MHP 7/98): a four-dimensional interpolation in $Z$, $X$, $\log T$ and $\log R$ ($R = \rho/T_6^3$). It is the general case, used when the point's composition matches neither pre-interpolated table.

How it fits

  • Inputs: the full set in LLOT95A_MOD: the grids TGR, XXG, R0GR, ZZG, the opacities CAPPA2(126,70,19), and for each $Z$ the offset of its first table NZ (its number of $X$ tables NUMXM is in the module too, but unused? by this or any routine) (loaded by LL95TBL); the indices, weights and extrapolation data from GETOPAL95 in OP95INTERP_MOD (formerly /OP95INDX/, /OP95FACT/ and /OP95EXT/; BZ, BX(K,·), and $\log R$ as RHO_T63L).
  • Who calls it: GETOPAL95, when the point's $Z$ differs from the table's ZTAB, and always when the acoustic depth is computed (LADON and LACOUT; GETOPAL95's comment, JVS 04/11).
  • Outputs: $\kappa$, $\log\kappa$, QOD, QOT, as in OP952D.

The method

For each of the four nearest $Z$ (table offset NZ(JZ+K-1)) and, within it, the four nearest $X$ (JX(K,J), which may differ between $Z$ values since high-$Z$ sets lack some $X$ tables), the $\log R$ and $\log T$ interpolation of OP952D; then four-point interpolation in $X$ (weights BX(K,·)) and in $Z$ (weights BZ), and the conversion of $\partial\log\kappa/\partial\log T$ to constant $\rho$.

Table layout. The header explains it: "tables are incremented in sets of NZ*NX," so the tables of the third metal abundance ($3\times10^{-4}$) are numbers 21–30; at high $Z$ some $X$ tables are missing ($X < 0.9$ for $Z = 0.1$). The offsets NZ (0, 10, …, 100, 109, 118, in LL95TBL) give $Z = 0.06$ and $0.08$ nine slots each and $Z = 0.1$ eight. LL95TBL stores the tables at $X = 1 - Z$ for $Z$ = 0.06 and 0.08 at NZ(IZ)+10, over the $X = 0$ tables of the next $Z$; this routine reads them with the same indexing, so it finds $X = 1 - Z$ where it was stored, but takes $X = 0$ at $Z$ = 0.08 and 0.1 from the wrong tables (lines 45–48↗; a suspected bug, listed on LL95TBL's page, with a fix).

Definitions

subroutineOP954D

lines 6–114 · GitHub

Uses modules LLOT95A_MOD, OP95INTERP_MOD

Called by GETOPAL95

Change log

The changes since rp_1

Changed since rp_1. Declarations only: COMMON blocks to modules (the three interpolation blocks merged into OP95INTERP_MOD), IMPLICIT NONE; the extrapolation's $\log R$ and its boundary value are renamed RHO_T63L and RHO_T63LL (formerly RL, RLL, names that clashed with the radius elsewhere). No question is settled.