I was looking a bit deeper into the issues @mathren highlighted in #954 where missing a missing pgbinary inlist causes somewhat of messy exit. While the fix is not too hard (it even simplifies the code), I did notice that the same code is repeated in various parts of the code base, but with slight differences.
kap, eos, and colors allow the first inlist file in a chain to be missing. Missing kap and eos namelist sections lead to a warning, but no hard error.
binary_job, binary_controls, astero_search_controls, astero_pgstar_controls, controls, pgstar, and pgbinary produce a hard error whenever the can't read a file or don't find their namelist sections (assuming the module is enabled).
I can see benefits for both cases: early warning to the user if they made a mistake vs. less unneeded noise.
Do we want to keep the current behaviour or pick one of the options? The difference for refactoring the code is limited.
I was looking a bit deeper into the issues @mathren highlighted in #954 where missing a missing
pgbinaryinlist causes somewhat of messy exit. While the fix is not too hard (it even simplifies the code), I did notice that the same code is repeated in various parts of the code base, but with slight differences.kap,eos, andcolorsallow the first inlist file in a chain to be missing. Missingkapandeosnamelist sections lead to a warning, but no hard error.binary_job,binary_controls,astero_search_controls,astero_pgstar_controls,controls,pgstar, andpgbinaryproduce a hard error whenever the can't read a file or don't find their namelist sections (assuming the module is enabled).I can see benefits for both cases: early warning to the user if they made a mistake vs. less unneeded noise.
Do we want to keep the current behaviour or pick one of the options? The difference for refactoring the code is limited.