+
Skip to content

A python extension module to simulate the fate and transport of PACs/PAHs in a basin based on the SWAT model architecture.

License

Notifications You must be signed in to change notification settings

QianyangWang/SWAT-LC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SWAT-LC

ConceptualGraph

Introduction

Characterized by complex behaviors in the environment, the mechanism-based simulation of Polycyclic Aromatic Compounds (PACs) at a basin scale presents significant challenges, underscoring the need for more accessible tools. This code repository introduces a Python extension called “SWAT-LC” (SWAT-Load Calculator), designed specifically based on the SWAT hydrologic model architecture for this purpose. SWAT-LC describes the terrestrial fate and transport processes of PACs for each Hydrological Response Unit (HRU) and sub-basin through a series of build-up, wash-off, partitioning, and decay equations. Using the PACs load calculated by SWAT-LC in conjunction with flow generation simulation results from SWAT, the concentration of PACs in the river can then be modeled using WASP8. Leveraging this extension alongside the SWAT2WASP toolkit (https://github.com/QianyangWang/SWAT2WASP), users can establish a more integrated SWAT—SWAT-LC—WASP8 modeling framework with greater ease. This code repository is a part of the work presented in the paper entitled “Simulation of Polycyclic Aromatic Compounds in the Athabasca River Basin: Integrated Models and Insights”. The architecture of the SWAT—SWAT-LC—WASP8 modeling framework is as follows:

ModelStructure
The SWAT-LC model reads the input variables (HRU and river features, HRU water yield time series, etc.) from an existing SWAT simulation project folder, and then simulates the PACs for each HRU. Subsequently, it calculates the summation of the HRU pollutant loads for each sub-catchment. Functionalities can subsequently be used to convert the SWAT-LC output into WASP8 external database, which can be used as the input for WASP8 in-stream fate and transport modelling.
ModelStructure2

Major Governing Processes

SWAT-LC incorporates four primary storage layers: surface storage, soil storage, shallow groundwater storage, and deep groundwater storage. In each independent Hydrological Response Unit (HRU), the concentration of PACs is assumed to be homogeneously distributed across these layers. In the surface layer, PACs can accumulate during dry periods. Conversely, during wet days, wash-off processes occur, leading to the movement of PACs. This flux is divided into horizontal wash-off—where PACs move with surface runoff into the river—and vertical wash-off—where PACs leach into the soil layer. Within the soil layer, three-phase partitioning equations (Du et al. 2019; Han et al. 2022) are employed to calculate the concentration of PACs in dissolved, solid, and DOC-adsorbed phases. PACs can then either migrate to the river through lateral flow or infiltrate into the aquifer via percolation. In the groundwater storage layer, PACs can contribute to riverine flows through baseflow, further influencing their concentration in surface waters.

Specifically for the Athabasca oilsands region, in which the petrogenic source is dominating the total PAH in water, the bitumen outcrop erosion equation was developed based on the modified rating curve method governed by both the flowrate/river width and min & max air temperature.

SWATLCprocesses

Model Coupling Process

SWAT-LC scans the SWAT project folder structure and extracts relevant parameters and variables for each “SUBBASIN” and “HRU” object, managed by the “PROJmanager”. Each object has an independent “StateVariable” attribute to track process variables during DOC/PAC simulations. Subsequently, sub-basin level results from SWAT-LC can be exported to spreadsheets or MySQL for external databases that can be directly fed into WASP8.

IOplot

Dependencies

Numpy, Pandas, and sqlalchemy & mysql (optional)

Usage

The major steps to prepare a SWAT-LC simulation include:

  1. Prepare a SWAT model (with full results) to provide the required basin structure and input variables (e.g. precipitation, snow melt, surface runoff, lateral flow, and etc.)

  2. Prepare the required SWAT-LC setting files, including:

    File Name Format Description
    *.sim txt Simulation setting file to inform the options (simulation period, governing equations, and etc.) for modelling.
    *.plt txt Pollutant definition file.
    *.sol txt Soil (DOC parameters) definition file.
    *.lu txt Land use (build-up wash-off parameters) definition file.
    *.init txt Soil initial condition (concentration) setting file.
    *.ocp (optional) txt Outcrops erosion parameter file.
    *.conflict (optional) txt Soil and land use conflict definition file (to resolve the overlap issues between the soil map and land use, generally occurs on water bodies)
    *.usrflux (optional) txt Local settings of the direct flux (e.g. air depositions) into the river, which has a higher priority than the global parameter.
    *.usrlu (optional) txt Local settings of the build-up and wash-off parameters.
    *.usrinit (optional) txt Local settings of the soil initial concentration.
  3. Define your SWAT-LC project folder and run the "main.py".

    if __name__ == "__main__": 	
       # SWAT-LC project folder -> for the example project "file_templates" is the SWAT-LC project folder
       lcpath = os.path.split(os.path.abspath(__file__))[0]
     	# SWAT model folder
     	s = Simulation(r"D:\AthaSWAT\swat1522",lcpath) # class Simulation in the main.py
    	s.run()
    ModelRun
  4. Use the "resultreader.py" to convert the SWAT-LC results into WASP8 external database (xlsx/MySQL).

    # e.g. xlsx format
    # if dirtectly run the script
    lc = LCreader(r"D:\SWAT_LC\lcproj.subout")
    lc.toWASP8db(path=r"D:\SWAT2WASP\SWATLC_WASPDB.xlsx")
    
    # if import the module
    import resultreader
    lc = resultreader.LCreader(r"D:\SWAT_LC\lcproj.subout")
    lc.toWASP8db(path=r"D:\SWAT2WASP\SWATLC_WASPDB.xlsx")

SWAT Example

The Athabasca River SWAT model for the testing purpose can be found at https://zenodo.org/records/16289087

Reference

  1. Du, X., Shrestha, N.K., Wang, J., 2019. Integrating organic chemical simulation module into SWAT model with application for PAHs simulation in Athabasca oil sands region, Western Canada. Environmental Modelling & Software 111 (4), 432–443.
  2. Han, Y., Du, X., Farjad, B., Goss, G., Gupta, A., Faramarzi, M., 2022. A numerical modeling framework for simulating the key in-stream fate processes of PAH decay in Muskeg River Watershed, Alberta, Canada. The Science of the total environment 848, 157246.

How to Cite

Wang, Q., Arlos, M., Wang, J., and Hicks, K.: Integrated Simulation of Polycyclic Aromatic Compounds in the Athabasca River Basin, EGU General Assembly 2025, Vienna, Austria, 27 Apr–2 May 2025, EGU25-10736, https://doi.org/10.5194/egusphere-egu25-10736, 2025.

Qianyang Wang, Maricor J. Arlos, Jinqiang Wang, Mark McMaster,Erin Ussery, Colin A. Cooke, Brandon R. Hill, Nancy Glozier, Keegan A. Hicks, Simulation of Polycyclic Aromatic Compounds in the Athabasca River Basin: Integrated Models and Insights, Water Research (2025), doi: https://doi.org/10.1016/j.watres.2025.124731

About

A python extension module to simulate the fate and transport of PACs/PAHs in a basin based on the SWAT model architecture.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载