[Mesa-users] Possible bug in low-temperature tau atmosphere tables in MESA r23.05.1
Jeremy Sakstein
sakstein at hawaii.edu
Tue Sep 29 20:23:21 UTC 2026
Hi everyone,
I think I may have found a bug in the generation of the low-temperature
tau_10, tau_1, and tau_1m1 atmosphere tables in MESA r23.05.1, and wanted
to check whether this is known or whether I am misunderstanding the
intended behavior.
Looking at atm/preprocessor/src/create_tau100.f
the COND reader appears to contain
T(i,j) = vals(num_layers) (line 403)
while the pressures are read using
Pg = vals(which_cond_layer) (line 411)
Pe = vals(which_cond_layer) (line 413)
Here num_layers = 50 (line 68), while the relevant layer indices are
cond_layer_tau10 = 44 (line 48)
cond_layer_tau100 = 50 (line 48)
Thus, unless I am missing something, in the COND regime the tau_10 table
receives the pressure from the tau=10 layer but the temperature from layer
50, corresponding to tau=100. The tau_100 table is unaffected because
cond_layer_tau100 = num_layers = 50.
I also checked the atmosphere data shipped with my r23.05.1 installation.
At Teff = 3000 K and log g = 5.0, for example, the temperature is identical
in tau100_T.data, tau10_T.data, tau1_T.data, and tau1m1_T.data:
T = 4279.834 K
The same equality occurs throughout the high-gravity COND part of the
tables, whereas the temperatures differ between optical depths at lower
gravity where a different code path is used.
Changing the corresponding source line to
T(i,j) = vals(which_cond_layer)
looks to me like the intended behavior.
I have only verified this in my local r23.05.1 installation and have not
established whether newer releases are affected.
Cheers,
Jeremy
--
Jeremy Sakstein
Associate Professor
Department of Physics & Astronomy
University of Hawaiʻi at Mānoa
Watanabe Hall
2505 Correa Road
Honolulu, HI, 96822, USA
http://www.jeremysakstein.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20260929/8b01051d/attachment.htm>
More information about the Mesa-users
mailing list