You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The canonical default inlist itself uses this to load other inlists.
Should we change these to arrays? I say yes. We can also scrap the logical flag and just use the empty string '' to indicate that an inlist should not be read (unless I'm missing a use case where this helpful). e.g. I imagine a user would write
extra_star_job_inlist_name(1) ='inlist_project'
and the defaults file containing
extra_star_job_inlist_name(:) =''
to cover all values that aren't used. E.g., in a loop like this should work:
do i=1, max_extra_inlists
if (extra_star_job_inlist_name(i) == '') continue
... ! otherwise read it
If the logical flag is useful, we can instead use
do i=1, max_extra_inlists
if (.not. read_extra_star_job_inlist(i)) continue
... ! otherwise read it
The only downside I can think of is that this will (trivially) break some backwards compatibility but I don't think that's a strong argument.
The text was updated successfully, but these errors were encountered:
We can refactor processing the inlists into loops, which at a rough count would eliminate ~300 lines of code. It also means that future changes only have to be applied once, not 5 times. Plus (though I don't think anyone has ever asked for more) it becomes trivial to increase the limit past 5.
i suspect most of the test suite will need adjustments to make this work ...
I think a few tactical seds will take care of almost all of these.
Since time immemorial (before r4366), various MESA inlists have had the option to read other inlists recursively, with options like
The canonical default
inlist
itself uses this to load other inlists.Should we change these to arrays? I say yes. We can also scrap the logical flag and just use the empty string
''
to indicate that an inlist should not be read (unless I'm missing a use case where this helpful). e.g. I imagine a user would writeand the defaults file containing
to cover all values that aren't used. E.g., in a loop like this should work:
If the logical flag is useful, we can instead use
The only downside I can think of is that this will (trivially) break some backwards compatibility but I don't think that's a strong argument.
The text was updated successfully, but these errors were encountered: