CRWR Online Report 97 #7 GIS Based Reservoir Planning for the Souss Basin, Morocco by Kwabena Asante, M.S. Graduate Research Assistant and David Maidment, PhD. Principal Investigator December 1997 CENTER FOR RESEARCH IN WATER RESOURCES Bureau of Engineering Research • The University of Texas at Austin J.J. Pickle Research Campus • Austin, TX 78712-4497 This document is available online via World Wide Web at http://www.ce.utexas.edu/centers/crwr/reports/online.html
266
Embed
GIS Based Reservoir Planning for the Souss Basin, · PDF fileGIS Based Reservoir Planning for the Souss Basin, ... Avenue, of the GIS software ArcView. ... 3.3 Processing Rainfall
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CRWR Online Report 97 #7
GIS Based Reservoir Planning for the Souss Basin, Morocco
by
Kwabena Asante, M.S.
Graduate Research Assistant
and
David Maidment, PhD.
Principal Investigator
December 1997
CENTER FOR RESEARCH IN WATER RESOURCES
Bureau of Engineering Research • The University of Texas at AustinJ.J. Pickle Research Campus • Austin, TX 78712-4497
This document is available online via World Wide Web athttp://www.ce.utexas.edu/centers/crwr/reports/online.html
iii
GIS Based Reservoir Planning for the Souss Basin, Morocco
APPROVED BYSUPERVISING COMMITTEE:
_____________________________David R. Maidment
_____________________________Charles McGinnis
_____________________________G. Edward Gibson, Jr.
iv
Acknowledgements
I wish to thank Dr. David R. Maidment, Gen. Charles McGinnis and Dr. G.
Edward Gibson who supervised and guided me through this thesis research. The
time and other resources that you invested in me is sincerely appreciated. I would
also like to thank the members of the GISHYDRO research team, in particular, Dr.
David R. Maidment, Zichuan Ye and Seann Reed who were always ready to offer
assistance when I needed it. I would also like to thank the staff of the DGH in
Morocco, FAO and other agencies who provided the data for this study. Finally, I
would like to thank my parents who made it all possible. Thank you for your
support.
Kwabena Asante
August, 1997
v
GIS Based Reservoir Planning for the Souss Basin, Morocco
by
Kwabena Oduro Asante, M.S.E.
The University of Texas at Austin, 1997
David R. Maidment
This research was undertaken to develop a map-based surface water
simulation model of a river basin, incorporating the operation of reservoirs. The
Souss River in Morocco and the three major reservoirs located within the basin
were used as the study case in the research which focused on simulating the effects
of reservoirs on flow in the basin. A surface water simulation program developed
at the University of Texas at Austin was customized to enable it to simulate the
operation of reservoirs with variable monthly demands. The program was
developed in the object-oriented programming language, Avenue, of the GIS
software ArcView. Rainfall data from 48 rain gages stations spanning a 60 year
period from 1935 to 1995 were processed into daily and monthly time series. Flow
time series were also generated from runoff data collected at 6 gauging stations in
the basin. Historical operation data from each of the three Souss reservoirs were
also processed into time series and incorporated into the simulation to enable basin
response to be predicted accurately. The effects of temporal scale on modeling
effort and results were also explored by performing daily and monthly simulations.
An ArcView extension called DAMS was constructed to enable the user to insert
and remove dams as required. The extension includes preprocessing programs for
creating reservoir operation and regulation tables, varying monthly water
allocations and setting initial reservoir storage. It also contains a postprocessor for
vi
generating a summary of performance of the reservoirs during the simulation
period. The reservoir simulation was successfully completed and recorded storage
levels were successfully reproduced using inflow data recorded in the reservoir
operation tables. However, reservoir inflows generated by the surface water
simulation model did not closely resemble those recorded in the operation tables,
particularly during periods of highly variable flow.
Chapter 2: Literature Review..................................................………….........132.1 Introduction...................................................................…………….......132.2 Surface Water Simulation............................................…………............132.3 Reservoir Simulation...................................................……………….....142.4 GIS as a Planning Tool....................................................……………….17
Chapter 3: Data Processing for the Souss Basin.........................………….....193.1 Preparing the Data..............................................…………………..........193.2 Developing River Basin Coverages...........................………...................233.3 Processing Rainfall Data........................................……………...............473.4 Processing Runoff Data........................................……………................543.5 Preparing Reservoir Data.........................................…………….............61
Chapter 4: Modeling the Souss Basin.............................…….........................774.1 Developing the Model.......................................………………...............784.2 Calibrating Model Parameters...............................................……….......924.3 Constructing Reservoir Simulation........................................……….....1074.4 Checking Model Reliability.............................................………...........1134.5 Using the Model as a Planning Tool......................................……….....1174.6 Developing the DAMS extension.........................................……..........121
Appendix 1: Data Dictionary............................................................……......158Appendix 2: Converting daily to monthly rainfall.............................……....162Appendix 3: Converting daily to monthly runoff...............................……....168Appendix 4: Interpolating for Missing Rainfall Records, Cmprain.pre..…...175Appendix 5: Computing Surplus Runoff, Cmpsurp.pre……………….……180Appendix 6: Script for Inserting Dams, Insertdm.ave.....................…….......188Appendix 7: Script for Removing Dams, Removedm.ave....................…….189Appendix 8: Script for Making Water Allocations, Setdmval.ave.......…......197Appendix 9: Script for Setting Up Regulation Tables, Setdmrg.ave.....….....204Appendix 10: Script for Initializing Reservoir Storage, Setdmst0.ave......….211Appendix 11: Script For Summing Up Monthly Outflows, Cmptotal.ave….214Appendix 12: Script for Computing Simulation, Cmpsumry.ave.....…...…...231Appendix 13: Reservoir Simulation Script, Damrt.ave.....................…..…...240Vita..............................................................................................…………...253
ix
List of Tables
Table 3.1: Sosprj Projection File.......................................…………………....28Table 3.2: Cell Values in the Flow Direction Grid ..............................……....30Table 3.3: The Hydrost.dat File of Runoff Station Coordinates ..........……....42Table 3.4: Stattrb.txt file For Attributing Runoff Stations.................……......43Table 3.5: Attributes of Souss Basin Point Coverages .....................…….......46Table 3.6: Sample Daily Rainfall Data File.......................................……......52Table 3.7: Sample Monthly Rainfall Data File...............................…….........53Table 3.8: Souss Basin Runoff Data Files.................................…………......54Table 3.9: One Dimensional Runoff Data File............................…………....57Table 3.10: Characteristics of the Souss Basin Reservoirs...................….......62Table 3.11: Reservoir Regulation File for Aoulouz...............................……..65Table 3.12: Reservoir Regulation File for Abdel Moumen.....................…....66Table 3.13: Reservoir Regulation File for Dkhila...................................….....67Table 3.14: Translation of Reservoir Operation Fields............................…..69Table 3.15: Uncontrolled Monthly Releases at Abdel Moumen..........….......70Table 3.16: Original and Resampled Reservoir Operation Fields.........…......72Table 3.17: Parameter Description for Dam Operation Table..............…......74Table 3.18: Reservoir Operation Table for Abdel Moumen.................…......75Table 4.1: Request and Inputs for the Model Preprocessing..................….....83Table 4.2: Requests and Inputs for the Surplus Interpolation.............…........87Table 4.3: Surface Water Simulation Parameters.........................…………..91Table 4.4: Requests and Inputs for Setting Optimization Target...........….....99Table 4.5: Flow Routing Parameters..................................................….......102Table 4.6: Requests and Inputs for Setting Up Optimization Model............105Table 4.7: Suggested Default Values for Routing Parameters………..……106Table 4.8: Dams.dbf Table of Reservoir Attributes...........................….......108Table 4.9: Reservoir Simulation Fields in Dam(id).dbf Tables........….........112Table 4.10: Setting Up Dam(id).dbf Tables..........................……………....124Table 4.11: Source and Target Fields for Setting Up Dam(id).dbf...............131Table 4.12: Reservoir Simulation Summary Fields in Summary.dbf...........133Table 5.1: Comparison of Daily and Monthly Parameters.............………...134Table 5.2: Comparison of Souss and Niger Basins Parameters.....………...136
x
List of Figures
Fig. 1.1: Map of the Major Rivers and Lakes of Africa..........................………....4Fig. 1.2: Developing a Map based Surface Water Simulation Model....…...…....11Fig. 3.1: Souss Database Structure......................................................…………..20Fig. 3.2: Delineated Streams and Watersheds......................................……....….34Fig. 3.3: A Typical Three dimensional data structure...........................……...….48Fig. 3.4: Souss Basin Rain Gauging Stations.......................................……...…..50Fig. 3.5: Souss Basin Runoff Stations..................................................……..…...55Fig. 3.6: Graph of the Runoff Stations Period of Record...................……....…...56Fig. 3.7: Souss Basin Dams and Aquifer ...........................................…….....…..63Fig. 4.1: Flow Diagram of Model Preprocessing...............................…...….…...79Fig. 4.2: Diagram of Surface Water Menu..........................................…………..82Fig. 4.3: Interpolation to Centroid of Watershed Polygons..............….....……....88Fig. 4.4: Chart of Daily Runoff at Amsoul........................................…………....93Fig. 4.5: Chart of Daily Rainfall at a Station near Amsoul.................…..……....94Fig. 4.6: Chart of Monthly Rainfall and Runoff at Aoulouz.................………....95Fig. 4.7: Monthly Runoff at 5 Souss Basin Runoff Stations in 1987......…..…....96Fig. 4.8: Monthly Rainfall at Selected Souss Basin Stations in 1987....………...97Fig. 4.9: Calibrating Flows at Aoulouz............................................…..……......104Fig. 4.10: Relation of Dam Data Files ................................................……..…..107Fig. 4.11: Flow Diagram of Modified Preprocessing Procedure..........….……..114Fig. 4.12: Inserting Dams from the DAMS menu................................…….…..123Fig. 4.13: Removing Dams from the DAMS menu............................…….…....125Fig. 4.14: Setting Reservoir Fields from the DAMS menu.................…..…......126Fig. 4.15: Computing Outputs from the DAMS menu......................…..….…...129Fig. 4.16: Updating Values from the DAMS menu.............................……...….130Fig. 4.17: Input Screen for Initializing Storage..................................……….…131Fig. 4.18 Generating a Simulation Summary from DAMS menu......……….…132Fig. 5.1: Measured (Target) vs. Simulated (Mflowfit) Daily Flows...……….…135Fig. 5.2: Measured (Target) vs. Simulated (Mflowfit) Monthly Flows..……….135Fig. 5.3: Measured vs. Simulated Flows at Aoulouz, 1982..................…….…..137Fig.5.4: Measured vs. Simulated Flows at Immerguen,1992..............……...….138Fig. 5.5: Measured vs. Simulated Flows at Amsoul, 1992.................…….…...138Fig. 5.6: Measured vs. Simulated Flows at Amsoul, 1982..................……...…139Fig. 5.7: Measured vs. Simulated Flows at Ait Melloul,1982.............………...140Fig. 5.8: Reservoir Simulation Results, 1990-94…………………………..…..141Fig. 5.9: Variation of Reservoir Storage at Abdel Moumen……………….…..142Fig. 5.10: Observed vs. Simulated Evaporation Losses at Abdel Moumen.…..143Fig. 5.11: Variation of Reservoir Surface Area at Abdel Moumen…………....144Fig. 5.12: Variation of Reservoir Surface Elevation at Abdel Moumen……....145
1
Chapter 1
1.1 PROJECT BACKGROUND
Since the first major river basin simulation by the Harvard Water Program
in 1960 (Hufschmidt etal, 1966), tremendous strides have been made in the
analysis of water systems. These developments have stemmed from the realization
that water is a scarce commodity that must be conserved. Despite the fact that
water makes up over 70 percent of the earth’s surface, only about two and a half
percent of this water is fresh and an even smaller percentage is useable for human
consumption and agriculture. With the present rate of population growth, it has
been estimated that the demand for water will exceed the available supply within
the next 30 years, unless substantial advances are made in the storage and reuse of
water. The prospect of this shortage is even more frightening when one takes into
account the fact that developing countries are recording the highest population
growth rates. These are the countries which have the least resources for exploring
new water sources or extracting potable water from non-potable sources.
Development agencies such as the World Bank and the United Nations
(UN) are already involved in a number of large scale projects aimed at improving
the planning of water resources in developing countries, particularly in Africa.
Within the last two years alone the World Bank has embarked on a number of such
2
projects in Guinea, Guinea Bissau, Niger, Burkina Faso and Nigeria. However,
most of this effort has focused on national scale planning. Since most river basins
tend to cross national boundaries, the need to coordinate planning and
development activities on a basin wide scale becomes apparent. The UN Food and
Agriculture Organization (FAO), the United Nation Educational Scientific and
Cultural Organization (UNESCO) and the Center for Research in Water Resources
(CRWR) at the University of Texas at Austin are undertaking a study called the
FAO/UNESCO Water Balance of Africa.
The logical starting point in the adoption of strategies for the prevention of
water shortages is an understanding of the behavior of the natural system of water
flow. This was the first objective of the Water Balance of Africa Project. The
Niger River Basin in West Africa was used as the first case study for the water
balance project. The Niger is one of the four main rivers of Africa; the Nile, the
Zambesi and the Congo are the other large rivers in the continent. It is an
important water resource of the semi-arid Sahel region of West Africa through
which it flows. With a drainage area of 2,337,000 km2, it provides a typical
example of a large river basin crossing a number of national boundaries. Some of
the processes defined in the Niger Basin include precipitation, evapotranspiration,
surface water, ground water and runoff.
3
The next step in the research was to represent these processes in such a
format as to enable the flow of water through the basin to be simulated. To this
end, an ArcView based Geographical Information System (GIS) model was
developed using the object oriented programming language, Avenue (Ye, 1996).
The model, called GH-Rivers, enables the user to simulate the various natural
processes and their interaction with each other. The model has been incorporated
into a spatial hydrology analysis system called GISHYDRO97 which contains
complementary modules for soil water balance, terrain processing, ground water
modeling and water quality analysis. The GH-Rivers model was calibrated to
ensure that flows were consistent with the flows observed at runoff stations in the
Niger basin. The procedures and methods developed in the Niger have been
successfully duplicated in the Souss basin in Morocco. With a drainage area of
about 19,000 square kilometers, the Souss is a much smaller river basin than the
Niger. It is however the source of water for major irrigation efforts in this arid
region of North Africa. Surrounded by the Atlas Mountains on the North and the
Anti-Atlas Mountains on the South, the basin extends for about 200 kilometers
inland from the Atlantic Ocean. The location of the river basin in a flat plain
surrounded by steep mountains implies that rainfall quickly becomes runoff and
concentrates in the low lying regions in the center of the basin. This water
subsequently seeps in to the underlying subsurface aquifer. Agriculture has thrived
in this area by exploiting the ground water resources offered by the region.
4
Galleries have been dug into the ground water table and the water allowed to flow
by gravity over the land surface to irrigate the farms. Over the past 50 years,
increased demand has led to increased pumping of water from the aquifer leading
to a decline of the water table. Estimates of this decline run as high as 100 meters
in some places. There is a need for surface and ground water models to describe
the horizontal and vertical movement of water to facilitate better quantification and
planning of the water resources of the basin.
Fig. 1.1: Map of the Major Rivers and Lakes of Africa
5
The final step in the research is to develop the model into a tool that can be
used to answer some of the questions frequently asked by water resource planners.
In developing water resource systems, there is often a need to determine what are
the likely demands on the system, and to assess the ability of the system to meet
these demands. Models which provide insight into the consequences to other users
of allocating a quantity of water to one user are required for such analyses. This
study is meant to be the starting point in the development of models for the
examination of the effects of control strategies. The study focuses on reservoir
planning because of the importance of reservoirs in regulating flow in rivers.
Models which simulate the effects of reservoirs can provide a basis for planning
water development activities. The Souss basin in Morocco contains three major
reservoirs which serve a variety of uses. Two of these reservoirs are located on the
same river reach and are operated in concert with each other. Hence the Souss
basin provides an excellent setting to study the effects of incorporating reservoirs
into a natural river system.
Recent developments in Geographical Information Systems (GIS) and map
based modeling in particular have made it a versatile tool in the management of
natural resources. GIS based systems have been used extensively in fields such as
forestry, land use and wildlife management. The adoption of GIS as the water
6
resource inventory and planning tool is therefore in line with the goal of integrated
resource management, espoused in the UN Agenda 21 (UNCED, 1992).
1.2 MOTIVATION
The availability of potable water is one of the most important determinants
of the quality of life in many communities in developing countries. With limited
resources to develop alternative water supplies, these communities often depend
on the water resources that are closest to them. Local authorities and other
development agencies consequently invest considerable resources into developing
such water supplies to meet the needs of these communities. This may result in a
situation where numerous projects, located at different points along a river, are
relying on water from the same source. With limited resources to invest in the
construction of complex models, important decisions on the availability of water to
sustain projects are often based on grossly simplified representations of the river
system. This has been identified by the World Bank (Sharma Etal, 1996) as one of
the main reasons for the failure of water resource development projects in
developing countries. Consequently, there is a need for inexpensive tools that
enable planners to accurately quantify the available water supply and its ability to
meet the competing demands of projects.
7
Computer simulation models have been used extensively for analyzing
river systems. However, many of these models are limited in application to the
particular river basins and require the collection of large amounts of data. The
construction of such models and databases are expensive undertakings requiring
highly skilled personnel. Developing countries often do not have the resources and
personnel to develop such models and yet it is these same countries that have the
greatest need for models that enable them to better manage their natural resources.
The establishment of global databases of geographic, climatic and other physical
parameters is one of the exciting, new developments in Geographic Information
Systems. Modelers no longer have to construct their own data bases from scratch
in order to build a model of a river basin. They can begin building the models with
data from already established sources. The GISHYDRO97 Spatial Hydrology
Analysis System developed at the Center for Research in Water Resources, the
University of Texas at Austin, enables a modeler to develop a model of a river
basin using data from some of these established sources. The map based
simulation approach presented in GISHYDRO97 is a major step forward in the
modeling of a river basin because it reduces considerably the time and input data
required to construct a model. The technology in this area of map based modeling
is still evolving but some of the potential benefits such as cost savings on database
creation are already becoming evident. This study aims to document the
development of a river basin model using the GH-Rivers model and some of the
8
data from the established global databases. It is hoped that the approach will
provide a quick and inexpensive means of analyzing the effects of water resource
planning decisions in river basins.
1.3 OBJECTIVES
A number of the tools presented in GISHYDRO97 are required for
performing many of the tasks involved in producing a simulation model. These
tools include surface reconditioning models, watershed delineation programs and
surface water simulation models. One of the key objectives of this study is to
document the use of some of these GIS tools for developing a surface water
simulation model in a typical river basin. The data requirements, data sources,
steps in processing this data into a hydrologic model and the calibration of the
model are also documented. Based on the results of the simulation, inferences are
made as to the type of information that such a model can reliably provide.
The next key objective is the incorporation of man made structures into the
simulation of the river basin. In most prior work in map based surface water
simulation, the operation of reservoirs has not been incorporated into the
simulation. Reservoirs have been simulated separately, with only symbolic lines
(not the actual river arcs) linking them. Flow in the Souss basin is highly regulated
by dams along major reaches in the basin. The availability of historical operational
9
data as well as volume-elevation and surface area-elevation curves for the
reservoirs in basin made it possible to incorporate the regulation data into the
simulated flows. Consequently, the Souss basin provides an excellent setting to
incorporate the effects of dams and reservoir into a model of a natural river
system.
The final objective of the study is to examine the utility of the model as a
decision support tool. The critical test in meeting this objective is the ability of the
model to predict the amount of water available at various locations in the basin
under a variety of reservoir operation scenarios. For a model to meet this criterion,
it has to provide the user with the flexibility to modify the components of the river
system as well as the operation patterns of individual reservoirs in the system. The
reservoir simulation portion of the model has to keep track of water levels in the
reservoirs while still providing a mechanism for user interaction in making water
allocations from the reservoirs. The development of such modeling capabilities is
considered an important step in making the map based surface water simulation
model useful as a planning tool, not just a research exercise.
10
1.4 METHODOLOGY
There has been a lot of research in the area of surface water simulation and
the key developments in this field are highlighted in chapter 2 of this report.
Reservoir simulation techniques and models that have been developed are also
reviewed as a basis for developing the model for this study. Other research efforts
involving the use of GIS as a planning tool in the field of water resource and
environmental engineering are also highlighted in chapter 2.
The map based surface water simulation model, GH-Rivers developed at
the Center for Research in Water Resources, the University of Texas at Austin, is
used in this study. The model was developed using the object-oriented
programming language, Avenue, supported by the GIS software, ArcView. The
software uses a graphical user interface to display coverages which are maps of
geographically referenced objects. These objects, topologically represented as
polygons, lines and points, are linked to databases containing related information.
The process of creating these coverages and the associated databases, illustrated in
Figure 1.2, is discussed further in chapter 3 of this report. The chapter also details
the process of developing rainfall, runoff and reservoir operation time series.
11
CREATE BASIN COVERAGES
CREATEPOINTCOVERAGES
PROCESSRAINFALLTIME SERIES
PROCESSRUNOFFTIME SERIES
PROCESSRESERVOIROPERATIONTIME SERIES
SET UPSURFACEWATERSIMULATIONMODEL
INSERT DAMSAND SET UPRESERVOIRREGULATIONTABLES
CALIBRATESURFACEWATERSIMULATIONMODEL
USEMODEL TOANALYZEPLANNINGSCENARIOS
Fig. 1.2: Developing a Map based Surface Water Simulation Model
The assembly of these components into a hydrologic model is the next step
in the process. The model was calibrated to generate flows comparable to the
observed runoff data. This was followed by the construction of the reservoir
simulation which enabled the various operation scenarios of the reservoirs
coverage to be simulated. This involved modifying the existing simulation routine
in the program. Chapter 4 outlines this procedure and demonstrates how the
resulting model can be used as a planning tool.
12
The results of the simulation in the Souss basin and a summary of findings
are presented in Chapters 5. An assessment of the method and its limitations and
advantages are presented in the final chapter. The programs developed during this
study are presented in the appendices. The programs include operating instructions
to enable subsequent users to duplicate the process.
1.5 CONTRIBUTION TO KNOWLEDGE
This research was undertaken with the intention of consolidating the
knowledge acquired in GIS and map based surface water simulation into a single
procedure for developing a model of a river basin that includes reservoirs. It is
hoped that the documentation of this procedure will provide modelers and planners
with a handy reference that could be used for developing similar models in other
river basins. The reservoir simulation undertaken in this study represents an
important first step in transferring the knowledge acquired from research
institutions to the working environment where decisions have to be made. It
provides a means of modeling not just the natural system as it exists but also the
effects of changing those variables over which we have control.
13
Chapter 2: Literature Review
2.1 INTRODUCTION
A review of research in the three major aspects of this study was
undertaken. They include surface water simulation models for generating flows
from rainfall data, reservoir simulation models for predicting storage levels and the
use of GIS as a planning tool.
2.2 SURFACE WATER SIMULATION
A number of models for simulating the rainfall-runoff process have been
developed in recent years. These models can be classified by their output as flood
The grid soscont is projected to sodempj using the projection file sosprj
by typing the following at the arc prompt:
arc: project grid soscont sodempj sosprj
At the time the coverages for the Souss basin were processed, the raster
data analysis tool was not yet available in the ArcView software. All the data
29
processing had to be done in the raster environment of the Arc/Info module, Grid.
This is a command driven tool which can be somewhat cumbersome to use
because of the strict command syntax that must be observed. With the release of
ArcView3 and the Spatial Analyst, the processing of DEMs can now be done in a
much more friendly Windows environment. The GISHYDRO97 Terrain module
presents ArcView-based tools for accomplishing this task.
The original DEM contains low elevation points known as pits. These pits
must be removed if the flow of water over the land surface is to be simulated,
effectively. The pits are removed by defining a maximum pit depth over the study
area. All cells with depths greater than the maximum depth are filled in. The
command for performing this task is as follows:
Grid: fill sodempl sodemfl SINK 800 #
where 800 is the maximum pit depth in meters, and sodempl and sodemfl
are the input and output grids, respectively.
The next task involves defining the direction in which incident rainfall
would run off the land surface. Since water is most likely to flow in the direction
of the steepest slope, the slope between a cell and its 8 neighboring cells is used to
define the flow direction over the land surface. The algorithm used defines flow
direction from a particular grid cell as the steepest path from its centroid to that of
30
a neighboring cell. It computes the slope to centroid of its eight neighboring cells
and defines flow in the direction with the steepest downward slope. A grid with the
flow directions in the basin defined can be created with the command:
Grid: sodemfd = flowdirection ( sodemfl )
The resulting flowdirection grid has cell values assigned depending on
which of the directions of an eight point compass the cell discharges in. Table 3.2
shows the flow direction grid cell value for the eight compass directions.
Flow Direction Cell Value
East 1
South-East 2
South 4
South-West 8
West 16
North-West 32
North 64
North- East 128
Table 3.2: Cell Values in the Flow Direction Grid
The next step is to compute a flow accumulation grid. This is a grid of the
number of upstream cells contributing flow to each cell. It is computed from the
flow direction grid with the command:
Grid: sodemac = flowaccumulation ( sodemfd )
With the flow accumulation grid in hand, it is now possible to identify
areas in the basin where water is likely to accumulate. It is also possible to
31
determine where a river is most likely to flow since a certain amount of water is
required to create a river. A continuous string of high accumulation cells can be
defined as a river. There is however a need to make a distinction between small
streams of little significance and larger rivers. This is done by defining a minimum
threshold of the number of upstream cells that a cell must have in order to be
classified as a stream. This threshold may vary depending on the complexity of the
stream network required. For the Souss basin study, a threshold of 100 was used.
This means that cells with a minimum drainage area of 100 km2 are classified as
falling within the river channel. The command for delineating the stream network
with a threshold is :
Grid: sodemsn = con ( sodemac > 100, 1 )
The resulting grid contains cell values of 1 for cells with a drainage area greater
than the minimum threshold and cell values of 0 for all other cells. It contains a
single stream network with several tributaries all joining the main river. In order to
determine the areas that are contributing flow to individual river sections, this
stream network must be broken down into its component arcs. The command :
Grid: sostlnk = streamlink ( sodemsn, sodemfd )
separates the stream network into the component arcs using the flow
direction grid to locate intersection points. The arcs in each river reach must now
be assigned the same value so that they can be identified with the other cells in the
reach. The command:
32
Grid: sostmax = zonalmax ( sostlnk, sodemac )
assigns the maximum value of flow accumulation in each river reach to all
the other cells in that reach. The outlet cells in the reach are now identified as the
cells for which the cell value in the zonal maximum grid, sostmax, is equal to the
flow accumulation grid and which also lies within the same river reach as defined
by the stream link grid. This is done by typing:
Grid: sostout = con ( sostmax == sodemac, sostlnk)
The portion of land draining through the outlet points in sostout can be
delineated using the command:
Grid: sodemws = watershed ( sodemfd, sostout )
This produces a grid in which there is a watershed zone associated with
each outlet point. This zone of cells represents the area of land draining through
the outlet point. Consequently, whenever rain falls on that watershed, any water
that becomes surface runoff will drain through that outlet. The processing of the
DEM in the grid environment is now complete. The Grid module can now be shut
down by typing:
Grid: quit
The watershed grid, sodemws is converted into a polygon coverage for use
in the ArcView based model from the arc command prompt:
arc: polygrid sodemws sobasin
33
The watershed boundary arc coverage can be constructed from the polygon
coverage using the build command.
arc: build sobasin
A label point coverage is also produced containing one label point per
polygon. These label points are used for storing information about individual
polygon (polygon attributes) in Arc/Info. However, they are not required in
ArcView which stores attribute information in a separate table called the feature
attribute table. Each feature in the coverage is linked to the corresponding attribute
information in the feature attribute table by a key field common to both the
coverage and the table. The key field for basin coverages in the Souss model is the
grid-code.
The stream network is created by converting the zonal grid, sostmax, into a
coverage and then building it as a line coverage using:
arc: linegrid sostmax soriver
arc: build soriver arc
The delineation of the watersheds in Souss basin using the process
described above produced a coverage with 114 polygons and associated river arcs
as shown in Figure 3.2.
34
Fig. 3.2: Delineated Streams and Watersheds
The watersheds were of comparable size but there were a few tiny arcs
which can result in single-cell, watershed polygons. If single-cell polygons are
encountered, the watershed and river network coverages must be edited to remove
them before the coverages can be used in the simulation model. Coverages may
also be edited to reduce the number of watersheds and consequently, the model
calibration effort. Instructions for editing coverages in the Arc/Info module,
ArcEdit, operating from a UNIX environment, are provided below. The
35
commands described here are those required for performing some of the basic
editing tasks encountered in editing river and watershed coverages. Due to the
interactive nature of the edit environment offered by ArcEdit, the instructions
included here cannot be an exact duplicate of those used in editing the Souss basin
coverages. These instructions have compiled to highlight the key commands in
ArcEdit and to explain how they can be used in editing basin coverages.
Begin the ArcEdit session by logging onto the computer system and
opening up a console window. From the UNIX command prompt, type:
$arc
to start Arc/Info. Begin an Arc Edit session from the resulting arc prompt by
typing:
Arc: arcedit
At the arcedit prompt, type:
Arcedit: display 9999
to open up a display window. The coordinate system defined in the river network
coverage, soriver, may be used to define the map extent in the display window
with the command:
Arcedit: mape soriver
This is however not necessary as the next command sets the map extent to the
boundaries of the soriver coverage by default. The command:
36
Arcedit: ec SORIVER
specifies the soriver as the coverage to be edited and sets the map extent if there is
no extent defined. The type of features to be made drawn in the display window
must be specified by setting the draw environment to arc using:
Arcedit: de arc
The edit coverage can now be viewed in the display window by typing:
Arcedit: draw
The default color of the edit feature is white. This can be changed with the
command:
Arcedit: calc &symbol = N
where N is the number of the color to be used. For example, using N = 2 changes
the default color to yellow. It is also a good idea to have the watershed coverage or
any other coverage displayed in the background. The command:
Arcedit: bc sobasin 5
allows the watershed coverage, sobasin, to be displayed as a backcoverage with
the color number 5, a light blue. As with the edit coverage, the class of feature to
be displayed in the background must be specified. The command:
Arcedit: be arc poly
allows both arc and polygons to be displayed in the back environment. Make the
newly defined backcoverage visible in the display window with:
Arcedit: draw
37
Specify the type of feature to be edited in the edit coverage, soriver, with:
Arcedit: ef arc
The set up of the edit environment is now complete and changes can now be made
to the coverage. Select an arc that is to be deleted by typing:
Arcedit: sel
A cross-hair feature selection tool appears in the display which can be used to
select the arc. The selected arc becomes yellow. Repeat the select command if the
wrong arc (or no arc) is selected. Multiple arcs can be selected with:
Arcedit: select many
It is a good idea to zoom in a little closer before selecting the arc. The zoom
command in the menu bar of the display window allows the user to do this.
Delete the arc or arcs by typing:
Arcedit: delete
Deleted arcs can be restored to the coverage by typing:
Arcedit: oops
The oops command can be repeated as many times as desired to restore prior edits
one at a time. There is also the option of leaving Arc Edit without saving the edits.
This option ensures that all edits performed during the session are discarded.
It is sometimes necessary to split an arc into two to enable portions or it to be
deleted. Select the arc using the select command described earlier. Split the arc
into two by typing:
38
Arcedit: split
and clicking on the location along the arc where the node is to be inserted. A node
is insert at the selected point and two independent arcs are formed. The unwanted
arc can now be selected and deleted. It may also be necessary to extend arcs
which may be isolated from the rest of the river network to ensure that the network
remains connected. Select dangling arcs using the select command and type:
Arcedit: extend
Click on two locations in the display window to indicate the distance over which
the arc should be extended. The selected arc will only be extended if there is
another arc within the specified distance. It is important to keep the edit distance
small since both ends of the selected arc will be extended. If both ends of the
selected arc are close to other arcs, it may be necessary to move one node of the
selected arc a little closer to the nearest network arc. To do this, set the edit feature
to node with:
Arcedit: ef node
Move the nodes by typing:
Arcedit: move
An indexed menu is presented with index numbers specifying the actions to be
performed. Choose numbers from the menu to specify the node to be moved and
the destination to move it to. Now, set the edit feature to arc again and try the
39
extend command again. When the editing is complete, save the changes to the
coverage by typing:
Arcedit: save soriver
and exit Arc Edit with the command:
Arcedit: quit
From the arc prompt, restore topology in the edited coverage with the command:
Arc: build soriver arc
The edited coverage is now ready for use in the simulation model.
The procedure describe above can also be used for editing the watershed
polygon coverage, sobasin. The edit feature is set to arc as before since polygons
are described in Arc/Info topology as arcs with labels in them. The edited stream
network coverage is used as the backcoverage so that unwanted polygons, those
with no arcs in them, can be identified and removed. Another important difference
to be addressed is that reducing the number of polygons without a corresponding
reduction in the number of labels results in some polygons having multiple labels.
Extra labels can be detected and removed at the end of the edit session but polygon
topology must be reestablished in the edited coverage before this can be done.
Save the session and exit Arc Edit as before. Recreate polygon topology in the
coverage by typing:
Arc: build sobasin poly
40
The build command can only be used to establish topology if there are no
intersecting arcs or arcs running too close to each other. If any intersections are
detected, an error message is displayed indicating that polygon topology could not
be created. In such instances, the clean command must be used to remove
intersections and reconstruct polygons:
Arc: clean sobasin sobasin2 0.0001 0.0001
This results in a new polygon coverage called sobasin2 with polygon topology
established. Creating a back up copy like this is highly recommended because
‘cleaning’ coverages can sometimes have undesirable consequences, such as the
creation of sliver polygons and the loss of attributes. After polygon topology has
been reestablished, check for multiple labels by typing:
Arc: labelerrors
Make a list of the identification numbers of the polygons with errors and restart the
Arc Edit session. After opening the display and the edit coverage, set the draw
environment to polygons, arcs and labels using:
Arcedit: de poly arc label
and the edit feature to label with:
Arcedit: ef label
Select the extra labels by specifying the label field numbers obtained from the
labelerrors command by typing:
Arcedit: sel sobasin2-id = 45
41
where sobasin2-id is the name of the identification field (usually the coverage-id)
and 45 is the label number. The command:
Arcedit: delete
removes the selected labels. Save the changes and exit Arc Edit, and build the
coverage again.
The second category of coverages, the point coverages, are used to mark
the location of control points and structures. In the Souss model, point features are
used to mark the location of rain gauges, runoff stations and dams. A separate
coverage is developed for each of these feature types. Data requirements for
developing a point coverage include a file containing the geographic coordinates
of each feature and a point identification field such as a station number. For the
Souss basin model, station identification numbers assigned by the Direction
Generale de L’Hydraulique (DGH) are used in developing the rain gage and runoff
coverages. The DHG is the agency responsible for the operation of the stations or
control structures in Morocco. Using station identification numbers defined by
them ensures that other associated data such as rainfall and runoff records can be
linked to the corresponding station. The station number is used as the key field for
such data linking. A new set of numbers were assigned for the reservoirs as there
were no predefined identification numbers. Additional data such as station name,
elevation and date of creation were added to the attribute table in ArcView. This
42
makes the point coverages more informative and facilitates subsequent querying.
The procedure for developing a point coverage is outlined below using the runoff
stations as an example. A similar procedure is used in developing the other point
coverages. A data file containing the locations of the runoff stations is created in a
text editor and saved under the file name hydrost.dat, as shown in Table 3.3.
1 -9.155 30.753
2 -9.071 30.844
3 -9.061 30.702
4 -8.018 30.600
5 -9.492 30.362
6 -8.155 30.700
7 -8.897 30.433
8 -9.191 29.728
9 -9.510 29.616
10 -8.017 30.727
end
Table 3.3: The Hydrost.dat File of Runoff Station Coordinates
The data file is divided into three columns, each separated by a single
space. The first column contains an index running from 1 to 10 (or the appropriate
number of stations). This index is used to mark the beginning of data for a new
point in the data file. The second and third columns contain the respective
longitudes and latitudes (in decimal degrees) of the runoff stations. While runoff
data made available for this study included only 6 runoff stations, there were a
43
total of 10 runoff stations in the coverage. The additional runoff stations were
included to ensure that subsequent studies could use runoff data from any of the
other stations in the basin without having to develop a new coverage. When the
text file is created, the ‘end’ statement must be followed by a click on return key.
This ensures that it is executed by the program when the coverage is being
generated. It indicates to the program that data input is complete.
Additional attributes can be added to a coverage to make it more
informative. A file containing additional attributes of the runoff stations is created
and stored under the file name, stattrib.txt. The fields in this file include the name
of the station (stname) and the station id number (IRE). The text file, stattrib.txt, is
shown in Table 3.4.
HYDROST_ID STNAME IRE1 AGUENZA 0597
2 AMSOUL 0594
3 - -
4 IMMERGUEN 0642
5 AIT MELLOUL 4340
6 AOULOUZ 0203
7 - -
8 - -
9 - -
10 IBERGNATEN 0858
Table 3.4: Stattrb.txt File for Attributing Runoff Stations
44
A new directory called coverage is created on the UNIX system and the
two input files, hydrost.dat and stattrib.txt, are copied to the directory. From the
UNIX command prompt, type:
$arc
to begin an Arc/Info session. From the arc prompt, type:
Arc: generate hydrost1
This command starts up a dialog for creating the point coverage and results in the
generate command prompt. The command:
Generate: input hydrost.dat
specifies the source of the coordinates for building the points. Specify the
type of feature to be created with:
Generate: points
The generation process begins to run. When this is complete, exit generate by
typing:
Generate: quit
Individual points have now been generated but they have not been linked
together into a single coverage. From the arc prompt, combine the generated points
into a single, topologically referenced coverage by typing:
Arc: build hydrost1 points
Add the x and y coordinates to the feature attribute tables of the coverage
by typing:
45
Arc: addxy hydrost1
The point coverage that has just been created is in geographic coordinates.
It must now be projected into a flat map projection. As mentioned earlier, the
coordinate system used in the Souss basin is the Lambert Conic projection. The
parameters for this projection are stored in a text file called sosprj as shown in the
Table 3.1. To project the generated coverage, hydrost1, to a new coverage,
hydrost, using the projection file, sosprj, type:
Arc: project cover hydrost1 hydrost sosprj
from the arc command prompt. This creates a projected point coverage
ready for use in the surface water model. Exit Arc/Info by typing:
Arc: quit
The creation of additional attributes can be done in Arc/Info or ArcView.
However with a large number of attributes to be added, the use of a spreadsheet
was found to be quicker. The addition of the attributes is done by opening the
feature attribute table of the runoff station coverage, hydrost.dbf, in an Excel
spreadsheet and along with the table containing the attribute data, stattrib.txt. The
key fields, ‘hydrost_id’ for hydrost.dbf and ‘number’ for stattrib.txt, are
compared to ensure that the records in the two tables are in the same order. The
attributes in the coverage hydrost are updated by copying the desired columns
from stattrib.txt and pasting them in hydrost.dbf.
46
After copying the attributes, the updated spreadsheet of hydrost.dbf is
saved in Dbase(III) format to ensure that is can subsequently be read in ArcView.
The option to save a spreadsheet to various formats is available under the
File/Save As… menu in Excel. A similar process was followed in creating the
point coverages of the rain gages, rainst, and the dams, bigdams. A list of point
coverages developed, their key fields and other attribute fields is provided in Table
3.5.
COVERAGE KEY FIELDS ATTRIBUTES DESCRIPTION
HYDROST HYDROST_ID HYDROST_ID STATION NUMBER
IRE IRE STATION ID (STRING)
HYDROST_ COVERAGE ID
STNAME STATION NAME
X NORTHING
Y EASTING
RAINST RAINID RAINID STATION ID (STRING)
RAINST_ID STATION NUMBER
RAINST_ COVERAGE ID
IRE STATION NUMBER
X NORTHING
Y EASTING
Z ELEVATION
BIGDAMS DAMID DAMID DAM NUMBER
DAMS_ COVERAGE ID
DAMS_ID DAM NUMBER
NAME DAM NAME
FIRSTYR YEAR FIRST OPERATED
FIRSTMTH MONTH FIRST OPERATED
Table 3.5: Attributes of Souss Basin Point Coverages
47
3.3 PROCESSING RAINFALL DATA
The availability of good rainfall data is essential to the success of any
surface water modeling effort. It is the primary input for the simulation model and
consequently it greatly influences the quality of results. Geographic features such
as mountains can result in unexpected rainfall patterns. Such patterns can only be
represented in the model if a dense network of gauges is available. Hence data
from all rain gauges located both within and close to the river basin were used.
This enables spatial variations in rainfall patterns to be captured and represented in
the model. Data from each gauge were used even if the period of record for the
gauge covered only a portion of the study period. Important scenarios could
otherwise have been excluded if only gauges covering the entire study period were
used.
The rainfall data have to undergo a number of processing steps before
being used in the simulation model. The first processing step involves
transforming the data stored in two or three dimensional tables into single column
time series. The traditional approach to gathering daily rainfall data involves
recording measurements made at a remote station and transmitting this information
to a central data bank, periodically. Consequently, data for each station are usually
48
stored in a separate file. These files are often two dimensional in nature with the
month of the year as columns and the days as rows. Where paper filing systems are
used, each year of data are often stored on a single sheet of paper resulting in a
three dimensional file structure as illustrated in Figure 3.3.
Fig. 3.3: A Typical Three Dimensional Data Structure
The object oriented programming approach used in the model requires that
all data be stored as time series. This formatting problem can be solved in a
number of ways. Cutting and pasting in a spreadsheet is an easy and interactive
means of doing this conversion. However, with the 60 year period of record
adopted in this study, the use of a spreadsheet was found to be too tedious to be
49
practical. A computer program developed in the programming language C, was
used for this conversion. The program, called sosprain.c, was developed by
Zichuan Ye of the Center for Research in Water Resources. This program is
format dependent and was developed to perform the conversion of the rainfall data
as acquired from the DGH in Morocco. The program is stored in the programs
directory of the Souss Basin Model CD-ROM.
The next processing step involves interpolating for missing records. This
proved to be the most tedious and time consuming task in developing the Souss
basin model. The rainfall data used in the study were supplied by the Direction
Generale de L’Hydraulique (DGH), the agency responsible for water resource
development in Morocco. Daily rainfall records from 48 gauging stations, shown
in Figure 3.4, were made available to the study. The data were collected over a
period of 60 years from 1935 to 1994.
50
Fig. 3.4: Souss Basin Rain Gauging Stations
The rainfall data contained significant instances of missing records. In
addition, the gauging stations did not have the same period of record. The
programming approach used in GH-Rivers requires a rainfall record at each of the
gauging stations during each time period. Hence, data from other stations are
interpolated to fill in missing records and to generate records for periods when no
data were collected. The GH-Rivers simulation model contains a script called
cmprain.ave which generates data for missing records. This script runs through
51
the rainfall records until it locates a station with a negative (missing) record. It
then uses the rain gage coverage, Rainst, to locate the closest gage with a non-
negative rainfall reading for the same time period. It then assigns this rainfall
reading to the missing record. Instructions for running this interpolation are
included in section 4.1 of this report while the avenue script for the program is
documented in appendix 4.
The interpolation can be run on a single file containing the whole period of
record but since each year of data takes about an hour to process, this approach
would have required a continuous 60 hour processing run. Such a run was not
feasible because of practical considerations. Consequently, each year of data were
extracted into a separate file with the station identification numbers as attributes
and the days of the year as record numbers. The station identification numbers
used are the same as those used by the DGH in Morocco. A sample daily rainfall
file, rn80.dbf, is shown in Table 3.6.
52
Table 3.6: Sample Daily Rainfall Data File
The file names of these annual rainfall files include a prefix, ‘rn’, to
indicate the contents and two additional digits to indicate the year of record. For
example, the rainfall data for all the stations in the basin for the year 1985 are
stored in a file named ‘rn85.dbf’. This resulted in 60 files (one for each year)
containing 365 or 366 records with 48 fields each.
In addition to the interpolation, the data were also converted from daily to
monthly records by summing up all the records at each station for each month. A
53
program called Dmrain.ave was developed to perform this conversion and write
the results to a new file. The script for this program is documented in appendix 2
of this report. The naming convention adopted for the monthly data is the same as
that used for the daily data except that the prefix ‘mrn’ is used instead of the
previous ‘rn’. For example, the monthly data for 1985 are stored in a file named
‘mrn85.dbf’ as shown in Table 3.7. Consequently, there are 60 such tables
containing monthly rainfall data from each of the 48 rain gauging stations in the
Souss basin.
Table 3.7: Sample Monthly Rainfall Data File
The conversion from daily to monthly data was done to generate input data
for the monthly model. The modeling of the Souss basin was initially performed at
a daily time scale. This was subsequently changed to a monthly time scale because
of difficulties encountered during the model calibration phase. These difficulties
are discussed in section 6.1 of this report.
54
3.4 PROCESSING RUNOFF DATA
Spatially distributed parameters determine basin response in GH-Rivers.
An optimization routine built into the surface water model determines the most
suitable values of these parameters by calibrating flows generated by the model
with the observed runoff. Hence runoff data collected at several runoff stations
along the river network are required for calibrating the model. A database of
runoff for selected stations around the world is also maintained by the Global
Runoff Data Center in Koblenz, Germany. However, this database is not very
extensive. For the Souss basin study, daily runoff records from six runoff stations
were obtained from DGH in Morocco. The data files for the six runoff stations are
listed in Table 3.8, and their locations are shown in Figure 3.5.
Station Id Station Name Runoff Data File
0203 Aoulouz gc0203.dbf
0594 Amsoul gc0594.dbf
0597 Aguenza gc0597.dbf
0642 Immerguen gc0642.dbf
0858 Ibergnaten gc0858.dbf
4340 Ait Melloul gc4340.dbf
Table 3.8: Souss Basin Runoff Data Files
55
Fig. 3.5: Souss Basin Runoff Stations
Each of the stations had a different period of record although five out of the
six stations contained records for the period 1979 to 1994. The sixth station
located at Aoulouz has the longest period of record with daily values from 1954 to
1983. Figure 3.6 provides a comparison of the period of record of the six runoff
stations.
56
Fig. 3.6: Graph of the Runoff Stations Period of Record
The runoff data were stored in two dimensional tables with the station
identification number (assigned by the DGH) as the file name. For example, the
data for runoff station number ‘0203’ were stored under the file name,
‘gc0203.dbf’. Prior to using the data in the model, it had to be converted to a one
dimensional time series. The C program, sosprain.c, used in converting the
rainfall data was used for this conversion. (The program is stored under the
Programs directory of the Souss Basin Model CD-ROM). The converted data
were stored under file names ‘sr0203.dbf’ where ‘sr’ stands for surface runoff and
the other four digits of the file name are the station identification number. The
fields in this table include a time field (‘Time’) which acts as a key field for
57
keeping track of the records in the table, a date field (‘Ndate’) and a runoff field
(‘Gc0203’ or the corresponding station identification number). The time field is
indexed starting with 1 at the beginning of each year. A portion of the file is given
in Table 3.9.
Table 3.9: One Dimensional Runoff Data File
58
As with the rainfall, one dimensional time series were generated for both
daily and monthly runoff data. There are however two key differences in the
format of the runoff time series. While rainfall values presented are daily or
monthly totals, runoff values are presented in terms of mean flow rates. This
difference becomes significant when converting daily runoff values into monthly
values. An Avenue program called Dmrunoff.ave was developed for this
conversion. The text of this program is documented in appendix 3 of this report.
Daily runoff values are summed up and divided by the number of contributing
days to form mean monthly values. Missing records do not have to be estimated
prior to this conversion since this will not lead to an improved estimate of mean
monthly flow rate. Instead, the runoff rate is averaged over the actual number of
days in the month for which data were available. The second difference is that
data for each runoff station were stored in a separate file. This is because in its
current state, the optimization model does not automatically establish the linkage
between runoff data and the stations in the runoff coverage. This linkage is
established manually prior to each run of the optimization model. Consequently,
no advantage is gained by providing a single table with all the runoff stations as
fields. Such a table would require the establishment of a uniform period of record
for all the runoff stations. Runoff data would hence have to be generated for
periods when no data were collected. The establishment of a one to one
59
relationship between all fields in the input tables is a requirement of the object
oriented programming approach used in developing the model.
A file naming convention that provides information about the contents of
each data file was adopted. This convention includes information about the year of
record, the station number and the period for which the runoff value is a
representative mean. For example, daily runoff data for 1983 at station number
gc0203 are stored under the filename, ‘d83s0203.dbf’. The corresponding monthly
data are differentiated from the daily data by replacing the first letter of the
filename, ‘d’, with an ‘m’. Thus, the equivalent monthly data for the same station
and year are stored under the filename, ‘m83s0203.dbf’.
Missing runoff values posed a problem in calibrating the daily simulation
model. Methods of estimating missing runoff records do not appear to be well
documented in the literature. Those methods that are documented tend to involve
the use of spatial relationships. Such methods cannot be used for this study
because the runoff data are intended to provide a means of calibrating spatially
distributed parameters and determining spatial relationships. Only those methods
which exploit temporal relationships without taking spatial variation into account
can be used in this model.
60
One of the approaches considered in estimating missing runoff records is
the averaging of the flow from days preceding and subsequent to the missing
record. There are two main limitations to this approach. Visual inspection of the
runoff data from the Souss basin indicates that such an estimate can be misleading
during periods of high rainfall. Significant variation in daily flow rates are
observed at stations in the basin during such periods. However, this would not
have posed a problem since missing runoff records tended to occur during low
flow periods. The second limitation of this approach is that estimates of individual
missing records cannot be made when a string of consecutive records are missing.
The missing daily flow rates would have to be estimated by assuming a constant
flow rate over the entire period of missing records. Again, it was determined by
visual inspection that strings of missing records tended to occur after strings of
readings with little variation between them. During such periods, there was little
variation between the mean monthly flows and the observed daily flows.
Consequently, the mean monthly flows could be substituted for the missing daily
records.
An alternative approach to solving the problem of missing data is to leave
periods with missing data out of the calibration of the daily model. Monthly runoff
data are unaffected by such missing daily records, since monthly values can be
determined from available daily values. However, with the scarcity of good runoff
61
data, it may not always be possible to leave out periods with missing data
especially when such periods include major hydrologic events such as floods or
droughts. For the Souss basin simulation, only periods with no missing records
were used in the calibration. No interpolation has been performed to estimate
missing records in the daily records.
3.5 PREPARING RESERVOIR DATA
For planning efforts to be effective, there must be a means of controlling
the availability of water, other than the natural processes of rainfall and runoff.
Dams and their accompanying reservoirs represent the most significant means of
controlling the quantity of water in storage. They are also used in regulating flow
in the river channel downstream of the dam. Hence, it is important to keep track of
the conditions in the reservoirs.
The Souss basin contains three major reservoirs located at Aoulouz, Abdel
Moumen and Dhkila, as shown in Figure 3.7. Direction Generale de
L’Hydraulique (DGH), Morocco, provided detailed operation data covering the
entire period of operation of each of these reservoirs. They also supplied reservoir
regulation data used in defining the storage-elevation and storage-area curves for
each of the three reservoirs. These reservoirs were assigned identification numbers
62
1, 2 and 3, respectively. Table 3.10 summarizes the main characteristics of the
three reservoirs. The annual inflow presented are averaged over the entire period
of operation of each reservoir. The maximum storage and surface area of each
reservoir is also provided.
NAME DAMID FIRST
YEAR
STORAGE
(m3)
AREA
(m2)
ANNUAL
INFLOW (m3)
Aoulouz 1 1991 351,458,300 13,000,000 77,247,000
Abdel
Moumen 2 1982 244,508,200 7,921,700 62,564,000
Dhkila 3 1986 1,525,100 214,600 73,611,000
Table 3.10: Characteristics of the Souss Basin Reservoirs
The dam at Aoulouz is mainly used for regulating flow in the portion of the
river flowing over the aquifer, downstream of the dam. Over 70% of all inflow to
this reservoir is subsequently released for aquifer recharge. Ground water is an
important source of water in the basin and a number of extraction wells have been
dug to provide water for irrigation. By regulating releases at this dam, the amount
of water that percolates into the underlying aquifer is maximized. Some releases
are also made, from Aoulouz, for irrigation purposes. However, these releases only
account for about 1% of annual inflow. The rest of the inflow is either released to
63
satisfy downstream flow requirements (17%) or lost through evaporation (4%) and
leakage (3%).
Fig. 3.7: Souss Basin Dams and Aquifer
The dam at Dhkila is used for irrigation and water supply. Over 50% of
annual inflow is diverted for irrigation. Another 13% is withdrawn to supply water
for domestic and industrial purposes in the resort city of Agadir. Releases for these
uses are made through a canal located at the side of the reservoir. Located
upstream of Dhkila, the dam at Abdel Moumen helps to minimize releases by
64
storing excess flow during high flow periods. Releases are subsequently made
from Abdel Moumen to Dhkila during low flow periods. About 34 million cubic
meters, 50% of annual inflows, are released from Abdel Moumen to Dhkila every
year.
The important characteristics for water resource planning are the volume of
water in storage, the surface area and the water surface elevation. The relationship
between the volume, area and elevation for a given reservoir is determined at the
time of construction of the reservoir. This relationship is presented in the form of a
series of equations or curves. It may also be presented in the form of reservoir
regulation tables containing corresponding values of storage, surface area and
water surface elevation taken at regular intervals. Reservoir regulation tables are
optional inputs for GH-Rivers but they must conform to a specified data format if
used in the model. The fields in these tables include a key field (‘Index’), a water
surface elevation field (‘Head’) in meters, a surface area field (‘Area’) in meters
squared and a storage field (‘Storage’) in cubic meters, as shown in Table 3.11.
For the Souss basin study, reservoir regulation data were obtained in terms
of values recorded at regulation intervals. Data for each reservoir in the river basin
are stored in a separate file. A naming convention was adopted to enable the
program to form an association between the data files and the reservoir objects
65
during the simulation. The data were stored under filename such as dmrg2.dbf
where the first four characters indicate that the file contains dam regulation data.
The remaining digits of the base name are the identification number defined in the
reservoir object of the model; 1 for Aoulouz, 2 for Abdel Moumen and 3 for
Dhkila. If the regulation data are presented as either equations or curves, then they
must be converted to tabular format. Storage elevation curves can be plotted from
equations and reservoir regulation tables extracted from these curves. The
extraction of these tables can be done by reading storage and surface area values
off the storage-elevation and surface area-elevation curves at regular intervals of
elevation. The units and field names described in the regulation tables below
should be maintained in all reservoir regulation tables used in the model. The
regulation files for Aoulouz, Abdel Moumen and Dkhila are presented in Tables
3.11, 3.12 and 3.13, respectively.
Table 3.11: Dam Regulation File for Aoulouz
66
Table 3.12: Reservoir Regulation File for Abdel Moumen
67
Table 3.13: Reservoir Regulation File for Dhkila
When using the model to perform a simulation, surface area and water
surface elevation values are determined from the storage at the end of each time
step. The values are determined by interpolation from the reservoir regulation
tables. The GH-Rivers simulation model will run without the regulation files by
using an in-built synthetic equation to estimate the surface area for a given volume
in storage. However, regulation tables should be used whenever possible as they
68
provide a much more accurate estimate of surface area. Also, water surface
elevations are not computed when the synthetic equation is used. The synthetic
equation is as follows:
( At / Amax)= ( St-1 / Smax ) 0.72
where
At is the surface area of the reservoir at the beginning of period t
Amax is the maximum surface area of the reservoir
St-1 is the volume of water in storage at the end of period (t-1)
Smax is the maximum reservoir storage
Reservoir operation data are also required to give a clear picture of the
historical operation patterns. The operation data for the three reservoirs in the
Souss basin were obtained as paper documents, written in French. The documents
were translated into English before being transcribed into electronic format. A list
of the fields in the original reservoir operation tables and how they were translated
from French to English is presented in table 3.14.
69
Field Name in French Translated Field Name
Annee Year
Cote Elevation
Volume Storage
Surface Surface Area
Variation Reserve Change in Storage
Evaporations Evaporation Losses
Restitution Non-Controlees Uncontrolled Releases
Restitution Dhkila Releases to Dhkila
Restitution Fuites Leakage
Restitution Vidanges Minimum Flow Releases
Restitution Deverses Spillage
Restitution Total Net release
Apports Inflow
Table 3.14: Translation of Reservoir Operation Fields
There is a separate document for each of the three reservoirs. Each
document includes a summarized table of annual inflows, evaporation losses,
releases and net change in storage for each water year during which the reservoir
was in operation. The table also contains the reservoir elevation, volume and
surface area recorded on the first day of each water year (August 1st ). A
70
supplementary summary table contains the total, mean, maximum, minimum and
coefficient of variation for each of the parameters listed above, determined over
the entire period of record. In addition to these annual values, monthly records of
the inflow, releases to various uses, leakage, evaporation and spill are presented in
separate tables each with an accompanying summary table similar to the one
described for the annual table. These are stored as two dimensional tables as
illustrated by the sample monthly release Table 3.15.
Table 3.15: Uncontrolled Monthly Releases at Abdel Moumen
The data were transformed into one dimensional time series during the
transcription process by typing all the records into a single column as shown in
71
Table 3.18. Even though the documents were developed by the same agency,
differences existed in the definition of the reservoir outflows used in the regulation
tables of the three dams. Hence, the outflows were reclassified into a number of
uniform categories including leakage, evaporation, withdrawals and releases. The
leakage and evaporation fields both result in water being lost from the river
network, and they are common to all three reservoirs. These fields were
consequently left unaltered in the redefined reservoir operation tables. Other
reservoir outflows were reclassified as releases if they resulted in water reentering
the river channel downstream of the dam, or withdrawals if they resulted in water
being removed from the river network entirely. The resampled fields were stored
as time series under the file names aouldmop.dbf, abdmdmop.dbf and
dkildmop.dbf for the reservoirs at Aoulouz, Abdel Moumen and Dhkila,
respectively. Table 3.16 shows the outflow fields in the operation tables of each
reservoir and the equivalent field into which they were reclassified.
72
Original Field Outflow Type New Field Name
For Dam 1, Aoulouz
Uncontrolled Releases Release Release
Aquifer Recharge Release Release
Irrigation in Aoulouz Withdrawal Withdraw
Leakage Losses Leakage
Evaporation Losses NetEvap
For Dam 2, Abdel Moumen
Uncontrolled Releases Release Release
Release to Dhkila Release Release
Leakage Losses Leakage
Evaporation Losses NetEvap
Spillage Release Release
Minimum Flow Release Release Release
For Dam 3, Dhkila
Evaporation Losses NetEvap
Leakage Losses Leakage
Irrigation Withdrawal Withdraw
Water Supply Withdrawal Withdraw
Minimum Flow Release Release Release
Spillage Release Release
Table 3.16: Original and Resampled Reservoir Operation Fields
Inflows (‘Inflow’) provided in reservoir operation data may include
streamflow as well as estimates of direct rainfall and surface runoff, and
73
springflow from subsurface water. Leakage (‘Leakage’) values represent losses
through infiltration at the base of the reservoir. Values of net evaporation
(‘NetEvap’) are determined from field measurements of open water surface
evaporation and presented in meters of water. Withdrawals (‘Withdraw’) refer to
flows that are taken from the reservoir to meet demands. These flows do not return
to the river channel. Releases (‘Release’) on the other hand refer to outflows from
the reservoir that go directly back into the river channel. Releases subsequently
become available for use downstream of the reservoir. A key field (‘Time’) is
provided to keep track of the simulation time step while a date field (‘Date’) keeps
track of the period of record. Additional fields were also defined to store the
results of simulation runs. These include the volume of water lost through
evaporation (‘EvpLoss’), reservoir storage (‘Storage’), surface area (‘SArea’) and
head (‘Head’) at the end of the time step, inflow generated by the model
(‘Cinflow’) and spill generated whenever the volume of water in storage exceeds
the reservoir capacity. Though the demand factor field (‘Dmdfact’) was not used in
this model, it was retained in the operation tables because it was included in the
original simulation routine. A complete listing and description of the fields in the
operation tables is provided in Table 3.17.
74
Table 3.17: Parameter Description for Dam Operation Table
A sample dam operation table for the reservoir at Abdel Moumen is
presented in Table 3.18. Each record in this table represents a month of data. The
surface area (Sarea), volume of water lost through evaporation (Evploss), reservoir
storage (Storage), water surface elevation (Head) and generated inflow (Cinflow)
fields do not yet contain any data. These fields are updated by the reservoir
simulator when a simulation is performed.
75
Table 3.18: Reservoir Operation Table for Abdel Moumen
Prior to each run of the simulation model, records corresponding to the
simulation period are extracted into separate tables for each reservoir in the basin.
The names of these tables contain the dam identification numbers (‘Damid’) which
76
enable the model to establish the linkage between the operation tables and the
dams coverage. The first three digits of the file name indicate that the table
contains dam operation data and the remaining digits of the base name are the dam
identification number (‘damid’). The operation data for the reservoir at Aoulouz
are extracted into the table, ‘dam1.dbf’data while the data for Abdel Moumen and
Dhkila are extracted into ‘dam2.dbf’ and ‘dam3.dbf’, respectively.
77
Chapter 4: Modeling the Souss Basin
Having assembled the input data and coverages, the extent of the basin to
be modeled must be reviewed to ensure that it reflects the quantity and distribution
of data as well as the study objectives. Isolated river segments and parts of the
streams that cross the river basin boundary without first joining the main river
network must be removed. This is necessary to ensure that the river network forms
a closed system which can be calibrated. The editing of coverage can be performed
in ArcView by simply selecting and deleting unwanted arcs. However, the Arc
Edit module of Arc/Info software provides a more powerful and interactive edit
environment. Instructions for editing coverages in Arc Edit were provided in
section 3.2 of this report. The editing of the stream network for the Souss basin
was not done as thoroughly as it should have been because the effects of such
streams were not fully understood at the time of development of the model. The
effects of this oversight on the overall simulation effort are discussed in section 6.1
of this report.
All the rainfall and runoff data available from the Souss basin were
processed to ensure that the model produced could be used to simulate any period
for which data were available. However, the simulation model can only be
78
developed and calibrated for a limited number of time steps. Both the daily and
monthly models were constructed for a simulation period of one year in line with
the setup of the rainfall and runoff data into individual years. This time period also
allowed the reservoirs to be calibrated through a full cycle of the hydrologic
conditions that occur during a calendar year.
4.1 DEVELOPING THE MODEL
The next phase of the simulation effort is to assemble the coverages and
data created into a model. In addition to the data processing described in chapter 3,
the coverages have to be preprocessed to convert them into a format usable by the
GH-Rivers simulation program. There are 7 preprocessing steps which have to be
completed prior to the simulation as shown in Figure 4.1. The first five steps
realign the basin coverages and prepare them for use in the object oriented
environment of the simulation model. The sixth and seventh steps create the output
files and coverages required by the model. An alternative one-step, preprocessing
function has been developed, however the use of this function precludes
interaction between the user and program. The preprocessing continues even if
error messages are displayed during the processing. Such errors can rend the
resulting coverages unusable. The functions performed by the seven preprocessing
79
steps are described below. Following these descriptions, instructions are provided
on how to perform the preprocessing in the ArcView based model.
STARTARCVIEW AND OPENHYDRO97.APR
ADDSORIVERANDSOBASIN(line and polygon)COVERAGES
RUN FIRSTPREPROCESSORTO MODIFYATTRIBUTES OFCOVERAGES
RUN SECONDPREPROCESSORTO REORIENTRIVER ARCS
RUN THIRDPREPROCESSORTO ESTABLISHARC-POLYGONLINKAGE
RUN FOURTHPREPROCESSORTO ENSURERIVER ARCCONNECTIVITY
RUN FIFTHPREPROCESSORTO IDENTIFYHEAD ANDOUTLETSECTIONS
RUN SIXTHPREPROCESSORTO CREATETIME SERIESTABLES
RUN FINALPREPROCESSORTO CREATEOTHER FILESREQUIRED FORSIMULATION
Fig. 4.1: Flow Diagram of Model Preprocessing
In the first preprocessing step, the user is prompted to identify the basin
coverages to be used in the model. Attributes required for subsequent operations
are added to the feature attribute tables of the coverages. In the second step, the
arcs in the river network are reordered to ensure that water flows downstream
throughout the network. River head and outlet sections are also identified and
80
labeled in the feature attribute table. The third, fourth and fifth steps are non-
interactive. They establish a one-to-one relation between arcs in the river coverage
and polygons in the watershed coverage. Such a relationship allows surplus water
from the watershed to be directed to the appropriate river arc. These steps also
ensure that there is continuity in the river network by establishing the arc topology.
Nodes are redefined such that all river arcs are interconnected and pointing away
from head sections towards outlet sections. This is necessary to ensure that flow in
each arc in the river network can be passed on to the next downstream arc until it
eventually reaches an outlet node.
The sixth step creates data files for storing the input rainfall and runoff
time series data. The user is prompted for the initial and final time steps. The
number of records in the tables is set to cover the specified time horizon. All
subsequent simulations using this model must be performed with this number of
records. The same number of records are added to the tables created in the seventh
and final step. The tables created in this step are used for storing the results of
simulation computations. The preprocessing may have to be repeated in a new
workspace if a simulation is to be performed over a new time horizon to ensure
that simulation tables contain the correct number of records. The modified
preprocessing procedure described in section 4.4 can be used for this run to avoid
reinitializing the values of model parameters.
81
To begin performing the preprocessing, a new workspace called souss is
created and the ArcView project, soussday.apr, is copied to the workspace. The
soussday.apr project file is used for the daily model while soussmon.apr is used
for the monthly model. The project files for both of these models are stored in the
respective daily and monthly directories under the model directory of the Souss
Basin Model CD-ROM. This is necessary because the GH-Rivers currently does
not contain an input box for specifying whether the model being run on a daily or
monthly time scale. A couple of lines in the routing program must be modified to
make this distinction.
The project files contain the surface water and reservoir planning
extensions, SFlwModel and Dams. An extension is a suite of programs containing
several stand-alone menus which can be created by users to customize the original
ArcView interface. It is a new feature introduced in ArcView version 3.0 to
provide users with more freedom in developing the software to suit their particular
needs.
82
A new View is opened by double clicking on the View icon in the project
window. The coverages of the Souss River basin are added to the ArcView project
as themes by clicking on the tool in the View Menu Bar and browsing
through the directories to select the coverages. The basin coverages added to the
new View include the line coverage of the stream network, soriver, the polygon
coverage of the watersheds, sobasin, and the line coverage of the watershed
boundaries, sobasin. The point coverages of the rain gages, rainst, the runoff
stations, hydrost and the dam locations, bigdams, are also added to the project.
The one-step preprocessing procedure is run by selecting SGFPrep (pre-all)
from under the SFlwModel in View Menu Bar as shown in Figure 4.2.
Fig. 4.2: Diagram of Surface Water Menu
83
A series of dialog boxes come up for the user to provide information for
the preprocessing. The information requested by the dialog boxes and the inputs
provided in developing the monthly model of the Souss basin are summarized in
Table 4.1.
DIALOG
NUMBER
INFORMATION
REQUESTED
INPUT
OPTIONS
INPUT
PROVIDED
1 Pick a River Line
Theme
Soriver , OK / Cancel Soriver , Click OK
2 Pick a Basin
Polygon Theme
Sobasin , OK /
Cancel
Sobasin , Click
OK
3 Pick a Basin
Boundary Theme
Sobasin , OK /
Cancel
Sobasin , Click
OK
4 [A list of Ftab
Modifications
made]
OK Click OK
5 Choose the feature
to highlight
Both, Head, Outlet
OK / Cancel
Both , Click OK
6 Highlight Exits ? Yes / No Yes
7 Highlight Exit ? Yes / No Yes
8 Save Control file as
sfdbfs.ctl
(workspace directory)
OK / Cancel
(workspace
directory) , OK
9 [A list of elements
in the control list]
OK Click OK
84
10 Choose the feature
to highlight
Both, Head, Outlet
OK / Cancel
Click OK
11 Create time Series
Tables
(Multiple Input List)
OK / Cancel
Click OK
12 Directory to Write
Files to
(workspace directory)
OK / Cancel
(workspace
Directory) , OK
13 Records to be
Added to Time
Series Tables
(Number of Records)
OK / Cancel
12 , Click OK
14 [A list of files
created]
OK Click OK
15 Directory to Write
Files to
(workspace directory)
OK / Cancel
(workspace
Directory) , OK
16 [A list of files
created]
OK Click OK
17 Keep Graphics Yes / No No
Table 4.1: Request and Inputs for the Model Preprocessing
With the setup of the model complete, the next step is to input rainfall data
and perform a trial simulation to ensure that the model has setup correctly. The
rainfall data used in the model must contain a record for every time period. If no
records are made during a particular time period, records from adjacent stations
must be interpolated to obtain estimates of such missing records. The simulation
program contains a script, CMPRAIN.PRE, for performing such interpolations.
85
The script is included in Appendix 4. It assumes that missing records are stored as
-1 or some other negative number in the rainfall time series. Rainfall recorded at
the nearest station for the same time period is assigned to the missing record.
To run CMPRAIN.PRE, click on the run tool, , from the View Tool
Bar and then click in the View containing the Souss basin coverages. A dialog box
comes up with a default program script listed. To run the default program, select
YES. If the script listed is not CMPRAIN.PRE, then click NO. An input screen
comes up with a list of all the available scripts. Scroll down to select
CMPRAIN.PRE and click OK. This initiates a dialog to specify the rain station
theme (rainst) and the rainfall time series (e.g. mrn91.dbf). The program begins to
interpolate for missing records, highlighting the edit station in the View as it goes.
The results of interpolation are written back to the same time series table,
mrn91.dbf in this example.
Each time a simulation is performed for a new period of record, the surplus
computation program, CMPSURP.PRE, must be run to generate input for the
surface water simulation. CMPSURP.PRE interpolates rainfall measured at rain
gages to the centroid of the polygons in the subwatershed coverage, Sobasin, using
an Inverse Distance Weighting scheme. It then computes the surplus as the flow
that would be generated at the downstream node of the river arc in each polygon if
86
all the rainfall incident on the polygon were to become available as runoff. This
surplus is computed in cubic meters per second as the incident rainfall in meters
multiplied by the area of the subwatershed polygon in meters squared. This
definition of surplus is used in the model because it was initially developed to use
available moisture computed from soil-moisture balance computations as the
source of inflow. Keeping this definition of surplus ensures that either the
available moisture from the soil-moisture balance or total moisture from incident
rainfall can be routed with the same programs since routing occurs after the
generation of surplus.
Use the tool to run CMPSURP.PRE. As previously, click on the run
tool from the View Tool Bar and then click in the View containing the Souss basin
coverages. This time the default program script listed is the last script run, in this
case, CMPRAIN. Click NO and scroll down to select CMPSURP.PRE from the
resulting list of scripts. A series of dialog boxes come up for the user to specify the
inputs required by the program. The information requested by the dialog boxes and
the inputs supplied are shown in Table 4.2.
87
DIALOGNUMBER
INFORMATIONREQUESTED
INPUTOPTIONS
INPUTPROVIDED
1 Select a Rainfall
Time Series Table
(A list of the
available tables) OK
/ Cancel
(rainfall time series
e.g. mrn87.dbf) , OK
2 Rain Station Theme (A list of the point
coverages)
OK / Cancel
Rainst , OK
3 Enter Watershed
Theme To Interpolate
Rainfall
(A list of the polygon
coverages)
OK / Cancel
Sobasin.ply , OK
4 Enter Watershed Key
Field e.g. Grid-code
(A list of attributes of
the watershed
theme)
OK / Cancel
Grid_code , OK
5 Enter Rain Station
Key field
(A list of attributes of
the rain station
theme)
OK / Cancel
Rainid , OK
Table 4.2: Requests and Inputs for the Surplus Interpolation
The interpolation begins with a graphical display in the View indicating
which stations have been computed as well as the station currently being
computed. Figure 4.3 shows the graphical display in View at the end of the
interpolation, with all the centroids of the watersheds identified.
88
Fig. 4.3: Interpolation to Centroid of Watershed Polygons
When the computation is complete a window appears to inform the user
that the computation is complete. Click OK to dismiss the window. The results of
the computations are written to the surplus table, ‘psurp.dbf’. For each watershed
in the basin there is a corresponding field in psurp.dbf. The table is linked to the
polygons in the watershed coverage by field names which contain the grid_code of
the watershed polygon. For example, the field in psurp.dbf containing data for the
watershed polygon with a grid_code of 35 is ‘GC35’. The same field names are
maintained in the other output tables used in the surface water simulation.
89
With the data interpolation now complete, the surface water model can be
run to simulate flow in the river basin. GH-Rivers simulates flow by generating
three time series, namely Pflow, Tflow and Fflow, for each river arc and
associated watershed polygon. The use of Tflow and Fflow is an important concept
because it enables flow to be interpolated to any point along a given river arc.
Pflow is the flow that is generated as a result of rainfall incident on a watershed
polygon. It is generated from the surplus, psurp, by applying a fraction to account
for infiltration and converting it to a runoff time series. The conversion uses a
series of in-built routing functions to transform the input discrete rainfall time
series to a pulse runoff time series. For a model containing dams, GH-Rivers uses
a two step flow routing module to simulate the flow. The equation for the module
is as follows:
TFlow FFlow Llag FFlow Llag PFlow DFlow Lossi jt
tt
i it
i it
it
it
, ( )= • + • − + − −−1 1
where
Llagi is the normalized time lag between the from-node and to-node for a
river section i and is computed as the product of the length of the
section and the simulation time step, divided by the average flow
velocity in the river section.
90
TFlowi jt, is the flow passed on to downstream node, j, of the river section i
during time step t
FFlowtt −1 is the flow entering the upstream node of the river section i
during time step t-1
PFlowit is the flow contributed by the subwatershed of river section i
during time step t
DFlowit is the flow diverted from river section i during time step t
Lossit is the in-stream losses in river section i during time step t. It is
computed as the product of the Fflow ( FFlowtt ), the length of the
river section (Lengthi) and the in-stream loss coefficient expressed
as a fraction of streamflow lost per unit length of river (LossCi).
To perform a simulation of the whole basin, click on the View containing
the basin coverages to make it active. Select SFlowSim from the SFlwModel menu
in the View Menu Bar. An input screen containing several model parameters is
presented with default values provided. A description of the model parameters is
given in Table 4.3.
91
Parameter Description Default ValueOptimize Determines type of simulation to be performed
0 È Simulation only1 È Simulation with Parameter Optimization
0
CalPflow Indicates whether or not to recompute pflow0 È Do not recompute pflow1 È Recompute pflow
0
Nresp Number of steps of response function to beperformed in converting psurp to pflow(Normal range: 6 to 12)
6
IniTmStep Initial time stepStart with 1
1
EndTmStep Final time stepSet this value to the number of records in thesimulation tables (psurp.dbf, pflow.dbf,fflow.dbf and tflow.dbf).Use 12 for this model
12
ToSub The fraction of surplus that goes to ground water(permissible range: 0 to 1)
0.1
Muskingum
Determines where Muskingum river routingprocedure is to be considered.0 È Do not perform Muskingum routing1 È Perform Muskingum routing
0
Pltply Determines the level of graphical display duringthe simulation0 È Highlight only river arcs1 È Highlight both polygons and arcs
1
Table 4.3: Surface Water Simulation Parameters
The results of the surface water simulation can be viewed by plotting flow
profiles at various locations in the basin. To plot flows, click on the tool in
the View Tool Bar. An input screen comes up with two options of flow profiles to
92
be plotted. The first option allows the user to plot a longitudinal flow distribution
from a user selected point to the nearest downstream outlet. The second option
allows the user to plot flow time series at any location on the stream network. The
user is also prompted to select one of the four flow time series (psurp, pflow,
fflow and tflow) to use for the plot. Selecting one of these two flow plotting
options will result in a little crosshair cursor. Click on any location in the stream
network and a graph of the variation of flow rate with time at that location is
generated from the selected flow time series. Clicking on points off the stream
network results in a message informing the user that the selected point is not on a
river arc.
4.2 CALIBRATING MODEL PARAMETERS
With the model construction phase complete, the model calibration phase
can now begin. The main goal in this phase is to determine the values of flow
routing parameters that result in the best match between measured and simulated
runoff. An interactive optimization module is used to establish this match. It is
important to note that while the parameters may vary in space, they do not vary in
time. Soil, land cover or other physical conditions which may vary in time are not
explicitly accounted for in the model. Instead, the effects of these conditions are
implicitly accounted for by the lumped parameters. The model is calibrated over
93
an extended period of time to ensure that the parameters obtained are
representative of average conditions in the basin.
To ascertain the quality of the runoff data provided, plots were made of the
runoff and rainfall data at selected locations in the basin. Figures 4.4 and 4.5 show
the respect daily rainfall and runoff recorded at Amsoul in the Souss basin.
Fig. 4.4: Chart of Daily Runoff at Amsoul
94
Daily Rainfall Records at GC1020
0
10
20
30
40
50
60
70
80
90
1
177
353
529
705
881
1057
1233
1409
1585
1761
1937
2113
2289
2465
2641
2817
2993
3169
3345
3521
3697
3873
Time in Days
Rainfall (mm)
Fig. 4.5: Chart of Daily Rainfall at a Station near Amsoul
The large amount of data makes it difficult to effectively compare the
trends in the two sets of data. Plotting data for shorter periods of time makes it
easier to observe trends in the data. Figure 4.6 shows the monthly rainfall and
runoff at Aoulouz in 1983.
95
Monthly Rainfall and Runoff at Aoulouz (1983)
0
20
40
60
80
100
120
140
1 2 3 4 5 6 7 8 9 10 11 12
Time in Months
Rainfall (mm)
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8
Rainfall
Runoff
Fig. 4.6: Chart of Monthly Rainfall and Runoff at Aoulouz
The data from all the runoff stations should also show a consistent trend;
high and low flows should occur consistently across the basin. Plots of runoff at
five stations in the basin for 1987 are presented in Figure 4.7. Runoff data for the
sixth station, Aoulouz, were not available for this year.
96
Fig. 4.7: Monthly Runoff at 5 Souss Basin Runoff Stations in 1987
Rainfall data should also show a consistent trend. Plots of monthly rainfall
recorded at selected stations throughout the Souss basin are shown in Figure 4.8.
97
Rainfall at Selected Stations in 1987
0
50
100
150
200
250
3001 2 3 4 5 6 7 8 9 10 11 12
Time in months
Rainfall in mm
GC0113
GC0201
GC0552
GC0980
GC1146
GC4410
GC4512
GC7478
GC8512
Fig. 4.8: Monthly Rainfall at Selected Souss Basin Stations in 1987
Flows were calibrated at each of the runoff stations in the basin using the
interactive optimization model. The calibration period was selected by reviewing
the rainfall data to select a year in which rainfall typical of the basin was recorded.
After reviewing the rainfall data, 1987 was selected as the calibration year because
it contained clearly defined wet and dry seasons. Flows generated by the model
from the rainfall data were calibrated against runoff recorded at each of the six
runoff stations in the Souss basin during that year. The distance from the runoff
station to the upstream node of the arc on which the station is located, expressed as
98
a fraction of total length of the arc, is a required input for the calibration process.
This percentage computation is performed by the flow interpolation program when
interpolating flow to a flow check point. Hence by inserting a flow check point at
the location of the runoff station and interpolating the flow to that point, the
percentage distance along the arc can be determined. Flow check points are added
by clicking on the (red flag) tool in the View Tool Bar and choosing option 2
from the list of options provided. Clicking on top of the rain station location
results in the addition of a check point. The shape file containing the check points,
flowchk.shp, can be made visible by clicking on the little box next to the theme in
the View legend. To interpolate flow to the check point, select it using the View
Select button and then click on the flow interpolation (green flag) button.
The percentage distance can be viewed by opening flowchk.dbf from the list of
tables in the project window.
For each runoff station, runoff records for the calibration year are used as
target flows against which simulated flows are calibrated. The optimization model
obtains the target flows from the ‘Target’ field of the ‘target.dbf’ table. Hence
before the optimization begins, the observed flows at the calibration station must
be read into ‘target.dbf’. This is done be selecting SetTables from under
SFlwModel in the View Menu bar. An input screen comes up containing three
99
table setup options. Select option 3 (FillOneFieldWithAnother), which allows
the user to copy the contents of a field in one table to a field of similar data
structure in another table. This initiates a series of dialog boxes which allow the
user to specify the target and destination fields. While the fields in the source and
target tables are not required to have the same name, they must have the same data
structure and a unique one-to-one relation. The table below contains the
information requested and answers supplied in calibrating the runoff at Aoulouz
(grid_code 0203) in the Souss basin model.
INFORMATIONREQUESTED
INPUTOPTIONS
INPUTPROVIDED
Select a Target Table (A list of tables available
in the project) , OK/Cancel
Target.dbf
Select a Target Field (The fields in the Target
table selected) , OK/Cancel
Target
Select a Target Table Key
Field
(The fields in the Target
table selected) , OK/Cancel
Time
Select a Source Table (A list of tables available
in the project) , OK/Cancel
m87s0203.dbf
Select a Source Field (The fields in the Source
table selected) , OK/Cancel
GC0203
Select a Source Table
Key field
(The fields in the Source
table selected) , OK/Cancel
NTIME
Table 4.4: Requests and Inputs for Setting Optimization Target
100
The parameters of all the subwatersheds contributing flow to a particular
runoff station are calibrated at the same time. These parameters are all attributes of
the basin coverages, ‘sobasin.ply’ and ‘soriver’. The runoff station coverage,
‘hydrost’, is also required to indicate the location of the runoff station being
calibrated. To isolate the region draining through the runoff station, the shift key is
held down and the ‘sobasin.lin’, ‘sobasin.ply’, ‘soriver’ and ‘hydrost’ themes are
made active by clicking on them in the View legend. All watershed polygons and
river arcs upstream of the station are selected using the View Select tool, .
Such a selection ensures that only the values of parameters in the selected sections
are changed when the optimization is run.
The optimization process runs much faster if separate sub-models had
been created of the subwatershed polygons making up the drainage area of each
runoff station. GH-Rivers contains a tool for creating a separate sub-model of
selected portions of a model. Such a sub-model could have been created after
selecting the portion of the model to be optimized (using the View Select tool
as described above), by clicking on the Cut button. Selecting this button
results in a series of dialog boxes prompting the user for the destination directory
for the sub-model files as well as the destination View in which to display the
clipped themes. Selecting the default ‘cutcov’ directory, the default file names
101
provided and the ‘New View’ option results in the creation of a new sub-model
with a new set of clipped coverages. Such a sub-model does not need to undergo
any preprocessing and can be operated on in the same manner as the parent model.
However, there is at present no mechanism for merging sub-models together into a
single model again in ArcView. Consequently, the values of parameters obtained
in the sub-models would have had to be typed manually into the attribute tables of
the coverages in the main model.
The interactive optimization module allows the user to select the
parameters to be calibrated from a list of the attributes of the basin coverages. For
each parameter selected, a range of values must be specified over which an
optimal value will be sought. A wide range of possible values should be selected
for the initial run of the optimization. The range can subsequently be narrowed
down to the neighborhood of the resulting optimal values. The method of
determining the optimal value must also be specified. The optimization model
supports two algorithms, namely the Root Mean Square Error (RMSE) method and
the Sum of Mass Discrepancies (SMD) method. The RMSE is used with
parameters such as velocity which ensure a temporal match. It aims to produce a
best fit by minimizing the squared difference between the target and simulated
time series. The SMD is used with parameters such as the in-stream losses which
ensure that the same quantity of flow is produced by the two time series. It ensures
102
that the sum of the differences in monthly flows is zero over the optimization
period.
While six parameters may be selected simultaneously, it is unwise to select
more than two or three for each run of the model. This is because an optimization
with six parameters may take a long time to converge particularly when the range
of possible values has not been narrowed down. The parameters used for the
calibration should account for variations in both the timing and the quantity of
flow. The routing parameters that can be calibrated in a given model are described
in Table 4.5.
Parameter Description Units
LossC Instream Loss Coefficient 1/km
Velocity Instream Flow Velocity m/s
ToRes Fraction of Surplus Going to Subsurface
Reservoir
-
PlossC Subwatershed Loss Coeficient 1/km
ResK Mean Residence Time In Subsurface Reservoir T
Vfact Overland Flow Velocity m/s
Table 4.5: Flow Routing Parameters
103
For the GH-Rivers model, the overland and in-stream flow velocities
influence timing while the watershed loss coefficient and the in-stream losses
influence the quantity of flow. Combinations of these four parameters were tested
to determine which set produced a best match. After each run, an in-built post-
processing utility displays the results of the optimization in the form of a series of
charts and tables.
Following are detailed instructions on how the Souss basin model was
calibrated. The file containing rainfall data for 1987, mrn87.dbf, was added to the
project in ArcView and surplus was interpolated to the centroid of the
subwatershed polygons using the CMPSURP.PRE program as described in section
4.1 above. Surplus runoff is also a required input for the optimization program.
The soriver.shp and sobasin.ply themes were made active by clicking on them in
the View legend. The View Select tool was used to select the portion of the basin
on which parameters were being matched as shown in Figure 4.9.
104
Fig. 4.9: Calibrating Flows at Aoulouz
Click on the optimization button in the View Menu Bar to start the
optimization program. Table 4.6 shows a sample of the information requested by
the program and the inputs that were provided in calibrating flow at the Aoulouz in
the Souss basin.
105
Input Requested Input Options Input Provided
Select a target theme onwhich results will bematched
(A list of all the themes in theactive View),OK / Cancel
soriver.shp, OK
Enter ThePcnt(percentage distancealong arc of the runoffstation)
Permissible range: 0 È pcnt È 1OK / Cancel
(This percentage variesdepending on the runoffstation being calibrated)
Select a Control file (A list of control files),OK / CancelCancel to create a newcontrol file / optctrl.ctl, OK
Select Cancel for the initialrun and create a newcontrol file, and save it asoptctrl.ctl
Select themes forparameter fitting
(An input screen with a list ofthe active themes in the Viewlegend), 0 / 10 È Do not select theme1 È Select this theme
sobasin.ply È 1soriver.shp È 1
Select parameters forfitting
(An input screen with a list ofthe parameters in the selectedthemes)0 È Do not select theme1 È Select this theme
soriver.shp,VelocityÈ 1soriver.shp, LossC È 1sobasin.ply, ToRes È 1sobasin.ply, Vfact È 1
Confirm the list ofparameters selected
(A list of the selectedparameters),OK / Cancel
OK
Enter minimum value,maximum value, typeof optimization (delimitwith commas)
(A list of the parameters andtheir current values)OK / CancelFor optimization type,0 È SMD (Sum of MassDiscrepancies)1 ÈRMSE (Root MeanSquare Error)
Table 4.6: Requests and Inputs for Setting Up Optimization Model
106
The program begins to perform the optimization of the parameters selected,
within the bounds set by the minimum and maximum values, using the
optimization type specified. The program may not be able to find a value that
satisfies all the conditions set during its first run. Several runs may be required to
narrow down the range of the parameters in order to allow the model to converge.
The ranges suggested in table 4.5 above were used in the Souss basin. However,
there is no guarantee that the flows generated will be of the same order of
magnitude as the observed flows when it converges. This is because the basin
coverages contain other parameters which the model uses to perform the routing.
The ideal situation would have been to calibrate a number of the other parameters
listed in Table 4.7. Time limitations made it impossible to undertake such an
intensive calibration effort for the Souss basin in this research. It would also have
taken the focus of the study away from its primary task of reservoir planning. The
parameters in the table below may be used as default values for the parameters that
are not being calibrated. Using these values may enable the optimization model to
converge on a solution faster. The description and units of these parameters are
given in table 4.5.
Parameter LossC Velocity ToRes PLossC ResK Vfact
Value 0.004 0.2 0.1 0.004 6 0.013
Table 4.7: Suggested Default Values for Routing Parameters
107
4.3 CONSTRUCTING RESERVOIR SIMULATION
The reservoir simulation model developed is a level pool routing model. It
computes the water level at the end of the month based on the storage at the
beginning of the month, inflows and discharges during the month. The water level
is presented in terms of the volume in storage, the surface area and the water
surface elevation at the dam. Three data files are used in the reservoir simulation
model. Figure 4.10 shows the relationship between these three files.
Fig. 4.10: Relation of Dam Data Files
The first of these is ‘dams.dbf’ which contains information about the
dimensions and characteristics of all the dams and associated reservoirs. The
108
dams.dbf table for the Souss basin reservoirs is shown in Table 4.8. A description
of the reservoir attributes in dams.dbf is provided in Table 4.9.
Table 4.8: Dams.dbf Table of Reservoir Attributes
The file ‘dmrg(id).dbf ‘ contains data that defines the reservoir storage-
elevation and area-elevation curves. The third data file, ‘dam(id).dbf’, contains
historical reservoir operation data. The model contains only one ‘dams.dbf’ file but
there is a ‘dam(id).dbf’ and a ‘dmrg(id).dbf’ file associated with each of the
reservoirs in the basin. The model also contains a synthetic storage-area equation
which it uses, by default, to compute the surface area for reservoirs without a
‘dmrg(id).dbf’ file.
During pre-processing, an additional field is added to the attribute table of
the river arc coverage, as a field called ‘HasDam’. When a dam is inserted on a
particular river using the dam locator tool in the simulation program, the value of
109
this ‘HasDam’ field is set to 1. The value of the flag is increased by one every time
another dam is added to the same arc. This flag triggers the reservoir simulation
when the arc is encountered during the surface water simulation by calling up the
reservoir simulation program, Damrt.ave. The surface water simulator also
provides Damrt.ave with a list containing inflows for each time step in the period
being simulated. Damrt.ave in turn establishes the characteristics of the reservoir
encountered as well as initial storage and surface area from ‘dams.dbf’ using the
damid as the key field. Reservoir operation data for the simulation time period are
read from the ‘dam(id).dbf’ file corresponding to the reservoir encountered.
Damrt.ave uses this information to compute the reservoir water balance as
described below.
For a time period, i, the storage at the end of each time period, Si, is
computed from the equation:
Si = Si-1 + Ii - Ri - Wi - Li - Ei
where
Si-1 is the storage in cubic meters at the end of the previous time period
(initial storage for the first time period)
Ii is the inflow in cubic meters for time period i
Ri is the release in cubic meters for time period i
Wi is the withdrawal in cubic meters for time period i
110
Li is the leakage in cubic meters for time period i
Ei is the evaporation loss in cubic meters for time period i.
Ei is determined from
Ei = NEvapi * Ai
where
NEvapi is the net evaporation in meters read from the
dam(id).dbf table
Ai is the surface area of the reservoir in meters squared at
the beginning of period i
The storage computed at the end of the time period, Si, is then compared
with the maximum reservoir storage, Smax, from dams.dbf.
If Si is greater than Smax then
the spill is computed as the positive difference between computed storage
and the maximum storage.
Spi = Si - Smax
However, since the computed storage is greater than the reservoir capacity,
the storage at the end of the time period is set to the maximum storage.
Si = Smax
111
The release is also updated to included the spill,
Ri = Ri + Spi
If on the other hand the computed storage, Si, is less than the dead storage, Smin,
specified in dams.dbf then
deficit is computed as the negative difference between the computed
storage and the dead storage of the reservoir.
Di = - ( Smin - Si )
Since water cannot be released from the dead storage of the reservoir, the
storage for that time period is set to the dead storage,
Si = Smin
The release is reduced to reflect the actual amount of water that is available
for release from the reservoir
Ri = Ri + Di.
The new storage is then used to determine a new surface area and water
surface elevation by linear interpolation from the appropriate ‘dmrg(id).dbf’ file.
The program searches through the ‘dmrg(id).dbf’ until it encounters a pair of
successive storages with one value greater than and the other less than the new
112
storage. A linear interpolation is performed between these two storage values to
obtain values of head and surface area that correspond to the new storage.
The initial storage and surface area in the ‘dams.dbf’ file are updated to
reflect current conditions. The inflows, releases, evaporation losses, deficits and
spills are also recorded in the ‘dam(id).dbf’ table for the reservoir being simulated.
The fields in the dam(id).dbf tables are described in Table 4.9.
Table 4.9: Reservoir Simulation Fields in Dam(id).dbf Tables
The flow reaching the portion of the river downstream of the dam in each
time period is also computed and returned to the surface water simulator as a list of
113
monthly releases. For time period i, reservoir outflow in cubic meters per second is
given by:
Oi = Ri / (30.4 * 24 * 3600)
where
Oi is the outflow in cubic meters per second and
Ri is the release in cubic meters
The factor (30.4 * 24 * 3600) converts the volume of water released to
mean monthly flows.
If there is more than one dam on the same arc, the simulator performs the
reservoir water balance for all the reservoirs on the arc before returning to the
surface water simulation.
4.4 CHECKING MODEL RELIABILITY
After the parameters influencing flow have been calibrated, the model is
tested to determine the reliability of generated flows. An extended period
including several seasonal cycles should be chosen for this simulation. For the
Souss basin, the model was simulated with 60 records. For this run, the number of
records in each of the data files used for routing flows in GH-Rivers was increased
to 60. GH-Rivers contains a menu item called AddRecords which can be used for
114
adding empty records to data files, one file at a time. It is however quicker to set
up a new model using the modified preprocessing procedure described in Figure
4.11.
STARTARCVIEW AND OPENHYDRO97.APR
COPY SORIVERANDSOBASIN(line and polygon)COVERAGES TOWORKSPACE
RUN FIRSTPREPROCESSORTO MODIFY THENAMES OF THECOVERAGES
CLICK ONTHE STARBUTTON FORRESETTINGCONTROL LIST
RUN FIFTHPREPROCESSORTO IDENTIFYHEAD ANDOUTLETSECTIONS
RUN SIXTHPREPROCESSORTO CREATETIME SERIESTABLES
RUN FINALPREPROCESSORTO CREATEOTHER FILESREQUIRED FORSIMULATION
CREATE A NEWWORKSPACEAND COPYHYDRO97.APRTO IT
SELECTOPTION 2TO SET THETIMEDIMENSION
Fig. 4.11: Flow Diagram of Modified Preprocessing Procedure
To perform the modified preprocessing run, the processed coverages and
their attribute tables as well as the reservoir regulation files, ‘dam(id).dbf’, are
copied to a new workspace. The button is selected from the view menu bar. This
opens up an input screen with three options. Selecting option 2, Set Time
115
Dimension, results in a new input screen which enables the user to enter the initial
time step (IniTmStep) and the final time step (EndTmStep). These parameters
were set to 1 and 60 respectively for the Souss Model. The fifth, sixth and seventh
pre-processing steps were then run as before to create a new model with 60
records. This modified approach ensures that model parameters that have already
been calibrated are retained as attributes of the basin coverages.
Reservoirs are generally constructed on rivers when the storage
requirements exceed existing storage capacity. Hence different reservoirs tend to
be constructed at different times during the development of the river basin.
Instances may occur when a reservoir which was not yet constructed at the
beginning of the simulation period becomes operational later on during the
simulation. The problem of how to handle reservoirs which are only online for
portions of the simulation period was encountered when setting up the model for
the extended period in the Souss basin. A 60 month model set up for the period
1990 - 94 indicated that at the beginning of the period, only the reservoir at Dhkila
was operational. The other two reservoirs became operational later during this
period. This problem was solved by setting the storage in all the reservoirs to
capacity at the beginning of the simulation period. With reservoir withdrawals as
well as evaporation and leakage losses set to zero, any inflow caused the storage
capacity to be exceeded for periods when the reservoir had not yet been
116
constructed. Hence all inflows are released as spills allowing flow to proceed
downstream as if there was no reservoir. The effects of the actual reservoir
operations are introduced by altering the withdrawals and losses for periods when
the reservoir subsequently becomes operational.
Observed and simulated flows for this period can be compared at one of the
runoff stations in the basin. Measured flows at the selected runoff station should be
extracted into a separate file. This file is used to fill the target.dbf table against
which simulated flows are compared. It is important to note that while values of
simulated flow can be obtained for any location in the basin, the target flow is only
correct at the runoff station where the measurement was made. The surface water
simulation can now be run for the extended period. After the run, a plot of the
observed and simulated flow against time can be made for the target station. The
percentage deviation of the simulated values from the observed values are
presented in the flowtime.dbf file. The RMSE and the SMD for the simulation
period are also presented in the flowdist.dbf file. Statistical methods may also be
used to define the reliability of the model in terms of measures such as the
standard deviation, the standard error or the correlation of individual flows. These
are however not built into the model. The data would have to be extracted into a
spreadsheet or other statistical analysis software for computation. The results of
the parameter calibration process are described in section 5.1 of this report.
117
4.5 USING THE MODEL AS A PLANNING TOOL
The traditional approach to reservoir simulation involves representing the
reservoirs as a set of independent units. Rivers are represented as lines linking the
reservoirs. The primary limitation of this approach is that changes in the system
require the reconstruction of the entire model. The main advantage of including
reservoirs in a map based simulation model is that various system and operation
options can be examined without reconstructing the model. The number and
geographical location of reservoirs can be altered to examine the effects of
location decisions. The flows resulting from various operation and demand
alternatives can also be examined at any point in the river network. To improve the
utility of the model as a planning tool, some typical reservoir planning problems
were examined. This led to the definition of additional features of the simulation
program that a planner would require in using the model to study possible
solutions scenarios.
The first problem involves checking the ability of an existing reservoir to
meet the needs of a new project. For this problem, the projected mean monthly
demands of the new project must be estimated and added to the historical demand
data in the dam(id).dbf. The planner may want to simulate a period, say 10 years,
to examine the performance of the reservoir during that period. If the model was
being used to simulate flow over such an extended period of time, a tool would be
118
required to enable the user to insert a set of 12 monthly values only once instead of
entering the same set of values 10 times. A tool was developed for adding such
repetitive data into the dam(id).dbf tables containing reservoir operation data. With
this tool, flows for a number of years can be generated using the projected mean
monthly demands.
Over such a simulation period, the planner would want to determine the
number of times the reservoir level falls outside its normal range. The reservoir
level is said to have gone outside its normal range when it either falls below the
dead storage level or exceeds its maximum capacity. A deficit and a spill would be
recorded in the respective cases. This information is supplied in the simulation
program by a utility that generates a summarized table of reservoir performance.
Mean flow rates would also need to be monitored at points downstream of
the reservoir. The flow check object performs this task. Flow check points can be
inserted along any arc in the stream network to allow flow to be interpolated to
that point. The flow plotting tool also enables flow time series to be plotted at any
point in the stream network.
The second problem involves examining the effects of installing a new
storage reservoir. In basins with high seasonal variations, large volumes of water
119
must be stored during high flow periods for use in low flow periods. Existing
reservoirs may be insufficient to store the volume of water that becomes available
during the high flow periods. Excess flow must be released to the channel when
there is insufficient room to store incoming flows. Possible solutions to this
problem include constructing a new reservoir upstream or downstream of an
existing one to store some of the excess flow. The dam at Abdel Moumen plays
this role for the dam at Dhkila in the Souss basin.
The first task in seeking a solution to this problem is to quantify the
volume and distribution of excess flow. A calibrated model could be used to
perform the initial analysis to quantify the excess flow by running the simulation
with historical rainfall time series. Setting up the model as in the first case would
result in spills being recorded whenever maximum storage levels are exceeded.
The spills could be summed up as a measure of the total excess flow over the
simulation period. With the total excess flow known, an annual excess flow could
be calculated and used as the storage capacity to be provided for a new reservoir.
A dam could be inserted either upstream or downstream of the existing reservoir
and the simulation run again to determine if it is sufficient to hold the excess flow.
For this task, the simulation model would require tools for inserting and removing
single dams as required.
120
New reservoirs may also be installed on rivers to regulate flow reaching
downstream sections. One such reservoir is located at Aoulouz in the Souss basin
to promote infiltration in the aquifer recharge zone by regulating flow. The
problem in this instance is that releasing too much water may cause excess water
to flow out of the basin. On the other hand, reservoir storage capacity and other
considerations such as excess losses by evaporation may limit the amount of water
that can be stored in the reservoir. Planners are faced with the task of determining
how much water to release to ensure minimum outflow from the basin.
The simulation model allows the user to install reservoirs and flow check
points at various locations. A tool which allows the monthly release schedule to be
updated was developed. By allowing the user to define the how much water is
released during each simulation time period, the model allows the user to study the
effect of various regulation schedules. These effects can be examined by
monitoring the flow in various river reaches in the basin using the flow time series
plotting tool, . Long term operation policies can be determined after studying
the effects of various release schedules.
In addition to constructing new reservoirs, existing ones may also have to
be removed. A number of the dams constructed in the peak construction period in
the 1960’s are due for decommissioning. Poor planning practices have also
121
resulted in unnecessary dams which may be adversely affecting flow in many river
basins, particularly in developing countries. It is expected that the removal and
deregulation of reservoirs will continue to become increasingly common. Planners
must be able to provide answers as to the hydrologic consequences of removing an
existing dam.
The model allows the user to remove an existing dam and examine the
effects on storage in other reservoirs and downstream river flow in the basin. The
method of removing reservoirs in the original model involved using the dam
locator tool to insert a new set of reservoirs. In this approach, the dams are
removed from the ‘dams.dbf’ table and the ‘Hasdam’ attribute is set to 0 but the
associated ‘dam(id).dbf’ and ‘dmrg(id).dbf’ tables are retained. The new dam
removal tool developed allows the user to remove a single dam and its associated
dam(id).dbf table. The simulation can be run with the remaining set of dams to
examine the effects of not having the dam in place.
4.6 DEVELOPING THE DAMS EXTENSION
Examining the scenarios above provided insight into possible uses of the
simulation model and additional tools that were required to enable it to be used
more effectively in reservoir planning. An ArcView extension was developed in
122
the object oriented programming language, Avenue, to enable the user to analyze
the reservoir planning scenarios described above. The extension, called DAMS,
operates on the same theoretical basis as the main Souss basin model. However, it
contains menu driven tools which enable the user to interactively add or remove
reservoirs. Its pre-processing programs also allow the operation data and initial
storage levels in the reservoirs to be altered. A post-processing program allows the
user to generate a summary of simulation results. The functions of the various
menu items in the DAMS extension and operating instructions are provided below.
The setup of the dam at Aoulouz in the Souss basin is used as an example for
illustrating the functionality of DAMS.
The dams in the bigdams.shp coverage are not recognized by the model
during simulation; they are merely used as a guide to mark the location of the
existing reservoirs in the basin. Dams inserted using the program tools are stored
in the dams.shp coverage. The original Dam locator tool that was created for GH-
Rivers is activated by selecting the Pennant Red icon in the View Tool Bar. The
user is then prompted to specify the type of object to be inserted. Options include
flow check points, diversion objects and dams. If option 2 (insert dams) is
selected, a second message box appears, prompting the user to specify whether to
start a new set of objects or to append to the existing set. As shown in Figure 4.12,
the DAMS menu contains an item called Insert Dams which activates, , the
123
Dam locator tool in the View Menu Bar. However, instead of presenting the user
with the options usually presented by the tool, Insert Dams presents a little
crosshair cursor which allows the user to immediately start inserting dams.
Fig. 4.12: Inserting Dams from the DAMS menu
After choosing the Insert Dams option, click on the location in the View, where
the dam is to be inserted and an input table with a list of parameters appears. Table
4.10 contains a list of the parameters requested, their significance and the values
assigned to the parameters in setting up the dam at Aoulouz.
124
Parameter Description Default
Damid Identification number assigned to thedam.
1
Damname The name of the dam. Use the main nameof the dam(id).dbf file as the ‘damname’.
Dam1
Capacity Maximum reservoir storage in cubicmeters. Releases are made in the form ofspills when this storage is exceeded.
351458300
Area Maximum surface area of the reservoir inmeters squared.
13000000
Upst Upper or live storage in cubic meters.Refers to the amount of water that isavailable for release.
350000000
Deadst Dead storage in cubic meters. Representsthe minimum storage level required tomake releases.
1458300
Evt Monthly evaporation in meters. Thedefault value of this parameter can beused since evaporation data are providedin the dam(id).dbf tables
0.3
Pdam Damid of the previous dam upstreamdam on the same river arc.
0
Ndam Damid of the next dam downstream onthe same river arc.
0
Storage0 Initial reservoir storage in cubic meters 351458300
Area0 Initial reservoir surface area in meterssquared.
13000000
Table 4.10: Setting Up Dam(id).dbf Tables
125
As with the dam locator tool, a dam(id).dbf file is created for each dam
inserted into the model. This file serves as the output file for reservoir simulation
results.
The DAMS extension also contains a menu item for removing selected
dams from the model. Highlight the dams to be removed using the View Select
tool. Select Remove Dam from the Dams menu of the View Menu Bar as
shown in Figure 4.13.
Fig.4.13: Removing Dams from the DAMS menu
A prompts comes up for the user to confirm the removal of the selected
dams and associated dam(id).dbf files. Click YES to confirm the removal. Insert a
dam at Aoulouz by clicking on top of the location marked by the dam in the
bigdams.shp coverage.
126
As described in section 4.1, GH-Rivers contains a synthetic equation that is
used as a default to determine the relationship between reservoir storage and
surface area. However, reservoir regulation tables should be supplied if such data
is available. The reservoir regulation tables contain data for establishing the
relationship between reservoir storage, surface area and head. For the tables to be
used in the model, their file names and field names must conform to the standard
specified in developing the model. As shown in Figure 4.14, DAMS contains a
menu item called Set Reservoir Fields which creates a new table compliant of
format from input regulation tables.
Fig. 4.14: Setting Reservoir Fields from the DAMS menu
Selecting Set Reservoir Fields from the DAMS menu initiates a dialog to
identify the ‘damid’ of dam for which the regulation data is being processed and
the input file containing the regulation data. It also asks the user to specify a key
field, a volume field, an area field and an elevation field. The actual field names
in the inputs tables may vary but the fields must be numerical with values in SI
127
units. The Set Reservoir Fields utility creates a new table with file name
dmrg(id).dbf and adds it to the ArcView project.
The reservoir simulation model is able to account for monthly variations in
demand, losses and releases. Inflows are generated by the surface water simulation
and do not have to be provided as inputs. The variable inputs can be entered by
editing the dam tables directly. However, this may not be desirable particularly
when running a simulation for multiple years. Because of variations in the
purposes served by reservoirs, the fields in the operation tables are different. The
data in these tables must now be read into the standard reservoir operation tables,
dam(id).dbf, created by the model. The key point to understand in setting up the
operation data is that while there is only one class of inputs (Inflow) to the
reservoirs, there are three classes of outflow. The three classes of outflow include
withdrawals, losses and releases. Withdrawals are those flows that are diverted
from the reservoir for other uses and do not return to the river channel. Flows to
meet irrigation and water supply needs fall in this category. Releases on the other
hand are flows which are taken out of the reservoir but which are put back into the
river channel and are subsequently available for use further downstream. Spills,
minimum flow releases and, in the case of Aoulouz, releases to the downstream
aquifer fall in this category.
128
Losses are those flows that are neither diverted for other uses nor released
back into the channel. Evaporation and leakage fall into this category. All
withdrawals are represented in the model by the Withdraw field of the
dam(id).dbf table. Releases can be entered directly into the Release field of the
dam(id) .dbf file. Where there are multiple withdrawals or releases, the Compute
Outputs utility program from the DAMS menu may be used for summing up the
components and updating the values in dam(id) .dbf. Losses are represented by
the Leakage and Netevap (net evaporation in m) fields in the same table. The dam
fields from which inputs are read during simulation include two natural processes,
leakage and evaporation ("Leakage and NetEvap"), and two controlled processes,
withdrawal and release ("Withdraw and Release"). Hence subsequent runs of the
model to examine reservoir management options should only involve alterations to
the two controlled processes. A utility is provided in the DAMS menu for making
such alterations.
For each reservoir in the model, classify the outputs in terms of releases,
withdrawal and losses. If there are multiple releases or withdrawals, then use the
Compute Outputs utility, shown in Figure 4.15, to sum up the various
components into a single release or withdrawal per month. Losses do not pose a
129
problem since the sources of losses, leakage and evaporation, are common to all
reservoirs and are handled separately in the dam(id).dbf tables.
Fig.4.15: Computing Outputs from the DAMS menu
Selecting Compute Outputs initiates a dialog to specify the dam to be
edited, the type of outflow to be computed (withdrawal or release) and the source
of the outflow data. These outflows are stored in the release(id).dbf and
demand(id).dbf files created at run time for releases and withdrawals,
respectively.
The monthly aquifer releases are now updated in the temporary table for
storing release data for dam 1, release1.dbf. The user is prompted on whether or
not to continue updating more fields. Select Yes and enter values from the release
field of aouldmop.dbf into the release2 field of the target table. Again, the values
will be updated in release1.dbf. Now, select No to stop entering more values. The
130
net monthly release will be computed and stored in the total field of
release1.dbf. Another prompt allows the user to determine whether or not to enter
the net release values into the dam1.dbf. Select Yes to update the values in
dam1.dbf.
The withdrawal, leakage and evaporation can be entered directly into the
dam1.dbf tables. To begin entering the month values directly into the tables, select
the Update Values utility under the Dams menu of the View Menu Bar as shown
in Figure 4.16.
Fig.4.16: Updating Values from the DAMS menu
The user is asked to select the dam to be updated (dam 1) and the source
table (aouldmop.dbf). Another prompt comes up which allows the user to select a
source field followed by a target field in dam1.dbf. Input the source and target
fields shown in Table 4.11.
131
Source Field Target Field
Irrigation Withdraw
Leakage Leakage
Evaporation NetEvap
Table 4.11: Source and Target Fields for Setting Up Dam(id).dbf
The program allows the user to update any of the fields in dam1.dbf
(including the already updated release field). After each update, the user is
prompted on whether or not to update more fields. Continue to select Yes until all
three input fields in dam1.dbf have been set up.
It may sometimes be necessary to run the simulation model under a
different set of initial conditions other than those specified during the creation of
the model. To vary the initial reservoir storage, select ’Initialize Storage’ from
under the Dams menu of the View Menu Bar and select the edit dam when
prompted to do so. The input screen shown in Figure 4.17 appears for the user to
enter the initial storage. Entering a storage and clicking OK causes the initial
storage to be updated in dams.dbf.
Fig.4.17: Input Screen for Initializing Storage
132
After setting up the reservoir simulation tables, perform the surface water
simulation as usual. At the completion of the simulation run, the user has the
option of opening up the dam(id).dbf files to view the results for each individual
reservoir on a monthly scale. However, a better assessment of the performance of
the reservoirs can be obtained by generating a summary of the results. Select
Simulation Summary from the DAMS menu, as shown in Figure 4.18, to
generate a table containing summarized statistics of the performance of each
reservoir. The fields in the table, called summary.dbf, are described in Table 4.12.
Fig.4.18: Generating a Simulation Summary from DAMS menu
133
Field Description
Damid the dam identification numberTotalmon the number of months simulatedDeficitmon the number of months in which deficits were recordedSpillmon the number of months in which spills were recordedTotalInflow net inflow generated during the simulation periodTotalDefici net deficit for the simulation periodTotalSpill net surplus inflow released as spillEvap% the percentage of total inflow lost through evaporationLeak% the percentage of total inflow seeping out of the reservoirRelease% the percentage of total inflow released back into the riverWithdraw the percentage of total inflow that is diverted for other usesChngStor% the change in reservoir storage as a percentage of the initial
Table 4.12: Reservoir Simulation Summary Fields in Summary.dbf
134
Chapter 5: Simulation Results
5.1 PARAMETER CALIBRATION RESULTS
The surface water simulation was calibrated at daily and monthly time
scales. The calibration was performed using four parameters namely, the overland
flow velocity (‘Vfact’), the watershed loss coefficient (‘ToRes’), the in-stream
flow velocity (‘Velocity’) and the river loss coefficient (‘LossC’). The
optimization procedure was run several times using various combinations of these
parameters. For both the daily and monthly simulations, the combination of in-
stream velocity and river loss coefficient were shown to produce best results.
These two parameters were optimized with the overland flow velocity and the
watershed loss coefficient set to 0.013m/s and 0.1 respectively. The values of the
parameters obtained at the two time scales are presented in Table 5.1.
Table 5.1: Comparison of Daily and Monthly Parameters
135
The values presented are a measure of the total deviation of the simulated
flows from the target values during the optimization period. The graphs presented
in Figures 5.1 and 5.2 illustrate the nature of the match between individual flows at
daily and monthly time scales. Both sets of graphs represent readings for the first
12 simulation time steps taken at Ibergnaten, just upstream of Aoulouz.
Fig. 5.1: Measured (Target) vs. Simulated (Mflowfit) Daily Flows
Fig. 5.2: Measured (Target) vs. Simulated (Mflowfit) Monthly Flows
136
The effect of spatial scale can also be observed by comparing the results of
simulations at two different spatial scales. A comparison of the results obtained in
the Souss basin with those obtained in the larger Niger basin provides some insight
into the performance of the model at various spatial scales. The results presented
in the table below provide a comparison of the parameters obtained in the two
basins.
Table 5.2: Comparison of Souss and Niger Basins Parameters
5.2 OBSERVED VERSUS SIMULATED FLOWS
The match obtained during the simulation period is not a sufficient measure
of the utility of the model. A calibrated model should be able to generate
reasonable flows for a wide range of rainfall scenarios outside of the calibration
period. There is no basis for comparing flows generated along river reaches where
137
there was no runoff station. Hence, the accuracy of flows generated within such
reaches cannot be ascertained. Flows generated at runoff stations can however be
compared with observed runoff. The graphs presented in Figures 5.3 through 5.5
show the nature of the match between observed and simulated flows at three
stations where flow had previously been calibrated. Simulated flows are labeled as
SMFLOW while observed or measured flows are labeled as MSFLOW. The data
includes monthly flows for 1982 (Figure 5.3) and 1992 (Figures 5.4 and 5.5), both
periods outside of the calibration year. The bars in the graphs represents mean
monthly flows, beginning from January.
Fig. 5.3: Measured vs. Simulated Flows at Aoulouz, 1982
138
Fig.5.4: Measured vs. Simulated Flows at Immerguen,1992
Fig. 5.5: Measured vs. Simulated Flows at Amsoul, 1992
139
The flows generated by the model tended to vary gradually. To check its
performance under irregular flow conditions, observed and simulated flows were
compared during a period of highly variable flows. The graphs presented in
Figures 5.6 and 5.7, illustrate the nature of the match obtained at two such stations.
It is worth noting that the measured flows at these stations are not consistent with
the kind of trend that would be expected for unregulated flow data.
Fig. 5.6: Measured vs. Simulated Flows at Amsoul, 1982
140
Fig. 5.7: Measured vs. Simulated Flows at Ait Melloul,1982
5.3 RESERVOIR SIMULATION RESULTS
As described in section 5.2 above, the reservoir simulation model can be
used to answer a wide range of planning scenarios. One such scenario was
analyzed to demonstrate the utility of the model. The model was reconstructed
with 60 monthly records to cover a five year period running from August 1989 to
July 1994. August was chosen as the first month of the simulation period because
records of reservoir storage levels are available for August 1st each year. A
simulation was performed using the inflows and outflows specified in the reservoir
operation tables for each of the three reservoirs as inputs. A summary of the
141
simulation was generated using the Simulation Summary option in the DAMS
menu and pie charts were plotted from the resulting summary.dbf tables. These
charts are presented in Figure 5.8.
Fig. 5.8: Reservoir Simulation Results, 1990-94
The pie charts highlight the differences in the operation of the three
reservoirs. Aoulouz and Abdel Moumen both record evaporation losses amounting
to about 30% of inflow. Dhkila on the other hand records almost no evaporation
losses since most of the water entering the reservoir is immediately diverted for
other uses. Consequently, almost all inflow is converted to withdrawal resulting in
little net change in its storage. Aoulouz also records some withdrawal but Abdel
Moumen which acts as the storage reservoir for Dhkila, records no withdrawals.
142
The performance of the simulation model in predicting reservoir storage
was assessed by plotting the computed storage against the storage stated in the
reservoir operation tables. Figure 5.9 shows the variation in storage at Abdel
Moumen during the simulation period.
Fig. 5.9: Variation of Reservoir Storage at Abdel Moumen
The storage values generated by the model were very close to the observed
storage. The computed storage values are slightly less than observed storage. This
Daily runoff data. Each filecontains a year of data. ‘d’indicates daily data. The nexttwo digits are the year ofrecord. ‘s’ stands for station.The last four digits are theDGH assigned station number.
Monthly runoff data. Each filecontains a year of data. ‘m’indicates daily data. The nexttwo digits are the year ofrecord. ‘s’ stands for station.The last four digits are theDGH assigned station number.
home/asante/data/runoff/monthly
155
m76s0858.dbf tom95s0858.dbfm73s4340.dbf tom94s4340.dbfnwa_2 The original 30” DEM of
North West Africa.home/asante/coverage
burn_fil The processed DEM of theSouss basin with the streamnetwork burned-in.
home/asante/coverage
sobasin Coverage of the Souss basinwatershed. Contains a polygoncoverage of the subwatersheds,a line coverage of basinboundaries and a pointcoverage of label points.
home/asante/coverage
soriver Line coverage of the Soussbasin river network. Contains114 arc segments.
home/asante/coverage
hydrost Point coverage of the runoffstations in the Souss basin.
home/asante/coverage
rainst Point coverage of the rain gagelocations in the Souss basin.
home/asante/coverage
bigdams.shp Shape file of the three maindams in the Souss basin.
home/asante/coverage
aquifer Coverage of the ground wateraquifer located in the middle ofthe Souss basin.
home/asante/coverage
aoulouz.dbfabdelmen.dbfdhkila.dbf
The original reservoiroperation tables containinghistorical operation data for thereservoirs at Aoulouz, AbdelMoumen and Dhkila,respectively. These filescontain the data as transcribedfrom the original documents.
home/asante/dams
aouldmop.dbfabdmdmop.dbfdkildmop.dbf
Processed reservoir operationtables containing time seriesdata for the reservoirs atAoulouz, Abdel Moumen andDhkila, respectively. The datain these files have been
home/asante/dams
156
processed to conform to theinput data structure of theSouss simulation model.
aouldmrg.dbfabdmdmrg.dbfdkildmrg.dbf
Reservoir regulation data fordefining the Storage-Elevationand Surface Area-Elevationcurves. The first four letters ofthe file names stand forAoulouz, Abdel Moumen andDhkila, respectively.
home/asante/dams
dmrunoff.ave An Avenue program forconverting a file containing ayear of daily runoff data tomonthly values.
home/asante/programs
dmrain.ave An Avenue program forconverting a file containing ayear of daily rainfall data tomonthly values.
home/asante/programs
cmptotal.ave An Avenue program forcomputing totalwithdrawal/release andupdating the values in thereservoir operation tables.
home/asante/programs
setdmval.pre An Avenue program forupdating the values of fields inthe reservoir operation tables.
home/asante/programs
setdmrg.pre An Avenue program forconverting reservoir regulationtables into a standardizedformat readable by thereservoir simulation model.
home/asante/programs
setdmst0.utl An Avenue program for settinginitial reservoir storage at thebeginning of a simulationperiod.
home/asante/programs
cmpsumry.utl An Avenue program forcomputing a summary ofresults at the end of asimulation.
home/asante/programs
insertdm.pre An Avenue program foractivating the Dam locator
home/asante/programs
157
tool. Allows dams to beinserted at any location on thestream network in the Viewwindow.
removedm.pre An Avenue program forremoving Dams from thestream network in the Viewwindow.
home/asante/programs
Sosprain.c A C program for reading datastored in two dimensionaltables into one dimensionaltime series
home/asante/programs
Damrt.ave An Avenue program forcomputing a monthly reservoirbalance. This is a modifiedversion of the originalDamrt.ave included in thesimulation program.
home/asante/programs
sosprj A text file containing inputsfor projecting coverages fromgeographic coordinates to theLambert Conformal Conicalprojection used in Morocco.
home/asante/programs
158
Appendix 2: Converting daily to monthly rainfall
’PROGRAM DMRAIN
’
’This program creates a table of total monthly rainfall
’It requires a year of daily rainfall measurements as input
’The input files must conform to a file naming convention
'Files should have names such as ‘rn83.dbf’ which
' implies daily rainfall records for the year 1983
'The input files may contain data from more than one station
' as long as data from each station is presented in a single column
'Station-ids (such as GC1583) are used as field names (or attributes) in the input
files
'Check to ensure the input table does not contain missing (or negative) records
'Add the input files to the project before running the program
TheProject=av.getproject
meanyear = msgbox.input("Enter year to compute e.g. 1985","Input","")
mnyear=(meanyear.asnumber mod 100)
tblname="rn"+mnyear.asstring+".dbf"
outtbl="mrn"+mnyear.asstring+".dbf"
TheTable=TheProject.FindDoc(tblname)
TheVtab=TheTable.GetVtab
159
theFields=TheVtab.GetFields
’This is for non-leap years
’refer to lpmonavg.ave for leap years
’CREATE A LIST OF MONTH NAMES
’The program assumes the first value is for January 1st