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/2013/dev_r3987_UKMO4_OBS/NEMOGCM/TOOLS/OBSTOOLS/OOO/ooo – NEMO

source: branches/2013/dev_r3987_UKMO4_OBS/NEMOGCM/TOOLS/OBSTOOLS/OOO/ooo/run.py @ 4132

Last change on this file since 4132 was 4127, checked in by andrewryan, 11 years ago

some fixes to the submit functionality of the quick start script

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