Error Running SWAT+

116 views
Skip to first unread message

Matthew Lombardo

unread,
Oct 6, 2025, 12:44:58 PMOct 6
to SWAT+ Editor
Hello everyone,

Has anyone seen this error and know where it originated from? I have a hunch it is coming from the carbon values in my usersoil. I just edited them to make the carbon content more accurate for each layer, and when I tried to run SWAT+ again I got this error. Can anyone help? I've included all my input files, my weather text files, and the screenshot of the error. 

Edit: I keep on getting a message saying my email is too long no matter how much content I take out of the writing, so instead I've only attached the usersoil. 

Thank you,
Matt
Screenshot 2025-10-06 122929.png
Weather Data.zip
Usersoil (Robit Modeled, OM Carbon).csv

celray....@gmail.com

unread,
Oct 6, 2025, 12:46:38 PMOct 6
to SWAT+ Editor
Please run the model in debug mode to get a detailed report. post that here when done.

Nancy B. Sammons

unread,
Oct 6, 2025, 12:49:23 PMOct 6
to Matthew Lombardo, SWAT+ Editor

Matt:  It’s difficult to see if this is the case with the snapshot.  Running with the debug version will provide more information and would be helpful.  

Nancy

--
You received this message because you are subscribed to the Google Groups "SWAT+ Editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swatplus-edit...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/swatplus-editor/e554c81b-82d3-4d5a-ac59-29d55111f553n%40googlegroups.com.

Matthew Lombardo

unread,
Oct 7, 2025, 2:14:23 PMOct 7
to SWAT+ Editor
Thank you both for the quick responses! I ran it with the debug version and got this. 
Screenshot 2025-10-06 125439.png

Matthew Lombardo

unread,
Oct 7, 2025, 2:16:11 PMOct 7
to SWAT+ Editor
Thank you both for responding so fast! I have run it again in the debug mode and attached the screenshot of the error here. 

On Monday, 6 October 2025 at 12:49:23 UTC-4 nancy.sammons wrote:
Screenshot 2025-10-06 125439.png

Osman Furkan TOKGÖZ

unread,
Oct 9, 2025, 8:26:05 AMOct 9
to SWAT+ Editor
Actually this error occurs when you edit the data on 3'rd program to make txt file. If there is an empty row at the end or maybe missing row or LF/CRLF coding.
I see you .txt files have empty rows at the end. Please try to delete and run again. I solve my problem with this way.

7 Ekim 2025 Salı tarihinde saat 21:16:11 UTC+3 itibarıyla matthewl...@gmail.com şunları yazdı:

Bu e-posta mesajı ve ekinde bulunabilecek dosyalar yalnız mesajın alıcı hanesinde kayıtlı kullanıcı(lar) içindir. Mesajın alıcısı değilseniz, lütfen hemen göndericiyi uyarınız. Mesajı dağıtmayınız, kopyalamayınız, içeriğini açıklamayınız ve çıktı almaksızın siliniz. Bu mesajda kayıtlı görüş ve düşünceler hiçbir şekilde Erzurum Teknik Üniversitesi atfedilemeyeceği gibi, kurumumuz açısından bağlayıcı da değildir. Virüs ve kötü amaçlı yazılımların bu mesajda yerleşmesinin engellenmesi amacıyla gerekli tüm önlemler alınmış olsa da bu mesajın sisteminizde yaratabileceği kayıp ve zararlardan dolayı kurumumuz hukuken sorumluluk kabul etmez. Erzurum Teknik Üniversitesinin alanında yürüttüğü faaliyetlere ilişkin bilgi almak için internet sitemizi (erzurum.edu.tr) ziyaret edebilirsiniz.

Matthew Lombardo

unread,
Oct 11, 2025, 12:21:39 PMOct 11
to SWAT+ Editor
Thank you for the recommendation, but unfortunetily it didn't help. I went into my textinout folder and opened up all the text files and deleted all the extra rows, but that didn't solve the problem. I also checked my precipitation and temperature text files, and there weren't any extra rows. I've attached the error message from when I ran it again along with my textinout folder. Does someone know of another possible solution?

Thank you!

TxtInOut.zip
Weather Data.zip

Nancy B. Sammons

unread,
Oct 13, 2025, 8:03:14 AMOct 13
to Matthew Lombardo, SWAT+ Editor

Matthew: 

There are a couple of issues in the ‘soils.sol’ file.  There are several soils that have the hydrologic soil group as ‘A/D’;  This must be entered as A, B, C, or D. 

 

Also, there is a soil named ‘70’ that has all zeroes in the properties;  this ‘soil’ was never used in your watershed.  It needs to be deleted to prevent the next error. 

 

I was able to get a successful simulation run after making these changes. 

Matthew Lombardo

unread,
Oct 13, 2025, 12:07:25 PMOct 13
to SWAT+ Editor
Also, soil 70/MUKEY 3400265 corresponds to "Water". That's what all the parameters were 0 and the depth was 1. 

Matthew Lombardo

unread,
Oct 13, 2025, 12:07:29 PMOct 13
to SWAT+ Editor
Thank you for the help Nancy!

First, now I am getting an error saying that there is no soil 70. I am getting another error due to some kind of typo in the Python code, so could the soil 70 missing be the cause. I've added both error messages and my soil lookup and usersoil. Can someone tell me what should be in line 1074?

On Monday, 13 October 2025 at 08:03:14 UTC-4 nancy.sammons wrote:
Screenshot 2025-10-13 100152.png
Screenshot 2025-10-13 095336.png
Soil Lookup(Sheet1).csv
Usersoil (Robit Modeled, OM Carbon).csv

Nancy B. Sammons

unread,
Oct 13, 2025, 2:49:21 PMOct 13
to Matthew Lombardo, SWAT+ Editor

Matthew: 

The model does not like a soil without properties.  Water is not considered a soil.  If you have water bodies, you should go back to the interface and make those HRU’s a wetland or a reservoir. 

I hope this helps.

Matthew Lombardo

unread,
Oct 15, 2025, 9:38:06 AMOct 15
to SWAT+ Editor
Hi Nancy,

This is definitely helpful. I looked and there is only one HRU corresponding to soil 70/water, so I'll look and see how to change the HRU.

Thank you!

Matthew Lombardo

unread,
Oct 15, 2025, 9:38:36 AMOct 15
to SWAT+ Editor
Hi Nancy,

When you mean go to the SWAT interface and make the HRU and wetland or reservoir, do you mean changing the hydrology file? I couldn't find any documentation discussing turning a HRU into a reservoir or wetland, so the only thing I thought of was to tried changing the hydrology file. However, since this HRU isn't a reservoir it won't let me select "res1" for the hydrology file. "Res1" is my hydrology file for my reservoir. 

Currently, I have changed the soil from 70 to 23 since all surrounding HRUs use soil 23 and this has worked

On Monday, 13 October 2025 at 14:49:21 UTC-4 nancy.sammons wrote:

matiyas yirga

unread,
Oct 15, 2025, 9:38:41 AMOct 15
to Nancy B. Sammons, Matthew Lombardo, SWAT+ Editor
Chek stack or outlier for your data and also check the soil depth or all the soil depth must be non zero

Natalja C.

unread,
Oct 15, 2025, 12:42:06 PMOct 15
to SWAT+ Editor

Hello Matthew,

 Regarding you issue with “I couldn't find any documentation discussing turning a HRU into a reservoir or wetland”, please consult the official QSWAT+ manual. You will find the information on how to deal with this landuse type already on page 5:

 https://1905549715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgsvY4UbwriwcK1CI5lan%2Fuploads%2FgHq0X4ezLSWlotZ8Llyv%2FQSWATPlus%20Manual_v3.0.pdf?alt=media&token=dcaf77fa-a670-4a62-86d6-4451d593e69b

 Just follow the instructions in the manual and your issue will be fixed.

Best,
Natalja

Matthew Lombardo

unread,
Oct 16, 2025, 11:28:36 PMOct 16
to SWAT+ Editor
Hi Natalja,

Thank you for pointing that out, I missed it while I was reading through this. Do you know if the "WETW" landuse discussed on page 5 is the same at the "wetf" landuse? I don't have "WETW" on my landuse management list so I'm running with that assumption. I've also added a screenshot of my landuse management table to you know what I'm referring to. 

Thank you,
Matt
Screenshot 2025-10-15 132744.png

Matthew Lombardo

unread,
Oct 24, 2025, 10:32:45 AMOct 24
to SWAT+ Editor
Hi Natalja,

I wanted to follow up on this because I am getting an error. I don't have the "WETW" landuse for water, but the "WETF" landuse instead. I set the the soil type back to 70, which is for water, and changed the landuse to "wetf_lum" to see if this solved it. I ran the model and got back the same errors I had before. What actions does someone recommend I take? I'm not sure if the "wetf_lum" has the same landuse as "WETW" so I might go back to my earlier solution of changing the soil type to match the closest adjacent HRU and keeping the landuse how it was originally. 

Thank you,
Matt

Reply all
Reply to author
Forward
0 new messages