This QGIS plugin quantifies the water‑purification ecosystem service provided by natural landscapes and river channels. It estimates the capacity of soils, vegetation and channel processes to remove nitrogen (N) and phosphorus (P), delivering spatially‑explicit indicators of purification value in both monetary and biophysical terms.
-
Two complementary models
- Landscape model (
Water Purification (landscape)): evaluates load reduction across Landscape Spatial Units (LSUs). - Channel model (
Water Purification (channel)): evaluates in‑stream load reduction along river reaches.
- Landscape model (
-
Top‑N ranking approach – you define how many of the highest‑performing pixels/reaches (parameter
ntop) are used to calculate mean purification increments. -
Economic valuation – converts kg of purified N/P to Euros using life‑cycle cost formulas (CAPEX & OPEX) with user‑supplied discount rate and life expectancy.
-
Accepts SWAT+ spatial outputs (
*.sqlite) for baseline and restoration scenarios. -
Produces ready‑to‑map layers (
NitroPurVal_*,PhoshPurVal_*) plus an optional intermediate statistics layer.
- In QGIS, open Plugins ▸ Manage and Install Plugins….
- Search for “Water Purification”.
- Click Install Plugin.
Clone or download this repository into your local QGIS profile’s python/plugins directory and restart QGIS.
-
Prepare the required input layers/files:
lsus2.shp– Landscape units (polygons).rivs1.shp– Channel network (lines).- Baseline SWAT+
nut*.sqlite. - Restoration SWAT+
nut*.sqlite.
-
Launch the model from Processing ▶ Toolbox ▶ MERLIN.
-
Fill in parameters:
Parameter Description Default actualisationrateDiscount rate (decimal) 0.03 lifeexpectancyyears/life_expectancy_yearsAsset life (years) 50 (LSU) / 20 (channel) ntopHow many top‑performing cells/reaches to average 3 yearlyoperationmaintenancecosteuroshaO&M cost (€/ha yr) 3 850 -
Run the model; the plugin writes the outputs to the Processing context and adds them to the map.
This plugin is released under the MIT License – see LICENSE for details.