0% found this document useful (0 votes)
14 views18 pages

ManualV1 Using QGIS Mesh Preparation

This document provides instructions for preparing a MESH drainage database file using freely available data and software. It describes downloading digital elevation and land cover data from GeoBase, preprocessing the data using QGIS, generating a WATFLOOD map file using GreenKenue, and converting it to a MESH drainage database file format using the bsn.exe program. The process is demonstrated for the Sturgis watershed in Saskatchewan, which requires data from two GeoBase map sheets that are merged and preprocessed before being input to GreenKenue to generate the WATFLOOD file and ultimately the MESH drainage database file.

Uploaded by

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

ManualV1 Using QGIS Mesh Preparation

This document provides instructions for preparing a MESH drainage database file using freely available data and software. It describes downloading digital elevation and land cover data from GeoBase, preprocessing the data using QGIS, generating a WATFLOOD map file using GreenKenue, and converting it to a MESH drainage database file format using the bsn.exe program. The process is demonstrated for the Sturgis watershed in Saskatchewan, which requires data from two GeoBase map sheets that are merged and preprocessed before being input to GreenKenue to generate the WATFLOOD file and ultimately the MESH drainage database file.

Uploaded by

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

MESH DRAINAGE DATABASE FILE PREPARATION

USING
FREELY AVAILABLE DATA AND SOFTWARE
Muluneh Mekonnen
(Global Institute for Water Security, University of Saskatchewan)

Moges Tekle and Bruce Davison


(Hydrometeorology and Arctic Laboratory (HAL), Environment Canada)

March 21, 2012

Abstract
This note provides a quick guide on how to prepare the MESH drainage database le using freely
available data as well as freely available software. The MESH drainage database le provides topog-
raphy and land cover information to the MESH hydrologic-land surface model. The note describes
processing of GeoBase's digital elevation and land cover data using Quantum GIS (QGIS), Envi-
ronment Canada's GreenKenue software and the 'bsn.exe' program to produce the MESH drainage
database le.

1 Introduction

This document is prepared to serve as a quick guide to build a MESH drainage database le using freely
available data as well as freely available software. The MESH drainage database le, a reformatted
version of the WATFLOOD map le, provides topography and land cover information to the MESH
hydrologic-land surface model. GreenKenue Ensim Hydrologic, 2007 requires digital elevation data and
land cover data to prepare the WATFLOOD map le. The 'bsn.exe' program converts the WATFLOOD
map into the MESH drainage database le. Quantum GIS (QGIS) is used to pre-process the eleva-
tion and land cover data. Stream network data (if available) can be used as predened channels (in
GreenKenue) to enhance ow direction calculations as well as the watershed delineation.

The Sturgis watershed is selected for illustration purposes. The outlet of the Sturgis watershed
(51.94N, -102.55W, Station No: 05MC001, and Station Name: ASSINIBOINE RIVER AT STURGIS)
is located near the border between Saskatchewan and Manitoba Provinces. According to Environment
Canada's HYDAT database the gross drainage and eective areas are 1930 km2 and 1140 km2 respec-
tively. The elevation of the watershed ranges from 640 m to 490 m. The Sturgis watershed is mainly an
agricultural area (crop land) and also consists of deciduous forest, wetlands and water bodies.

In this illustration the GeoBase website http://www.geobase.ca is assumed to be the main data source
and the GeoBase 250k map index (1:250,000 scale map sheets) are used to identify the map sheets that
cover the selected watershed. The document consists of four sections:

ˆ Software requirements,
ˆ Download and pre-process data using QGIS,
ˆ Prepare the Watood map le using GreenKenue, and
ˆ Prepare the drainage database le using the 'bsn.exe' program.
1
2 Software Requirements

This document and the procedures described are based on data processing under the Linux system
and WATFLOOD map generation and MESH drainage database le preparation under the Windows
operating system. Hence, modications may be required for other (combinations of) operating systems.

2.1 GreenKenue
GreenKenue, developed at the Canadian Hydraulics Centre (CHC), is an advanced numerical modelling
environment, as well as a general purpose data handling and visualization system that can easily be
adapted for any class of environmental data. It provides an ideal framework for the integration of
environmental data, GIS information and model data. One of the models supported by GreenKenue
is the WATFLOOD (Kouwen et al., 1993) hydrological model and hence GreenKenue allows importing
digital elevation and land cover data to create the WATFLOOD map le. GreenKenue is developed
for the Windows operating system but the 32bit version has been reported to install and properly
operate on a Ubuntu 10.04 Linux workstation using the Windows emulator wine 1.2+. The software
as well as the reference manual are freely available from National Research Council Canada website
http://www.nrc-cnrc.gc.ca/eng/ibp/chc/software/kenue/green-kenue.html. And installation under the
windows operating system is straight forward.

2.2 bsn.exe
The bsn.exe is a separate program that converts the '.map' le readable by the WATFLOOD model into
'.r2c' le format readable by the MESH model. The bsn.exe program can be downloaded from the HAL
website http://halfront.wxe.sk.ec.gc.ca/html/documents/store/1_3_sa_MESH.html

2.3 QGIS
The following description of Quantum GIS (QGIS) is as described in its ocial website http://www.qgis.org/.
"QGIS is a user friendly Open Source Information System (GIS) licensed under the GNU General Public
License (http://www.qgis.org/). QGIS is an ocial project of the Open Source Geospatial Foundation
(OSGeo). It runs on Linux, Unix, Mac OSX, and Windows and supports numerous vector, raster, and
database formats and functionalities."

QGIS can be freely downloaded and installed from the ocial website or the Ubuntu software manager
can be used to perform the same job.In this note QGIS is used for visualization purposes. To that end a
new symbology layer le is created (attached appendix). The data processing is performed on the com-
mand line (to be discussed later) using the GDAL and OGR libraries http://www.gdal.org/index.html.
Here follows description of GDAL library installation for Ubuntu.

ˆ Download FWTools (a set of Open Source GIS binaries for Windows (win32) and Linux (x86 32bit)
systems produced by Frank Warmerdam (i.e., FW)) from the link http://fwtools.maptools.org/.
FWTools contains a number of sub-packages out of which GDAL/OGR (a library and set of com-
mandline utility applications for reading and writing a variety of geospatial raster (GDAL) and
vector (OGR) formats) is of interest to this note.
ˆ Unpack the downloaded le and run the install.sh script in the directory where the unzipped le is
saved, and then add the bin_safe directory to your path. The following is an example of performing
this step for some version of FWTools. A few modications might suce for proper installation
and path setting.

% t a r x z v f FWTools−l i n u x − 0 . 9 . 5 . t a r . gz
% cd FWTools−l i n u x − 0 . 9 . 5
% . / i n s t a l l . sh

I f you u s e Bash a s your s h e l l add t h e f o l l o w i n g t o your s t a r t u p s c r i p t ( i e .


~/. bash_profile ) :

PATH=$PATH:$HOME/FWTools/ b i n _ s a f e

2
3 Downloading and Pre-processing Data

In this section downloading and processing of GeoBase's digital elevation and land cover data is presented.
This will be followed by step by step description of the dierent QGIS packages and commands that are
used to convert and reclassify the raw data so that it can be imported into GreenKenue.

3.1 Digital Elevation Data


Before starting downloading data from the GeoBase it is important to identify the map sheets that cover
the area of interest. Using either an existing (previously constructed) watershed boundary, Figure 1, or
using the location of the watershed outlet and the GeoBase 250k map index it is possible to identify the
map sheets that cover the Sturgis watershed.

073H 063E 063F

073A 063D 063C

072P 062M 062N

072I 062L 062K

Figure 1: Figure showing the GeoBase 250K map sheets that subscribe the Sturgis watershed.

Note that the LAT/LONG projection is used in preparing the Sturgis watershed MESH drainage
database le. However, the boundary shape le acquired is in UTM projection and the following com-
mand (from the OGR utilities) was used to convert to LAT/LONG projection (note: the target projec-
tion, t_srs, value of 4326):
ogr2ogr -t_srs EPSG:4326 OutputFile.shp InputFile.shp
And the general usage of ogr2ogr command is as follows:
Usage : o g r 2 o g r [−− help − g e n e r a l ] [ − s k i p f a i l u r e s ] [ − append ] [ − update ]
[ − s e l e c t f i e l d _ l i s t ] [ − where r e s t r i c t e d _ w h e r e ]
[ − p r o g r e s s ] [ − s q l <s q l statement >] [ − d i a l e c t d i a l e c t ]
[ − p r e s e r v e _ f i d ] [ − f i d FID ]
[ − s p a t xmin ymin xmax ymax ]
[ − a_srs s r s _ d e f ] [ − t _ s r s s r s _ d e f ] [ − s _ s r s s r s _ d e f ]
[ − f format_name ] [ − o v e r w r i t e ] [[ − d s c o NAME=VALUE] . . . ]
dst_datasource_name src_datasource_name
[ − l c o NAME=VALUE] [ − n l n name ] [ − n l t type ] [ l a y e r [ l a y e r ...]]

As shown in Figure 1 the 1:250,000 scale map sheets of 062M and 063D cover the Sturgis watershed.
Follow the procedures below to produce a unied DEM that can be imported into GreenKenue.

3
ˆ Download 062M and 063D from GeoBase digital elevation data,
ˆ Unzip the downloaded les and make sure that the following dem les are available:
 062m_0100_deme.dem
 062m_0100_demw.dem
 063d_0100_deme.dem
 063d_0100_demw.dem

ˆ Merging mosaic of grids into ArcInfo ASCII grid (Merge the grid les to a format that supports di-
rect creation and random writing such as GeoTIFF (driver name GTIFF) or Erdas Imagine (driver
name HFA) using the gdal_merge.py command):
gdal_merge.py -o STURGISDEMTIFF 062m_0100_deme.dem 062m_0100_demw.dem 063d_0100_deme.dem
063d_0100_demw.dem

ˆ Use gdal_translate to convert to AAIGRID. Some drivers, such as the AAIGRID driver can only
operate by copying from a preexisting le:
gdal_translate -of AAIGRID STURGISDEMTIFF STURGISDEM.grd

ˆ Check the header of the ASCII grid le.


In some cases the NODATA_VALUE line may not be
there. In that case add 'NODATA_VALUE = -9999' at the end of the header section.

The general usage of gdal_merge.py is as follows:


gdal_merge . py [ − o o u t _ f i l e n a m e ] [ − o f out_format ] [ − co NAME=VALUE] *
[ − ps p i x e l s i z e _ x p i x e l s i z e _ y ] [ − tap ] [ − s e p a r a t e ] [ − v ] [ − p c t ]
[ − u l _ l r u l x u l y l r x l r y ] [ − n nodata_value ] [ − i n i t " v a l u e
[ value . . . ] " ]
[− o t d a t a t y p e ] [− c r e a t e o n l y ] i n p u t _ f i l e s

The general usage of gdal_translate is as follows:


g d a l _ t r a n s l a t e [−− help − g e n e r a l ]
[ − o t { Byte / I n t 1 6 / UInt16 / UInt32 / I n t 3 2 / F l o a t 3 2 / F l o a t 6 4 /
CInt16 / CInt32 / CFloat32 / CFloat64 } ] [ − s t r i c t ]
[ − o f format ] [ − b band ] [ − mask band ] [ − expand { gray | rgb | rgba } ]
[− o u t s i z e x s i z e [ % ] y s i z e [ % ] ]
[ − u n s c a l e ] [ − s c a l e [ src_min src_max [ dst_min dst_max ] ] ]
[− s r c w i n x o f f y o f f x s i z e y s i z e ] [− p r o j w i n u l x u l y l r x l r y ]
[ − a_srs s r s _ d e f ] [ − a _ u l l r u l x u l y l r x l r y ] [ − a_nodata v a l u e ]
[ − gcp p i x e l l i n e e a s t i n g n o r t h i n g [ e l e v a t i o n ] ] *
[ −mo "META−TAG=VALUE" ] * [ − q ] [ − s d s ]
[ − co "NAME=VALUE" ] * [ − s t a t s ]
src_dataset dst_dataset

The processed DEM is as shown in Figure 2 with a zoomed view as shown in Figure 3.

4
073H 063E 063F

073A 063D 063C

072P 062M 062N

072I 062L 062K

063D

Figure 2: Figure showing Downloaded,formatted and stitched DEM map of the Sturgis watershed.

Figure 3: Figure showing zoomed view of the Sturgis DEM.

062M
3.2 Land Cover Data
Again using the same scale for the land cover (the 1:250,000 scale) the map sheets of 062M and 063D
cover the Sturgis watershed. Follow the procedures below to produce a unied Land Cover that can be
imported into GreenKenue.

ˆ Download 062M and 063D from GeoBase Land Cover data 1:250,000 scale map sheets.
ˆ Unzipping the downloaded les will produce the following Land Cover vector maps:
 LCC2000-V_062M_1_0.shp
 LCC2000-V_063D_2_0.shp
 Merge the above shape les into a single shape le using commands from the OGR utility:
* create a new shapele STURGISLANDCOVER and copy the contents of LCC2000-
V_062M_1_0 into the new shapele,
ogr2ogr STURGISLANDCOVER.shp LCC2000-V_062M_1_0.shp

* append the contents of LCC2000-V_063D_2_0 to the newly created shapele and name
it STURGISLANDCOVER.
ogr2ogr -update -append STURGISLANDCOVER.shp LCC2000-V_063D_2_0.shp -nln
STURGISLANDCOVER

The stitched Land cover data should resemble Figure 4. The symbology is based on the harmonized
legend build by the Earth Observation for Sustainable Development (EOSD). A symbology style
(provided in Appendix A) is prepared to reproduce the QGIS version of the GeoBase's symbology
layer that is applicable for ArcGIS. The following set of commands (this is applicable using the
QGIS 1.4 graphical interface) can be used to load the style:

 Select the text in Appendix A (or ask for the le from HAL) and save it with extension '.qml',
 Select (click on) the shapele in the table of contents (TOC),
 Right click and choose 'Properties',
 Choose the 'Symbology' category,
 Click on 'Load Style...',
 Select the saved qml le and click 'Apply' or 'OK'.

6
Figure 4: Figure showing Land Cover data of the Sturgis watershed.

3.3 Land Cover Reclassication


For modelling purposes it is usually required to regroup the land cover types into few dominant
land classes. The reclassied shape le then need to be converted into GeoTIFF so that fractional
area calculation in GreenKenue will proceed without complication. In the Sturgis watershed there
are two major land cover types (Crop land and Deciduous Forest) and the remaining area covered
with water bodies including wetlands and ice. In this case it is decided to aggregate the land
cover into Crop land and Deciduous forest that includes the water bodies. The reclassication for
the Sturgis watershed is made using the following procedure (again using the QGIS 1.4 graphical
interface).

3.3.1 Use SQL Query Builder to select land covers for each group
In this exercise (based on the Geobase's EOSD and as indicated in the qml text) values for the
attribute eld (COVTYPE) that can be grouped into the crop land are all less than 200 excluding
wetlands (COVTYPE >= 80 and COVTYPE <= 83), ice (COVTYPE = 31) and water (COV-
TYPE = 20). Hence the following procedure was used:

 Right click on the land cover (in the TOC) and click on the 'Open Attribute Table',
 Click on 'Advanced Search',

7
 Write the following clause in the 'SQL where clause' space:
COVTYPE < 200 AND COVTYPE != 20 AND COVTYPE != 31 AND COVTYPE != 80
AND COVTYPE != 81 AND COVTYPE != 82 AND COVTYPE != 83
 Click 'OK',
 Again right click on the land cover (in the TOC) and click on the 'Save selection as shapele'.
The above procedure should produce the Figure shown below (Figure 5). Note that the clipping is
done using the 'Vector' menu of QGIS where the 'clip' tool is available in the geoprocessing package
(sub menu).

Figure 5: Figure showing land cover types for the crop land class.

Values for the attribute eld (COVTYPE) that can be grouped into the Deciduous Forest are all
the rest than those included for the crop land. Hence the following procedure was used:

 Right click on the land cover (in the TOC) and click on the 'Open Attribute Table',
 Click on 'Advanced Search',
 Write the following clause in the 'SQL where clause' space:
COVTYPE >= 200 OR COVTYPE = 20 OR COVTYPE = 31 OR COVTYPE = 80 OR
COVTYPE = 81 OR COVTYPE = 82 OR COVTYPE = 83
 Click 'OK',
 Again right click on the land cover (in the TOC) and click on the 'Save selection as shapele'.

8
The above procedure should produce the Figure shown below (Figure 6).

Figure 6: Figure showing land cover types for the crop land class.

Producing the above two gures helps to make sure that the SQL query is done the right way.
Coming back to the main point (that is to produce a single reclassied shape le) we need to
edit the 'COVTYPE' attribute eld such that it will only has two values for the two classes, crop
(COVTYPE=1) and forest(COVTYPE=2). Again the following sets of commands can be executed
using the QGIS interface (the procedure should have been simplied with an automated script to
run on the command line):

 Use SQL query to select land covers for the crop class (use the above procedure with the 'SQL
where clause' space: COVTYPE >= 200 OR COVTYPE = 20 OR COVTYPE = 31 OR
COVTYPE = 80 OR COVTYPE = 81 OR COVTYPE = 82 OR COVTYPE = 83),
 Click on 'Toggle editing mode'. The icon for the 'Toggle editing mode' can be found either
on the main interface of QGIS or in the opened attribute tables dialogue,
 Click on 'Open eld calculator' in the opened attribute tables dialogue and assign a value of
1 for the selected features in the 'COVTYPE' attribute eld, and
 Using a similar procedure assign a value of 2 for the remaining features in the 'COVTYPE'
attribute eld.

The reclassied shape le should produce a similar Figure as shown below (Figure 7).

9
Figure 7: Figure showing reclassied shape le (the crop and forest land classes).

3.3.2 Convert Vector Format (shape le) into GeoTIFF Format


The nal part of the land cover data pre-processing is to convert the shape le into GeoTIFF
format. Once the contrast of the reclassied land classes is well arranged like Figure 7 save the
image as GeoTIFF le. This can easily be done using the 'File' menu and then the 'Save as image'
command from the QGIS interface. The QGIS interface provides options for many le types. Select
the 'ti' le format. Two les will be produced:

 '.ti' le, and


 '.tiw' world le. World les are a simple mechanism for associating georeferencing (world co-
ordinates) information with raster les. They are often used with TIFF instead of embedding
georeferencing information in the le itself. The world le contents look like the following.
The rst coecient is the X pixel size. The second and third are rotational/shear coecients
(and should normally be 0.0). The fourth is the Y pixel size, normally negative indicating
that Y decreases as you move down from the top left origin. Below is the content of the '.tiw'
le for the Sturgis watershed.

0.00088332426008727594
0
0
− 0.00088332426008727594
− 103.26752961654286
52.472087875330367

10
The nal two values are the X and Y location of the centre of the top left pixel. The information
in this le should be properly used when importing the 'ti' le into GreenKenue so that it
will be positioned at the right location and with the right extent.

4 WATFLOOD Map File using GreenKenue

4.1 Importing data into GreenKenue


Once the digital elevation data is in ASCII format and the land cover data is in GeoTIFF format
then they are ready to be imported into GreenKenue. For further details on how to prepare the
MESH drainage database le using GreenKenue refer to 'A quick guide to build drainage database
le.pdf' which is available on the Stand alone MESH wiki site. The GreenKenue manual is also
very helpful. Follow the following steps using the GreenKenue graphical interface:

 
 Import the DEM as ArcINFO Grid (ASCII) (File Import ArcINFO Grid (ASCII)). It may
be good to provide '.asc' extension for the DEM le. Also, check the header of the DEM le.
The 'NODATA_VALUE' line may be absent. In that case include 'NODATA_VALUE -9999'
at the end line of the header,
 Once imported click on the le in the TOC. Right click and select 'properties'. Click on the
spatial tab and assign the coordinate system as LatLong projection and WGS84 datum,
 
 Import land cover as GeoTIFF (File Import GeoTIFF),
 Once imported click on the le in the TOC. Right click and select 'properties'. Click on the
spatial tab and use the information from '.tiw' world le for the South West location as well
as for the grid sizes. Note that the world le provides the North West location and with a
negative grid size for the Y direction. It is recommended to calculate the corresponding South
West location and use a positive grid size. Click 'Apply' and assign the coordinate system as
LatLong projection and WGS84 datum.
 Further reclassify the land cover le using 'Reclassify' from the 'Tools' menu and make sure
that the two land classes are properly represented.

The imported data should appear as shown in Figure 8.

11
Figure 8: DEM and reclassied land cover data of the Sturgis watershed (in GreenKenue).

4.2 Creating the Watershed le


Once the DEM is imported and projection assigned then we can generate the Sturgis watershed
and it is important to compare the generated boundary and stream network with actual or data
that came from other GIS sources. Follow the following steps to create the watershed:

 
 From the 'File' Menu select 'new' and click 'watershed le' (File new watershed), a new
dialogue will appear and a watershed object will be created in the TOC,
 Drag and drop the DEM into the child dem of the new watershed,
 Select the 'watershed' tab from the opened workstation dialogue and click 'generate', stream
network and an arbitrary bigger basin will be generated,
 Drag and drop generated stream channels into the 2D view,
 Pick a point at the outlet of the Sturgis watershed,
 Right click and click on 'add basin', delete the bigger basin that was generated in the rst
step.

The generated basin boundary should appear as shown in Figure 9. Blue is the Sturgis watershed
boundary from PFRA and red is boundary generated by the GreenKenue algorithm.

12
Figure 9: DEM and reclassied land cover data of the Sturgis watershed (in GreenKenue).

4.3 Creating the WATFLOOD map le


Once the land cover is imported, reclassied and assigned a projection and watershed is created
then we have all what is required to create the WATFLOOD map. Follow the steps below to
generate the map le.
 From le menu select 'new' and click 'watood map' (File newwatood map), a new
window appears and a map object is created in the TOC,
 Drag and drop the already generated 'New Watershed' onto the New Wateood Map data
item, Specify the grid sizes or use the default values provided, the Sturgis domain is intended
for MESH modelling using the GEM forcing data (which currently is 15 km by 15 km) and
the grid sizes are specied to be in the order of 15 km,
 Select new watood map and right click and select 'land use from GeoTi',
 Click on 'collect',
 Drag the generated new watood map and drop into the 2D view,
 Save the workspace as well as the map le.

4.4 Double check if imported data is properly represented in the map


le
Now we have the map le that contains the information of the DEM and the land cover data.
Before going to further processing of the map les it is important to double check the dierent

13
attributes of the map le using the GreenKenue graphical interface. Double clicking the map object
in the TOC will bring a new window where we can select the 'data' tab that lists down all the
attributes. Figures of four important attributes (DEM, drainage directions, area fraction of the
crop class and area fraction of the forest class) of the Sturgis map les are provided below. Try to
compare the values with the corresponding original data.

Figure 10: Sturgis DEM representation in the generated map le.

14
Figure 11: Sturgis drainage directions representation in the generated map le.

Figure 12: Sturgis crop class representation in the generated map le.

15
Figure 13: Sturgis forest and water bodies representation in the generated map le.

5 MESH Drainage Database File using bsn.exe

The MESH drainage database le is the reformatted version of the WATFLOOD map le. There
is a windows based executable le (bsn.exe) that does the reformatting. Further details on how to
use the program can be referred to the MESH manual. The bsn.exe program has not been updated
for a while where as GreenKenue has been continuously updated. Hence there are a few steps to
be done on map le before using the bsn.exe program:

 Go to the directory where you saved the map le. Rename the map le using a short name
(may be less than 7 words).
 Open the map le using any text editor and correct formats in a few lines (see the correction
made for the Sturgis map le below): On line 2 and 3 provide spacing between the attribute
name and the value (i.e., for :Projection and for :Ellipisoid), Change Latlong to uppercase
LATLONG, and delete the repeated comment on line 8.

Here is the original header for the Sturgis map le:

#
: Projection Latlong
: E l l i p s o i d WGS84
#
: xOrigin − 103.440600
: yOrigin 51.735800
#
#
: xCount 6
: yCount 6
: xDe lta 0.219000
: yDe lta 0.135000
#
: contourInterval 1.000000
: imperviousArea 0
: classCount 2
: elevConversion 1.000000

16
#−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
: endHeader

And here is the corrected header for the Sturgis map le.

: Projection LATLONG
: Ellipsoid WGS84
#
: xOrigin − 103.440600
: yOrigin 51.735800
#
: xCount 6
: yCount 6
: xDe lta 0.219000
: yDe lta 0.135000
#
: contourInterval 1.000000
: imperviousArea 0
: classCount 2
: elevConversion 1.000000
#−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
: endHeader

Now the corrected map le is ready and we can run bsn.exe program. It is preferable to run the
program on the dos command line.

 Run the command line,


 Change directory to the directory where the map le resides. For simplicity save the bsn.exe
program in the same folder,
 Type 'bsn' and press enter as shown in Figure 14,

Figure 14: Running bsn.exe program on the dos command line.

 Carefully follow the printed message on the screen and provide the right input. At the middle
of the process bsn.exe will conrm if the map header is read right as shown in Figure 15,

17
Figure 15: bsn.exe program conrming if the header is properly read.

 If there is inconsistency then try to gure out what is wrong in the map le and run the
bsn.exe program again,
 If every thing is right then the program will end normally as shown in Figure 16 and will
produce many les,

Figure 16: Normal ending of the bsn.exe program.

Out of the many les produced by the bsn.exe program it is the 'new_shd.r2c' le that is required
for the MESH modelling. Save the le as 'MESH_drainage_database.r2c' and with that we are
all done using freely available programs and freely available data.

6 Appendix A - Symbology layer for displaying GeoBase land


cover data within QGIS

Contact Muluneh A. Mekonnen ([email protected]) for the symbology layer le.

References

N. Kouwen, E.D. Soulis, A. Pietroniro, J. Donald, and R.A. Harrington. Grouped response units
for distributed hydrologic modeling. Journal of Water Resources Planning and Management,
119(3):289  305, 1993.

18

You might also like