Advanced Swat Workshop Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 82

Soil & Water Assessment Tool

http://swatmodel.tamu.edu/

Advanced Manual

R. Srinivasan
r-srinivasan@tamu.edu
Soil & Water Assessment Tool
http://swatmodel.tamu.edu/

Advanced SWAT
Training Manual

R. Srinivasan
r-srinivasan@tamu.edu
Introduction
The Soil and Water Assessment Tool (SWAT) is a physically-based continuous-event
hydrologic model developed to predict the impact of land management practices on
water, sediment, and agricultural chemical yields in large, complex watersheds with
varying soils, land use, and management conditions over long periods of time.
For simulation, a watershed is subdivided into a number of homogenous
subbasins (hydrologic response units or HRUs) having unique soil and land use
properties. The input information for each subbasin is grouped into categories of
weather; unique areas of land cover, soil, and management within the subbasin;
ponds/reservoirs; groundwater; and the main channel or reach, draining the
subbbasin.
The loading and movement of runoff, sediment, nutrient and pesticide loadings to
the main channel in each subbasin is simulated considering the effect of several
physical processes that influence the hydrology.
For a detailed description of the capabilities of SWAT, refer to the Soil and Water
Assessment Tool User’s Manual, published by the Agricultural Research Service and
Texas AgriLife Research, Temple, Texas. To downloaded visit (http://swatmodel.
tamu.edu/).
In this course, we will use the latest SWAT version. Besides all the features included
in the latest SWAT version, this latest version also includes modules for sensitivity
analysis, automatic model calibration and uncertainty analysis.
To install the latest SWAT version and for information on required hardware and
software visit the SWAT website (http://swatmodel.tamu.edu/).
Table of Contents

Section 1 .......................................1
Introduction to Sensitivity and
Uncertainty Analysis

Section 2 .......................................19
SWAT-CUP
2.1 One-at-a-time sensitivity analysis .24
2.2 Autocalibration ............................33
2.3 Uncertainty analysis ....................39
Section 1

Introduction to
Sensitivity and
Uncertainty Analysis

1
2
Introduction to Sensitivity and
Uncertainty Analysis

R. Srinivasan

Contents

 General theory and examples of


• Sensitivity analysis
• Automatic model calibration
• Uncertainty analysis

 Implementation in SWAT2005
• Sensitivity analysis
• Automatic model calibration
• Uncertainty Analysis

Contents

 General theory and examples of


• Sensitivity analysis
• Automatic model calibration
• Uncertainty analysis

 Implementation in SWAT2005
• Sensitivity analysis
• Automatic model calibration
• Uncertainty analysis

3
Aim of Sensitivity Analysis (SA)

 Estimate the rate of change in the output of a model


with respect to changes in model inputs.
• determining parameters for which it is important to have
more accurate values;

• understanding the behavior of the system being modeled;

• evaluating the applicability of the model.

One-at-a-time Sensitivity Analysis I

One-at-a-time Sensitivity Analysis II

After Lenhart et al. (2002)

Are these results transferable to other catchments?

4
One-at-a-time Sensitivity Analysis III

 Is the sensitivity independent of the parameter value?

One-at-a-time Sensitivity Analysis IV

 Is the sensitivity independent of the value of other parameters?

One-at-a-time Sensitivity Analysis V

 Advantages:
• Simple to implement and perform

• Computationally efficient

• Sensitivity clearly attributed to one model parameter

 Disadvantages:
• Sensitivity is only assessed locally

5
Monte Carlo SA I

1. Draw n parameter sets from predefined probability distributions

2. Run model n times

3. Determine sensitivity of each model parameter

Monte Carlo SA II

Monte Carlo SA III

Also see Christiaens and Feyen (2002)

6
Monte Carlo SA IV

ORC 0.301 0.249

SRC 0.559 0.866

LCC 0.503 0.830

SWAT Example: Plant Parameters

Albedo [a]
Stomatal conductance [gs max]
Canopy height [Hmax]
Root depth [RDmax]
Maximum and minimum leaf area index [LAI]
Base temperature [tbase]
Interception [Imax]
Curve number [cn]
Radiation use efficiency [RUE]
Nitrogen uptake coefficients [n1-3]
Phosphorus uptake coefficients [p1-3]

Plant Parameter Database

 Coniferous forest (spruce, pine)


 Deciduous forest (beech, oak) Plapada – Plant Parameter Datadrill
 Pasture
 Cropland (cropping sequence
summer barley, winter rape,
winter wheat)

Where to get data from?

http://www.uni-giessen.de/~gh1461/plapada/plapada.html
Breuer et al. (2003)

7
Plant Parameter Bounds

 Upper and lower bound of each plant parameter are 3 standard


deviations of a normal distribution

 Other probability distribution can be used when required

Plant Parameter SA I

1. Monte Carlo Simulation for (3 vegetation types + 3 crop types)


x 16 plant parameters = 96 plant parameters

2. Perform multiple regression analysis

3. Include all model parameters that improve R2 of meta-model


with a minimum of 5%

4. Analyze standardized regression coefficients

5. Classify model parameters for ease of interpretation

Plant Parameter SA II

8
Plant Parameter SA III

Plant Parameter SA IV

Monte Carlo SA Summary

 Advantages:
• Sensitivity is determined over the entire parameter space

• Parameter correlation can be included

 Disadvantages:
• Assumption of linearity in multiple regression

• Sensitivity not clearly attributed to one model parameter

• Computationally inefficient

9
Monte Carlo Sampling Efficiency

N = number of intervals
m = number of parameters
q = number of draws

m p0
2 0.017
3 0.448
4 0.852

Latin Hypercube Sampling I

1. Divide parameter space in N parts of equal probability 1/N

Latin Hypercube Sampling II

2. Take N samples assuring that you sample each stratum only once

10
Latin Hypercube Sampling III

3. Repeat steps 1-2 several times

4. Determine sensitivity with multiple linear regression

 Advantages:
• Sensitivity is determined over the entire parameter space

• Parameter correlation can be included

• Computationally efficient

 Disadvantages:
• Assumption of linearity in multiple regression

• Sensitivity not clearly attributed to one model parameter

SWAT Implementation SA

 SWAT2005 uses a combination of Latin Hypercube Sampling


and One-At-a-Time sensitivity analysis (LHS-OAT method)

1. Divide parameter space in N parts


of equal propability 1/N.

2. Take N samples according to LHS


scheme

3. Sequentially determine the OAT


sensitivity for each LHS point

LHS-OAT Sensitivity Analysis I

8 2 4 3 1 5 7 9 6 10

11
LHS-OAT Sensitivity Analysis II

 The LHS-OAT sensitivity analysis combines the advantages of


the OAT and the LHS sensitivity analysis:
• Sensitivity is determined over the entire parameter space
• Sensitivity not clearly attributed to one model parameter
• Computationally efficient
• No assumptions on linearity in multiple regression
• Parameter correlation can be, but is currently not, included in
SWAT

Sources of Uncertainty

1. Input Data Uncertainty

2. Model Structural Uncertainty

3. Model Parameter Uncertainty


• Calibrated model parameters

• Other model parameters

4. Output Data Uncertainty

Model Parameter Uncertainty

 Calibrated model parameters


• There is no one optimal parameter set. There is a range of
parameter sets that all result in acceptable values

 Other model parameters (example plant parameters)


• SWAT model has many more parameters than can be calibrated
(conditioning on measurements). These model parameter are also
uncertain.

12
Model Parameter Uncertainty

Lecture tomorrow, Vrugt et al. (2003)

Input Data Uncertainty

 Precipitation is by far the largest source of uncertainty in


hydrologic modelling

Precipitation Data Uncertainty:

 2-10 percent wind loss (rain);

 10-50 percent wind loss (snow);

 Difference between gage-based areal mean


and the true areal mean;

 Unsampled rainfall spatial and temporal


variability.

Also see Melching (1995)

Model Structural Uncertainty

 Inability to truly represent physical runoff processes in model


equations
• Which evapotranspiration model is most appropriate?

• Nonlinear groundwater reservoir approximated by linear reservoir

• Absence of preferential flow

 Difficult to assess and quantify uncertainty, which is often


neglected in modelling

13
Output Data Uncertainty

 Important when determining model parameter uncertainty


through calibration

 Neglecting input data uncertainty and output data uncertainty


will lead to optimistic model parameter uncertainty estimates

1. Higher errors for higher flows


(heteroscedastic error)

2. Problematic for calculating statistics


between measured and modelled
flow simulations

From: Vrugt et al. (2004)

Aim of Uncertainty Analysis (UA)

 SA: Estimate the rate of change in the output of a


model with respect to changes in model inputs.

 UA: Estimate the uncertainty in the output of a model


with respect to uncertainty in model inputs.
• determining main sources of uncertainty in model output;
• risk assesment (e.g. probability that x is exceeded);
• evaluating the applicability of the model.

Methods of Uncertainty Analysis

 To our knowledge, there are no comprehensive uncertainty


analyses of hydrological models dealing with all sources of
uncertainty.

 Most studies dealt with model parameter uncertainty through:


• Monte Carlo Sampling

• Latin Hypercube Sampling

14
SWAT Example: Plant Parameters

Albedo [a]
Stomatal conductance [gs max]
Canopy height [Hmax]
Root depth [RDmax]
Maximum and minimum leaf area index [LAI]
Base temperature [tbase]
Interception [Imax]
Curve number [cn]
Radiation use efficiency [RUE]
Nitrogen uptake coefficients [n1-3]
Phosphorus uptake coefficients [p1-3]

Monte Carlo UA Example I

Monte Carlo UA Example II

span 217-258 mm a-1

5% percentile 95%

15
Monte Carlo UA Example III

410-451 mm a-1 30-33 mm a-1

42-57 mm a-1 217-258 mm a-1

Monte Carlo UA Example IV

Scenarios and Uncertainty I

Are the model parameters included in the UA


independent between the scenarios?

16
Scenarios and Uncertainty II

 Conclusions of combined scenario/uncertainty analysis depend

on the assumptions on dependency

Uncertainty Analysis Summary

 Monte Carlo and Latin Hypercube sampling allow a


combined sensitivity and uncertainty analysis

 Most studies deal with model parameter uncertainty


only. There have been no studies dealing with all
sources of uncertainty yet.

17
18
Section 2

SWAT-CUP

19
20
Introduction

SWAT-CUP is a computer program for calibration of SWAT models. SWAT-CUP is a public domain program, and as such
may be used and copied freely. The program links GLUE, ParaSol, SUFI2, MCMC, and PSO procedures to SWAT. It
enables sensitivity analysis, calibration, validation, and uncertainty analysis of a SWAT model.

In the new version, SWAT-CUP4, a more powerful SWAT_Edit program is provided where ALL SWAT parameters are
handled, including different soil layers and management rotation-operations, precipitation data, etc. The users are also
allowed 20 “free” parameters placed at the end of *.gw files to use for their own programs, which may be linked to SWAT.
This version also includes parallel processing (which is licensed but 20 simulation are allowed to be made for testing the
program), visualization of the outlet locations using the Bing Map, creation of multi_objective objective function, extraction
and calculation of 95PPU for all variables in output.rch, output.hru, and output.sub files without measurements, and one-
at-a-time sensitivity analysis).

For a detailed description of the capabilities of the SWAT-CUP, refer to SWAT Calibration and Uncertainty Programs - A
User Manual. Department of Systems Analysis, Integrated Assessment and Modelling (SIAM), Eawag, Swiss Federal
Institute of Aquatic Science and Technology, Duebendorf, Switzerland, 2008, 95pp. The manual can be downloaded from
the EAWAG Web site (www.eawag.ch/organisation/abteilungen/siam/software/swat/index_EN).

R. Srinivasan, r-srinivasan@tamu.edu 1 21
The overall program structure is as shown in the Figure below.

Objectives

The objectives of this exercise are to (1) Using a SWAT-CUP for automatic model calibration procedure and (2) Linking
uncertainty and sensitivity program to SWAT.

R. Srinivasan, r-srinivasan@tamu.edu Texas


22 A & M University 2
Create a Project
Automated model calibration requires that the uncertain model parameters are systematically changed, the model is run,
and the required outputs (corresponding to measured data) are extracted from the model output files. The main function of
an interface is to provide a link between the input/output of a calibration program and the model. The simplest way of
handling the file exchange is through text file formats.
SWAT-CUP is an interface that was developed for SWAT. Using this generic interface, any calibration/uncertainty or
sensitivity program can easily be linked to SWAT.

R. Srinivasan, r-srinivasan@tamu.edu Texas


23 A & M University 3
Step-by-step procedure to run SUFI2 (Sequential Uncertainty FItting) in SWAT-CUP

Step 1. Start SWAT-CUP. Step 2. Click NEW.

Figure 1 Startup of SWAT-CUP

R. Srinivasan, r-srinivasan@tamu.edu Texas


24 A & M University 4
Step 3.
Import a SWAT TxtInOut directory.
SWAT “TxtInOut” folder is located in your created SWAT project folder.

“TxtInOut” Directory:
C:\temp\Swat Project_test\Scenarios\Default\TxtInOut

Figure 2 TxtInOut files

R. Srinivasan, r-srinivasan@tamu.edu Texas


25 A & M University 5
Step 4.
Then select project type:
SUFI2, GLUE, MCMC, PARASOL, or PSO

R. Srinivasan, r-srinivasan@tamu.edu Texas


26 A & M University 6
Step 5. Select project name and location

Project Directory:
C:\temp\SWATworkshopAK\swatcupadvanced431\swatcupadvanced431\test.Sufi2.SwatCup

R. Srinivasan, r-srinivasan@tamu.edu Texas


27 A & M University 7
During project creation all files in the SWAT TxtInOut will be copied to the new project directory.
If you open the “oat431.Sufi.SwatCup” folder you will see SWAT input/output files and SUFI2.IN,
SUFI2.OUT, etc.

R. Srinivasan, r-srinivasan@tamu.edu Texas


28 A & M University 8
Created project

Figure 3 Opened SWAT-SUFI2 Project

R. Srinivasan, r-srinivasan@tamu.edu Texas


29 A & M University 9
Start

Step 1. Close the opened project “test.Sufi2.SwatCup” by clicking on start


Click Close Project.

Step 2. To open the created project, Click start


Click Open

R. Srinivasan, r-srinivasan@tamu.edu Texas


30 A & M University 10
Step 3. Select a Project Directory for created project.
Click Select.

Project Directory:
C:\temp\SWATworkshopAK\swatcupadvanced431\oat431\oat431.Sufi2.SwatCup

Figure 4 Project directory Figure 5 Opened SWAT-SUFI2 Project

R. Srinivasan, r-srinivasan@tamu.edu Texas


31 A & M University 11
Step 4. Calibration Input Parameters setting

Default input parameters are loaded under the


“Calibration Inputs” in the “Project Explorer” window.
These must be checked carefully by the user and edited
for a project of interest. A brief definition of these files is
provided in follow.
Note that by pressing “Help” you can get an explanation.

Figure 6 Calibration Input Files

R. Srinivasan, srin@brc.tamus.edu BRC/UT/EPA/BASINS 32


Par-inf.txt

Range and number of parameters, and number of simulations are set here.

Two types of sensitivity analysis are allowed in SWAT_CUP. Global Sensitivity and One-at-a-time sensitivity analysis.

Global sensitivity analysis can be performed after an iteration.

One-at-a-time sensitivity should be performed for one parameter at a time only.

To perform the one-at-a-time sensitivity analysis:


Set the number of parameters in the Par_inf.txt
file to 1, and perform a minimum of 5 simulations.

Click on the parameter range that needs to be


edited.

- Note that the number of simulations needs to be


indicated in both Par_inf.txt and
SUFI2_swEdit.def

R. Srinivasan, r-srinivasan@tamu.edu Texas


33 A & M University 13
An important consideration for applying parameter identifiers is that the changes made to the parameters should have
physical meanings and should reflect physical factors such as soil, landuse, elevation, etc. Therefore, the following
scheme is suggested:

x__<parname>.<ext>__<hydrogrp>__<soltext>__<landuse>__<subbsn>__<slope>
Where
x__ Code to indicate the type of change to be applied to the parameter:
v__ means the existing parameter value is to be replaced by the given value,
a__ means the given value is added to the existing parameter value,
r__ means the existing parameter value is multiplied by (1+ a given value).
Note: that there are always two underscore

<parname> = SWAT parameter name.


<ext> = SWAT file extension code for the file containing the parameter (see the file Absolute_SWAT_Values.txt)
<hydrogrp> = (optional) soil hydrological group (‘A’,’B’,’C’ or ‘D’)
<soltext> = (optional) soil texture
<landuse> = (optional) name of the landuse category
<subbsn> = (optional) subbasin number(s)
<slope> = (optional) slope

Some exapmles of SUFI2 parameters:

v__CH_K2.rte________7………5………130 CH_K2 of subbasin 7 is replaced by values between 5 and 130

r__CN2.mgt__D______7__0-10…….-0.2……..0.2 CN2 of Soils with D hydrologic group with slope 0 to10 is multiplied
by values between -1.2 to 1.2
a__ESCO.hru______FRST__7-12……..0.0…….0.2 ESCO value of Forest in subbasins 7 to 12 increased by adding 0
to 0.2

R. Srinivasan, r-srinivasan@tamu.edu Texas


34 A & M University 14
SUFI2-swEdit.def

This file is used by SWAT_Edit.exe to restart a simulation from the middle. Starting and ending simulations are indicated
here.

Note that the number of simulations needs to be indicated in both Par_inf.txt and SUFI2_swEdit.def

Figure 7 Number of Simulation in SUFI2_swEdit.def

R. Srinivasan, r-srinivasan@tamu.edu Texas


35 A & M University 15
File.Cio

This is a SWAT file. It is put here for convenience. What you need from this file are the simulation years and the number
of warm-up period (NYSKIP) to correctly provide SWAT-CUP with beginning and end year of simulation (not including
warm-up period).

Note:
You do not need to modify this
file.

R. Srinivasan, r-srinivasan@tamu.edu Texas


36 A & M University 16
Absolute_SWAT_Values.txt

All parameters to be fitted should be in this file plus


their absolute min and max ranges. Currently most,
but not all parameters are included in this file.
Simply add to it the parameters that don’t exist
in the format that is shown.

Note:
During SWAT-CUP running you may receive an error message that
the specific parameter value is not in the absolute values file; simply
add the parameter manually in the absolute value file under the
related file name extension.

R. Srinivasan, r-srinivasan@tamu.edu Texas


37 A & M University 17
Step 5: Editing the Observation files:

Under Observation are three files that contain the observed variables.
Only edit the file(s) that applies to your project and do not worry about the ones that don’t.

If there is missing data in data series continue with the rest of the data series and skip the record number. For example, if
the data of January 1993 is missing the record number is started from 2.

Note: The measurement unit of data series should be same as SWAT variable.

R. Srinivasan, r-srinivasan@tamu.edu Texas


38 A & M University 18
Step 6. Editing Extraction files

Under Extraction you will find two types of files .txt and .def corresponding again to SWAT output files.

If you have observations corresponding to variables in these files, then you need to extract the corresponding simulated
values from these files.

Here again only edit the needed files.

Var_file_rch.txt

.txt files simply contain the names of the files that


extracted values should be written to

R. Srinivasan, r-srinivasan@tamu.edu Texas


39 A & M University 19
SUFI2_extract_rch.def

This file is used by the program


SUFI2_extract_rch.exe to extract
the necessary outputs from the SWAT’s
output.rch file.
Note that in this example there is 1 variable,
discharge, and 1 output file.

Notes:

Warm up period is not included in simulation period.

The beginning and end year of simulation should be equal to the beginning year (IYR-NYSKIP) and end year simulation

(IYR+NBYR-1) in File.Cio.

Time step (daily, monthly, yearly) should be equal as of SWAT model.

For each variable determine the number of subbasins to get for the variable and sub basin number for the variable.

Column number indicates the column number of SWAT variable in output.rch file. The variables under Remark

R. Srinivasan, r-srinivasan@tamu.edu Texas


40 A & M University 20
Step 7. Next, Objective Function is defined. In this step the
file observed.txt should be edited.

This file contains all the information in


observed_rch.txt, observed_hru.txt,
observed_sub.txt files, plus some extra
information for the calculation of objective
function.

Observed.txt

This file contains the observed data being used for


calibration.

Number of variables: 1 (Discharge)


In observed.txt the number of observations should equal to
1 as there is 1 variable in the objective function, hence
there should be at least 1 name in the var_file_name.txt :
FLOW_OUT_3.txt

R. Srinivasan, r-srinivasan@tamu.edu Texas


41 A & M University 21
Note:

In the presented project, base flow has the same values as the peak flows, since the value of separation is -1. Setting this
value to 0 or 1 divides the flow data to into small and large values. Considering a separation of signal dramatically
improves the simulation results.

This option is most effective for option 2 of objective function and is not defined for R2 and bR2.

If separation of signal is considered, the weight of the small and large values in the objective function should be
determined.

If you choose option 2 for objective function, i.e., mean square error, then base flow my not have much effect on the
optimization, hence, peak flow will dominate the processes. With this option they can be given the same weight.

R. Srinivasan, r-srinivasan@tamu.edu Texas


42 A & M University 22
var_file_name.txt

This file contains the name(s) of the output files


for the variables that should be extracted from the SWAT
.rch output file.
This name indicates discharge from subbasin 3.

Step 8. No Observation

The No Observation section is designed for


the extraction and visualization of
uncertainties in the variables for which we
have no observations, but would like to see
how they are simulated such as various
nutrient loads, or soil moisture, etc.

The .txt and .def files are the same as the Extraction
section.

R. Srinivasan, r-srinivasan@tamu.edu Texas


43 A & M University 23
The file 95ppu_No_Obs.def is a file
used for the calculation of the 95ppu in the
extracted variables with no observation.

Note:
The 95PPU is calculated at the 2.5% and 97.5%
levels of the cumulative distribution of an output
variable obtained through Latin hypercube
sampling, disallowing 5% of the very bad
simulations.

R. Srinivasan, r-srinivasan@tamu.edu Texas


44 A & M University 24
Step 9. Executing batch files

The four batch files indicate what should or should not be run.

SUFI2_Pre.bat: this batch file runs the preprocessing procedures, which now include running the
Latin hypercube sampling program. This batch file usually does not need to be edited.

SUFI2.Run.bat: this program executes SUFI2_execute.exe program, which runs the SWAT_Edit.exe, extraction batch files, as
well as SWAT2009.exe. This batch file usually does not need to be edited.

SUFI2.Post.bat: This section should be modified depending on our purpose of using SUFI2. The
programs that are not desired to run should be remarked by “rem” as shown.

R. Srinivasan, r-srinivasan@tamu.edu Texas


45 A & M University 25
SUFI2_Extract.bat: This batch file should contain the names of all the extract programs with or without observations. Currently 6
programs can be supported: This file must be edited based on our purpose to run the SUFI2 for sensitivity analysis, uncertaity
analysis, or calibration.

R. Srinivasan, r-srinivasan@tamu.edu Texas


46 A & M University 26
Step 10. Click on “Calibrate” in Culibration-Validation Tool Bar.
An Execute Calibration box will be opened.

Notes:

For a new project run the model for at least 20


times to be sure there is no any error in SWAT-CUP
running process.

. For a new project make sure you start from

SUFI2_Pre.bat first.

. To continue an iteration from the middle,

start from SUFI2.Run.bat, and then run


SUFI2.Post.bat.

R. Srinivasan, r-srinivasan@tamu.edu Texas


47 A & M University 27
SUFI2_Pre.bat SUFI2.Run.bat

Click OK

Depend on number of simulations this step takes many minutes or hours.

R. Srinivasan, r-srinivasan@tamu.edu Texas


48 A & M University 28
SUFI2.Post.bat

Click OK

Step 9. Save the iteration.

Look at the result under sensitivity analysis.

R. Srinivasan, r-srinivasan@tamu.edu Texas


49 A & M University 29
Note:

To perform sensitivity analysis run the model for one or two years and no need to run for many years of data
series as perform in calibration process.

To perform the one-at-a-time sensitivity analysis, one should set the values of the parameters that are
kept constant to some reasonable values. These reasonable values could, for example, be the best
simulation (simulation with the best objective function value) of the last iteration.

To set the parameters to the best value of the last iteration:

1- Note the number of the best simulation in the Summary_Stat.txt file

R. Srinivasan, r-srinivasan@tamu.edu Texas


50 A & M University 30
2- In the SUFI2_swEdit.txt set the starting and ending simulation values to the number of
the best simulation.

3- Under Calibration, run SUFI2_run.bat

This command will replace the parameter values and set them to the best values of the last iteration. If there is no
need to run SWAT here, then the program can be stopped when SWAT run begins.

R. Srinivasan, r-srinivasan@tamu.edu Texas


51 A & M University 31
One-at-a-time sensitivity measures (± 20%)
In the figure, the dashed line is the observation and the discharge signal for FLOW_OUT_3 is plotted for five values
of CH_K2 within the specified range. Clearly, CH_K2 needs to have larger values.

Variable Value Simulated flow


6.5 3.48
9.5 3.71
CH_K2 12.5 3.79
(Min=5, Max=20) 15.5 4.06
Obs. Flow 4.07
18.5 4.29

R. Srinivasan, r-srinivasan@tamu.edu Texas


52 A & M University 32
Calibration

Step 1. Select a Project Directory for created project.


Click OK.

Project directory:
C:\temp\SWATworkshopAK\swatcupadvanced431\swatcupadvanced431\swatcup431.Sufi2.SwatCup

R. Srinivasan, r-srinivasan@tamu.edu Texas


53 A & M University 33
Step 2. Calibration Input Parameters setting

To perform the calibration:

Set the number of parameters in the Par_inf.txt file to 9,


and perform a minimum of 30 simulations.

Click on the parameter range that needs to be edited.

Start with suitable numbers of runs; for example starting with


1000 runs to calibrate 10 parameters gives acceptable
parameter ranges.

SUFI2-swEdit.def
Then set the values of file SUFI2_swEdit.def as
follows:

R. Srinivasan, r-srinivasan@tamu.edu Texas


54 A & M University 34
Step 3: Editing the Observation files:

R. Srinivasan, r-srinivasan@tamu.edu Texas


55 A & M University 35
Step 4. Editing Extraction files

R. Srinivasan, r-srinivasan@tamu.edu Texas


56 A & M University 36
Step 5. Next, Objective Function is defined. In this step the file observed.txt should be edited.

R. Srinivasan, r-srinivasan@tamu.edu Texas


57 A & M University 37
SUFI2.Post.bat: SUFI2_Extract.bat:

Step 6. Save Iteriation

Look at the results in the “Calibration Output”

R. Srinivasan, r-srinivasan@tamu.edu Texas


58 A & M University 38
95ppu plot - This command shows the 95ppu of all variables.

The 95PPU is calculated at the 2.5% and 97.5% levels of the cumulative distribution of an output variable obtained
through Latin hypercube sampling, disallowing 5% of the very bad simulations.

Rfactor: Average thickness of the 95PPU band divided by the standard deviation of the measured data. SUFI-2, hence seeks to
bracket most of the measured data with the smallest possible uncertainty band. Smaller Rfactor indicates the less sensitivity.
P-factor: Percentage of measured data bracketed by the 95% prediction uncertainty (95PPU).

R. Srinivasan, r-srinivasan@tamu.edu Texas


59 A & M University 39
Dotty Plots - This command show the dotty plots of all parameters.
These are plots of parameter values vs objective function.
The main purpose of these graphs are to show the distribution of the sampling points
as well as to give an idea of parameter sensitivity.

Improved
model
prediction

Objective
Objective Function
Function (NS)
(Sum)

Example 1: Gradually improved model Example 2: Insignificant improvement

R. Srinivasan, r-srinivasan@tamu.edu Texas


60 A & M University 40
Best_Par.txt - This command shows the best parameters (giving the best value of objective function) of the current
iteration.

Best_Sim.txt - This command shows the best simulated values.

Goal.txt - This command shows the value of all parameter sets as well as the
value of the objective function in the last column.

New_Pars.txt - This file shows the suggested values of the new parameters
to be used in the next iteration.

If necessary, replace the parameters in Par_inf.txt with those in


New_pars.txt and do another iteration. The suggested parameters always
have smaller intervals.

Please note that the new parameter values in New_pars.txt


need to be carefully checked, and then copied to Par_inf.txt file
for a new iteration.

R. Srinivasan, r-srinivasan@tamu.edu Texas


61 A & M University 41
Summary_Stat - This file has the statistics comparing observed data with the simulation band through p-factor and r-
factor and the best simulation of the current iteration by using R2, NS, bR2, MSE, and SSQR.

Also shown is the objective function (goal function) type, best simulation number of the current iteration, and the best
value of the objective function for the current run.

If behavioral solutions exist (multiobjective function), then the p-factor and r-factor for these solutions are also calculated.
As shown in the following Table the effect of using behavioral solutions is to obtain smaller p-factor and r-factor, or a
smaller prediction uncertainty.

The table shows that the objective function (NS) of 44 simulations is above threshold value 0.2 which means

R. Srinivasan, r-srinivasan@tamu.edu Texas


62 A & M University 42
In this step, if the statistical evaluation was not satisfactory, a new iteration should be perform.

Steps:

1) Change/check parameters in "model.in": copy all of the parameters and values in the "Best_Par.txt" to the
"model.in"

2) Run "SWAT_Edit.exe" in the project folder

3) Run "SWAT2009.EXE" in the project folder

4) Run "Sufi_extract.bat" in the project folder

5) Replace the parameters and their limits in the "Par_inf.txt" with the parameters and values in the "New_pars.txt"
(Check and modify the parameter ranges if it is required)

6) Run the Sufi2 for a new iteration

Above process updates the SWAT model parameters; therefore, the user does not need to update the parameters via the
SWAT Interface, run the program, and move the files from "TxtInOut" into the Sufi2 project folder.

R. Srinivasan, r-srinivasan@tamu.edu Texas


63 A & M University 43
Global Sensitivity

t-stat provides a measure of sensitivity (larger absolute values are more sensitive)
p-values determined the significance of the sensitivity which is often 0.05 or 0.01. A values close to zero has more
significance.

In the above example, the most sensitive parameters are CH_K2 followed by GW_REVAP and CN2.

R. Srinivasan, r-srinivasan@tamu.edu Texas


64 A & M University 44
Uncertainty analysis

In SUFI-2, parameter uncertainty accounts for all sources of uncertainties such as


uncertainty in driving variables (e.g., rainfall), conceptual model, parameters, and
measured data. The degree to which all uncertainties are accounted for is quantified
by a measure referred to as the P-factor, which is the percentage of measured data
bracketed by the 95% prediction uncertainty (95PPU).

The 95PPU is calculated at the 2.5% and 97.5% levels of the cumulative distribution
of an output variable obtained through Latin hypercube sampling, disallowing 5% of
the very bad simulations. Hence, SUFI-2 starts by assuming a large parameter
uncertainty (within a physically meaningful range), so that the measured data initially
falls within the 95PPU, then decreases this uncertainty in stepswhile monitoring the
P-factor and the R-factor. Conceptual illustration of the
relationship between parameter
uncertainty and prediction

R. Srinivasan, r-srinivasan@tamu.edu Texas


65 A & M University 45
Project directory:
C:\temp\SWATworkshopAK\swatcupadvanced431\swatcupadvanced431\scenario431.Sufi2.SwatCup

R. Srinivasan, r-srinivasan@tamu.edu Texas


66 A & M University 46
Step 2. Editing the "Calibration Inputs"

Par_inf.txt

R. Srinivasan, r-srinivasan@tamu.edu Texas


67 A & M University 47
SUFI2_swEdit.def

Step 3. Editing the "No Observation"

The No Observation section is designed for the extraction and visualization of


uncertainties in the variables for which we have no observations, but would like to
see how they are simulated such as various nutrient loads, or soil moisture, etc.

The .txt and .def files are the same as the Extraction section.

R. Srinivasan, r-srinivasan@tamu.edu Texas


68 A & M University 48
Extraction files

R. Srinivasan, r-srinivasan@tamu.edu Texas


69 A & M University 49
95ppu_No_Obd.def

The file 95ppu_No_Obs.def is a file


used for the calculation of the 95ppu in the
extracted variables with no observation.

Var_file_rch_No_obs.txt

R. Srinivasan, r-srinivasan@tamu.edu Texas


70 A & M University 50
Step 4. Editing the "Executable Files"

SUFI2.Post.bat: SUFI2_Extract.bat:

Step 5. Save the last iteration done.

Step 6. Look at the results in the “Calibration Output”

R. Srinivasan, r-srinivasan@tamu.edu Texas


71 A & M University 51
95ppu-No_Observed plot - This command
shows the 95ppu of all variables with no
observations

As all forms of uncertainties are reflected in


the measured variables (e.g., discharge), the parameter
uncertainties generating the 95PPU
account for all uncertainties.

R. Srinivasan, r-srinivasan@tamu.edu Texas


72 A & M University 52
73
74

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy