SWAT CUP calibration

3,774 views
Skip to first unread message

Paul Scholefield

unread,
Oct 10, 2013, 11:00:37 AM10/10/13
to swat...@googlegroups.com
Hi ,

We are trying to get a calibration in SWAT-CUP. We are using 21 years of climate inputs, and 7 years of hydrological data. There are 126 sub basins and 1486 HRUs.

weather data runs from 1990 to 2010.
Hydrology runs from  10_Jul_03 to 1_Apr_10.

We are not getting any behavioral solutions.
Any suggestion on how to achieve this welcome.

With thanks, Paul


PAR_inf.txt
16  : Number of Parameters (the program only reads the first 4 parameters or any number indicated here)
  100  : number of simulations
r__SURLAG.bsn    3   5
v__CN2.mgt    0   10
v__ALPHA_BF.gw    0   1
v__GW_DELAY.gw    20   40
v__GWQMN.gw    0   14
v__GW_REVAP.gw    0   1
v__ESCO.hru    0.5   1
r__OV_N.hru    0   1
r__RCHRG_DP.gw    0   2
r__REVAPMN.gw    0   5
v__CH_N2.rte    0   3
v__CH_K2.rte    0   70
r__SOL_AWC(1).sol    0   30
r__SOL_K(1).sol    0   1
r__SOL_BD(1).sol    0   1
r__CNCOEF.bsn    0   2

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

General Information/Watershed Configuration:
fig.fig
              21    | NBYR : Number of years simulated
            1990    | IYR : Beginning year of simulation
               1    | IDAF : Beginning julian day of simulation
             365    | 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
               1    | NRTOT: number of precip gage records used in simulation
               1    | 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
               1    | NTTOT: number of temp gage records used in simulation
               1    | NTGFIL: number of gage records in each tmp file
               1    | SLRSIM : Solar radiation simulation Code: 1=measured, 2=simulated
               1    | NSTOT: number of solar radiation records in slr file
               1    | RHSIM : relative humidity simulation code: 1=measured, 2=simulated
               1    | NHTOT: number of relative humidity records in hmd file
               1    | WINDSIM : Windspeed simulation code: 1=measured, 2=simulated
               1    | 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 fileof daily
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)
              13    | 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:
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
HRU data to be printed:
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
ATMOSPERIC DEPOSITION
ATMO.ATM
               0    | IPHR: print code for hourly output 0=no 1=yes (hourq.out)
               0    | 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)
               0    | IHUMUS: Print watqual.out file 0=no 1=yes (output.wql)
               0    | 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
               0    | 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.txt

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

FLOW_OUT_72   : 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    : a signal can be divided into small and large values. This is the value of separation (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
2458   : 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.

191 FLOWS_72_10_Jul_03_Average 0.716041667
192 FLOWS_72_11_Jul_03_Average 0.70075
193 FLOWS_72_12_Jul_03_Average 0.678552083
194 FLOWS_72_13_Jul_03_Average 0.6561875
195 FLOWS_72_14_Jul_03_Average 0.619072917
196 FLOWS_72_15_Jul_03_Average 0.647479167
197 FLOWS_72_16_Jul_03_Average 0.62075
198 FLOWS_72_17_Jul_03_Average 1.6528125
199 FLOWS_72_18_Jul_03_Average 6.574270833
200 FLOWS_72_19_Jul_03_Average 1.728125
201 FLOWS_72_20_Jul_03_Average 1.048552083
202 FLOWS_72_21_Jul_03_Average 0.903416667
203 FLOWS_72_22_Jul_03_Average 0.704510417
...
...
...
2633 FLOWS_72_17_Mar_10_Average 1.5796875
2634 FLOWS_72_18_Mar_10_Average 1.511145833
2635 FLOWS_72_19_Mar_10_Average 1.488854167
2636 FLOWS_72_20_Mar_10_Average 2.829375
2637 FLOWS_72_21_Mar_10_Average 3.665104167
2638 FLOWS_72_22_Mar_10_Average 3.069583333
2639 FLOWS_72_23_Mar_10_Average 3.903854167
2640 FLOWS_72_24_Mar_10_Average 5.626770833
2641 FLOWS_72_25_Mar_10_Average 4.768125
2642 FLOWS_72_26_Mar_10_Average 16.908125
2643 FLOWS_72_27_Mar_10_Average 6.274583333
2644 FLOWS_72_28_Mar_10_Average 3.891354167
2645 FLOWS_72_29_Mar_10_Average 4.445416667
2646 FLOWS_72_30_Mar_10_Average 12.78135417
2647 FLOWS_72_31_Mar_10_Average 35.58229167
2648 FLOWS_72_1_Apr_10_Average 13.18208333

Karim Abbaspour

unread,
Oct 10, 2013, 11:08:30 AM10/10/13
to swat...@googlegroups.com
pay more attention to the parameters, their qualifiers (a,v,r) and ranges.
I would not use v for CN2 and a range of 0 to 10 makes no sense. 
For spatial parameters use  r or a
for non-spatial parameters you can use  v  

Please read the section on parameterization in the swat-cup manual.
Best
Karim

-------------------------------------------------
Dr. K.C. Abbaspour
Eawag, Swiss Federal Institute for Aquatic Science and Technology
Ueberlandstr. 133, P.O. Box 611, 8600 Duebendorf, Switzerland
email: abba...@eawag.ch
phone: +41 44 823 5359
fax: +41 44 823 5375
http://www.eawag.ch/index_EN


--
You received this message because you are subscribed to the Google Groups "SWAT-CUP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swat-cup+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Paul Scholefield

unread,
Oct 10, 2013, 11:32:02 AM10/10/13
to swat...@googlegroups.com, Karim Abbaspour
Hi , we have set the parameters as you suggested.
I will run over night with 500 simulations. 

However we have the message below all week, with a range of parameters, and with the values and parameter values from the example file with SWATCUP.

C:\SWATWYRE\SWAT_CUP\FACER_10_10_13\FACER_10_10_13.Sufi2.SwatCup>SUFI2_goal_fn.exe
Could Not Find C:\SWATWYRE\SWAT_CUP\FACER_10_10_13\FACER_10_10_13.Sufi2.SwatCup\SUFI2.OUT\beh_*.*

C:\SWATWYRE\SWAT_CUP\FACER_10_10_13\FACER_10_10_13.Sufi2.SwatCup>SUFI2_new_pars.exe
Reading goal file
Cannot open input file    .. SUFI2.OUT/goal.txt

C:\SWATWYRE\SWAT_CUP\FACER_10_10_13\FACER_10_10_13.Sufi2.SwatCup>SUFI2_95ppu.exe

finished reading observation file
Cannot open input file SUFI2.OUT/FLOW_OUT_72.txt !

C:\SWATWYRE\SWAT_CUP\FACER_10_10_13\FACER_10_10_13.Sufi2.SwatCup>SUFI2_95ppu_beh.exe
Cannot open input file /SUFI2.OUT/no_beh_sims.txt
THIS IS NOT AN ERROR!!
There were no solutions with the objective function value >=  the behavioral threshold

C:\SWATWYRE\SWAT_CUP\FACER_10_10_13\FACER_10_10_13.Sufi2.SwatCup>rem 95ppu_NO_Obs.exe

Thanks, Paul

Karim Abbaspour

unread,
Oct 10, 2013, 11:39:40 AM10/10/13
to swat...@googlegroups.com
look at the files in Echo directory to see where may be an error....
run a few simulations first to see if all works before running 500 simulations.
check beginning ending simulation in extract files for correctness...

best Kairm
 
-------------------------------------------------
Dr. K.C. Abbaspour
Eawag, Swiss Federal Institute for Aquatic Science and Technology
Ueberlandstr. 133, P.O. Box 611, 8600 Duebendorf, Switzerland
email: abba...@eawag.ch
phone: +41 44 823 5359
fax: +41 44 823 5375
http://www.eawag.ch/index_EN

Paul Scholefield

unread,
Oct 10, 2013, 11:58:40 AM10/10/13
to swat...@googlegroups.com
Thanks Karim, I ran 5 simulations just now, but there are no files in the echo directory.

States simulations completed successfully, but no solutions. All extraction and observation data options are turned off. Only the objective function is active.

Thanks, Paul


--
You received this message because you are subscribed to a topic in the Google Groups "SWAT-CUP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swat-cup/4AmAfOOgfM4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swat-cup+u...@googlegroups.com.

Paul Scholefield

unread,
Oct 10, 2013, 12:59:48 PM10/10/13
to swat...@googlegroups.com, sco...@googlemail.com
Hi Karim,

Here is an echo of the extract_rch_SUFI2.cpp

----- Echo of extract_rch_SUFI2.cpp
----------------------------
---- Reading SUFI2_extract_rch.def --------------
swat file name=   output.rch
number of variables= 1
column number of variables=  7  
total reaches in the project= 126
number of reaches for variable 1=  1
reach numbers for variable 1 =  72  

total number of rchs to get=  1
beg_sim_year=  2003
end_sim_year=  2010
time_step=  1
--------------------------------------

---- Names of files of simulated variables:
file name 1= SUFI2.OUT/FLOW_OUT_72.txt

------- Reading observation file observed_rch.txt -----
---- total number of variables=  1
****   Time_Array   ***********

variable no. = 1 
   191   192   193   194   195   196   197   198   199   200   201   202   203   204   205   206   207   208   209   210   211
   212   213   214   215   216   217   218   219   220   221   222   223   224   225   226   227   228   229   230   231   232
   233   234   235   236   237   238   239   240   241   242   243   244   245   246   247   248   249   250   251   252   253
   254   255   256   257   258   259   260   261   262   263   264   265   266   267   268   269   270   271   272   273   274
   275   276   277   278   279   280   281   282   283   284   285   286   287   288   289   290   291   292   293   294   295
   296   297   298   299   300   301   302   303   304   305   306   307   308   309   310   311   312   313   314   315   316
   317   318   319   320   321   322   323   324   325   326   327   328   329   330   331   332   333   334   335   336   337
   338   339   340   341   342   343   344   345   346   347   348   349   350   351   352   353   354   355   356   357   358
   359   360   361   362   363   364   365   366   367   368   369   370   371   372   373   374   375   376   377   378   379
   380   381   382   383   384   385   386   387   388   389   390   391   392   393   394   395   396   397   398   399   400
   401   402   403   404   405   406   407   408   409   410   411   412   413   414   415   416   417   418   419   420   421
   422   423   424   425   426   427   428   429   430   431   432   433   434   435   436   437   438   439   440   441   442
   443   444   445   446   447   448   449   450   451   452   453   454   455   456   457   458   459   460   461   462   463
   464   465   466   467   468   469   470   471   472   473   474   475   476   477   478   479   480   481   482   483   484

echo_goal_fn.txt is empty

the other files look ok (oparameters etc, latin hyopercube sampling)

echo_new_pars.txt looks like this:

---------------- reading observed data -----------------------------
total number of variables=  1
obj fn type=  6

---- reading goal.txt

echo_95ppu.txt looks like:
--- echo of SUFI2_95ppu.CPP
--------------------------------------
Max size of arrays:
Max number of simulations=    50,000
Max number of observed data=  5,000
Max number of obs. variables= 30
Max number of parameters=     500
-------------------------------------

number of parameters=   16
number of simulation=   1
-------------------- Reading observed.pso --------------
total number of variables=  1
obj fn type=  6
behavioral threshold=  0.010000
FLOW_OUT_72.txt  
out_file=  SUFI2.OUT/tps_FLOW_OUT_72.txt
in_file=  SUFI2.OUT/FLOW_OUT_72.txt
file_name 1 = FLOW_OUT_72.txt
tps_file_name1=SUFI2.OUT/tps_FLOW_OUT_72.txt

and echo_95ppu_beh.txt:
echo of SUFI2_95ppu_beh.exe
--------------------------------------
Max size of arrays:
Max number of simulations=    50,000
Max number of observed data=   5,000
Max number of obs. variables=  30
Max number of parameters=     500
-------------------------------------



Thanks once again, Paul
------------------------------ -------------------
Dr. K.C. Abbaspour

Paul Scholefield

unread,
Oct 11, 2013, 6:38:31 AM10/11/13
to swat...@googlegroups.com

After 20 simulations, I run the post processor and this is what I get.:


 




risor

unread,
Oct 11, 2013, 7:08:26 AM10/11/13
to swat...@googlegroups.com
Do you have some gaps in your observed file? 

Paul Scholefield

unread,
Oct 11, 2013, 8:37:07 AM10/11/13
to swat...@googlegroups.com

Thanks Risor. There were no gaps. But I reformatted the input file from this:


191 FLOWS_72_10_Jul_03_Average 0.716041667
192 FLOWS_72_11_Jul_03_Average 0.70075
193 FLOWS_72_12_Jul_03_Average 0.678552083
194 FLOWS_72_13_Jul_03_Average 0.6561875
195 FLOWS_72_14_Jul_03_Average 0.619072917
196 FLOWS_72_15_Jul_03_Average 0.647479167
197 FLOWS_72_16_Jul_03_Average 0.62075
198 FLOWS_72_17_Jul_03_Average 1.6528125
199 FLOWS_72_18_Jul_03_Average 6.574270833
200 FLOWS_72_19_Jul_03_Average 1.728125

To this:

191FLOW_OUT_191_2003000.716
192FLOW_OUT_192_2003000.701
193FLOW_OUT_193_2003000.679
194FLOW_OUT_194_2003000.656
195FLOW_OUT_195_2003000.619
196FLOW_OUT_196_2003000.647






I am no longer getting the error. I have not changed any other input file. So the problem comes down to an untidy observed file, with too many digits ( possibly). 

Many thanks, Paul













Rim

unread,
Dec 21, 2013, 1:03:31 AM12/21/13
to swat...@googlegroups.com
Dear Karim

I installed SWAT-CUP and my platform looks as print screen attached..

Does it mean I have to purchase something to use SWAT-CUP?  I thought it is  a free software, please kindly advise so that I am clear regarding what to install.  In the end I want to use SWAT-CUP for all four purposes as described in your manual which is in the help menu, with ArcSWAT.

Also what is the difference between SWAT-CUP and SWAT-CUP4?  Which would you recommend that I install?

Many thanks




SWAT-CUP Modules Activation Guide

If you did not purchase yet:

To activate a SWAT-CUP module you need to purchase it first, to do this you need to go to "License and Activation" section and click on the "Purchase Modules Online" command, this command will take you to our website and you can order your license online.

If you already purchased:

If you did not request the Activation Key for a specific machine yet:
To request a unique activation key for a machine you need to install a copy of SWAT-CUP on that machine and then go to "License and Activation" section and click on the "Request Activation Key", then select the module you have purchased and go to next step, in the next step you will find a Hardware ID that must be send to our activation mail address specified there.
Important note: You must send this activation request with your email address which you registered before while purchasing the product, this email address is your User ID, which identifies you as a valid customer.

If you already received the Activation Key File:
It is a simple step: You just need to go to "License and Activation" section and click on the "Activation Module" command, then you can browse the activation key file you received by mail before.

SWAT-CUP activation.docx

Liem, Nguyen Duy

unread,
Dec 21, 2013, 1:41:01 AM12/21/13
to swat...@googlegroups.com
Dear Rim,

I think if you would like to use Parallel Processing module (for calibration, validation faster), you must purchase and active license. If not, you can use SWAT-CUP normally (without Parallel Processing module), no need active.

Liem


2013/12/21 Rim <ig44...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "SWAT-CUP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swat-cup+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--


Nguyễn Duy Liêm
Bộ môn Tài nguyên & GIS,
Khoa Môi trường & Tài nguyên,
Trường Đại học Nông Lâm TP. HCM.
Địa chỉ: phường Linh Trung, quận Thủ Đức, Tp. HCM, Việt Nam
Website:  http://gis.hcmuaf.edu.vn/ 
Email: nguyen...@gmail.com
          nguyen...@yahoo.com
Mobile: (+84) 0983-613-551

Nguyen Duy Liem
Department of Natural Resources and GIS, 
Faculty of Environment and Natural Resources
Nong Lam University- Ho Chi Minh City.
Address: Linh Trung Ward, Thu Duc District, Ho Chi Minh City, Vietnam.
          nguyen...@yahoo.com

ig445578

unread,
Dec 21, 2013, 3:30:53 AM12/21/13
to swat...@googlegroups.com
Many thanks Liem.

It makes sense.

Regards

Rim


--
You received this message because you are subscribed to a topic in the Google Groups "SWAT-CUP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swat-cup/4AmAfOOgfM4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swat-cup+u...@googlegroups.com.

Dan Li

unread,
Jun 27, 2014, 5:34:40 AM6/27/14
to swat...@googlegroups.com
Although I change OBSERVED.txt just like Paul, the error still happen.

在 2013年10月10日星期四UTC+8下午11时00分37秒,Paul Scholefield写道:

Camila Guimaraes

unread,
Nov 25, 2015, 7:38:45 AM11/25/15
to SWAT-CUP, k_abb...@yahoo.com
Dear Karim,
I am facing  the same problem. .
that is what I have on my Echo directory. 
I simulated from 2010 to 2015, 2 years of warm up. 
can you help me out?
thanks!
Camila
Echo.zip
Reply all
Reply to author
Forward
0 new messages