swatplus_modeling
This is an old revision of the document!
Table of Contents
SWAT+ modeling
How to add inflow hydrograph
PointID selection for the inlet
The point ID for the inlet is defined when we prepare the SWAT+ model in QSWAT+. We can verify it in QGIS using the Identify Features tool.
Implementation workflow using SWAT+ Editor
Edit SWAT+ Inputs → Point Source/Inlet → Edit Inlet Point → Set the time step to “Daily” and import the CSV file prepared for that specific inlet point.
To prepare the input file, we can export the empty recall file in .csv format, add the flow data (in volume, m³), and then import the updated file back into SWAT+.
Table: sample input file format for the inlet
| jday | mo | day_mo | yr | ob_typ | ob_name | flo | sed | orgn | sedp | no3 | solp | chla | nh3 | no2 | cbod | dox | sand | silt | clay | sag | lag | gravel | tmp |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 2005 | pt_day | pt028 | 16343154.4 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 2 | 1 | 2 | 2005 | pt_day | pt028 | 16465483.4 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
File that are generated or changed in the model
- file.cio: define recall.con in connect and recall.rec in recall
- recall.rec
- recall.con
- pt028.rec (Example for inlet with point id 028)
How to visualize or print output changes after defining an inflow
- Run the model before and after defining the inflow file, but save the outputs in different Textinout files. Make sure the model prints the channel output so that we can validate it at the downstream channel section.
- Identify the channel downstream of the inlet.(using QGIS)
- Use the following awk command to extract the flow rate (m³/s) at the downstream channel.
awk '$7=="cha121" {printf "%.10f\n", $48}' TxtInOut_withinflow/channel_sd_day.txt | head -n 10
swatplus_modeling.1780079204.txt.gz · Last modified: by hcho

