Input reference
This section describes the SWAT+ input files for revision 62.0.1. Each page gives the purpose of a file, its columns with units and defaults, how the model uses the values, an example from the reference datasets, and the files it is linked to. Where the code behaves in a way a user would not expect (a column that is read but has no effect, a default that differs from the one SWAT+ Editor writes), the page says so.
Every page was checked against the SWAT+ source at the commit recorded as verified_at_commit in its front matter. Where the source and older documentation disagree, the pages follow the source. The last section of each page, Sources, links to the Fortran routines and lists the variable names for developers.
file.cio names every other input file, so it is the place to start.
Older projects¶
A project set up for an earlier revision needs these changes before it runs correctly with 62.0.1:
- The
basinline offile.cionow has three file names, and thewater_rightsline has two. An oldbasinline shifts every later line offile.cioby one without a message. See older file.cio files. - The dynamic carbon model is now
carbon = 2incodes.bsn. Withcarbon = 1no organic matter routine runs. See carbon model. carb_coefs.cbnis no longer read. Its settings moved tocarbon.bsnandcarbon_lyr.bsn, and its output switch toprint.prt.
Simulation control¶
file.cio: master index. Names the input file for every category, the weather data folders and the output folder.time.sim: simulation period and number of time steps per day.print.prt: warm-up years, daily print window and the output files written at each interval.object.cnt: basin name, areas and the number of spatial objects of each type.
Basin parameters¶
codes.bsn: basin-wide method codes (PET method, channel routing, carbon model, runoff method and others).parameters.bsn: basin-wide coefficients for runoff, peak rate, nutrients, pesticides, routing, lapse rates, erosion and CO₂.carbon.bsn: parameters of the dynamic soil carbon model.carbon_lyr.bsn: decomposition rates and CO₂ fractions of the dynamic soil carbon model, for the surface layer and the deeper layers.
Spatial objects and connectivity¶
- Connect files:
hru.con,rout_unit.con,chandeg.con,aquifer.con,reservoir.con,recall.conand the other connect files, which place each object, assign its weather station and route its outflow. hru-data.hru: the records each HRU uses for topography, hydrology, soil, land use, initial conditions, surface storage, snow and field geometry.- Hydrology and topography:
hydrology.hyd,topography.hyd,field.fldandshade_factor.shf. - Recall: point sources and inlets given as time series.
hru-lte.hru: the simplified HRU-lte objects.- Routing and landscape units:
rout_unit.def,rout_unit.ele,rout_unit.rtu,ls_unit.def,ls_unit.eleandaqu_catunit.ele. - Link files:
chan-surf.linfor overbank flow to floodplain HRUs andaqu_cha.linfor aquifer return flow to several channels.
Climate¶
- Climate files: weather stations (
weather-sta.cli), weather generator statistics (weather-wgn.cli), the lists of observed data files and atmospheric deposition. *.pcp: measured daily or sub-daily precipitation for one gauge.*.tmp: measured daily maximum and minimum air temperature for one gauge.*.tem: temperature files with the.temextension, read like.tmpfiles.snow.sno: snowfall, snowmelt and snow cover parameters.
Soils and land use¶
soils.sol: soil profiles and layer properties.landuse.lum: land use and management records used by HRUs.- Land use tables: curve number, conservation practice and overland flow Manning's n tables named in
landuse.lum.
Channels¶
- Channel group: the
channelline offile.cioand which of its files are used, initial channel contents, stream temperature and the legacy channel files. - Chandeg channel files:
channel-lte.cha,hyd-sed-lte.cha,sed_nut.chaandnutrients.cha, with the geometry, hydraulic, sediment and water quality parameters of the channels SWAT+ routes.
Aquifers, reservoirs and wetlands¶
- Aquifer files:
aquifer.aquand its initial conditions. - Reservoir files:
reservoir.resand its initial condition, hydrology, sediment, nutrient and weir databases. - Wetland files:
wetland.wetandhydrology.wet, for HRUs with ponded water including rice paddies.
Management¶
- Operation databases: harvest, grazing, irrigation, chemical application, fire and street sweeping.
- Decision tables:
lum.dtl,res_rel.dtl,scen_lu.dtlandflo_con.dtl. plants.plt: plant parameter database.fertilizer.frt: fertilizer and manure databases.tillage.til: tillage implements and biological mixing.carb_coefs.cbn: no longer read in 62.0.1.treatment.trt: placeholder file, not read.- Manure allocation: manure sources and the HRUs that draw from them.
- Management schedules and other inputs:
management.sch,puddle.ops,transplant.ops,co2_yr.datandobject.prt.
Initial conditions¶
- Initialization files:
plant.ini,soil_plant.ini,nutrients.solandom_water.ini. Pesticide, pathogen, salt and constituent initial conditions are on the pages for those modules.
Structural practices¶
- Structural practice files: tile drains, septic systems, filter strips, grassed waterways, user-defined practices, the septic and urban databases, and saturated buffers.
Pollutants¶
- Pesticides:
pesticide.pes, initial pesticide amounts and the metabolite chain. - Pathogens:
pathogens.pthand initial pathogen amounts. - Heavy metals: heavy metal inputs.
Groundwater¶
- gwflow: the cell-based groundwater module, used in place of the lumped aquifers when
gwflow = 1incodes.bsn.
Salts and constituents¶
- Salt module: inputs for the eight major salt ions.
- Constituent module:
constituents.csand the inputs for selenate, selenite and boron.
Water allocation¶
- Water allocation: places of use, points of diversion and return, and the treatment, use, tower, canal, pipe and outside-basin files.
Sources
- File names and their order in
file.cio:readcio_read.f90andinput_file_module.f90. - Each page lists the readers and the routines that use its inputs in its Sources section.