Exception error while trying to calibrate .bsn file

482 views
Skip to first unread message

Katie Merriman

unread,
Jul 24, 2015, 11:52:16 AM7/24/15
to SWAT-CUP
Hello,
Whenever I add .bsn parameters to SWAT-CUP, I get "Error: An Exception happened while editing parameter number 4"
I don't think I have the  format wrong as I copied and pasted from an example, here is what I am using:


v__SFTMP.bsn    -2   0
v__SMTMP.bsn    0   2.5
v__SMFMX.bsn    3   4.5
v__SMFMN.bsn    1   3
v__TIMP.bsn    0.01   1

thanks!
Katie

Abbaspour, Karim

unread,
Jul 24, 2015, 11:55:25 AM7/24/15
to <swat-cup@googlegroups.com>
Make sure they are all in your Absolute parameter files.
Karim


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

Katie Merriman

unread,
Jul 24, 2015, 12:15:38 PM7/24/15
to swat...@googlegroups.com
Thanks for your quick reply.  However, these parameters were already in the Absolute_SWAT_Values.txt file
any other suggestions?

--
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/wjP76YhGWvA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swat-cup+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Katie Merriman

Abbaspour

unread,
Jul 24, 2015, 12:40:07 PM7/24/15
to swat...@googlegroups.com
I run without any problem. Do you have the latest version of the program?
Are those the only parameters in the par_inf file?


Katie Merriman

unread,
Jul 24, 2015, 12:48:57 PM7/24/15
to swat...@googlegroups.com
Dr. Karim,
I have tried both with and without the .bsn parameters.  I get the exception error only with .bsn parameters.  I have tried other parameters, other than just the sno ones, from .bsn and they fail as well.  I am using version 5.1.6.2 with 64-bit and SWAT2012.

Abbaspour, Karim

unread,
Jul 24, 2015, 12:55:42 PM7/24/15
to <swat-cup@googlegroups.com>
That does not make much sense! Do you have a basin file in the project?! Else send me all your project to have a look.

Katie Merriman

unread,
Jul 24, 2015, 5:57:01 PM7/24/15
to swat...@googlegroups.com
yes I have a basin file; however, it was empty.  It appears that many of my files were not properly copied over when the SWAT-CUP project folder was made.  I have 103 subbasins, and it looks like there only 72 of the subbasins were copied.  I recopied my SWAT TxtInOut directory into the SWAT-CUP folder and the problem appears to be solved for the moment.
Does SWAT-CUP have an HRU or any other size limit?

Abbaspour, Karim

unread,
Jul 24, 2015, 6:00:01 PM7/24/15
to <swat-cup@googlegroups.com>
Has a limit but it is in the tens of thousands.. 
Karim


Katie Merriman

unread,
Jul 27, 2015, 3:16:00 PM7/27/15
to swat...@googlegroups.com
I have 28,000 HRUs. I didn't think that should be a problem.
I am still having problems, however, as my SWAT-CUP run for 1 simulation and then hangs and doesn't finish or calculate statistics. It sat here at this point all weekend.  What do I need to check?
Inline image 1

Abbaspour

unread,
Jul 27, 2015, 4:45:58 PM7/27/15
to swat...@googlegroups.com
This problem is usually caused by wrong timing between swat and swatcup or wrong number of observation in observed_rch file. Check files in Echo for a clue.
Karim


Katie Merriman

unread,
Jul 30, 2015, 12:48:41 PM7/30/15
to swat...@googlegroups.com
Thank you I did have an error in the format of the observed data.
 i am still trying to get this working correctly, so I'm only running 1 simulation with a daily timestep. I have only values of 0 populate the simulated column of the best_sim.txt. I don't think my reach was extracted from the .rch file. I was only trying to look at rch 55, however, my FLOW_OUT_55. txt in the SUFI2.OUT folder only has a "1" printed in it. My output.rch file is not empty, so I am baffled as to what is going on now.
My warm-up period is 2000-2002, and I am running from 2003-2014.  My observed data I am using begins in 2012-2014, but eventually I want to add in another downstream gage that has data 2003-2007, but want to get this figured out first before adding more complications.  I have listed my inputs below the screen shot.

Inline image 1

Observed_rch.txt:
1     : number of observed variables
5     : 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_55   : this is the name of the variable and the subbasin number to be included in the objective function
1015   : 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.

3277 FLOW_OUT_355_2011 0.2598
3278 FLOW_OUT_356_2011 0.2541
3279 FLOW_OUT_357_2011 0.2654
3280 FLOW_OUT_358_2011 0.2174
....

var_file_rch.txt:
FLOW_OUT_55.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)

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

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


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

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

Observed.txt:
1     : number of observed variables
5     : 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_55   : 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
1015   : 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.

3277 FLOW_OUT_355_2011 0.2598
3278 FLOW_OUT_356_2011 0.2541
3279 FLOW_OUT_357_2011 0.2654
3280 FLOW_OUT_358_2011 0.2174

var_file_name.txt:
FLOW_OUT_55.txt

Abbaspour, Karim

unread,
Jul 30, 2015, 1:41:55 PM7/30/15
to <swat-cup@googlegroups.com>
You have an old version of the program, but still it should work. Send file.cio to have a look.
Karim


<image.png>



--
Katie Merriman

image.png

Katie Merriman

unread,
Jul 30, 2015, 1:49:00 PM7/30/15
to swat...@googlegroups.com
I just downloaded off the SWAT website 2-3 weeks ago?  there is a newer version?

file.cio

Abbaspour, Karim

unread,
Jul 30, 2015, 1:53:35 PM7/30/15
to <swat-cup@googlegroups.com>
 No, but perhaps you opened an old project with it. It is best to build a new project and transfer your data from the old to the new project.... It takes just a few copy pastes
Karim 


<file.cio>

Katie Merriman

unread,
Jul 30, 2015, 1:58:58 PM7/30/15
to swat...@googlegroups.com
No, I did not copy an old SWAT-CUP project - I built a new SWAT-CUP project with the new version. I did copy and paste my files from my SWAT project in the SWAT-CUP file because it did not appear to copy all the files. I have 103 subbasins and it stopped copying at subbasin 71. Could this cause the error?

I sent my file.cio with the last email.

Abbaspour, Karim

unread,
Jul 30, 2015, 2:06:42 PM7/30/15
to swat...@googlegroups.com

If you give the address of txtinout the program should copy everything. If it didn’t, then something is not correct. Your inputs appear to be correct, but I don’t know why you have to simulate from 2003 (already have 3 years warm up period), but you only have data from 2011?

Karim

Katie Merriman

unread,
Jul 30, 2015, 3:23:56 PM7/30/15
to swat...@googlegroups.com
My observed data begins in 2012-2014, but eventually I want to add in another downstream gage that has data 2003-2007. I started with the longer simulation period, because I was concerned about keeping consistency btw date/time w/SWAT runs. I was running SWAT for this longer period (2000-2014).  I will try to create a new SWAT-CUP project with just the shorter time period.


Abbaspour, Karim

unread,
Jul 30, 2015, 3:30:13 PM7/30/15
to <swat-cup@googlegroups.com>
Ok, but this is not the problem. If it did not work out send me the project to have a look.
Karim



On Jul 30, 2015, at 21:24, Katie Merriman <katie.m...@gmail.com> wrote:

My observed data begins in 2012-2014, but eventually I want to add in another downstream gage that has data 2003-2007. I started with the longer simulation period, because I was concerned about keeping consistency btw date/time w/SWAT runs. I was running SWAT for this longer period (2000-2014).  I will try to create a new SWAT-CUP project with just the shorter time period.


On Thu, Jul 30, 2015 at 1:06 PM, Abbaspour, Karim <Karim.A...@eawag.ch> wrote:

If you give the address of txtinout the program should copy everything. If it didn’t, then something is not correct. Your inputs appear to be correct, but I don’t know why you have to simulate from 2003 (already have 3 years warm up period), but you only have data from 2011?

Karim

 

 

 

From: swat...@googlegroups.com [mailto:swat...@googlegroups.com] On Behalf Of Katie Merriman
Sent: Thursday, July 30, 2015 7:59 PM
To: swat...@googlegroups.com
Subject: Re: Exception error while trying to calibrate .bsn file

 

No, I did not copy an old SWAT-CUP project - I built a new SWAT-CUP project with the new version. I did copy and paste my files from my SWAT project in the SWAT-CUP file because it did not appear to copy all the files. I have 103 subbasins and it stopped copying at subbasin 71. Could this cause the error?

 

I sent my file.cio with the last email.

On Thu, Jul 30, 2015 at 12:53 PM, Abbaspour, Karim <Karim.A...@eawag.ch> wrote:

 No, but perhaps you opened an old project with it. It is best to build a new project and transfer your data from the old to the new project.... It takes just a few copy pastes

Karim 


On Jul 30, 2015, at 19:49, Katie Merriman <katie.m...@gmail.com> wrote:

I just downloaded off the SWAT website 2-3 weeks ago?  there is a newer version?

 

On Thu, Jul 30, 2015 at 12:41 PM, Abbaspour, Karim <Karim.A...@eawag.ch> wrote:

You have an old version of the program, but still it should work. Send file.cio to have a look.

Karim


On Jul 30, 2015, at 18:48, Katie Merriman <katie.m...@gmail.com> wrote:

Thank you I did have an error in the format of the observed data.

 i am still trying to get this working correctly, so I'm only running 1 simulation with a daily timestep. I have only values of 0 populate the simulated column of the best_sim.txt. I don't think my reach was extracted from the .rch file. I was only trying to look at rch 55, however, my FLOW_OUT_55. txt in the SUFI2.OUT folder only has a "1" printed in it. My output.rch file is not empty, so I am baffled as to what is going on now.

My warm-up period is 2000-2002, and I am running from 2003-2014.  My observed data I am using begins in 2012-2014, but eventually I want to add in another downstream gage that has data 2003-2007, but want to get this figured out first before adding more complications.  I have listed my inputs below the screen shot.

 

<image001.png>



 

--

Katie Merriman

 

<file.cio>



 

--

Katie Merriman

 




--
Katie Merriman

image001.png
Reply all
Reply to author
Forward
0 new messages