run.py 555 B

123456789101112131415161718192021222324252627
  1. """
  2. The NEMO offline observation operator is built and runs similarly to the
  3. online NEMO model.
  4. """
  5. import subprocess
  6. import shlex
  7. import os
  8. class SubmitError(Exception):
  9. pass
  10. def submit(command="./opa"):
  11. """Simple function that runs the code.
  12. This can be customised based on the particular environment
  13. used to submit MPI or serial tasks. For simplicity, this
  14. function calls opa.
  15. By default, this program runs ``./opa``.
  16. :returns: retcode
  17. """
  18. retcode = subprocess.call(shlex.split(command))
  19. return retcode