mgb-iph application example manual using iph-hydro … · mgb-iph application example manual using...

86
MGB-IPH application example manual using IPH-Hydro Tools February 2017 Pedro Frediani Jardim Ayan Santos Fleischmann Vanessa Righi Coelho Aline Meyer Oliveira Dieyson Pelinson Otavio Passaia Bibiana Rodrigues Colossi Paulo Rógenes Monteiro Pontes Vinícius Alencar Siqueira Fernando Mainardi Fan Walter Collischonn

Upload: vanthuan

Post on 20-May-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

MGB-IPH application example manual using IPH-Hydro Tools

February 2017

Pedro Frediani Jardim Ayan Santos Fleischmann

Vanessa Righi Coelho Aline Meyer Oliveira

Dieyson Pelinson Otavio Passaia

Bibiana Rodrigues Colossi Paulo Rógenes Monteiro Pontes

Vinícius Alencar Siqueira Fernando Mainardi Fan

Walter Collischonn

Page 2: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Contend 1 Introduction .......................................................................................................................... 5

1.1 How to use this manual ................................................................................................. 5

2 Discretization using IPH-Hydro Tools .................................................................................... 6

2.1 Digital Elevation Model ................................................................................................. 6

2.2 Building a Mosaic .......................................................................................................... 8

2.3 Extracting the area of interest ...................................................................................... 9

2.4 DEM processing: Sink and Destroy .............................................................................. 12

2.5 Flow Accumulation ...................................................................................................... 13

2.6 Drainage Network definition: Stream Definition ........................................................ 14

2.7 Watershed Delineation ............................................................................................... 15

2.8 Delineation of sub-basins: Watershed Delineation once more .................................. 17

2.9 Extraction of areas of interest ..................................................................................... 19

2.10 Segmentation Tools ..................................................................................................... 19

2.10.1 ArcHydro Segmentation ...................................................................................... 19

2.10.2 Length Accumulation/Segmentation .................................................................. 20

2.10.3 Minimum Length Segmentation ......................................................................... 21

2.11 Catchment Delineation ............................................................................................... 22

2.12 Conversion to vector files ............................................................................................ 23

2.12.1 Drainage Line ....................................................................................................... 23

2.12.2 Watershed Polygon ............................................................................................. 23

2.13 Creating Hydrological Response Classes ..................................................................... 24

2.13.1 Option 1: Using an external database of vector data type ................................. 24

2.13.2 Option 2: Using the South America HRC map ..................................................... 32

2.14 Completion of the pre-processing using IPH-Hydro Tools .......................................... 34

3 MGB-IPH .............................................................................................................................. 36

3.1 Generation of minibasins centroids shapefile ............................................................ 36

3.2 Description of Hydrologic Response Classes ............................................................... 37

3.3.1 Alternative 01: National Water Agency data (ANA) - HIDROWEB ...................... 40

3.3.2 Alternative 02: satellite data for South America - MERGE / CPTEC .................... 41

3.3.3 Alternative 03: Global satellite data – TRMM ..................................................... 44

3.3.4 Alternative 04: Other precipitation data sources ............................................... 44

3.4 Generating observed flow file ..................................................................................... 45

3.5 Download of Flow and Rainfall data ........................................................................... 47

Page 3: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

3.6 Climate data management .......................................................................................... 47

3.6.1 Alternative 1: Internal database to Brazilian basins (INMET) ............................. 48

3.6.2 Alternative 2: Climatic Research Unit (CRU) database ........................................ 48

3.6.3 Alternative 3: Daily climate database ................................................................. 50

3.7 Definition of Vegetation Parameters .......................................................................... 52

3.8 Definition of calibration parameters ........................................................................... 55

3.9 Creating a simulation project ...................................................................................... 56

3.10 Simulation ................................................................................................................... 57

3.11 Results view ................................................................................................................. 58

3.11.1 Compare observed and calculated hydrographs ................................................ 58

3.11.2 Compare flow duration curves ............................................................................ 60

3.11.3 Visualize calculated hydrographs only ................................................................ 60

3.11.4 Visualize flow duration curves only ..................................................................... 60

3.11.5 Visualize water depth time series ....................................................................... 60

3.11.6 Visualize flooded area time series....................................................................... 61

3.11.7 Flood Post-processing ......................................................................................... 62

3.12 Manual Calibration ...................................................................................................... 64

3.13 Automatic Calibration ................................................................................................. 67

4 Other tools .......................................................................................................................... 72

4.1 Edition of mini.gtp file ................................................................................................. 72

4.2 Fluviometric station hydrograph ................................................................................. 73

4.3 Base flow filter of fluviometric station ....................................................................... 73

4.4 Flow duration curves from flow gauges data .............................................................. 75

4.5 Rainfall gauge chart ..................................................................................................... 75

4.6 Create precipitation data raster .................................................................................. 75

4.6.1 Annual average precipitation raster ................................................................... 76

4.6.2 Raster de precipitação acumulada ...........................Erro! Indicador não definido.

4.6.3 Interface and raster file generation .................................................................... 76

4.7 Internal database ........................................................................................................ 77

4.8 Longitudinal profile ..................................................................................................... 78

5 Troubleshooting .................................................................................................................. 80

5.1 Windows Settings ........................................................................................................ 80

5.2 Solving problems with the command prompt ............................................................ 80

5.3 Problems running MGB PreProcessing ....................................................................... 82

Page 4: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

5.4 Problems to simulate .................................................................................................. 83

5.5 Problems in the visualization of the simulation results .............................................. 84

5.6 Problems in the reading of ASCII columns files ........................................................... 84

5.7 Inertial Module Information ....................................................................................... 84

6 References ........................................................................................................................... 86

Page 5: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

1 Introduction

This manual aims the introduction and application of the MGB-IPH hydrologic simulation

model (Collischonn, 2001; Collischonn et al., 2007, Paiva et al., 2013) for the Almas River,

located in the state of Goiás in Brazil, from the data acquisition to the results visualization and

calibration.

Input files pre-processing will be performed with the IPH-Hydro Tools package, a plugin design

for the MapWindow GIS software as the MGB-IPH. At this pre-processing step files that

describe the terrain are generated like drainage network, watershed delineation, catchments,

and the hydrologic response classes. From the gathered information, a file called "Mini.gtp"

and other data are generated. This file concentrates the information about each catchment

discretized in the study basin, such as upstream drainage area, centroids coordinates, length of

the segmented stream, among others. This topology file is fundamental in the following steps

of hydrologic data preparation and MGB-IPH simulation.

Based on the data returned from the preprocessing, starts the preparation stages of data for

the hydrologic model using the tools available on the MGB-IPH plugin. Rainfall, flow, climate,

fixed and calibration parameters data are organized in a way to allow the simulation through

the model. In the end is performed the simulation and then the model calibration, post-

processing and results visualization.

IPH-Hydro Tools and MGB-IPH plugins download can be done through our research group

website: https://www.ufrgs.br/lsh/.

1.1 How to use this manual

This manual presents all the tools available on the MGB-IPH interface, besides showing the

steps required to run the model using the IPH-Hydro Tools for the data preprocessing. In case

the user has interest, it is possible to perform the same steps using the ArcHydro or other GIS

platforms applied to hydrologic resources. Manuals for the old version of the MGB-IPH with

this others softwares are available on the MGB-IPG 2011 page (only in the Brazilian version).

In the manual, for each processing step there are many possible alternatives and each one of

them are exemplified. For example, in section 3.3, are presented three possible ways for

precipitation data utilization: (1) data from the Brazilian National Water Agency (ANA); (2)

MERGE/CPTEC satellite data; e (3) data from TRMM satellite. Is up to the user to choose the

best alternative according to the study case.

Warning: To run the MGB-IPH it is necessary that the region and language windows

settings are correct. To do so, enter Control panel / Region and language and set the

format to Português (Brasil) and in additional settings, put the decimal symbol point ('.')

and as thousands separator the comma (',').

Page 6: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 1 presents an application flowchart for the MGB-IPH model.

Figure 1. Application flowchart for the MGB-IPH model.

2 Discretization using IPH-Hydro Tools

2.1 Digital Elevation Model

The first step before start using the IPH-Hydro Tools package is the construction of a

database to feed the program. You must initially acquire a Digital Elevation Model (DEM)

which is a raster file where each cell represents the terrain elevation with a certain spatial

resolution.

Some sources for acquiring such models for free are the Consultative Group for International

Agricultural Research (CGIAR) (http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp), where it

is possible to download the data directly in the ASCII format, the UFRGS Ecology Center

Geoprocessing Laboratory (http://www.ecologia.ufrgs.br/labgeo/index.php?option=com_

content&view=article&id=51%3Ageotiff&catid=9%3Anoticias&Itemid=16) and through the

Brazilian Agricultural Research Corporation (Embrapa) (http://www.relevobr.cnpm.embrapa.br

/download/index.htm). All this sites provide DEM based on images from the SRTM (Shuttle

Radar Topography Mission) with a spatial resolution near 90 meters.

Page 7: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

For the Almas River basin, we will download the DEMs files in GeoTiff through the CGIAR

platform in the WGS 1984 geographic projection. Observe that 4 tiles are necessary to cover all

the basin as shown in Figure 2. Those are: srtm_26_15, srtm_26_16, srtm_27_15 and

srtm_27_16, each one with three files that you must unzip.

From now on is advised that you create on your working directory a folder exclusive for the

discretized data coming from IPH-Hydro Tools. This will provide a better organization of your

files. In this case we will name this folder "IPH-HydroTools".

Figure 2. Necessary DEMs for delineate the watershed.

Now open the MapWindow, add those files using the "Add Layer" bottom and press OK in

the following message. The files should be presented as shown in Figure 3, but not necessarily

with the same color scheme.

Figure 3. DEMs loaded on the MapWindon interface.

Page 8: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

2.2 Building a Mosaic

As in this case, many times the interest area won't be completely inside one DEM tile. In

these situations is necessary to join the DEMs in a single mosaic that covers all the watershed.

Using the Merge Grids tool located in Raster tools on the Toolbox tab from MapWindow

(usually placed on the left side of the screen) is possible to join two or more raster files that

have the same projection system and spatial resolution.

Open the tool and select the 4 downloaded files that will be displayed on the Select Grids

window. Click OK to open the Output Options window where we will select as output data

format ASCII (*.asc) which we will give the name "Mosaic". This step is shown in Figure 4. Then

click Finish. This step can take a few minutes.

Figure 4. Merge Grids tool used to join the DEMs.

ASCII files created from tools that came with MapWindow have a header writing in a

different way from that which IPH-Hydro Tools was designed to read (ESRI type). So it is

necessary to convert the ASCII type in order to use it.

Still regarding file formats, throughout this manual several files will be created from the DEM

file in ESRI ASCII format. This files however can be generated with .asc extension or the binary

IRST form (.irst). This last format decreases a considerable amount of time when processing

tasks but it cannot be displayed on MapWindow’s graphic interface.

Click on Plugins in the superior tab of MapWindow and then on IPH-Hydro Tools to make the

package available for using. It is now shown in the superior tab with its tools as presented on

Figure 5.

Page 9: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 5. Tools available on IPH-Hydro Tools.

To convert the mosaic ASCII type to ESRI click on Convert ASC Type on the menu

Management Tools from IPH-Hydro Tools. A window as show on Figure 6 will be displayed in

which you must indicate the mosaic on MapWindow ASCII File and the converted file on ESRI

ASCII File. Here we will name it “Mosaic_Map” and save it on the “IPHHydro-Tools” folder.

Click in Process.

Figure 6. Convertion ASCII type tool.

From now on it’s advisable for you to save your MapWindow project. We also suggest that

you keep saving it at each new processing step is completed if for some reason you have to

interrupt the software. This can be done through the Save bottom located on the superior tab

of MapWindow.

2.3 Extracting the area of interest

In order to speed up the process and save time it is good to clip the mosaic generated from

the DEMs, excluding those areas outside the basin. This is possible by using a polygon that

surrounds the entire basin, leaving a certain gap from its limits to make sure that all of it is

inside the polygon.

Page 10: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

To make it easier to identify the area of interest you can access ANA’s Hidroweb page

(http://hidroweb.ana.gov.br/) and download the data from Tocantins River basin, as presented

in Figure 7, unzip and load the “Hidrografia1000000” file on your Project.

Figure 7. Hidroweb portal for hydrological data acquisition.

If you click with the right bottom on the loaded file name in the Layers tab and then on

Attribute Table Editor, you can select the Almas River by clicking the Build Query bottom and

writing “*NUCOMPRIO+ = 317.2“ as shown in Figure 8. Click Execute and use the Zoom to

Select tool located on the inferior left side of the attribute table.

Figure 8. Drainage network visualization with Almas River highlighted.

Page 11: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Now we need to create a vector shapefile that will allow us to extract the area of interest

from the mosaic developed. To do so you must make sure that the Shapefile Editor plugin is

available on MapWindow. You can do this by clicking on the tool’s name on Plugins menu.

Once the plugin is set, its tools became available and are presented as in Figure 9.

Figure 9. Tools existing on Shapefile Editor plugin.

Click in New and a window will appear. You must indicate a name and path for the shapefile

on the Filename field. In the same window specify Polygon in the Shapefile Type. In this case

we will name it “Mask_Map” and will save it in the IPH-HydroTools folder. Click OK and the file

created will appear on the Layers window of MapWindow but nothing will be displayed in the

data view window as the file is empty. We must now delimitate our interest area with this

shape.

Select the shapefile by clicking on it in the Layers tab. It is now possible to click the Add bottom

shown in Figure 9. By doing so the mouse cursor will change into a “cross” and a little window

with its position coordinates will popup.

Click on the data view to add the polygon vertices one at a time in a way that the entire basin

is within the polygon. To finish the drawing give a double click upon the first marked vertice.

Your result must cover at least the area shown in Figure 10.

Figure 10. Mask drawed uppon ANA's drainage network and DEM mosaic.

Every time you create a mask to clip a DEM for using IPH-Hydro Tools it is very important to

try to avoid the inclusion if ocean areas. These regions are very broad and plain and it usually

leads to trouble and a significant amount of time for processing the tool called Sink and

Destroy, which we will use next to remove depressions.

Page 12: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Now let’s clip this area of the mosaic. Open the Extract Raster by Polygon from IPH-Hydro

Tools, Figure 11, located in Management Tools tab and indicate the mosaic file on Input Raster

File field and the shapefile “Mask_map” on Polygon Mask File. We will call the generated file

“Mosaic_extract” and save it as an ASCII file.

Figure 11. Extract By Polygon tool for raster clipping.

Click Process and add the file to your data view window to observe the result.

2.4 DEM processing: Sink and Destroy

Usually the first step when working with DEM files to create drainage networks and delimiting

watersheds is removing depressions. Those occur when the elevation value of a cell or set of

cells is lower than its surrounding neighbors. This causes the program not to find the flow

direction to delineate the drainage network.

With the Sink and Destroy tool from IPH-Hydro Tools it is possible to remove those

depressions with two methods: MHS (Modify Heuristic Search) and PFS (Priority-First-Search).

These methods are presented by Siqueira et al., 2016 (in portuguese)..

Open the tool and enter with the clipped DEM on Raw DEM File field. In Correct DEM Output

File indicate the path and name of the created file. As in this case the visualization of the result

doesn’t matter to us we will name it “Almas_MHS” and save it as a binary IRST file.

With this same tool you can perform the process of flow directions by leaving marked the

Process D8 Flow Direction option. The resulted file has at each cell a value that corresponds to

the direction that the water should flow at that point. This file we will name “Almas_fdr” and

also save it in IRST format.

In this manual we opt for the MHS removing depression method. Now on the Sink and Destroy

window, where it says Max Open List Number and Max Closed List Number, write 2000000 and

1000000 respectively. These height values allows the tools to find a “way out” in the flow

directions. These were also used to process way larger basins as the one from São Francisco

River or in a very plain region like Purus River on the Amazon forest. We will keep the Cost

Function Weight field value as 2. Figure 12 shows the Sink and Destroy window with its fields

and values filled.

Page 13: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

After filling all the fields press Remove Sinks! and wait for the success message to popup.

Figure 12. Sink and Destroy tool for depression removal.

2.5 Flow Accumulation

Once the flow direction file is created, we can use the tool Flow Accumulation to create a file

where each pixel will have a value with the number of cells that drains to it. It allows the

generation of the drainage network from a user defined number of cells, percentage of cells or

drainage area.

Thus, select the flow direction file generated previously in the field D8 Flow Direction File

(Figure 13). Next steps require a visual analysis, so we will create a file called "Almas_fac" in

the ASCII (.asc) format.

Figure 13. Flow Accumulation tool.

Click Process, and after it is done, add the file to the MapWindow screen.

Page 14: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

2.6 Drainage Network definition: Stream Definition

To create the basin drainage network, we need firstly to choose the drainage area that will

define the beginning of the drainage network. It can be done from user defined parameters,

with a minimum number or percentage of cells that drain to the point where the drainage

begins, or even with a minimum contribution area to start the drainage network. Thus, firstly

we open the flow accumulation file in the Mapwindow screen to then define a minimum

drainage area. The choice of this value depends on user experience or previous knowledge of

the area of study. A very low threshold leads to a very branching drainage, which can be not

interesting for the user, while a very high value can exclude important tributaries. For more

detailed information on it the user is directed to Fan et al. (2013) (in portuguese).

You can use the Mapwindow zoom tool to locate an area near the basin borderline to identify

flow accumulation values that you consider the beginning of the drainage work, by using the

Identify tool and making a rectangle around this area of interest that includes the beginning of

stream network. The High Value information indicates the number of cell that drain to the

largest drainage in this region. In our case, a value of 9078 was found, but you will possibly

found different values.

Figure 14. Identification of threshold values from Flow Accumulation file.

Now we can use the IPH-Hydro Tools Stream Definition tool to generate the drainage

network. In this window, first is necessary to indicate the Flow Accumulation File in the

respective textbox, and an Area Threshold value, for which we will indicate 9000 (as observed

above). For this case you can let selected the Number of Cells option. The output file will be

called "Almas_strd_9000" and will be in ASCII format, because, besides being interesting to

visualize the results, we will further need it to create the basin outlet point.

Page 15: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 15. Stream Definition tool window.

Click Process, press OK for the first message Box and then wait the “success” indication. Add

the generate file to MapWindow screen.

At this point it is highly recommended that the user evaluates the generated drainage network

so that it represents all rivers of interest in the basin, and on other hand, that it is not

excessively dense. If the user is not satisfied, the stream definition step can be done again,

using a different area threshold for drainage definition.

2.7 Watershed Delineation

To define a watershed region, we first need to define the basin outlet point. For this case we

will select a point on the drainage network that is located near the confluence between Almas

and Maranhão rivers, in the latitude -14,570 and longitude -49,042. You should then create a

point-type vector file at this coordinates or near it so that the watershed outlet be defined at

its correct outlet. For that, click in MapWindow New button ( ), indicate a filename (here it

will be called "Exut_almas") and the output directory where it will be saved, and finally

selecting the Point option in the Shapefile Type.

Then clique in the Add button and, in the screen, select the point located at the coordinates of

interest (lat-long coordinates are displayed at the left-bottom corner of the MapWindow

screen). It is worthwhile to use the zoom tool to locate with more precision the point of

interest. Note that the point does not need to be exactly above the drainage network, but

nearer as possible from the drainage of interest. Figure 16 shows the local where the point

shape was inserted.

Page 16: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 16. Point location to define the watershed outlet.

Once the outlet point is defined, open the IPH-Hydro Tools Watershed Delineation tool and

indicate the flow direction and stream definition files in the first two fields, respectively. In

Outlets Shapefile indicate the vector file with the just created outlet point a then click in Read

and Create New Shape. This button will carry out a snap function, where, it will utilize the

stream definition file to force the outlet to point to be located exactly above the drainage

network, generating a new outlet point shapefile. During this process it is necessary to indicate

a new filename for this corrected shapefile. We will call it "Exut_snap".

The file will be automatically loaded in the Field New Outlets Shapefile as shown in Figure 17.

The last step is to indicate the filename and directory of the watershed file Watershed

Delineation File. We will save it in the ASCII format with the name "Almas_wat".

Figure 17. Watershed Delineation tool window.

Page 17: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Then, click in Process and add the generated file to the MapWindow screen. The result must

be similar to the shown in Figure 18.

Figure 18. Generated watershed file.

Now analyze all the watershed borderlines in comparison to the DEM rasterfile from the

beginning of the project, to ensure that the watershed limits do not coincide with the DEM

borderline. If it happens it is possible that the DEM extraction for the region of interest has cut

some parts of the watershed, what is undesirable for our project. If it is your case, it will be

needed to restart the steps since the step of DEM extraction for the area of interest.

2.8 Delineation of sub-basins: Watershed Delineation once more

Here we will use again the watershed delineation tool to generate a sub-basin file for the

MGB-IPH. This file is important because the model parameters are defined for each sub-basin.

Then, for this example we will create two sub-basins for the model application. One will be the

Upper Almas River (upstream regions) and the other will correspond to the Lower Almas river

(downstream ones). The number of sub-basins is always defined by the user.

A possible criterion for the definition of sub-basins could be large areas with similar soil

occupation, soil type and geology characteristics, or even regions with different slopes. It

would be a criterion based on the basin physical processes, what is more indicated, and will be

used in this example, dividing the basin in two main regions (upper and lower ones).

Other possible criterion that is usually adopted is to locate the points where there are existent

stream gauges, so that the model parameters provided for each sub-basin can be calibrated

based on the sub-basin outlet (in this criterion it would be coincident with a stream gauge data

point) However, it is less based on watershed physics and more on model calibration, so that it

is less recommended.

Page 18: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

To generate the sub-basins, create again a shapefile of points, but now add two interest points

along the drainage (Figure 19) (you do not need to create two shapefiles, one for each sub-

basin outlet. Instead, create only one shapefile with two points). It is important that one of

these points be located exactly above the one inserted at the watershed outlet (done in the

previous section), because the watershed outlet point will define the end of one of the sub-

basins. Load the Just created shapefile of points in the WatershedDelineation window. Do not

forget to click in the Read and Create New Shape button so that the two points are located

above the drainage network. The result is shown in Figure 20.

Figure 19. Outlet points created to generate the sub-basins.

Figure 20. Sub-basins generated with the Watershed Delineation tool.

Page 19: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

2.9 Extraction of areas of interest

Once the watershed is delineated, we can extract the drainage network and the corrected

DEM that were generated previously to our region of interest (the watershed area). Then,

open the Extract Raster by Raster tool in Management Tools and indicate the

“Almas_strd_9000” file in the Input Raster File field and the watershed raster (not the sub-

basins one) in the Mask Raster File. The ouput file will be named as “Almas_strd_9000_extr”.

Click in Process and do the same for the corrected DEM file.

Figure 21. Extract Raster by Raster file to extract rasterfiles.

2.10 Segmentation Tools

The Segmentation Tools menu offers three alternatives to segment a drainage network file

previously generated. It’s important for subsequent MGB applications that the drainage

network is clipped by the basin drainage area. The choice of which segmentation method to

use influences the number of minibasins to be generated. Although three segmentation

methods are presented in this manual, the subsequent steps are based on “ArcHydro

Segmentation”.

2.10.1 ArcHydro Segmentation

The ArcHydro Segmentation tool in the Segmentation Tools menu allows the user to

segment a drainage network file, creating one reach between two confluences or between a

headwater confluence and its most upstream pixel. This file is fundamental for the MGB-IPH

model application. It is also fundamental that the segmented file be created from the extracted

drainage network from the previous section.

Open the tool shown in Figure 22 and indicate the flow direction file in the first field (D8

Flow Direction File) and the extracted stream definition file that we have just extracted with

the watershed mask (Stream Definition File). The output file will be named "Almas_seg_extr"

Page 20: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

in the Stream Link File Field and will save the file in the ASCII format, so that we can visualize

the result in the MapWindow screen.

Figure 22. ArcHydro Segmentation tool to generate a segmented drainage network.

2.10.2 Length Accumulation/Segmentation

By using the Length Accumulation/Segmentation tool, the drainage network is segmented

according to a certain maximum distance that a reach can be before it is segmented, which

leads to a subsequent more homogeneous discretization of the minibasins. This tool also

provides the accumulated length of each river reach, in other words, it provides the distance

between an analyzed cell and a confluence immediately upstream.

To use the Length Accumulation/Segmentation, open the tool shown in Figure 23 and

indicate the clipped drainage network file in the first field (Stream Definition File) and the file

with the flow direction in the second field (D8 Flow Direction File). In the “Accumulated Length

File” field, it is going to be generated the file with the accumulated lengths of each river reach,

which we have chosen to name as “Almas_acc_length”.

Select option Perform Segmented by Extension File to generate the segmented drainage

network. In Choose max extension for segmented reaches, indicate the maximum distance that

the reach can be before it is segmented, in meters. We will use a maximum distance of 10km

in this manual, that is, 10000m. We will name the file as “Almas_seg_max_length” in

Segmented by Extension File and we will save the file as ASCII in case you want to see visualize

the result.

Page 21: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figura 23. Length Accumulation/Segmentation tool to generate a segmented drainage network.

2.10.3 Minimum Length Segmentation

The Minimum Length Segmentation tool segments the drainage network according to a

minimum distance that a reach has to be before it is segmented. To use it, open the tool

shown in Figure 24 and indicate the file with the clipped drainage network in the first field

(Stream Definition File), the file with the flow direction in the second field (D8 Flow Direction

File), and the file with the flow accumulation in the third field (Flow Accumulation File). In the

Segmentation File field, it will be generated the file with the segmented drainage network,

which we have chosen to name it as “Almas_seg_min_length.asc”.

The user must choose the minimum distance that the reach must be before it is segmented

in Choose min extension for segmented reaches field, which we have considered as 10km in

this manual, that is, 10000 meters. Moreover, the user can choose if the minimum distance

upstream the reaches segmentation must consider single reaches or multiple reaches.

Figura 24. Min Length Segmentation tool to generate a segmented drainage network.

Page 22: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

2.11 Catchment Delineation

Each segment reach created by the ArcHydro Segmentation tool has its own incremental area

(herein named “catchment”), in which rainfall-runoff processes occur and the catchment

outflow is routed directly to the segment outflow.

With the Catchment Delineation tool (Figure 25) it is possible to delineate these catchments

indicating the flow direction file in D8 Flow Direction File and the segment drainage network

file in Stream Segmentation File. In Catchment Delineation File we will create a new ASCII file

named "Almas_catch_extr".

Figure 255. Catchment Delineation tool.

Click in Process and add the generated rasterfile to the screen (Figure 26).

Figure 26. Catchments generated with the Catchment Delineation tool.

Page 23: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

2.12 Conversion to vector files

An interesting way of editing/visualizing raster results is to convert it to a vectorial format. IPH-

Hydro Tools allows this type of conversion for drainage network, watershed and catchments

files.

2.12.1 Drainage Line

Through the DrainageLine tool you can convert the segmented drainage generated in the step

2.6 from raster file to a vector format. Indicate the flow direction and segmented network files

in the Input files fields. They can be provided either in IRST or in ASCII formats. In DrainageLine

File it is only necessary to inform the directory and output name of the file to be generated,

which will be set to a .shp format (file in the shapefile format) in the polyline format. It will be

named as "Almas_dren". Click Process.

Important: this tool only works for the drainage networks that were segmented with the

ArcHydro Segmentation method, and it will be asked IF you are certain that you have used

this method to create the segmented input file. If you have used other tools such as

LenghtAccumulation/Segmentation to generated it, the DrainageLine tool wil not work

properly..

Figure 27. Converting the segmented drainage from rasterfile to vector format.

2.12.2 Watershed Polygon

With the Watershed Polygon tool (Figure 8) you can convert a watershed, sub-basins or

catchments file to a shapefile with the polygon format. At this step it is only needed to provide

the input raster file to be converted, either in IRST or in ASCC formats.

Click in Process and visualize the generated file in the MapWindow screen.

Page 24: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 28. Converting a watershed, sub-basins or catchments rasterfile to a vector format.

2.13 Creating Hydrological Response Classes

Hydrological response classes are specific regions in the basin with similar characteristics in

respect to geological attributes, soil type and land use / vegetation cover. Theoretically, these

units would have the same response to water budget-related processes, like runoff generation

or evapotranspiration.

There are several ways to obtain the HRC maps. In this manual, the following alternatives are

presented to generate the HRC files for MGB-IPH input:

Option 1: Using an external database of vector data type;

Option 2: Using the South America HRC map (only for basins inside this domain);

The alternatives mentioned above are discussed in the next sections. Also, the user can select

another option of his/her interest for HRC generation.

2.13.1 Option 1: Using an external database of vector data type

In this section, you will find how to generate a HRC file from a land use or soil type shapefile.

The same method can be applied to any other database.

2.13.1.1 Soil type

The Almas river Basin is entirely located within Goias state, Brazil. For this area, soil type and

land use information can be downloaded directly from SIEG (http://www.sieg.go.gov.br/), a

website of the Goias State Government (Figure 29). Vector maps are available in a reasonably

resolution at this website, so we are going to use them for MGB-IPH input. In addition, for

other Brazilian basins with lack of regional soil type data, this information can be found on

RADAMBRASIL project.

Page 25: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 269. Acquisition of soil type and land use vector maps from SIEG website.

Download the soil type data in shapefile format and add it to your project. However, is

noteworthy that the domain covers an area much greater than Almas river basin, so we need

to clip data only for our region of interest.

This step can be done with a MapWindow tool named "Clip Shapefile With Polygon",

located at toolbox Old Tools. For this, we can use the basin polygon created on section 2.7, as

shown in Figure 30. Open the tool, select the soil type shapefile for the first field and the basin

polygon for the second one. Click on Select Shapes and also on the basin polygon in the

MapWindow dataframe, making sure the polygon is also selected in the Layers tab. Click on

Done, where previously was the Select Shapes button, and indicate the path of the output file

(herein, we named it soil_type_clip) and click OK.

Page 26: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 30. Clip With Polygon tool for data extraction to the area of interest.

Once the soil type shapefile is clipped, we must convert it to a raster grid data type. For this,

you need to have the Shapefile to Grid plugin installed, which is available at

http://www.mapwindow.org/apps/wiki/doku.php?id=shapefile_to_grid. When enabled, it

appears as a purple icon in MapWindow toolbar as highlighted in Figure 30.

However, before grid conversion, we have to first edit the attribute table of the clipped file in

order to create a numeric type field, which is necessary to link specific features of the

shapefile. Open the attribute table of the clipped shapefile, click on Edit > Add Field and create

an integer "Type" field, with 10 units of width as shown in Figure .

Figure 31. Adding a specific field on the attribute data table.

Page 27: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Search for the field "Categoria" in the attribute table, right-click on it and then click on "Sort

ASC" to ordinate the field and facilitate the selection. If you look to the values in this field

you'll note that there are 6 different soil types: Argissolos (Ultisol), Cambissolos (Cambisol),

Chernossolos (Chernosol), Gleyssolos (Gleysol), Latossolos (Latosol) and Neossolos (Neosol).

Using the Build Query tool, select each soil type using the formula [CATEGORY] =" Argissolos ",

changing only the last term as in Figure .

Figure 32. Selection of soil types using the Build Query tool.

After each new selection, open the Field Calculator box (it is an icon that looks like a calculator

in the attribute table), select "Type" on the Destination Table Field, and enter a value from 1 -

6 for each soil type as shown in Figure . After doing this, click on Calculate and then on Apply,

in the attribute table. For the example of this tutorial, assign the following values: Argissolos =

1, Cambissolos = 2, Chernossolos = 3, Gleyssolos = 4, Latossolos = 5 and Neossolos = 6.

Page 28: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 33. Inserting a unique value for each soil type in the Attribute table editor.

At the end, you will have a specific number linked to a particular soil type description, so

both Category and Type fields are connected in this way. Now open the Shapefile to grid tool,

search for the edited file with the option "Use a file from disk" and indicate the "Type" field in

the bottom tab. Click OK and a window will appear asking about the characteristics of the

raster to be created. Here, we select the Minibasins file for both cell size and grid extent fields.

For Grid File and Grid Data types, select ASCII and ShortDataType, respectively. Enter the path

and filename on the last field, click Finish and add the generated file to the project.

It is important to note that "Shapefile to Grid" tool also generates files with MapWindow ASCII

specific format, so we need to convert it to ESRI ASCII type using the Convert ASC Type tool, as

previously done in this tutorial. When using this tool, we can save the generated file as

"Tipo_Solo_Map".

Page 29: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 34. Conversion from vector to raster file using the Shapefile to Grid tool.

2.13.1.2 Soil use

Likewise, you can also download land use data on shapefile format from SIEG website. Perform

the same steps as done before for the soil type, clipping the land use information with Clip tool

using the polygon of Almas river basin.

Looking at the "Uso" field in attribute table editor, note that there are 6 classifications of land

use for our basin: Agricultura (Crop), Água (Water), Área Urbana (Urban Area), Cerrado

(Brazilian Savannah), Floresta (Forest) and Pastagem (Grazing). Create a numeric field using

Edit > Add Field, and assign an unique value for each type of land use. For this example, the

name of the created field was "Uso_Num" and values were set in the following order:

Agricultura = 1; Água = 2, Área Urbana = 3, Cerrado = 4, Floresta = 5 and Pastagem = 6.

Use the Shapefile to grid tool in the same way as done for soil type, but selecting the

"Uso_Num" in the attribute field for grid cell values. Add the generated grid file to your

project, and it should be similar to that shown in Figure .

Do not forget the conversion of the grid file from MapWindow to ESRI ASCII format, using the

Convert ASC Type tool. We can save the generated file as "Uso_Solo_Map".

Page 30: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 35. Reclassified land use shown in raster data.

2.13.1.3 HRC Definition

In this section, we are going to "join" the soil type and land use files in order to generate a

single file representing the Hydrologic Response Classes. Open the Hydrologic Response

Classes tool in the MGB-IPH Tools and set the Land Use and Soil Type grid files (Uso_solo_Map

and Tipo_solo_Map) for the two first fields in the group box Raster Data Sets. In the field

named "Copy spatial parameters from", you can indicate any other grid file generated after

the correction of the Digital Elevation Model (e.g. Flow Direction, Flow Accumulation,

Watershed, Minibasins). This option adjusts the Soil Type and Land Use spatial data, like

number of rows, number of columns, extents and spatial resolution, to be the same as the

spatial data of another reference grid. For instance, we will set the minibasins grid as the

spatial reference for this tutorial.

After this, you can notice that there are 3 tabs associated with Land Use, Soil Type and HRC.

Select the Land Use / Vegetation Cover and click on Scan Land Use (LU) classes. Another

window will open asking for a location and a filename, but you can keep the suggested name

of "Uso_solo_Map_Adjusted". This procedure will match the spatial information between

reference and land use data.

The fields Land Use / Vegetation Class and Actual Classification will now be available for

editing. The first one is related to the original class of the input file, while the latter can be

interpreted as a "class grouping" to reduce the number of total classes. In this case, we only

have 6 land uses and is not necessary to combine some classes. We can just simplify the

original name for Actual Classification, so we will give only a short alias as shown in Figure .

After setting the alias you can save a file with the class description, just clicking on the button

Save LU class names. Thus, it won't be necessary to write again the description of classes if

you need to change the grid files or something goes wrong in this procedure.

Page 31: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 36. Editing Land Use in the Hydrological Response Classes tool.

Now, repeat both scan and description steps in Soil Type tab, but in this case a

reclassification is needed in order to reduce the number of total classes. Latosols, Urlisols, and

Chernosols are usually deeper and/or well-drained soils, and can be associated to lower runoff

generation. Thus, these soils will be grouped in a category named "Deep", so you can write

down this on the Actual Classification field. In contrast, Cambisols and Neosols are shallower

soils, usually occurring in a steep terrain with a higher runoff generation. These soils will be

grouped in a category named "shallow". In addition, Gleysols can be found in wetlands where

water table is near the surface, so these soils are frequently saturated with a clear tendency to

generate runoff. We will group them on the "shallow" category, which means that Gleysols

share similar characteristics with Cambisols and Neosols in respect to runoff generation. Fill all

the text boxes as shown in Figure .

Figure 37. Editing Soil Type in the Hydrological Response Classes tool.

Finally, open the Hydrologic Response Classes tab (HRC) and click on Get HRC Combinations

button. Each class defined at field "Actual Classification" is now associated to a specific

number, different than the original Raster ID. Check the messages and press OK if everything is

correct. As you can see, the field "Composed Raster ID" was filled with some strange numbers

with values greater than 100. It happens because the original Soil Type IDs are initially

multiplied by 100 and then added to original Land use IDs, in a raster overlay operation. After

Page 32: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

this, each combination is described by a specific code, which is needed for a further

reclassification step.

Now search for the classes "water" and "urban" in HRC Class field. For these land uses, there

will be no distinction in terms of depth of soil for runoff generation, once water is always

"saturated" and urban regions are often associated to higher fractions of impervious areas.

Select the Soil Type Disabled option in the Status field for the above classes to keep only the

land use classification. Once done, select the "water" class on the field HRC associated to

water and click on Classify HRCs button. This step is necessary to generate a single number for

all classes sharing the same Land Use and Soil Type, and because the MGB-IPH needs water to

be on the upper bound of Final Raster ID for evapotranspiration computing purposes. Your

window should be similar to that shown in Figure .

Figure 38. Example of HRC tool after class definition.

Now click on Generate HRC Raster and set a name and destination for the generated file. For

this tutorial, we'll name the file as "HRC_Map" and you can choose to save it in ASCII or IRST

format. Before closing the window, also click on Generate.hrc button to create a file with the

description of the classes and its respective ID number. Set the name of this file as

"HRC_descrip", with .hrc extension.

2.13.2 Option 2: Using the South America HRC map

Another option to create the Hydrological Response Class file is to use the South America HRC

map provided by HGE group, available for download at: https://www.ufrgs.br/hge/modelos-e-

outros-produtos/mapa-de-urhs-da-america-do-sul/.

This map was generated from different databases and upscaled to a resolution of 400 m, but

for the application of MGB-IPH model it has shown satisfactory results (Fan et al., 2015). After

unzip the file, you can find the South America HRC map in binary format (.irst) and a

description in Excel format, which links the raster ID numbers to each one of the class names in

the map.

Page 33: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

At first place, we need to extract the HRC data within the area of the Almas basin and adjust

the spatial resolution to match our grid data (90 m). Open the Extract by Polygon tool (Figure

), insert the South America HRC map in the "Input Raster File" and add the polygon of Almas

river basin (shapefile) in the "Mask field". Also, enable the Copy spatial parameters from file

option and add a reference grid (it can be the Minibasins file, as already described on HRC

definition section). Set the output file as "HRC_AS_Almas" in ASCII format (Figure ), and click

on Process button to begin the extraction procedure.

Figure 39. Clipping South America HRC map with the Extract by Polygon tool.

As a requirement for MGB-IPH, it is very important to ensure at least one cell corresponding to

water class in "HRC_AS_Almas" file. Therefore, open the ASCII file in a text editor and search

for values equal to 9 (which refers to coverage of water). We can notice some cells classified as

water in a downstream area close to the outlet point (Figure ), so the model will work fine.

Otherwise, the HRC file must be edited to assign the water ID in any cell.

Figure 40. Hydrological Response Classes map extracted for Almas river basin. Green pixels represent water coverage.

Page 34: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

2.14 Completion of the pre-processing using IPH-Hydro Tools

Finally, we can process the files created at earlier steps to generate the necessary files for a

hydrological simulation using MGB-IPH model. The following files will be used:

1. Digital Elevation Model (DEM) corrected (Almas_MHS_extr.irst generated in

step 2.9);

2. Flow directions (Almas_fdr.irst generated in step 2.4);

3. Minibasins (by reachs of river basins) (Almas_catch_extr.asc generated in Step

2:11);

4. Drainage network of the basin (Almas_strd_9000_extr.asc generated in step

2.9);

5. Hydrological Response Classes (HRCs) (HRC_Map.asc generated in Step 2:12);

6. Sub-basins (generated in step 2.8).

Tip: At this point it is interesting that you save your project and create a folder named "MGB"

in your working directory. Within this also create three additional folders named: Rainfall,

Discharge and Climate to facilitate organization of files.

Open MGB-IPH Tools/MGB–Preprocessing (Figure ). The window allows you to set some

parameters that will be used for simulation with the MGB-IPH model, inside the "Mini.gtp" file.

This file contains model’s topological information, providing for each minibasin the

information such as drainage area, length and slope of the river reach, and fraction of area of

hydrological response of classes (Table 1).

All the information that can be provided in the pre-processing window is listed below. You

can leave the information standards as indicated (default values). If necessary, the file

"Mini.gtp" can be after edited in the "Geometry File Editor" tool.

- MGB Routing Method: flow propagation method. Currently only the linear

Muskingum-Cunge method is allowed via interface, but soon the inertial model (Fan et al,

2014.) will be also available;

- River Hydraulic Options: minimum and maximum slope allowed at each river reach (to avoid

numerical instabilities) and Manning coefficient;

- Bankfull Geomorphic Relationships: geomorphological relationships that relates depth and

width with the drainage area at each minibasin;

- Raster Distance Options: method to calculate the length of river reaches in raster files. It is

advisable to use the second method (Distance Transforms), described by Paz et al (2008);

- Drainage network options: if the preprocessing has previously been run, the accumulated

lengths file has already been created, and you can upload it here (it will have been created in

Page 35: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

the folder C://MGB/PREPRO/OUTPUT). Otherwise, leave enabled the "Perform length

accumulation" option.

Now, to run the preprocessing option, first indicate the files that were mentioned above (if

you do not created raster sub-basins, leave the "Disable sub-basins file" option enabled), select

an output directory ("Output Directory") and click "Perform Preprocessing".

Then you will see a black screen in which you must give Enter at the beginning of steps for

processing the correspondent files. If everything goes right, the tool will generate two files in

the directory folder that you indicated, the most important at this point is the file "mini.gtp"

described above and in Table 1.

Figure 41. Preprocessing of the MGB input files.

Table 1. File attributes list of MINI.MGB created by MGB Preprocessor.

Attribute Information

CatID Original minibasin code (provided by Hydro-Tools IPH)

MINI The minibasin number in topological order (starting from the head of minibasins to the outflow minibasin)

Xcen e Ycen Coordinates of the geometrical centroid

Sub Sub-basin which belongs the minibasin

Area Drainage area of the minibasin in km²

AreaM Total drainage area upstream of each minibasin in km²

Ltr e Str Length and slope, respectively, of the main river that runs through a minibasin

Lrl e Srl Length and slope, respectively, of the longest tributary within a minibasin

MiniJus The minibasin number immediately located downstream

Ordem MGB-IPH processing order of the stream

Page 36: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Hdr Field for further indication of the type of flow routing in the river stretch of the minibasin (0 = simplified and 1 = hydrodynamic)

Width Width of the river reach based on geomorphological equations provided in the window of the MGB preprocessing.

Depth Depth of river reach based on geomorphological equations provided in the window of the MGB preprocessing.

Manning Manning roughness

BLC_X Percentage of the area of the minibasins for each hydrological response units, where X ranges from 1 to the number of URH

3 MGB-IPH

From now on, all tools to be used are within the MGB-IPH plugin, as shown in Figure 27. The

sequence of the menu follows the logical order for preparation of model input data: (1)

Generation of minibasins centroids shapefile; (2) Preparation of rainfall data (using ANA data,

or MERGE, or other sources), flow data preparation (ANA or other data sources) and

meteorological data preparation (using internal or external data base); (3) Preparation

vegetation parameters of the model; (4) Preparation of soil parameters of the model; (5)

Compilation of multiple files generated within the project file; (6) Simulation.

Figure 27. Main tools of MGB-IPH plugin.

3.1 Generation of minibasins centroids shapefile

For the next stages of MGB-IPH model application, it is important to add a layer containing

the centroids of the minibasins. This layer is a shapefile created in the very beginning of MGB-

Page 37: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

IPH interface application, using the Generate geometry (Mini.gtp) shapefile, in the MGB-IPH

plugin menu.

In the case of the Almas River basin, mini.gtp text file, created by the MGB preprocessing step,

is read and used to create the file "Centr_Almas.shp", which is added to MapWindow project

for showing the centroids of the minibasins, as shown by Figure .

Figure 43. Generate geometry (Mini.gtp) shapefile.

3.2 Description of Hydrologic Response Classes

Open the “HRCs Description” tool in the MGB-IPH menu.

When generating the HRC file in step 2.13 we also create a description file with .hrc extension.

We now rewrite this file to the simplified description of the classes to do not have more than

nine characters in the first column of the table shown by HRCs Description tool.

If you have generated the class file from the vector files (item Erro! Fonte de referência não

encontrada. - the alternative 01 HRCs generation presented in the manual), open the tool,

click Open and enter the file '' HRC_descrip.hrc ". Rewrite it as shown in Figure and you can

save the file on the old HRC_descrip.hrc.

Page 38: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 45. Description of the hydrological response of classes using external base.

If you used the URHs Map of South America (item 2.13.2 - a alternative HRCs generation

presented in the manual), with the information provided in the worksheet downloaded file

you can fill the tool as shown in Figure . In this case also we will save with the name

"HRC_descrip.hrc".

Page 39: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 46. Description of of hydrological response classes from the URHs Map.

If you generated HRCs in any other way besides the ones described in this manual, you must

only write on the table the description of your HRCs. In this case we will also save it as

“HRC_descrip.hrc”.

IMPORTANT: On MGB-IPH the last HRC must always be a “Water” class.

3.3 Interpolation of precipitation data

To run the MGB-IPH model it is necessary to generate an interpolated rainfall data file. Thus, it

is necessary to interpolate rainfall data from rain gauges to the position of minibasins

centroids. Different databases can be used in the model. Data can be from four sources:

Alternative 01: National Water Agency data (ANA) - HIDROWEB

Alternative 02: satellite data for South America - MERGE / CPTEC

Alternative 03: global satellite data - TRMM

Alternative 04: Other sources of rainfall data

Let's explore each of these following alternatives. The user must define which one to follow.

Page 40: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

3.3.1 Alternative 01: National Water Agency data (ANA) - HIDROWEB

At this alternative input data used is from the National Water Agency (ANA). It is accessed

in the "Using precipitation data from ANA" tab.

Data from ANA come in the format that we call "HIDROWEB". The use of programs such as

"Manejo e Visualização de Dados Hidrológicos" (available at

https://www.ufrgs.br/hge/modelos-e-outros-produtos/softwares-de-manejo-e-visualizacao-

de-dados-hidrologicos/) let you change the data to a column format, which is easier for

viewing and editing.

At the present manual, ANA data will be used in the column format. Within the MGB-IPH

there is a tool for automatic download of rainfall data and discharge from ANA, which is

described in section 3.5, and automatically generates the data in column format.

To run rainfall data interpolation, you must first load data from rain gauges with Columns

ASCII option checked, and codes of rain gauges should appear in the window central table.

Then you should specify the minibasins file generated by the MGB-preprocessing in the field

labeled MINI.GTP, located at the top right of the window. Then you must specify the period for

interpolation. To do this click the Time availability option and a chart showing the quality of

data by gauge and year appear on the screen like Figure . It is essential that inside the chosen

period there is always an year in which there is at least one station with complete data.

Figure 47. Time availability tool with the downloaded stations.

At das Almas River basin present example we decided to conduct a simulation from 1970 to

2010, therefore, the start and end dates of the interpolating period is specified as 01/01/1970

Page 41: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

to 31/12/2010. Finally, you must specify the folder where will be recorded the interpolated

rainfall data and set a name for this file. The extension is always * .pbi. In the example of the

Almas River Basin we generated a file named "PRECIP_70_10.pbi" as shown by Figure 48.

Figure 28. Rainfall data interpolation tool.

3.3.2 Alternative 02: satellite data for South America - MERGE / CPTEC

For poorly monitored basins, you may want to use satellite data. Thus, a tool was created in

the MGB-IPH model to process and interpolate the MERGE precipitation data. MERGE is the

name given by the National Institute for Space Research (INPE) to the product of the

combination of observed data of rainfall and rainfall data from the TRMM satellite. Its main

advantage is that it covers all of South America and can be used for areas with low availability

of rainfall data. The data can be obtained in

http://ftp1.cptec.inpe.br/modelos/io/produtos/MERGE address, where in the MGB-IPH

interface the MERGE Interplu comprises a routine for performing FTP download automatically.

More information about the methodology employed MERGE can be obtained in the following

paper:

Rozante, J.R., Moreira, D.S., Gonçalves, L.G,.Vila, D. (2010). Combining TRMM and Surface

Observations of Precipitation: Technique and Validation over South America.

Weather&Forecasting 25, 885-894.

Page 42: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

The basic function of the interpolation using MERGE Interplu is to obtain the precipitation

data for each centroid of the basin under study minibasins, creating a interpolated rain binary

file that can be used as input in the MGB-IPH model.

MERGE Interplu is available within the MGB-IPH plugin for MapWindow. The tool can be

accessed via the tab "Precipitation / MERGE Using Data". When clicked, a window as in Figure

29 opens.

The standard procedure for creating an interpolated rainfall file includes the following steps:

(1) Creation of a database; (2) Reading the database; (3) Download the MERGE data; (4)

update the database; (5) Read the Mini.GTP (file containing the coordinates of the centroids of

each minibasin); and (6) Interpolation of the MERGE data within the centroids of minibasins.

Alternatively you can download a prepared database at the MGB-IPH website

(http://www.ufrgs.br/hge/mgb-iph/downloads/), then follow the following steps: (1) database

loading; (2) Database Update (if necessary); (3) Read the Mini.GTP (file containing the

coordinates of the centroids of each minibasin); and (4) interpolation of the MERGE data

within the centroids of minibasins.

Following sections explain these steps in detail.

Figure 29. Interplu MERGE window.

MERGE data can be downloaded in two ways: (1) you can use the "Download MERGE files"

section of the MERGE Interplu window to download the desired period. Subsequently these

Page 43: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

data will be added to a database created by the user in the interface; or (2) you can download

a prepared database through the MGB-IPH website (http://www.ufrgs.br/hge/mgb-

iph/downloads/), which is updated every month, containing data from the first day with

MERGE data availability (02/01/1998) until the current month. The user can then load the

database into the interface and then select the desired interpolation period. If the desired

period is more recent than is available in the database, you can download the missing files and

add them to the downloaded database. This second option is more reliable and faster as it

avoids the need for FTP data download.

The database is a binary file, and downloaded FTP MERGE files consist of a .ctl file, and a

.bin file per day.

3.3.2.1 Creating and Updating the database

To generate the interpolated rainfall file, the user can use the database available on MGB-IPH’s

website or the user can download the data on ftp.

To create a new database, which the MERGE downloaded data is added, press “Create

database” button.

To add new data in database, press it in the “Load database” section. The start and end dates

of the database will be displayed. If no data has been added, it will be shown “Monday,

January 1, 1900” as start and end dates.

After that, the user have to load the desired data on “Upload Merge Files”. If the user want to

upload more files, press again on “Upload Merge Files”. If you desire clear the list of files and

start the processes again, press, “Celar uploaded files list”. When the list of files is completely

load, press on “Update Merge database”.

Important: The files that will be added must be in chronological order. Thus, in a database

beginning at 01/02/1998 and ending at 09/14/2002, for example, the next file added must be

09/15/2002. Eventually, some download FTP errors can be occurs, and some files may not

have been downloaded, or some files may not exist in MERGE FTP. Thus, sometimes can occurs

problems about the updating database. There are two alternatives to solve these problems: (1)

the user can try download the missing file again (on “Download Merge data”), or (2) creating a

“false” rainfall file with zero values on date missing (on “Create rainfall zero values file”). The

existence of the file on FTP can be evaluated in:

http://ftp1.cptec.inpe.br/modelos/io/produtos/MERGE

3.3.2.2 Interpolation of rainfall data

After the database updated, the next step is the interpolation of rainfall data. For this, the user

has to load the MINI.GTP file on “MINI.GTP” section. This file will be on output folder of MGB-

PreProcessing program. Then, the user has to select the start and end dates for interpolate the

rainfall, and press on “Interpolating”. The output file is a binary file that may be used as input

rainfall file on MGB-IPH hydrologic model.

Page 44: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Important: The selected dates for MERGE data interpolation must be identical to the

simulation period on MGB-IPH.

3.3.3 Alternative 03: Global satellite data – TRMM

In case the user wants to use data from the Tropical Rainfall Measuring Mission (TRMM), there is a tool in MGB which interpolates precipitation data from TRMM. It can be accessed through the path “Precipitation/Using TRMM Data”, and a window such as the one in Figure 50 is open.

To use this tool, the user must have already downloaded the data from TRMM. In the window shown in Figure 50, the user must click on “Upload TRMM Files” and select the files in chronological order. Load the MINI file in the MINI.GTP field and write a name for the interpolated precipitation file to be generated in Output Precipitation File.

Figure 30. TRMM data interpolation window

Important: The selected dates for TRMM data interpolation must be identical to the

simulation period on MGB-IPH.

3.3.4 Alternative 04: Other precipitation data sources

To use other rainfall data sources, the user must format the rainfall data to a specific format.

For example, if the file is a mesh format, the user must create a file to each mesh point and

format the data to a column format. A similar processes should be done, if is desirable to use

rainfall data from other countries with different format from Brazil rainfall file

(hidroweb.ana.gov.br)

Page 45: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

An example of the format column file is available on “Beginning MGB-IPH/MGB Input Data”.

The new file must have the same format of the example file. With the rainfall files, the

interpolation is similar to presented on chapter 3.4.1.

For this, the user must add to the database the features about the news rainfall gauges or files.

This processes are made with the “Tool/Internal Database” tool (Figure 51). In the last row, the

user must write the name, latitude and longitude to each new gauge. After that, the user must

press on “Update Database”. After this step, the user must use the “Using Precipitation data

from ANA” and to follow the same steps in chapter 3.4.1

Figure 51. Interface to edit the internal database of rainfall gauges of MGB-IPH.

3.4 Generating observed flow file

Flow calculated data by the MGB-IPH model will be compared to flow observed data in stream

flow gauges. For this it's necessary to generate a flow observed data using the "Flow" tool..

The flow data must be a text file to each gauges and must be at column format. An example of

the format column file is available on “Beginning MGB-IPH/MGB Input Data”. The new file

must have the same format of the example file. With the rainfall files, the interpolation is

similar to presented on chapter 3.4.1.

This guide will use the data downloaded by the program of automatic download of ANA data

(chapter 3.6), which generate automatic files in column format. The downloaded data from

Hidroweb website will be in “Hidroweb” format.

To generate the flow data file to MGB-IPH, the user must first select “ASCII Columns” and to

visualize the temporal availability of downloaded data. In this case, there may be some gauges

Page 46: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

that will not be used, because there are not flow data in chosen period or there are several

gauges over a same catchment. In the last case, the user must choose a gauge with a larger

temporal availability. Thus, observing the location of gauges stations and their temporal

availability was chosen the following gauges: 20100000, 20200000, 20250000, 20490000 e

20489100.

The data period must be the same of interpolated rainfall. In this case, was adopted the period

between 01/01/1970 and 31/12/2010. In addition, it's necessary to inform the number of the

catchment that corresponds to the flow gauge station.. For this, the user need the flow gauges

station shapefile. If the user used the Automatic Download ANA Data, the shapefile has

already been generated. Otherwise, the user must click in “Generate Shapefile”.

After that, add the stream gauges shapefile to the project. For each gauge, the user can find

the corresponding catchment number adding the label “Mini” in centroid shapefile.

The flow observed file generated in Almas River basin example, was called

“VAZAO_79_10.qob”. In this example, the flows at catchment 106 corresponds to stream

gauge 20100000, and so on: 114 - 20200000; 118 - 20250000; 127 – 20490000; 125 -

20489100 (Figure 48)Erro! Fonte de referência não encontrada..

Figure 52. Flow tool with catchment and stream gauges correlation.

Page 47: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

3.5 Download of Flow and Rainfall data

To download flow and rainfall data to insert in MGB-IPH, the user can use the “Ana data

acquisition” tool (Figure 53), which allows the automatic download of several rainfall and

stream gauges station in the basin. First, the user can open the tool, insert the start

(01/01/1970 for example), and end (31/12/2010 for example) data. After that, the user can

choose “Shapefile” as input data. For the rainfall data, it is interesting to select a gauge outside

of the basin. Therefore, in this example, the input shapefile will be the first shapefile used to

extract the mosaic.

The “Ana acquisition” tool will find in the internal database the rainfall data over the shapefile

and show the results in a table. Then, the user can select “Generate Shapefile” to create the

shapefile of rainfall gauges in “Rainfall” folder.

Use this same folder in “Destination folder” and select “Download data”. The “Ana acquisition”

tool will download the rainfall gauges. If some problem happens, the program must be closed

and the processes must be repeated.

Figure 53. ANA data acquisition tool for automatically download ANA data.

The same steps can be done for “Discharge”. In this case, indicate the watershed shapefile

created on step 2.12.2 and set the destination folder for the “Discharge” folder.

3.6 Climate data management

The MGB-IPH hydrologic model uses temperature, relative humidity, wind speed, atmospheric

pressure and insolation data to calculate evapotranspiration by Penman-Monteith

methodology.

Page 48: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

There are two options in MGB-IPH interface. The first is the use of an external database. The

second is the use of an internal database, which uses a climatologic mean from 1960 to 1990,

calculated by INMET institute to entire Brazil.

3.6.1 Alternative 1: Internal database to Brazilian basins (INMET)

It is possible to use the internal database of mean climate data of MGB-IPH (Figure 54).

In the left table, there is a list of climate gauge stations. To use these gauge stations, the user

have to select the gauge station in the left table and select “>>” to transfer to right table. The

user can create a shapefile of nearby climate gauge stations (“Create Shapefile of

Climatological Stations from MGB database”) and add the shapefile to the project.

After the selection of climate gauge stations and loaded in right table, the user must create the

average climate files (“Create Average Climatological file”) and the daily climate files (“Create

Daily Climate files”) with the same period used on rainfall and flow data.

The internal climate database has only average data. So, the daily climate files will have just

-9999 code and they will not be used on MGB-IPH simulations. However, the user must load

the average and daily climate files.

Figure 54. Interface of the MGB-IPH internal database of climate data.

3.6.2 Alternative 2: Climatic Research Unit (CRU) database

Data from the Climatic Research Unit (CRU) present a global resolution of 10 minutes. To use them, visit the website https://crudata.uea.ac.uk/cru/data/hrg/tmc/ to download the

Page 49: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

data. Download the following data: “Elevation”, “Relative Humidity”, “Sunshine”, “Mean Temperature” e “10m Wind Speed”, as shown in Figure 55.

Figura 55. Climatic Research Unit (CRU) data.

In MGB, go to Climate Variables/Using CRU climatology database (Global). Select the MINI

file in Mini.gtp, the climate variables files, and the folder in which you wish to save the

resultant file in Output Directory, as shown in Figure 56.

Page 50: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figura 56. MGB tool to use CRU data for Climate.

The reference for Climatic Research Unit (CRU) data is: Mark New, David Lister, Mike Hulme,

Ian Makin. A high-resolution data set of surface climate over global land areas. Climate

Research, Vol. 21: 1–25, 2002.

3.6.3 Alternative 3: Daily climate database

To use climatic data from Brazilian National Water Agency (ANA), the climatic gauges must be

downloaded from Hidroweb website (“Using Daily Data” tool).

To Alma’s river basin example there were identified seven climatic gauges nearby the river

basin: 1446002, 1547003, 1548004, 1549001, 1549011, 1550003 e 1552003. Therefore, the

user must download the climatic data (text format) as showed at Figure 57. Files must be

formatted as specified in “ASCII climate data in columns format example”, under “MGB Input

Data”, in the first item of MGB’s menu: “Beginning MGB-IPH”.

Page 51: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 31. Acquiring climate data from Hidroweb.

To verify the availability of climatic data and modify the data, the user needs to add the

Climate Variables and Using daily climate tool. Inside of this tool, is needed to select Load

Data and select the climate data files downloaded from Hidroweb website. The data

availability will be shown in a table. After that, the user can choose the files that will be used.

The climate gauge stations can be selected clicking in the option Yes at “Use station?” area

(Figure 58). In Alma’s river basin example there were selected Posse, Formosa, Goiás and

Aragarcas stations. All these stations are outside the river basin, but they are relatively near it.

The daily climate data must be generate as well as monthly climate data. For this, the user

must define the period (01/01/1970 a 31/12/2010), and select the corresponding options.

In the Almas river basin example a file named “medias_cli.cln” was created, it contains the

mean climate values, and the files with daily data information to each climate gauge station

(“name.cli”). All these files will be saved in the “Climate” folder.

Page 52: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 58. Climate tool.

3.7 Definition of Vegetation Parameters

Vegetation parameters are those related to each HRU vegetation. These parameters do not

change in the calibration process and, so, are called “fixed parameters”. Although, these

parameters can have different values for each month of the year.

The vegetation parameters that must be defined are albedo, vegetation height, leaf area index

and superficial resistance in good soil moisture conditions. All these parameters are used to

estimate evapotranspiration using the Penman-Monteith method.

The Vegetation Parameters tool in MGB menu must be used to estimate the vegetation

parameters. To create a new vegetation parameters file, click on the New fixed parameters file

button. The software will ask if the user want to use a HRU file. Choose “Yes”, and then select

the HRU file previously created, which extension is “.hcr”.

Some suggestions for fixed parameters values are shown in the parameters edition window.

These values can be defined based on these suggestions and on the knowledge of the user.

Page 53: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 329. Edition window of the fixed parameters definition tool.

The following tables show the values of fixed parameters used in the application case of Rio

das Almas River.

Table 2. Albedo fixed parameters used in Almas River application.

HRC jan feb mar apr may jun jul aug sep oct nov dec

AgrProf 0.15 0.15 0.16 0.17 0.19 0.2 0.21 0.22 0.2 0.18 0.17 0.15

AgrRas 0.15 0.15 0.16 0.17 0.19 0.2 0.21 0.22 0.2 0.18 0.17 0.15

Urbano 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1

CerProf 0.13 0.13 0.13 0.14 0.15 0.16 0.17 0.17 0.16 0.15 0.14 0.13

CerRas 0.13 0.13 0.13 0.14 0.15 0.16 0.17 0.17 0.16 0.15 0.14 0.13

FlorProf 0.12 0.12 0.12 0.13 0.14 0.15 0.16 0.16 0.15 0.14 0.13 0.12

FlorRas 0.12 0.12 0.12 0.13 0.14 0.15 0.16 0.16 0.15 0.14 0.13 0.12

PastProf 0.19 0.19 0.19 0.2 0.21 0.22 0.23 0.24 0.22 0.22 0.2 0.18

PastRas 0.19 0.19 0.19 0.2 0.21 0.22 0.23 0.24 0.22 0.22 0.2 0.18

Agua 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08

Page 54: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Table 3. Leaf area index fixed parameters used in Almas River application.

HRC jan feb mar apr may jun jul aug sep ouc nov dec

AgrProf 6.00 6.00 5.00 4.00 3.00 2.00 2.00 2.00 2.00 3.00 4.00 5.00

AgrRas 6.00 6.00 5.00 4.00 3.00 2.00 2.00 2.00 2.00 3.00 4.00 5.00

Urbano 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00

CerProf 5.00 5.00 5.00 4.00 3.00 3.00 2.00 2.00 2.00 3.00 4.00 5.00

CerRas 5.00 5.00 5.00 4.00 3.00 3.00 2.00 2.00 2.00 3.00 4.00 5.00

FlorProf 9.00 9.00 8.00 7.00 6.00 5.00 4.00 5.00 6.00 7.00 7.00 8.00

FlorRas 9.00 9.00 8.00 7.00 6.00 5.00 4.00 5.00 6.00 7.00 7.00 8.00

PastProf 4.00 4.00 3.00 3.00 2.00 2.00 1.00 2.00 3.00 3.00 3.00 4.00

PastRas 4.00 4.00 3.00 3.00 2.00 2.00 1.00 2.00 3.00 3.00 3.00 4.00

Agua 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00

Table 4. Trees height fixed parameters used in Almas River application.

use jan feb mar apr may jun jul aug sep oct nov dec

AgrProf 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00

AgrRas 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00

Urbano 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50

CerProf 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00

CerRas 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00

FlorProf 17.00 17.00 17.00 17.00 17.00 17.00 17.00 17.00 17.00 17.00 17.00 17.00

FlorRas 17.00 17.00 17.00 17.00 17.00 17.00 17.00 17.00 17.00 17.00 17.00 17.00

PastProf 0.70 0.70 0.70 0.70 0.70 0.70 0.70 0.70 0.70 0.70 0.70 0.70

PastRas 0.70 0.70 0.70 0.70 0.70 0.70 0.70 0.70 0.70 0.70 0.70 0.70

Agua 0.10 0.10 0.10 0.10 0.10 0.10 0.10 0.10 0.10 0.10 0.10 0.10

Table 5 Superficial resistance fixed parameters used in Almas River application.

use jan feb mar apr may jun jul aug sep oct nov dec

AgrProf 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0

AgrRas 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0

Urbano 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0

CerProf 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0

CerRas 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0

FlorProf 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0

FlorRas 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0

PastProf 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0

PastRas 70.0 70.0 70.0 70.0 70.0 70.0 70.0 70.0 70.0 70.0 70.0 70.0

Agua 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

Click Save fixed parameters file when all fixed parameters are set. In this example, the file is

called “PAR_Fixos”, and it is saved in the MGB folder. This file has the extension “.FIX”.

Page 55: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

3.8 Definition of calibration parameters

Calibration parameters are those that can be changed as much as necessary over the

calibration process. They are related to each HRU, in each established subwatershed. The

definition of these parameters is done through the Calibration Parameters tool. To create a

new calibration parameters file, you must open the HRU file, the subwatersheds file (.gtp) and

then click on the New calibration parameters file button.

Then, the Calibration Parameters tool enables you to define the parameters values related

to each HRU for the two subwatersheds by selecting them in the Subwatershed button. Figure

6033 shows the calibration parameters window with parameters values estimated to Almas

River case.

Figure 6033. Calibration parameters tool window.

Initially, parameters values can be defined based on suggestions show at the “Parameter

description” box on the right of the Calibration Parameters window, as well as oriented by a

previous application on a similar basin. In this case, a first simulation was made using the

parameters values show on Table 6.

Table 6. Calibration parameters values used on the first model run.

HRC Wm b Kbas Kint XL CAP Wc

AgrProf 400.0 0.10 0.20 10.00 0.60 0.00 0.10

AgrRas 200.0 0.10 0.20 10.00 0.60 0.00 0.10

Urbano 400.0 0.10 0.20 10.00 0.60 0.00 0.10

CerProf 400.0 0.10 0.20 10.00 0.60 0.00 0.10

CerRas 200.0 0.10 0.20 10.00 0.60 0.00 0.10

FlorProf 400.0 0.10 0.20 10.00 0.60 0.00 0.10

FlorRas 200.0 0.10 0.20 10.00 0.60 0.00 0.10

PastProf 400.0 0.10 0.20 10.00 0.60 0.00 0.10

PastRas 200.0 0.10 0.20 10.00 0.60 0.00 0.10

Page 56: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Agua 0.0 0.00 0.00 0.00 0.00 0.00 0.00

Once all parameters values are estimated to the first subwatershed, you can click on the Copy

parameters from this basin to all others button so this values will be also associated to the

second subwatershed. Don’t forget to estimate values to CS, CI, CB and QB parameters. In the

application in the Rio das Almas river, we adopted Cs = 8.0; Ci = 40.0; Cb = 600.0; and Qb =

0.01.

When all parameters are estimated to all subwatersheds, click on Save calibration parameters

file and save the model calibration parameters file. In our example, the file was called

"PAR_Calib.CAL" and was saved in the MGB folder.

3.9 Creating a simulation project

So that we can run a simulation, the information we generate on the last steps must be

gathered in one single file, the project file. To do so, click on the Project tool on MGB menu,

and a window as shown on Figure 61 will open. We now will fill all blanks with the respective

files.

Figure 61. Input data project window tool.

First of all, specify a name to your project on the Project blank at the top of the window. In

our example, we are calling it “Projeto_Almas”. Then, on the Geometry blank, set the

“mini.gtp” file (generated with the pre-processing tool on step Erro! Fonte de referência não

encontrada.). On the Hydrologic response classes blank set the file with the extension .hcr,

created on step 3.2, which we called “HRC_descr”.

Page 57: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

On the Hydrological tab, the Interpolated Precipitation blank must be filled with the

precipitation file created on step 3.3, “PRECIP_70_10”. On the Observed Discharge blank, set

the “VAZAO_70_10.qob” file, generated in step 3.4. Let the Replaced Discharge blank empty.

On the Climatological tab, set the file with the climatological averages in the Climatological

Averages blank. This file was created in the step Erro! Fonte de referência não encontrada.,

and in our example it’s called “medias_cli.cln”, saved in the “Climate” folder. In the Daily

climate data blank, click on the button with the three dots, search the appropriate folder

(“Climate”, in our example), and select all files with the extension “.cli” at one go. Click “open”

and you will see the folder address in the field previously blank.

On the Parameters tab, set the fixed parameters file (PAR_Fixos.FIX) in the first blank, and

the calibration parameters file (PAR_Calib.CAL) in the second one.

If the user intents to use Muskingum-Cunge simulation method, click on Save Project.

However, if the user prefers to use the inertial model for simulation, which uses an

approximation of the Saint Venant equations and it neglects the advective inertia term on the

dynamic equation (Pontes, 2015), follow the next step.

On the Inertial Module tab, select the file named as “COTA_AREA.FLP” generated in the

Preprocessing stop. Click on Save Project.

3.10 Simulation

Now that the simulation project is done, open the simulation window in the MGB main menu

and click Run Simulation. You must set the project file that will be simulated. In the Rio das

Almas river example, we will simulate the “Projeto_Almas.mgb" project, that we created on

the step 3.9.

When the project is set, MGB automatically identifies the simulation period, as well the

minibasins with discharge data and whose results must be recorded so we can perform the

comparison between simulated and observed data. If you want to save simulated discharge

results elsewhere, all you have to do is to identify the minibasin corresponding and add its

number in the end of the minibasins list.

If the user has chosen to use Muskingum-Cunge simulation method when creating the project,

“Muskingum-Cunge” will be already selected as the “Flood Routing Method”. On the other

hand, if the user has saved the project as inertial previously, then MGB will automatically

select the option “Inertial” in the simulation window.

The options in the Advanced box and other fields must not be changed., especially the Save

results on memory option, because it will allow us to use the graphic visualization tool to

analyze results.

When you click in Simulate the MGB executable software (Fortran) will be called to run the

simulation. It may take several minutes if the watershed is large (if it has many minibasins and

HURs), but for the Rio das Almas river example, it must be completed in a few seconds.

Page 58: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

While the simulation is running, it will be requested that you press enter in a few times, at the

beginning and at end of the simulation. If simulation runs without problems, a message saying

that the simulation was successfully finished will be show. All MGB results were saved in the

folder where the MapWindow project is.

Figure 62. MGB simulation window with the project loaded.

3.11 Results view

Results can be seen using the tools available in the Results menu in MGB.

3.11.1 Compare observed and calculated hydrographs

First of all, check if the minibasins centroids layer is in the layers menu is selected and visible in

the MapWindow project. Then, click in Compare observed and calculated hydrographs tool in

the Results menu.

At the moment you select the option to visualize hydrographs, the selection tool became

enabled in the mouse. To see the hydrographs, all you have to do is to select the centroid of

the minibasin where you want to analyze results (for calibration purposes, one where

observed discharge data is available). But, always before selecting the centroid, you must first

click at the MapWindow Deselect button, so the variable that store the shape value is cleaned.

So, when you select the new centroid, a graph like the one in Figure 63 must be automatically

show.

Page 59: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 63. Simulated and observed hydrographs in gage station 20250000.

To analyze details in the hydrograph, you can use the zoom tool, which is enabled by

dragging the mouse over the area you want to see. Other image options may be accessed by

clicking the right mouse button directly over the graph.

Figure 64. Zoom in the simulated and observed hydrographs in gage station 20250000.

Page 60: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

3.11.2 Compare flow duration curves

It is also possible to generate flow duration curves for each minibasin by using the Compare

flow duration curves in the Results menu. Figure 65 shows an example of observed and

simulated duration curves in gage station Colônia dos Americanos (which is located near the

mouth of Rio das Almas river). We can observe that simulated minimum flows are much

smaller than the observed ones. The simulated flows can be improved by calibrating model

parameters.

Figure 65. Simulated and observed duration curves in gage station 20250000.

3.11.3 Visualize calculated hydrographs only

If the user wants to visualize only the resultant hydrograph, but not the observed

hydrograph, one should select the option “Visualize calculated hydrographs only” in the

Results menu.

3.11.4 Visualize flow duration curves only

In Results menu, it is also available an option named “Visualize flow duration curves only”,

which allows the user to visualize the resultant flow duration curve, without showing the

observed flow duration curve.

3.11.5 Visualize water depth time series

If the simulation has been performed with the inertial module, MGB also offers the

visualization of the water depth time series.

The current manual consists of an application of MGB for Almas river, for which Muskingum-

Cunge method presents a similar result as the inertial method, because the Almas river does

not present a significant effect from floodplains. Therefore, to better visualize an application of

Page 61: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

the inertial module, we present an application of the MGB inertial module tools for Purus river,

in Amazon basin.

To visualize the water depth time series, acess the “Visualize water depth time series” tool,

under the “Results” menu. Figure 67 presents the result of a water depth time series

simulation for Purus river.

Figura 67. Resultant water depth time series for Purus river.

3.11.6 Visualize flooded area time series

When using the inertial module, MGB also presents the simulation results for flooded area.

Just like the water depth time series, the current manual presents the results for flooded area

for the Purus River (and not for the Almas river), in order to provide a better visualization of

the results for a river that presents floodplains (which happens in Purus river, but not in Almas

river).

To visualize the flooded area time series, click on “Visualize flooded area time series” in the

Results menu. Figure 66 presents the resultant flooded area for Purus river.

Page 62: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figura 348. Série de área inundada resultante da simulação do rio Purus com o MGB Inercial.

3.11.7 Flood Post-processing

By using MGB Inertial module, the user can also view the simulated flooded area results by

exporting a raster file of flooded area for any given dates. For that, select “Flood Post-

processing” in the “Results” menu, as shown in Figure 69. In the “DEM” tab, select the digital

elevation model, in “Catchments”, select the minibasins raster file, in “MINI.gtp”, select the

mini.gtp file and in “Simulation Project” select the project created in step 3.9.. Start and end

dates for simulation will be automatically identified. Next, the user must provide the dates for

which one intends to export raster files of flooded area. In the current manual, we chose a dry

period (April) and a wet period (November) in Purus region, to better illustrate flooding. Click

on “Process” and then select the destination folder for the files to be generated.

Page 63: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figura 359. Flood post-processing window.

Figure 70 presents the results of the raster files generated with the “Flood Post-processing”

tool for Purus river, which can be visualized by importing these asc. files into MapWindow or

ArcGis, for example.

Figure 70. Flooded area simulation for Purus river generated by Flood Post-processing tool.

Page 64: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

3.12 Manual Calibration

Manual calibration is the process where calibration parameters are changed pursuing an

agreement between simulated and observed hydrographs.

Hydrographs characteristics that must be examined are the overall shape, the flow recession

over the dry season, flow peaks magnitude and timing, and the hydrographs overall volume. It

is also important to check if simulate discharge is systematically higher or lower than observed

flow. If this is happening, the model may not be satisfactory calibrated.

In our Rio das Almas river application example, the results we obtained so far show that

simulated discharges are overestimated in flow peaks, and underestimated in drought periods.

See hydrographs and duration curves on step Erro! Fonte de referência não encontrada..

One of most important MGB-IPH model parameter interfering over dry season simulations is

Cb. This is the parameter of the simple linear reservoir that represents the aquifer in each

minibasin. Cb value is measured in hours, and can be estimated through observed discharges

in a gage station in a long period without precipitation.

To estimate Cb in a watershed, you must identify two observed flow values, a few days apart

from each other (Δt), and then apply the equation:

(

)

Cb is measured in hous, and Δt in days. Q(t+Δt) is an observed flow happening Δt days after

observed flow Q(t).

Cb value depends on watershed physical characteristics, especially its geological attributes.

Watersheds located in regions where there is a dominance of sedimentary rock usually have a

larger groundwater storage capacity, and Cb is so relatively high. Watershed in regions with

low porosity rocks, such as basalt, tend to have lower Cb values. Higher the value of Cb, more

horizontal is the hydrograph in dry season, and higher is the flow in this period.

To achieve higher simulated discharges over dry seasons, Kbas parameter value may also be

increased. In our example, we first adopted the value 0.2 mm/day to Kbas. This means that soil

water will percolate to aquifer in a rate of 0.2 mm/day when the soil is saturated. This water

that is stored in the aquifer will preserve discharges in dry seasons.

To improve MGB-IPH model calibration, in Rio das Almas river watershed we will firstly

increase Kbas value to 1.0 mm/day in all HRU (except the water HRU) and all subwatersheds.

The other clear problem in our simulated discharges in Rio das Almas river is the

overestimation of flow peaks, and it must be fixed. This problem may be caused by a low water

storage capacity in soil. This characteristic is represented by Wm parameter, and so, in our

example, we must increase its value. As a test, we used Wm = 300mm in shallow soil HURs,

Wm = 1000 mm in deep soil HURs, and Wm= 700mm in urban soil. Wm in the water HUR must

remain zero mm.

Page 65: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Cs and Ci values were also slightly changed to moderate flow peaks that were getting ahead

observed discharges. So, a preliminary manual calibration was achieved with parameters

values show in Tabela 7 for the two subwatersheds defined in our example. CS, CI, CB and QB

were also changed to 13.00, 100.00, 2300.00 and 0.01, respectively.

The calibration we have done to Rio das Almas river can still be improved, and it can be done

through a manual or an automatic calibration process. MGB-IPH automatic calibration

procedure is described in the next step, item Erro! Fonte de referência não encontrada..

However, it will not be done to our application example.

Table 7. Parameters values adjusted through manual calibration to improve performance in hydrographs and duration curves.

HRC Wm b Kbas Kint XL CAP Wc

AgrProf 1000 0.1 1 2 0.6 0 0.1

AgrRas 300 0.1 1 2 0.6 0 0.1

Urbano 700 0.1 1 2 0.6 0 0.1

CerProf 1000 0.1 1 2 0.6 0 0.1

CerRas 300 0.1 1 2 0.6 0 0.1

FlorProf 1000 0.1 1 2 0.6 0 0.1

FlorRas 300 0.1 1 2 0.6 0 0.1

PastProf 1000 0.1 1 2 0.6 0 0.1

PastRas 300 0.1 1 2 0.6 0 0.1

Agua 0 0 0 0 0 0 0

Now, open the Calibration Parameters tool once more and create a new calibration

parameters file with these values for both subwatersheds. To avoid creating a new simulation

project you can simply save the new parameters file over the previous one.

Using the Run Simulation tool, you can now run the same project we used before, but it will

use the new parameters.

Page 66: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 71. Observed and simulated hydrographs for gage station 20250000, after a first attempt to calibrate model parameters.

Figure 72. Zoom in simulated and observed hydrographs for gage station 20250000, after a first attempt to calibrate model parameters.

Page 67: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 73. Simulated and observed duration curves for gage station 20250000, after a first attempt to calibrate model parameters.

Analyzing the new hydrographs and duration curves, we can notice that model simulation

results are much better than those from our first simulation. But these results can still be

improved. You can now change calibration parameters to achieve better results, and acquire

sensitivity to MGB model parameters.

3.13 Automatic Calibration

After the preliminary manual calibration was performed the automatic calibration can be initiated. It is important to know that automatic calibration won't work miracles. The algorithm used seeks optimal values close to the values of given initial parameters. So, if the manual calibration of the model is generating bad results (for example, objective functions values as Nash and Volume error quite unsatisfactory), automatic calibration will not provide good results.

Open the automatic calibration window of MGB in the main menu Automatic calibration parameters.

In the first tab, Create Automatic Calibration File, load the classes file (urh.mgb) and the last calibration parameter file that you created with the calibration manual. You should get something like shown in Figure 74.

Page 68: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 74. Automatic calibration window.

This window shows the calibrated parameters, average values of each parameter and high

and low values that they can achieve the automatic calibration, with each sub-basin reference.

You must select which sub-basin is used as a reference for calibration and modify, if necessary,

the maximum and minimum values according to your preference.

After the statement of these values for each parameter, it can indicate if the parameter will

be calibrated or not, or use a solidarity calibration. If you do not want the parameter to be

calibrated enter the value "0" in the desired column in the desired URH, like "Calibrate Wm?"

for example, and then the original value will be used. If you want the parameter to be

calibrated, enter "1". The solidarity calibration consists in calibrating the parameter of the URH

based on the calibration of another URH, in other words, a URH is calibrated and another one

will be calibrated together, based on a multiplier.

The solidarity calibration is useful so that different types of land use can be properly

calibrated, depending on the soil depth, for example. In the example of the bacin Itajaí, we will

jointly calibrate URH's Mata_Prof with Agr_Profe, Mata_Raso with Agr_Raso. For this will be

indicated in the column "Calibrate Wm?", "Calibrate b?", etc. , the value 1 for the URH's

Mata_Prof and Mata_Raso (indicating that these parameters will calibrate), the value -1 for

the URH Agr_Prof (indicating that calibrates jointly to URH 1, Mata_Prof), and -3 value for URH

Agr_Raso (indicating that calibrates jointly to URH 3, Mata_Raso).

Below are listed the number of blocks, the number of sub-basin and sub-basin to which

reference parameters are being displayed above. We will exemplify the automatic calibration

to all basins at the same time, but it is also possible to calibrate each individual sub-basin

(Figure 75).

Page 69: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 75. Calibration parameters: average, maximum and minimum values for the sub-basin 3.

Next, indicate which sub-basins are calibrated (Figure 76). By clicking the All

button, we will calibrate every sub-basins at the same time.

Figure 76. Selecionando as sub-bacias para calibração automática.

In addition, you must load the file observed flow and indicate below which

fluviometric stations will be calibrated by entering "1" in the weights of the desired

fluviometric posts. All stations which are not suitable for calibration automatic should have

their weights "0". In the case of Itajaí, we will calibrate fluviometric post in 83900000,

83800002, 83500000, 83440000, 83300200, 83250000, because the other station that is in the

same sub-basin showed no desirable results in manual calibration.

Figure 77. Loading file with observed flows and selecting the fluviometric stations that will be calibrated

automatically.

You can also view and modify the average, maximum and minimum values of the parameters CS, CI and CB, and also the parameter QB (Figure 78).

Page 70: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 78. Mean values, maximum and minimum parameters of CS, CE and CB, and QB parameter.

Click Save parameter file for automatic calibration.

Open the Project window and create a new project by following the instructions in item 8,modifying only an part:

Indicate as Parameters for Automatic Calibration the newly created file.

Open the Run Simulation window and select the last project created to simulate. Check the Automatic option. For the simulation process faster, you can deselect the last two advanced options: Save results on memory and Save Objective Functions.

This simulation is much more time consuming than those made with manual calibration. Is indicated leaving a simulation running overnight. Figure 79 shows the simulation window for automatic calibration.

Figure 79. Simulation with automatic calibration.

After the simulation, in C://mgb/Output folder, the EVOLUTION.txt temporary file is created.

Copy this file to your directory.

Open the Auto Calibration window again.

In the first tab reload the classes file and calibration parameters.

Select below the sub-basins to calibrate (Calibrate which subwatershed?), the observed flow file and check if the fluviometric stations to calibrate are marked with weights 1.

You can now open the Automatic Calibration parameters file.

Page 71: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

In the second tab (Create new calibration parameters file) load the file EVOLUTION.txt.

Note that automatic calibration generated some options of calibration parameters. Each line represents a combination of parameters.

Review the combinations of parameters and objective functions shown in

last columns of each line, and choose a line by selecting it (the arrow next: ).

With the chosen line selected, click Create new calibration parameters file with the selected row.

Return back to the Project window and create a new project, indicating the new calibration parameter file in “Calibration” and leaving it blank in “Parameters for automatic calibration”. Save the project.

In Run Simulation window, simulate this new project and check the results.

Figure 80 and Figure 81 shows the result of this automatic calibration to one of the fluviometric stations.

Figure 80. Comparison between hydrographs generated with calculated and observed data after the Automatic

Calibration.

Figure 81. Comparison of retention curves with calculated and observed data after the Automatic Calibration.

Page 72: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

You can still improve results through changes in the manual calibration or automatic calibrations for individual sub-basins.

4 Other tools

In the tab "Tools" you can access many post-processing and visualization data tools from

MGB-IPH, which are described below.

4.1 Edition of mini.gtp file

With this tool you can edit the mini.gtp file generated in the preprocessing step. Figure 82

shows its window. Load the hydrological response classes file and Mini.gtp. A table with the

topological information of the minibasins will open and its values can be changed as desired.

On "Shortcuts" some informations of Mini.gtp can be quickly edited, as geomorphological

relations, Manning coefficient or file containing width and depths for minibasins.

Figure 82. Editing Mini.gtp file tool.

Page 73: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

4.2 Fluviometric station hydrograph

On menu Tools, the button hydrograph station fluviometric is used to generate a hydrograph

of total observed flow in the selected station.

To use the tool, simply select the desired fluviometric station (with the

shapefile of the posts created in item 3.5). Sometimes it is necessary to recreate the shapefile

of fluviometric stations again.

This tool is useful when you want to view only the hydrograph flows observed in the stations,

without comparing with the flow calculated by the MGB-IPH.

4.3 Base flow filter of fluviometric station

The base flow filter of fluviometric station tool, available in the menu Tools, has two

objectives: to calculate the value of the Cb parameter, and estimate the percentage of flow of

a river that has underground source by applying a numerical filter. The following presents

examples for a fluviometric station in the Itajaí River.

This manual will describe the use of the tool to estimate the value of the Cb parameter. The tool is applied by clicking at any fluviometric station. The layer of fluviometric stations generated in item 3.5 must stay selected. Here we use the post fluviometric 83690000 of the Itajaí basin. After clicking the tool "Flow Filter base" and the desired fluviometric station, a window opens showing the hydrograph observed in this position throughout the period with data, as shown in Figure 83.

Figure 83. Main screen of the base flow filter applied to the post 83690000.

Page 74: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

From this point it is necessary to use the chart zoom tools to find a period of drought with strong evidence that there had been no rain in the period. Ideally it should be found a period in which the flows are continuously and constantly decreasing. A dry season of this nature

occurred between June and July 1995, as shown in Figure 84.

Figure 84. Hydrograph recession observed in Itajaí (station 83690000) between 5 and 30 August 1994.

After identified the dry season, two dates are to be specified in the window of

the Base Flow Filter tool: Start and End of recession period. After that we click Calculate button

and a value of 37.00 days is obtained for the coefficient k and this value can be used to set the

value of the Cb parameter, in this case, 888 hours.

It is recommended that this procedure is repeated a few times to determine an

average Cb value to be used to calibrate the basin.

The BFI calculation tool is used for display a hydrograph with separation of superficial and base flow.

Simply determine the desired time interval and click the Calculate button. This way are generated BFI values, maximum BFI and the parameter a (parameters proposed by Eckhardt, 2005). By clicking the FBI graphing button you get a chart as shown in Figure 85, which is a hydrograph with separation of superficial flow and base flow.

Figure 85. Hydrograph with separation of superficial flow (blue) and base flow (yellow).

Page 75: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

4.4 Flow duration curves from flow gauges data

The button Flow duration curves from flow gauges data is used to generate a flow duration

curve of the selected gauge for total observed flow.

To use the tool, just select the flow gauge desired (with the shapefile

generated by the flow tool in the item 3.5).

This tool is useful when the user desires to visualize just the flow duration curve observed in

the flow gauges, without comparing with the MGB-IPH calculated flow duration curve.

4.5 Rainfall gauge chart

The button Rainfall gauge chart is used to generate a rainfall chart of the observed rainfall in

each rainfall gauge.

To use the tool, just select the rainfall gauge desired (with the

shapefile generated in the item 5.2.4 selected). An example of rainfall chart is shown in

the Figure 86.

Figure 86. Rainfall chart for gauge 02749000.

4.6 Create precipitation data raster

With this tool it's possible to create precipitation data raster files interpolated in the MGB-

IPH to visualize the precipitation spatial distribution in the studied basin. The tool has as input

data: (i) the raster of catchments generated in the pre-process step (item 2.11), (ii) the

mini.gtp file and (iii) the rainfall binary file generated in the interpolation windows. The

process performed is only a reclassification of the catchments raster, substituting the

catchments values by the associated rainfall value.

Precipitação

(mm)

Pluviograma do posto 02749000

Page 76: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

There are two types of rainfall that can be plotted in the raster file: (i) average annual

precipitation and (ii) accumulated precipitation. Hereafter the two options are described.

4.6.1 Annual average precipitation raster

If the average annual precipitation is selected, you should upload to the program the rainfall

binary file generated in the rainfall interpolation step (item 3.3).

4.6.2 Accumulated precipitation raster

Regarding accumulated precipitation, a raster is generated with the rainfall accumulated value

for all the rainfall interpolated period. Thereby, if you have generated a rainfall interpolated

file to the period 01/01/1970 to 31/12/2010, as in the simulations realized in this manual, the

generated raster will contain information about the accumulated rainfall to all this period. So,

the great value of this accumulated precipitation tool is the spatial evaluation of rainfall

events. For this, you can interpolate again the rainfall for a short period, for example from

01/01/2009 to 05/01/2009. The result of the raster file will be a map of the accumulated

rainfall for this period. You can do several rainfall maps with different interpolated rainfall files,

for example for the periods 01/01/2009 to 05/01/2009, 01/01/2009 to 06/01/2009 and

01/01/2009 to 07/01/2009. In this case, it is possible to evaluate the spatial-temporal

distribution of the accumulated rainfall data in your study area to periods with different

duration days.

4.6.3 Interface and raster file generation

Figure 87 shows this tool's interface. Provide the three input files (catchments raster,

mini.gtp file and accumulated rainfall file), select the desired option (average annual

precipitation or accumulated precipitation), the output file name, and click "create raster".

Figure 88 shows the result of the tool to the average annual precipitation map to the basin,

to the period 01/01/1970 to 31/12/2010.

Figure 87. Interface of the rainfall raster creation window.

Page 77: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 88. Annual average rainfall generated raster.

4.7 Internal database

This button provides an internal database of the rainfall gauge and flow gauge of ANA

(figure 89). These data are used to generate observed flow files (item 3.5) and to interpolate

precipitation data (item 3.4). If these data were not completed, an error message will appear

in the execution of the aforementioned items, and it would be necessary to manually update

the data, by entering the gauge code, its location (longitude and latitude) and the gauge name

at the end of the list.

As described in item 3.3, it is necessary to edit this database if the user chooses to use

precipitation data of others sources than the ANA or MERGE / CPTEC.

Page 78: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 89. MGB-IPH internal database

4.8 Longitudinal profile

The last option on the “Tools” menu is “Longitudinal profile”, available only for applications

using the inertial module, which allows the user to visualize the longitudinal profile of a river

reach. For that, the user must select the MINI.gtp file and the COTA_AREA.flp file, as shown in

Figure 90. The user must provide an upstream and a downstream minibasin for the reach one

intends to visualize its longitudinal profile, in First Catchment and Last Catchment, repectively.

For the current example, we have used 1228 as the upstream minibasin and 2957 as the

downstream minibasin.

For a better visualization of the Longitudinal Profile tool, the current manual presents Purus

river as an example, because it corresponds to an application of the inertial module.

Page 79: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figura 90. Longitudinal profile of a Purus river reach

In blue - Z0 (DEM lower value) – are presented the values for depth from the

digital elevation model throughout the drainage network. In red – h (Z0 – river depth) –

it is presented the value of Z0 subtracted by the river depth, which is defined by the

exponential relation between river width and drainage area.

Page 80: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

5 Troubleshooting

This section presents some common errors that occur in the application of MGB-IPH.

5.1 Windows Settings

To run the MGB-IPH it is necessary that the region and language windows settings are

correct. To do so, enter Control panel / Region and language and set the format to Português

(Brasil) and in additional settings, put the decimal symbol point ('.') and as thousands separator

the comma (','). Click OK.

5.2 Solving problems with the command prompt

Many of the problems that users have when running MGB-IPH occurs when auxiliary

command windows are called (the black screens, as in the figure 79). However, when an error

occurs, the window close and it is not possible to identify the problem. To view which problem

happened, we can run this black window by the Windows command prompt. To do so, open

the cmd.exe screen that you can localize with the "Find" tool in the Star Menu (Figure9).

If the problem has occurred in the MGB PreProcessing, it is necessary to find the command

line which the directory where is the MGB PreProcessing executable in the IPH-Hydro Tools

folder in the Mapwindow plugins. Enter "cd\", after "cd program files", after "cd mapwindow",

after "cd plugins", after "cd iphht" and then enter "PreProInertial" to add the executable of the

MGB PreProcessing (Figure 91 and Figure 92). Normally run the program, and when the error

appears the screen will stop informing which is the problem. In the below sections some of this

errors that can appear in the screen are described.

If the problem happened in the simulation of the MGB, it is necessary to find the executable

of simulation of the MGB. Do the same steps described above of the MGB PreProcessing, but

this time go to the folder “C:\ProgramFiles\MapWindow\Plugins\MGB\MGB” and drive the

executable of simulation called "MGB".

Page 81: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure91. Windonws Command Prompt.

Figure 92. Command prompt lines.

Page 82: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 93. Activating MGB PreProcessing.

5.3 Problems running MGB PreProcessing

To generate the Mini.GTP file and anothers arising from the PreProcessing (section 2.14), the files created in the PreProcessing steps by way of IPH-HydroTools should be corrects. - Initially, all the enter raster files should have the same heading (lines number, columns, cell size, etc.). Make sure they are equal. - It's possible that the catchments raster is wrong. To the PrePro, the catchments raster should be numbered from 1 (for example, from 1 to 512). If in your case the raster are numbered, for example, from 46 to 558, the program will show an error. The error message by way of command prompt is shown in Figure 94. That occurs when a segmented network from a drainage system that has not been cut by the basin is created, therefore the catchments of value 1 to 46 (in this case) were outside the catchments raster of its basin. If the user uses the drainage network raster cut by the basin to do the segmented network (ArcHydro Segmentation), the problem will be solved.

Page 83: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

Figure 94. Error in the catchments raster.

- Another common mistake occurs in the generation of hydrological response classes (HRCs). The error in the command prompt is shown in Figure 83. By doing the steps to generate the HRCs raster, sometimes it can occur that the HRC value at any pixel of its basin is missing (probably a pixel at the edges of the basin). So the MGB PreProcessing get a value of NoData (-9999) and warns that it cannot run. The solution to this problem is the following: to ensure that this pixel with missing value has an assigned value, you can do a Reclass (ArcGis Reclassify tool) of the HRCs raster, assigning to all the pixels with NoData value a value of some HRC (for example, the value '1'). This way all the NoData values of your HRC raster will have the value '1' and when the PrePro search for this pixel value, it will find something different of NoData, and will succeed to pass this step. After the reclassification you can export the reclassified raster to the ASC format and run the PrePro with it. This should solve the problem.

Figure 9536. URCs raster error.

5.4 Problems to simulate

Problems to simulate normally occurs due the follwing errors:

Page 84: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

- Files used in the project generation (3.9: Project creation to simulation) are wrong.

Guarantee that the uploaded files are corrects.

- Data periods of rainfall, flow and climate are not coherent. It is important that the dates are

coinciding.

5.5 Problems in the visualization of the simulation results

- To view a simulated hydrograph, you must select the centroid of the relative catchment. To

do so the centroids shape must be selected in the lateral menu of layers.

- Only the centroid's hydrographs listed in the simulation window can be visualized after the

simulation. To see the hydrographs of others centroids, you can interact with the binary file

QTUDO.BIN that is generated in the folder C:/MGB/OUTPUT after each simulation.

- To see hydrographs of several catchments in sequence, after visualize the hydrograph of a

given catchment click in deselect in the superior tab and just after in select, to then visualize

the hydrograph of another catchment by clicking in its respective control.

5.6 Problems in the reading of ASCII columns files

- To use rainfall data in the column format (for example, if the user have a alternative source of

data), it is necessary that the column files are formatted with spacing 6 - 6 -6 - 16, that is

equivalent to Day - Month - Year - Rain (or Flow).

5.7 Inertial Module Information

The main upgrade in MGB-IPH 2017 is the possibility to use an inertial (or hydrodynamic)

method for flood routing, instead of using linear Muskingum-Cunge simplified method, which

allows the user to simulate flat regions with floodplains, multiple defluences, estimative of

level and flooded area distributed into the basin, and also it better represents the physical

processes involved in flood waves (e.g., representation of the non-linearity of the celerity-

discharge relationship). An application example of this model is presented in Pontes et al.

(2015).

Although there are many advantages related to a better representation of the physical

processes involved in flooding of hydrographic basins, it is important to understand that the

simulation with the inertial module is more complex than the usual application of MGB-IPH

with the Muskingum-Cunge method, which requires caution with numeric instabilities coming

from the numerical method adopted. The processing time can also be longer.

The numerical solution of the inertial equation that is used in MGB-IPH was initially proposed

by Bates et al. (2010), and the MGB-IPH with the inertial module is described in Fan et al.

(2014) and Pontes et al. (2015). A sensibility analyses of parameters for the large scale

hydrodynamic model (such as width, depth and Manning’s coefficient) is available in Paiva et

al. (2013).

Page 85: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

References:

Bates et al., 2010, A simple inertial formulation of the shallow water equations for efficient

two-dimensional flood inundation modelling, Journal of Hydrology, 387.

Fan et al., 2014, Avaliação de um método de propagação de cheias em rios com

aproximação inercial das equações de Saint-Venant, Revista Brasileira de Recursos Hídricos, v.

19(4).

Paiva et al., 2013, Large-scale hydrologic and hydrodynamic modeling of the Amazon River

basin, Water Resources Research, 49.

Pontes et al., 2015, Modelagem hidrológica e hidráulica de grande escala com propagação

inercial de vazões / Hydrologic and hydraulic large-scale modeling with inertial flow routing,

Revista Brasileira de Recursos Hídricos, v. 20(4).

Page 86: MGB-IPH application example manual using IPH-Hydro … · MGB-IPH application example manual using IPH-Hydro Tools February 2017 ... Click on Plugins in the superior tab of MapWindow

6 References

1. SIQUEIRA, V. A. ; FLEISCHMANN, A. S. ; JARDIM, P. F. ; FAN, F. M. ; COLLISCHONN, W. . IPH-

Hydro Tools: uma ferramenta open source para determinação de informações topológicas em

bacias hidrográficas integrada a um ambiente SIG. Revista Brasileira de Recursos Hídricos,

2016.

2. Fan F. M., Buarque D. C., Pontes, P.R.M., Collischonn W. Um mapa de unidades de resposta

hidrológica para a América do Sul. XXI Simpósio Brasileiro de Recursos Hídricos, Novembro de

2015, Brasília-DF. Anais do XXI Simpósio Brasileiro de Recursos Hídricos. PAP019919. 2015.

3. Collischonn W, 2001 – Simulação Hidrológica de Grandes Bacias. tese de doutorado, IPH-

UFRGS, Dezembro de 2001

4. Collischonn, W. ; Allasia, D. G. ; Silva, B. C. ; Tucci, C. E. M. . The MGB-IPH model for large-

scale rainfall-runoff modelling. Hydrological Sciences Journal, v. 52, p. 878-895, 2007.

5. FAN, F. M. ; COLLISCHONN, W. ; SORRIBAS, M. V. ; PONTES, P. R. M. . Sobre o início da rede

de drenagem definida a partir dos modelos digitais de elevação. Revista Brasileira de Recursos

Hídricos, v. 18, p. 241-257, 2013.

6. Paiva, R. C. D.; Buarque, D. C. ; Collischonn, W. ; Bonnet, M.-P. ; Frappart, F.; Calmant, S.;

Bulhões Mendes, C. A.. Large-scale hydrologic and hydrodynamic modeling of the Amazon

River basin. Water Resources Research, v. 49, p. 1226-1243, 2013.

7. FAN, F. M.; COLLISCHONN, W. . Integração do Modelo MGB-IPH com Sistema de Informação

Geográfica. Revista Brasileira de Recursos Hídricos, v. 19, p. 243-254, 2014.

8. PAZ, A. R. ; COLLISCHONN, W. ; RISSO, A. ; MENDES, C. A. B. . Errors in river lengths derived

from raster digital elevation models. Computers & Geosciences, v. 34, p. 1584-1596, 2008.