prevcz_mod.f
35 lines · 1 definitions · on GitHub (7be4133)
Python version: prevcz_mod.py, 18 lines, on the right (switch to Python above the code).
Purpose
PREVCZ_MOD carries the state of the surface convection zone and of light-element burning from one step to the next, for LIBURN and LIBURN2. Shared by 3 routines. It replaces COMMON/PREVCZ/ (MHP via Claude, 10/14/26).
What its variables hold, who sets them, who reads them.
RBASE0: the radius of the base of the convection zone at the start of the step (with overshoot).LIBURN,LIBURN2compute it from the starting model when it is 0, and store the step's ending base in it for the next step; the main program resets it to 0 whenLEXCOMis set.JENVOS: the shell of the envelope's base at the end of the step, stored byLIBURN,LIBURN2and used as the next step's startingJENV0whenRBASE0is already known.BLI6OLD,BLI7OLD,BBE9OLD: the mass-averaged burning rates of ⁶Li, ⁷Li and ⁹Be in the convection zone at the end of the step (their logarithms, by the code's comments), stored byLIBURNfor the start of the next.LBLIOLD(.FALSE.at the start): whether those three holdLIBURN's end-of-step rates.LIBURNsets it when it stores them, clears it when it skips the convection zone, and reuses the stored rates as the next step's starting rates only when it is set (otherwise it recomputes them);LIBURN2always computes its starting rates and clears it, and the main program clears it at each kind card whenLEXCOMis set.
Design
A blanket USE PREVCZ_MOD in each routine.
Definitions
modulePREVCZ_MOD
Used by (3 units)
Change log
The changes since rp_1
Changed since rp_1. New file: COMMON/PREVCZ/ as a module.
Changed since a8a5950. The new flag LBLIOLD says when BLI6OLD, BLI7OLD, and BBE9OLD hold LIBURN's end-of-step rates. The old test, BLI6OLD ≤ 0, was always true for the logarithm of a small rate, so the stored rates were never reused; the main program now clears the flag instead of zeroing the three rates.