Introducing QWET – A QGIS-plugin for application, evaluation and experimentation with the WET model Environmental Modelling and Software

We wish to introduce QWET, a new version of the free and open-source QGIS plugin for the aquatic ecosystem model WET. QWET is as a graphical user interface for the application, evaluation and experimentation of WET. Several new features have been incorporated since its predecessor and, here, we demonstrate elements of the new plugin by applying it to Danish Lake Ravn. Among others, we compare model simulations against observations and describe how the scenario platform now supports scheduling of state-variable manipulation, which allows users to explore lake or reservoir restoration interventions such as biomanipulation and oxygenation. With QWET, we seek to aid practitioners who do not possess the sufficient technical expertise to operate a state-of-the art complex model system, such as WET, and thereby hope to facilitate a wider use and adaptation of aquatic ecosystem models.


Introduction
Eutrophication of lakes and reservoirs is a global challenge (Wurtsbaugh et al., 2019) with severe implications for their ecosystem services (Schallenberg et al., 2013).Whether a lake or reservoir provides recreational facilities or acts as a fundamental drinking water resource for local communities, scientists, policy makes, managers and consultants aim to understand the reasons behind or examine ways to restore and improve deteriorated water quality.To support decision making or scientific examination, mathematical models provide a fundamental platform by acting as a virtual laboratory for hypothesis testing or scenario simulation prior to actual implementation of mitigation measures (Hipsey et al., 2015).However, application of mathematical models to lakes and reservoirs requires a substantial level of expertise, which may hamper their broader adaptation and utilization.
To provide users with a standardised and easy-to-use workflow for model application and evaluation of aquatic ecosystems, the Water Ecosystems Tool (WET) was introduced in 2017 as a plugin for QGIS 2. x. (Nielsen et al., 2017).The plugin operated on top of the coupled one-dimensional hydrodynamic-ecosystem model GOTM-FABM-PClake (Bruggeman and Bolding, 2014;Hu et al., 2016;Umlauf et al., 2005).However, recent efforts by Schnedler- Meyer et al. (2020) have made significant advances to the designated aquatic ecosystem model FABM-PClake, producing an update representing a new generation, still FABM-compatible (enabling coupling to multiple physical models), completely modularised aquatic ecosystem model that allows flexibility in terms of food web configuration.Moreover, the model has been upgraded with features from other state-of-the-art models, providing users with options for simulating e.g.nitrogen fixation and utilising concepts of the foraging arena theory to mediate predator-prey interactions.To distinctively embody this new aquatic ecosystem model with its capability, the developers of the model core and the supporting QGIS plugin decided to change the name of the model interface to the QGIS Water Ecosystems Tool (QWET).
In this communication, we present QWET, a new version of the former Graphical User Interface (GUI) developed as QGIS plugin by Nielsen et al. (2017).With the release of QWET, the interface has upgraded its compatibility to accommodate the new aquatic ecosystem model WET coupled to the hydrodynamic model GOTM, the General Ocean Turbulence Model (Burchard and Bolding, 2001;Umlauf et al., 2005), i.e. the GOTM-WET model complex.Moreover, several new features have been implemented into the interface, which is now available for QGIS 3. x.Here, we demonstrate the features and capabilities of QWET by applying it to Lake Ravn, a mesotrophic lake situated on the peninsula Jutland in northern Europe (latitude: 56.105, longitude 9.843).The lake has a surface area of 1.8 km 2 , a maximum depth of 33 m, a mean depth of 15 m and a hydraulic retention time of approximately 1.8 years.Its watershed is approximately 57 km 2 , consisting primarily of arable land (70%).The lake stratifies approximately five months each year, causing oxygen depletion in the hypolimnion and consequently phosphate release from the sediment, which stimulates harmful algal blooms in summer (Trolle et al., 2008).
QWET is free and open source and echoes the philosophy of its predecessor: it seeks to empower users who may otherwise lack the sufficient technical expertise to operate a state-of-the art complex model system with a stepwise GUI for configuration, initialisation and model execution.Similar efforts, albeit in other scientific disciplines, have been accomplished for, e.g., the Soil Water Assessment Tool (SWAT) by Dile et al. (2016), the SWAT-MODFLOW coupled model by Park et al. (2019) and the Weather Research and Forecasting model (WRF) by Meyer and Riechert (2019).Modelling experts with solid knowledge of file structures and formatting requirements are capable of operating a model like GOTM-WET outside an interface via script syntaxes to conduct advanced tasks or to achieve a degree of automation and efficiency of their workflows, but an interface reduces the technical skillset requirements for new users and may thus facilitate wider use and adaptation of aquatic ecosystem models.

Overview, dependencies and structure
QWET was developed to accommodate the model complex GOTM-WET, which is a process-based, coupled hydrodynamic-ecosystem model.GOTM facilitates a one-dimensional representation of the physical domain by accounting for hydrodynamic and thermodynamic essentials in the water column related to vertical mixing (Burchard and Bolding, 2001), and WET, via state-of-the-art conceptual representations, mimics the most important biotic and abiotic functions in the aquatic ecosystem.WET is based on the FABM-PCLake model (Hu et al., 2016), which again is a further development of the original PCLake model by Janse and Van Liere (1995).For a detailed description of WET, its legacy, complexity and concept, please see Schnedler- Meyer et al. (2020).The hydrodynamic model and the ecosystem model are coupled with two-way interaction and dependencies via the Framework for Aquatic Biogeochemical Models (FABM, Bruggeman and Bolding, 2014).
Since its predecessor, QWET has been upgraded to Python 3 and is thus available for QGIS 3. x.To install QWET, users must first install the latest stable version of QGIS 3 (https://download.qgis.org)and proceed with the designated QWET plugin installer available at: www.wet.au.dk.The plugin installation is swift, followed by manual one-time activation via the "Manage and Install Plugins" window under the "Plugins" menu in QGIS.QWET may then be launched from its toolbar within QGIS (Fig. 1).
In the first release of the plugin (Nielsen et al., 2017), users had to manually (and through command prompt syntaxes) update the local underlying Python environment with certain third party packages that were not included in QGIS by defaulttedious steps that counteracted our intention of lowering the bar for novice model users.As highlighted by Meyer and Riechert (2019), this required programming skills of users to resolve potential installation problems, not least in Windows due to the demand for administrator privileges for package installation.Now, all dependency packages are directly embedded within QWET, and additional Python system updates or installations via Python's standard package manager pip are not needed.This may have some downsides as described by Meyer and Riechert (2019), but system-wise the tool is independent with its own control of package versioning and, importantly, easy to deploy.In addition to QWET's built-in plotting functions, users may browse model simulations via PyNcView, a cross-platform NetCDF viewer developed by Bolding & Bruggeman (www.bolding-bruggeman.com).PyNcView requires independent installation and is available at pypi.org.
Once installed, the core structure of a QWET project is similar to that Fig. 1.Menus and procedure for one-time activation of the QWET plugin within QGIS.
A. Nielsen et al. of its earlier version and relies on a QGIS (.qgz) project file and a neighbouring project-specific directory where all project inputs and simulation outputs as well as project-specific information are stored in a SQLite database (www.sqlite.org)(see Nielsen et al. (2017) for details).
To anchor explicitly to the model complex GOTM-WET with a now radically changed model core and almost entirely YAML-based configuration files (https://yaml.org/),QWET is not backward compatible.As such, editing and execution of projects created through the previous plugin are not supported and users are, instead, encouraged to set up already existing projects from scratch in QWET.

Required inputs
QWET has inherited prerequisites for inputs and configurations from its predecessor and builds on the principle of enabling users to set up a model for a given lake or reservoir based on only a few key details: surface area (m 2 ), maximum depth (m) and a number of vertical layers, water inflow (m3/s) and associated nutrient concentrations (mg/l), provided as constants, and finally information about the weather, optionally represented by a suite of pre-defined meteorological time series from the European Centre for Medium-Range Weather Forecasts (ECMWF, Dee et al., 2011) available in QWET.From here, users may choose to refine their configuration and setup by providing hypsographs (the relationship between depth (m) and the corresponding horizontal area (m 2 )) to qualify the approximation of the physical domain or time series on inflow and associated nutrients from the watershed in order to better resolve actual transports into the modelled system.Users also

Selecting conceptual model representations of the ecosystem
A new feature that we proudly present is the possibility of utilising parts of the new modular configuration concept characterising the aquatic ecosystem model WET by Schnedler- Meyer et al. (2020), enabling configuration of different model complexities for a given application.When creating a new QWET project, users may now choose between three different templates, i.e. conceptual representations, for the ecosystem (Fig. 2): Template 1, a simple nutrient-phytoplankton-zooplankton-detritus (NPZD) representation; Template 2, a representation equivalent to FABM-PClake (Hu et al., 2016), including nutrients, three phytoplankton groups, zooplankton, zoobenthos, piscivorous, zooplanktivorous and benthivorous fish and macrophytes; and Template 3, an advanced version of Template 2 expanded with an additional zooplankton group.Several other conceptual representations may be of relevance to tailor case-specific needs, and QWET supports inclusion of additional templates upon request.
For our study case, Danish Lake Ravn, we used Template 3. The physical domain was represented by a lake-specific hypsograph, and time series of inflowing water and associated nutrients were obtained from the Danish National Monitoring Program of the Aquatic Environment (NOVANA).Model calibration (from 1996 to 2000 with 6 prior years of warm-up) was conducted outside QWET via ParSAC (see: htt ps://pypi.org/project/parsac/),a calibration tool that utilises a differential evolution algorithm to calibrate model parameters through optimisation against a maximum likelihood function (see Chen et al. (2019), Moras et al. (2019) and Andersen et al. (2020) for other application cases).

Accessing model parameters in GUI popup
To improve the user experience, model parameters and model settings in both the physical and aquatic ecosystem domains are now available in QWET via a tree-structured GUI popup (Fig. 3).Users are assisted by various predesigned categorisations (Fig. 3, a) for quicker browsing and can change parameter values or initial values of state variables via, for instance, calibration schemes.Moreover, where needed, model settings can be customized by changing, e.g., the methods for determining phytoplankton and light inhibition or by activating ice simulation or nitrogen fixation for cyanobacteria.

Comparing model simulations against observations
The obs tab now allows QWET users to compare and evaluate model performance against observations; thus, navigation to an external model directory is possible if, e.g., calibration is conducted via auto-calibration routines outside the plugin.Time series of observation variables should be provided with each variable in its own text file.The format (.obs analogous with that of ParSAC) and tutorial videos of how to import observations into the plugin are provided at: www.wet.au.dk.Fig. 4 exemplifies data on Lake Ravn displaying the modelled and observed water temperature ( o C).Users may switch between the variable displayed, the temporal period to be viewed and the depth-related boundaries to query data for only parts of the water column (e.g. from the surface to 5 m depth) (Fig. 4, a).Moreover, users may select between displaying the data as a combined line and scatterplot (Fig. 4, b), as a line plot (Fig. 4, c) or as profiles (not shown).Conveniently, the data, and thus the plot rendering, may be separated to permit distinction between calibration and validation (Fig. 4, c).Along with plot generation, QWET also produces various statistics (e.g.nash-sutcliffe efficiency, bias, root mean square error and coefficient of determination; not shown here) to assist users in quantifying the model performance.

Introducing manipulations as a scenario feature
In the previous version of the plugin, a scenario platform was implemented by which users were able to conduct and examine the impacts of climate change scenarios by altering the forcing air temperature or changing the nutrient loads to the lake or reservoir.In QWET,   this scenario platform has been expanded with the possibility of designing and applying manipulations to model state variables.With this feature, users can mimic and assess various management actions, such as the consequences of biomanipulation (Jeppesen et al., 2012) or the effects of oxygenation (Liboriussen et al., 2009).Manipulations can now be conducted using either a multiplier that manipulates a state variable during a specific time (e.g.removal of a certain percentage of fish) or a rate of change that either increases or decreases a state variable by a specified rate during a specified time interval.For the latter, a threshold value may also be assigned to control the onset of manipulation, e.g.application of oxygenation only when oxygen levels are below a given threshold.To demonstrate its potential usage, we simulated oxygenation in the hypolimnion of Lake Ravn (Fig. 5) with an activation threshold of 6 mg/l operating from 2002 onwards.In response, the simulated hypolimnetic dissolved oxygen concentration rose (Fig. 5, c) compared with the pre-oxygenation period (Fig. 5, b) As such, QWET functions as a tool aiding in examining and quantifying oxygenation levels to counteract hypolimnetic oxygen depletion during summer in stratified eutrophic lakes prior to actual implementation of restoration interventions.

Conclusions and future work
QWET is a new version of the QGIS plugin that allows users to operate and experiment with the GOTM-FABM-PClake model through a GUI-based workflow.QWET now accommodates WETthe next generation of FABM-PClake, a highly customisable aquatic ecosystem model.QWET has been upgraded with a new model core and several new features that ease its application for beginners in the aquatic ecosystem modelling discipline and, hopefully, it will also facilitate further model application worldwide.Through QWET, users may configure, run, alter and visualise model simulations, compare simulations against observations and conduct experimental scenarios.
In the future development of QWET, we aim to accommodate linkage to the watershed model QSWAT+ and thereby substitute the current support of the ordinary QSWAT model.Another aim is to obtain platform independence to support both Linux and MacOS in addition to its current Windows affiliation.Moreover, we will endeavor to explore and qualify how dependencies to third party packages are handled by the plugin, possibly via a dedicated component that checks for missing packages and prompts installation.Ideally, plugin dependencies should be processed by QGIS itself, possibly through incorporation of a flexible plugin dependency declaration, similar to the way in which ordinary Python package development declares dependencies.Building such A. Nielsen et al. logic into QGIS would greatly advance plugin development and potentially also enhance the possibilities of ordinary GIS processing by avoiding the currently required tedious installation of special Python packages.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
have the option of linking to the watershed model SWAT (Soil & Water Assessment Tool) by Arnold et al. (1998), when needed.Nielsen et al. (2017) provide a detailed description of configuration options, supported by tutorials and test datasets, at: www.wet.au.dk, applicable for QWET.

Fig. 2 .
Fig. 2. Selection of templates rendering the conceptual model representation in the aquatic ecosystem model.

Fig. 3 .
Fig. 3. (a) "Parameters tab" in the main window of QWET.(b) GUI popup for parameter browsing and value modifications.

Fig. 4 .
Fig. 4. (a) The "obs tab" available in the main window of QWEThere users have several options for comparing model simulations against observations.Examples of plotting options are shown for simulated and observed water temperature ( o C) in Lake Ravn for a combined line and scatterplot (b) and a line plot where data are separated into a calibration (blue dots) and a validation (green dots) period (c).(For interpretation of the references to colour in this figure legend, the reader is referred to the Web version of this article.)

Fig. 5 .
Fig. 5. Manipulations are conducted under the QWET "Scenarios tab" (a).The figure illustrates the states before (b) and after (c) oxygenation of the bottom water layers in Lake Ravn.Manipulation is activated from year 2002 and onwards and only when the dissolved oxygen level is below a threshold value of 6.0 mg/L.