When restarting from an on-disk dataset, enzo currently reads in the grid hydrodynamics parameters, in particular the CourantSafetyNumber, from the hierarchy file. This is annoying, because it breaks the expectation that changing one of these parameters in the parameter file will change the parameter in the real simulation.
This is particularly annoying when you want to restart a simulation that has crashed with a lower CFL. Usually I forget about this issue, edit the simulation parameter file, don't touch the hierarchy file, and put the job in the PBS queue. On more than one occasion, this oversight wasted a day of waiting in the queue only to find that the simulation crashed again because it used the old value for the CFL number.
This patch makes it so we ignore whatever is written in the hierarchy file and instead defer to the value for hydro parameters in the global parameter file. Rather than changing the format of the hierarchy file, I've opted to simply ignore these values when we read in the hierarchy file.
I whole heartedly approve of this change.
This is long overdue. Thanks, Nathan!
This brings the code more in line with default expectations. Good work.
Um, to play the devil's advocate, with this change we're also now
intentionally breaking the meaning of the parameter. I bet zero people
anywhere rely on this. And yet, I'm a bit nervous ... I mean, remember
when UNIGRID=1 was required for AMR simulations? This is kind of the same
Can you elaborate a bit more? Which parameter? The ones in the hierarchy file?
I agree that this change effectively makes them useless, but they still accurately describe whatever the simulation was run with.
I'd also argue that it doesn't make sense to have independent settings of these parameters for different grids in the same simulation, meaning that to change these parameters a user needs to change all occurrences in the hierarchy file.
Well, that's why I was only playing devil's advocate. I think you're
making some great points. As long as we're now making it clear this is
read-only, I'm game.
Sounds good, I'll send a message to the mailing lists once this goes in to alert people to the change.