Recurrent error while running climate change scenario in SWAT Toolbox

193 views
Skip to first unread message

Zryab Babker

unread,
Nov 13, 2023, 7:31:15 AM11/13/23
to SWAT+
Dear SWAT community,

I am using the SWAT Toolbox to run climate change scenarios for different models (CanESM5, EC-EARTH3, MPI-ESM1), and SSPs of CIMIP6 climate projections for the period 2020 to 2050. While running SSP1.26 of MPI-ESM1 climate model, the model run in SWAT Toolbox always stops and I keep getting a pop-up error message that an error occurred while running SWAT+, make sure the files are not open..etc (see attached). I am sure that no files are open. the run always stopped on 14.09.2042. I made the following things to check the reason for this error:
- I checked the weather data and it seems ok as the model run successfully finished in SWAT Editor. > The weather data for that date exists.
- I ran the model in the SWAT toolbox from 2020 to 2041, and then from 2041 to 2050: both runs finished successfully. However, when I ran it for the whole period (2020-2050), it always stopped and got that error message. (Please see the attached screenshots)
- I tried to run it via the executable, but I got the same error. 

Could you please advise me on what could be the reason behind this error message and how to solve it? 
NB: The other SSPs for the same mode worked fine. 

Thanks in advance for your quick help.
Cheers,
Zryab

Test_2041-2050.JPG
Test_2020-2041.JPG
Error_message.JPG

Celray James CHAWANDA

unread,
Nov 13, 2023, 11:29:06 AM11/13/23
to SWAT+
This is not a SWAT+ Toolbox Error specifically, it could be something to do with the weather files for that specific scenario.
Can you try using the debug executable in command prompt (or powershell) and give us the screenshot of that?

Thanks!

Zryab Babker

unread,
Nov 13, 2023, 5:31:15 PM11/13/23
to SWAT+
Dear Celray,
Thank you for your prompt reply. I ran the model using the debug executable in PowerShell. It stopped on the same date (14.9.2042). Attached, you can see the error message I got. Kindly, let me what it means and how to solve it. Thanks a lot in advance. 
Best,
Zryab 
Error_message_PowerShel.JPG

Maarten J. Waterloo

unread,
Nov 14, 2023, 3:05:02 AM11/14/23
to SWAT+
Hi Zryab,

Checked your error message in the source code in pl_biomass_gro.f90 and it seems to occur in this part of the code where rto_no3 is calculated. Do not think it is in your weather files although it could be triggered by extreme weather conditions (drought?).

!! compute n and p uptake and stresses
          if (uno3d_tot > sum_no3) then
            rto_no3 = uno3d(ipl) / uno3d_tot

Perhaps uno3d_tot becomes too small/zero. Perhaps change some of your NO3 / Nitrogen parameters and rerun?

Regards,
Maarten Waterloo

Zryab Babker

unread,
Nov 27, 2023, 3:40:01 AM11/27/23
to SWAT+
Hi Maarteen,

Sorry for the late reply, I was off-desk for a while. 
An update:
I ran the model using the  SWAT+ Revision executable and it worked. I also updated the SWAT Toolbox to Version 1.0.5 and ran it with Rev60_5_7, it also worked, however, I noticed the following:
- for the same model, the results that I got using Rev60_5_4 differ from the ones I got using Rev60_5_7
-  Also, the results I got using the Toolbox (with SWAT+ Revision 60.5.7 selected) also differ from the ones that resulted from using the  Rev60_5_7 executable. 

Does that mean using different SWAT+ revisions will always yield different results? 
and do you have an explanation for why the results differ when using the SWAT Toolbox which uses the same SWAT+ Revision (60.5.7)? maybe Celray could comment on that.

Thank you for your help!

Natalja C.

unread,
Dec 13, 2023, 1:28:24 PM12/13/23
to SWAT+
Hello,
Here are the answers:

"Does that mean using different SWAT+ revisions will always yield different results? " - yes, in 99.9% cases they will differ. 
"and do you have an explanation for why the results differ when using the SWAT Toolbox which uses the same SWAT+ Revision (60.5.7)? maybe Celray could comment on that." - because there are more revision numbers than you see (rev 60.5.7.x.x.x) .It is likely that toolbox and the exe (or editor) use different "x" revisions, which you do not see.

Best,
Natalja

Reply all
Reply to author
Forward
0 new messages