As a SWAT modeller and programmer, it’s very natural that I want to go deep into the SWAT source codes whenever questions come out. And again, it would be better to run SWAT live and look into values of all the variables to help trouble shooting. To do this, there are two options: commercial Intel fortran compiler and free gfortran. It’s hard to say which one is better. I chose gfortran for its price, freedom, cross-platform and multi-language compiling ability. For some reason, not all SWAT source code files follow the same standard. Compiling SWAT with gfortran is not as easy as Intel fortran. After some research, it comes out the best way to compile SWAT with gfortran. All the necessary steps are documented in one single user guide document with the hope it would be helpful.
All the efforts was recorded in following posts. And here are some important links.
Compile and Debug SWAT with GFortran and Eclipse (Windows version)
February 2, 2014 SWAT Makefile Updated – Ignore Underflow
January 28, 2014 MinGW Installation Guide for SWAT Debugging
January 28, 2014 Debug SWAT in Eclipse – Utilize Makefile
January 24, 2014 SWAT Makefile Updated – Stop running when overflow happens
January 23, 2014 Makefile – Compile SWAT using gfortran without modification