5.13.2-dev0
Version ...
current as pdf
coverage
stable
latest
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1
"""!
2
Python bindings of 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
8
##
9
# @dir pybind
10
# @brief @copybrief mhm
11
# @details @copydetails mhm
12
#
13
# @dir mhm
14
# @brief mhm Python package
15
# @details @copydetails mhm
16
#
17
# @defgroup mhm mhm - Python bindings
18
# @brief Python wrapper to control mHM.
19
# @details The mhm python package provides a wrapper module to control mHM from Python.
20
# This includes:
21
# - initialization, running and finalizing a model run
22
# - control of time stepping
23
# - access to internal variables
24
25
from
.
import
cli, download
26
from
.download
import
download_test
27
from
.tools
import
(
28
get_mask,
29
get_parameter,
30
get_runoff,
31
get_runoff_eval,
32
get_variable,
33
set_meteo,
34
)
35
from
.wrapper
import
get, model, run, set
36
37
try
:
38
from
._version
import
__version__
39
except
ModuleNotFoundError:
# pragma: no cover
40
# package is not installed
41
__version__ =
"0.0.0.dev0"
42
43
44
def
__getattr__
(name):
45
"""Magic method to provide 'f_version' in Python."""
46
if
name ==
"f_version"
:
47
return
model.version
().decode(
"utf-8"
).strip()
48
raise
AttributeError(f
"module {__name__} has no attribute {name}"
)
49
50
51
__all__ = [
52
"cli"
,
53
"model"
,
54
"get"
,
55
"set"
,
56
"run"
,
57
"download"
,
58
"download_test"
,
59
"f_version"
,
60
"get_runoff"
,
61
"get_variable"
,
62
"get_runoff_eval"
,
63
"get_parameter"
,
64
"get_mask"
,
65
"set_meteo"
,
66
"__version__"
,
67
]
mhm.__getattr__
__getattr__(name)
Magic method to provide 'f_version' in Python.
Definition
__init__.py:44
model::version
subroutine version(ver_string)
Get the mHM version.
Definition
wrapper.f90:144
pybind
src
mhm
__init__.py
Generated on Mon Jan 27 2025 16:39:35 for mHM by
1.11.0