Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
These files contain the Decision Tables.
The structure of the decision table files is different than that of most other SWAT+ input files. As usual, the first line is reserved for a title. The second line in the file specifies the total number of decision tables included in the file.
Each decision table has three parts, which all have their own headers. First, the name of the decision table and the number of conditions, alternatives, and actions are specified.
name
Name of the decision table
string
conds
Number of conditions
integer
alts
Number of alternatives
integer
acts
Number of actions
integer
Next, the conditions and alternatives are defined. The number of lines used for this part of the decision table depends on the number of conditions.
Condition variable
string
Object type
string
Object ID
integer
Limit variable
string
Limit operator
string
Limit constant
real
Alternative
string
Finally, the outcomes and actions are defined. The number of lines used for this part of the decision table depends on the number of actions.
Type of action
string
Object type
string
Object ID
integer
Name of the action
string
Action option
string
Action constant
real
Action constant
real
File pointer for action option
string
Outcome
string
Condition variable
The following condition variables are currently coded in SWAT+. If a condition field is not listed in 'Additional fields used', you may leave it as null if field type is string or 0.0000 if field type is double/real.
w_stress
Water stress of the plant(s)
If more than one plant is growing, the average stress will be used
n_stress
Nitrogen stress of the plant(s)
If more than one plant is growing, the average stress will be used
p_stress
Phosphorus stress of the plant(s)
If more than one plant is growing, the average stress will be used
phu_plant
Plant Heat Units since start of plant growth
If more than one plant is growing, the Heat Units for the first one will be used
phu_base0
Heat Units since January 1 with a base temperature of 0 deg C
precip_cur
Precipitation on the current day
precip_next
Precipitation on the next day
plant_gro
Plant growing
plant_name_gro
Specific plant growing
days_plant
Days since last planting
days_harv
Days since last harvest
days_irr
Days since last irrigation
days_act
Days since last action
day_start
Days since first simulation day of the year
slope
Slope of the HRU
soil_water
Total soil water in the soil profile
jday
Julian day
month
Month
year_rot
Rotation year
year_gro
Growth year of perennials
year_cal
Calendar year
year_seq
Sequential year of simulation
cur_yrs_mat
Current years of maturity for perennial plants
biomass
Above-ground biomass
leaf_area
Leaf Area Index
gound_cov
Total ground cover (above-ground biomass and surface residue)
p_factor
USLE conservation practice factor
k_factor
USLE soil erodibility factor
hyd_soil_group
Hydrologic Soil Group
p_pet
Precipitation/PET ratio
p_lab_150
Soil labile phosphorus of first layer
soil_temp2
Soil temperature of second layer
soil_carbon
Soil organic carbon of first layer
tile_drained
The HRU is tile-drained
prob
Probability
prob_unif
Probability within a defined period assuming uniform distribution
channel_flo
Channel flow
tile_flo
Tile flow
irr_demand
Irrigation demand
aqu_dep
Aquifer depth below soil surface
land_use
Land use and management
tillage
Tillage system (name of tillage decision table)
plant_com
Plant is in the community
ch_order
Channel order
vol
Reservoir volume
res_inflo
Reservoir inflow
wet_depth
Average depth of water on an impounded HRU (paddy)
weirh
Paddy weir height
vol_wet
Volume of water stored in a wetland
,
,
,
Limit operator
The limit operators available and the limit and condition variables they are used for are listed in the table below.
*
Multiply limit variable by limit constant
fc, wp, ul (soil_water) evol, pvol (vol and vol_wet)
+
Add limit constant to limit variable
fc, wp, ul (soil_water) evol, pvol (vol and vol_wet)
-
Subtract limit constant from limit variable
fc, wp, ul (soil_water) evol, pvol (vol and vol_wet)
/
Divide limit variable by limit constant
fc, wp, ul (soil_water) evol, pvol (vol and vol_wet)
Limit variable
The condition variables, for which a limit variable must be specified, are listed in the table below. Some limit variables must be used in combination with a limit operator (see lim_op).
soil_water
wp
Wilting point
yes
soil_water
fc
Field capacity
yes
soil_water
ul
Upper limit
yes
plant_gro
y
Plant growing
no
plant_name_gro
no
hyd_soil_group
no
land_use
no
tillage
no
plant
no
ch_use
no
vol
evol
Emergency volume
yes
vol
pvol
Principal volume
yes
vol
e-pv
Emergency minus principal volume
no
wet_depth
no
vol_wet
evol
Emergency volume
yes
vol_wet
pvol
Principal volume
yes
Object type
The object types for all possible condition variables are listed in the table below.
w_stress
hru
n_stress
hru
p_stress
hru
phu_plant
hru
phu_base0
hru
precip_cur
hru
precip_next
hru
plant_gro
hru
plant_name_gro
hru
days_plant
hru
days_harv
hru
days_irr
hru
days_act
hru
day_start
hru
slope
hru
soil_water
hru
jday
hru
month
hru
year_rot
hru
year_gro
hru
year_cal
hru
year_seq
hru
cur_yrs_mat
hru
biomass
hru
leaf_area
hru
gound_cov
hru
p_factor
hru
k_factor
hru
hyd_soil_group
hru
p_pet
hru
p_lab_150
hru
soil_temp2
hru
soil_carbon
hru
tile_drained
hru
prob
hru
prob_unif
hru
channel_flo
cha
tile_flo
hru
irr_demand
hru
aqu_dep
aqu
land_use
hru
tillage
hru
plant
hru
ch_order
cha
vol
res
res_inflo
res
wet_depth
hru
weirh
hru
vol_wet
hru
Object ID
Object ID
If obj_num = 0, the action will be performed for all objects of the type specified by obj. If obj_num > 0, the action will be performed for the object with the specified ID only.
Alternative
The alternative is the final piece to construct the “if” statement needed to implement the associated rule. One of the alternative operators listed in the table below must be specified for each condition defined in the Decision Table. The user can define as many alternatives as needed by adding the required number of alt columns and numbering them sequentially (alt1, alt2,...).
The model checks if the condition is met by:
comparing the condition variable to lim_const (if the condition variable has a limit constant but no limit variable and operator),
comparing the condition variable to lim_var (if the condition variable has a limit variable but no limit operator and constant),
comparing the condition variable to lim_var multiplied by/plus/minus/divided by lim_const (if the condition variable has a limit variable, operator, and constant), or
checking if the conditional variable is true (plant_gro, tile_drained, and plant_com).
How the condition variable is compared to 1., 2., or 3. or checked for 4. is controlled by the alternative operator:
-
Condition not relevant
=
Condition met if var equals 1., 2., or 3. or if var is true (4.)
/
Condition met if var does not equal 1., 2., or 3. or if var is false (4.)
>=
Condition met if var is larger than or equals 1., 2., or 3.
<=
Condition met if var is smaller than or equals 1., 2., or 3.
>
Condition met if var is larger than 1., 2., or 3.
<
Condition met if var is smaller than 1., 2., or 3.
plant, harvest, kill, harvest_kill
"crop"
Pointer to management.sch if one crop is listed behind the name of the DT
plant, harvest, kill, harvest_kill
"crop1", "crop2", ...
Pointer to management.sch if more than one crop is listed behind the name of the DT
plant, harvest, kill, harvest_kill
Name of the crop
Pointer to plant community in plant.ini
release
rate
Release at constant rate
Release rate in m3/s
rate_pct
Release at percentage of principal volume
Percentage of principal volume
inflo_frac
Release at fraction of inflow
Fraction of inflow
ab_emer
Release all volume above emergency
Emergency volume
days
Number of days it takes to drawdown to target volume
Number of days
Multiplier
Target volume
dyrt
Release based on drawdown days and percentage of principal volume
Number of days
Release rate in m3/s
inflo_targ
Release inflow and all volume over target
Target volume
irr_dmd
Release based on irrigation demand of HRU or other water allocation object
weir
Release based on weir equation
meas
Release measured outflow
Recall file
Name of the action
The name of the action is defined by the user. It is not used by the model.
Object type
irrigate
hru
irr_demand
hru
fertilize
hru
fert_future
hru
manure_demand
hru
till
hru
plant
hru
harvest
hru
kill
hru
harvest_kill
hru
rot_reset
hru
pest_apply
hru
graze
hru
grow_init
hlt
grow_end
hlt
drain_control
hru
divert
res_demand
flow_control
tile_control
hru
impound_off
hru
impound_on
hru
weir_height
hru
puddle
hru
hru_fr_update
hru
lu_change
hru
p_factor
hru
contour
hru
stripcrop
hru
terrace
hru
tile_install
hru
septic_install
hru
fstrip_install
hru
grassww_install
hru
user_def_bmp
hru
chan_change
burn
hru
cn_update
hru
pheno_reset
hru
Outcome
The outcome determines whether or not an action will be triggered when the condition alternative is met. There has to be an outcome defined for each alternative.
The only options for action entries are yes ("y") and no ("n").
If all conditions specified by an alternative are met and the outcome is "y", then the associated action will be performed.
If all conditions specified by an alternative are met but the outcome is "n", the associated action will not be performed.
If not all conditions specified by an alternative are met, the associated action will not be performed, even if the outcome is "y".
The actions that can be triggered using the lum.dtl file are defined in the SWAT+ code. For each action, the type and ID of the object it is applied to, and a user-defined name have to be specified. Certain actions require additional information, which has to be specified in the fields option, const, const2, and fp. The use of these four fields depends on the action. The table below lists the actions implemented in the SWAT+ code, a short description, and the additional fields needed.
irrigate
Irrigation
irr_demand
fertilize
Fertilizer application
fert_future
manure_demand
till
Tillage
plant
Planting
harvest
Harvest
kill
Kill
harvest_kill
Harvest and kill
rot_reset
Reset to beginning of rotation
pest_apply
Pesticide application
graze
Grazing
grow_init
Initiate growing season for HRU-lte
grow_end
End growing season for HRU-lte
drain_control
Drainage water management
divert
Divert water
res_demand
Demand from a reservoir
flow_control
Flow control for water allocation
tile_control
Tile flow control for saturated buffers
impound_off
Turn off impounded water (paddy or wetland)
impound_on
Turn on impounded water (paddy or wetland)
weir_height
Adjust weir height (paddy)
puddle
hru_fr_update
HRU area fraction change
lu_change
Land use change
p_factor
Update USLE P factor
contour
Contouring
stripcrop
Strip cropping
terrace
Terracing
tile_install
Install tile drainage
septic_install
Install septic tank
fstrip_install
Install filterstrip
grassww_install
Install grass waterway
user_def_bmp
User user-defined BMP reductions
chan_change
burn
Burning
cn_update
Update Curve Number
pheno_reset
Decision tables are a precise yet compact way to model complex rule sets and their corresponding actions and have been used for many years in data processing and business applications. Using decision tables to simulate management in land, river, and reservoir models was shown to have several advantages over current approaches, including: (1) mature technology with considerable literature and applications; (2) ability to accurately represent complex, real world decision-making; (3) code that is efficient, modular, and easy to maintain; and (4) tables that are easy to maintain, support, and modify.
Decision tables, like flowcharts and if-then-else and switch-case statements, associate conditions with actions to perform, but can do so in a more compact and intuitive way. They are divided into four quadrants: I. Conditions, II. Condition Alternatives, III. Action Entries or Outcomes, and IV. Actions.
Quadrant I contains condition variables and condition limits. In addition to the conditional variable, the model must also know its associated watershed object. For example, if reservoir volume is used as the conditional variable, the reservoir ID in the current simulation must be defined. For some condition variables, the limits are defined using a limit variable, limit operator, and limit constant. Using reservoir volume as an example, the principle and emergency volumes could be used as limit variables. An example input would be “emergency volume * 0.8”. Some condition variables do not have limit variables, e.g., month and Julian day.
There are six possible alternative operators: ">", "<", ">=", "<=", "=", and "-". The alternative is the final piece to construct the “if” statement needed to implement the associated rule. For the symbols ">", "<", and "=", the model will determine if the simulated value of the conditional variable is greater than, smaller than, or equal to the condition limit defined in quadrant I, respectively. The "-" symbol is used if the condition is not relevant for a specific alternative.
Action entries or outcomes specify whether or not an action is triggered. The only options for action entries are yes ("y") and no ("n"). If all conditions specified by an alternative are true and the outcome is "y", then the associated action will be performed. If all conditions specified by an alternative are true but the outcome is "n", the associated action will not be performed.
The action type and associated information needed to perform the action are input in quadrant IV. The model must know which watershed object the action is supposed to be performed on. For some actions, there are multiple options to execute the action. Also, further information may need to be specified depending on the action.
There are currently four different types of decision tables available:
lum.dtl: Land use and management decision tables
scen_lu.dtl: Land use change decision tables
res_rel.dtl: Reservoir and wetland release decision tables
flo_con.dtl: Flow condition decision tables
File pointer
The file pointer is only needed for certain actions. The file that is referenced by the file pointer depends on the action. The table below lists the actions that use the file pointer and which file it points to.
Action
File referenced by file pointer
harvest
()
harvest_kill
()
pest_apply
()
fertilize
()
, , ,
, , ,
, , ,
, ,