The Soil and Water Assessment Tool The Blue Nile Catchment Ann van Griensven Senior Lecturer of Environmental Hydroinformatics, UNESCO-IHE 0. Before getting started 0.1 Set your data together The Blue Nile model is only by means of global and freely available information. The collection of the data was followed by an accurate compilation and analysis of the quality and integrity. (i) Digital elevation model (DEM) - DEM-HYDRO1k: the U.S. Geological Survey’s (USGS) public domain geographic database HYDRO1k (http://edc.usgs.gov/products/elevation/gtopo30/hydro/index.html), which is derived from their 30 arc-second digital elevation model of the world GTOPO30. HYDRO1k has a consistent coverage of topography at a resolution of 1 kilometer. (ii) Digital stream network (DSN): - DSN-HYDRO1k: The USGS’ HYDRO1k stream network database is derived from the flow accumulation layer for areas with an upstream drainage area greater than 1000 km2. (iii) Soil map: -SOIL-FAO: Food and Agriculture Organization of the United Nations (FAO, 1995) provides almost 5000 soil types at a spatial resolution of 10 kilometres with soil properties for two layers (0-30 cm and 30-100 cm depth). Further soil properties (e.g. particle-size distribution, bulk density, organic carbon content, available water capacity, and saturated hydraulic conductivity) were obtained from Reynolds et al. (1999) or by using pedotransfer functions implemented in the model Rosetta (http://www.ars.usda.gov/Services/docs.htm?docid=8953). (iv) Landuse map - LANDUSE-GLCC: the USGS Global Land Cover Characterization (GLCC) database (http://edcsns17.cr.usgs.gov/glcc/glcc.html) has a spatial resolution of 1 kilometre and 24 classes of landuse representation. The parameterization of the landuse classes (e.g. leaf area index, maximum stomatal conductance, maximum root depth, optimal and minimum temperature for plant growth) is based on the available SWAT landuse classes and literature research. (v) Weather data: -WEATHER-CRU/dGen: The Climatic Research Unit (CRU, http://www.cru.uea.ac.uk/cru/data/hrg.htm) data-sets TS 1.0 (wet days per month; New et al., 2000) and TS 2.0 provides precipitation and average minimum and maximum temperature per month (Mitchell et al., 2004). These monthly climate grids have a resolution of 0.5°. Daily weather values for each sub-basin were generated based on CRU data using the semi-automated daily weather generator algorithm dGen (Schuol and Abbaspour, 2007). To make use of the climate grid in SWAT, dGen changed the grid data into synthetic station data by overlaying the climate grids with SWAT subbasins shape-file and then aggregating into point data. This program creates Thiessen polygons around each value point representing the center of the grid cell, overlays and intersects the subbasin layer with the climate grids and finally computes the area-weighted average which is then assigned to each subbasin centroid. 2 Spatial data Check the following data: Resolution DEM Land Use map Soil Map FAO Projection Projection known? Y/N (should be YES) Projection same as DEM ? Y/N (should be YES) Projection same as DEM ? Y/N (should be YES) Database - Other crops than mentioned in crop.dat? Y/N ../AVSWATX/AvSwatDB/crop.dat Database or update usercrop.dbf If outside US, update/replace the ../AVSWATX/AvSwatDB/ usersoil.dat database How to change projection (geographic to projected)? 1. 2. 3. 4. 5. 6. 7. 8. You make a table in *.xls Save it as txt or dbf Go to Arview, to tables and add the table Go to a view, go to Theme menu and choose “add theme event” where you select the table and the X/Y fields GO to View properties and give map units (meters) and distance (km) You select projection, select costum projection and give the properties. Go to theme and convert to shapefile (save as location.shp). You can now load it in your SWAT view or watershed. For the Blue Nile case, we use the following data: DEM Resolution 1 km Land Use map 1 km Soil Map 10 km Projection Projection known Projection same as DEM ? Yes Projection same as 3 Database Other crops than mentioned in crop.dat? Yes ../AVSWATX/AvSwatDB/crop.dat database update the ../AVSWATX/AvSwatDB/ DEM ? Yes usersoil.dat database Climate/weather data Weather Generator Files You need a table with LOCATIONS and NAMES of stations with weather generation info located in your data directory. Please replace the file ../AVSWATX/AvSwatDB/Userwgn.dbf with the ../data/ata\soil_landuse_wgn_database/ Userwgn.dbf file Rainfall data You need a table with LOCATIONS and NAMES of stations with daily rainfall data + files with the data located in your data directory. 4 Temperature data You need a table with LOCATIONS and NAMES of stations with daily minimum and maximum temperature data + files with the data located in your data directory. 0.2 Replace the databases with Nile-databases You should put your databases in folder ../data/ata\soil_landuse_wgn_database/ - Crop.dat - Crop.dbf - Usersoil.dbf - Userwgn.dbf In ../AVSWATX/AvSwatDB/ You find these in the ..\Data\soil_landuse_wgn_database folder 0.3 Install AVSWAT-X (Using ArcView 3.x and Spatial Analysis) You can find AVSWATX at: ftp://ftp.brc.tamus.edu/pub/swat/pc/swatav/avswatx.zip or http://www.brc.tamus.edu/swat/downloads/pc/swatav/avswatx.zip After unzippen, you should click on setup.apr. The installation will go from itself. If all goes OK, you should be able to select the AVSWATX extension in ArcView. If you have problems, you may need to choose ‘only for me’ option while installing AVSWATX. 0.4 Update swat2003.exe After installing AVSWAT-X you have to put an update of swat2003.exe into AVSWATX/AvSwatPr/ 5 I Getting started.... I.1 Activate AVSWATX as an extension Open ArcView (in ESRI folder of the programmes listed in the start menu). Choose Cancel for this window. Open AVSWAT-X as an extension. 6 PROBLEM: AVSWATX is not in the extension list. This means that AVSWAT-X was not installed -> See step 0.3 PROBLEM: you can not run the extension: this might be due to authorisation issues. Try to install AVSWATX with proper authorisation. I.2 Open a new project Make a directory (e.g. D:\\AVSWATX\NILE) and put your data directory there and put all the data in that folder. 7 . 8 Open a new project, e.g. name NileModel in the Nile directory: Make proper reference to the data directory: 9 II DEM delineation II.1: DEM Set-up Load your DEM by clicking on the open folder symbol: Choose “Load DEM grid from disk”. 10 Select dem_af You should provide the projection information for the DEM. PROBLEM: you can not load the DEM (or other maps). This might be due to having ‘spaces’ in folder or file names. E.g. ‘Nile Model’ in stead of ‘NileModel’ 11 Load the mask and digitized streams network in the same way and push on ‘Apply’ 12 PROBLEM: Apply is not activated. This is probably because the projection has not been specified. You’ll get the following window: 13 Answer ‘Yes’ II.2: Stream definition Provide threshold area = 1 000 000 ha, then push on ‘Apply”. Select manually the outlet of the Blue Nile (use the focus in ArcView). II.3 Save your project If the DEM processing was successfull, please SAVE your project 14 15 III Definition of Land Use and Soil Themes III.1 Define the Land Use data Push on the open folder symbol and select a first “Load Land Use theme from Disk” and hence “Grid”. Open the folder for the Lookup data: 16 Load the User table (named “\Lookup\landuse.dbf”) Push on “Reclassify” PROBLEM: Reclassify is not activated. This is probably because the lookup table was not loaded. III.2 Define the Soil data The soil grid is loaded in the same way as the Land Use grid. A lookup table “soil_af.dbf”has to be loaded (option “Name”). PROBLEM: Reclassify is not activated. This is probably because the lookup table was not loaded. 17 III.3 Overlay Soil and Land Use map Just by clicking on “overlay”. PROBLEM: Overlay is not activated. This is probably because you should first push on “reclassify” both Land Use as for the Soil data. III.4 Save the project IV Definition of Land Use/Soil distribution IV.1 Define the Hydrological Response Units Select: “Multiple Hydrologic Response Units”, and select the thresholds (5%/5% in this example). Push “OK” If all goes well, AVSWATX will automatically load the SWAT View 18 You can switch between the views “SWAT View” and “Watershed” in the Windows menu. IV.2 Save your project 19 V load the weather data V.1 Open “Input” menu and select “Weather Stations” V.2 load the rainfall data Select “Raingages” and load the file pcpnile.dbf V.3 load the temperature data Select “Climate stations” and load the file tmpnile.dbf V.4 load the weather simulation data Select “Custom database” and load the file wgnnile.dbf V.5 Push OK 20 VI Build the input data VI.1 select “Input” menu and select “Build all defaults” The following windows will get open. All types of input files will be created one by one. VI.2 Create Watershed Configuration File (.fig) Just push on ‘Continue’ VI.3. Create Soil Input (.sol) In case of error: 21 Please update the ../AVSWATX/AvSwatDb/usersoil.dbf file (step 0.2) for the Nile data set VI.4 Create Weather Generator Input (.wgn) In case of error Please update the ../AVSWATX/AvSwatDb/userwgn.dbf file (step 0.2) for the Nile data set. VI.5 Create Subbasin General Input (.sub) Select ‘No’ VI.6 Create HRU General Input (.hru) VI.7 Create the Main Channel Input (.rte) Select ‘No’ 22 VI.8 Create Groundwater Input (.gw) VI.9 Create Water Use Input (.wus) VI.10 Create Management Input (.mgt) Select ‘Yes’ In case of the error: Please update the ../AVSWATX/AvSwatDb/crop.dbf file and .../AVSWATX/AvSwatDb/crop.dat (step 0.2) for the Nile data set. VI.11 Create Soil Chemical Input (.chm) VI.12 Create Pond Input (.pnd) VI.13 Stream Water Quality Input (.swq) 23 VII Run SWAT Select in menu “Simulation” the option “Run SWAT” The following window will open: Push first on “Setup SWAT RUN” Select “No” Push on “Run SWAT” 24 In case of the error: Please update the swat2003.exe in ../AVSWATX/AvSwatPr/swat2003.exe (replace the file) as described in step 0.4 or you should update cr../AVSWATX/AvSwatDb/crop.dat in step 0.2 25 VIII Reading the outputs If SWAT ran successfully, you get this window. Push on ‘Yes’. Go to the SWAT view. You can look at the results by using “MapChart’ Option in the reports menu. Select a simulation: 26 You can select a subbasin (in case you want to see a basin wide map, it does not matter), a variable (see SWAT manual) and a time period. SWAT will calculate a Chart (time series) and a basin-wide map then for the variable. You can find the map in the SWATView. The Chart corresponds to the selection in the table. If you select more lines (use the shift), you will get more results in the chart. You can export the table (only the selections) and the map towards a *.jpg (View -> Layout; File -> export ) 27 28 You can find other results in the Report -> show list (e.g. basin wide statistics in the .std file). You can also find output tables in Or find the actual input and output files in the txtinout folder. 29 IX Manually changing the input files You can change the inputs in the EDIT INPUT menu (SWAT view). If you chose ‘subbasin parameters’ you get the following window. You can select a subbasin, a land use and a soil type and an input file extension (see SWAT manual). e.g You can add operations in the management file. 30 After you have done the change, you can copy these to other HRU’s in the following window 31 Another way of changing parameters is to edit de dbf in the default/tablesin/ folder. 32 To have these changes activated in your model, you should do the following Open the SWAT simulation window, push on ‘setup SWAT run’ select Ýes After you have done this, you should rewrite the input files of the changed dbf’s: Your simulations will be stored in a separate folder (sim#+1). 33 X Running the sensitivty and auto-calibration tools X.1 Activating the sensitivity and auto-calibration tools These tools can be activated in the SWAT View by choosing “AVSWATX extensions” in the “Tools” menu. Please activate AVSWATX Sens-Auto-Unc. When done successfully, you will find options “sensitivity analysis” and “auto-calibration and uncertainty” in the “Tools” menu. 34 X.2 The sensitivity analysis X.2.1 Running the sensitivity analysis The sensitivity analysis is started at “tools menu”. First, a window appears where you can select the scenario and the simulation. Next, a the following window will appear. You can choose here between an analysis for flow only, flow and suspended sediments or also for Water Quality. For the sediments and other water quality variables, you can choose between an analysis on the loads or the concentrations. A sensitivity analysis will be carried out by default on the change of the mean value of the output variables of interest (e.g. mean flow during the entire simulation time). In addition, you can also do a sensitivity analysis on the objective function that is of interest for calibration. This is only possible in case you load an observation file with the observations of the variable of interest. In that way, the objective function (by default equal to the sum of the squared errors between the observations and the simulations) will be calculated during each run. The effect of a change of a parameter value on this objective function will then be calculated. After pushing on the “start” bottom, 340 simulations will be started. X.2..2 Looking at the input files C:\AVSWATX\swatdemo2\scenarios\default\sim1\txtinout\sensitivity\ The main sensitivity input file is sensin.dat 35 Some files have been changed: - file.cio - basins.fig Other input files (general) are: - changepar.dat - objmet.dat - responsmet.dat X.2.3 Looking at the results By clicking on the “REPORT” bottom, the following window will appear: This gives a list of the parameters ranking. Each line corresponds to a result. The results for OF1 refer to the results for the Objective Function (Sum Squared Errors) for flow while OF2 refers to the sediment loads (this will not make much sense, since no data where provided for the sediment loads). OUT1 refers to the sensitivity analysis results for the average flow output, while OUT2 provides a ranking for the average sediment load output. You can see that for all the outputs, the Curve number is the most sensitive (it gets rank 1). Parameters that are not sensitive at all, get the rank 35 = number of parameter +1. More details can be found at sensout.out, 36 sensobjf.out, sensrespons.out. X.3. The auto-calibration X.3..1 Running the auto-calibration An auto-calibration can be started by clicking on the “auto-calibration and uncertainty” option of the menu “Tools”. After selecting a scenario and a simulation, the following winding will appear: First, you should select parameters (as example, select “Sol_K”, “Cn2”, “Alpha_Bf”, and “Surlag”). You can change default settings for the parameters by dubbelclicking on the parameter names. Please do so for CN2, where the update method and ranges were changes according to: 37 Next, you can select a watershed outlet, and providing an observation file for that node by dubbelclicking on the number of the outlet. In this example case, the outlet of the entire basin corresponds to outlet number “3”. For an auto-calibration, you should first make an observation file. We did not provide this for this exercise. 38 X.3.2 Looking at the input files The ParaSol input file that has been created is called ParaSol.in. It contains the control parameters for the SCE-UA algorithm and some statistics for the uncertainty analysis. 39 X.3.3.3 Looking at the results The best start is to open the report “detailed output for each optimisation loop”, what corresponds to the “parasolout.out” file. The first part of the files gives an summery of the inputs: the parameters are listed (these are also listed in “changepar.dat”, followed by a list of objective functions, also listed in “objmet.dat”(only one in our case), and the outputs of interest (however, not used in calibration) that are listed in “responsmet.dat”. The general control settings for the SCEUA optimisation method, given in parasolin.dat, are listed below. 40 Below, intermediate results for each loop will be given. You can manually interrupt the calibration process. In that case, the results of the last loops can be used for further processing. During the loops, we see that the Nash-Sutcliffe efficiency improved from -8.21 to 0.31. If ParaSol itself ends the optimisation, you will find the following below the parasolout.out file, with some statistical results on uncertainty: 41 The best parameter sets are printed in bestpar.out 0.99912E+02 Sol_K 0.00000E+00 Surlag 0.95914E+02 CN2 0.10000E+01 Alpha_Bf Unfortunately, here stops the automated part of the auto-calibration. To actually run the best parameter sets, you have the following options: - you manually change the parameters through the interface. In that way, you can further use the interface for further changes, output data processing etc. The quickest way is probable to update the tables C:\AVSWATX\swatdemo2\scenarios\default\tablesin 42 For instance, you will find the CN2 values in the file mgt1.dbf. For rerunning SWAT, you should choose the option for “YES” in window below and rewrite the corresponding files (when updating mgt1: this is mgt). - you run your model outside the interface, but that is much less user friendly. To do so, you should copy C:\AVSWATX\AvSwatPr\swat2003.exe to C:\AVSWATX\swatdemo2\scenarios\default\sim1\txtinout\autocalibration and change ICAL=4 in File.cio. Reference: Tessema R., Agricultural Drought Assessment for Upper Blue Nile Basin,Ethiopia using SWAT, MSc Thesis, Master of Water Science and Engineering, UNESCO-IHE, 2007. Schuol, J., Abbaspour, K.C., 2007. Using monthly weather statistics to generate daily data in a SWAT model application to West Africa. Ecol. Model. 201, 301-311. SWAT manuals that can be found at http://www.brc.tamus.edu/swat/ 43