AFAR-WQS: A quick and simple toolbox for water quality simulation

Published Article

Global

Publication date: February 26, 2025

File format: URL

View resource

Effective basin‑scale water‑quality management requires tools that balance rigor with speed. AFAR‑WQS delivers this by integrating assimilation factors, graph theory and a DFS algorithm to simulate 13 water‑quality determinants across networks of up to 30,000 segments in just 163 seconds. Its scalable, object‑oriented design supports applications from urban drainage to macro‑basin planning. Case studies show how AFAR‑WQS helps prioritize sanitation investments, evaluate national‑scale water quality and facilitate stakeholder collaboration. By bridging the gap between simplified and complex models, the toolbox enables adaptive management under hydrological uncertainty, regulatory demands and climate pressures, offering a transformative open‑source solution for integrated water‑resource governance.

Subject Tags

  • Conservation Technology
  • Policy

Abstract

Water quality management in large basins demands tools that balance scientific rigor with computational efficiency to avoid paralysis by analysis. While traditional models offer detailed insights, their complexity and resource intensity hinder timely decision-making. To address this gap, we present AFAR-WQS, an open-source MATLAB™ toolbox that introduces a novel integration of assimilation factors with graph theory and a Depth-First Search (DFS) algorithm to rapidly simulate 13 water quality determinants across complex topological networks. AFAR-WQS resolves cumulative processes in networks of up to 30,000 segments in just 163 s on standard hardware, enabling real-time scenario evaluations. Its object-oriented architecture ensures scalability, allowing customization for urban drainage systems or macro-basin studies while maintaining computational efficiency. Case studies demonstrate its utility in prioritizing sanitation investments, assessing water quality at the national scale and fostering stakeholder collaboration through participatory workshops. By bridging the gap between simplified and complex models, AFAR-WQS supports adaptive management in contexts of hydrological uncertainty, regulatory compliance and climate change. The toolbox is freely available at GitHub, offering a transformative approach for integrated water resource management.

Citation

Rogéliz-Prada, C. A., & Nogales, J. (2025). AFAR-WQS: A Quick and Simple Toolbox for Water Quality Simulation. Water, 17(5), 672. https://doi.org/10.3390/w17050672

TNC Authors