Error in SWAT-CUP Simulation, Needs Help

1,867 views
Skip to first unread message

Iswor Bajracharya

unread,
May 1, 2014, 6:21:49 AM5/1/14
to swat...@googlegroups.com

Dear sir,

I am new to the SWAT-CUP.I made a SWAT model in MWSWAT successfully using 7 years weather data from 2001 to 2007. The purpose of this model is to use in Hydropower potential estimation. After reading the SWAT-CUP user guide, I could successfully run the example model provided in SWAT-CUP. However, when I run my own SWAT model to calibrate in SWAT-CUP, I got stuck with the problem. Every time I run the model, I got the following error at the very first simulation and program run indefinitely.

                                 forrtl: error(72):floating overflow

Program reading from file.cio . . . executing 
Executing year    1 

forrtl: error (72): floating overflow 
Image              PC                                           Routine            Line                    Source 
swat.exe       0000000013FAABAF6                Unknown        Unknown          Unknown
swat.exe       0000000013FAF08D7                Unknown        Unknown          Unknown
swat.exe       0000000013FAD3C6E                Unknown        Unknown          Unknown
swat.exe       0000000013FA88443                 Unknown        Unknown          Unknown
swat.exe       0000000013FA21EFC                Unknown        Unknown          Unknown
swat.exe       0000000013FC9009C                 Unknown        Unknown          Unknown
swat.exe       0000000013FC5F4D2                 Unknown        Unknown          Unknown

swat.exe       0000000013FC5F3DE                Unknown        Unknown          Unknown

kernel132.dll    0000000076F8652D                 Unknown        Unknown          Unknown

ntdll.dll          00000000771BC541                  Unknown        Unknown          Unknown

variable#1

I tried to sort it out myself and tried all my best .But I could not fix it out. I have attached the error file herewith.I am using monthly data for my model calibration:

                Model run in MWSWAT: 2001 to 2007

                Warm up period: 2001 to 2003

                Calibration period :2003 to 2005

                Validation period: 2005 to 2007

 I could not move ahead due to this problem. I want to solve this problem and finish my thesis on time. I am running out of time now.

 I would like to get valuable suggestions from all who are experienced in using SWAT_CUP.

All the helps will be highly appreciated and regarded.

Thanking you in advance .

1) Par_inf.text

4  : Number of Parameters (the program only reads the first 4 parameters or any number indicated here)

5  : number of simulations

 

 

r__CN2.mgt            -0.2       0.2

v__ALPHA_BF.gw             0.0       1.0

v__GW_DELAY.gw               30.0      450.0

v__GWQMN.gw                0.0       2.0

 

-----------------

2) SUFI2_SwEdit.def

1        : starting simulation number

5      : ending simulation number

3)Observed_rch.txt

4     : number of observed variables

 

FLOW_OUT_597   : this is the name of the variable and the subbasin number to be included in the objective function

36   : 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_2003   141

.

.

10    FLOW_OUT_10_2003  553

11    FLOW_OUT_11_2003  321

12    FLOW_OUT_12_2003  237

.

.

36    FLOW_OUT_12_2005  221

 

FLOW_OUT_548   : this is the name of the variable and the subbasin number to be included in the objective function

36   : 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_2003   31.1

..

..

36    FLOW_OUT_12_2005  72.33

 

FLOW_OUT_444   : this is the name of the variable and the subbasin number to be included in the objective function

36  : 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_2003   12.4

2     FLOW_OUT_2_2003   8.84

3     FLOW_OUT_3_2003   7.08

4     FLOW_OUT_4_2003   13.3

5     FLOW_OUT_5_2003   11.8.....

 

FLOW_OUT_411   : this is the name of the variable and the subbasin number to be included in the objective function

36   : 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_2003   120.2

2     FLOW_OUT_2_2003   105.3

3     FLOW_OUT_3_2003   101

4     FLOW_OUT_4_2003   95.6..........

 

4) File.Cio

 

Master Watershed File: file.cio

Project Description:

General Input/Output section (file.cio):

5/1/2014 12:00:00 AM ARCGIS-SWAT interface AV

 

General Information/Watershed Configuration:

fig.fig

               7    | NBYR : Number of years simulated

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

              22    | NRTOT: number of precip gage records used in simulation

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

              22    | NTTOT: number of temp gage records used in simulation

              22    | NTGFIL: number of gage records in each tmp file

               1    | SLRSIM : Solar radiation simulation Code: 1=measured, 2=simulated

              22    | NSTOT: number of solar radiation records in slr file

               1    | RHSIM : relative humidity simulation code: 1=measured, 2=simulated

              22    | NHTOT: number of relative humidity records in hmd file

               1    | WINDSIM : Windspeed simulation code: 1=measured, 2=simulated

              22    | 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:

               0    | IPRINT: print code (month, day, year)

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

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

 

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

 

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

 

4              : number of reaches (subbasins) to get for the first variable

597  548  444  411  : reach (subbasin) numbers for the first variable (ordered)

2003           : beginning year of simulation not including the warm up period

2007           : end year of simulation

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

 

6) Var_file_rch.txt

FLOW_OUT_597.txt

FLOW_OUT_548.txt

FLOW_OUT_444.txt

FLOW_OUT_411.txt

 

7)Var_file_name.txt

FLOW_OUT_597.txt

FLOW_OUT_548.txt

FLOW_OUT_444.txt

FLOW_OUT_411.txt

 

8) Observed.txt

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

 

FLOW_OUT_597   : 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

36   : 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_2003   141

2     FLOW_OUT_2_2003   122

3     FLOW_OUT_3_2003   111

..........................

35    FLOW_OUT_11_2005  314

36    FLOW_OUT_12_2005  221

 

FLOW_OUT_548   : 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

36   : 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_2003   31.1

2     FLOW_OUT_2_2003   24.7

...........................

35    FLOW_OUT_11_2005  123

36    FLOW_OUT_12_2005  72.3

 

 

FLOW_OUT_444   : 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

36   : 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_2003   12.4

2     FLOW_OUT_2_2003   8.84

.............................

35    FLOW_OUT_11_2005  44.9

36    FLOW_OUT_12_2005  16.5

 

 

FLOW_OUT_411   : 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

36    : 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_2003   120.2

2     FLOW_OUT_2_2003   105.3

............................

35    FLOW_OUT_11_2005  141

36    FLOW_OUT_12_2005  93.


Sincerely 

Iswor 

Karim Abbaspour

unread,
May 1, 2014, 12:22:36 PM5/1/14
to swat...@googlegroups.com
... first of all the problem is with you swat model. Make sure swat runs first before trying to calibrate it. Then there is a problem with the order of variable 597  548  444  411 the extract program does not read output.rch file from the end. Also, reverse the order in the observed files, and the name files.
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/d/optout.


Iswor Bajracharya

unread,
May 1, 2014, 2:33:13 PM5/1/14
to swat...@googlegroups.com
Dear sir , 

First of all , I would like to thank you very much for your answer.  I could not spot the error in my SWAT model because when I run it in SWAT-Editor , it runs perfectly . I ran the model several times in SWAT-editor and no error was detected. Could you please let me know the problem in my SWAT model? 

I would be very grateful to you . 

Thanking you. 

Sincerely 
Iswor
<p class="MsoNormal" style="margin-bottom:0in;margin-bot
...

Karim

unread,
May 1, 2014, 3:28:37 PM5/1/14
to swat...@googlegroups.com
Run swat.exe in your swatcup project from command line see if it runs...
--

Iswor Bajracharya

unread,
May 2, 2014, 2:26:49 AM5/2/14
to swat...@googlegroups.com
Dear sir , 

Thank you very much again for your suggestion. I ran swat.exe in my SWAT-CUP project  from command line and the same error message appeared " forrtl: error(72): floating overflow" .  Is this means that my SWAT model is wrong? But it runs perfectly in SWAT-editor without detecting error.

Sincerely 
Iswor

Karim

unread,
May 2, 2014, 2:52:28 AM5/2/14
to swat...@googlegroups.com
Copy all files from the backup directory (which should be the same as those in the txtinout) into your swat-cup project directory. Perhaps a file is corrupted...

Iswor Bajracharya

unread,
May 2, 2014, 9:59:32 AM5/2/14
to swat...@googlegroups.com
Dear sir , 

Thank you so much for your suggestion. But still the same problem .............. I am totally frustrated . 


Sincerely 
Iswor 

Mehedi Hasan

unread,
May 6, 2014, 4:23:10 PM5/6/14
to swat...@googlegroups.com
Dear,  Iswor Bajracharya,
I am facing the same problem like you. Would you like to tell me how to solve the problem?

Best
Mehedi

Dip

unread,
May 12, 2014, 2:05:46 AM5/12/14
to swat...@googlegroups.com
Mehedi send me your SWATCUP project as zip file, I can have a look on it.

mano...@gmail.com

unread,
May 23, 2014, 1:52:41 AM5/23/14
to swat...@googlegroups.com
Dear Iswor,

I think the problem is with the redundancy of year 2003. Put warm up: 2001-2002 and calibration: 2003-2005. dont put the same year twice in different period. 

Cheers
<p class="MsoNormal" style="margin-bottom:0in;margin-bot
...
Reply all
Reply to author
Forward
0 new messages