You are on page 1of 14

HEAD

SWAT EDITOR
FOR SWAT 2012

DOCUMENTATION

M. WINCHELL, AND R. SRINIVASAN


APRIL, 2012

BLACKLAND RESEARCH CENTER


TEXAS AGRICULTURAL EXPERIMENT STATION
720 EAST BLACKLAND ROAD - TEMPLE, TEXAS 76502

GRASSLAND, SOIL AND WATER RESEARCH LABORATORY


USDA AGRICULTURAL RESEARCH SERVICE
808 EAST BLACKLAND ROAD - TEMPLE, TEXAS 76502

1
TABLE OF CONTENTS

Table of Contents ............................................................................................................ 1 


SECTION 1: Introduction................................................................................................. 1 
SECTION 2: Installation and Setup of SWAT Editor ....................................................... 2 
SECTION 2.1: System Requirements.......................................................................... 2 
SECTION 2.2: Installing SWAT Editor ......................................................................... 3 
SECTION 2.3: SWAT Editor Installation Contents ....................................................... 6 
SECTION 2.4: Setting up a SWAT Editor Project ........................................................ 7 
SECTION 3: Getting Started With SWAT Editor ........................................................... 10 
SECTION 3.1: Working with SWAT 2012 projects..................................................... 10 

1
SECTION 1: INTRODUCTION
Purpose
The SWAT Editor application is “light-weight” interface for editing parameters,
editing SWAT databases, and running the SWAT 2012 model. The SWAT Editor
is a standalone application that does not require ArcGIS to run. The SWAT Editor
does require the SWAT 2012 parameters geodatabase and a properly formatted
SWAT project database. The SWAT Editor provides the following capabilities:
 Editing of SWAT databases
 Processing of SWAT weather data
 Creation of all SWAT default input tables
 Editing of SWAT model parameters
 Editing of model point source, inlet, and reservoir data
 SWAT model setup

1
SECTION 2: INSTALLATION AND SETUP OF SWAT
EDITOR

SECTION 2.1: SYSTEM REQUIREMENTS

The SWAT Editor Interface requires:


Hardware:

 Personal computer using a recent processor (2008 or more recent),


which runs at 2 gigahertz or faster
 2 GB RAM minimum
 100 megabytes free memory on the hard drive
Software:

 Microsoft Windows operating system (e.g., XP, Windows 7, Server


2008) with most recent kernel patch
 Microsoft .Net Framework 3.5 or higher
 Adobe Acrobat Reader version 8 or higher (may be downloaded for
free at: http://www.adobe.com/products/acrobat/readstep2.html)

2
SECTION 2.2: INSTALLING SWAT EDITOR

The SWAT Editor interface for SWAT 2012 will create a directory on your
computer that contains the SWAT Editor executable, SWAT 2012 databases,
and a sample dataset.
1. Before you install, make sure to check the following:

a) You have uninstalled any previous versions of SWAT Editor using “Add
or Remove Programs”.

b) Your computer meets all system and software requirements listed in


Section 1 of this document.

2. Download an extract all files from the SWATEditor_Install_2012.x.y.zip file


(where “x” and “y” specify the version number).
3. In the “SWATEditor_Install_2012.x.y” folder, double click the “setup.exe”
program. The following dialog will appear:

Figure 2.1

4. Click “Next”. A license agreement will appear. You will be able to proceed
with the installation after agreeing with the license agreement.
5. Click “Next”, then choose an installation folder. The default folder,
“C:\SWAT\SWATEditor\”, is recommended. Select whether you want
ArcSWAT installed for “Everyone”, or “Just Me”. “Everyone” is

3
recommended. Note: make sure that the installation folder is writeable to
all. This is required, as some of the SWAT databases installed in this
folder will be accessed for editing by the SWAT Editor interface.

Figure 2.2

Click “Next”. You will be asked to confirm installation.

Figure 2.3

4
6. When completed, you will see the following message:

Figure 2.4

7. Click “Close”, and you are ready to begin using SWAT Editor.
8. SWAT Editor can be launched from the Start->All Programs->SWAT-
>SWAT 2012 Editor menu item, or by double clicking SWATEditor.exe in
the C:\SWAT\SwatEditor\ directory.

5
SECTION 2.3: SWAT EDITOR INSTALLATION CONTENTS

The SWAT 2012 Editor folder created by the installation program


contains the SwatEditor.exe program, the SWAT 2012 executable programs
(e.g., SWATrev589_32rel.exe), the code libraries used by the interface, and sub-
folders containing the SWAT Editor help materials and databases. The top level
of the install directory looks as follows:

Figure 2.5

The “Databases” folder contains the following:


1. SWAT2012.mdb: This geodatabase contains all the SWAT 2012 data
tables required by the ArcSWAT and SWAT Editor interface. This includes
the crop database, tillage database, user soils database, and many more.
A full description of all these tables is found in Appendix 3 of the
ArcSWAT_Documentation.pdf.
2. SWATOutput.mdb: This database is a template used to import SWAT
output from ascii text files into an Access database format.
3. SWAT Text Database Files: The SWAT “.dat” database files are stored in
this folder. These “.dat” files represent a text version of the same database
tables found in the SWAT2012.mdb database. When the SWAT model is
run from the SWAT Editor interface, the “.dat” files are exported from the
SWAT2012.mdb database into the current SWAT project TxtInOut folder
using the interface.
4. ArcSWAT_WeatherDatabase.mdb: This weather database contains
monthly weather statistics database tables for COOP weather stations
within the United States. These tables cover several different time periods
and are useful for evaluating climate change.

6
5. SWAT_US_Soils.mdb: This geodatabase contains tables of the
STATSGO soils parameters for all the STATSGO MUIDs within the United
States. There is one table per state.
6. ExInputs: This folder contains example input data file formats for weather
data, point source inputs, reservoir inputs.
7. ExampleDataset: This folder contains the necessary directory structure
and files required by the SWAT Editor interface. It is recommended that
users make a copy of this folder to use an example dataset to become
acquainted with the interface.

The SWATEditorHelp folder contains 3 documents:


1. ArcSWAT_Documentation_2012.pdf: This indexed document contains the
full documentation for ArcSWAT. Sections 9 through 15 of this document
pertain also to the use of SWAT Editor.
2. SWATEditor_Documentation.pdf: This document contains information
specific to the usage and setup of SWAT Editor.
3. ArcSWAT Release Notes: The most recent ArcSWAT release notes
pertinent to the current SWAT Editor version are included as a pdf
document.

The SwatCheck folder contains the SWAT Checker program than can be
launched directly from the SWAT Editor interface. This program reviews the
standard SWAT output files and highlights potentially erroneous output that can
help in identifying problems with the model parameterization. The SWAT
Checker program also generates summaries of hydrology, sediment, and nutrient
outputs.

SECTION 2.4: SETTING UP A SWAT EDITOR PROJECT

The SWAT Editor has been designed to provide SWAT users a method for
editing and running SWAT model applications that were created using the
ArcSWAT interface. It is strongly recommended that SWAT Editor users obtain
properly formatted SWAT project and SWAT parameter Access databases from
an ArcSWAT user. However, users who wish to manually replicate the ArcSWAT
database structure may do so. Appendix 1 and Appendix 3 of the
ArcSWAT_Documentation.pdf document describes the table formats for the
ArcSWAT Project Database and ArcSWAT Parameters databases respectively.
Note: The current version of SWAT Editor requires that the ArcSWAT
Project Database include table created up through the watershed

7
delineation and HRU delineation processes. The creation of weather inputs
and all default SWAT input tables is now performed within SWAT Editor.
To setup a SWAT Editor project, a user must proceed with the following steps:
1. Create a project directory structure: The project directory structure is the
same as that used by ArcSWAT, and is replicated in the
C:\Swat\SwatEditor\Databases\ExampleDataset\ folder. A image of this
directory structure is shown in Figure 2.6

Figure 2.6.

2. Obtain a SWAT 2012 parameter database (SWAT2012.mdb): This


database contains the SWAT crop, urban, tillage, fertilizer, and pesticide
data tables, as well as lookup tables used by the interface. The same
SWAT2012.mdb database may be used for all SWAT Editor projects, or it
may be customized for each project. The default version of this database
is provided in the C:\Swat\SwatEditor\Databases\ folder. However, a user
may use a customized version of the database that has been edited using
either ArcSWAT or SWAT Editor. This database should be placed in the
top level of the SWAT Editor project folder. In the example dataset, this
would be the SwatEditor\Databases\ExampleDataset\ folder.

3. Obtain a SWAT project database: This database contain the swat input
tables in Access format, as well as weather data, point source, inlet and
reservoir inputs, and other tables that are used to write the SWAT2012
text input files. This database will be different for each SWAT project.
Ideally, this database will be obtained from a user who has developed
input to the SWAT model using the ArcSWAT interface. However, some
users may wish to develop the required tables from scratch. The
ExampleDataset.mdb database in the C:\Swat\SwatEditor\Databases\
ExampleDataset\ folder contains a complete set of SWAT project
database tables generated from the ArcSWAT interface. The minimum set
of tables required for use of SWAT Editor includes:
a. MonitoringPoint: attribute table for monitoring point spatial layer

8
b. Reach: attribute for the reach feature class that includes the subbasin
from and to information required for routing.
c. Hrus: table that contains records describing all HRUs. This table is
needed for SWAT Editor to write all of the default input tables.
d. TimeSeries: point source and inlet time series table (table must be
present, but does not need records)
e. TSType: time series type lookup table
f. Watershed: attribute table for watersheds spatial layer
This database should be placed in the top level of the SWAT Editor project
folder. In the example dataset, this would be the
C:\Swat\SwatEditor\Databases\ExampleDataset\ folder.
4. Soils database: In order for SWAT Editor to create the default input tables,
the soils database that relates to the soils listed in the “hrus” table must be
present. Commonly, this will be the “usersoil” table located in the
SWAT2012.mdb database. In the case of the SWAT Editor example
dataset, the soils database is the ArcSWAT U.S. STATSGO database,
which is installed with the SWAT Editor and is located in the
C:\Swat\SwatEditor\Databases\ folder.

9
SECTION 3: GETTING STARTED WITH SWAT EDITOR

SECTION 3.1: WORKING WITH SWAT 2012 PROJECTS

To start the SWAT Editor interface:


1. Click the Start->All Programs->SWAT->SWAT 2012 Editor menu item, or
double click SwatEditor.exe in the C:\SWAT\SwatEditor\ directory.
2. The SWAT Editor dialog will appear (Figure 3.1).

Figure 3.1

3. Define the SWAT Project Geodatabase, SWAT Parameter Geodatabase


(i.e., SWAT2012.mdb), and the SWAT Executable Folder (the folder
containing SWAT2012.exe) using the file browse buttons next their
respective text boxes (Figure 3.2). The SWAT Soils database is also
required if the default SWAT tables are going to be written with SWAT
Editor. For the example dataset, this is set as the SWAT_US_Soils.mdb
database. For many projects, this database will be the SWAT2012.mdb
database which contains the “usersoil” table.
4. After defining the paths to the databases, click on the Connect to
Databases button. If the connection is successful, the menus at the top of
eh SWAT Editor interface will become enabled, and you will be able to
begin working with your SWAT project.

10
Figure 3.2

5. If you need to define the weather inputs and create the default SWAT
project database tables, you will find those options under the Write Input
Tables menu item (Figure 3.3). If you are working with a SWAT project
that already has defined weather and default tables, then you will only
need to access this menu if you choose to re-import weather data or
recreate the default SWAT input tables. Details on the options available
under the Write Input Tables menu are found the ArcSWAT 2012
documentation found in the C:\Swat\SwatEditor\SWATEditorHelp\
folder.

Figure 3.3

6. The Edit SWAT Input menu item provides access to editing of all SWAT
model inputs, including the project specific inputs from the project
database (point sources, inlets, reservoirs, subbasin, and watershed
inputs) as well as the SWAT 2012 database tables. The functionality of the
editing options in SWAT Editor is the same as the functionality in
ArcSWAT. Details on editing SWAT inputs are provided in the ArcSWAT
2012 documentation located at C:\Swat\SwatEditor\SWATEditorHelp\
ArcSWAT_Documentation_2012.pdf.

11
Figure 3.4

7. The third menu available in SWAT Editor is the SWAT Simulation menu
item (Figure 3.5). This menu item includes options to run the SWAT
model, read the SWAT output files into an MS Access database, and use
the Manual Calibration Helper to modify parameter values. The details
concerning the use of these options are provided in the ArcSWAT 2012
documentation available at, C:\Swat\SwatEditor\SWATEditorHelp\
ArcSWAT_Documentation_2012.pdf.

Figure 3.5

8. The final menu is the help menu (Figure 3.6). This menu provides easy
access to both the SWAT Editor and ArcSWAT help documents, as well
as information about the current SWAT Editor version.

Figure 3.6

12

You might also like