Error running SWAT

1,450 views
Skip to first unread message

sam_dc

unread,
Jul 26, 2013, 12:40:37 PM7/26/13
to swat...@googlegroups.com
Dear SWAT users,
I am new user to swat in general and SWAT_CUP in specific. I am trying to calibrate my model based on three year of observed data. Every time I run SWAT the model entered in an endless loop. The run never finished. Any advise or help would be highly appreciated as I am completly stuck now

My input files are as follows:

File.CIO
General Information/Watershed Configuration:
fig.fig
               5    | NBYR : Number of years simulated
            1996    | IYR : Beginning year of simulation
               1    | IDAF : Beginning julian day of simulation
             274    | IDAL : Ending julian day of simulation

observed_rch.txt
1     : number of observed variables

FLOW_OUT_1   : this is the name of the variable and the subbasin number to be included in the objective function
1095   : 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.

1 FLOW_OUT_1_1998 1.0639
2 FLOW_OUT_2_1998 0.9187
3 FLOW_OUT_3_1998 2.3642
4 FLOW_OUT_4_1998 1.7009
5 FLOW_OUT_5_1998 7.8682
6 FLOW_OUT_6_1998 15.0505
7 FLOW_OUT_7_1998 1.6542
8 FLOW_OUT_8_1998 1.2292
9 FLOW_OUT_9_1998 1.1814
''''
;
;
;
1092 FLOW_OUT_362_2000 2.8738
1093 FLOW_OUT_363_2000 2.8738
1094 FLOW_OUT_364_2000 2.8738
1095 FLOW_OUT_365_2000 2.8738

VAR_FILE_RCH.txt
FLOW_OUT_1.txt

SUFI_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)

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

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


1998           : beginning year of simulation not including the warm up period
2000           : end year of simulation

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

/**** Remark (based on a full output)
column_no=  7    FLOW_OUT    (m3/s)
column_no=  11   SED_OUT    (tn)
column_no=  12   SEDCONC    (mg/kg)
column_no=  16   ORGP_OUT   (kg)
column_no=  18   NO3_OUT    (kg)
column_no=  48   TOT_N      (kg)
column_no=  49   TOT_P      (kg)
column_no=  50   NOC_CONC   (Mg/l)

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.5   : min value of objective function threshold for the behavioral solutions

FLOW_OUT_1   : 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
1095  : 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.

1 FLOW_OUT_1_1998 1.0639
2 FLOW_OUT_2_1998 0.9187
3 FLOW_OUT_3_1998 2.3642
4 FLOW_OUT_4_1998 1.7009
5 FLOW_OUT_5_1998 7.8682
6 FLOW_OUT_6_1998 15.0505
7 FLOW_OUT_7_1998 1.6542
8 FLOW_OUT_8_1998 1.2292
9 FLOW_OUT_9_1998 1.1814
;
;
;
1092 FLOW_OUT_362_2000 2.8738
1093 FLOW_OUT_363_2000 2.8738
1094 FLOW_OUT_364_2000 2.8738
1095 FLOW_OUT_365_2000 2.8738

var_file_name.txt
FLOW_OUT_1.txt

Error Message

Inline image 1


image.png

Karim

unread,
Jul 26, 2013, 2:50:10 PM7/26/13
to swat...@googlegroups.com
You should simulate from beginning to the end of the year, don't stop at day 274. Swatcup has problems with this!
In the next versions I try to make this flexible. 
Best, Karim
<image.png>


--
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.
 
 

aggie...@gmail.com

unread,
Jul 26, 2013, 5:18:14 PM7/26/13
to swat...@googlegroups.com
Dear Karim,
First, many thanks for your response. Second, I changed the end of the simulation to be the end of the year 365 but unfortunately that didn't help. SWAT_CUP_SUFI2 continued to run in an open loop. It did simulation #1 and that's it never move to simulation #2.
Could you please advise in this matter.

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

General Information/Watershed Configuration:
fig.fig
               5    | NBYR : Number of years simulated
            1996    | IYR : Beginning year of simulation
               1    | IDAF : Beginning julian day of simulation
             365    | IDAL : Ending julian day of simulation
Climate:


Thanks

Karim

unread,
Jul 26, 2013, 5:22:23 PM7/26/13
to swat...@googlegroups.com
Year 2000, end of simulation, is a leap year and should gave 366 days in file.cio. Also, in your climate files you need to have data until 2000366.
Best, Karim

aggie...@gmail.com

unread,
Jul 26, 2013, 6:03:00 PM7/26/13
to swat...@googlegroups.com
I updated my file.Cio file to account for the leap year "366" days. I also updated the observed.txt and observed_rch.txt but problem still exists. I tested another scenario by having observed data only for years 1998 and 1999. I updated input files accordingly to end by 365 instead of 366 day this time and problem still exists.  
The run enters an open loop and never ends.

Regarding the climate data, the original run I have in SWAT was for 26 years starting in 1987 and ending in 2012. Both pcp and tmp files have data up to year 2012 therefore I do have climate data to cover the observed period.

Karim

unread,
Jul 27, 2013, 3:36:08 AM7/27/13
to swat...@googlegroups.com
... zip your project and send it to me to have a look...
Best, Karim
Message has been deleted

aggie...@gmail.com

unread,
Aug 1, 2013, 4:16:43 PM8/1/13
to swat...@googlegroups.com
Many thanks Dr. Karim for your comment. I had to update IPRINT in file.cio to match the output defined in swat_cup. After this update the run went correct..Thank you again. 

yudan1...@gmail.com

unread,
Sep 11, 2013, 5:55:58 AM9/11/13
to swat...@googlegroups.com
 Does it have to simulate integral year from the begining  day to the end day such as 1 year,2 years,3years....in swatcup? If I only want to simulate 3 months, then it can't work correctly, right?

在 2013年7月27日星期六UTC+8上午2时50分10秒,k_abb...@yahoo.com写道:

Karim Abbaspour

unread,
Sep 11, 2013, 6:04:46 AM9/11/13
to swat...@googlegroups.com
yes, for now, you have to simulate the whole year...
Best, Karim 




From: "yudan1...@gmail.com" <yudan1...@gmail.com>
To: swat...@googlegroups.com
Sent: Wednesday, September 11, 2013 11:55 AM
Subject: Re: Error running SWAT

yudan1...@gmail.com

unread,
Sep 11, 2013, 6:59:52 AM9/11/13
to swat...@googlegroups.com, Karim Abbaspour
Then the SWAT model is not capable of simulating the floods event. It seems that the model is suitable for continuous and  long term simulation. Right?
在 2013年9月11日星期三UTC+8下午6时04分46秒,k_abb...@yahoo.com写道:

Karim Abbaspour

unread,
Sep 11, 2013, 7:10:28 AM9/11/13
to swat...@googlegroups.com
why? Don't see the connection there....
 



Cc: Karim Abbaspour <k_abb...@yahoo.com>
Sent: Wednesday, September 11, 2013 12:59 PM

yudan1...@gmail.com

unread,
Sep 13, 2013, 1:32:52 AM9/13/13
to swat...@googlegroups.com, Karim Abbaspour
The flood events usually occur in just a few months in one year. I  just want to  simulate the flood period.I can achieve this purpose in other hydrological model such as HEC-HMS.But I can't do that in SWAT model as mentioned above that I can't just calibrate a few months.
 
在 2013年9月11日星期三UTC+8下午7时10分28秒,k_abb...@yahoo.com写道:

Karim Abbaspour

unread,
Sep 13, 2013, 6:01:00 AM9/13/13
to yudan1...@gmail.com, swat...@googlegroups.com
well, simulate a year and just look at those few months....anyhow you need to have a few months/years of warm up period.
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


Sent: Friday, September 13, 2013 7:32 AM

Subject: Re: Error running SWAT
Reply all
Reply to author
Forward
0 new messages