5.13.2-dev0
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
cli.py
Go to the documentation of this file.
1"""!
2Module to provide a script to execute mHM.
3
4@copyright Copyright 2005-@today, the mHM Developers, Luis Samaniego, Sabine Attinger: All rights reserved.
5 mHM is released under the LGPLv3+ license @license_note
6"""
7
8import os
9import subprocess
10import sys
11
12
13def mhm(): # pragma: no cover
14 """Execute mhm as a command line program."""
15 exe = os.path.join(os.path.dirname(__file__), "mhm")
16 if not os.path.exists(exe):
17 raise RuntimeError("mhm: python bindings were installed without driver.")
18 raise SystemExit(subprocess.call([exe] + sys.argv[1:]))