Simulation stuck - Inifnite run

79 views
Skip to first unread message

Math Pch

unread,
Mar 17, 2023, 5:29:00 AM3/17/23
to R-SWAT
Dear all,

I am trying to perform calibration on SWAT+ but I encounter a problem. I followed the tutorial video "Run SWAT+ with R-SWAT" and put 14 parameters to do the sentivity analysis with Sensi_Cali_(uniform_Latin_Hypercube_Sampling).

First, I tried to do 200 simulations on 8 cores. I could see in the CurrentSimulationReport file that the simulations were done, but at some points some simulations were not run anymore (on core 2 for example, after the 10th simulation, no more line was written for this core, then for core 7 after the 12th simulation no more line about it etc..). So the run of SWAT+ never ends (the message 'running SWAT...' never disappear).

Then, I also tried to do 100 simulations on only 1 core. The same phenomenon happens. On the simulation number 25, SWAT+ is stuck : the simulation is stuck in the middle but I have no error message.

Maybe it's the combination of parameters I chose, or their scope, that makes SWAT+ not work anymore ? I put the picture of the parameters I am trying to calibrate.

Does anyone already had this issue or has any comments/suggestion to solve it ?

Thank you in advance !

Best,

Mathilde Puche
Parameters.PNG

K. N Ogbu

unread,
Mar 17, 2023, 8:08:50 AM3/17/23
to Math Pch, R-SWAT
Hi,
I am also experiencing this same problem.

I wish there will be a soluion to this problem soon.

Please let me know if you solve it

Kingsley 

--
You received this message because you are subscribed to the Google Groups "R-SWAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to R-SWAT+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/R-SWAT/946fa8bd-35ee-4db4-bc39-f9a0535c7acdn%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted
Message has been deleted

Tam Nguyen

unread,
Mar 17, 2023, 1:37:08 PM3/17/23
to R-SWAT
Hi Mathilde and Kingsley,

I have checked, for example in the case of Mathilde. You selected 14 parameters.

You selected the method of change for parameters "chk.rte" and "chn.rte" is "REPLACE" and the minimum values are -0.01 for both parameters.
Therefore, R-SWAT will generate some values for these parameters, some of the values are NEGATIVE => you will see in the calibration.cal file these negative values

These are channel hydraulic conductivity and Maning values, they CANNOT be negative => SWAT+ will not display any message if you put negative values, it just not doing anything
In this case, R-SWAT does not know anything, it just think that SWAT+ is still running and never finish.

NOTE: if you use the method of change is "relative" and NEGATIVE values will works

IMPORTANT: before running R-SWAT, make sure that the parameter range is in its physical range, e.g., some parameters cannot be negative. If you use the method of change is ABSOLUTE and input negative values, the actual values of the parameter can be again negative and will have the same issue

On Friday, March 17, 2023 at 5:29:27 PM UTC+1 Tam Nguyen wrote:
as I have tried to run RSWAT with the same setting and SWAT project from Kinhsley, I didn't have any issue. If you don't mind, you could share your SWAT txtinout and SWATproject.rds file with me, I can tried to run on different computers. 

Math Pch

unread,
Mar 20, 2023, 9:23:04 AM3/20/23
to R-SWAT
Dear Tam,
Thanks for your advice and for checking the parameters. I had put negative values because in cal_params, the minimum bound for these two parameters was -0.01, but you are right, that was the source of the problem. I modified the range for these two parameters and now it works.
Thanks again!
Mathilde

K. N Ogbu

unread,
Mar 20, 2023, 9:47:37 AM3/20/23
to Math Pch, R-SWAT
Hi Tam,

Thank you for solving this problem. 
Just as Mathilde said, I also thought the iterations would happen within the set parameter range. 
THe negative values were just the problem.
My simulation works fine now.

Can you also explain the results in each of the cores after the simulation? I know the best simulation is shown in the plot but does it also save elsewhere?

Best,

Kingsley

Tam Nguyen

unread,
Mar 21, 2023, 5:31:20 AM3/21/23
to R-SWAT
If you have 13 runs on 4 cores. The number of run on each core is integer of 13/4 = 3, the remainder runs is run with the last core. It means that core 1 (simulations 1-3) core 2 ( sim 4-6),  core 3 (sim 7-9), core 4 (sim 10-13)
Reply all
Reply to author
Forward
Message has been deleted
0 new messages