2Module to provide a script to execute mHM.
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
10from .wrapper
import model
13 from ._version
import __version__
14except ModuleNotFoundError:
16 __version__ =
"0.0.0.dev0"
24 """Execute mhm as a command line program."""
25 parser = argparse.ArgumentParser(
26 description=
"The mesoscale hydrological model - mHM with Python bindings",
27 formatter_class=argparse.ArgumentDefaultsHelpFormatter,
34 help=
"show mHM version and exit",
40 help=
"show mHM Python bindings version and exit",
43 "-n",
"--nml", default=
"mhm.nml", help=
"The mHM configuration namelist."
48 default=
"mhm_parameter.nml",
49 help=
"The mHM parameter namelist.",
52 "-o",
"--mhm_output", default=
"mhm_outputs.nml", help=
"The mHM output namelist."
55 "-r",
"--mrm_output", default=
"mrm_outputs.nml", help=
"The mRM output namelist."
58 "-q",
"--quiet", action=
"count", default=0, help=
"Decrease verbosity level."
61 "cwd", nargs=
"?", default=
".", help=
"The desired working directory."
64 args = parser.parse_args()
69 namelist_mhm=args.nml,
70 namelist_mhm_param=args.parameter,
71 namelist_mhm_output=args.mhm_output,
72 namelist_mrm_output=args.mrm_output,
mhm()
Execute mhm as a command line program.
subroutine version(ver_string)
Get the mHM version.
subroutine set_verbosity(level)
Set verbosity level of mHM.
subroutine run_or_optimize()
Execute a mHM model or an optimization depending on the configuration.
subroutine init(namelist_mhm, namelist_mhm_param, namelist_mhm_output, namelist_mrm_output, cwd)
Initialize a mHM model.
subroutine finalize()
Finalize a mHM model.