Conversion From QSWAT To QSWATPlus - v0.9.4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Conversion from QSWAT to QSWAT+

1 Purpose

The purpose of this tool is to help users migrate from using QSWAT to using QSWAT+. It is only
concerned with reusing data developed for QSWAT projects. As well as reading this guide, users will
also need to acquaint themselves with QSWAT+ documentation.

The essential steps in QSWAT+ are much the same as QSWAT. Creating the model consists of first
delineating the watershed, then combining the delineated watershed with landuse and soil data,
and defining HRUs. At this point the work with GIS is complete and an editor is used to add weather
data, edit inputs as required, and then run SWAT+.

The conversion tool has two particular purposes in mind, for which it offers Full and No GIS options.

Full conversion is for users who want to rebuild their QSWAT project from scratch, and take full
advantage of the new features of QSWAT+. After conversion, they will be at the start of their
SWAT+ project, about to do watershed delineation. The data they need that could be collected from
the QSWAT project: the maps, settings like thresholds that are common to QSWAT and QSWAT+, soil
data, weather data, etc. will be available, and they will be able to create a model as close to or as
different from their QSWAT project as they wish.

No GIS conversion is an option for users who just want to run SWAT+ on their existing model
without any preparation like delineation or defining HRUs. Nothing is done in GIS, so the subbasins ,
streams and HRUs are not changed. But no geographic visualisation of results will be possible.

2 Instructions

2.1 Prerequisites
We assume you already have QSWAT. You will need to install QSWAT+, and a suitable version of
QGIS, probably QGIS 2.18 as instructed in the QSWAT+ user manual. You will also need to install the
QSWAT+ Editor and the QSWAT+ Databases from the SWAT website.

2.2 Conversion
Run C:\SWAT\SWATEditor\runConvertToPlus.bat by double-clicking on it or using it as a command in
a command or shell window. If you didn't use a command or shell window one will open, and you
will see messages there as the conversion progresses.

You will be asked to locate the existing QSWAT project file (.qgs). Then you are asked to identify a
parent directory for your QSWAT+ project. This should be an existing directory (though you can
create one on the fly if you wish). Note that you are not selecting the QSWAT+ project directory,
since this is about to be created, but only where that project directory is to be placed. Do not try to
arrange the QSWAT and parent directories so that one is a descendant of the other, as this would
cause problems (and the tool will prevent you in any case).

Once you have selected the parent directory you will be invited to reuse the QSWAT project name or
create a new one. Once the name is chosen, the tool checks to see if the QSWAT+ project directory
exists already. If it does, the tool checks that you wish to delete it, and does so if you confirm that it
should.

Deletion of an existing directory to make the QSWAT+ project directory sometimes seems to fail,
with a message being displayed to say so. Sometimes this message appears although the deletion
has in fact taken place. If this happens you can do the following:

 Check with Windows Explorer if the directory exists and if so use Windows Explorer to delete
it.
 If there is still a problem, check that there is nothing else (like another Windows Explorer
window) accessing the directory or one below it.
 Open the Task Manager (right click in the taskbar to find it), switch to the Details tab, and kill
any processes with Name python.exe. Python processes seem often not to die when they
are exited.
 If all else fails and you still cannot delete a directory, reboot the machine.

When the QSWAT+ project directory has been created, as a directory with the project name within
the parent directory, the conversion tool creates all the subdirectories needed, and sets up a new
project database, and reference database.

Then the conversion tool opens a form for you to make the choice between Full or No GIS
conversion.

If you choose Full , a new project file is created (a .qgs file with the project name in the project
directory) and the DEM, landuse and soil rasters and shapefile maps from the QSWAT project are
copied in, rasters into Watershed\Rasters and shapefiles into Watershed\Shapes

3 Other data
For both options (Full and No GIS) landuse, soil, weather generator, observed weather, and some
reference data is recovered from the QSWAT project.

3.1 Landuse data


The data from the crop and urban tables in the QSWAT project reference database is copied into
tables plant and úrban in the QSWAT+ project database.

3.2 Soil data


If the QSWAT project did not use STATSGO or SSURGO soils, the data from table usersoil in the
QSWAT project reference database is copied into a table usersoil in the QSWAT+ project database.
3.3 Weather generator data
The QSWAT TxtInOut directory is searched for .wgn files, each of which contains data for a weather
generator station. Each different station has its data added to the weather_wgn_cli and
weather_wgn_cli_mon tables in the QSWAT+ project's reference database.

3.4 Observed weather gauges


The QSWAT TxtInOut directory is searched for pcp1.pcp, tmp1.tmp, hmd1.hmd, slr1.slr and
wnd1.wnd files. If any are found, it (and its successor files if any) are used to create the data for
weather gauges of the appropriate category. Data about the gauge is placed in weather_files and
weather_sta_cli tables in the QSWAT+ project's reference database, and the observed data itself
placed in appropriate files in the QSWAT+ project's TxtInOut directory.

3.5 Reference data


Data in the tables fert, pest, septwq, and till tables in the QSWAT project's reference database may
have been edited by the user. To make such changes available in the QSWAT+ project, data from
these tables is extracted and placed in tables of the same name in the QSWAT+ project database.

3.6 Dates
Start and end dates, plus the NYSKIP value for the simulation are read from the QSWAT project's
file.cio and placed in the QSWAT+ project's time.sim and print.prt files respectively.

4 To do: reservoirs, inlets and point sources

Input data for reservoirs, inlets and point sources is not converted because I currently have no
information on the SWAT+ requirements for such data.

You might also like