Trying to read .data file from mesa-r22.1.1(The newest version)
Opened this issue · 3 comments
When I try to read data file from the newest version of MESA,error appeared like:
Generating IC file...
setting lognorm...
Error: MESA keyword 'logE' not found!
It seems that "logE" term is not required by the newest MESA,which is still needed for MESA2HYDRO.
I wonder if there are other terms,which also can't not be found by MESA2HYDRO,exist or not...since I may have to modify the subroutine of the lib.
Note that the defarult cfg is :
MESA_file = ../data/sample_MESA_output/profile_mainsequence_logE.data
check_MESA_profile = False
make_NR_file = False
make_IC_file = True
new_NR_filename=out/NR_files/NR_mainsequence_test.dat
loaded_NR_filename = out/NR_files/NR_ms_test.dat
new_IC_filename=work/IC_mainsequence
loaded_IC_filename=work/IC_mainsequence
IC_format_type = phantom_binary #no extension because extension is specified by IC_format_type
masscut = 0.95 # corresponds to 5% depth cut by mass
r_depth = 0.75 #overrides mass specification
N = 8 # HEALPix integer
mp = 1e-7 # solar masses
#mp_cgs = 1.988e26 # grams
stepsize = 2.45e6 # cm
which_dtype=f #float vs double
TOL = 0.01
For my cfg,"profile_mainsequence_logE.data" is replaced by "profile1.data",which is generated by the newest MESA.
Hi Shigaharuki3012,
You are correct that newer versions of MESA may be incompatible with M2H due to keyword/column name changes. There are probably other instances besides logE
where this failure will arise. Let me know if you need any advice about how to modify the code to fix this (and in that case please also give me the exact mesa version number you're using) I see from the title it's r22.1.1
Thanks for posting
Hi mjoyceGR:
Thank you for your reply!
Actually I've just begun to use this code.I wonder if I can just comment the sentence which searches for the logE
(And the same for the other terms).
In fact I think we can create a package that can adapt to any version of MESA.That means however the MESA changes the content and number of it's columns,the M2H can always search all of them.(Reasonable because the minimum columns M2H needs are the 4(internal enegy...) mentioned in the user guide I guess.
For I haven't checked the code in detail so later I may try to do that and pull a request.(Also better if the code is also updated by you or others)
Thank you for your reply again and looking forward to your advice:)
Hi Shigaharuki3012,
I think updating M2H to automatically search for and process the column equivalent to logE
, regardless of MESA version, should be relatively straightforward, especially if you use something like Bill Wolf's py_mesa_reader
.
I'm very in favor of community involvement and would be happy to take a look at your PR if you submit one. The tool is open-source by design, so I encourage you to hack away as you see fit.
Cheers