Us Soilsv3
Us Soilsv3
Us Soilsv3
Chris George
October 2020
Version 3
1 Introduction
SSURGO soil data for the USA is available free from the web. It is a good, detailed source of soil data
to use with QSWAT, but it needs some preparation first. This document explains how to obtain and
prepare SSURGO data.
The value we want for the grid (or raster) is MUKEY, but unfortunately it is stored as a string. There is
a simple procedure to generate an equivalent numeric field. Right click on the layers panel entry for
the soil shapefile, and Open Attribute Table. Click on the Field calculator (4th from the right end). In
the Field calculator form (Figure 3) make sure Create a new field is checked, enter MUKEYINT as the
Output field name, and if necessary change the Output field type to Whole number (integer). Leave the
Output field width as 10. We create values for the new field by creating an expression, which in our
case will be to_int("MUKEY"). You can simply type this in the Expression box, or you can create it by
clicking in the central panel:
Expand Conversions and double click to_int.
Expand Fields and Values, and double click MUKEY.
In the Expression panel, click on the button containing ) (or just type it).
Click OK and wait for the Field Calculator to close. You will see in the attribute table the new attribute
MUKEYINT has been added and the values inserted. The editor is in editing mode, so click the Toggle
Editing Mode button (top left), click Save when prompted, and close the editor
We are now ready to convert to a grid. Use Processing -> Toolbox -> SAGA -> Raster creation tools -
> Rasterize to open the Rasterize form. Select the input shapefile, which will be available in the pull
down menu, set the Attribute field to MUKEYINT, Method for Multiple values to first, Method for
Lines to thin, second one to cell, Preferred Target Grid Type to Integer (4 byte), ignore Output extent,
use the number we got earlier for the DEM's cell size for Cellsize, cells for Fit, and for Rasterized click
the button on the right, browse to a suitable directory and choose a suitable file name (Figure 4) The
output will be a Saga raster, with extension .sdat, which is fine. Click Run. Click closed when finished.
The result will probably look mostly black, because of the default grey scale colouring (Figure 5).
.
5 Merging grids
If your watershed included area from more than one state you will have grids to merge. . Use
Processing -> Toolbox -> SAGA -> Raster tools -> Mosaic Raster layers to open the Mosaic form.
Click the right button under Input layers, check the grids you want to merge, and select 4 byte signed
integer as the Preferred data storage type. Use cells for Fit and leave the rest as their defaults. Under
Grid browse to a suitable directory, and choose a suitable file name. Click Run (Figure 6).
Figure 6: Merging grids
.
6 SSURGO soil database
SWAT will need the data for the soils. This is found in the database SWAT_US_SSURGO_Soils, which
must be downloaded from the SWAT website. Extract the mdb file from the zip archive and place it in
the Databases subfolder of the SWAT Editor folder. QSWAT will find it and pass it to the SWAT
Editor for generating the soil input files.
SWAT+ uses sqlite databases, and the SSURGO tables are in
C:\SWAT\SWATPlus\Databases\swatplus_soils.sqlite.