[mesa-users] Inlist issue

Frank Timmes fxt44 at mac.com
Mon Jul 31 14:08:28 EDT 2017


most excellent catch on "/" being a reserved character!

fxt



> On Jul 31, 2017, at 9:47 AM, Josiah Schwab <jwschwab at ucsc.edu> wrote:
> 
> Hi All,
> 
> I wanted to take a minute and pedagogically describe what is going on
> here for future reference.
> 
> The first, and most important point is that you can't do math in
> inlists.  So as Frank says, the solution is to write out your numbers.
> 
> Now if you were to try to do some other math operation, for example,
> 
>  am_D_mix_factor = 1d0 + 1d0
> 
> you'd receive an error.
> 
> However, the character '/' ends a fortran namelist.  That is, one
> normally writes something like
> 
> &controls
> 
>  am_D_mix_factor = 0.03333
> 
> / ! end of controls namelist
> 
> where the comment is informative, but syntactically irrelevant.
> 
> So when you write
> 
> &controls
> 
>  am_D_mix_factor = 1d0/30d0
>  some_other_option = 'something'
> 
> / ! end of controls namelist
> 
> the namelist ends immediately at the first '/'.  So everything beyond
> (i.e. the 30d0 and any subsequent options) will be ignored, because it
> is located outside of the controls namelist.
> 
> As you found, this mistake can be insidious because it will not produce
> an error message.  MESA will simply run with the truncated inlist.
> 
> Josiah




More information about the Mesa-users mailing list