SWAT-CUP simulation: no solution

812 views
Skip to first unread message

Muanar

unread,
Jun 19, 2014, 4:47:59 AM6/19/14
to swat...@googlegroups.com
Hello everyone, 
I'm posting here partly in desperation. I read a number of posts about very similar situations to what I am encountering but I can't seem to find the solution that works for me. The final message to my simulation is attached. This is just one of variations of the final message that I get. But ultimately the error is that the SWAT-CUP simulations are too small compared to the observations and my guess is that no amount of variable changing can get the results near enough with my R2 threshold.

When I compare the FLOW_OUT of output.rch (straight out my manual SWAT simulation using typical parameter values) and observed values, the R2 is a decent 0.58 (attaching also a graph of this). I checked the main input files like pcp but they seem to be okay. So I am lost why SWAT-CUP simulates very differently. 

I am also posting below all my inputs:

Par_inf.txt

CN2   //I've reduced it to just one parameter to fast-track my trouble-shooting but still no solution

SUFI2_swEdit.def

1        : starting simulation number
5      : ending simulation number

File.Cio

Master Watershed File: file.cio
Project Description:
General Input/Output section (file.cio):
6/19/2014 12:00:00 AM ARCGIS-SWAT interface AV

General Information/Watershed Configuration:
fig.fig
              12    | NBYR : Number of years simulated
            2001    | IYR : Beginning year of simulation
               1    | IDAF : Beginning julian day of simulation
             366    | IDAL : Ending julian day of simulation
Climate:
               0    | IGEN : Random number seed cycle code
               1    | PCPSIM : precipitation simulation code: 1=measured, 2=simulated
               0    | IDT : Rainfall data time step
               0    | IDIST : rainfall distribution code: 0 skewed, 1 exponential
           1.300    | REXP : Exponent for IDIST=1
               1    | NRGAGE: number of pcp files used in simulation
               2    | NRTOT: number of precip gage records used in simulation
               2    | NRGFIL: number of gage records in each pcp file
               1    | TMPSIM: temperature simulation code: 1=measured, 2=simulated
               1    | NTGAGE: number of tmp files used in simulation
               2    | NTTOT: number of temp gage records used in simulation
               2    | NTGFIL: number of gage records in each tmp file
               1    | SLRSIM : Solar radiation simulation Code: 1=measured, 2=simulated
               2    | NSTOT: number of solar radiation records in slr file
               1    | RHSIM : relative humidity simulation code: 1=measured, 2=simulated
               2    | NHTOT: number of relative humidity records in hmd file
               1    | WINDSIM : Windspeed simulation code: 1=measured, 2=simulated
               2    | NWTOT: number of wind speed records in wnd file
               0    | FCSTYR: beginning year of forecast period
               0    | FCSTDAY: beginning julian date of forecast period
               0    | FCSTCYCLES: number of time to simulate forecast period
Precipitation Files:
pcp1.pcp


Temperature Files:
tmp1.tmp


slr.slr             | SLRFILE: name of solar radiation file
hmd.hmd             | RHFILE: name of relative humidity file
wnd.wnd             | WNDFILE: name of wind speed file
cst.cst             | FCSTFILE: name of forecast data file
Watershed Modeling Options:
basins.bsn          | BSNFILE: name of basin input file
Database Files:
plant.dat            | PLANTDB: name of plant growth database file
till.dat            | TILLDB: name of tillage database file
pest.dat            | PESTDB: name of pesticide database file
fert.dat            | FERTDB: name of fertilizer database file
urban.dat           | URBANDB: name of urban database file
Special Projects:
               0    | ISPROJ: special project: 1=repeat simulation
               0    | ICLB: auto-calibration option: 0=no, 1=yes
                    | CALFILE: auto-calibration parameter file
Output Information:
               1    | IPRINT: print code (month, day, year)
               3    | NYSKIP: number of years to skip output printing/summarization
               0    | ILOG: streamflow print code: 1=print log of streamflow
               0    | IPRP: print code for output.pst file: 1= print pesticide output
Starting Output Variable Section
Reach output variables:
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
Subbasin output variables:
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
HRU output variables:
   1   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
HRU data to be printed:
   1   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
ATMOSPERIC DEPOSITION

               0    | IPHR: print code for hourly output 0=no 1=yes (hourq.out)
               1    | ISTO: print code for soil storage 0=no 1=yes (output.swr)
               0    | ISOL: Code for printing phosphorus/nitrogen in soil profile (output.snu)
               0    | I_SUBW: Code for routing headwaters
septwq.dat
               0    | IA_B: Code for binary output of files (.rch, .sub, .hru files only)
               1    | IHUMUS: Print watqual.out file 0=no 1=yes (output.wql)
               1    | ITEMP: 0=print no file(s) 1=print output.vel/output.dep
               0    | ISNOW: 0=do not print snowband.out; 1=print output.snw
               0    | IMGT: 0=do not print output.mtg; 1=print output.mgt
               1    | IWTR: Code for printing output.pot and output.wtr files
               0    | ICALEN: Code for printing out calendar or julian dates to .rch, .sub and .hru files

Observed_rch.txt

1     : number of observed variables

FLOW_OUT_29   : this is the name of the variable and the subbasin number to be included in the objective function
153   : number of data points for this variable as it follows below. First column is a sequential number from beginning
      : of the simulation, second column is variable name and date (format arbitrary), third column is variable value.

3136 FLOW_OUT_1_8_2012 733.99
3137 FLOW_OUT_2_8_2012 612.27
3138 FLOW_OUT_3_8_2012 547.36
3139 FLOW_OUT_4_8_2012 524.18
3140 FLOW_OUT_5_8_2012 537.00
3141 FLOW_OUT_6_8_2012 906.63
3142 FLOW_OUT_7_8_2012 2,851.37
3143 FLOW_OUT_8_8_2012 2,677.32
3144 FLOW_OUT_9_8_2012 2,096.00

// for presentation purposes I deleted the rest of the data but there are 153 lines in all
// my simulation excluding warm-up starts at 01/01/2004. Counting from that 08/01/2012 is 3136 right?
// by the way, there was a big flood around the start of Aug 2012 in the catchment so the Q is very high. 

3286 FLOW_OUT_29_12_2012 28.38
3287 FLOW_OUT_30_12_2012 23.50
3288 FLOW_OUT_31_12_2012 21.25

Var_file_rch.txt

FLOW_OUT_29.txt

SUFI2_extract_rch.def

output.rch     : swat output file name
1              : number of variables to get
7            : variable column number(s) in the swat output file (as many as the above number)

29              : total number of reaches (subbasins) in the project

//there are 29 sub-basins and my observation is at the outlet of the 29th subbasin.

1              : number of reaches (subbasins) to get for the first variable
29        : reach (subbasin) numbers for the first variable (ordered)

2004           : beginning year of simulation not including the warm up period
2012           : end year of simulation

1              : time step (1=daily, 2=monthly, 3=yearly)

Observed.txt

1     : number of observed variables
3     : Objective function type, 1=mult,2=sum,3=r2,4=chi2,5=NS,6=br2,7=ssqr,8=PBIAS,9=RSR
0.2   : min value of objective function threshold for the behavioral solutions

FLOW_OUT_29   : this is the name of the variable and the subbasin number to be included in the objective function
1     : weight of the variable in the objective function
-1    : Dynamic flow separation. Not considered if -1. If 1, then values should be added in the forth column below after observations
-1    : constant flow separation, threshold value. (not considered if -1)
1     : if separation of signal is considered, this is weight of the smaller values in the objective function
1     : if separation of signal is considered, this is weight of the larger values in the objective function
10    : percentage of measurement error
153   : number of data points for this variable as it follows below. First column is a sequential number from beginning
      : of the simulation, second column is variable name and date (format arbitrary), third column is variable value.

3136 FLOW_OUT_1_8_2012  733.99
3137 FLOW_OUT_2_8_2012  612.27
3138 FLOW_OUT_3_8_2012  547.36
3139 FLOW_OUT_4_8_2012  524.18
3140 FLOW_OUT_5_8_2012  537.00
3141 FLOW_OUT_6_8_2012  906.63
3142 FLOW_OUT_7_8_2012  2,851.37
3143 FLOW_OUT_8_8_2012  2,677.32
3144 FLOW_OUT_9_8_2012  2,096.00

// again, for presentation purposes I deleted the rest of the data but there are 153 lines in all

3286 FLOW_OUT_29_12_2012  28.38
3287 FLOW_OUT_30_12_2012  23.50
3288 FLOW_OUT_31_12_2012  21.25

Var_file_name.txt

FLOW_OUT_29.txt

//I look forward to your kind suggestions and comments. Thank you very much
//best regards
//Ron
Error_1.JPG
Sim_vs_Obs.jpg

Muanar

unread,
Jun 19, 2014, 7:20:07 AM6/19/14
to swat...@googlegroups.com
As additional information,I'm attaching here some files in the echo folder. For instance the file echo_goal_fn.txt abruptly ends like as below:

Number of simulated data files= 1
Names of files containing simulated variables
1- SUFI2.OUT/FLOW_OUT_29.txt


----
sim No.= 1
  0.0250 var= 1  cntr_lower= 0  cntr_higher=153
1  obs_avg_lower=  0.000000
1  sim_avg_lower=  0.000000
1  obs_avg_higher=  25.251177
1  sim_avg_higher=  234.167206
1  obs_variance_lower=  -0.000000
1  sim_variance_lower=  -0.000000
1  obs_variance_higher=  16452.371094
1  sim_variance_higher=  476117.218750
var=   1 lower_contribution=    0.000000  higher_contribution=    0.007363  partial_goal=    0.007363
R2= 0.007363
goal= 0.007363

----
sim No.= 2
 -0.0150 

//[sic]
// I wonder what this situation means. 
Message has been deleted

Muanar

unread,
Jun 22, 2014, 3:10:25 PM6/22/14
to swat...@googlegroups.com
Hello everyone,
Still hoping for some comments on my problem. Another thing I did to check where the problem is is using simulation values for observation. I thought that would eliminate the issue of some form of divergence in finding a solution. And as I feared, the same thing happened as before--similar to Error_1.jpg I posted above. No solution.

What do you guys think?

Cheers!

Muanar

unread,
Jul 3, 2014, 12:48:56 AM7/3/14
to swat...@googlegroups.com
I just want to update that this problem is solved. Check-out https://groups.google.com/forum/#!topic/swat-cup/7MmKZKrIqOI

It was just a formatting error (caused by a comma in the observed values). I hope this helps other beginners like me making beginner's mistakes. 

Cheers!
Reply all
Reply to author
Forward
0 new messages