edoddridge / aronnax

An idealised isopycnal model that can be run either with n+1/2 layers, or with n layers and variable bathymetry.
http://aronnax.readthedocs.io/en/latest/
MIT License
24 stars 6 forks source link

Core terminal output #86

Closed axch closed 7 years ago

axch commented 7 years ago

Conform interaction of the Aronnax core with terminal streams (namely, standard output and standard error) to unix conventions. This includes fixes for #13 and #45.

edoddridge commented 7 years ago

What's the rationale behind leaving the zero in the stop 0 command just before the end program aronnax command?

If one removes the zero, then the command doesn't print anything to stdout, and the run finishes with "Run finished at time step n, in t seconds." sent to stdout.

axch commented 7 years ago

Re: stop: Preservation of status quo, and I wasn't dealing with the stop statements. Actually, scanning through the stop statements and making sure the core produces an appropriate exit code in every circumstance seems like a good idea.

axch commented 7 years ago

Re: seconds: It would be even more stylish to check whether the integer one is about to print is or is not equal to 1, and adjust the string to be singular or plural accordingly.

axch commented 7 years ago

Updated on both counts.