the Creative Commons Attribution 4.0 License.
the Creative Commons Attribution 4.0 License.
OpenWQ v.1: A multi-chemistry modelling framework to enable flexible, transparent, interoperable, and reproducible water quality simulations in existing hydro-models
Abstract. This work advances the cross-model deployment of ecological and biogeochemical simulation capabilities in existing process-based hydro-modeling tools, which we term "Open Water Quality" (OpenWQ). We detail aspects of OpenWQ's architecture that enable its plug-in type incorporation into existing models, along with its innovative aspects that enable biogeochemistry lab-like capabilities. OpenWQ's innovative aspects allow modelers to define the pollution problem(s) of interest, the appropriate complexity of the biogeochemistry routines, test different modeling hypotheses, and deploy them across different hydro-models. A coupling recipe for linking OpenWQ to existing hydro-models is described and demonstrated on two models with different model structures, SUMMA and CRHM. Such model integration helps establish a more formal (and direct) exchange of innovation between hydrological and biogeochemical-water quality modeling communities. Example applications of different pollution studies enabled by OpenWQ are provided with robust numerical verification.
- Preprint
(5746 KB) - Metadata XML
- BibTeX
- EndNote
Status: closed
-
RC1: 'Comment on egusphere-2023-2787', Anonymous Referee #1, 10 Jan 2024
This manuscript describes a model framework, denoted “Open Water Quality" (OpenWQ), to couple reactive transport to existing hydrological models. The authors promise flexibility, transparency, interoperability, and reproducibility. I had some difficulties to understand what OpenWQ really is. It seems to be a coupler between hydrological models, mainly providing water-storage changes and fluxes, and reactive transport or reaction modeling alone within OpenWQ, in which the demonstrated capabilities of simulating reactive systems are fairly limited. OpenWQ is written in C++ and requires access to the hydrological models on a source-code level. At least this is what I understood.
I have to admit that my background is subsurface-flow and (bio)reactive-transport modeling as well as some river-water quality modeling, working predominantly with hydromechanics-based models solving the Richards equation for subsurface flow, the shallow-water equations for overland flow, and the St.-Venant equations for river flow. Practically all codes that I have worked with have transport-simulation capabilities so that I don’t see any reason to have yet another transport module coupled to the flow models. In essence, pde-based transport models require a spatially explicit representation of velocity fields, which are naturally provided by pde-based flow models. In most cases, this is a one-way coupling (unless dealing with transport that changes properties of the fluid or the matrix/bathymetry) so that the obvious extension of the flow models to include transport already exists. Hence, I don’t see the value of providing a generic transport model that requires specific coupling to the flow models if tailored transport models already exist. This might be different if the flow model is a conceptual bucket-type hydrological model, but the lacking spatial explicitness of such a model causes serious problems in representing interesting reactions (involving nonlinear interactions with immobile components) in any case.
The coupling of physical transport to reaction models is somewhat less common, at least beyond simple first-order decay. However, the authors don’t seem to be aware of existing stand-alone reaction models (of much higher complexity than any of the examples provided by the authors) with generic interfaces. The most prominent example is IPhreeqC (Charlton and Parkhurst, Computers & Geosciences, 2011, 37(10): 1653-1663, doi: 10.1016/j.cageo.2011.02.005), which provides the full capabilities of the USGS geochemistry model PHREEQC as callable functions (see also the PhreeqcRM Reaction Module for transport models). Hence, if I want to extend my favorite flow-and-transport code to include speciation, mineral precipitation, surface complexation etc., I can go for IPhreeqC, and if I want to include reaction-rate expressions to get the kinetics right, there is an interface for that, too. Not very surprisingly, the coupling between PHREEQC, MT3DMS and MODFLOW already exist (PHT3D, http://www.pht3d.org), likewise the coupling between FEFLOW and PHREEQC. Of course, if I stick to subsurface systems, a variety of excellent reactive-transport codes exist (see a somewhat outdated overview of Steefel et al., Computational Geoscience, 2015, 19:445–478, doi: 10.1007/s10596-014-9443-x) that hardly leave any wish open when it comes to the inclusion of possible reactions.
I somewhat disagree with the premise of the authors that the bottleneck of modeling biogeochemistry coupled to hydrology lies in the variety of codes. There have been several review and opinion papers on the issue of large-scale reactive transport modeling (e.g., Li et al., WIREs Water, 2021, 8:e1495, doi: 10.1002/wat2.1495). Honestly, I don’t think that the major problem lies in the codes. Notwithstanding that most distinct biogeochemists don’t express their ideas in mathematical terms (e.g., Siade et al., Environ. Sci. Proc. Imp., 2021 23(12): 1825-1833, 2021, doi: 10.1039/D1EM00303H), the key problem in large-scale biogeochemical transport is that the reactions are inherently local and nonlinear, whereas most observations are integral in nature. That is, a description of the reactions that is sound from a chemical and microbiological standpoint of view, like used in the state-of-the-art pde-based hydrobiogeochemical reactive-transport codes mentioned above and also in state-of-the-art river-water-quality code, are typically overparameterized. They (correctly) assume spatially distributed hydraulic AND reactive properties, which are hardly known in the field, so that unique calibration of these models is not possible with the typical data available. Conversely, most catchment-scale water-quality model lack the rigor in the description of reactive systems. As a simple example, from a biogeochemical standpoint of view it is obvious that denitrification is inhibited by dissolved oxygen so that a minimal description of the reactive system involves the electron-donor release from the matrix, the competing aerobic degradation, and the reaction of the electron donors with nitrate. Likewise, a phosphorus model requires the interaction with iron (hydroxy)oxides, which may be affected by reductive dissolution. Integrating the local biogeochemical turnover over a variety of flowpaths with different lengths, flow velocities, and electron-donating/-accepting capacities may or may not result in apparent first-order decay coefficients that can be used in catchment-scale models. But rigorous upscaling from complex, process-capturing, small-scale descriptions of reactive transport to effective behavior on the catchment scale is anything but trivial. That is, I don’t see the bottleneck in the availability of numerical water-quality models, or that they differ. The problem lies in the upscaling of mechanistic process descriptions of reactions on small scales to effective models on large scales. I honestly don’t see that OpenWQ really helps in this regard. For that, the focus of the paper (and most likely of the entire underlying work) is too much on software engineering rather than biogeochemical system understanding.
The examples of reactions considered in the manuscript are not impressive at all and hardly describe real biogeochemistry. The authors include reaction rates that are independent on the concentration, scale with a singe concentration, the concentration squared, or with the product of two concentrations. In the appendix, they present analytical expressions for simple reaction networks (e.g., first-order networks) that are all known. The only interesting base reaction is the bimolecular one, for which no analytical expressions exist. I completely miss Michaelis-Menten/Monod kinetics needed for enzyme-catalyzed reactions, as well as competitive and non-competitive inhibition terms. There is also a lack of including algebraic expressions for local equilibria (needed for speciation calculations) and the inclusion of immobile components. Any state-of-the-art reactive-transport model has these building blocks. With that you could analyze examples like oxygen-inhibited denitrification and phosphorous cycling. Without you simply fit some effective law to data without biogeochemical process understanding.
The test cases include a series of super-simple mixed-reactor systems (Tests 1-6), which can be simulated with any decent ODE solver. The 1-D reactive-transport applications (a Streeter-Phelps-type of model for oxygen and biological-oxygen demand, and some benchmark-tests for continuous and point-like injection) don’t give any particularly new insight into process behavior either. Coding such examples might be a good exercise in an introductory reactive-transport course, but it does not belong into a scientific article.
Finally, the numerics involved are pretty unclear. The coupling between physical transport and reactions can be done by non-iterative or iterative operator-splitting methods (which are most likely used, but the authors don’t make any statements on that), or one follows a fully implicit approach, in which reaction and transport terms and solved as coupled system using special semidiscretization for transport and an implicit integration scheme. While the fully implicit approach appears at first computationally more demanding, it has the advantage that coupling errors introduced by operator splitting don’t occur, and time stepping can be adapted to the behavior of the coupled system rather than of the reactive or transport-related subsystem. The latter is very important if you couple physical transport to mineral-dissolution reactions, in which propagation of reaction fronts are strongly retarded in comparison to concentrations fronts of ideal tracers. Quite obvious, the fully implicit approach does not go hand in hand with a generic coupler, as the linearization of the big coupled nonlinear reactive-transport system interferes with both the transport and reaction parts of the code.
In summary, from the perspective of biogeochemical reactive transport, I don’t see the benefit of OpenWQ over existing, more advanced, customized reactive-transport codes; and the reactive examples are by far too simplistic for mechanistic biogeochemical reactive-transport applications.
Citation: https://doi.org/10.5194/egusphere-2023-2787-RC1 -
AC1: 'Reply on RC1', Diogo Costa, 30 Jan 2024
Conceptual biogeochemical modelling is the standard approach to simulate water quality at the catchment scale. Popular models include SWAT, HYPE, INCA, HSPF, and AnnAGNPS, and they have been successfully applied to small and large basins around the world for both research and (operational) management. These models use reaction networks based on series of simple first-order or second-order kinetics designed to simulate biogeochemical cycles of environmental importance, such as those addressed with OpenWQ in this paper (e.g., nitrogen cycle, oxygen, phosphorous, carbon). The experimental tests performed with OpenWQ were based on these specific environmental problems and used similar conceptual biogeochemical-cycling frameworks used in the popular catchment models listed above.
OpenWQ aims to specifically contribute to advancing basin-scale conceptual biogeochemical modelling approaches in line with e.g. SWAT and HYPE, which differ greatly from the sub-surface modelling approaches mentioned by the reviewer. Models like IPhreeqC, MT3D, PhreeqcRM, and PHT3D are reactive or reactive-transport models applied mainly for sub-surface systems, and for that reason, they have been coupled to prominent groundwater models such as MODFLOW and FEFLOW but not to catchment flow models like those we mention above. There are other geochemical models worth mentioning, such as MINEQL+, MINTEQA2, EQ3/6 and WHAM, but they too have been mainly applied to sub-surface systems.
Although integrating models like IPhreeqC within OpenWQ’s framework is potentially interesting for application at the catchment scale, this would depart greatly from the current practice, and we should highlight that groundwater and sub-surface models are very different in nature to hydrological models, and we have never seen a hydrological model coupled with, e.g., IPhreeqC.
We want to emphasise that there is a critical difference between hydrological models and sub-surface models with a direct impact on the integration of water quality modelling capabilities, which in part motivated the development of OpenWQ. That is the need to simulate a variety of interconnected hydrological “compartments/domains” instead of “only” one porous-media domain. The different domains of hydrological models include e.g. trees/canopy, rivers, lakes, snow, unsaturated soil matrix, and saturated soil matrix.
Flow and transport within each of these hydrological compartments/domains are governed by different “physics” and hence governing PDEs. For example, (1) rivers and lakes are governed by hydrodynamic PDEs (e.g., simplifications of the Navier-Stokes), (2) evaporation, snow, and snowmelt are governed by energy balance and thermodynamic PDEs, (3) sub-surface flow is governed by saturated and unsaturated flow PDEs, (4) as well as other region-specific process PDEs (e.g., blowing snow, variable contributing areas).
On top of that, driven by different regional contexts where the dominant hydrological processes may differ, each hydrological model uses different methods of varying degrees of complexity for computing each of the water fluxes (e.g., kinematic wave or dynamic water for open channel flow, or several methods for calculating evaporation), and the fluxes between the different compartments/domains also need to be calculated (e.g., infiltration as the exchange of water between surface and sub-surface hydrological compartments/domains). Finally, hydrological models vary greatly in the way spatial discretization is carried out for the different hydrological compartments/domains, e.g., HRU, semi-distributed, or fully distributed.
The particular characteristics of “process-based” hydrological models mentioned above make the integration of reactive-transport routines in hydrological models extremely challenging. Unlike groundwater and surface hydrodynamic models, the integration of such water quality simulation capacities needs to be carried through “internal” coupling and has to make sure that all water fluxes within and between compartments/domains are properly mapped for reactive-transport simulations, unlike e.g. MT3D, which is a standalone model that reads outputs from MODFLOW and focuses on a continuous porous medium.
In this context, the OpenWQ development envisions contributing to four key pragmatic challenges in “process-based” (multi-compartment/domain) hydrological-water quality modelling:
- Extension of hydrological models to water quality is challenging because it requires mapping the different hydrological compartments/domains (and their sub-discretization) and fluxes governed by a variety of PDEs, which differ greatly between model codes – OpenWQ aims to streamline that integration.
- Progress carried out by the hydrological modelling community is not easily assimilated by the hydrological-water quality modelling community – OpenWQ aims to help establish that link.
- Testing of alternative conceptualizations of watershed processes and the implications for both flow and transport is critical to quantify structural uncertainty - OpenWQ linked to SUMMA allows addressing this issue including hydrological and water quality perspectives.
- Prominent catchment water quality models (e.g., SWAT, HYPE) provide little flexibility to test different modelling philosophies within the same model structure, which makes it virtually impossible to quantify structural uncertainty in a controlled manner – OpenWQ aims to provide a more flexible approach to reaction-network simulations (and including IPhreeqC could potentially be another modelling option to integrate in the future.
We don’t think that OpenWQ completely solves all these hefty challenges, but it provides concrete directions for innovation in the context of frameworks to integrated hydrological-water quality modelling and in helping to increase cooperation between the catchment hydrological and water quality modelling communities.
We acknowledge that OpenWQ’s biogeochemical simulation approach is based on simple reaction-network formulations. Although the biogeochemical engine enables much more complex frameworks, the tests performed were designed based on the standard practice in the field that directly builds from ongoing efforts by the hydrological-water quality community.
We would like to highlight also OpenwWQ's underlying structure, which has been designed for multi-modelling hypothesis testing, allows, for instance, the coupling of other biogeochemical modelling modules as modelling options (e.g., based on IPhreeqC if that turns out to be a viable option) without compromising existing couplings to existing hydrological models, thus enabling closer collaboration between hydrologists, biogeochemists, and soil scientists (with mutual benefit) in the testing of integrated reactive-transport modelling approaches (reactive: biogeochemists and soils scientists; transport: hydrologists):
We strongly believe that this is a noteworthy achievement for the field of hydrology (and computational hydrology).
It is an approach that has gained traction in the hydrological communities over the last decade to allow quantifying structural uncertainty, and its potentially transformative benefits to water quality have not been explored.
The synthetic tests provided in the paper are only for demonstration purposes, showing the feasibility of developing a flexible approach that enables testing different biogeochemical modelling philosophies, which is something that has not been attempted in the context of water quality in hydrological models. The synthetic tests selected were formulated based on two criteria: (1) typical water quality problems and approaches simulated in catchment water quality models and (2) feasibility to derive analytical solutions.
They were also designed to test the model through controlled complexity increments, from simple 1 simple reaction-decay to full implementation of the nitrogen cycle (with the same level of complexity deployed in state-of-the-art models like SWAT and HYPE)
Answering to some specific concerns of the reviewer:
Reviewer comment 1: “I somewhat disagree with the premise of the authors that the bottleneck of modelling biogeochemistry coupled to hydrology lies in the variety of codes.”
Our response: We agree and that’s not what we intended to claim. What we strongly believe in is that an important bottleneck is in the fact that the hydrological and water quality modelling communities generally work in isolation (we are not referring to hydrogeology communities) and that a better integration of the efforts at the code level could bring tremendous benefits to both communities:
- Benefits to the water quality modelling community: state-of-the hydrological background calculations
- Benefits to the hydrological community: ability to extend studies to water quality
Reviewer comment 2: “The numerics involved are pretty unclear”
Our response: We will provide more detail in a revised version. We agree that fully implicit solutions are more robust numerically, but since there are robust ways to control numerical issues in explicit solutions, we believe that the flexibility that an explicit approach gives to OpenWQ in allowing for a “more or less” straightforward coupling process to existing hydrological models, outweighs to disadvantages.
Citation: https://doi.org/10.5194/egusphere-2023-2787-AC1
-
AC1: 'Reply on RC1', Diogo Costa, 30 Jan 2024
-
RC2: 'Comment on egusphere-2023-2787', Anonymous Referee #2, 16 Jan 2024
The authors attempted to present a new approach to represent water-driven biogeochemistry. They selected two hydrological models, SUMMA and CRHM, and used the models’ outputs (e.g., mass change) to estimate biogeochemical fluxes. The authors concluded that their tool, OpenWQ, enables the cross-model deployment of flexible multi-biogeochemistry simulations in existing process-based hydro-modeling tools. While the study showed the model’s capabilities for biogeochemical modeling based on some promising compatibility with current hydrologic models, I had major comments and questions that must be resolved before considering publication.
- Major comments/questions:
Demonstration of the OpenWQ:
I understood that a series of comparisons between analytical solutions and numerical solutions for the demonstration of the model. However, it is notable that all the experiments are point-scale (i.e., column study), and the assumptions used in each analytical model are not clear. Therefore, how the consistency of assumptions (e.g., boundary conditions) was achieved between the analytical and numerical models is unclear.
Also, even if the assumptions in the select analytical models were well aligned with the modeling environment/configuration of the select numerical models, I am doubtful if the comparison which was only done for point-scale column study could be sufficient to argue that the OpenWQ fills the gap between scales, as argued from sub-catchment to catchment. I think, in order to address a multi-scale flux calculation, the lateral transport of water/heat has to exist in the model and the biogeochemical fluxes transport “due to the lateral process” also needs to be there. What is the evidence the OpenWQ perform lateral representation?
Moreover, I found that the hydrologic output variables from SUMMA and CRHM were not addressed in the paper. For example, what specific hydrologic variables (e.g., soil moisture, temperature, or baseflow) were used in the experiments? Were they incorporated in biogeochemistry explicitly? This information is required.
Lastly, I found that observational data were completely missing throughout the paper. As the paper said, the OpenWQ is adaptive and can deal with different scales, such as catchment. I wonder why the author did not try to use observations to verify their approach. Their new hydrology-biogeochemistry model seems to need a more comprehensive application of observational data (i.e., hydrologic and/or biogeochemical) to properly show the OpenWQ’s performance.
Innovation:
If I understood correctly the innovation, the authors argued, was meant to say that the OpenWQ is cross-platform/scale due to its features. I understand the OpenWQ’s adaptability was achieved by the fact the OpenWQ only uses mass changes derived from a used hydrologic model. To my best knowledge, most biogeochemistry models, when they incorporate hydrologic components in their biogeochemistry modeling, the hydrologic states and fluxes are always used. As the mass changes are the results of fluxes (influx - outflux), I wonder why the authors think biogeochemistry relies on water mass change in the OpenWQ as an innovation.
- Specific comments:
line 39: Can you provide more detail information about the process how the OpenWQ could be plugged in existing other hydrologic model? For example, if one wants to plug in the OpenWQ to Parflow (hydrology) or Noah-MP (land surface), what would be the steps?
line 88: Scalability is a very important topic. Do you simply mean that the OpenWQ can run for HRUs as well as grids? If so, how do you define the catchment-scale output flux? How the communication between HRUs or grids could be done?
line 96: It is unclear what you meant by fundamental separation. Do you mean explicit treatment of water flux variables?
line 100: Please use the fraction form throughout the paper.
line 110-112: The sentence does not make any sense. It needs to be rephrased and simplified.
line 115-120: I do not think this is true. Most hydrologic models and their output variables are normally estimated explicitly, so they are easily disentangled and exportable. You also need to clearly indicate why re-mapping the output hydrologic variables is extremely difficult. This does not make sense and the argument, as in its current form, seems clueless.
line 120: I think you use too many adjectives for each term. For example, the word ‘flexible’ itself can refer to various features, having a number of images. So, when you use ‘flexible full coupling’ it ends up being ambiguous and unclear, which is not preferable in a scientific report. Also, you said the solvers are separated from flux calculation process, how did you achieve a full-coupling?
Chapter 4.2: The two hydrologic models SUMMA and CRHM were not compared with each other in terms of model structure, equations, and parameterization. I think this is vital since the different hydrologic outputs from the two models can result in different biogeochemical cycles. At least, this paper needs the comparative time series of hydrologic variables (derived from SUMMA and CRHM) that were used to simulate biogeochemical fluxes in the presented experiments.
line 239: Too many decimals are listed. I think 3-4 decimal places should be enough.
Chapter 5: Again, all these experiments are point-scale. Would the listed experiments suffice the need for a proper demonstration of the OpenWQ, especially given that the authors argue the scalability of the OpenWQ? Also, are there any meaningful differences between CHRM-OpenWQ and SUMMA-OpenWQ? If not, why are the results so identical?
Chapter 5: Please improve the readability of the table and figures.
Chapter 6.1: Do you argue the ‘reproducibility’ based on the identicality between SUMMA-OpenWQ and CRHM-OpenWQ?
Line 346: It is not properly addressed that the catchment models only require vertical boundary conditions. Depending on configuration, the catchment-scale models also require and rely on lateral boundary conditions (e.g., groundwater divide, and river stage).
Line 355-356: There is no evidence that the OpenWQ can properly represent catchment-scale biogeochemical processes.
Line 407-408: This sentence does not make sense. Can you rephrase it?
Citation: https://doi.org/10.5194/egusphere-2023-2787-RC2 -
AC2: 'Reply on RC2', Diogo Costa, 30 Jan 2024
We thank the reviewer for the constructive feedback.
Regarding the synthetic experiments, it is true that they are all column studies. We will make sure to provide more details about the assumptions and model configuration to show how we ensured consistency of assumptions between analytical solutions and numerical experiments.
The reason why we only performed column experiments is because SUMMA uses another stand-alone runoff routing tool, mizuRoute, to compute lateral flow. MizuRoute was developed to post-process runoff outputs from any distributed hydrologic model or land surface model to produce spatially distributed streamflow at various spatial scales from headwater basins to continental-wide river systems.
We have coupled OpenWQ to mizuRoute as well and performed the synthetic-test experiments, so we will make sure to include those in the revised version of the manuscript and, in this way, have more comprehensive testing of the broader application of the new tool for both vertical and lateral flow.
We did not include hydrological output variables from SUMMA because the experiments were based on the test problem proposed by Celia et al. (1990), which was performed with SUMMA (Clark et al., 2021) (we used the same configuration files)
Celia, M., E. Bouloutas, and R. Zabra, 1990: A general mass-conservative numerical-solution for the unsaturated flow equation. Water Resour. Res., 26, 1483–1496, https://doi.org/10.1029/WR026i007p01483.
Clark, M. P., and Coauthors, 2021: The Numerical Implementation of Land Models: Problem Formulation and Laugh Tests. J. Hydrometeor., 22, 1627–1648, https://doi.org/10.1175/JHM-D-20-0175.1.
Responding specifically to the comment “I wonder why the authors think biogeochemistry relies on water mass change in the OpenWQ as an innovation.”, like all catchment water quality models, OpenWQ moves chemical mass through two main processes: (1) mechanical transport (advection and diffusion) and (2) biogeochemical transformations. We believe that OpenWQ is innovative at both levels:
- Mechanical transport: Because OpenWQ links to existing hydrological models, it can benefit from advances and accuracy improvements in the calculation of hydrological water fluxes from the hydrological community
- Biogeochemical transformations: Because OpenWQ enables flexible adaptation of biogeochemical transformation processes, it enables stronger collaborations with the biogeochemical and soil science communities in the testing of modeling hypotheses
We acknowledge that observational data have not been included in the testing of OpenWQ in this paper. That was a deliberate decision following recent community recommendations encouraging performing precise well-known numerical tests through analytical solutions that avoid the masking of model behaviour through model parameter overfitting and compensation of over- and under-estimation of individual processes, e.g. “Laugh tests” by Clark et al. (2021) and others.
Clark, M. P., and Coauthors, 2021: The Numerical Implementation of Land Models: Problem Formulation and Laugh Tests. J. Hydrometeor., 22, 1627–1648, https://doi.org/10.1175/JHM-D-20-0175.1.
We will also address the specific comments in the revised version of the paper.
Citation: https://doi.org/10.5194/egusphere-2023-2787-AC2
-
AC2: 'Reply on RC2', Diogo Costa, 30 Jan 2024
Status: closed
-
RC1: 'Comment on egusphere-2023-2787', Anonymous Referee #1, 10 Jan 2024
This manuscript describes a model framework, denoted “Open Water Quality" (OpenWQ), to couple reactive transport to existing hydrological models. The authors promise flexibility, transparency, interoperability, and reproducibility. I had some difficulties to understand what OpenWQ really is. It seems to be a coupler between hydrological models, mainly providing water-storage changes and fluxes, and reactive transport or reaction modeling alone within OpenWQ, in which the demonstrated capabilities of simulating reactive systems are fairly limited. OpenWQ is written in C++ and requires access to the hydrological models on a source-code level. At least this is what I understood.
I have to admit that my background is subsurface-flow and (bio)reactive-transport modeling as well as some river-water quality modeling, working predominantly with hydromechanics-based models solving the Richards equation for subsurface flow, the shallow-water equations for overland flow, and the St.-Venant equations for river flow. Practically all codes that I have worked with have transport-simulation capabilities so that I don’t see any reason to have yet another transport module coupled to the flow models. In essence, pde-based transport models require a spatially explicit representation of velocity fields, which are naturally provided by pde-based flow models. In most cases, this is a one-way coupling (unless dealing with transport that changes properties of the fluid or the matrix/bathymetry) so that the obvious extension of the flow models to include transport already exists. Hence, I don’t see the value of providing a generic transport model that requires specific coupling to the flow models if tailored transport models already exist. This might be different if the flow model is a conceptual bucket-type hydrological model, but the lacking spatial explicitness of such a model causes serious problems in representing interesting reactions (involving nonlinear interactions with immobile components) in any case.
The coupling of physical transport to reaction models is somewhat less common, at least beyond simple first-order decay. However, the authors don’t seem to be aware of existing stand-alone reaction models (of much higher complexity than any of the examples provided by the authors) with generic interfaces. The most prominent example is IPhreeqC (Charlton and Parkhurst, Computers & Geosciences, 2011, 37(10): 1653-1663, doi: 10.1016/j.cageo.2011.02.005), which provides the full capabilities of the USGS geochemistry model PHREEQC as callable functions (see also the PhreeqcRM Reaction Module for transport models). Hence, if I want to extend my favorite flow-and-transport code to include speciation, mineral precipitation, surface complexation etc., I can go for IPhreeqC, and if I want to include reaction-rate expressions to get the kinetics right, there is an interface for that, too. Not very surprisingly, the coupling between PHREEQC, MT3DMS and MODFLOW already exist (PHT3D, http://www.pht3d.org), likewise the coupling between FEFLOW and PHREEQC. Of course, if I stick to subsurface systems, a variety of excellent reactive-transport codes exist (see a somewhat outdated overview of Steefel et al., Computational Geoscience, 2015, 19:445–478, doi: 10.1007/s10596-014-9443-x) that hardly leave any wish open when it comes to the inclusion of possible reactions.
I somewhat disagree with the premise of the authors that the bottleneck of modeling biogeochemistry coupled to hydrology lies in the variety of codes. There have been several review and opinion papers on the issue of large-scale reactive transport modeling (e.g., Li et al., WIREs Water, 2021, 8:e1495, doi: 10.1002/wat2.1495). Honestly, I don’t think that the major problem lies in the codes. Notwithstanding that most distinct biogeochemists don’t express their ideas in mathematical terms (e.g., Siade et al., Environ. Sci. Proc. Imp., 2021 23(12): 1825-1833, 2021, doi: 10.1039/D1EM00303H), the key problem in large-scale biogeochemical transport is that the reactions are inherently local and nonlinear, whereas most observations are integral in nature. That is, a description of the reactions that is sound from a chemical and microbiological standpoint of view, like used in the state-of-the-art pde-based hydrobiogeochemical reactive-transport codes mentioned above and also in state-of-the-art river-water-quality code, are typically overparameterized. They (correctly) assume spatially distributed hydraulic AND reactive properties, which are hardly known in the field, so that unique calibration of these models is not possible with the typical data available. Conversely, most catchment-scale water-quality model lack the rigor in the description of reactive systems. As a simple example, from a biogeochemical standpoint of view it is obvious that denitrification is inhibited by dissolved oxygen so that a minimal description of the reactive system involves the electron-donor release from the matrix, the competing aerobic degradation, and the reaction of the electron donors with nitrate. Likewise, a phosphorus model requires the interaction with iron (hydroxy)oxides, which may be affected by reductive dissolution. Integrating the local biogeochemical turnover over a variety of flowpaths with different lengths, flow velocities, and electron-donating/-accepting capacities may or may not result in apparent first-order decay coefficients that can be used in catchment-scale models. But rigorous upscaling from complex, process-capturing, small-scale descriptions of reactive transport to effective behavior on the catchment scale is anything but trivial. That is, I don’t see the bottleneck in the availability of numerical water-quality models, or that they differ. The problem lies in the upscaling of mechanistic process descriptions of reactions on small scales to effective models on large scales. I honestly don’t see that OpenWQ really helps in this regard. For that, the focus of the paper (and most likely of the entire underlying work) is too much on software engineering rather than biogeochemical system understanding.
The examples of reactions considered in the manuscript are not impressive at all and hardly describe real biogeochemistry. The authors include reaction rates that are independent on the concentration, scale with a singe concentration, the concentration squared, or with the product of two concentrations. In the appendix, they present analytical expressions for simple reaction networks (e.g., first-order networks) that are all known. The only interesting base reaction is the bimolecular one, for which no analytical expressions exist. I completely miss Michaelis-Menten/Monod kinetics needed for enzyme-catalyzed reactions, as well as competitive and non-competitive inhibition terms. There is also a lack of including algebraic expressions for local equilibria (needed for speciation calculations) and the inclusion of immobile components. Any state-of-the-art reactive-transport model has these building blocks. With that you could analyze examples like oxygen-inhibited denitrification and phosphorous cycling. Without you simply fit some effective law to data without biogeochemical process understanding.
The test cases include a series of super-simple mixed-reactor systems (Tests 1-6), which can be simulated with any decent ODE solver. The 1-D reactive-transport applications (a Streeter-Phelps-type of model for oxygen and biological-oxygen demand, and some benchmark-tests for continuous and point-like injection) don’t give any particularly new insight into process behavior either. Coding such examples might be a good exercise in an introductory reactive-transport course, but it does not belong into a scientific article.
Finally, the numerics involved are pretty unclear. The coupling between physical transport and reactions can be done by non-iterative or iterative operator-splitting methods (which are most likely used, but the authors don’t make any statements on that), or one follows a fully implicit approach, in which reaction and transport terms and solved as coupled system using special semidiscretization for transport and an implicit integration scheme. While the fully implicit approach appears at first computationally more demanding, it has the advantage that coupling errors introduced by operator splitting don’t occur, and time stepping can be adapted to the behavior of the coupled system rather than of the reactive or transport-related subsystem. The latter is very important if you couple physical transport to mineral-dissolution reactions, in which propagation of reaction fronts are strongly retarded in comparison to concentrations fronts of ideal tracers. Quite obvious, the fully implicit approach does not go hand in hand with a generic coupler, as the linearization of the big coupled nonlinear reactive-transport system interferes with both the transport and reaction parts of the code.
In summary, from the perspective of biogeochemical reactive transport, I don’t see the benefit of OpenWQ over existing, more advanced, customized reactive-transport codes; and the reactive examples are by far too simplistic for mechanistic biogeochemical reactive-transport applications.
Citation: https://doi.org/10.5194/egusphere-2023-2787-RC1 -
AC1: 'Reply on RC1', Diogo Costa, 30 Jan 2024
Conceptual biogeochemical modelling is the standard approach to simulate water quality at the catchment scale. Popular models include SWAT, HYPE, INCA, HSPF, and AnnAGNPS, and they have been successfully applied to small and large basins around the world for both research and (operational) management. These models use reaction networks based on series of simple first-order or second-order kinetics designed to simulate biogeochemical cycles of environmental importance, such as those addressed with OpenWQ in this paper (e.g., nitrogen cycle, oxygen, phosphorous, carbon). The experimental tests performed with OpenWQ were based on these specific environmental problems and used similar conceptual biogeochemical-cycling frameworks used in the popular catchment models listed above.
OpenWQ aims to specifically contribute to advancing basin-scale conceptual biogeochemical modelling approaches in line with e.g. SWAT and HYPE, which differ greatly from the sub-surface modelling approaches mentioned by the reviewer. Models like IPhreeqC, MT3D, PhreeqcRM, and PHT3D are reactive or reactive-transport models applied mainly for sub-surface systems, and for that reason, they have been coupled to prominent groundwater models such as MODFLOW and FEFLOW but not to catchment flow models like those we mention above. There are other geochemical models worth mentioning, such as MINEQL+, MINTEQA2, EQ3/6 and WHAM, but they too have been mainly applied to sub-surface systems.
Although integrating models like IPhreeqC within OpenWQ’s framework is potentially interesting for application at the catchment scale, this would depart greatly from the current practice, and we should highlight that groundwater and sub-surface models are very different in nature to hydrological models, and we have never seen a hydrological model coupled with, e.g., IPhreeqC.
We want to emphasise that there is a critical difference between hydrological models and sub-surface models with a direct impact on the integration of water quality modelling capabilities, which in part motivated the development of OpenWQ. That is the need to simulate a variety of interconnected hydrological “compartments/domains” instead of “only” one porous-media domain. The different domains of hydrological models include e.g. trees/canopy, rivers, lakes, snow, unsaturated soil matrix, and saturated soil matrix.
Flow and transport within each of these hydrological compartments/domains are governed by different “physics” and hence governing PDEs. For example, (1) rivers and lakes are governed by hydrodynamic PDEs (e.g., simplifications of the Navier-Stokes), (2) evaporation, snow, and snowmelt are governed by energy balance and thermodynamic PDEs, (3) sub-surface flow is governed by saturated and unsaturated flow PDEs, (4) as well as other region-specific process PDEs (e.g., blowing snow, variable contributing areas).
On top of that, driven by different regional contexts where the dominant hydrological processes may differ, each hydrological model uses different methods of varying degrees of complexity for computing each of the water fluxes (e.g., kinematic wave or dynamic water for open channel flow, or several methods for calculating evaporation), and the fluxes between the different compartments/domains also need to be calculated (e.g., infiltration as the exchange of water between surface and sub-surface hydrological compartments/domains). Finally, hydrological models vary greatly in the way spatial discretization is carried out for the different hydrological compartments/domains, e.g., HRU, semi-distributed, or fully distributed.
The particular characteristics of “process-based” hydrological models mentioned above make the integration of reactive-transport routines in hydrological models extremely challenging. Unlike groundwater and surface hydrodynamic models, the integration of such water quality simulation capacities needs to be carried through “internal” coupling and has to make sure that all water fluxes within and between compartments/domains are properly mapped for reactive-transport simulations, unlike e.g. MT3D, which is a standalone model that reads outputs from MODFLOW and focuses on a continuous porous medium.
In this context, the OpenWQ development envisions contributing to four key pragmatic challenges in “process-based” (multi-compartment/domain) hydrological-water quality modelling:
- Extension of hydrological models to water quality is challenging because it requires mapping the different hydrological compartments/domains (and their sub-discretization) and fluxes governed by a variety of PDEs, which differ greatly between model codes – OpenWQ aims to streamline that integration.
- Progress carried out by the hydrological modelling community is not easily assimilated by the hydrological-water quality modelling community – OpenWQ aims to help establish that link.
- Testing of alternative conceptualizations of watershed processes and the implications for both flow and transport is critical to quantify structural uncertainty - OpenWQ linked to SUMMA allows addressing this issue including hydrological and water quality perspectives.
- Prominent catchment water quality models (e.g., SWAT, HYPE) provide little flexibility to test different modelling philosophies within the same model structure, which makes it virtually impossible to quantify structural uncertainty in a controlled manner – OpenWQ aims to provide a more flexible approach to reaction-network simulations (and including IPhreeqC could potentially be another modelling option to integrate in the future.
We don’t think that OpenWQ completely solves all these hefty challenges, but it provides concrete directions for innovation in the context of frameworks to integrated hydrological-water quality modelling and in helping to increase cooperation between the catchment hydrological and water quality modelling communities.
We acknowledge that OpenWQ’s biogeochemical simulation approach is based on simple reaction-network formulations. Although the biogeochemical engine enables much more complex frameworks, the tests performed were designed based on the standard practice in the field that directly builds from ongoing efforts by the hydrological-water quality community.
We would like to highlight also OpenwWQ's underlying structure, which has been designed for multi-modelling hypothesis testing, allows, for instance, the coupling of other biogeochemical modelling modules as modelling options (e.g., based on IPhreeqC if that turns out to be a viable option) without compromising existing couplings to existing hydrological models, thus enabling closer collaboration between hydrologists, biogeochemists, and soil scientists (with mutual benefit) in the testing of integrated reactive-transport modelling approaches (reactive: biogeochemists and soils scientists; transport: hydrologists):
We strongly believe that this is a noteworthy achievement for the field of hydrology (and computational hydrology).
It is an approach that has gained traction in the hydrological communities over the last decade to allow quantifying structural uncertainty, and its potentially transformative benefits to water quality have not been explored.
The synthetic tests provided in the paper are only for demonstration purposes, showing the feasibility of developing a flexible approach that enables testing different biogeochemical modelling philosophies, which is something that has not been attempted in the context of water quality in hydrological models. The synthetic tests selected were formulated based on two criteria: (1) typical water quality problems and approaches simulated in catchment water quality models and (2) feasibility to derive analytical solutions.
They were also designed to test the model through controlled complexity increments, from simple 1 simple reaction-decay to full implementation of the nitrogen cycle (with the same level of complexity deployed in state-of-the-art models like SWAT and HYPE)
Answering to some specific concerns of the reviewer:
Reviewer comment 1: “I somewhat disagree with the premise of the authors that the bottleneck of modelling biogeochemistry coupled to hydrology lies in the variety of codes.”
Our response: We agree and that’s not what we intended to claim. What we strongly believe in is that an important bottleneck is in the fact that the hydrological and water quality modelling communities generally work in isolation (we are not referring to hydrogeology communities) and that a better integration of the efforts at the code level could bring tremendous benefits to both communities:
- Benefits to the water quality modelling community: state-of-the hydrological background calculations
- Benefits to the hydrological community: ability to extend studies to water quality
Reviewer comment 2: “The numerics involved are pretty unclear”
Our response: We will provide more detail in a revised version. We agree that fully implicit solutions are more robust numerically, but since there are robust ways to control numerical issues in explicit solutions, we believe that the flexibility that an explicit approach gives to OpenWQ in allowing for a “more or less” straightforward coupling process to existing hydrological models, outweighs to disadvantages.
Citation: https://doi.org/10.5194/egusphere-2023-2787-AC1
-
AC1: 'Reply on RC1', Diogo Costa, 30 Jan 2024
-
RC2: 'Comment on egusphere-2023-2787', Anonymous Referee #2, 16 Jan 2024
The authors attempted to present a new approach to represent water-driven biogeochemistry. They selected two hydrological models, SUMMA and CRHM, and used the models’ outputs (e.g., mass change) to estimate biogeochemical fluxes. The authors concluded that their tool, OpenWQ, enables the cross-model deployment of flexible multi-biogeochemistry simulations in existing process-based hydro-modeling tools. While the study showed the model’s capabilities for biogeochemical modeling based on some promising compatibility with current hydrologic models, I had major comments and questions that must be resolved before considering publication.
- Major comments/questions:
Demonstration of the OpenWQ:
I understood that a series of comparisons between analytical solutions and numerical solutions for the demonstration of the model. However, it is notable that all the experiments are point-scale (i.e., column study), and the assumptions used in each analytical model are not clear. Therefore, how the consistency of assumptions (e.g., boundary conditions) was achieved between the analytical and numerical models is unclear.
Also, even if the assumptions in the select analytical models were well aligned with the modeling environment/configuration of the select numerical models, I am doubtful if the comparison which was only done for point-scale column study could be sufficient to argue that the OpenWQ fills the gap between scales, as argued from sub-catchment to catchment. I think, in order to address a multi-scale flux calculation, the lateral transport of water/heat has to exist in the model and the biogeochemical fluxes transport “due to the lateral process” also needs to be there. What is the evidence the OpenWQ perform lateral representation?
Moreover, I found that the hydrologic output variables from SUMMA and CRHM were not addressed in the paper. For example, what specific hydrologic variables (e.g., soil moisture, temperature, or baseflow) were used in the experiments? Were they incorporated in biogeochemistry explicitly? This information is required.
Lastly, I found that observational data were completely missing throughout the paper. As the paper said, the OpenWQ is adaptive and can deal with different scales, such as catchment. I wonder why the author did not try to use observations to verify their approach. Their new hydrology-biogeochemistry model seems to need a more comprehensive application of observational data (i.e., hydrologic and/or biogeochemical) to properly show the OpenWQ’s performance.
Innovation:
If I understood correctly the innovation, the authors argued, was meant to say that the OpenWQ is cross-platform/scale due to its features. I understand the OpenWQ’s adaptability was achieved by the fact the OpenWQ only uses mass changes derived from a used hydrologic model. To my best knowledge, most biogeochemistry models, when they incorporate hydrologic components in their biogeochemistry modeling, the hydrologic states and fluxes are always used. As the mass changes are the results of fluxes (influx - outflux), I wonder why the authors think biogeochemistry relies on water mass change in the OpenWQ as an innovation.
- Specific comments:
line 39: Can you provide more detail information about the process how the OpenWQ could be plugged in existing other hydrologic model? For example, if one wants to plug in the OpenWQ to Parflow (hydrology) or Noah-MP (land surface), what would be the steps?
line 88: Scalability is a very important topic. Do you simply mean that the OpenWQ can run for HRUs as well as grids? If so, how do you define the catchment-scale output flux? How the communication between HRUs or grids could be done?
line 96: It is unclear what you meant by fundamental separation. Do you mean explicit treatment of water flux variables?
line 100: Please use the fraction form throughout the paper.
line 110-112: The sentence does not make any sense. It needs to be rephrased and simplified.
line 115-120: I do not think this is true. Most hydrologic models and their output variables are normally estimated explicitly, so they are easily disentangled and exportable. You also need to clearly indicate why re-mapping the output hydrologic variables is extremely difficult. This does not make sense and the argument, as in its current form, seems clueless.
line 120: I think you use too many adjectives for each term. For example, the word ‘flexible’ itself can refer to various features, having a number of images. So, when you use ‘flexible full coupling’ it ends up being ambiguous and unclear, which is not preferable in a scientific report. Also, you said the solvers are separated from flux calculation process, how did you achieve a full-coupling?
Chapter 4.2: The two hydrologic models SUMMA and CRHM were not compared with each other in terms of model structure, equations, and parameterization. I think this is vital since the different hydrologic outputs from the two models can result in different biogeochemical cycles. At least, this paper needs the comparative time series of hydrologic variables (derived from SUMMA and CRHM) that were used to simulate biogeochemical fluxes in the presented experiments.
line 239: Too many decimals are listed. I think 3-4 decimal places should be enough.
Chapter 5: Again, all these experiments are point-scale. Would the listed experiments suffice the need for a proper demonstration of the OpenWQ, especially given that the authors argue the scalability of the OpenWQ? Also, are there any meaningful differences between CHRM-OpenWQ and SUMMA-OpenWQ? If not, why are the results so identical?
Chapter 5: Please improve the readability of the table and figures.
Chapter 6.1: Do you argue the ‘reproducibility’ based on the identicality between SUMMA-OpenWQ and CRHM-OpenWQ?
Line 346: It is not properly addressed that the catchment models only require vertical boundary conditions. Depending on configuration, the catchment-scale models also require and rely on lateral boundary conditions (e.g., groundwater divide, and river stage).
Line 355-356: There is no evidence that the OpenWQ can properly represent catchment-scale biogeochemical processes.
Line 407-408: This sentence does not make sense. Can you rephrase it?
Citation: https://doi.org/10.5194/egusphere-2023-2787-RC2 -
AC2: 'Reply on RC2', Diogo Costa, 30 Jan 2024
We thank the reviewer for the constructive feedback.
Regarding the synthetic experiments, it is true that they are all column studies. We will make sure to provide more details about the assumptions and model configuration to show how we ensured consistency of assumptions between analytical solutions and numerical experiments.
The reason why we only performed column experiments is because SUMMA uses another stand-alone runoff routing tool, mizuRoute, to compute lateral flow. MizuRoute was developed to post-process runoff outputs from any distributed hydrologic model or land surface model to produce spatially distributed streamflow at various spatial scales from headwater basins to continental-wide river systems.
We have coupled OpenWQ to mizuRoute as well and performed the synthetic-test experiments, so we will make sure to include those in the revised version of the manuscript and, in this way, have more comprehensive testing of the broader application of the new tool for both vertical and lateral flow.
We did not include hydrological output variables from SUMMA because the experiments were based on the test problem proposed by Celia et al. (1990), which was performed with SUMMA (Clark et al., 2021) (we used the same configuration files)
Celia, M., E. Bouloutas, and R. Zabra, 1990: A general mass-conservative numerical-solution for the unsaturated flow equation. Water Resour. Res., 26, 1483–1496, https://doi.org/10.1029/WR026i007p01483.
Clark, M. P., and Coauthors, 2021: The Numerical Implementation of Land Models: Problem Formulation and Laugh Tests. J. Hydrometeor., 22, 1627–1648, https://doi.org/10.1175/JHM-D-20-0175.1.
Responding specifically to the comment “I wonder why the authors think biogeochemistry relies on water mass change in the OpenWQ as an innovation.”, like all catchment water quality models, OpenWQ moves chemical mass through two main processes: (1) mechanical transport (advection and diffusion) and (2) biogeochemical transformations. We believe that OpenWQ is innovative at both levels:
- Mechanical transport: Because OpenWQ links to existing hydrological models, it can benefit from advances and accuracy improvements in the calculation of hydrological water fluxes from the hydrological community
- Biogeochemical transformations: Because OpenWQ enables flexible adaptation of biogeochemical transformation processes, it enables stronger collaborations with the biogeochemical and soil science communities in the testing of modeling hypotheses
We acknowledge that observational data have not been included in the testing of OpenWQ in this paper. That was a deliberate decision following recent community recommendations encouraging performing precise well-known numerical tests through analytical solutions that avoid the masking of model behaviour through model parameter overfitting and compensation of over- and under-estimation of individual processes, e.g. “Laugh tests” by Clark et al. (2021) and others.
Clark, M. P., and Coauthors, 2021: The Numerical Implementation of Land Models: Problem Formulation and Laugh Tests. J. Hydrometeor., 22, 1627–1648, https://doi.org/10.1175/JHM-D-20-0175.1.
We will also address the specific comments in the revised version of the paper.
Citation: https://doi.org/10.5194/egusphere-2023-2787-AC2
-
AC2: 'Reply on RC2', Diogo Costa, 30 Jan 2024
Data sets
Synthetic tests Diogo Costa https://github.com/DiogoCostaPT/synthetic_tests
Model code and software
OpenWQ GitHub page Diogo Costa https://github.com/DiogoCostaPT/openwq
OpenWQ webpage Diogo Costa https://openwq.readthedocs.io/en/latest/
Viewed
HTML | XML | Total | BibTeX | EndNote | |
---|---|---|---|---|---|
326 | 130 | 40 | 496 | 30 | 31 |
- HTML: 326
- PDF: 130
- XML: 40
- Total: 496
- BibTeX: 30
- EndNote: 31
Viewed (geographical distribution)
Country | # | Views | % |
---|
Total: | 0 |
HTML: | 0 |
PDF: | 0 |
XML: | 0 |
- 1