aronnax
aronnax copied to clipboard
Model crashes if `dumpFreq` < `dt`
I've just encountered an annoying scenario in which the model fails with a very unhelpful error message of "Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation."
It occurs when dumpFreq is less than dt. I got into this situation trying to debug the external solver by dumping every time step and then increasing the time step.
This could be avoided nicely by emitting a warning if dumpFreq < dt, possibly accompanied by forcing dumpFreq >= dt. This is one of the inputs that Aronnax should verify per #57.
Another option is to allow the user to specify an integer dump frequency in time steps rather than time duration. It would be nice for the user-facing interface to allow either and do the right thing regardless of which is specified; but I am not sure whether Fortran namelist format will make it pleasant to do that. I guess defaults and sentinel values will work...
That would work.
My preference is to have the dump frequency in natural units - that way when one wants monthly means, the time step doesn't need to be taken into consideration. But, I'm not opposed to having the option to specify it either way.