procedure for swat cup calibration · 2015. 11. 23. · procedure for swat‐cup calibration...

9
Procedure for SWATCUP calibration Prepared by: Sandra R. Villamizar Updated on: 11/23/2015 Note: Visit the developer’s website for theoretical documentation and more detailed information. 0. To make sure that CUP is using the same SWAT version than the one used in ArcSWAT, copy the SWAT_32rel and SWAT_64rel application files (C:\SWAT\ArcSWAT) in the corresponding SourceData folder of CUP. For example, if using a 64bit version of SWAT, copy the SWAT_64rel file in the folder C:\Program Files (x86)\SWATCUP\ExternalData\SourceData\SWAT2012_x64. There, rename the file from “SWAT_64rel” to “swat”. 1. Copy the TextInOut folder of SWAT to a new directory were all the CUP simulations will be developed. 2. Open CUP and click on the top left icon as indicated in the figure 3. Either create a new simulation or open an existent one. If opening an existent project, select the location of the .SwatCup file. If creating a new project, follow the steps of the wizard : Opening an existing simulation Creating a new simulation – first step

Upload: others

Post on 20-Aug-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Procedure for SWAT CUP calibration · 2015. 11. 23. · Procedure for SWAT‐CUP calibration Prepared by: Sandra R. Villamizar Updated on: 11/23/2015 Note: Visit the developer’s

Procedure for SWAT‐CUP calibration Prepared by: Sandra R. Villamizar Updated on: 11/23/2015 Note: Visit the developer’s website for theoretical documentation and more detailed information.  

0. To make sure that CUP is using the same SWAT version than the one used in Arc‐SWAT, copy the 

SWAT_32rel and SWAT_64rel application files (C:\SWAT\ArcSWAT) in the corresponding 

SourceData folder of CUP. For example, if using a 64bit version of SWAT, copy the SWAT_64rel 

file in the folder C:\Program Files (x86)\SWAT‐CUP\ExternalData\SourceData\SWAT2012_x64. 

There, rename the file from “SWAT_64rel” to “swat”. 

1. Copy the TextInOut folder of SWAT to a new directory were all the CUP simulations will be 

developed. 

2. Open CUP and click on the top left icon as indicated in the figure 

3. Either create a new simulation or open an existent one. If opening an existent project, select the 

location of the .SwatCup file. If creating a new project, follow the steps of the wizard : 

Opening an existing simulation  Creating a new simulation – first step  

Page 2: Procedure for SWAT CUP calibration · 2015. 11. 23. · Procedure for SWAT‐CUP calibration Prepared by: Sandra R. Villamizar Updated on: 11/23/2015 Note: Visit the developer’s

  Selecting the TxtInOut folder to use  

Defining the SWAT version used  Selecting the desired calibration method    

 

Defining project name and location    

 

Page 3: Procedure for SWAT CUP calibration · 2015. 11. 23. · Procedure for SWAT‐CUP calibration Prepared by: Sandra R. Villamizar Updated on: 11/23/2015 Note: Visit the developer’s

4. Once the project is created, the next steps focus on defining the “Calibration inputs” located on 

the Project Explorer area of the interface 

 

5. Par_inf.txt contains the input parameters to be optimized. There are two ways of configuring 

these parameters: using the “Form View” or the “Text View”. By default, the application only 

contains 4 parameters in this section. The user will need to add more as required using the “Add 

a new parameter” or “Insert a new parameter” buttons on the top of the window. 

‐The figure above shows the “Form View”. Make sure that the “Number of Parameters” field and the actual number of parameters specified are the same (cells will look all green when this 

Page 4: Procedure for SWAT CUP calibration · 2015. 11. 23. · Procedure for SWAT‐CUP calibration Prepared by: Sandra R. Villamizar Updated on: 11/23/2015 Note: Visit the developer’s

happens) if there are red cells in the # column, there is an inconsistency between these two items.  ‐Make sure to select the right parameter. For example, there are snow parameters in the .bsn table and the .sno table. The .sno table will exist if you check the “use basin specific snow parameters” within the .bsn table. ‐Be careful when using the “relative”, “adds” or “replace” operations. Use only the “relative” option for spatial parameters (for example, soil parameters and CN2) otherwise, you will lose the original spatial variability. For the spatial parameters, CUP will store the true parameter of each spatial unit (subbasin or HRU) and then will vary that parameter on a relative basis (plus or minus a given percent). ‐Revise the “Values” defined to ensure the method and the Min / Max values are the desired ones. They can get misconfigured when the Number of Parameters doesn’t match the actual specified parameters. ‐Make sure to define the right “Filter Conditions” when necessary ‐Click on the “Text View” form (left of “Form View”) to learn how to modify parameters in this form. If using this form, make sure to specify the right number of parameters on the first line. The program only reads the number of lines there specified. The bottom sections contain examples of how to define the changes to the parameters.  After a complete iteration, review the suggested new parameters in the “Calibration Outputs \ new_pars.txt”, (change if necessary) and copy them to the par_inf.txt and make a new iteration.  6. The “SUFI2_swEdit.def” file: 

Here, define the start and end of simulation numbers. For this case there are 50 simulations.  Make sure the number of simulations here matches the number defined in the “Par_inf.txt” file. 

 

7. The “File.Cio” file. This is the Master SWAT Watershed file and is automatically filled out based 

on the TextInOut data. The important parameters here are: NBYR (number of years simulated), 

IYR (beginning year of simulation, including warm up period), and NYSKIP (number of years to 

skip‐warm up years).   

8. The “Absolute_SWAT_Values.txt” file. This table contains predefined values that are assumed to 

be the max valid ranges for some of the parameters. Do not modify this table unless you are 

truly sure that a modification is required, for example, one of the parameters that you want to 

calibrate is not there (then add it). CUP will not change/vary a parameter outside of the 

specified values here provided (make sure to take units into account if any change is to be 

made). 

Page 5: Procedure for SWAT CUP calibration · 2015. 11. 23. · Procedure for SWAT‐CUP calibration Prepared by: Sandra R. Villamizar Updated on: 11/23/2015 Note: Visit the developer’s

9. Observations / Observed_rch.txt file. This file contains observed data (gauging station data) that 

will be used to compare with the output.rch file. The data to put in here is taken from the file: 

D:\ArcSwat\MercedRiver\0_SimulationResults\Monthly_calibration_flows\MRC_81_2002.txt 

 ‐The first line defines the number of gauging stations to be used. ‐For the first gauging station:   *the first line (line 3 in the figure) defines the name of the file as FLOW_OUT_15 where 15 is the number of the reach or subbasin where the gauging station is located within the model.   *the second line defines the number of available observations for that gauging station   *next, a table containing the observed data needs to be added (a tab separated file can be created elsewhere and then copied and pasted here). The format is:   + Column 1: sequential number that starts with 1 for the first month of the simulation (not counting the warm up period). Note: If the observed data is available only after the start of the simulation period, the fist sequential number needs to be the number of months after the start of the simulation period (i.e. number 1 corresponds only to the month of the start of the simulation period).   + Column 2: a description of the type of data and month and year of the observation. To CHECK! What happens with the sequence of column 1 if there is no observation in a given month?    + Column 3: the mean monthly observed value at the gauging station. ‐ If there is more than one gauging station, then continue below making sure to change the parameters describe above for gauging station 1 

 

 

 

 

Page 6: Procedure for SWAT CUP calibration · 2015. 11. 23. · Procedure for SWAT‐CUP calibration Prepared by: Sandra R. Villamizar Updated on: 11/23/2015 Note: Visit the developer’s

10. Extraction / Var_file_rch.txt. Here, define the file names of the observations defined in 

“Observed_rch.txt” 

 If I had defined more than 1 observation tables in “Observed_rch.txt”, say 4, I would have needed to have 4 file names in this file. 

 

11. SUFI2_extract_rch.def file. Here, you define how variables should be extracted from the 

output.rch file.  Many things need to be specified here. Be careful!  

‐Row 2: the number of variables to get from the output.rch file. In this case, I only care about outflow (located in column 7 of the output.rch file) hence, I write 1 here. If I wanted to compare more than one variable, for example, some sediment data, I would need to write 2 in this field. ‐Row 3: the column number of the variable(s) to be extracted from output.rch. FlowOut is located in column 7 of output.rch file. If more variables were going to be extracted, I would need to specify their column names here. ‐Row 4: the total number of reaches (or subbasins) within my model. ‐Row 5: the number of reaches (or subbasins) to get for the first variable. For this example, I have 1 because I only have one gauging station for flow. If I wanted to compare my outputs in say, 4 subbasins, then I would need to write 4 here. ‐Row 6: the reach (or subbasin) number(s) to match the first variable (flow). If my subbasins where I have gauging stations were 15, 21, 56, and 81, I would need to write these numbers here, separated with spaces. 

Page 7: Procedure for SWAT CUP calibration · 2015. 11. 23. · Procedure for SWAT‐CUP calibration Prepared by: Sandra R. Villamizar Updated on: 11/23/2015 Note: Visit the developer’s

*** If I were testing my outputs with other variables (say sediment or nutrients) I would need to do the same type of specifications for those variables. ‐Rows 7 and 8: the beginning and end of the simulation period (not including the warm up period) ‐Row 9: the time step for the comparison between model output and observations  12. Objective function / Observed.txt. This file contains all the information of the 

“Observed_rch.txt” (see section 9) plus some additional information for the calculation of the 

objective function. 

‐Row 1: make sure to keep consistency. Here, the number of variables to be used. For now, only flow. ‐Row 2: the objective function to be used. Leave as 5 for now. ‐Row 4: Here we start with the information specific to the first observation. Variable type and reach (subbasin) number need to be assigned (for this case, FLOW_OUT_15). Leave everything as is except for the percentage of measurement error (10%) and the number of data points for that observation data set. This whole section needs to be replicated if there are other observations to be used. Make sure to make the adequate changes.   13. Objective Function / Var_file_name.txt. Here, define all the variables that should be included in 

the objective function. (only one file name for this case but there should be as many as the 

number of available observation files). 

  

Page 8: Procedure for SWAT CUP calibration · 2015. 11. 23. · Procedure for SWAT‐CUP calibration Prepared by: Sandra R. Villamizar Updated on: 11/23/2015 Note: Visit the developer’s

14. No observation section. Used 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. 

Leave this section alone for now. It can be useful though for file structure examples. 

15. Once the Calibration inputs are all configured according to the above steps, click on the “Home” 

tab and the “Calibrate” wheel and then select “Execute all”.  

 

A DOS windows will ask for confirmation of start of process, write “Y” and hit enter. Proceed to close the window (hit OK); continue with the execution of the Sufi2.Run.Bat process by saying OK to “Start the execution of Sufi2.Run.Bat”; the simulations will start. 

 

16. Once the simulations are finished, click OK to close the window and go back to the main CUP 

interface. Once there, click OK to “Start the execution of SUFI2_post.bat” some messages will 

appear. Take a look at them and then proceed to close the window. After going back to the main 

interface, save the iteration. The results will appear in the Iteration History section. 

Page 9: Procedure for SWAT CUP calibration · 2015. 11. 23. · Procedure for SWAT‐CUP calibration Prepared by: Sandra R. Villamizar Updated on: 11/23/2015 Note: Visit the developer’s

    

 

17. The saved Iteration will have record of all the calibration inputs used, and will provide “Calibration Outputs” and “Sensitivity Analysis”.  

18. Pending the description of validation procedure.