mHM QGIS — QGIS plugin for Mesoscale Hydrological Model
Prepare model inputs and namelists for mHM 5.13 and v6, then run mHM, in QGIS or as a standalone application.
- Delineate domains, snap outlets, and assign discharge observations.
- Prepare DEM derivatives, soil, land cover, geology, and LAI.
- Align morphology and meteorology on compatible model grids.
- Edit namelists with nml-tools, guided by an introduction wizard, and combine prepared domains into one multi-domain run.
- Run mHM as named cases, each in its own
runs/<name>/folder, and analyse them in the Outputs tab: water balance, hydrographs and scores, signatures, events, validation against observations, run comparison, extremes, droughts and plausibility checks.
Install
Standalone application (PyPI)
python -m pip install mhm-qgis
mhm-qgis
This works in any Python 3.10+: plain, a virtual environment or a conda environment.
pip install mhm-qgis installs only the small launcher. On first launch, after you
confirm, it installs a private QGIS 3.44 runtime with the app and everything it needs
(conda-forge and PyPI), then opens the app; later launches open it directly. Your own
environment is not changed. The runtime needs about a 1 GB download and several GB of
disk, and no administrator rights. It goes into:
- Linux:
~/.local/share/mhm-qgis(or$XDG_DATA_HOME/mhm-qgis) - macOS:
~/Library/Application Support/mhm-qgis - Windows:
%LOCALAPPDATA%\mhm-qgis
If the environment already has QGIS (for example conda install -c conda-forge qgis),
install the app's packages there instead and mhm-qgis uses that QGIS:
python -m pip install "mhm-qgis[full]"
On an HPC, run the first launch on a login node (it downloads), set XDG_DATA_HOME if
the home quota is small, and use a desktop session or X11 forwarding for the window.
Manage the runtime without opening the GUI:
mhm-qgis-runtime install --yes # unattended installation
mhm-qgis-runtime status
mhm-qgis-runtime remove # repair = remove, then install
QGIS plugin
Install mHM QGIS from the QGIS Plugin Manager (QGIS 3.34 or newer, including
QGIS 4). Enable Show also experimental plugins while the plugin is experimental. On
first start the plugin lists its missing Python dependencies (see requirements.txt)
and offers to install them for the Python that QGIS uses, into its own folder in the
QGIS profile (<profile>/python/mhm-qgis-packages/numpy<major>), not ~/.local: removing
the profile removes them, no other Python sees them, and a QGIS on another NumPy major
version gets its own. QGIS's own packages (NumPy, GDAL) are reused, never replaced; if a
NumPy installed elsewhere (e.g. in ~/.local) hides QGIS's, the plugin names it for removal. If that fails, the plugin shows the exact commands to run
with that same Python (on Windows, in the OSGeo4W Shell).
mHM executables
mHM 5.13 (the latest 5.13 release) is installed with the mhm Python package, as the
mhm command. For mHM v6, choose a
compatible executable in the Configuration tab (or set MHM_QGIS_MHMV6).
Workflow
In 0. Configuration, select a project folder, then open a saved domain or
choose and press Create Project Structure. Each setup has its own
settings, state and outputs under <project>/mhm-qgis/<domain-name>/; legacy
workspaces are left untouched.
Choose a DEM, configure precipitation's folder, glob, units and cadence, then confirm its metadata dialog to scan and establish the common grid. Add other meteorology variables through the same dialog. Choose simulation dates and catchments; no selected catchments means valid DEM cells.
Run ▶ on A. Morphology, then on B. Meteorology in the project tree. Review inputs,
edit namelists, and run mHM. Each setup is one model domain and may contain
disconnected catchments. Meteorology preparation preserves input cadence,
converts units and optionally deaccumulates running totals. Historical land-use
periods share exact datetime boundaries (v5 changes must fall on year boundaries).
Both model versions can generate L0/L1/L11/L2 coordinates in data/latlon.nc.
In 5. Outputs, pick a run (the current output/, a named run or an archived one)
and a view. Each view arranges the QGIS main window (or the standalone map window): its
panel in the centre, its side panels as tabs beside Layers; Map Explorer draws on the
map canvas itself. Export writes the shown tables, plots and maps to a folder.
Displayed layers appear on QGIS Desktop's map canvas. In the standalone application they appear in its own map window, which has a layer tree and accepts dropped raster and vector files. The Map Canvas button focuses whichever canvas is in use.
Development
git clone https://github.com/mhm-ufz/mHM-QGIS
cd mhm-qgis
python3 -m pip install -e '.[dev]'
python3 -m pytest tests/ -q
For QGIS Desktop development, symlink src/mhm_qgis into your QGIS profile's
python/plugins/ directory. GUI tests require real QGIS and run offscreen; they are
skipped when its runtime libraries are unavailable. Core tests remain
QGIS-independent. Designer .ui files load at runtime through qgis.PyQt, so no
UI or resource compilation is needed.
See CONTRIBUTING.md and CHANGELOG.md.
License
mHM-QGIS is free software under the GNU Lesser General Public License, version 3 or later; see LICENSE, COPYING and COPYING.LESSER. Copyright © 2025 - 2026, the mHM-QGIS developers from the Helmholtz-Zentrum für Umweltforschung GmbH - UFZ (AUTHORS.md). Its dependencies, such as QGIS, mHM, mhm-tools and nml-tools, are not included and keep their own licenses.
Metadata
Release files for mhm-qgis 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mhm_qgis-0.1.0.tar.gz | 876.5 kB | Without provenance | Details for mhm_qgis-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mhm_qgis-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mhm_qgis-0.1.0-py3-none-any.whl |
Total release size: 1.9 MB
Release files / mhm_qgis-0.1.0.tar.gz
| Download URL | mhm_qgis-0.1.0.tar.gz |
|---|---|
| Size | 876.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd7876bce9929d39883624f4c95422492434e3afc46333edfd71ee53f99743a1
|
|
BLAKE2b-256 checksum How to use checksums |
b989d6b32fbb38ae6aa0966121a43b62a37e33a7ab9f3e73ce3159e5d2cc00b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / mhm_qgis-0.1.0-py3-none-any.whl
| Download URL | mhm_qgis-0.1.0-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cabb409b75d702f7142ffa7703d656907d9cf9f664c39980cbb63a725dcb8dad
|
|
BLAKE2b-256 checksum How to use checksums |
75e2f95440f0225454d21ee562b87de1ce64ee620e4eb1eff68ad35dcd4c57c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for mhm-qgis 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.