SWAT-CUP error for validation - stuck to variable#1

645 views
Skip to first unread message

Flora Mer

unread,
Feb 7, 2019, 8:10:22 AM2/7/19
to SWAT-CUP
Hi all, 
Hi Karim,

To validate my calibrated model, I changed the following:
- File.cio: Nbyr = 5 years ==> I would like to validate with the period time 1995-1999
- observed_rch and observed ==> I put the flow data of the period time I want to validate
- I used the same par_inf parameters as my last calibration 

When I ran this iteration, it is stuck to variable#1 . See the attached file "error-swatcup-stuck-variable1".
I had a look at the file in Echo. But could not find the error. The only think is that the "echo_extract_rch" is empty... But I re-check my flow data and it looks fine to me..
What am I doing wrong? Any clue?

Thanks a lot for your help !
Flora 
observed_rch.txt
observed.txt
var_file_name.txt
var_file_rch.txt
par_inf.txt
error-swatcup-stuck-variable1.JPG
file.cio
SUFI2_swEdit.def

Karim Abbaspour

unread,
Feb 7, 2019, 9:08:01 AM2/7/19
to swat...@googlegroups.com
extract file?

5       | NBYR : Number of years simulated
1995    | IYR : Beginning year of simulation
..........
........
5    | NYSKIP: number of years to skip output printing/summarization

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.


--

Best Regards,

Flora Mer

unread,
Feb 7, 2019, 9:11:18 AM2/7/19
to swat...@googlegroups.com
Hi Karim,

Thanks for your answer. I don't understand your question "extract file"?
The lines you copied/pasted are correct. 
What do I need to do?
Thanks!




Flora Mer
Tel: +598 92 78 45 13
Skype: flora.mer

Flora Mer

unread,
Feb 7, 2019, 9:12:39 AM2/7/19
to swat...@googlegroups.com
Here is the extract rch file 

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)

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

3              : number of reaches (subbasins) to get for the first variable
25  39  46        : reach (subbasin) numbers for the first variable


1995           : beginning year of simulation not including the warm up period
1999           : end year of simulation

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



Flora Mer
Tel: +598 92 78 45 13
Skype: flora.mer

SUFI2_extract_rch.def

Karim Abbaspour

unread,
Feb 7, 2019, 9:16:35 AM2/7/19
to swat...@googlegroups.com
I meant you did not upload the extract_rch.def file.

The lines I copied mean you are simulating from 1995 to 1999 and you are skipping them! It means swat is not writing anything in the output files. 
Look up the meaning of NYSKIP.

Karim

Flora Mer

unread,
Feb 7, 2019, 9:21:30 AM2/7/19
to swat...@googlegroups.com
Hi Karim,

I got it ! 
I changed in the file.cio the following to simulate validation between 1995-1999.
10       | NBYR : Number of years simulated
1990    | IYR : Beginning year of simulation

It seems running..
Thanks

Flora Mer

unread,
Feb 8, 2019, 3:53:31 AM2/8/19
to swat...@googlegroups.com
Dear Karim,

So, I ran the simulation based on the file I sent above and the new file.cio which I corrected - see attached the new one. 
However, running the SUFI2_post.bat I had an error in number 476. See attached the message error and the echo_goal_fn file. I also had other echo files. 
Do you have an idea about this error? I checked again observed flow data and numbers and it seems allright... 
I ran one simulation to try and it worked...
Thanks again for your help..
Best
Flora







echo_goal_fn.txt
error-swatcup-simulation number 476.JPG
file.cio
echo_new_pars.txt
Echo_make_par.txt
echo_LH_sample.txt
echo_extract_rch.txt

Karim Abbaspour

unread,
Feb 8, 2019, 4:12:46 AM2/8/19
to swat...@googlegroups.com
look in the output folder and see if the output files have 500 simulations in them or not. 

Karim

Flora Mer

unread,
Feb 8, 2019, 4:16:10 AM2/8/19
to swat...@googlegroups.com
I think so.
In the goal.txt of the calibration output, it is written no_sims = 500.
image.png


Karim Abbaspour

unread,
Feb 8, 2019, 4:22:21 AM2/8/19
to swat...@googlegroups.com
in SUFI2.OUT folder, check FLOW_OUT_25.txt file and see if there are 500 simulation there.


Flora Mer

unread,
Feb 8, 2019, 5:21:44 AM2/8/19
to swat...@googlegroups.com

Yes there are 500 simulations. Attached are the 3 FLOW txt files from SUFI2.OUT folder.


FLOW_OUT_39.txt
FLOW_OUT_25.txt
FLOW_OUT_46.txt

Karim Abbaspour

unread,
Feb 8, 2019, 5:35:10 AM2/8/19
to swat...@googlegroups.com
 475 
1  1.251000e+000
2  1.067000e+001
3  2.545000e+001
4  1.091000e+001
5  4.867000e+000
6  3.555000e+001
7  4.977000e+001
8  9.499000e+000
46  3.700000e+000
47  2.230000e+001
48  1.575000e+001
49  1.570000e+001
50  5.728000e+001
51  2.426000e+001
52  8.922000e+000
53  7.009000e+000
55  7.617000e+001
56  3.252000e+001
57  3.178000e+001
58  3.606000e+000
59  1.750000e+000
60  1.154000e+000
   477 
1  1.851000e+000
2  1.238000e+001

here you see that simulation 476 is missing, as the error message said.
The reason could be a bad combination of parameters causing swat crash. 
You can add in the output files, simulation 476, by copying the simulation 475 and calling it 476.
Then the post processing will run.
Karim




Flora Mer

unread,
Feb 8, 2019, 5:44:03 AM2/8/19
to swat...@googlegroups.com
Thanks a lot Karim ! Indeed I copied/pasted the 475 and renamed it 476 for the 3 flow data files and it worked! 
Now, I have my validation results but not sure there are that great...See attached the summary stat. 
It will be nice to have your opinion.
Thanks again
Flora 

summary_stat.txt

Flora Mer

unread,
Feb 8, 2019, 6:08:38 AM2/8/19
to swat...@googlegroups.com
I share with you the calibration results I had to compare with validation. See attached.
Thanks again!


summary_stat.txt

Karim Abbaspour

unread,
Feb 8, 2019, 6:36:00 AM2/8/19
to swat...@googlegroups.com
calibration results could be acceptable. There are many things involved here. My main concern is the range of your parameters. When you put everything in there you have be very careful with the choice of parameter ranges.

image.png

For example, CN2 is increasing, SOL_AWC is also increasing in an unusual range (they shouldn't both increase or decrease), ESCO has a very wrong range (should not be <0.7 for normal soils), a relative change of GWQMN between 1.45 to 2.2, you should calculate to see what that even means, etc. 

follow calibration protocols here:


Karim
















Demessie Hunegnaw

unread,
Jan 19, 2024, 1:12:33 AM1/19/24
to SWAT-CUP
I have data from 1992-2013 and give 3 years form warm-up period and calibrate from 1995-2006 and I try to validate from 2007-2013 the calibration is OK. but validation is not.I follow the same procedure by changing only the data point and the time period.
                           file.Cio
             19    | NBYR : Number of years simulated
            1992    | IYR : Beginning year of simulation
               1    | IDAF : Beginning julian day of simulation
             365    | IDAL : Ending julian day of simulation
               0    | 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

                 SUFI2_Extract_rch.def
2007           : beginning year of simulation not including the warm up period
2013           : end year of simulation
            Extract_rch_no obs.def
2007           : beginning year of simulation not including warm up period
2013           : end year of simulation

the error is as I attached below
Error validation.JPG
Reply all
Reply to author
Forward
0 new messages