HydroCS Wiki

Hydrologic Computational Science Lab Wiki

User Tools

Site Tools


swatplus_modeling

This is an old revision of the document!


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, m3), and then import the updated file back into SWAT+.

Table: sample input file format for the inlet

jdaymoday_moyrob_typob_nameflosedorgnsedpno3solpchlanh3no2cboddoxsandsiltclaysaglaggraveltmp
1112005pt_daypt02816343154.40.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0
2122005pt_daypt02816465483.40.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.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 (m3/s) at the downstream channel.
awk '$7=="cha121" {printf "%.10f\n", $48}' TxtInOut_withinflow/channel_sd_day.txt | head -n 10

Structure of generated files

recall.rec

The following shows the structure of the recall.rec file for the SWAT+ model

recall.rec: written by SWAT+ editor v2.3.1 on 2026-05-28 15:44 for SWAT+ rev.60.5.7
idnamerec_typfile
1pt0281pt028.rec

Terminology used in the file is explained as follows

Term Meaning
pt028 Name of recall object
rec_type recall type, 1 for daily data
pt028.rec file containing actual time series

recall.con

The following shows the structure of the recall object connection file for the SWAT+ model

recall.con: written by SWAT+ editor v2.3.1 on 2026-05-28 15:44 for SWAT+ rev.60.5.7
idnamegis_idarealatlonelevrecwstcstovflruleout_totobj_typobj_idhyd_typfrac
1pt028280.0000143.00159-115.20618762.459111s42895n115230w0001sdc104tot1.00000
Termvalueshort_description
wsts42895n115230wWeather station assigned to the object (climate input source).
cst0No constituent station assigned.
ovfl0No overflow routing defined.
rule0No management or routing rule applied.
out_tot1One downstream routing connection exists.
obj_typsdcSource/Delivery Channel (SDC) object used as an intermediate routing node in SWAT+ that transfers flow, sediment, and nutrients between landscape objects and the stream network.
obj_id104Identifier of the downstream SDC object receiving the routed flow.
hyd_typtotRoutes total flow and associated constituents without splitting by component.
frac1.00000100% of flow and loads are routed to the downstream SDC object.
swatplus_modeling.1780090407.txt.gz · Last modified: by mpokhrel

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki