[Mesa-users] Regarding default name change for STELLA input files

Jared Goldberg goldberg at physics.ucsb.edu
Sun May 9 22:28:30 UTC 2021


Hi Rishabh,

Stella_extras is a post-processing script, so Frank's answer works for
stella_extras if you have renamed all the output in res/ to my_file_name.*
rather than mesa.* AND renamed modmake/mesa.* accordingly AFTER the stella
run, but not for the run itself. It is rather nontrivial to get STELLA to
read in files by a different name, e.g. my_model_name.hyd and
my_model_name.abn, for its actual calculation and save the
output accordingly, due to STELLA's directory structure/naming scheme/many
internal references to "mesa".

STELLA uses a handful of internal variables to determine its run name and
output save name. It is best when these two agree. When reading in a model,
STELLA looks to files named in the file $MESA_DIR/stella/eve/rn/eve.1. When
running and writing output, STELLA follows naming in
$MESA_DIR/stella/strad/run/strad.1.

Changing instances of "mesa" to "my_file_name" in eve/run/eve.1 will allow
stella to read in my_file_name.* input, but the output will still all be
named "mesa.*" and there may be references to old "mesa"-named files from
old runs while running STELLA.
Editing the file $MESA_DIR/stella/strad/run/strad.1 and changing instances
of "mesa" to "my_file_name" (EXCEPT the named opacity, which should be left
as mesa.1), AND changing the name of $MESA_DIR/stella/strad/run/mesa.dat to
$MESA_DIR/stella/strad/run/my_model_name.dat, will then modify the file
output.
To use the stella_extras script along with the run, you will also have to
edit the rn script $MESA_DIR/stella/rn to call
./stella_extras my_file_name
as Frank points out.

STELLA may also have other places where it uses the "mesa" reference, and I
haven't dug deeper to find out what difference it makes, but what I
described above at least lets STELLA run with different input/output names.
So if you have a renaming scheme set up, I strongly encourage the test it
against of a normal clean version of stella with mesa.* names and compare
the output, just in case there are discrepancies.

All that being said, my recommendation (from my own experience as a
MESA+STELLA user) is that you avoid renaming the input/output files except
in post-processing, unless you are happy digging into the guts of stella
and making edits to a bunch of files with every new name you use. Renaming
the input and getting STELLA to run with the new input is much more work
(with more moving parts) than inputting your stella files as
$MESA_DIR/stella/modmake/mesa.*, running stella, then copying
mesa.hyd/mesa.abn/the output from $MESA_DIR/stella/res/mesa.* elsewhere
under a different name as an additional post-processing step.

Best,
~Jared

On Sun, May 9, 2021 at 1:07 PM Francis Timmes via Mesa-users <
mesa-users at lists.mesastar.org> wrote:

> hi rishabh,
>
> i don't know for sure as i have not played much with stella, but ...
>
> a perusal of $MESA_DIR/star/test_suite/ccsn_IIp suggests the file name
> can be set in an inlist_stella with save_stella_data_filename = 'mesa' .
>
> a perusal of $MESA_DIR/stella/res/stella_extras.f90 shows the lines
>
>    if (iargc() > 0) then
>       call GetArg(1,filestr)
>    else
>       filestr = 'mesa'
>    end if
>
> which suggests one can pass a file name to the stella_extras executable
> on the command line, such as
>
> ./stella_extras my_file_name
>
> and the executable then tries to open my_file_name.hyd
>
> fxt
>
>
>
>
>
> > On May 8, 2021, at 1:31 PM, Rishabh Singh Teja <rishabh.teja at iiap.res.in>
> wrote:
> >
> > Hi all,
> > Good Evening.
> > I would like to know, if somehow names of Stella input files (mesa.abn,
> mesa.hyd) can be passed with different names other than “mesa” string in
> stella. Also there is an option in ‘stella_extras.f90’ which takes filestr
> argument as mesa.
> > So, if possible then where are the necessary changes required in the
> code to run stella so that I can use some other string instead of “mesa”.
> >
> > Thanks.
> >
> > Regards
> > Rishabh Singh Teja
> > Junior Research Fellow
> > Indian Institute of Astrophysics
> > _______________________________________________
> > mesa-users at lists.mesastar.org
> > https://lists.mesastar.org/mailman/listinfo/mesa-users
> >
>
> _______________________________________________
> mesa-users at lists.mesastar.org
> https://lists.mesastar.org/mailman/listinfo/mesa-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20210509/822bd8be/attachment.htm>


More information about the Mesa-users mailing list