Closed axch closed 7 years ago
This is definitely a good idea.
As you say, the examples are not currently self-contained. This is an issue and regenerating appropriate inputs is a cumbersome and pointless maintenance burden.
I think we will still need to mechanise the compilation since the compiled Fortran binary won't be transferable across systems. Fixing #12 would remove the need for the rather ugly sed
commands.
I agree that the examples run fast enough to have MIM execute them on the fly. If required we could alter the grid size or number of time steps. This may become a bigger issue as we develop a more complete set of examples that fully span the feature space.
Describing the examples properly, including their associated parameters.in
files is something that I think should be done in the examples notebook(s).
Yes, of course we will need to mechanize compilation, but with #12 done, it will only need to happen once, or at most once per notebook, not once per example :)
This issue was largely dealt with by #155, which implemented many of these ideas. Namely it:
While the documentation surrounding the examples should be expanded, the examples are now complete, self-contained, and can be executed by users with a straightforward command. I'm happy to close this issue and open a new ticket regarding enhancements of the examples documentation page.
Currently, the examples that appear in the IPython notebooks in the
examples
directory are slightly misleading: Stepping through the notebook cell by cell does not actually run the simulations whose outputs the notebook plots. Rather, it writes the input files, but neither compiles or executes the MIM core, and instead draws plots from outputs that have been checked in to the repository.This is undesirable because:
Reasons I might imagine in favor of this arrangement:
It would also be a good idea to indicate that the examples require
parameters.in
files to exist, and maybe even give a sense of their content. One way to do that would be to executecat parameters.in
in the notebook (in the appropriate directory); but not too early, lest the user be chased off by the wall of output.