Running SWAT without its interface !

405 views
Skip to first unread message

SSS

unread,
Aug 6, 2008, 12:36:54 PM8/6/08
to SWAT-user
Dear all,
Have anyone of you ever tried to run SWAT without its interface. As
the SWAT fortran code is available on this website, is it possible to
run the SWAT without its interface? I included all the SWAT files in
one new project and compiled. It compiled with no errors but at the
time of execution , there were some 80 errors.
If anyone has ever run SWAT without its interface, please inform me
what could be a probable problem.
Thanx a million,
Jas

willem vervoort

unread,
Aug 6, 2008, 6:51:39 PM8/6/08
to SSS, SWAT-user
Dear Jaswant,
running SWAT without the interface works fine. I have used R
(www.r-project.org) for pre and post processing of data files for
running different scenarios, but you could use any other math command
line structure. I have only used the AVSWAT interface to set up the
watershed as I haven't yet bothered working out how to write the fig
file, but I am sure that can be done as well. You can run SWAT2005.exe
just from the dos command prompt, or via another command structure.
That way you can also link SWAT to PEST if that is what you want to
do.

The main trick is to pay very good attention to the manual in terms of
whether the input files are FORTRAN formatted or just FREE.

Willem

--
http://blogs.usyd.edu.au/waterhydrosu/

willem vervoort

unread,
Aug 7, 2008, 2:08:22 AM8/7/08
to SWAT-user
---------- Forwarded message ----------
From: willem vervoort <willemv...@gmail.com>
Date: Thu, Aug 7, 2008 at 3:24 PM
Subject: Re: [SWAT-user:1361] Running SWAT without its interface !
To: Jaswant <jaswant...@gmail.com>


Why do you want to rebuild? You can just take the SWAT2005.exe out of
the C:/program files/ARCSWAT folder and place it with your txtinout
files. The executable is also here:
http://www.brc.tamus.edu/swat/soft_model_2005soft.html

Or have you changed the code, than I can't help as it depends on what
code you changed and if you have everything covered

Willem

On Thu, Aug 7, 2008 at 8:57 AM, Jaswant <jaswant...@gmail.com> wrote:
> Dear Dr. Willem,
> many thanx for the email.
> I am just trying this since morning, but could not do this.
> Please write in steps.
> let me explain what I did.
> 1. open MSDN studio FORTRAN COMPILER. and created a new project.
> 2. I added all the files (available as source code for SWAT) into the
> project
> 3. I complied and there were no errors.
> 3. When I build that, there were tonnes or errors.
> I am not sure what is wrong, please explain step wise how i can run swat
> without a interface.
> Many thanx in advance,
> Jaswant

--
http://blogs.usyd.edu.au/waterhydrosu/

--
http://blogs.usyd.edu.au/waterhydrosu/

Jim Almendinger

unread,
Aug 7, 2008, 1:45:18 PM8/7/08
to willem vervoort, SWAT-user
Willem and others --
I've dabbled in R for simple analyses and plotting -- and I know I'm missing much of its many capabilities.  If you find it to be useful for your analyses, it would be instructive to post a sample script, along with a short example data file -- especially when you've used it for pre-processing.  I assume you're reading in an input file, searching for the lines with the parameters you want to change, parsing the line to find that parameter, changing the parameter, and then re-writing the file in the format needed by SWAT.  I don't know any of these commands, and I'm always happy to try and learn some new tricks.  

As an aside, we've used small Fortran programs to post-process files, to extract out just the data we want.  But for pre-processing, the most I've done is to use update queries in Access to change selected parameters in the input tables -- which still requires the interface to re-write the text input files.  

Thanks,
-- Jim


On Aug 6, 2008, at 5:51 PM, willem vervoort wrote:


Dear Jaswant,
running SWAT without the interface works fine. I have used R
(www.r-project.org) for pre and post processing of data files for
running different scenarios, but you could use any other math command
line structure. I have only used the AVSWAT interface to set up the
watershed as I haven't yet bothered working out how to write the fig
file, but I am sure that can be done as well. You can run SWAT2005.exe
just from the dos command prompt, or via another command structure.
That way you can also link SWAT to PEST if that is what you want to
do.

The main trick is to pay very good attention to the manual in terms of
whether the input files are FORTRAN formatted or just FREE.

Willem


Dr. James E. Almendinger, Senior Scientist

St. Croix Watershed Research Station

Science Museum of Minnesota

16910  152nd St. N

Marine on St. Croix, MN  55047

tel: 651-433-5953 X 19

fax: 651-433-5924

email: din...@smm.org

web: www.smm.org/SCWRS/



willem vervoort

unread,
Aug 7, 2008, 6:36:25 PM8/7/08
to Jim Almendinger, SWAT-user
Jim,
That is a great idea, I am always happy to point out the advantages of
R. I will do that, just give me some time to organise a good example.
WIlle

--
http://blogs.usyd.edu.au/waterhydrosu/

Reply all
Reply to author
Forward
0 new messages