SWAT source compilation into an .exe file

70 views
Skip to first unread message

Karles Allesandro Pescoran Heredia

unread,
Jul 8, 2025, 9:28:50 PM7/8/25
to SWAT-user
Hello everyone.
Does anyone have a code to compile the SWAT source code into an .exe? I want to add some modifications, but I can't even compile the source code find here (https://bitbucket.org/blacklandgrasslandmodels/swat_development/downloads/).
If anyone has a code for Linux or Windows I would appreciate it.

Best regards,
Karles

La información contenida en este e-mail y sus anexos es confidencial, privilegiada y está dirigida exclusivamente a su destinatario, en consecuencia, solo puede ser utilizada por aquel. Si usted no es el destinatario original, no deberá examinar, usar, copiar o distribuir este mensaje o la información que contiene. Si lo recibe por error, por favor reenvíelo a la persona que se lo envió y elimínelo. Cualquier retención o uso total o parcial no autorizada de este mensaje está estrictamente prohibida y sancionada por ley.

Nancy B. Sammons

unread,
Jul 15, 2025, 11:21:04 AM7/15/25
to Karles Allesandro Pescoran Heredia, SWAT-user

Karles: 

I can provide you with the SWAT code for compiling in Windows.  Do you want our latest code, or do you have a specific revision? 

Nancy

 

 

From: swat...@googlegroups.com <swat...@googlegroups.com> On Behalf Of Karles Allesandro Pescoran Heredia
Sent: Sunday, July 6, 2025 11:16 PM
To: SWAT-user <swat...@googlegroups.com>
Subject: [SWAT-user:13204] SWAT source compilation into an .exe file

 

You don't often get email from karles....@utec.edu.pe. Learn why this is important

--
You received this message because you are subscribed to the Google Groups "SWAT-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swatuser+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/swatuser/2d762fd6-6789-46fc-ba98-21fc6b4a3362n%40googlegroups.com.

Hector Fajardo

unread,
Jan 13, 2026, 9:20:39 AMJan 13
to SWAT-user
Hi Nancy, 

Would you be able to share the source code of SWAT2012 rev 695? 

Best,
Hector Fajardo

Nancy B. Sammons

unread,
Jan 13, 2026, 9:47:15 AMJan 13
to Hector Fajardo, SWAT-user

Hector Fajardo

unread,
Jan 14, 2026, 9:19:49 AMJan 14
to SWAT-user
Hi Nancy, 

Thank you for sharing. 

I notice that in routine curno.f in line 89 the second part of the equation is commented out. Like this: 
      sumfc_ul = sol_sumfc(h) !+ r2adj(h) * (sol_sumul(h) - sol_sumfc(h))

Making the model insensitive to either, R2ADJ_BSN.bsn or R2ADJ.hru, whenever ICN=2 (CN calculation for drained flat areas). 

I would like to know if there is a reason for ignoring this part of the equation. 

I also notice that in the online source code (https://bitbucket.org/blacklandgrasslandmodels/swat_development/src/e0b2f1b2b3f7187558c75ff4005dc3fa29c71721/curno.f?at=master) on commit e0b2f1b on March 16, 2016 this was not case, and the equation was not commented out, and adding the effect of r2adj

Best,
Hector

Nancy B. Sammons

unread,
Jan 14, 2026, 11:29:35 AMJan 14
to Hector Fajardo, SWAT-user, Jeff Arnold

Hector: 

Unfortunately, I don’t have notes on the commented code line  (in Rev 659; dated 9/2016).  I would want to consult with Dr. Arnold on these changes and am unsure of that timeline.   SWAT+ is the model we are actively working on and supporting and takes up much of his time.

 

I will discuss this with Dr. Arnold and will get back to you as soon as possible with his comments.  

 

Also, if you have the capability of compiling code and wanted to test these edits/review the results might be an option. 

 

If it’s possible, we encourage users to update to SWAT+.  I have included a link below for you to review.

 

We do appreciate your interest in our model.

Have a good day.

 

Nancy

 

https://swat.tamu.edu/software/plus/

Reply all
Reply to author
Forward
0 new messages