0% found this document useful (0 votes)
17 views22 pages

Training Manualfor SWATin QGIS2

This document provides a training manual for using the Soil and Water Assessment Tool (SWAT) in QGIS 2.6.1. It outlines the software, data, and steps needed to set up a SWAT modeling project in QGIS. This includes downloading and installing QGIS and the QSWAT plugin, obtaining DEM, land use, soil and weather data, formatting the data for use in QSWAT, updating the soil database, delineating the watershed, and generating hydrologic response units to run the SWAT model. The overall goal of the project is to assess suitable sites for small-scale irrigation projects in Northern Mindanao, Philippines.

Uploaded by

Papa Yakhia Diop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views22 pages

Training Manualfor SWATin QGIS2

This document provides a training manual for using the Soil and Water Assessment Tool (SWAT) in QGIS 2.6.1. It outlines the software, data, and steps needed to set up a SWAT modeling project in QGIS. This includes downloading and installing QGIS and the QSWAT plugin, obtaining DEM, land use, soil and weather data, formatting the data for use in QSWAT, updating the soil database, delineating the watershed, and generating hydrologic response units to run the SWAT model. The overall goal of the project is to assess suitable sites for small-scale irrigation projects in Northern Mindanao, Philippines.

Uploaded by

Papa Yakhia Diop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/334945590

Training Manual for SWAT in QGIS 2.6

Method · August 2019


DOI: 10.13140/RG.2.2.14409.08802

CITATIONS READS

0 583

1 author:

Joseph Paquit
Central Mindanao University
20 PUBLICATIONS 26 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Assessing Suitable Sites for Small Scale Irrigation Projects in Region X, Philippines View project

Environmental Modeling View project

All content following this page was uploaded by Joseph Paquit on 03 August 2019.

The user has requested enhancement of the downloaded file.


TRAINING MANUAL FOR SWAT IN QGIS 2.6.1 (REVISED 2019)
Joseph C. Paquit, Indie C. Dapin, Angela Grace Todelo-Bruno,
Nelsa P. Olila, Jupiter V. Casas, Eric N. Bruno

I. INTRODUCTION

SWAT means Soil and Water Assessment Tool. It can simulate streamflow,
water balance and other hydrological phenomenon in a watershed by analyzing the
relationship between landuse, soil, slope and weather parameters. QSWAT is a plugin that
can run SWAT operations in a QGIS environment. QGIS is an open source GIS software
which makes it very practical to use as platform for SWAT. In this manual, we demonstrate
the application of QSWAT to simulate the streamflow of a watershed in Pangantucan,
Bukidnon. This endeavor is part of the project, “Assessment of Suitable Sites for Small
Scale Irrigation Projects in Northern Mindanao”. In the later part of this manual, the tutorial
shifts its focus on identifying suitable locations to establish Diversion Dam (an SSIP). Let’s
get started!

II. SOFTWARE ENVIRONMENT AND TOOLS

A. Microsoft Windows
B. QGIS 2.6.1 Brighton
C. QSWAT
D. Microsoft Access & Excel
E. Text Editor (e.g. Notepad)

III. PRELIMINARIES

A. Software Download & Installation (No longer necessary if software installers


are provided). Install these programs at C://Program files.
1. QGIS 2.6.1 Brighton can be downloaded from:
http://qgis.org/downloads/QGIS-OSGeo4W-2.6.1-1-Setup-x86.exe.
2. QSWAT 1.8 can be downloaded from
http://swat.tamu.edu/software/QSWAT
3. SWATEditor 2012 version can be downloaded from:
http://swat.tamu.edu/software/arcswat/swateditor

B. Data Download (No longer necessary if data is provided)


1. DEM (ASTER GDEM ) can be downloaded from
http://philgis.org/province-page/bukidnon
2. Soil data can be downloaded from:
http://philgis.org/country-basemaps/philippine-soils
3. Climate Forecast System Reanalysis (CFSR) weather data can be
downloaded by request from:
https://globalweather.tamu.edu/request/view/10506

C. Creation of project folder


1. In C://, create a folder named QSWAT.
2. In QSWAT folder, create a subfolder named Data and Copy or Store all
needed data in this folder. This will also be the directory to store the qgis
project. Also create a folder names Project to store all outputs.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 1
IV. PRE-MODELING DATA FORMATTING & VISUALIZATION

A. Data formatting

1. For a small-scale DEM, Landuse and Soil data, clipping using a boundary
shapefile is needed. In our case, the Pangantucan boundary shapefile.
2. When landuse and soil data come in vector format, it has to be converted
to raster. The user has to make sure that when converting, the extent and
cell size of the landuse and soil raster should correspond to that of the
DEM.
3. For soil, the cell value should correspond to the usersoil sequence number
(SEQN). SWAT soil data is for the US and we have to integrate our own soil
data (PHsoils.xlsx) to SWAT for it to be recognized. The soil data is shown
below.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 2
4. The format of the look up tables are shown below.

5. For weather data, this tutorial uses the pre-downloaded CFSR weather
data for the area of interest. It is stored in the working folder as text files.

B. Raster Data Visualization

1. Load DEM, landuse and soil raster layers into QGIS.


2. Visualize the cell values so you can check whether the values especially
for soil correspond to those that are within the QSWAT database.
3. For the layer usersoil, there are 5 values that correspond to the
sequence number of the soil data for import to the QSWAT
database.These values also correspond to the Soil_ID in the soil look up
table.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 3
V. QSWAT Modeling

A. Opening QSWAT in QGIS

1. Open QGIS 2.6.1 Brighton


2. Go to plugins, click QSWAT (see image)

3. The QSWAT GUI opens (see image). Next is to create New Project.

B. Creating New Project

1. Click on New Project


2. A windows explorer window opens. Navigate to your working folder in
C://QSWAT/Project and then follow these steps;
3. First, choose a file name a save the QGIS project file as Project1. Save
4. Two files are created, A QGIS project and a folder that contains three
subfolders and two MS Access files (see image).

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 4
5. QSWAT GUI pops up to show that Step 1 of the main steps has been
activated.
6. Your new project has been created. You can now proceed to Step 1 –
Delineate Watershed

C. Updating/Editing of SWAT database

1. Edit the ArcSWAT weather database under


C://SWAT/SWATEditor/Databases by importing the CFSR weather data
found as an MS Access file inside the weather folder.
2. Updating Soil Database. Before getting started with HRU analysis and
input the landuse, soil and slope maps, the user has to import additional soil
data to update the QSWAT database. The following should be done;

• Open QSWATRef2012.mdb

• Rename the table usersoil to usersoil US

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 5
• Go to External data, then import from excel (this is a series of
steps, just click OK, NEXT and FINISH as required). Do not forget
to rename sheet1 to usersoil.

• By this time, a new table named usersoil is now added into the
QSWAT database as shown below. Don not forget to click save
before closing MS Access. You are now ready to begin creating
HRUs.

D. Delineate Watershed

QSWAT can perform automatic watershed delineation and a DEM is required for this
step. QSWAT can read both tiff and ESRI grid raster formats. Go through the following
steps to accomplish this part of SWAT modeling.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 6
1. Click on Delineate watershed to its window.
2. Click on the dialog box to navigate to your project folder QSWAT à Data.
3. Click on the input DEM to load it to QSWAT (note:
4. Next, click on DEM properties to make sure the vertical unit is in meters
and see the other DEM attributes such as cell size, extent, cell area and
cell size.
• If the user intends to use and existing watershed and stream
shapefile, he/she can click use existing watershed or burn in
streams
5. On the Define threshold, the user can modify the number of cells or area.
In hydrology, the number of cells relates to flow accumulation, which
essentially means the number of cells required to form a stream. Setting a
greater value for the number of cells means only larger streams (higher flow)
will be defined. In our case, we will leave the threshold with what is default.
6. Click on create streams.

7. After which, this appears in the QGIS window. Stream creation is done.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 7
8. It is assumed that you have no existing data on inlet/outlet so we click on
Draw inlets/outlets and then this window pops up.

9. Click on an outlet of interest (refer to image) then click OK to add.

10. Click on Select inlets/outlets and then this window pops up. Do as
required and then click Save.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 8
11. Click Review snapped (Do not change the 300 meter snap threshold).
Double check if snapping has been accomplished (see image)

12. Click Create Watershed.


13. After which, this appears in the QGIS window (see image)

14. Check Add point source to each subbasin.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 9
15. Click on OK to complete the Watershed Delineation. (Note: the user
can also merge sub basins or add reservoirs and point sources but this are
not covered in this manual.) You are now ready for step 2 – Create HRUs.

E. Create Hydrologic Response Units (HRUs)

HRUs are divisions of basins into smaller units that bear specific or unique combinations of
Landuse/Soil/Slope. The usual practice is to prepare as raster (not vector) layer for each
variable. In addition to that, a csv look up table for both landuse and soil have to
prepared prior the start of creating HRUs. The look up tables must contain SWAT Landuse
codes and Soil names.

1. This window appears after completing Watershed delineation, Create


HRUs is now activated.

3. Click on Create HRUs and a new window pops up (see image)

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 10
4. To begin creating HRUs, click on the dialog box to navigate to
QSWATà Data à landuse.
5. Click on landuse then Open (Note: land use data is normally formatted as
a raster data whose values or ID numbers correspond to what is in the .csv
look up table). On the drop down arrow arrow beside Landuse table,
chose use csv file.
6. Next, for Soil. Click on the dialog box to navigate to QSWATà Data à
Soil.
7. Click on Soil then Open (Note: Soil data is normally formatted as a raster
data whose values or ID numbers correspond to what is in the .csv look up
table). On the drop down arrow arrow beside Soil table, chose use
csv file (see image)

8. For Slope. Manually type the following and click on insert after typing each
number; 3, 8, 18, 30. This means 5 classes will be created; 0-3%, 3-8%,
8-18%, 18-30% and >30%. When complete, it will appear like this (see
image)

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 11
7. Next, Click on Read. A windows explorer window opens, navigate to your
QSWAT folder and then do the following.
9. First, click on landuse_lookup.csv and then click open. This is successful if
there is no error prompt.
10. Second, click on soil_lookup.csv and then click open. This is successful if
there is no error prompt.
11. QSWAT will process the data for a few seconds and when done the HRU
window will show the full HRU count and activate the create HRUs.
12. Under Single/Multiple HRUs, select target number of HRUs. Include all
possible HRUs for better results (see image)
13. Click on create HRUs (see image). Be sure to check the checkbox
Generate full HRUs shapefile. This will take some time.

14. By this time, this image should be seen in your QGIS window (Note: When
the landuse data do not provide enough detail, e.g. the user has an idea
that the AGRL type can be split by percentage into Corn, Rubber and
Cassava, it is recommended to split the landuses. This is done to generate
HRUs with better accuracy.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 12
15. After creating HRUs, this window pops up (see image). A drop down box is
added so you have the option to view the reports for elevation, land use and
soil and HRU.

16. The Edit inputs and Run SW AT has been activated. You are now ready
for step 3.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 13
F. Edit inputs and Run SW AT

1. Click on Connect to databases. A prompt that says connection is


successful will soon appear.
2. Next, click on write input tables and click on Weather Stations.

3. A new window opens (see image) wherein you have select


WGEN_CFSR_World under weather Generator Data à Locations
Table.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 14
4. For Rainfall, Temperature, Relative Humidity, Solar Radiation, and Wind Speed
Data, select the following files from the data folder. (Note: the files to be
selected bears only the location of the weather data, the actual data is stored
in a separate text files in the same folder. The two are linked using a code
called “name”). After data input, click OK until a prompt that says processing
complete pops up.
§ Rainfall – pcp.txt
§ Temperature – tmp.txt
§ Relative Humidity – rh.txt
§ Solar Radition – solar.txt
§ Windspeed – wind.txt

5. Click Write SWAT Input Tables à Select All à Create tables. Note
(select no for a few pop ups since we are working with an area that is outside
the US). This will again take some time. A pop that says Done Building
Selected Tables shows, click Ok.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 15
6. Next is to Run SW AT. Click on SWAT Simulation à Run SWAT.

7. SWAT detects that our weather data is from 1979-2014 (35 years). Follow
these steps (see image below for reference)
• We will use all weather data available to run SWAT.
• Choose Monthly time step
• Set 3 as NYSKIP (number of years to skip)
• Skewed normal for rainfall distribution
• Select 64 bit release for SWAT.exe version
• Check Print Water Quality Output.
• Click Setup SWAT Run
• Lastly, click RUN SWAT.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 16
8. Click on Read SWAT Output.

9. The image below is shown next. Do the following;


§ Check output.rch, output.sub, output.hru then Click Import files to
database. A pop prompts that it is done.
§ Type sim1 (simulation1) to save SWAT simulation. Click save simulation. A
pop up prompts that is was successfully saved.
§ Click on Run SWATCheck to visualize important results

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 17
10. After clicking on SWATCheck. The following can be viewed.

§ Simulation details

§ Hydrology (Water Balance) Information

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 18
§ Sediment Yield Information

VI. VISUALIZATION OF RESULTS IN QGIS

A. On SWAT Main Window, Click on Visualize (Step4)

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 19
C. A window (image below) opens. Do the following.

1. Select sim1 as scenario


2. Select rch under SWAT output table.
3. Set period to default
4. Static data
5. Monthly means for choose summary
6. FLOW_OUTcms (cubic meters per second) for variable
7. Click Add. Click FLOW_OUTcms then Click Create.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 20
8. The image below should now be seen on you QGIS window. This data is
a shapefile which is stored in sim1à TablesOut à rchresults.

9. Next, Under Print, select landscape and 1 as number of maps. The print
composer opens and shows a similar image as shown bellow. Export or
Save this map.

This training manual has been published as part of the project, “Assessment of Suitable Sites for Small Irrigation
Projects (SSIPs) in Northern Mindanao”, Implemented by Central Mindanao University and funded by DA BAR 21

View publication stats

You might also like