scieee AI-readable full text Open interactive document viewer

The MERLIN modelling workflow to assess the biophysical and economic impact of freshwater ecosystem restoration at catchment scale

Garcia, Xavier; Llorente-Moragrega, Oliu; Estrada, Laia; Grondard, Nicolas; Bangalore Suresh, Nikshep Trinetra; Comalada, Francesc; Acuña, Vicenç; Birk, Sebastian

Abstract

1. Freshwater ecosystems in Europe are increasingly under threat due to climate change, land-use intensification, and biodiversity loss – posing serious risks to critical ecosystem services.2. Restoration of freshwater ecosystems is essential for achieving EU policy goals, including the European Green Deal and the Biodiversity Strategy, while enhancing ecological resilience and sustainability.3. The MERLIN modelling workflow, developed under Work Package 3, provides a structured, scalable approach to assess both biophysical and economic impacts of restoration across Europe.4. Based on the open-source SWAT+ tool, the workflow integrates ecohydrological modelling with ecosystem service analysis and socio-economic valuation to support evidence-based decisionmaking.5. It uses harmonised, EU-wide publicly available datasets, making it applicable even in data-scarce regions and adaptable to both local and continental scales.6. The tool simulates a wide array of restoration measures –including wetland rewetting, riparian buffers and floodplain reconnection –offering insights into ecosystem service trade-offs and synergies.7. A distinguishing feature of the MERLIN workflow is its capacity to conduct a monetary valuation of restoration benefits and improved policy alignment.8. This user-friendly, step-by-step guidance is designed for a wide audience – from field practitioners to policymakers – and supports various technical skill levels.9. Early implementation shows the workflow’s flexibility and potential to improve restoration planning, with opportunities for enhanced accuracy through integration of local, high-resolution data.

Full text

Deliverable D3.3: The MERLIN modelling workflow to assess the biophysical and economic impact of freshwater ecosystem restoration at catchment scale www.project-merlin.eu MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 2 Imprint The MERLIN project (https://project-merlin.eu) has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 101036337. Lead contractor: Catalan Institute for Water Research (ICRA) To be cited as: Garcia, X., Llorente, O., Estrada, L., Grondard, N., Bangalore-Suresh, N., Comalada, F., Acuña, V., Birk, S. (2025). The MERLIN modelling workflow to assess the bio-physical and economic impact of freshwater ecosystems restoration at catchment scale. EU H2020 research and innovation project MERLIN deliverable 3.3. 50 pp. https://project-merlin.eu/outcomes/deliverables.html Due date of deliverable: 30 January 2025 Actual submission date: 31 May 2025 Acknowledgements: We would like to express our gratitude to Dennis Trolle and Anders Nielsen of WaterITech for their support during the development of the modelling workflow, which benefited greatly from their SWAT+ knowledge. We also thank Annette Baattrup-Pedersen for her contribution to the conceptualization of the workflow and her review of the deliverable. MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 3 MERLIN Key messages 1. Freshwater ecosystems in Europe are increasingly under threat due to climate change, land-use intensification, and biodiversity loss –posing serious risks to critical ecosystem services. 2. Restoration of freshwater ecosystems is essential for achieving EU policy goals, including the European Green Deal and the Biodiversity Strategy, while enhancing ecological resilience and sustainability. 3. The MERLIN modelling workflow, developed under Work Package 3, provides a structured, scalable approach to assess both biophysical and economic impacts of restoration across Europe. 4. Based on the open-source SWAT+ tool, the workflow integrates ecohydrological modelling with ecosystem service analysis and socio-economic valuation to support evidence-based decisionmaking. 5. It uses harmonised, EU-wide publicly available datasets, making it applicable even in data-scarce regions and adaptable to both local and continental scales. 6. The tool simulates a wide array of restoration measures –including wetland rewetting, riparian buffers and floodplain reconnection –offering insights into ecosystem service trade-offs and synergies. 7. A distinguishing feature of the MERLIN workflow is its capacity to conduct a monetary valuation of restoration benefits and improved policy alignment. 8. This user-friendly, step-by-step guidance is designed for a wide audience – from field practitioners to policymakers – and supports various technical skill levels. 9. Early implementation shows the workflow’s flexibility and potential to improve restoration planning, with opportunities for enhanced accuracy through integration of local, high-resolution data. MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 4 MERLIN Executive Summary Freshwater ecosystems across Europe are under increasing pressure due to climate change, intensive land use, and widespread biodiversity loss. These ecosystems –including streams, rivers, lakes, wetlands and peatlands – play a vital role in maintaining ecological integrity and delivering critical ecosystem services (ES) such as water purification, flood and drought regulation, and carbon sequestration. Restoration of these ecosystems is essential not only for ecological health but also for meeting key European policy goals, such as those set forth in the European Green Deal and the EU Biodiversity Strategy. However, planning effective and scalable restoration interventions requires robust, datadriven tools that can simulate their outcomes, and assess both their ecological and socio-economic impacts. The MERLIN project directly addresses this need through its Work Package 3 (WP3). This deliverable introduces the MERLIN modelling workflow: a structured and scalable approach designed to assess the biophysical and economic impacts of freshwater ecosystem restoration across Europe. Built around the open-source Soil and Water Assessment Tool Plus (SWAT+), the workflow integrates ecohydrological modelling with ecosystem service evaluation and socio-economic valuation. The goal is to enable evidence-based, spatially explicit restoration planning that can be applied from small catchments to continental scales. The MERLIN workflow uses harmonised, EU-wide publicly available datasets – such as digital elevation models, land use, soil maps and climate data – making it applicable even in data-scarce regions. It simulates a broad range of restoration measures, including wetland and peatland rewetting, riparian buffer implementation, floodplain reconnection, and river channel restoration. Outputs include indicators that serve as a basis for understanding trade-offs and synergies in ecosystem services under different restoration scenarios. A unique strength of the MERLIN modelling workflow is its integration of socio-economic analysis through Natural Capital Accounting (NCA) and Cost-Benefit Analysis (CBA). This allows users not only to quantify ecological benefits but also to assign monetary value to restoration impacts, thus supporting policy alignment, stakeholder engagement, and financing strategies. The workflow equips decision-makers to explore restoration trade-offs, identify optimal intervention points, and justify investments based on long-term ecosystem service gains. This guidance document presents the modelling workflow in a user-friendly, step-by-step format that accommodates varying levels of technical expertise. It covers software setup, data preparation, model configuration, calibration, scenario simulation, and both biophysical and economic valuation. Each step is illustrated with practical examples to facilitate understanding and application. By structuring the workflow in this way, the MERLIN team has ensured that a broad range of users– including environmental agencies, NGOs, consultants, academics, and government planners – can implement and benefit from the tool. Initial implementation of the workflow across European landscapes has demonstrated its flexibility and scalability. While it performs effectively with EU-level datasets, its accuracy and relevance can be further enhanced through integration with local, high-resolution data when available. Nonetheless, even in areas with limited data, the workflow provides valuable insights and supports strategic planning. In summary: the MERLIN modelling workflow represents a significant advancement in ecological restoration planning. By uniting ecohydrological modelling, ecosystem service quantification, and socio-economic evaluation in a replicable and adaptable framework, it offers a powerful tool to support Europe’s transition toward resilient, nature-based freshwater systems. Its broad applicability, scientific robustness, and policy relevance make it a cornerstone for transformative restoration efforts in alignment with Europe’s sustainability agenda. MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 5 Content 1 Introduction ..................................................................................................... 7 1.1 Background ....................................................................................................... 7 1.2 Contribution to European Green Deal Goals ............................................ 7 1.3 Overview of the guidance document and targeted audience ............... 7 2 Prerequisites .................................................................................................... 8 2.1 Recommended skills of the users ............................................................. 8 2.2 Hardware requirement .................................................................................. 8 2.3 Time dedication to complete the modelling workflow: Make it depend on background/level of expertise in modelling ................................. 9 3 The MERLIN modelling workflow Step-by-Step ........................................ 9 3.1 Software installation ..................................................................................... 9 3.2 Data collection ............................................................................................... 9 3.2.1 Data structuring .................................................................................. 9 3.2.2 Data collection & processing .......................................................... 10 3.3 Project set-up ................................................................................................ 16 3.3.1 Creating a New Project: ................................................................... 17 3.3.2 Watershed Delineation in QSWAT+ ............................................... 17 3.3.3 Creating HRUs in QSWAT+ .............................................................. 18 3.3.4 Edit inputs and run SWAT+ ............................................................ 20 3.4 Calibration ...................................................................................................... 31 General Settings – Linking a SWAT+ Project in R-SWAT and Parameters ..................................................................................................... 31 3.4.1 General Settings – Parameter sampling and calibration algorithm ......................................................................................................... 31 3.4.2 Running the SWAT+ Model in R-SWAT ........................................ 33 3.4.3 Evaluate Calibration – Objective Function ................................. 34 3.4.4 Evaluate Calibration – Create calibration.cal file ..................... 35 3.5 Simulation of restoration measures ........................................................ 36 3.5.1 Peatland rewetting ........................................................................... 36 3.5.2 Wetland rewetting ............................................................................ 37 Riparian buffer .............................................................................................. 40 3.5.3 Floodplain reconnection ................................................................. 40 3.5.4 Channel restoration .......................................................................... 41 3.6 Analysis of biophysical outputs related to ecosystem services ........ 41 3.6.1 MERLIN modelling workflow considered ecosystem services 42 MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 6 3.6.2 Running SWAT+ and obtaining the SQLite output file of the SWAT+ restoration simulation .................................................................. 44 3.6.3 Exploring the simulated biophysical results .............................. 45 3.7 Monetary valuation of restoration benefits ........................................... 46 3.7.1 Water purification ............................................................................ 46 3.7.2 Flood risk mitigation ........................................................................ 47 3.7.3 Global climate regulation ............................................................... 48 3.7.4 Drought risk mitigation ................................................................... 48 4 Issues during development and solutions / Lessons learned ................. 48 5 Conclusions .................................................................................................... 49 6 References ..................................................................................................... 50 MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 7 1 Introduction 1.1 Background Freshwater-related ecosystems across Europe are under increasing pressure from climate change, land-use intensification, and biodiversity loss. Restoration of these ecosystems presents a key opportunity to enhance ecological resilience, restore natural functions, and deliver multiple ecosystem services such as water purification, flood and drought mitigation, climate regulation, and carbon sequestration. However, to effectively design and implement restoration strategies, practitioners and policymakers require robust, scalable tools that can simulate and quantify the benefits of such interventions. Work Package 3 (WP3) of the MERLIN (Mainstreaming Ecological Restoration of freshwater-related ecosystems in a Landscape context: Innovation, upscaling and transformation) project addresses this challenge by developing a modelling workflow capable of assessing the bio-physical and economic impacts of freshwater ecosystem restoration across Europe. This workflow applies a process-based, eco-hydrological modelling approach using the modelling tool SWAT+ (Soil and Water Assessment Tool) that is an open-source software. The modelling workflow enables users to simulate a wide range of restoration measures and evaluate their impacts on a set of ecosystem services (ES) to inform the planning of where and how to restore freshwater ecosystems to optimize restoration benefits. The modelled ES include carbon sequestration, nutrient regulation, flood and drought risk reduction, and agricultural productivity. The input data for the modelling is completely based on harmonized, publicly available data at the EU level, allowing it to be implemented also in data-scarce regions and applied across multiple spatial scales, from small catchments to the whole of Europe. Crucially, the modelling workflow is designed for broad applicability, supporting future restoration efforts across diverse geographic and policy contexts. Its outputs, including GIS layers, scenario results, and valuation data, will also inform stakeholder engagement and capacity-building activities. An important part of the workflow comprises a socio-economic assessment component to evaluate restoration benefits from a stakeholder and policy perspective. This includes monetizing ecosystem service impacts through Natural Capital Accounting (NCA), helping to carry out Cost-Benefit Analysis (CBA), identifying financing incentives, policy synergies, and potential trade-offs between restoration goals. In summary, the (hereinafter) MERLIN modelling workflow developed under WP3 provides a structured approach to simulate restoration scenarios, assess ecosystem service outcomes, and evaluate the socioeconomic benefits of restoration strategies to inform planning of freshwater restoration projects. It serves as both a technical tool for analysts and a strategic resource for decision-makers, allowing users to explore the opportunities of different restoration approaches in a spatially explicit and evidence-based manner. 1.2 Contribution to European Green Deal Goals This workflow aligns with the ambitions of the European Green Deal, particularly regarding climate action, biodiversity enhancement, and sustainable land and water management. By enabling data-driven assessments of restoration outcomes, it strengthens the scientific foundation for investment in nature-based solutions and supports the mainstreaming of ecological restoration across sectors. 1.3 Overview of the guidance document and targeted audience The guidance document introduces the MERLIN modelling workflow in a clear, step-by-step format—starting from software installation and data preparation through simulation and analysis to socio-economic valuation. Each step is accompanied by practical examples to support users of varying technical backgrounds. The final product is a replicable and adaptable workflow that promotes integration between biophysical modelling and socio-economic evaluation. This guidance is intended for a wide audience, including environmental agencies, NGOs, restoration practitioners, academic researchers, consultants, and public administrators. Whether users are conducting field-level implementation or developing national restoration strategies, the workflow offers practical tools to inform decisions, demonstrate benefits, and enhance the long-term sustainability of freshwater restoration initiatives. The following sections of this document provide a comprehensive guide to applying the MERLIN modelling workflow in practice. Section 2 outlines the prerequisites for effective implementation, including recommended software and technical skills, hardware requirements, and expected time investments based on user expertise. The core of the document, Section 3, presents the modelling workflow in seven detailed steps. It begins with Step 1, which covers the installation of essential software tools such as QGIS, QSWAT+, SWAT+ Editor, Python, and R. Step 2 guides users through data collection and preparation, including sourcing and organizing key MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 8 spatial and environmental datasets like digital elevation models, stream networks, land cover, soil maps, and weather data. Step 3 focuses on project setup within the SWAT+ environment, addressing watershed delineation, Hydrological Response Unit (HRU) creation, and model configuration. Step 4 details model calibration using observed data and optimization algorithms, ensuring accurate simulation of hydrological and ecological processes. In Step 5, users apply various restoration scenarios—such as peatland and wetland rewetting, riparian buffer establishment, floodplain reconnection, and channel restoration—to explore their effects on ecosystem functions. Step 6 connects model outputs to ecosystem services, analysing biophysical indicators and integrating socio-economic data to evaluate restoration benefits. Finally, Step 7 introduces valuation techniques for monetizing ecosystem services, including methods for assessing water purification, flood risk reduction, climate regulation, and drought mitigation. Section 4 captures the key technical and conceptual challenges encountered throughout the development process, offering solutions and recommendations for future users. Section 5 concludes with reflections on the workflow’s relevance, usability, and potential to support large-scale, impact-oriented freshwater restoration efforts across Europe. 2 Prerequisites 2.1 Recommended skills of the users To effectively use the tools described in the MERLIN Cookbook, users should have intermediate to advanced knowledge in the following software areas: à QGIS and QSWAT+: o Familiarity with Geographic Information Systems (GIS), especially QGIS. o Ability to work with maps and geographic layers, including shapefiles and raster files à R and RStudio: o Basic programming knowledge in R à Skills in running scripts and managing packages like R-SWAT à Python (Optional but Recommended): o Competence in installing and managing Python packages using pip à Basic skills in running Python scripts (although a comprehensive guidance is provided in this guidance) à SWAT+ Editor: o Basic understanding of how the SWAT+ editor operates to modify parameters and run hydrological simulations 2.2 Hardware requirement To ensure optimal performance while working with the specified tools, users are recommended to have hardware that meets at least the following specifications: à Processor: o Minimum: Quad-core processor (e.g., Intel Core i5 or equivalent) o Recommended: 8-core processor for running simulations and parallel calibrations efficiently à RAM: o Minimum: 8 GB o Recommended: 16 GB or more to handle large projects in QGIS and complex simulations in SWAT+ à Storage: o Minimum of 50 GB free space to store project data, maps, climate databases, and simulation results à Operating System: o Windows 10 or later (required for specific installations, such as the Microsoft Store version of Python) (can run on other operating systems, such as Linux or MacOS, mind the differences in commands to run Python and different file paths structures). à Graphics Card: o Integrated: Sufficient for QGIS and SWAT+ (Integrated is enough) o Dedicated: Recommended for more efficient map processing à Internet Connection: o Required for downloading software, additional databases, and receiving tool updates à Extra: o Access to a computational cluster would be optimal to improve drastically time efficiency when calibrating the models MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 9 2.3 Time dedication to complete the modelling workflow: Make it depend on background/level of expertise in modelling The time required to complete the MERLIN modelling workflow depends on the user’s background, particularly their experience with spatial analysis and hydrological modelling. However, practical applications show that the workflow is both efficient and accessible, even for those with limited modelling experience. For example, in a real-world implementation, a user with a Master’s degree and strong expertise in GIS—but no prior experience in eco-hydrological modelling—was able to complete the core modelling tasks for the Bzura River Basin (Poland) in approximately 7 hours. This time covered software setup, data preparation, model configuration, and scenario simulation. (Note: model calibration was included only in terms of setup, as full calibration can take several days.) In comparison, a member of the MERLIN development team with extensive SWAT+ experience completed the same tasks in about 6 hours. This small time difference—just one hour—highlights the usability and efficiency of the MERLIN modelling workflow. Its step-by-step guidance, seamless software integration, and practical examples help flatten the learning curve, enabling effective use by a wide range of users. Whether environmental practitioners, consultants, planners, or researchers, users can implement the workflow with confidence, regardless of their modelling background. 3 The MERLIN modelling workflow Step-by-Step This section provides a complete and structured walkthrough of the MERLIN modelling workflow. Each step is explained in detail, from software installation to model setup, execution, and result evaluation. The guide is designed to be followed sequentially, ensuring that users — regardless of prior experience — can carry out each stage of the modelling process successfully. 3.1 Software installation In this section, we detail the software needed to successfully complete the workflow, as well as recommendations for downloading and installing the appropriate versions. We strongly suggest using the latest versions of all tools to ensure compatibility and access to the newest features. Below we list the software requirements to follow this guide, providing a link to download each of them as well as the suggested order: 1. QGIS LTR: Although version 3.22 was used in our workflow, we recommend installing the most recent long-term release of QGIS for Windows (Download from here). 2. QSWAT+, SWAT+ Editor and SWAT+ rev: Version 3.0.3 of QSWAT+, 3.0.8 of SWAT+ Editor and 61.0.1 of SWAT+ were used in our workflow, the current latest SWAT+ release. We recommend always downloading and installing the latest version, following the official installation guide available on the SWAT+ website (Download from here). 3. R, R Studio, and R-SWAT: To use R-SWAT, we recommend installing the latest version of R (Download from here) and RStudio (Download from here) and following the instructions provided by the author to properly install R-SWAT (Available here). 4. Python and PIP: The latest version of Python can be installed through the Microsoft Store on Windows. To install PIP, the user can follow the steps provided here. 5. FileZilla: We recommend installing the latest version of FileZilla (Download from here) 3.2 Data collection In this section, we describe the data required to build the hydrological model. This includes spatial datasets such as topography, land use, soil types, and river networks, as well as climate and hydrological records. Proper data collection ensures that the modelling process can proceed without interruptions or inconsistencies. 3.2.1 Data structuring To organize all input files clearly and consistently, we propose the following folder structure: à 0-Model: Here, the user should save the different models for the given basin MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 16 Figure 3. Evapotranspiration and Soil Water Content (3) 11. Open a Windows terminal inside the folder of both the script and the data by typing “cmd” in the path finder and pressing Enter (Figure 4). Figure 4. Evapotranspiration and Soil Water Content (4) 12. In the terminal, type the following command to install all the necessary Python libraries: “pip install - r requirements.txt” (Figure 5). Figure 5. Evapotranspiration and Soil Water Content (5) 13. After installing the libraries, type the final command to run the Python script: “python PrepareObservations.py” or “python3 PrepareObservations.py” (Figure 6) to get the resulting file with the evapotranspiration filtered observations (which will be needed for the 3.4.4 step): Figure 6. Evapotranspiration and Soil Water Content (6) 3.3 Project set-up The project set-up phase establishes the foundational structure of the model, integrating spatial data and configuring the watershed to enable accurate simulation of hydrological and ecological processes. MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 17 Replace the swatplus_datasets.sqlite file from the installation folder (SWAT à SWATPlus à Datasets) with the one provided in the MERLIN GitHub repository. This sqlite includes several modifications needed to simulate some of the restoration measures of the MERLIN project. 3.3.1 Creating a New Project: Figure 7 illustrates the steps to create a new project and initiate watershed delineation using QSWAT+ in QGIS. 1. Open QSWAT+: Click on the QSWAT+ icon in the toolbar to launch the plugin (Step 1). 2. Create a New Project: In the QSWAT+ 3.0.3 window, select "New Project" and click OK to create a new project, define the desires parent directory and project name. (Step 2). 3. Delineate the Watershed: In the main QSWAT+ interface, select "Step 1: Delineate Watershed" to begin defining the watershed area (Step 3). Figure 7. Creating a New Project 3.3.2 Watershed Delineation in QSWAT+ Figure 8 shows the process of setting up watershed delineation in QSWAT+ by selecting a DEM (Digital Elevation Model) and configuring various inputs. The highlighted steps are as follows: 1. Select the DEM File – The Digital Elevation Model (DEM) file is loaded to define the terrain for watershed delineation. (Step 1) 2. Burn in Existing Stream Network – This option ensures that the stream network is incorporated into the DEM to better represent actual hydrological features. (Step 2) 3. Select the Stream Network File – A shapefile containing the stream network is loaded to define the river system. (Step 3) 4. Create Streams – Threshold values for channel and stream delineation are set, which determine the extension of the stream network. The smaller they are, the more detailed the network will be. We recommend using the default values (provided by QSWAT+) unless there is a specific need (e.g., the stream network does not reach a lake near the headwaters, and the threshold needs to be reduced so it does). Clicking "Create streams" generates the stream network based on these thresholds, and it can be repeated multiple times until you have the desired stream network. IMPORTANT: Consider that this step may take a while to complete, it is not hanging, it just needs time as it is processing.(Step 4) MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 18 5. Use an Inlets/Outlets Shapefile – This option enables the use of a shapefile with inlets and outlets, ensuring correct watershed outlet placement. (Step 5) 6. Select the Inlets/Outlets File – A shapefile with outlet locations is provided to guide watershed delineation. Might not be a necessary step (see section 3.2.2). 7. Draw outlet – Select the outlet point at the downstream end of your watershed simply by clicking on it. An outlet (blue triangle) will be drawn. This may not be necessary if the basin outlet has already been included in the inlets/outlets shapefile (see section 3.2.2). 8. Create Watershed – Clicking "Create watershed" initiates the watershed delineation process using the provided inputs. (Step 8) 9. Add Lakes Shapefile – If the study area contains lakes, a lake shapefile can be added to refine hydrological modelling. (Step 9) 10. Confirm and Run the Process – Clicking "OK" finalizes the setup and runs the watershed delineation. (Step 10) Figure 8. Watershed Delineation in QSWAT+ 3.3.3 Creating HRUs in QSWAT+ Figure 9 illustrates the process of creating Hydrological Response Units (HRUs) in QSWAT+ by defining land use, soil, and slope parameters. Below are the key steps shown: 1. Select the Land Use Map – A raster file containing land use classifications is chosen to define different land cover types. (Step 1) MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 19 2. Select the Soil Map – A raster file with soil data is loaded to define soil properties within the watershed. (Step 2) 3. Select Land Use and Soil Tables – Select the corresponding lookup (“DSOLMap_database_lookup.csv”) and usersoil (“DSOLMap_database.csv”) tables. (Step 3) 4. Select Plant Table – Import the plant_merlin.csv table from the MERLIN GitHub repository. (Step 4) 5. Define Slope Bands – Custom slope categories are inserted to differentiate terrain features. Introduce “2” and then press insert to add this band, add “8” and press insert to also add this band, unless the project will have a floodplain, in which case it might not be necessary since there will already be a separation between upland and floodplain. (Step 5) 6. Select floodplain map – If the model involves simulating restoration measures related to the floodplain, a floodplain map is required. To be able to select it from the drop-down menu, first, the raster file must be copied into the project folder à Watershed à Rasters à Landscape à Flood. IMPORTANT: Note that you might need to close and reopen the window for it to detect the floodplain file.(Step 6) 7. Generate Full HRUs Shapefile – This option ensures that the HRU shapefile is created for further analysis. (Step 7) 8. Read and Process Data – Clicking "Read" starts processing the HRUs using the selected land use, soil, and slope information. (Step 8) Figure 9. Creating HRUs in QSWAT+ (1) MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 20 Figure 10 shows the process of defining and filtering Hydrological Response Units (HRUs) in QSWAT+ before finalizing their creation. The key steps highlighted are: 1. Filter HRUs by Area – The option “Filter by area” is selected, meaning that HRUs will be created based on a defined minimum area threshold. This helps remove very small HRUs that may not significantly impact the hydrological model. 2. Set the Area Threshold – The threshold value is set to 0, meaning that no HRUs will be removed based on size. This ensures that all HRUs are considered in the analysis. 3. Create HRUs – Clicking "Create HRU" finalizes the process, generating the HRU dataset based on the selected filtering criteria. Figure 10. Creating HRUs in QSWAT+ (2) 3.3.4 Edit inputs and run SWAT+ Import project to the SWAT+ Editor Figure 11 shows the steps to open the project in the SWAT+ Editor. The highlighted steps are: 1. Open the SWAT+ Editor – Click on “Step 3: Edit Inputs and Run SWAT+”. This will open the SWAT+ Editor. (Step 1) 2. Import project – Since this is the first time opening the project in the Editor, it needs to be imported. Click on “Start”. (Step 2) MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 21 Figure 11. Edit inputs and Run SWAT+ (1) Opening an Existing Project in SWAT+ Editor Once the project has already been imported into the SWAT+ Editor, you can open it whenever directly from the editor. If your project is not shown below “Recent Projects”, you can follow Figure 12 to open it. 1. Open Another Project – In the SWAT+ Editor interface, click on "Open another project" to load an existing project. (Step 1) 2. Browse for the Project File – In the Open project selection window, click on the folder icon and locate the project SQLite database file, located in the project directory. (Step 2) 3. Select the SQLite Database File – Select the SQLite (.sqlite) file corresponding to the project. (Step 3) 4. Open project – Click “Open”. (Step 4) 5. Do not reimport watershed data – Select the option “No, continue to Editor”. (Step 5) Figure 12. Edit inputs and Run SWAT+ (2) Importing Weather Generator Data in SWAT+ Figure 13 illustrates the process of importing weather generator data into the SWAT+ Editor to define climate conditions for the model. The steps highlighted are: 1. Open the Climate Menu – Navigate to the "Climate" section in the left panel and select "Weather Generator". (Step 1) MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 22 2. Access the Import Menu – Click on the Weather Generator tab to open the import interface. (Step 2) 3. Import data – Click on “Import Data”. (Step 3) 4. Select Data Format – Choose "Database" as the data format for importing weather generator data. (Step 4) 5. Set Database File – Ensure that the Database File is “swatplus_wgn.sqlite”. If you downloaded it when installing the SWAT+ Editor, it should already be selected by default. If not, locate and select it. (Step 5) 6. Specify the Table Name – Enter the table name "wgn_cfsr_world", which contains pre-defined weather generator data. (Step 6) 7. Check Observed Weather Data – Enable the "Check if you are using observed weather data" option to ensure the model correctly integrates actual climate records. (Step 7) 8. Start the Import Process – Click "Import Data" to begin importing the weather generator data into SWAT+. (Step 8) This process ensures that climate inputs are correctly set up, enabling SWAT+ to simulate hydrological and meteorological conditions accurately. Figure 13. Edit inputs and Run SWAT+ (3) Importing Observed Weather Data in SWAT+ Figure 14 illustrates the process of importing observed weather data into SWAT+ Editor, which is essential for running climate-based simulations. The key steps shown are: 9. Copy the Weather Data into the TxtInOut – Copy the weather data that was previously downloaded (should be in the model folder > 3-Weather data) into the TxtInOut folder (project folder à Scenarios à Default à TxtInOut). Now it should contain weather input files such as precipitation (.pcp), temperature (.tem), solar radiation (.slr), wind speed (.wnd), and humidity (.hmd), as well as master files (.cli). (Step 0) 10. Access the Weather Stations Menu – Navigate to the "Climate" section in the left panel and select "Weather Stations" to manage weather inputs. (Step 1) 11. Open the Import Data Window – Click "Import Data" to begin the process of loading observed weather data. (Step 2) 12. Select Data Format – Choose "SWAT+" as the data format, ensuring compatibility with SWAT+ formatted weather files. (Step 3) 13. Browse for the Weather Data Directory – Select the folder where the observed weather data files were previously stored (TxtInOut). It should already be selected by default. (Step 4). 14. Start the Import Process – Click "Import Data" to begin importing the observed weather data into SWAT+. (Step 5) This step ensures that real-world climate data is correctly integrated into the SWAT+ model, allowing for more accurate hydrological simulations. MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 23 Figure 14. Edit inputs and Run SWAT+ (1) Import Atmospheric Deposition Data in SWAT+ Figure 15 illustrates the process of importing atmospheric deposition data into the SWAT+ Editor. The key steps shown are: 1. Access the Atmospheric Deposition Menu – Navigate to the "Climate" section in the left panel and select "Atmospheric Deposition". (Step 1) 2. Download the weather station mapping template – Click "Import Data" and then “Export template file”. Save this “atmo-weather-station-map.csv” file to your computer. As mentioned before, this is necessary before continuing with the atmospheric deposition data processing, so after downloading it, refer to 3.2.2 to continue processing the original atmospheric deposition dataset. (Step 2) 3. Select the “Atmospheric deposition file” – After finishing processing the data and converting it into SWAT+ format, click on the folder icon besides “Atmospheric deposition file” and select the CSV “atmo_acgannual.csv”. (Step 3) 4. Select the “Atmospheric deposition to weather station mapping file” – Click on the folder icon besides “Atmospheric deposition to weather station mapping file” and select the CSV “atmoweather-station-map.csv”. (Step 4) 5. Start the Import Process – Click "Import Data" to import the atmospheric deposition data into SWAT+. (Step 5) Figure 15. Edit inputs and Run SWAT+ (4) Add inlet and point source WWTP discharge data Figure 16 illustrates the process of adding inlet and WWTP discharge data in point sources in SWAT+. 1. Access the Point Sources / Inlets Menu – Navigate to the "Connections" section in the left panel and select "Point Sources / Inlets". (Step 1) MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 24 2. Determine if the model has an inlet, that is, if only part of the river basin is simulated, and thus the inlet is a point in the stream network where we have observed streamflow. This observed streamflow will be used as an input while SWAT+ simulates the processes downstream to that point. If that is the case, identify which point source represents the inlet by looking at its ID in the “Pt sources and reservoirs” shapefile. For example, if the ID is 2, the equivalent object in the Editor will have a name such as pt002. Once identified, click on the edit icon beside the name and change the “Time Step” drop-down menu from “Constant” to “Daily” (or “Monthly”, depending on the timestep of the observed streamflow data). “Save Changes” and then go “Back”. (Step 2). 3. Export point source template – Click “Import/Export” and then “Export Data”. This will download a file called “recall.csv”, which contains the data for all point sources in the model. If the model also has an inlet, as mentioned in the previous section, another file with a name like “ptXXX.csv” will also be downloaded (where XXX is the point source id). (Step 3) 4. Populate “recall.csv” and (if present) “ptXXX.csv” accordingly. For the inlet file, input the volume of water in m3 (column flo) that enters for each timestep for the entire time series. For the point source file, identify the point sources that include a WWTP discharge using the “Pt sources and reservoirs” shapefile, whose ID corresponds to the name in “recall.csv” (see step 2 below for more detail in how to link them). The point coordinates might not be exactly the same, so a “Join Attributes by Nearest” could help if there are too many WWTP to do it manually. Then, in the “recall.csv” file, for each WWTP, add the daily volume in m3 (column flo), the daily load of nitrate in kg N (column no3), and the daily load of mineral phosphorus in kg P (column solp). See section 3.2.2 for data processing. (Step 4). 5. Import modified files – Click “Import/Export” again and select the directory that contains the file(s) that you modified. Then click “Import Data”. (Step 5) Figure 16. Edit inputs and Run SWAT+ (5) Change the water routing method Figure 17 illustrates the process of changing the water routing method in SWAT+. This step is only necessary if the model will include the simulation of floodplain reconnection. In all other cases, the default water routing method can be used. 1. Access the Codes Menu – Navigate to the "Basin" section in the left panel and select "Codes". (Step 1) 2. Change the water routing method – From the drop-down menu of “Water routing method”, select “1Muskingum method”. (Step 2) 3. Save changes – Click on “Save changes”. (Step 3) MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 25 Figure 17. Edit inputs and Run SWAT+ (6) Agriculture crop rotation For the agriculture land uses included in the WateriTech land use map (agrl and agrr), a management schedule with a decision table to simulate annual planting and harvesting has already been created by default. However, if the model includes the land use fstp (to simulate the restoration of riparian vegetation using filter strips), the management schedule for this land use must be manually added. Figure 18 illustrates this process of adding the plant and harvest management schedule for the land use “fstp”, if it exists, into SWAT+. 1. Check if “fstp” exists - Navigate to the "Land Use Management" section in the left panel and then select "Land Use Management". Search if the land use “fstp” exists. If not, skip this section. (Step 1) 2. Access the Management Schedules Menu – Navigate to the "Land Use Management" section in the left panel and select "Management Schedules". (Step 2) 3. Create a new management schedule – Click “Create record” and name it “fstp_rot”. (Step 3) 4. Add crop rotation – From the drop-down menu below “Add a decision table” select “crop rotation”. Then select “plant and harvest for continuous summer crop” from the new drop-down menu that will appear below and click on “Configure & Add”. (Step 4) 5. Configure the decision table – Select “fstp” from the plant drop-down menu and then click “Save”. (Step 5) 6. Save management schedule – Click “Save Changes” and then “Back”. (Step 6) 7. Edit land use – Go back to “Land Use Management” and edit “fstp_lum”. (Step 7) 8. Assign management schedule to land use – From the “Management Schedule” drop-down menu, select “fstp_rot” and then “Save changes”. (Step 8) MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 32 Figure 27 shows the setup for this process: 1. Open the “Parameter Sampling” Section – In the left panel, click on “2. Parameter sampling” to open the configuration window. (Step 1) 2. Define the Parameters to Be Calibrated – In the parameter table, you must enter the list of SWAT+ parameters to be included in the calibration or sensitivity analysis. (Step 2). We recommend using the 15 parameters that we have listed in Table 1, do not modify this list unless you are certain of the implications. 3. Choose the Sampling Approach - From the dropdown menu, select “Sensi_Cali_(uniform_Latin_Hypercube_Sampling)” as the method. (Step 3) 4. Define the Number of IterationsIn the field below the method selection, enter the number of iterations or parameter combinations to simulate. We recommend setting it to 2000. (Step 4). Table 1. Calibration parameters Parameter Change Min Max awc.sol relative -1 5 bd.sol relative -0.5 0.5 canmx.hru absolute 0 20 esco.hru absolute 0 1 epco.hru absolute 0 1 evrch.bsn absolute 0.5 1 k.sol relative -1 5 latq_co.hru absolute 0 1 lat_ttime.hru absolute 0 180 perco.hru absolute 0 1 revap_co.aqu absolute 0.02 0.2 snomelt_tmp.hru absolute -5 5 snomelt_max.hru absolute 1.5 8 snomelt_min.hru absolute 1.5 8 z.sol relative -0.5 0.5 MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 33 Figure 27. Calibration (3) 3.4.2 Running the SWAT+ Model in R-SWAT Figure 28Figure 28 shows how to run the SWAT+ model using the parameter sets generated in the previous step. Follow the instructions below and use the same configuration shown, unless you know exactly why you should change something. 1. Open the “Run SWAT” section – From the left menu, click on “3. Run SWAT”. This section is where you control how the model is run. (Step 1) 2. Define model outputs for extraction – This is where you tell R-SWAT which output file and variable to use for evaluating model performance. Use exactly the following configuration: a. FileType: Select basin_wb_mon.txt from the dropdown. (Step 2) b. FileName: Write or confirm the name is basin_wb_mon.txt. This file contains monthly water balance results at the basin level. (Step 3) c. Column: Write 15. This refers to the column that contains the variable of interest (usually discharge or flow). (Step 4) d. Reach_Unit: Define it as “1”. Since we are working at the basin scale, the whole basin acts as a unique reach. (Step 5) Do not change these settings unless you are working with different output files or analysing other components (e.g., a subbasin or HRU). For this guide, we will always work at the basin level. 3. Select date range – Set the simulation period to match the period for which you have observed data, setting a start and end date. These dates must fall within the simulation period you defined in SWAT+ (and must exclude the warm-up period). If your observed data uses different dates, adjust them accordingly. (Step 6) 4. Select number of parallel runs (threads) – Use the slider to set the number of threads to 12. This defines how many simulations R-SWAT will run at the same time. If your computer has fewer than 12 cores, you can reduce this number, but 12 is ideal if your system allows it. (Step 7) 5. Run the model – Click the blue button “Click here to run SWAT” to start the simulations. R-SWAT will begin running the model for each parameter set and save the outputs for evaluation. IMPORTANT: Take into consideration that this step may take days to finish as it will run a huge number of SWAT+ simulations. (Step 8) MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 34 Figure 28. Calibration (4) 3.4.3 Evaluate Calibration – Objective Function After running the model, the next step is to evaluate its performance by comparing simulated results with observed data. This is done by calculating an objective function, which gives a numerical value to show how well the model fits the observations. Unless otherwise instructed, follow exactly the setup described below and illustrated in Figure 29. 1. Open the “Objective Function” Section – From the left panel, expand “4. Evaluate output” and click on “4.1 Objective function”. This will open the settings for computing model performance. (Step 1) 2. Select the Objective Function – In the dropdown list, choose NSE (Nash-Sutcliffe Efficiency) as the objective function. You can choose any other metric, but NSE is one of the most widely used objective function in hydrology, measuring how closely the simulated values match the observed values. A NSE of 1 indicates a perfect match, while NSE below 0 indicates that the mean of the observed data is a better predictor than the model. NSE > 0.5 is considered acceptable, while NSE > 0.7 is considered good. (Step 2). 3. Load the Observed Data File – Click on the blue button “Please select observed data file(s)” and select the file containing your observed data (The file named “obs_var_1.txt from the 3.2.2 step, the GLEAM data). This file should: a. Have the same date range used in the Run SWAT step (excluding warm-up) b. Be formatted correctly according to R-SWAT’s requirements. The model will only evaluate correctly if the observed data file matches the simulation dates and output type exactly. (Step 3) 4. Calculate the Objective Function – Once the observed data file is loaded, click on “Click here to calculate objective function”. R-SWAT will now compare each parameter set’s simulation output against the observed data and calculate the NSE value for each one. (Step 4) This completes the first evaluation of model performance and prepares you for sensitivity analysis or further calibration. MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 35 Figure 29. Calibration (5) 3.4.4 Evaluate Calibration – Create calibration.cal file The final step is to generate the “calibration.cal” file, which will contain the calibrated parameter values. As illustrated in Figure 30, follow the next steps: 1. Display the Objective Function Table – Check the option “Display table of objective function values.” (Step 1) 2. Identify the Best Simulation – Each row corresponds to one simulation. The simulation with the highest objCalibration value (e.g., 0.24 in this example) is typically the best-performing one. (Step 2) 3. Copy the values of the parameters for the best simulation – There is a column for each parameter (in this case a test with only 8 parameters) and the value of each parameter for each simulation. Copy the values of each parameter for the best simulation (There is also an option to export to CSV or Excel). (Step 3) 4. Locate and modify the “calibration.cal” file – Inside the calibration directory (defined earlier), there will be a directory named “TxtInOut_1”, inside this directory locate the “calibration.cal” file and modify the values of the “chg_val” column according to the values of the best simulation. (Step 4) 5. Copy “calibration.cal” to the original TxtInOut – Copy the modified “calibration.cal” to the original TxtInOut folder (project folder à Scenarios à Default à TxtInOut). (Step 5) 6. Copy the TxtInOut folder – Make a copy of the TxtInOut folder and rename it “TxtInOut_inputs”. (Step 6) MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 36 Figure 30. Calibration (6) 3.5 Simulation of restoration measures This section outlines the procedures used to simulate the restoration measures considered in the MERLIN project within the SWAT+ modelling framework. The restoration actions are implemented by modifying specific model inputs in a copy of the calibrated default scenario to avoid overwriting baseline conditions. The actions simulated include peatland rewetting, wetland rewetting, riparian buffer establishment, floodplain reconnection, and stream channel restoration. These measures represent a range of interventions in different freshwater ecosystem types applied in selected MERLIN restoration case studies; the Forth (UK), Danube (Romania), Sorraia (Portugal), Kampinos (Poland), and Komppasuo (Finland). Each type of restoration is represented in SWAT+ through targeted changes to land use classifications, hydrological parameters, and structural connectivity, depending on the nature of the intervention. For instance, rewetting peatlands and wetlands requires redefining land cover and, in the case of wetlands, associating HRUs with wetland-specific hydrological objects. Riparian buffer establishment is simulated through the inclusion of vegetated filter strips along watercourses, while floodplain reconnection is achieved by enabling overbank flow and linking channels with their adjacent routing units. Channel restoration is modelled by adjusting parameters such as Manning’s roughness coefficient and sinuosity to reflect more natural fluvial dynamics. While restoration scenarios could be set up directly in the SWAT+ Editor, to avoid overwriting the default scenario and making it easier to compare baseline with scenario simulations, we recommend creating new scenarios by duplicating the TxtInOut and directly modifying the input files to define restoration scenarios. That is the reason why in the previous section, after adding the “calibration.cal” file to the TxtInOut, we created a copy of TxtInOut_inputs to easily use as a backup copying folder. This way, even after we run the baseline scenario in the TxtInOut folder (section 3.6.2), we will still have a copy containing only the inputs files to easily copy into new folders/scenarios, since output files can be of large size, and we do not need to copy them for new scenarios. 3.5.1 Peatland rewetting The restoration measure of peatland rewetting is simulated in SWAT+ by changing the land use of the target HRUs from barren or sparsely vegetated (bsvg) to peatland (peat). To identify these target HRUs, use QGIS and the shapefile “Actual HRUs (hrus2)”. Their ID is the value in the column “HRUS”. If the land use peat is already present in the model, the following file from the TxtInOut must be edited: à hru-data.hru. For the target HRUs, change “bsvg_lum” to “peat_lum” in the lu_mgt column. MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 37 Figure 31. Simulation of restoration measures (1) Although it may not be the case, if the land use peat was not previously present in the model, the following files must also be edited: à landuse.lum – Add a row with the following information. You can also copy it from the example file peat_landuse.lum. name cal_group plnt_com mgt cn2 cons_prac urban peat_lum null peat_comm null wood_p up_down_slope null urb_ro ov_mann tile sep vfs grww bmp null forest_med null null null null null à plant.ini – Add two rows with the following information. You can also copy it from the example file peat_plant.ini. pcom_name plt_cnt rot_yr_ini plt_name lc_status lai_init bm_init peat_comm 1 1 peat y 2 50000 phu_init plnt_pop yrs_init rsd_init 0 0 1 10000 3.5.2 Wetland rewetting The restoration measure of wetland rewetting is similar to peatland rewetting, but the only difference is that HRUs with the land use wetland (wetl) also require a wetland object to be defined, and the original land use of target HRUs could be any. If the land use wetl is already present in the model, the following files must be edited: à hru-data.hru – For the target HRUs, change “xxxx_lum” to “wetl_lum” in the lu_mgt column. In the surf_stor column, change “null” to “wet#”, where # is the HRU’s numerical id. Note that the number must be the same as the one in the columns name, topo and hydro, with zeroes in front of the id if necessary. For example, if the model has thousands of HRUs, for the HRU with id 9 in the surf_stor column you must write “wet0009”, while the HRU with id 10 will be “wet0010” and the HRU with id 1234 will be “wet1234”. Figure 32. Simulation of restoration measures (2) à wetland.wet – Add a row for each of the target HRUs with the following information: id name init hyd rel sed nut (sequential id) wet# initwet1 hydwet# wetland sedwet1 nutwet1 where wet# is the name in the surf_stor column of the hru-data.hru file, and hydwet# must have the same number as wet#. Following the previous example, for “wet0009” you must also write “hydwet0009”. The MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 38 sequential id refers to the wetland object id (different from the HRU id). For example, if in the wetland.wet file there already were 19 objects and three more needed to be added, their ids would respectively be 20, 21, and 22. Figure 33. Simulation of restoration measures (3) à hydrology.wet – Add a row for each of the target HRUs with the following information: name hru_ps dp_ps hru_es dp_es k hydwet# 0.1 20 0.25 100 0.01 evap vol_area_co vol_dp_a vol_dp_b hru_frac 0.7 1 1 1 0.5 Figure 34. Simulation of restoration measures (4) Similarly to peatland rewetting, even though it may not be the case, if the land use wetl was not previously present in the model, the following files must also be edited: à landuse.lum – Add a row with the following information. You can also copy it from the example file wetl_landuse.lum. name cal_group plnt_com mgt cn2 cons_prac urban wetl_lum null wetl_comm null wood_p up_down_slope null urb_ro ov_mann tile sep vfs grww bmp null forest_med null null null null null à plant.ini – Add two rows with the following information. You can also copy it from the example file wetl_plant.ini. MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 39 pcom_name plt_cnt rot_yr_ini plt_name lc_status lai_init bm_init wetl_comm 1 1 wetl y 2 50000 phu_init plnt_pop yrs_init rsd_init 0 0 1 10000 Although highly improbable, there could also be the possibility that the model does not previously have any wetland land use, in which case the wetland.wet and hydrology.wet files will not exist within the TxtInOut, and the files must be created. We have provided some sample files to use as a template. Note that the first line in both files is not read by SWAT+ and therefore the header must be in line 2, and the actual data for each HRU must start in line 3. Moreover, the following files must also be edited/added: à file.cio – If the model has reservoirs/lakes, change the last two null values of line 6 (reservoir) to wetland.wet and hydrology.wet, respectively. If there are no reservoirs/lakes, all values in line 6 will be null and it should be changed to: reservoir initial.res null null sediment .res nutrients .res null wetland. wet hydrolog y.wet Figure 35. Simulation of restoration measures (5) à initial.res – If the model has reservoirs/lakes, this file will already exist and a row for initwet1 should be added. Otherwise, the file must be added to the TxtInOut, noting that the header must be in line 2 and the initwet1 values in line 3. We have provided an example initial.res file to copy the line/file. name org_min pest path hmet salt description initwet1 no_init null null null null null à sediment.res – If the model has reservoirs/lakes, this file will already exist and a row for sedwet1 should be added. Otherwise, the file must be added to the TxtInOut, noting that the header must be in line 2 and the sedwet1 values in line 3. We have provided an example sediment.res file to copy the line/file. name sed_amt d50 carbon bd sed_stl stl_vel sedwet1 1 10 0 0 1 1 à nutrients.res – If the model has reservoirs/lakes, this file will already exist and a row for nutwet1 should be added. Otherwise, the file must be added to the TxtInOut, noting that the header must be in line 2 and the nutwet1 values in line 3. We have provided an example nutrients.res file to copy the line/file. name mid_start mid_end mid_n_stl n_stl mid_p_stl p_stl nutwet1 5 10 5.5 5.5 10 10 chla_co secchi_co theta_n theta_p n_min_stl p_min_stl 1 1 1 1 0.1 0.01 MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 40 Riparian buffer To simulate the restoration of riparian vegetation in target HRUs we need to assign them a filter strip. As seen in section 3.2.2, we have already identified those HRU and assigned them a different land use (fstp) during the land use map processing. The following files from the TxtInOut need to be modified: à landuse.lum – For “fstp_lum”, change the value in column vfs from “null” to “field_border”. Figure 36. Simulation of restoration measures (6) à filterstrip.str – For “field_border”, change the value in column flag from 0 to 1. Figure 37. Simulation of restoration measures (7) 3.5.3 Floodplain reconnection To simulate the reconnection between stream and floodplain we will activate the SWAT+ functionality of overbank flow. The following files need to be modified/added: à codes.bsn – Change the value for “i_fpwet” from 1 to 2. Figure 38. Simulation of restoration measures (8) à file.cio – Change the first “null” value from row “link” to “chan-suf.lin”. Figure 39. Simulation of restoration measures (9) MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 41 à chan-surf.lin – Create this file and add it to the TxtInOut, which links the target channels we want to reconnect to its respective floodplain. The file’s structure is the following, but an example of the chansurf.lin file is also available to use as a template. o Line 1 – Title, SWAT+ will not read it. It can be left blank. o Line 2 – Number of channels that connect to the floodplain. à Line 3 – Header. The columns represent the following: § NUMB: channel id. § NAME: channel name. § NSPU: number of objects in the floodplain. In our case, it will always be 1, as the channel will connect to all HRUs in the floodplain (using the routing unit object). à OBTYP: in our case, ru (routing unit). § OBTYP_N0: routing unit ID. o Line 4+ – Data for each channel that connects to the floodplain. To populate the chan-surf.lin file, follow the steps from Figure 40. 1. Identify the ID and name of target channels in the TxtInOut file chandeg.con. Note that the ID in the attribute “Channel” in the shapefile rivs1.shp corresponds to the column “gis_id”, but might not necessarily be the same as the actual channel ID in the TxtInOut. (Step 1) 2. Use the file rout_unit.con to determine the routing unit that each target channel connects to. The column “obj_id” corresponds to the channel ID, but multiple routing units can connect to the same channel. This is because one represents the upland and the other the floodplain, but in this case, we only need the floodplain ru, which will be the one with the lowest number in the column “out_tot”. Once the floodplain ru for each target channel has been identified, the ID in the rtu column is the OBTYP_N0 value in chan-surf.lin. (Step 2) Figure 40. Simulation of restoration measures (10) 3.5.4 Channel restoration The restoration of channels can be simulated in SWAT+ by increasing two key channel parameters: Manning’s n roughness coefficient and sinuosity. Once the target channels to be restored are identified, we need to modify these parameters in the following file: à hyd-sed-lte.cha – Manning’s n and sinuosity are respectively in columns “mann” and “sinu”. The value increase for each target channel is at the user’s discretion; a larger increase implies the return to more natural conditions. Figure 41. Simulation of restoration measures (11) 3.6 Analysis of biophysical outputs related to ecosystem services Understanding and quantifying the benefits of freshwater ecosystem restoration requires a clear link between the physical landscape processes simulated by models and the ecosystem services (ES) they support. Step 6 of MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 48 d. SQLite files: One with the baseline scenario output tables and another with the restoration scenario output tables e. Parameters: i. Return periods of the risk map layers used in the previous step (A, B, C, E-optional, D-optional) ii. Field in the administrative units layer with unique identification values (Admin_id). A string value should be provided. Once the tool Risk Mitigation has finished processing, a shapefile similar to the Administrative units layer will be generated, but with a EADD_sum field with the calculated EAD by administrative unit. Figure 45. Result of the S+FloodRisk tool for a large-scale peatland restoration simulated in the Forth Basin (UK) 3.7.3 Global climate regulation While SWAT+ does not directly model CO₂ emissions or sequestration in ecosystems, it provides land use data that can be combined with default CO₂ emission and sequestration factors per land use class to estimate the impact of restoration on global climate regulation—specifically, in terms of reduced emissions or increased sequestration. These benefits can then be monetized by applying a monetary value per ton of CO₂, based on estimates such as the social cost of carbon or carbon credit market prices. Deliverable 3.4 presents examples of how global climate regulation benefits are estimated and integrated into the cost-benefit analysis of MERLIN case studies. 3.7.4 Drought risk mitigation SWAT+ enables the modelling of key indicators relevant to drought risk mitigation, such as reservoir and groundwater recharge, as well as hydraulic flows in channels (see Section 3.6.3). However, the monetary value of drought risk mitigation varies significantly depending on the hydrological context of the catchment—e.g. comparing north-western European to Mediterranean basins—and on the specific types of water use, such as for agriculture, water supply, hydropower, or navigation. These variations necessitate the use of contextspecific valuation methods. As a result, the MERLIN modelling workflow does not include a universal approach for valuing drought risk mitigation. Instead, Deliverable 3.4 presents several valuation methods that can be applied alongside SWAT+ physical indicators to estimate drought risk mitigation benefits tailored to specific catchment and water use contexts. 4 Issues during development and solutions / Lessons learned The development of the MERLIN modelling workflow encountered several challenges, primarily related to data availability, quality, and spatial resolution. To ensure consistent and comparable calibration across the diverse MERLIN case studies, the modelling team adopted a strategy cantered on modelled evapotranspiration data from GLEAM as the primary reference for hydrological calibration. GLEAM provides globally consistent, highquality estimates of evapotranspiration, offering a robust and spatially comprehensive dataset that is particularly well suited for achieving reliable calibration in regions where observed hydrological data are limited MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 49 or inconsistent. This approach enabled a more balanced, basin-wide representation of hydrological processes and allowed the modelling to deliver meaningful insights, even in data-scarce contexts. This strategy proved more effective than relying solely on observed streamflow data from local gauging stations, which was the initial plan. Although daily streamflow data were collected for several sites, their quality varied significantly—some datasets contained errors, gaps, or inconsistent periods that compromised their reliability. Moreover, the underlying input data used to set up the SWAT+ model were primarily EU-wide datasets, which often lacked the spatial resolution necessary to match local hydrological conditions. This mismatch meant that, in many cases, the model could not be satisfactorily calibrated using streamflow observations alone, regardless of how parameters were adjusted. Another challenge encountered during the development of the MERLIN modelling workflow was the attempted integration of water quality modelling, specifically the simulation of nitrogen and phosphorus dynamics. While initially part of the workflow design, this component had to be removed in most case studies due to a lack of reliable data on key nutrient sources, including both point and diffuse inputs. Except for atmospheric nitrogen deposition—available from EU datasets—critical input data were either missing or too inconsistent to support robust simulations. Including this component would have introduced considerable uncertainty without adding dependable results. Despite these limitations, we consider that the MERLIN modelling workflow is a robust and valuable tool. It provides structured, quantitative insights into hydrological processes and supports the design and evaluation of restoration actions. While in some contexts it may be tempting to proceed without modelling, doing so risks overlooking important system dynamics. The adapted calibration approach using GLEAM ensures that the modelling can still produce credible outputs, making it a worthwhile component of project planning and assessment. 5 Conclusions The MERLIN modelling workflow was developed to provide a structured, scalable approach for assessing the bio-physical and economic opportunities of freshwater ecosystem restoration that can be used across Europe to inform the prioritization and planning of restoration projects. By integrating hydrological modelling (SWAT+), ecosystem service analysis, and socio-economic valuation, the workflow supports evidence-based planning and decision-making aligned with the goals of the European Green Deal. It offers a practical, step-by-step guide— from data preparation and scenario simulation to valuation of ecosystem services—adaptable to diverse catchment contexts and user expertise levels. To demonstrate broad applicability, the workflow was implemented using EU-wide datasets, showing how restoration planning can be supported even in data-scarce regions. Where more detailed, site-specific data are available, they can and should be integrated to improve the accuracy and local relevance of the modelling outputs. While the current version of the MERLIN modelling workflow represents a significant achievement, it is also clear that without ongoing support and development, its utility will quickly diminish. The modelling tools, datasets, and policy landscapes it relies on are evolving. New versions of the SWAT+ model are expected, offering improved features and compatibility. Additionally, the availability of high-resolution EU-wide datasets for both biophysical and socio-economic parameters is rapidly increasing, promising to enhance model accuracy and relevance. Emerging socio-economic models will further strengthen the valuation of restoration benefits, enabling more nuanced and robust cost-benefit analyses. To ensure the long-term value and usability of the MERLIN modelling workflow, it is essential that efforts are made to maintain, update, and expand it—both technically and conceptually. This includes integrating future model versions, updating documentation and training materials, and ensuring that the workflow remains compatible with the latest data and policy priorities. With continued investment and adaptation, the MERLIN modelling workflow can serve as a cornerstone for advancing large-scale, evidence-based freshwater restoration in Europe and beyond. MERLIN Deliverable D3.3: The MERLIN modelling workflow | Page 50 6 References Creed, I. F., Badiou, P., Enanga, E., Lobb, D. A., Pattison-Williams, J. K., Lloyd-Smith, P., & Gloutney, M. (2022). Can restoration of freshwater mineral soil wetlands deliver nature-based climate solutions to agricultural landscapes?. Frontiers in Ecology and Evolution, 10, 932415. Dierauer, J., Pinter, N., & Remo, J. W. (2012). Evaluation of levee setbacks for flood-loss reduction, Middle Mississippi River, USA. Journal of Hydrology, 450, 1-8. Francesconi, W., Srinivasan, R., Pérez-Miñana, E., Willcock, S. P., & Quintero, M. (2016). Using the Soil and Water Assessment Tool (SWAT) to model ecosystem services: A systematic review. Journal of Hydrology, 535, 625636. Garcia, X. (2023). Using the Soil and Water Assessment Tool (SWAT) to quantify the economic value of ecosystem services. River, 2(2), 173-185. Gatis, N., Benaud, P., Anderson, K., Ashe, J., Grand-Clement, E., Luscombe, D. J., ... & Brazier, R. E. (2023). Peatland restoration increases water storage and attenuates downstream stormflow but does not guarantee an immediate reversal of long-term ecohydrological degradation. Scientific Reports, 13(1), 15865. Günther, A., Barthelmes, A., Huth, V., Joosten, H., Jurasinski, G., Koebsch, F., & Couwenberg, J. (2020). Prompt rewetting of drained peatlands reduces climate warming despite methane emissions. Nature Communications, 11, Article 1644. Haines-Young, R., & Potschin, M. (2010). The links between biodiversity, ecosystem services and human wellbeing. In C. L. J. Frid & D. G. Raffaelli (Eds.), Ecosystem Ecology: A New Synthesis (pp. 110–139). Cambridge University Press. La Notte, A., Maes, J., Dalmazzone, S., Crossman, N. D., Grizzetti, B., & Bidoglio, G. (2017). Physical and monetary ecosystem service accounts for Europe: A case study for in-stream nitrogen retention. Ecosystem Services, 23, 18–29. Land, M., Granéli, W., Grimvall, A., Hoffmann, C. C., Mitsch, W. J., Tonderski, K. S., & Verhoeven, J. T. (2016). How effective are created or restored freshwater wetlands for nitrogen and phosphorus removal? A systematic review. Environmental Evidence, 5, 1-26. Serra-Llobet, A., Jähnig, S. C., Geist, J., Kondolf, G. M., Damm, C., Scholz, M., ... & Schmitt, R. (2022). Restoring rivers and floodplains for habitat and flood risk reduction: experiences in multi-benefit floodplain management from California and Germany. Frontiers in Environmental Science, 9, 778568. Tsai, Y., Zabronsky, H. M., Zia, A., & Beckage, B. (2022). Efficacy of riparian buffers in phosphorus removal: a meta-analysis. Frontiers in Water, 4, 882560. Verdonschot, P. F. M., & Verdonschot, R. C. M. (2023). The role of stream restoration in enhancing ecosystem services. Hydrobiologia, 850(12), 2537-2562.