New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
run.py in branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/TOOLS/OBSTOOLS/OOO/ooo – NEMO

source: branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/TOOLS/OBSTOOLS/OOO/ooo/run.py @ 4771

Last change on this file since 4771 was 4140, checked in by andrewryan, 11 years ago

added a command option to allow custom submit commands to be run by the quick start script

File size: 555 bytes
Line 
1"""
2
3The NEMO offline observation operator is built and runs similarly to the
4online NEMO model.
5 
6"""
7import subprocess
8import shlex
9import os
10
11class SubmitError(Exception):
12    pass
13
14def submit(command="./opa"):
15    """Simple function that runs the code.
16
17    This can be customised based on the particular environment
18    used to submit MPI or serial tasks. For simplicity, this
19    function calls opa.
20
21    By default, this program runs ``./opa``.
22
23    :returns: retcode
24    """
25    retcode = subprocess.call(shlex.split(command))
26    return retcode
27
Note: See TracBrowser for help on using the repository browser.