PyREC scaffolding (from YREC development, 7be4133)
YREC at 7be4133: 282 source files · 47,169 lines · 290 definitions. Generated from the code by codemap.py; the code was run only to check the suspected bugs. Each file has a page; each function, class or method a section, with links to what it calls and from what calls it.
Glossary: the code's 898 shared variables, by module, each with what it holds; every page lists the ones it uses.
Suspected bugs: those that running YREC showed to change a star, stop a run, or write wrong output.
A new design: Kaili Cao's object-oriented design, to be implemented later.
Overview
What it is. YREC, the Yale Rotating Evolution Code, at its development branch's commit 7be4133 (Nov 2, 2026; the map was written for 09c3b9b and moved on Oct 31 and Nov 9): 282 fixed-form Fortran files in src/, about one routine per file. 85 of them are modules (*_mod.f), which replaced the COMMON blocks of the release rp_1 (where this site began): routines share data through the modules they USE (see the Modules page; every module variable is in the Glossary, under its name in lower case) as much as through arguments, so a routine's modules matter as much as its calls. Since rp_1, the development branch has also removed legacy options (the MHD equation of state, the OPAL 1995 and 2001 equations of state, the Kurucz 1990, LAOL89 (all but its pure-metal table), Alexander 1995 and OPAL92 opacities, and the Monte Carlo loop), with 58 files, and fixed a number of bugs; each page's explanation ends with a "Changed since rp_1" line.
Where to start. main.f is the main program (it has no PROGRAM statement), and its page walks through the whole run. In order, it:
- reads the run's settings and tables: PARMIN, then SETUPS;
- optionally sets up a calibration: of the Sun (SETCAL) or of a star of given $L$ and $T_\mathrm{eff}$ (SETSCAL);
- for each "kind card" (one run of the job), reads the starting model (STARIN), writes the headers (WRTHEAD) and sets the first time step (HTIMER);
- evolves it model by model. Each step: mass loss (MASSLOSS); mixing, burning and settling (MIX, with KEMCOM and GRSETT); rezoning (HPOINT); the structure, by four levels of the Henyey iteration (CRRECT), where a divergence ends the run (despite a comment about cutting the step, see main.f); convective mixing (MIXCZ); rotation (GETW, FPFT); lithium burning (LIRATE88, LIBURN); the next time step (HTIMER); output (WRTOUT); and the stop conditions. The composition is not among the Henyey unknowns: MIX changes it over the step with the current structure, the Henyey iteration then solves for $P$, $T$, $r$, $L$ with the composition fixed, and levels 3 and 4 redo the burning and mixing, from the start-of-step composition, with the new structure (an operator split; CRRECT, step 2);
- ends each kind card with PUTSTORE and the calibration checks (CHKCAL, CHKSCAL).
How a run goes. (From YREC's documentation, yrec.readthedocs.io, as the code does it.) One call, yrec control.nml1 physics.nml2, runs one job on one star. PARMIN reads the two namelists: the control namelist names the starting model, the tables and the output files (paths may use {YREC_INPUT}, {YREC_START}, {YREC_OUTPUT}, filled from environment variables) and lists the job's runs, the "kind cards"; the physics namelist chooses the physics (equation of state, opacities, atmosphere, nuclear rates, convection and overshoot, diffusion, rotation) and the numerical controls. SETUPS reads the tables. Since YREC is a relaxation code, every job starts from a converged model, from the library in input/models/ (most often one at the deuterium-burning birthline) or from an earlier job's .last file, read by STARIN.
Each kind card then rescales the model to the wanted mass, composition and mixing length (RSCALE; with a zero time step, or with evolution for a pre-main-sequence model, which has no static solution unless deuterium burning carries its luminosity, see main.f, step 3 of the evolution step), or evolves it, model by model, until a number of models, an age or a central abundance is reached.
After each model, WRTOUT appends a line to the .track file (the global properties over time) and numerical details to .short, rewrites .last (the latest model, to restart from), and, as asked, writes snapshots of the structure to .store (PUTSTORE) and pulsation files (WRTMOD). A grid of stars is many such jobs, run by scripts or by the Python wrapper (pip install yrec), which runs the same executable. The test suite (testsuite/, run with pytest) runs a set of such jobs, solar models, brown dwarfs and stars of 0.1 to 9 $M_\odot$ evolved to various stages, and compares their outputs with stored reference outputs; it is how a change to the code is checked.
The code's conventions. Changes in the source carry a comment with their date and the author's initials ("MHP 10/24," "G. Somers 11/14," "KC 2025-05-31," and, for changes made with an AI assistant, "MHP via Claude"), which is why the pages list them. Variable names still follow the old implicit types (A–H and O–Z real, I–N integer, L logical), although every file now declares its types under IMPLICIT NONE. Character strings stay out of the modules, as they once stayed out of the COMMON blocks: file names are read and tied to unit numbers in PARMIN, and the few strings used elsewhere (the version, the mixture's name) are passed as arguments through the main program. The namelist variables live in two modules, NMLPAR_MOD and NMLBYPASS_MOD, with their defaults. A physics routine returns its derivatives with its value (an opacity with its derivatives in density and temperature, for example), so an alternative must return the same set.
Reading this site
Each file's page has an outline in the margin, its text on the left, and the whole file's code on the right, which stays in view: the Fortran, re-indented by its loops and IF blocks (switch to "as in YREC" for the code as written), or its Python translation, whose blocks name the Fortran lines they translate. Every link to lines (in a question, a bug, a call) shows those lines in the code, and a ↗ beside it opens them on GitHub. Each routine's section gives the modules it uses (each linked to the module's page, which lists every unit using it), what calls it, and a flowchart of its calls in the order of the source, nested in boxes for its loops and branches; lines with a compiler's warning (gfortran) or a linter's finding (ruff, in the Python) are marked. Calls are found by reading the code, not by running it. Only src/ is mapped; the .f files under input/, tools for the data tables, are left out. Many files carry changes marked "KC 20…" (Kaili Cao's), with the old lines kept as comments beside them, which is where they are read.
A reading path
A route through the 15 topics of Files by topic, for a newcomer who wants to read every page. Within each topic, read the files named here first, then the rest in the order their topic's table lists them (the routines, then the modules, which are short and best read beside the routines that use them).
- The main program and the run's control: main.f first, its page walks through a whole run; then rscale.f, and the calibrations setcal.f and chkcal.f.
- Input: parmin.f with nmlpar_mod.f (what every setting means), then setups.f and starin.f.
- The structure equations and the Henyey solver: crrect.f, coefft.f (the four equations), then reduce.f and hsolve.f.
- Atmospheres, the envelope and the boundary conditions: surfbc.f (the envelope triangle), envint.f, then qenv.f and qatm.f.
- The equation of state: eqstat.f, eqstat2.f (the choice and blending of the tables), then eqsaha.f.
- Opacities: getopac.f, then setupopac.f and getopal95.f.
- Nuclear reactions, energy generation and neutrinos: engeb.f, rates.f, kemcom.f.
- Convection, overshoot and the mixing of composition: mix.f (the composition over a step), convec.f, tpgrad.f (mixing-length theory), oversh.f, mixcz.f.
- The time step and rezoning: htimer.f, hpoint.f.
- Output: wrtout.f, wrthead.f, putstore.f.
This completes a run without rotation or diffusion. The remaining topics are options, each switched on by the namelists:
- Microscopic diffusion and settling: grsett.f (the older treatment), then microdiff.f (the newer one) and thdiff.f (Burgers' equations).
- Rotation, the structure of a rotating star: fpft.f, shape.f, momi.f, getrot.f.
- Rotation, angular-momentum transport and rotational mixing: getw.f (the driver), midmod.f, seculr.f, vcirc.f, codiff.f.
- Angular-momentum loss and mass loss: mwind.f, gettau.f (the overturn time), massloss.f, mdot.f.
- Numerical utilities: as the other pages call them; intrp2.f, interp.f and osplin.f are the most used.
What the explanations found
Each page has questions for the experts, placed where their context is, and, where the code seems wrong, suspected bugs, each with a possible fix in the code's own style, each checked by running YREC (Nov 9-10, 2026: what reaches it, whether its faulty condition occurred, and what its fix changed), and each marked by what the runs showed; each topic of Files by topic lists its suspected bugs and questions in tables of their own (being reorganized this way page by page, from Nov 9, 2026; the opacity pages are done). The development branch has already fixed several found at rp_1 (for example, MASSLOSS called MDOT with one argument too many, and SECULR's whole-domain option was never switched on). Some that remain: GRSETT's convergence test ignores negative changes, and its coefficient correction sits one midpoint off; in SNEUT, cap-cap stands where cap*cap is expected; VCIRC's restored μ-current option divides by the speed of light CC, which is never set; and the acoustic-depth output (CALCAD) never runs, since nothing sets its switch LACOUT (see ACDPTH_MOD).
Found in passing. Four CALLs name routines not in src/: DERIV (in MMID, a routine passed as an argument, QENV or QATM) and, in PARMIN, GETARG, GETENV and SYSTEM (compiler extensions for the command line, the environment and the shell).
Where the overhaul stands
An overhaul goes in four stages: a documentation site for the old code (this part of the site); the documentation of a new code on the same site, with references to the old one; the new code, with benchmarks (same inputs, same outputs); and a paper. The first stage is complete for rp_1, where every file had an explanation with questions for the code's experts and every page went through one round of review and revision; a page's review findings, folded at its end, refer to rp_1. On Oct 27 every page was moved to 09c3b9b, each with its Python translation in the current structure (the pyrec repository): the translation is checked only by compiling it, and is to be tested routine by routine against the Fortran. On Oct 31 the pages moved to a8a5950, with YREC's public documentation, the YREC paper's notation, the files grouped by topic with a reading path, and the glossary. On Nov 9 they moved to 7be4133, after a round of bug fixes by YREC's developers; each page changed since ends with a "Changed since a8a5950" line. The second stage is drafted: a new design, a high-level design on one page (Nov 9, 2026): a Model holding the star's state and its history, with its physics and numerical methods as families of callables, each a Python base class, in Python with Numba.
Notation
The pages write the physics in the symbols of the YREC paper (Pinsonneault et al., "The YREC Stellar Evolution Code: Public Data Release," YREC_Public_Data_Release_Paper_revised.pdf in the repository's root), and the code's variables in code font. The paper names some quantities only in words; for those, marked *, the pages use the usual symbol. Many arrays hold logarithms (base 10) of the quantity, per shell. The code works in cgs, except that HL is in $L_\odot$ and is not a logarithm, SMASS is in $M_\odot$, the age DAGE is in Gyr and the step DDAGE in yr (DELTS, the same step, in s).
| Symbol | Meaning | Fortran names |
|---|---|---|
| $m$* | mass coordinate (mass inside a shell); $M$ the total mass | HS ($\log m$), HS1 ($m$, g), HS2 (the shell's mass $\Delta m$, g); HSTOT ($\log M$), SMASS ($M/M_\odot$) |
| $r$, $R$ | radius of a shell; $R$ the star's radius | HR ($\log r$); RL ($\log R/R_\odot$) |
| $L$ | luminosity (at a shell, or the star's) | HL ($L/L_\odot$); BL ($\log L/L_\odot$) |
| $P$, $T$, $\rho$ | pressure, temperature, density | HP, HT, HD (their logarithms) |
| $T_\mathrm{eff}$ | effective temperature | TEFFL ($\log T_\mathrm{eff}$) |
| $\kappa$ | opacity (Rosseland mean) | O, OL ($\log\kappa$), with QOD, QOT its derivatives |
| $\nabla$, $\nabla_\mathrm{ad}$, $\nabla_\mathrm{rad}$ | actual, adiabatic and radiative temperature gradients, $d\ln T/d\ln P$ | DEL, DELA, DELR (from TPGRAD); per shell SDEL(2,·), SDEL(3,·), SDEL(1,·) |
| $H_p$ | pressure scale height | computed where needed (HSUBP, TPGRAD) |
| $X$, $Y$, $Z$ | mass fractions of hydrogen, helium and metals | HCOMP(1,·), HCOMP(2,·), HCOMP(3,·) (HCOMP(4..15,·) the tracked isotopes: ³He, CNO, ²H, ⁶Li, ⁷Li, ⁹Be); the envelope's XENV, ZENV, YENV |
| $\mu$ | mean molecular weight | RMU $=\mathcal{R}/\mu$ (the gas constant over $\mu$), with its terms AMU $=\mu_\mathrm{ion}^{-1}$ and EMU $=\mu_e^{-1}$ (in the equation of state) |
| $Q_{\rho T}$, $Q_{\rho P}$ | $(\partial\ln\rho/\partial\ln T)_P$ and $(\partial\ln\rho/\partial\ln P)_T$; in Kippenhahn, Weigert & Weiss's notation $-\delta$ and $\alpha$ | QDT, QDP (their derivatives QDTT, QDTP) |
| $c_P$* | specific heat at constant pressure | QCP (its derivatives QCPT, QCPP) |
| $\beta$* | ratio of gas to total pressure, $P_\mathrm{gas}/P$ | BETA, BETAI ($1/\beta$), BETA14 ($4(1-\beta)/\beta$ in the Yale equation of state) |
| $\eta$* | electron degeneracy parameter | ETA |
| $\epsilon$* | energy generation rate per gram ($\epsilon_\mathrm{nuc}$ nuclear, $\epsilon_\nu$ neutrino losses, $\epsilon_\mathrm{grav}$ gravitational) | SESUM, SEG(1..7,·), EPSM |
| $\alpha$ | mixing-length parameter (the mixing length in units of $H_p$) | CMIXL (per kind card CMIXLA) |
| $\alpha_c$, $\alpha_e$, $\alpha_m$* | step overshoot of cores, envelopes and intermediate zones, in units of $H_p$ (the paper: "0.2 $H_p$") | ALPHAC, ALPHAE, ALPHAM; the limit by core size BETAC |
| $\Omega$ (the paper also $\omega$) | angular velocity | OMEGA |
| $j$, $I$ | specific angular momentum and moment of inertia of a shell | HJM, HI |
| $\dot M$ | mass-loss rate | DMDT (in MASSLOSS and MDOT) |
| $\tau_\mathrm{cz}$, Ro | convective overturn time and Rossby number | TAUCZ |
| $f_c$ | efficiency of rotational mixing relative to angular-momentum transport | FC |
| $\tau$ | optical depth | in the atmosphere integration (QATM, HRA) |
| $S_0$ | astrophysical factor of a reaction at zero energy | the rate tables of RATES and CROSS_MOD |
Variables on this page (15)
alphac, alphae, alpham, betac, cmixla, epsm, fc, lacout, ldify, lnewdif, sesum, taucz, xenv, yenv, zenv
Files by topic
Modules: the data the units share (85 modules).
The 282 files, in 15 topics, in the order of the reading path (in Reading this site); within each topic the routines come first, in reading order, then the modules that hold its data.
The main program and the run's control
The main program, which runs the job kind card by kind card and model by model, with the rescaling of a starting model and the automatic calibrations of the Sun and of other stars.
8 files · 7 suspected bugs (results/output/fragile) · 16 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| (file level) | main.f | 1236 | 0/0/1 | 4 | ||
| RUNLOOP_MOD | runloop_mod.f | 65 | 10 | |||
| RSCALE | rscale.f | 432 | 1 | 1 | 0/0/2 | 5 |
| SETCAL | setcal.f | 103 | 1 | 1 | 0/0/1 | 3 |
| CHKCAL | chkcal.f | 186 | 1 | 1 | 0/1/1 | 3 |
| SETSCAL | setscal.f | 143 | 1 | 1 | ||
| CHKSCAL | chkscal.f | 179 | 1 | 1 | 0/0/1 | 1 |
| SETVERSION | version.f | 24 | 1 | 1 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
Input: namelists, tables, and the starting model
Reading the two namelists and the tables, the run's settings and constants, and the starting model.
12 files · 15 suspected bugs (results/output/fragile) · 15 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| PARMIN +1 | parmin.f | 1541 | 1 | 1 | 1/2/3 | 5 |
| NMLPAR_MOD | nmlpar_mod.f | 279 | 103 | 1 | ||
| NMLBYPASS_MOD | nmlbypass_mod.f | 118 | 3 | |||
| REMAP | remap.f | 298 | 1 | 1 | 2 | |
| SETUPS | setups.f | 396 | 1 | 1 | 0/0/1 | 2 |
| IOUNITS_MOD | iounits_mod.f | 54 | 65 | 0/0/1 | ||
| CONSTANTS_MOD | constants_mod.f | 75 | 89 | |||
| CONFAC_MOD | confac_mod.f | 29 | 4 | |||
| DIMENSIONS_MOD | dimensions_mod.f | 44 | 142 | |||
| STARIN | starin.f | 1049 | 1 | 2 | 1/1/3 | 3 |
| GETMODEL2 | getmodel2.f | 111 | 1 | 1 | 0/0/1 | 1 |
| GETYREC7 | getyrec7.f | 262 | 1 | 1 | 0/0/1 | 1 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
The structure equations and the Henyey solver
The four equations of stellar structure, their coefficients at each shell, and the Henyey iteration that solves them.
9 files · 2 suspected bugs (results/output/fragile) · 9 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| CRRECT | crrect.f | 313 | 1 | 4 | 0/0/1 | 2 |
| COEFFT | coefft.f | 507 | 1 | 1 | 0/0/1 | 4 |
| PHYSIC | physic.f | 191 | 3 | 3 | ||
| REDUCE | reduce.f | 113 | 1 | 1 | 2 | |
| HSOLVE | hsolve.f | 45 | 1 | 1 | 1 | |
| OLDMOD_MOD | oldmod_mod.f | 43 | 17 | |||
| INTVAR_MOD | intvar_mod.f | 40 | 4 | |||
| SCRTCH_MOD | scrtch_mod.f | 39 | 16 | |||
| CTOL_MOD | ctol_mod.f | 26 | 2 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
Atmospheres, the envelope, and the boundary conditions
The outer boundary condition: the envelope triangle (envelopes integrated at three points around the model's $(\log T_\mathrm{eff}, \log L)$, whose values at the fitting point are fitted by a plane to give the outer boundary condition), the integration of the envelope and atmosphere, and the model-atmosphere tables.
29 files · 17 suspected bugs (results/output/fragile) · 21 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| SURFBC | surfbc.f | 275 | 1 | 1 | 4 | |
| ENVINT | envint.f | 975 | 7 | 7 | 0/2/3 | 2 |
| QENV | qenv.f | 136 | 1 | 2 | 0/0/1 | |
| QATM | qatm.f | 125 | 1 | 1 | ||
| BSSTEP | bsstep.f | 74 | 1 | 2 | 0/0/2 | |
| MMID | mmid.f | 55 | 1 | 1 | ||
| RATEXT | ratext.f | 56 | 2 | 3 | ||
| GETNEWENV | getnewenv.f | 326 | 1 | 1 | 0/0/2 | 3 |
| HRA | hra.f | 34 | 3 | 3 | 1 | |
| SURFP | surfp.f | 155 | 1 | 1 | 0/0/1 | 3 |
| KCSURFP | kcsurfp.f | 164 | 1 | 1 | 0/0/1 | 3 |
| ALFILEIN +1 | alfilein.f | 412 | 1 | 1 | 0/0/2 | |
| ALTABINIT | altabinit.f | 153 | 1 | 1 | 0/0/3 | 1 |
| ALSURFP | alsurfp.f | 327 | 2 | 2 | 2 | |
| ALPRINT | alprint.f | 84 | 1 | 1 | 1 | |
| INTPAR_MOD | intpar_mod.f | 40 | 3 | |||
| QENVMIX_MOD | qenvmix_mod.f | 26 | 2 | |||
| ENVPRT_MOD | envprt_mod.f | 35 | 2 | |||
| ENVSTRUCT_MOD | envstruct_mod.f | 47 | 7 | |||
| ATMPRT_MOD | atmprt_mod.f | 31 | 6 | |||
| ATMSTRUCT_MOD | atmstruct_mod.f | 41 | 2 | |||
| ATMOS_MOD | atmos_mod.f | 26 | 3 | |||
| ATMOS2_MOD | atmos2_mod.f | 36 | 2 | 1 | ||
| ATMOS2C_MOD | atmos2c_mod.f | 35 | 2 | |||
| FAC_MOD | fac_mod.f | 38 | 3 | |||
| CENV_MOD | cenv_mod.f | 27 | 2 | |||
| ALATM01_MOD | alatm01_mod.f | 44 | 4 | |||
| ALATM02_MOD | alatm02_mod.f | 39 | 3 | |||
| ALATM05_MOD | alatm05_mod.f | 27 | 2 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
The equation of state
Pressure, density and the thermodynamic derivatives: the Yale equation of state, the SCV and OPAL 2006 tables, and the blending between them.
25 files · 13 suspected bugs (results/output/fragile) · 26 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| EQSTAT | eqstat.f | 175 | 10 | 13 | 0/0/1 | 1 |
| EQSTAT2 | eqstat2.f | 364 | 2 | 7 | 0/0/1 | 5 |
| EQSAHA | eqsaha.f | 347 | 1 | 2 | 4 | |
| EQRELV | eqrelv.f | 331 | 1 | 2 | 3 | |
| MU | mu.f | 50 | 1 | 1 | 1 | |
| IFERMI12 | ifermi12.f | 61 | 1 | 1 | ||
| ZFERMIM12 | zfermim12.f | 70 | 1 | 1 | ||
| EQSCVE | eqscve.f | 474 | 1 | 5 | 0/0/1 | 2 |
| EQSCVG | eqscvg.f | 337 | 1 | 1 | 1/0/1 | 2 |
| SETSCV | setscv.f | 255 | 1 | 1 | 0/0/2 | 1 |
| OEQOS06 | oeqos06.f | 132 | 1 | 1 | 1 | |
| ESAC06 +1 | esac06.f | 542 | 3 | 6 | 0/0/4 | 1 |
| EQBOUND06 | eqbound06.f | 131 | 1 | 1 | 2 | |
| T6RINTEOS06 | t6rinteos06.f | 105 | 1 | 1 | 1 | |
| QUADEOS06 | quadeos06.f | 42 | 2 | 8 | ||
| RADSUB06 | radsub06.f | 117 | 1 | 1 | ||
| RHOOFP06 | rhoofp06.f | 148 | 1 | 1 | 1 | |
| GMASS06 | gmass06.f | 61 | 1 | 1 | 1 | |
| READCOEOS06 | readcoeos06.f | 163 | 1 | 1 | 0/0/2 | |
| DEBHU_MOD | debhu_mod.f | 31 | 11 | |||
| CCR_MOD | ccr_mod.f | 29 | 2 | |||
| SCVEOS_MOD | scveos_mod.f | 41 | 4 | |||
| AEOS06_MOD | aeos06_mod.f | 52 | 6 | |||
| EEEOS06_MOD | eeeos06_mod.f | 34 | 4 | |||
| EOS06MISC_MOD | eos06misc_mod.f | 72 | 9 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
Opacities
The radiative opacity from the OPAL 1995 and the low-temperature (Ferguson et al.) tables, LAOL89's pure-metal table (FPUREZ, used where $Z > 0.1$ and $\log T > 7$, in helium-burning cores; LAOL89's tables for mixtures are removed), and the conductive opacity.
28 files · 21 suspected bugs (results/output/fragile) · 13 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| GETOPAC | getopac.f | 225 | 7 | 9 | 0/0/2 | 4 |
| SETUPOPAC | setupopac.f | 95 | 1 | 1 | ||
| SURFOPAC | surfopac.f | 44 | 2 | 2 | ||
| GETOPAL95 | getopal95.f | 430 | 1 | 2 | 1/0/2 | |
| LL95TBL | ll95tbl.f | 219 | 1 | 1 | 1/0/0 | 1 |
| OP95XTAB | op95xtab.f | 104 | 2 | 2 | 0/0/2 | 1 |
| OP95ZTAB | op95ztab.f | 126 | 1 | 1 | 0/0/2 | 1 |
| OP952D | op952d.f | 76 | 1 | 1 | ||
| OP953D | op953d.f | 89 | 1 | 1 | ||
| OP954D | op954d.f | 114 | 1 | 1 | ||
| GETALEX06 | getalex06.f | 132 | 1 | 1 | 0/0/1 | 2 |
| READALEX06 | readalex06.f | 141 | 1 | 1 | 0/0/2 | 1 |
| ALEX06TAB | alex06tab.f | 134 | 1 | 1 | 0/0/1 | 1 |
| GTPURZ | gtpurz.f | 135 | 1 | 1 | 0/0/2 | |
| RDZLAOL | rdzlaol.f | 74 | 1 | 1 | ||
| ZSULAOL | zsulaol.f | 51 | 1 | 1 | ||
| CONDOPACP +2 | condopacp.f | 277 | 1 | 6 | 0/0/1 | |
| CONDOPACPINT | condopacpint.f | 109 | 1 | 1 | 3/0/1 | 2 |
| NEWOPAC_MOD | newopac_mod.f | 37 | 4 | |||
| OP95INTERP_MOD | op95interp_mod.f | 51 | 6 | |||
| LLOT95_MOD | llot95_mod.f | 35 | 4 | |||
| LLOT95A_MOD | llot95a_mod.f | 49 | 5 | |||
| LLOT95E_MOD | llot95e_mod.f | 34 | 3 | |||
| ALOT06_MOD | alot06_mod.f | 44 | 3 | |||
| ALOT06ALL_MOD | alot06all_mod.f | 34 | 2 | |||
| GALOT06_MOD | galot06_mod.f | 51 | 3 | |||
| ZLAOL_MOD | zlaol_mod.f | 30 | 3 | |||
| ZSLAOL_MOD | zslaol_mod.f | 29 | 2 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
Nuclear reactions, energy generation, and neutrinos
Reaction rates, energy generation, the burning network, deuterium and the light elements, and neutrino losses.
19 files · 21 suspected bugs (results/output/fragile) · 28 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| ENGEB | engeb.f | 1323 | 3 | 4 | 3/0/1 | 5 |
| RATES | rates.f | 677 | 3 | 3 | 5 | |
| KEMCOM | kemcom.f | 413 | 2 | 4 | 0/0/2 | 6 |
| EQBURN | eqburn.f | 219 | 2 | 3 | 0/0/1 | 1 |
| DBURN | dburn.f | 153 | 1 | 2 | 0/0/1 | 2 |
| DBURNM | dburnm.f | 170 | 1 | 2 | 0/0/1 | 1 |
| DEUTRATE | deutrate.f | 86 | 1 | 1 | 1 | |
| LIRATE88 | lirate88.f | 157 | 2 | 3 | 2 | |
| LIBURN +1 | liburn.f | 561 | 2 | 2 | 0/0/4 | 2 |
| LIBURN2 | liburn2.f | 350 | 2 | 2 | 0/0/6 | |
| NEUTRINO | neutrino.f | 62 | 1 | 1 | 1/0/0 | |
| NULOSSES +1 | nulosses.f | 97 | 1 | 1 | 1 | |
| SNEUT | sneut.f | 1355 | 1 | 1 | 1/0/0 | 2 |
| CROSS_MOD | cross_mod.f | 29 | 3 | |||
| FLUXES_MOD | fluxes_mod.f | 29 | 4 | |||
| DEUTER_MOD | deuter_mod.f | 33 | 11 | |||
| NEWRAT_MOD | newrat_mod.f | 32 | 5 | |||
| OLDRAT_MOD | oldrat_mod.f | 32 | 5 | |||
| PREVCZ_MOD | prevcz_mod.f | 35 | 3 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
Convection, overshoot, and the mixing of composition
Where the model is convective, its temperature gradient, overshoot and semiconvection, and the change of composition over a step (burning and mixing of convection zones).
14 files · 8 suspected bugs (results/output/fragile) · 21 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| MIX | mix.f | 507 | 2 | 2 | 5 | |
| CONVEC | convec.f | 209 | 4 | 5 | 1/0/1 | 1 |
| TPGRAD | tpgrad.f | 227 | 5 | 7 | 1/0/1 | 3 |
| HSUBP | hsubp.f | 77 | 1 | 4 | 2 | |
| FINDSH | findsh.f | 126 | 2 | 3 | 1 | |
| OVERSH | oversh.f | 179 | 1 | 1 | 2 | |
| SCONVEC | sconvec.f | 302 | 1 | 1 | 0/0/2 | 4 |
| MIXCZ | mixcz.f | 248 | 3 | 4 | 0/0/2 | 3 |
| OVROT | ovrot.f | 37 | 4 | 4 | ||
| COMP_MOD | comp_mod.f | 34 | 23 | |||
| COMP2_MOD | comp2_mod.f | 27 | 3 | |||
| DPMIX_MOD | dpmix_mod.f | 28 | 6 | |||
| LIOV_MOD | liov_mod.f | 27 | 5 | |||
| PUALPHA_MOD | pualpha_mod.f | 35 | 2 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
The time step and rezoning
The choice of the next time step, and the redistribution of the mass points at the start of each step.
8 files · 7 suspected bugs (results/output/fragile) · 13 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| HTIMER | htimer.f | 230 | 1 | 2 | 0/0/1 | 4 |
| XTIME | xtime.f | 110 | 1 | 1 | ||
| YTIME | ytime.f | 181 | 1 | 1 | 2 | |
| PTIME | ptime.f | 138 | 1 | 1 | 2 | |
| ENTIME | entime.f | 99 | 1 | 1 | ||
| WTIME | wtime.f | 81 | 1 | 1 | 0/0/1 | |
| HPOINT | hpoint.f | 878 | 1 | 1 | 1/0/4 | 5 |
| ENTROP_MOD | entrop_mod.f | 33 | 2 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
Output
The output files: headers, the track and short output, stored models, model files and profiles for pulsation.
19 files · 34 suspected bugs (results/output/fragile) · 21 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| WRTHEAD | wrthead.f | 181 | 1 | 1 | 0/0/1 | 2 |
| WRTOUT | wrtout.f | 731 | 1 | 1 | 0/1/1 | 6 |
| WRTLST | wrtlst.f | 159 | 2 | 3 | 0/0/2 | |
| PUTSTORE | putstore.f | 385 | 2 | 2 | 0/2/2 | 3 |
| STITCH | stitch.f | 256 | 1 | 1 | 1/2/3 | 2 |
| PUTMODEL2 | putmodel2.f | 131 | 1 | 1 | 0/1/0 | 1 |
| PUTYREC7 | putyrec7.f | 146 | 0/0/1 | 1 | ||
| WRTMOD | wrtmod.f | 310 | 2 | 2 | 0/3/1 | 2 |
| WRTMIL | wrtmil.f | 111 | 2 | 2 | 0/0/1 | 2 |
| PINDEX | pindex.f | 85 | 1 | 1 | 0/0/2 | |
| PDIST | pdist.f | 125 | 1 | 1 | 0/0/1 | 1 |
| CALCAD | calcad.f | 542 | 1 | 1 | 0/0/8 | 1 |
| ACDPTH_MOD | acdpth_mod.f | 57 | 6 | 0/0/1 | ||
| CCOUT_MOD | ccout_mod.f | 26 | 2 | |||
| CENT_MOD | cent_mod.f | 30 | 2 | |||
| LABEL_MOD | label_mod.f | 37 | 6 | |||
| PULSE1_MOD | pulse1_mod.f | 39 | 6 | |||
| PULSE2_MOD | pulse2_mod.f | 45 | 4 | |||
| SOUND_MOD | sound_mod.f | 31 | 5 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
Microscopic diffusion and settling
Gravitational settling and thermal diffusion of helium, metals and light elements: the older GRSETT treatment and the newer MICRODIFF. Settling is off by default (LDIFY); with it on, MICRODIFF needs LNEWDIF (also off by default, set by the test suite's settling cases), and GRSETT runs otherwise.
16 files · 16 suspected bugs (results/output/fragile) · 20 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| GRSETT | grsett.f | 273 | 2 | 2 | 0/0/2 | 2 |
| SETUP_GRSETT | setup_grsett.f | 330 | 1 | 1 | 0/0/1 | 4 |
| MODEL_TO_EQUAL | model_to_equal.f | 275 | 1 | 1 | 0/0/1 | |
| LAX_WENDROF1 | lax_wendrof1.f | 76 | 2 | 2 | ||
| LAX_WENDROF2 | lax_wendrof2.f | 74 | 2 | 2 | ||
| GET_IMP_DIFFCO | get_imp_diffco.f | 36 | 2 | 2 | ||
| TRIDIAG_GS | tridiag_gs.f | 31 | 2 | 2 | 1 | |
| EQUAL_TO_MODEL | equal_to_model.f | 144 | 1 | 1 | 0/0/1 | |
| MICRODIFF | microdiff.f | 245 | 2 | 2 | 3 | |
| MICRODIFF_SETUP | microdiff_setup.f | 169 | 1 | 1 | 0/0/1 | 2 |
| MICRODIFF_MTE | microdiff_mte.f | 294 | 1 | 1 | 0/0/2 | 2 |
| MICRODIFF_COD | microdiff_cod.f | 217 | 1 | 2 | 0/0/2 | 1 |
| MICRODIFF_RUN | microdiff_run.f | 204 | 1 | 3 | 0/0/3 | 1 |
| MICRODIFF_ETM | microdiff_etm.f | 174 | 1 | 1 | 0/0/2 | 1 |
| THDIFF | thdiff.f | 299 | 2 | 2 | 0/0/1 | 3 |
| GRAVEZ_MOD | gravez_mod.f | 36 | 5 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
Rotation: the structure of a rotating star
The distortion of a rotating star, its moments of inertia and the form factors that correct the structure equations, and the rotation curve.
14 files · 8 suspected bugs (results/output/fragile) · 16 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| FPFT | fpft.f | 109 | 4 | 5 | 3 | |
| SHAPE | shape.f | 170 | 2 | 2 | 0/0/2 | 4 |
| FUNC | func.f | 50 | 1 | 2 | 2 | |
| QGAUSS | qgauss.f | 43 | 1 | 1 | ||
| TRAPZD | trapzd.f | 59 | 1 | 1 | 0/0/1 | |
| GETQUA | getqua.f | 129 | 1 | 1 | 1/0/1 | 1 |
| INTMOM | intmom.f | 34 | 1 | 1 | ||
| MOMI | momi.f | 92 | 3 | 4 | 2 | |
| GETROT | getrot.f | 61 | 6 | 8 | 0/0/1 | |
| SOLID | solid.f | 102 | 5 | 13 | 0/0/2 | 1 |
| WCZIMP | wczimp.f | 159 | 2 | 4 | 3 | |
| ERRMOM_MOD | errmom_mod.f | 30 | 2 | |||
| QUADD_MOD | quadd_mod.f | 33 | 3 | |||
| QUADRU_MOD | quadru_mod.f | 31 | 3 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
Rotation: angular-momentum transport and rotational mixing
The internal rotation over a step: angular-momentum transport by rotational instabilities and the mixing of composition they drive.
40 files · 19 suspected bugs (results/output/fragile) · 34 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| GETW | getw.f | 482 | 1 | 1 | 1/0/0 | 2 |
| MIDMOD | midmod.f | 523 | 1 | 1 | 4 | |
| SECULR | seculr.f | 532 | 1 | 1 | 4 | |
| SETUPV | setupv.f | 467 | 1 | 1 | 2 | |
| VCIRC | vcirc.f | 690 | 1 | 2 | 1/0/3 | 6 |
| CODIFF | codiff.f | 149 | 1 | 1 | ||
| GETFC | getfc.f | 119 | 1 | 2 | 1/0/0 | 2 |
| VISCOS | viscos.f | 111 | 1 | 1 | 0/0/3 | 1 |
| GETGRID | getgrid.f | 94 | 2 | 2 | 2 | |
| ROTGRID | rotgrid.f | 285 | 1 | 1 | ||
| DCOEFT | dcoeft.f | 142 | 1 | 1 | ||
| DADCOEFT | dadcoeft.f | 623 | 1 | 1 | 0/0/5 | 3 |
| TRIDIA | tridia.f | 45 | 1 | 1 | 1 | |
| EQ2MOD | eq2mod.f | 138 | 1 | 1 | 1 | |
| CHECKJ | checkj.f | 404 | 1 | 1 | 1 | |
| MIXGRID | mixgrid.f | 167 | 1 | 1 | ||
| MIXCOM | mixcom.f | 203 | 1 | 2 | ||
| CCOEFT | ccoeft.f | 82 | 1 | 1 | ||
| NDIFCOM | ndifcom.f | 124 | 2 | 3 | 1 | |
| ROTMIX | rotmix.f | 251 | 2 | 2 | 0/0/2 | |
| BURSMIX | bursmix.f | 147 | 1 | 1 | 0/0/1 | 2 |
| BSROTMIX | bsrotmix.f | 271 | 1 | 2 | 0/0/2 | 1 |
| CHECKC | checkc.f | 188 | 1 | 1 | 1 | |
| EGRID_MOD | egrid_mod.f | 34 | 7 | |||
| EGRIDDER_MOD | egridder_mod.f | 33 | 3 | |||
| DIFAD_MOD | difad_mod.f | 31 | 4 | |||
| DIFAD2_MOD | difad2_mod.f | 33 | 3 | |||
| DIFAD3_MOD | difad3_mod.f | 50 | 3 | |||
| DWMAX_MOD | dwmax_mod.f | 31 | 2 | |||
| OLDROT_MOD | oldrot_mod.f | 35 | 6 | |||
| OLDROT2_MOD | oldrot2_mod.f | 38 | 5 | |||
| OLDPHY_MOD | oldphy_mod.f | 41 | 3 | |||
| MDPHY_MOD | mdphy_mod.f | 41 | 10 | |||
| ROTDER_MOD | rotder_mod.f | 32 | 2 | |||
| ROTEN_MOD | roten_mod.f | 30 | 3 | |||
| TAUKH_MOD | taukh_mod.f | 35 | 2 | |||
| TEMP_MOD | temp_mod.f | 34 | 5 | |||
| TEMP2_MOD | temp2_mod.f | 37 | 5 | |||
| TRIDI_MOD | tridi_mod.f | 35 | 6 | |||
| VFACT_MOD | vfact_mod.f | 36 | 2 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
Angular-momentum loss and mass loss
Magnetic braking by winds (with the convective overturn time it needs), disk locking, and mass loss or accretion.
14 files · 8 suspected bugs (results/output/fragile) · 30 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| MWIND | mwind.f | 218 | 2 | 4 | 0/0/1 | 3 |
| COWIND | cowind.f | 118 | 1 | 1 | 3 | |
| MCOWIND | mcowind.f | 172 | 1 | 1 | 3 | |
| WIND | wind.f | 152 | 1 | 1 | 0/0/1 | 3 |
| AMCALC | amcalc.f | 89 | 2 | 2 | ||
| GETTAU | gettau.f | 199 | 3 | 3 | 3 | |
| TAUCAL | taucal.f | 231 | 1 | 1 | 0/0/1 | 5 |
| TAUINT | tauint.f | 196 | 1 | 1 | 2 | |
| TAUINTNEW | tauintnew.f | 289 | 1 | 1 | 0/0/2 | 3 |
| MASSLOSS | massloss.f | 245 | 1 | 1 | 1/0/0 | 2 |
| MDOT | mdot.f | 327 | 1 | 1 | 1/0/1 | 3 |
| DISK_MOD | disk_mod.f | 26 | 5 | |||
| OVRTRN_MOD | ovrtrn_mod.f | 30 | 18 | |||
| MASSCHG2_MOD | masschg2_mod.f | 30 | 3 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
Numerical utilities
Interpolation, splines, quadrature and linear solvers, most of them from Numerical Recipes or published algorithms.
27 files · 3 suspected bugs (results/output/fragile) · 16 questions
| Definition | File | Lines | Callers | Calls | Suspected bugs | Questions |
|---|---|---|---|---|---|---|
| INTERP | interp.f | 43 | 6 | 15 | 1 | |
| INTER3 | inter3.f | 37 | 3 | 6 | ||
| INTRP2 | intrp2.f | 37 | 7 | 12 | ||
| XRNG4 | xrng4.f | 24 | 1 | 1 | 1 | |
| LOCATE | locate.f | 37 | 2 | 3 | 1 | |
| POLINT | polint.f | 61 | 2 | 7 | ||
| CSPLINE | cspline.f | 55 | 2 | 2 | 1 | |
| SPLINC | splinc.f | 32 | 1 | 3 | 1 | |
| SPLINJ | splinj.f | 29 | 2 | 3 | ||
| SPLINT | splint.f | 56 | 3 | 5 | 1 | |
| SPLINTD2 | splintd2.f | 59 | 1 | 3 | 1 | |
| KSPLINE | kspline.f | 29 | 4 | 20 | ||
| KSPLINT | ksplint.f | 43 | 4 | 20 | ||
| OSPLIN | osplin.f | 50 | 6 | 36 | 0/0/1 | |
| MEVAL | meval.f | 265 | 1 | 1 | 0/0/1 | 1 |
| SPLINE | spline.f | 148 | 1 | 3 | ||
| CASES | cases.f | 110 | 1 | 4 | ||
| CHOOSE | choose.f | 148 | 1 | 4 | 1 | |
| SEARCH | search.f | 92 | 1 | 1 | ||
| SLOPES +1 | slopes.f | 141 | 1 | 1 | 2 | |
| SPLIN_MOD | splin_mod.f | 33 | 4 | |||
| BOOLE | boole.f | 82 | 1 | 2 | 1 | |
| BANDW | bandw.f | 186 | 1 | 1 | 2 | |
| CTRIDI | ctridi.f | 32 | 1 | 1 | 1 | |
| SIMEQC | simeqc.f | 78 | 1 | 1 | 0/0/1 | 1 |
| LUDCMP | ludcmp.f | 97 | 1 | 1 | ||
| LUBKSB | lubksb.f | 51 | 1 | 3 |
Suspected bugs: results/output/fragile. Results: the fix moved a run clearly beyond a null change, or the bug stopped a run; output: it writes wrong output only; fragile: the others, whose fixes can wait for the full test suite.
README
YREC is a modern & efficient public stellar evolution code delivering fast, precise models across a wide spectrum of initial conditions and physical prescriptions. Stellar evolution calculations from YREC have been used to study the physics of solar analogs, evolved giants, low-mass stars, rapidly rotators, and magnetically-active stars. With modern microphysics and prescriptions for rotation, surface magnetism, composition, and mixing, YREC provides a versatile foundation for tackling many different astrophysical problems. In the era of precision stellar astrophysics, YREC offers an open, performant, and lightweight alternative to existing codes.
To get started using YREC, consult the documentation. Try the quick start guide or dive into the interactive YREC web interface.
Software Ecosystem
YREC User Tools: Functions and guidelines for using the Yale Rotating Evolution Code
ISTARY: Isochrones and Stellar Tracks for Astrophysics Research by the YREC collaboration
Kīauhōkū: Python utilities for stellar model grid interpolation
yreclab: Stellar evolution web laboratory with the Yale Rotating Evolution Code
Community
Feedback and contributions are welcome, please open an issue or create a pull request.
Namelists, models, or tools relevant to YREC are invited to be posted to the YREC Zenodo community.
You can subscribe to the YREC newsletter here.
Citing
If you use YREC in your research, please cite one or more of the relevant papers.
Larson& Demarque 1964: The original Yale stellar evolution code paper.
Pinsonneault et al. 1989: The paper documenting the addition of rotation to the YREC code.
Demarque et al. 2008 A paper summarizing the classical model properties of the YREC code, with a focus on convection.
van Saders & Pinsonneault 2013: This paper updates the description of rotation and magnetized winds in the code.
Pinsonneault et al. 2026: The YREC public release paper