Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

RRI Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 124
At a glance
Powered by AI
The document discusses the Rainfall-Runoff-Inundation (RRI) model and how to set it up and run simulations as well as visualize the outputs.

The RRI model uses a one-dimensional river routing model to simulate river flows and exchanges water between rivers and slopes using governing equations that are described.

The main inputs required to run the RRI model are topography data, rainfall data, and condition settings specified in the control file.

Rainfall-Runoff-Inundation (RRI) Model

ver. 1.4.2

International Center for Water Hazard and Risk Management (ICHARM)


Public Works Research Institute (PWRI)

*)Disaster Prevention Research Institute (DPRI), Kyoto University

Takahiro SAYAMA*)
Rainfall-Runoff-Inundation Model User’s Manual
Table of Contents

1. Outline of Rainfall-Runoff-Inundation (RRI) Model .............................................. 1-1


1.1 Model Structure Overview ..................................................................................................1-1
1.2 Governing Equations of RRI Model ....................................................................................1-2
1.3 One-dimensional River Routing Model...............................................................................1-5
1.4 River and Slope Water Exchange ......................................................................................1-5
1.5 Numerical Scheme .............................................................................................................1-6

2. Getting Started ..................................................................................................... 2-1


2.1 Preparation for the use of RRI-CUI ....................................................................................2-2
2.2 Run RRI Model ..................................................................................................................2-2
2.3 Post Analysis ......................................................................................................................2-4

3. Preparing Input Topography Data ........................................................................ 3-1


3.1 Downloading HydroSHEDS Data .......................................................................................3-2
3.2 Delineating HydroSHEDS Data using ArcGIS ....................................................................3-3
3.3 Delineating HydroSHEDS Data using GLASS GIS (optional) ..........................................3-12
3.4 Upscaling the spatial resolutions of DEM, DIR and ACC (optional)..................................3-23
3.5 DEM Data Adjustment ......................................................................................................3-23

4. Preparing Input Rainfall Data ............................................................................... 4-1


4.1 Prepare Input Rainfall Data from Gauged Rainfall Records ...............................................4-1
4.2 Prepare Input Rainfall Data from GSMaP ..........................................................................4-2
4.3 Prepare Input Rainfall Data from 3B42RT ..........................................................................4-4
4.4 Format of Input Rainfall Data for RRI Model ......................................................................4-5
4.5 Calculation of Catchment Average Rainfall ........................................................................4-6

5. Conditions Setting for RRI Simulation ................................................................. 5-1


5.1 Folder Configuration ..........................................................................................................5-1
5.2 RRI Model Control File (RRI_Input.txt)...............................................................................5-2

6. Running RRI Model ............................................................................................. 6-1

7. Visualize Output Data .......................................................................................... 7-1


7.1 Format of the Output Files .................................................................................................7-1

i
7.2 Visualize Inundation Depth with GNUPLOT .......................................................................7-1
7.3 Hydrographs at Specific Locations .....................................................................................7-3
7.4 Visualize Peak Inundation Depths......................................................................................7-5
7.5 Visualize Inundation Depths with Google Earth (Optional) .................................................7-6
7.6 Visualize Results with Tecplot (Optional)..........................................................................7-10

8. Application Example ............................................................................................ 8-1


8.1 On Input Topography..........................................................................................................8-1
8.2 On Input Rainfall ................................................................................................................8-2
8.3 On Input Evapotranspiration ..............................................................................................8-4
8.4 On River Channel Geometry Setting ..................................................................................8-5
8.5 On Embankment Setting ....................................................................................................8-7
8.6 On Land Class Setting .......................................................................................................8-9
8.7 On Parameter Setting ......................................................................................................8-10
8.8 On Boundary Condition ....................................................................................................8-13
8.9 On Initial Condition ...........................................................................................................8-16
8.10 Diversion option (for advanced users)............................................................................8-16
8.11 Dam option (for advanced users) ...................................................................................8-17
8.12 Arbitrary cross sections (for advanced users) ................................................................8-18

9. Use of RRI Graphical User Interface (GUI).......................................................... 9-1


9.1 Pre-setting..........................................................................................................................9-1
9.2 Model application and running with RRI_BUILDER ...........................................................9-2
9.3 Visualizing results with RRI_VIEWER ..............................................................................9-14

Last updated on Nov 9, 2017

ii
1. Outline of Rainfall-Runoff-Inundation (RRI) Model

1.1 Model Structure Overview

Rainfall-Runoff-Inundation (RRI) model is a two-dimensional model capable of simulating


rainfall-runoff and flood inundation simultaneously (Sayama et al., 2012, Sayama et al.,
2015a, Sayama et al., 2015b). The model deals with slopes and river channels separately. At
a grid cell in which a river channel is located, the model assumes that both slope and river
are positioned within the same grid cell. The channel is discretized as a single line along its
centerline of the overlying slope grid cell. The flow on the slope grid cells is calculated with
the 2D diffusive wave model, while the channel flow is calculated with the 1D diffusive wave
model. For better representations of rainfall-runoff-inundation processes, the RRI model
simulates also lateral subsurface flow, vertical infiltration flow and surface flow. The lateral
subsurface flow, which is typically more important in mountainous regions, is treated in
terms of the discharge-hydraulic gradient relationship, which takes into account both
saturated subsurface and surface flows. On the other hand, the vertical infiltration flow is
estimated by using the Green-Ampt model. The flow interaction between the river channel
and slope is estimated based on different overflowing formulae, depending on water-level
and levee-height conditions.

Schematic diagram of Rainfall-Runoff-Inundation (RRI) Model

1-1
Model Features
1) RRI is a 2D model simulating for rainfall-runoff and flood inundation simultaneously.
2) It simulates flows on land and in river and their interactions at a river basin scale.
3) It simulates lateral subsurface flow in mountainous areas and infiltration in flat areas.

1.2 Governing Equations of RRI Model

A method to calculate lateral flows on slope grid-cells is characterized as “a storage


cell-based inundation model" (e.g. Hunter et al. 2007). The model equations are derived
based on the following mass balance equation (1) and momentum equation (2) for gradually
varied unsteady flow.
∂h ∂q x ∂q y
+ + = r − f (1)
∂t ∂x ∂y
∂q x ∂uq x ∂vq x ∂H τ x
+ + = − gh − (2)
∂t ∂x ∂y ∂x ρ w
∂q y ∂uq y ∂vq y ∂H τ y
+ + = − gh − (3)
∂t ∂x ∂y ∂y ρ w
where h is the height of water from the local surface, q x and q y are the unit width discharges
in x and y directions, u and v are the flow velocities in x and y directions, r is the rainfall
intensity, f is the infiltration rate, H is the height of water from the datum, ρ w is the density
of water, g is the gravitational acceleration, and τ x and τ y are the shear stresses in x and y
directions. The second terms of the right side of (2) and (3) are calculated with the Manning’s
equation.

τ x gn 2 u u 2 + v 2
= (4)
ρw h1 / 3

τ y gn 2 v u 2 + v 2
= (5)
ρw h1/ 3

where n is the Manning’s roughness parameter.

Under the diffusion wave approximation, inertia terms (the left side terms of (2) and (3)) are
neglected. Moreover, by separating x and y directions (i.e. ignoring v and u terms in
equations (2) and (3) respectively), the following equations are derived:

1 ∂H  ∂H 
qx = − h5 / 3 sgn   (6)
n ∂x  ∂x 

1-2
1 ∂H  ∂H 
q y = − h5 / 3 sgn   (7)
n ∂y  ∂y 
where sgn is the signum function.

The RRI model spatially discretizes mass balance equation (1) as follows:
i −1, j
dh i , j q xi , j −1 − q xi , j q y − q y
i, j

+ + = r i , j − f i , j (8)
dt ∆x ∆y
where q x i,j, q y i,j are x and y direction discharges from a grid cell at (i, j).

By combining the equations of (6), (7) and (8), water depths and discharges are calculated at
each grid cell for each time step. One important difference between the RRI model and other
inundation models is that the former uses different forms of the discharge-hydraulic
gradient relationship, so that it can simulate both surface and subsurface flows with the
same algorithm. The RRI model replaces the equations (6) and (7) with the following
equations of (9) and (10), which were originally conceptualized by Ishihara and Takasao
(1962) and formulated with a single variable by Takasao and Shiiba (1976, 1988) based on
kinematic wave approximations. The first equations in (9) and (10) (h ≤ d a ) describe the
saturated subsurface flow based on the Darcy law, while the second equations (d a ≤ h)
describe the combination of the saturated subsurface flow and the surface flow. Note that for
the kinematic wave model, the hydraulic gradient is assumed to be equal to the topographic
slope, whereas the RRI model assumes the water surface slope as the hydraulic gradient.

 ∂H
− k a h ∂x , (h ≤ d a )

qx =  (9)
− 1 (h − d )5 / 3 ∂H sgn  ∂H  − k h ∂H , (d a < h )
 n a
∂x  ∂x 
a
∂x

 ∂H
− k a h ∂y , (h ≤ d a )

qy =  (10)
− 1 (h − d )5 / 3 ∂H sgn  ∂H  − k h ∂H , (d a < h )
 n a
∂y  ∂y  a ∂y
  

where k a is the lateral saturated hydraulic conductivity and d a is the soil depth times the
effective porosity.

Equations (11) and (12) can be also used to simulate the effect of unsaturated, saturated
subsurface flow and surface flow with the single variable of h (Tachikawa et al. 2004,
Sayama and McDonnell 2009 for English).

1-3
β
  h  ∂H
− km d m   , (h ≤ d m )
  d m  ∂x

 ∂H ∂H
qx = − ka (h − d m ) − km d m , (d m < h ≤ d a ) (11)
 ∂x ∂x
 1 ∂H  ∂H  ∂H ∂H
− (h − d a ) sgn   − ka (h − d m ) − km d m (d a < h )
5/3
,
 n ∂x  ∂x  ∂x ∂x

  h  ∂H
β

− k m d m  
 d  ∂y , (h ≤ d m )
  m

 ∂H ∂H
q y = − k a (h − d m ) − km d m , (d m < h ≤ d a ) (12)
 ∂ y ∂ y

− 1 (h − d a )5 / 3 ∂H sgn  ∂H  − k a (h − d m ) ∂H − k m d m ∂H , (d a < h )
 n ∂y  ∂y  ∂y ∂y
 

Note that to assure the continuity of the discharge change when h = d m , the lateral hydraulic
conductivity in unsaturated zone (k m ) can be computed by k m = k a / β, so that k m is no longer
the model parameter.

These stage-discharge relationship equations were originally developed to be applied to


humid forest areas with a high permeable soil layer, where a lateral subsurface flow is the
dominant runoff generation mechanism. On the other hand, for relatively flat areas, the
vertical infiltration process during the first period of rainfall has more impact on large-scale
flooding; therefore, the vertical infiltration can be treated as loss for event-based simulation.
Here we calculate infiltration loss f with the Green-Ampt infiltration model (Raws et al.,
1992).

 (φ − θ i )S f 
f = k v 1 +  (13)
 F 

where k v is the vertical saturated hydraulic conductivity, φ is the soil porosity, θ i is the initial
water volume content, S f is the suction at the vertical wetting front and F is the cumulative
infiltration depth.

Typically for mountainous areas where lateral subsurface flow and saturated excess
overland flow dominate, the equations (9) and (10) (or (11) and (12)) can be used with setting
f equals to be zero. (Note that the equations (9) and (10) (or (11) and (12)) implicitly assume
that the vertical infiltration rate within the soil is infinity.) On the other hand, for plain
areas where infiltration excess overland flow dominates, the surface flow equations (6) and
(7) can be used with the consideration of vertical infiltration by equation (13). If the vertical

1-4
infiltration f is set to be non-zero and the lateral subsurface equations are used instead of the
surface flow equation, the lateral subsurface water is infiltrated to bedrock by the rate of f.

As one can see from the equations, the parameter values of k a , k m and k v decide which
equations to be used; i.e. (6) and (7) are used when k a and k m are zero, (9) and (10) are used
when k m is zero, and (13) is inactivated when k v is zero.

1.3 One-dimensional River Routing Model

A one-dimensional diffusive wave model is applied to river grid cells. The geometry is
assumed to be rectangle, whose shapes are defined by width W, depth D and embankment
height H e . When detailed geometry information is not available, the width and depth are
approximated by the following function of upstream contributing area A [km2].

W = CW ASW (14)

D = CD AS D (15)

where C W , S W , C D and S D are geometry parameters. Here the units of W and D are meters.

1.4 River and Slope Water Exchange

Water exchange between a slope grid cell and an overlying river grid cell is calculated at
each time step depending on the relationship among the levels of slope water, river water,
levee crown and ground. The figure below shows four different conditions. For each
condition, different overtopping formulae are applied to calculate the unit length discharge
from slope to river (q sr ) or from river to slope (q rs ), which are then multiplied by the length of
the river vector at each grid cell to calculate the total exchange flow rate (Iwasa and Inoue,
1982).

1-5
(a) When the river water level is lower than the ground level, q sr is calculated by the
following step fall formula.

qsr = µ1hs ghs (16)

where µ 1 is the constant coefficient (=(2/3)3/2), and h s is the water depth on a slope cell. As
far as the river water level is lower than the ground level, the same equation is used even for
the case with levees so that the slope water can flow into the river.

(b) When the river water level is higher than the ground level and both the river and slope
water levels are lower than the levee height, no water exchange is assumed between the
slope and river.

(c) When the river water level is higher than the levee crown and the slope water level, the
following formula is used to calculate overtopping flow q rs from river to slope.

µ 2 h1 2 gh1 h2 / h1 ≤ 2 / 3
qrs =  (17)
µ3 h2 2 g (h1 − h2 ) h2 / h1 > 2 / 3

where µ 2 and µ 3 are the constant coefficients (=0.35, 0.91), and h 1 is the difference between
the river water level and the levee crown.

(d) When the slope water level is higher than the levee height and the river water level, the
same formula as (17) is used to calculate overtopping flow q sr from slope to river. In this case,
h 1 is the elevation difference between the slope and the river, and h 2 is the elevation
difference between the river and the levee crown.

1.5 Numerical Scheme

To solve equations (8), (9) and (10), the fifth-order Runge-Kutta method with adaptive

1-6
time-step control is applied. This method solves an ordinary differential equation by the
general fifth-order Runge-Kutta formula and estimates its error by an embedded forth-order
formula to control the time-step (Cash and Karp 1990, Press et al. 1992).
The general form of the fifth-order Runge-Kutta formula is

k1 = ∆tf (t , ht )
k 2 = ∆tf (t + a 2 ∆t , ht + b21k1 )
 (18)
k 6 = ∆tf (t + a6 ∆t , ht + b61k1 + b65 k 5 )
ht +1 = ht + c1k1 + c2 k 2 + c3 k 3 + c4 k 4 + c5 k 5 + c6 k 6 + O ∆t 6 ( )
while the embedded forth-order formula (Cash and Karp 1990) is

( )
ht*+1 = ht + c 1* k1 + c *2 k 2 + c *3 k 3 + c *4 k 4 + c *5 k 5 + c *6 k 6 + O ∆ t
5
(19)

By subtracting h t+1 minus h* t+1 , the error can be estimated by using k 1 to k 6 as follows,

δ ≡ ht +1 − ht* = ∑ (ci − c * )k i (20)


6

i
i =1

The constant values (a i , b ij , c i , c i *) used in this study are the ones introduced by Cash and
Karp (1990). If δ exceeds a desired accuracy δ d , h t+1 is recalculated with a smaller time step
(∆t post ).

 δ
0.25

∆t post = max 0.9∆t d ,0.5∆t  (21)
 δ 
 
As described above, the RRI model calculates slopes, rivers and slope-river interactions.
Model users specify the time step for slope-river interaction ∆t, which is also used as an initial
time step for slope calculations. Since river calculations usually require smaller time steps
because of higher water velocities and depths, the model allows river calculations to proceed
independently with different time steps until the next river-slope calculation time step. The
initial time step for river calculation (∆t r ) can be also specified by model users as the common
divisor of ∆t. In this study, δ d = 0.01, ∆t = 600 sec. and ∆t r = 60 sec. were used.

References

・ Sayama, T., Ozawa, G., Kawakami, T., Nabesaka, S., Fukami, K. (2012)
Rainfall-Runoff-Inundation analysis of the 2010 Pakistan flood in the Kabul River basin,
Hydrological Science Journal, 57(2), 298-312.

・ Sayama, T., Tatebe, Y., Tanaka, S. (2015a) An emergency response-type rainfall-runoff-


inundation simulation for 2011 Thailand floods, Journal of Flood Risk Management,

1-7
doi:10.1111/jfr3.12147 (in print).

・ Sayama, T., Tatebe, Y., Iwami, Y., Tanaka, S. (2015b) Hydrologic sensitivity of flood runoff and
inundation: 2011 Thailand floods in the Chao Phraya River basin, Nat. Hazards Earth Syst.
Sci., 15, pp. 1617-1630, doi:10.5194/nhess-15-1617-2015.

・ Hunter, N.M., Bates, P.D., Horritt, M.S., Wilson, M.D. (2007) Simple spatially-distributed
models for predicting flood inundation: A review. Geomorphology, 90, 208-225.

・ Takasao, T., Shiiba, M. (1976), A study on the runoff system model based on the topographical
framework of river basin, Proceedings of the Japan Society of Civil Engineers, 248, 69-82, (in
Japanese with English abstract).

・ Takasao, T., Shiiba, M. (1988) Incorporation of the effect of concentration of flow into the
kinematic wave equations and its applications to runoff system lumping. Journal of
Hydrology, 102, 301– 322.

・ Ishihara, T., Takasao T. (1962) A study on the subsurface runoff and its effects on runoff
process, Transactions of the Japan Society of Civil Engineers, 79, 15-23, (in Japanese with
English abstract).

・ Tachikawa, Y., G. Nagatani, K. Takara (2004), Development of stage discharge relationship


equation incorporating saturated-unsaturated flow mechanism (in Japanese), JSCE Annual
Hydraulic Engineering, 48, 7 – 12, (in Japanese with English Abstract).

・ Sayama, T., McDonnell, J. J. (2009) A new time-space accounting scheme to predict stream
water residence time and hydrograph source components at the watershed scale, Water
Resour. Res., 45, W07401.

・ Raws, W.J., Ahuja, L.R., Brakensiek, D.L. & Shirmohammadi, A. (1992) Inflitration and soil
water movement. Handbook of Hydrology, McGrow-Hill Inc., New York, 5.1-5.51.

・ Iwasa, Y., Inoue, K. (1982) Mathematical simulation of channel and overland flood flows in
view of flood disaster engineering, Journal of Natural Disaster Science, 4(1), 1-30.

・ Cash, J.R. & Karp, A.H. (1990) A variable order Runge-Kutta method for initial value
problems with rapidly varying right-hand sides. ACM Trans. on Math. Software, 16(3),
201-222.

・ Press, W.H., Teukolsky, S.A., Vetterling, W.T. & Flannery, B.P. (1992) Adaptive stepsize
control for Runge-Kuta. Numerical Receipes in Fortran 77, The Art of Scientific Computing
Second Edition, Cambridge University Press, 708-716.

1-8
2. Getting Started

RRI model and related tools were originally developed with Fortran 90 computer language.
The model has been operated on Command User Interface (CUI) such as Command
Prompt on Windows. Since 2014, RRI-Graphical User Interface (GUI) has been also
developed to support users for efficient model building and result visualization.
For non-experts in hydrologic modeling, it is recommended to use RRI-GUI to begin
with by referring to Section 9 to learn the basic steps with RRI-GUI.
Refer to Section 2 (i.e. this following chapter) on the tutorial of RRI-CUI, followed by
more detail descriptions in Sections 3 to 7. Section 8 shows an application example
including some advanced model settings.
If you use RRI-GUI not RRI-CUI, you can skip the following steps. Go directly to Section 9.

Yes
Use GUI
No
Section 2 Getting Started Model Building
Section 9
Section 3 Topographic Data Result Viewing

Section 4 Input Rainfall

Section 5 Condition Settings

Section 6 Running RRI

Section 7 Result Viewing

There are essentially five steps to conduct RRI Model simulation.


1. Preparing topography data (Section 3)
2. Preparing input rainfall data (Section 4)
3. Preparing model condition files with parameter settings (Section 5)
4. Executing RRI Model. (Section 6)
5. Plotting output data (Section 7)

Among the five steps, only the essence of step 4 and 5 are described here with sample data of
the Solo River Basin (in 30 sec resolution) in Indonesia.

2-1
2.1 Preparation for the use of RRI-CUI

1) Unzip “RRI_1.4.2.zip” and move it under a working directory (e.g. C:\).

2) Add a path to RRI-CUI folder with the following steps (e.g. for Windows 7)
1. Select Computer from the Start menu
2. Choose System Properties from the context menu
3. Click Advanced system settings  Advanced tab
4. Click on Environment Variables, under User’s Variables, find PATH, and click to
edit it. If you do not have the item PATH, you may select to add a new variable
and add PATH as the name.
5. In the Edit windows, modify PATH by adding “;C:/RRI/RRI-CUI/bin/” (for 64 bit)
or “;C:/RRI/RRI-CUI/bin32/” (for 32 bit) at the end of line.
Note: do not delete existing PATH settings. Only add the above item to the
existing line. Also do not forget to add “;” to separate it from the existing path
folders.
6. Click OK and close Command Prompt windows if opened.

3) If your computer has no Intel Fortran installed, run


RRI/RRI-CUI/etc/w-fcompxe/w_fcompxe_redist_intel64_2013.5.198.msi (for 64 bit) or
RRI/RRI-CUI/etc/w-fcompxe/w_fcompxe_redist_ia32_2013.5.198.msi (for 32 bit),
which installs necessary library files to execute RRI programs compiled by Intel Fortran.

4) Open Command Prompt by Start  All Programs  Accessories  Command Prompt


(If your computer has Intel Fortran installed, you may also operate it from
Start  All Programs  Intel(R) Software Development Tools  Intel(R) Fortran
Compiler **  Fortran Build Environment for Applications running on …)

2.2 Run RRI Model

Open “RRI_Input.txt” under “RRI-CUI/Project/solo30s” with a text editor and look inside the
file. This is a control file used by RRI Model. By editing the RRI_Input.txt file, you change the
simulation settings.

2-2
RRI_Input_Format_Ver1_4_2
RRI_Input.txt
./rain/rain.dat
./topo/adem.txt
./topo/acc.txt
./topo/adir.txt

0 # utm(1) or latlon(0)
1 # 4-direction (0), 8-direction(1)
360 # lasth [hour]
600 # dt [sec]

For example, L3 specifies the path to an input rainfall file and L4 – L6 specify the paths to
input topography files (adem, acc, and adir).

Open Command Prompt and type in “cd C:/RRI/RRI-GUI/Project/solo30s/” to change the


current directly.

cd c:/RRI/RRI-CUI/Project/solo30s

Type in “0_rri_1_4_2.exe” and enter to execute RRI Model with RRI_Input.txt.

0_rri_1_4_2.exe

2-3
Confirm the output files are successfully created inside the directory of
“RRI/RRI-CUI/Project/solo30s/out/”. Note that “hr_000001.out” represents the spatial
distribution of river water depths [m] at the output time step 1. “hs_000001.out” and
“qr_000001.out” represent those of slope water depths [m] and river discharge [m3/s],
respectively.

2.3 Post Analysis

2.3.1 Visualize Inundation Depth (./out/hs_***.out) with GNUPLOT

Run a GNUPLOT installation program “RRI-CUI/etc/gp466-win32-setup.exe” and install it


onto your PC. If the installation is successful, “gnuplot” folder is appeared under All Programs
of windows. Choose “gnuplot 4.6” to run GNUPLOT.

Open “RRI-CUI/Model/hs.plt” with a text editor. It is a GNUPLOT script file to convert from
the simulation outputs (e.g. ./out/hs_***.out) to gif files to visualize inundation depth
distributions.

reset
hs_plt.txt

set terminal gif medium size 672, 408 crop

set pm3d map


set palette defined (0.0 "gray", 1.5 "blue", 3 "green")

set xrange [0:]


set yrange [:] reverse
set zrange [0:] reverse

#set xrange [180:200]


#set yrange [435:455] reverse

set cbrange[0.:3]
set zrange[0.0:]
From RRI output (hs_***.out) to gif
set output "./hs/hs_000001.gif"
splot "./out/hs_000001.out" matrix t "000001 / 000096"

set output "./hs/hs_000002.gif"


splot "./out/hs_000002.out" matrix t "000002 / 000096"

set output "./hs/hs_000003.gif"


splot "./out/hs_000003.out" matrix t "000003 / 000096"

2-4
Select “Open” on GNUPLOT Toolbar and open “RRI-CUI/Project/solo30s/hs.plt”, which is a
script file to create gif files from the RRI output (see above figure).

Look at “RRI-CUI/Project/solo30s/hs” directory, where gif files are newly created. Check the
created gif files by preview.

GNUPLOT

Select “hs.plt”

RRI/Model/hs

Right click and preview

2-5
2.3.2 Compute hydrograph

Look at “RRI/RRI-CUI/Project/solo30s/calcHydro.txt” (see “./etc/calcHydro/00_readme.txt” for


more details)
L1 : [In] location file (e.g. ./location.txt)
L2 : [In] RRI output file (e.g. ./out/qr_***.txt)
L3 : [Out] hydrograph file (e.g. ./disc_Cepu.txt)

On Command Prompt with current folder at “./Project/solo30s/”, type in “calcHydro.exe” to


compute time series data from RRI output files.

calcHydro.exe

Confirm that a hydrograph file named “disc_Cepu.txt” is created.

1 0.00789
disc_cepu.txt
2 0.04591
3 0.08256
4 0.10557
5 0.12529
6 0.14543
7 0.24838
8 0.56375
9 69.88281
10 967.36834
11 1322.37727
12 1429.53330
13 1518.85970
….. …...

2-6
Visualize the created hydrograph file (e.g. “./infile/solo30s/disc_Cepu.txt”) by GNUPLOT.

From GNUPLOT screen, open and select “hydro.plt”, which is a GNUPLOT script file to
plot hydrograph from the “disc_Cepu.txt”.

2.3.3 Compute and visualize peak inundation depths

Look at “./Project/solo30s/calcPeak.txt” (see “./etc/calcPeak/00_readme.txt” for more details)


and edit the file if necessary.
L1 : [in] dem file (e.g. ./topo/adem.txt)
L2 : [in] output file without numbers or extension (e.g. ./out/hs_)
L3 : [in] the number of output files (e.g. 96)
L4 : [out] output peak inundation depth file (e.g. ./hpeak.txt)

On Command Prompt with current folder at “RRI/Project/solo30s/”, type in


“calcPeak.exe” to compute peak inundation depth.

2-7
ncols 336
nrows 204
hpeak.txt
xllcorner 110.2
yllcorner -8.3
cellsize 0.00833333333333
NODATA_value -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999

Visualize created “hpeak.txt” on ArcGIS by converting it from ASCII to Raster.

1) Start ArcGIS (Skip the following procedure if ArcGIS softwre is inaccessible. Consider
the use of GRASS GIS by following the instruction in 3.3)
2) From ArcToolbox  [Conversion Tools]  [To Raster]  [ASCII to Raster]

Input: C:\RRI\RRI-CUI\Project\solo30s\hpeak.txt

e.g. Output: C:\RRI\RRI-CUI\Project\solo30s\gis\hpeak_30s

3) For the input data, select “hpeak.txt”. For the output raster, a user may use
“RRI/StudySite/solo30s/gis/hpeak_30s”.

2-8
Right click here and select properties

4) Right click “hpeak_30s” and select properties to change the layer color setting.

5) On the layer property, change the stretch type to “Minimum-Maximum” and change
Color Ramp if necessary. By checking “Edit High/Low Values”, you can change the max and
min value range of the stretching.

2-9
2-10
3. Preparing Input Topography Data

This section shows the method to prepare topography data input to the RRI Model. The
topography data can be prepared by a user or downloaded from the website of USGS
HydroSHEDS, which is a global scale dataset offered by the United States Geological Survey
(USGS). The dataset includes elevation, flow direction and flow accumulation.

From the downloaded topographic dataset, a user must clip out the target river basin and
save them as ESRI/ASCII format files. Then using a program included in RRI Model package,
one adjusts the original DEM and flow direction data to be suitable for the RRI simulation.
The following chart shows the procedure descried in this section. In the previous section, the
30 second resolution of the Solo River Basin data was used, whereas this section presents how
to prepare the topographic data in 15 second.

Create a New Project Folder


When you prepare a new input topographic data, create a new project folder:
Copy “newProject” folder including all the files and folders inside and save it with a new
project name under “RRI-CUI/Project/”.
Note: In the package, “RRI-CUI /Project/solo15s” is prepared in advance for the tutorial.

The flow of the procedure is as follows.

Download HydroSHEDS dataset

Create a Point Shapefile to identify a catchment outlet

Delineate a target catchment with the outlet and flow direction information

Using the catchment raster, extract dem, dir and acc

Convert the dem, dir and acc to ASCII data

Adjust dem and dir for RRI simulation

3-1
3.1 Downloading HydroSHEDS Data

The following three types of topography data must be downloaded from HydroSHEDS
website for RRI simulation.

1) Elevation data
3 arc-second (about 90 m), 15 arc-second (about 500 m), and 30 arc-second (about 1,000
m ) are available.
2) Flow direction data
3 arc-second, 15 arc-second, and 30 arc-second are available.
3) Flow accumulation data
Only 15 arc-second and 30 arc-second are available. For 3 arc-second resolution, a user
must prepare a flow accumulation by using a GIS function [Spatial Analyst] 
[Hydrology]  [Flow Accumulation].

※ For detailed specifications of HydroSHEDS, refer to HydroSHEDS Technical


Documentation packaged with the downloaded data.

① Access USGS HydroSHEDS website (http://hydrosheds.cr.usgs.gov/index.php) from a


web browser and then select and click the DATADOWNLOAD button on the lower left.

Click

② Select “15sec GRID: Conditioned DEM” and download “as_dem_15s_grid.zip” (207 MB)
for Asian region with 15 sec grid-size. NOTE that for 3 sec, choose “Void-filled DEM”. For
15 sec and 30 sec, only “Conditioned DEM” is available, but in fact they are the same as
previously named as “Void-filled DEM” (i.e. DEM along rivers are not deepened).

3-2
③ Select also “15 sec GRID: Flow Accumulation” and “15 sec Flow Direction” to download
“as_acc_15s_grid.zip” (132 MB) and “as_dir_15s_grid.zip” (64 MB) as well.

④ Unzip the three types of topography data downloaded.


※Folder naming rule
“Continental range” _ ”Data type” _ “resolution”
e.g.) as_acc_15s → Asia catchment area data 15 sec
as_dem_15s → Asia digital elevation data 15 sec
as_dir_15s → Asia flow direction data 15 sec

3.2 Delineating HydroSHEDS Data using ArcGIS


(If ArcGIS is inaccessible, skip this section and go to 3.3 to use free GLASS GIS)

① Start ArcMap, and read in the unzipped files by selecting [File]>[Add Data]. (Or use icon
of “Add Data” on the standard tool bar). Perform the same operation for all the three types
(dem, dir, acc) of topography data.

※Selecting the folder to connect


If the folder you need to connect is not displayed in the window, click “Connect to Folder” to
connect to the working folder.

3-3
③ Display the flow accumulation data (i.e. as_acc_15s) on top screen (change the color range
to show river network clearly). Then find your target river and decide the rectangular
range, which covers all upstream contributing area. (At this stage, the following rectangle
range should be just written down on your notebook and no operation is necessary with
GIS.)

Solo River Basin

Refer to coordinate

3-4
-6.6

110.2 e.g.) Solo River 113.0

-8.3
(The range should be written down on your notebook.)

④ Show arc catalog (from the main menu, [Windows]  [Catalog]).


On the arc catalog, “Folder Connections” to a working folder (e.g. RRI/Project/solo15s/gis/) and
right click to choose New  Shapefile to create a point Shapefile (e.g. Outlet).

⑤ From the main menu [Customize]  [Toolbars]  [Editor]


On the Editor, choose [Start Editing], then Choose “Outlet” (the new Shapefile) to start
editting.

3-5
1. Start Editing

2. Choose “Outlet” to start


editing the point coverage

Clicking “Outlet”, so that you can bring a point to indicate the target outlet.
After editting the outlet point, go to the editor menu to save and stop editing.

1. Click “Create Features”

2. Click “Outlet” on right,


then click the target outlet

3. Editor  Save Edits


 Stop Editing

⑥ Using [ArcToolbox]  [Spatial Analyst Tools]  [Hydrology]  [Watershed], delineate a


watershed with the defined outlet.

3-6
(IMPORTANT) To use [Spatial Analyst Tools] on ArcGIS, you must have the extension
and activate it by choosing [Cusomize]  [Extentions]  add a check for [Spatial
Analyst].

as_dir_15s

Outlet (i.e. a created point Shape file

/RRI/Project/solo15s/gis/wsd_solo_15s

Environments

(IMPORTANT) Analysis range must be specified from the “environment” as below;

Processing Extent  As Specified Below 


Then type in the range you decided in ③

3-7
right click
wsd_solo_15 s to
check layer
properties

⑦ Right click the created watershed raster (e.g. wsd_solo_15s) and check layer properties.
Under the “Source” tab, you can check “Columns and Rows”. This will be the number of
columns and rows for the topographic data used by RRI Model. If it exceeds more than 1000,
using coarser resolution data is recommended to use.

⑧ [Spatial Analyst Tools]  [Extraction]  [Extract by Mask], prepare dem (elevation), acc
(flow accumulation) and dir (flow direction) masked by the delineated watershed.

3-8
as_dem_15s

wsd_solo_15s

RRI/Project/solo15s/gis/dem_solo_15s

Environments

as_dir_15s

wsd_solo_15s

RRI/Project/solo15s/gis/dir_solo_15s

Environments

as_acc_15s

wsd_solo_15s

RRI/Project/solo15s/gis/acc_solo_15s

Environments

(IMPORTANT) Analysis range must be specified from the “environment” the same as above.

3-9
Make sure the
same columns
and rows for all
the topo data

The above figure is the example of dem. The dir and acc must be also extracted in a same way.

⑨ Convert all the processed data (i.e. dem, dir, and acc) from ArcGIS Raster to ASCII, which
are input data files for RRI Model. Using [Conversion tool]  [Conversion from Raster] 
[Raster to ASCII], perform conversion from raster to ASCII for all the three types of
topography data.

The output files should be named as “dem.txt”, “dir.txt” and “acc.txt” to be saved under
“topo” folder in your project folder (e.g. “./RRI-CUI/Project/solo15s/topo/”).

./RRI-CUI/Project/solo15s/gis/dem_solo_15s
./RRI-CUI /Project/solo15s/gis/dir_solo_15s
./RRI-CUI /Project/solo15s/gis/acc_solo_15s

./RRI-CUI/Project/solo15s/topo/dem.txt
./RRI-CUI /Project/solo15s/topo/dir.txt
./RRI-CUI /Project/solo15s/topo/acc.txt

l.
The created ASCII data have the following format. Make sure once again all the three
datasets have the same numbers in “ncols” and “nrows”.

3-10
ncols 673
nrows 409 dir.txt
xllcorner 110.2
yllcorner -8.3
cellsize 0.004166666667
NODATA_value -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999

In the RRI model, the following three data must be prepared on the ASCII data format.
・ DEM data (dem)
・ Flow accumulation data (acc)
・ Flow direction data (dir)

3-11
3.3 Delineating HydroSHEDS Data using GLASS GIS (optional)
(If the HydroSHEDS data delineation is completed with ArcGIS, skip this section.)

① Install the latest GRASS GIS (Latest GRASS in December 2013 is ver 6.4.3.)
(GRASS website: http://grass.osgeo.org/ ).

② Start GRASS GIS GUI, and click “Location wizard”.

Click

③ Input your location name (e.g. Solo) and Click next.

Input your project location.

Click Next

④ Select “Select coordinate system parameters from a list” and “Latitude/longitude


(Pseudo-projection)” as a projection.

3-12
Click Next

Choose Latitude / Longitude

Click Next

⑤ Check “Datum with associated ellipsoid” and click “NEXT“.

Check

Click Next

3-13
⑥ Select “WGS 1984” and as a geodetic datum and click “NEXT”.

Choose WGS 1984

Click Next

⑦ Click “OK” on “Select datum transformation” window and click “FINISH” on Summary
window. (Select “Cancel” for default resolution setting).

Click OK
Click Finish

⑧ Click “Start GRASS” to start GRASS GIS.

Click

3-14
⑨ Read in the unzipped files by selecting [File]>[Import raster data] >[Common formats
import].

⑩ Select “Arc/Info ASCII Grid” from the “Format” list and select unzipped HydroSHEDS
raster file name (e.g. w001001.adf for dem). Input “Name for GRASS map (editable)” as
“as_dem_15s” for example and click Import.

Select Arc/Info ASCII Grid

Select unzipped “***.adf” file

Input raster file name

Click

⑪ Perform the same operation for all the three types (dem, dir, acc) of topography data.

3-15
⑫ After importing three types of topography data, check the layer and right click on it and
“select zoom to selected map(s)”, then the raster file will be displayed in the window. (the
following figure shows the example of “dem” display)

select
check

To show the flow accumulation (acc) clearly, right-click the filename of “acc” and select “Set
color table”.

⑬ Check “Logarithmic scaling” on “Colors” tab and select “Type of color map”. User can
select color table from several color tables. Following figure shows the example selecting
“wave” as “Type of color table”.

3-16
Check
Set Type of color map

Click

⑭ To set the delineation range, select [Settings]>[Region]>[Set Region].

⑮ Input values for edges of the target area (coordinates) and set a file for adjusting region
cells to cleanly align with a raster map, then click “Run”.
(To decide your target area, display the flow accumulation data (i.e. as_acc_15s) on top
screen to find your target river. The set rectangle range must cover all upstream
contributing area.)

3-17
Adjust region cells to
cleanly align with this
raster map  choose
one of the files

Click

⑯ Right-click the filename of “dir” file and select “Set computational region from selected
map(s) (ignore NULLS)”. Perform the same operation for all the three types (dem, acc and
dir) of topography data.

Right-Click and Set computational region


from selected map(s) (ignore NULLS)

⑰ Only for flow direction, change category values (definition of river flow direction in DIR
file), from ESRI type (1, 2, 4, 8, 16, 32, 64, 128) to GRASS type (1, 2, 3, 4, 5, 6, 7, 8).
Select [Raster] > [Change category values and labels] > [reclassify]: Select
“DIR_ESRI2GRASS.txt”, prepared in package (/RRI/etc), as “File containing reclass rules”

3-18
Select “DIR_ESRI2GRASS.txt”

Click

⑱ User needs to know the coordinates of the outlet (long./lat.) of target river basin to clip.
Select “acc” file and perform 1, 2, 3 and 4 as shown in following figures.

2. Click

1. Select “acc”.

3. Click outlet

3-19
4. User can get coordinates of the
outlet.
(Long.|Lat.|Flow accumulation*)

⑲ To create basin boundary, select the outlet of target river basin.


[Raster]>[Hydrologic modeling]>[Watershed basin creation (r.water.outlet)]

⑳ Select layer of “dir” file as “Name of input raster map” and input layer name of basin
boundary data in “Name of raster map to contain results”.

21 Input x-coordinate(long.) of the outlet in “The map E gird coordinates” and input
○ E A

y-coordinate(lat.) of the outlet in “The map N grid coordinates” and click “Run”. Then,
basin boundary layer of target river basin will be shown.

3-20
Basin boundary of Target
river basin

Click

22 Clip target river basin by using basin boundary layer.



A E A

[Raster]>[Mask(r.mask)]

23 Select basin boundary layer as “Raster map to use as MASK” and input “1” in “Category

A E A

values to use for MASK” on “Create” tab and click “Run”. Then, clipped target river basin
will be shown.

3-21
Click


24
A E A Export the three layer data (dem, dir, acc).
[File]>[Export raster map]> >[ESRI ASCII grid export]

25 Select three layer data (dem, dir, acc) and input output file name in “Name for output

A E A

ARC-GRID map” and click “Run”.

26 Perform the same operation for all the three layers (dem, dir, acc).

A E A

3-22
3.4 Upscaling the spatial resolutions of DEM, DIR and ACC (optional)

If a user needs to upscale the resolutions of the topography files (dem, dir and acc), one can
use a program called “scaleUp.exe”. By specifying a multiple factor for upscaling the
resolution, the program outputs new dem, dir and acc based on the original topography files.
For example, if the spatial resolutions of the topography files are 30 sec and the specified
multiple factor is 3, the program creates the topography files having 90 sec (30s x 3). The
following shows the procedure to use the program.

① Copy “scaleUp.txt” file from “RRI-CUI/etc/scaleUp/” and save it under your project folder
(e.g. RRI-CUI/Project/solo30s/)

./topo/dem.txt
input files scaleUp.txt
./topo/dir.txt
./topo/acc.txt
3 multiple factor for upscaling
./topo/dem_90s.txt
./topo/dir_90s.txt output files
./topo/acco_90s.txt

② Type in “scaleUp.exe” and return to execute scaleUp.exe program and find the created
three sets of the topographic data indicated in L5, L6 and L7 in scaleUp.txt

3.5 DEM Data Adjustment

There are some hollows in the original HydroSHEDS elevation data. Some of them represent
actual topographic features, while some of them are caused due to the intrinsic characteristics
of DEM. For example, deep and narrow valley, in which a river flows, may be blocked by
surrounding topography because of the DEM resolution. In that case, the simulated water
depths and river discharges with the original DEM are unrealistic.

Therefore, the following DEM adjustment is always recommended to avoid the unrealistic
hollows in the original DEM. The provided program called demAdjust2 (demAdjust2.exe)
follows the flow direction of HydroSHEDS and remove all the negative slope along the flow
direction by carving and lifting the original DEM.

The algorithm of demAdjust2 is as follows;

3-23
1. Based on the flow direction, demAdjust2 finds upstream cells (i.e. cells with no inflow).
2. Among the detected upstream cells, searching order is determined from the total length of
the flow paths from each upstream cell to its most downstream cell.
3. Following the above decided order, demAdjust2 adjusts elevations based on the following
procedures.
1) The negative elevation is set to be zero.
2) Lifting: If a single cell is extremely low (likely as a noise error) compared to its upstream
and downstream cells, the cell’s elevation will be replaced by the same elevation as the
upstream cell. The parameter “lift” is used as the threshold to detect sudden drop and its
default value is set to be 500 m.
3) Carving: If the elevation suddenly increases along the flow direction, the cell’s elevation
will be replaced by the same elevation as the upstream cell. The parameter “carve” is used as
the threshold to detect the sudden increase and its default value is 5 m.
4) Lifting and Carving: By searching from the most upstream, it finds a cell whose
downstream elevation is higher than that cell (point L). By searching from point L toward
downstream, it finds a cell whose downstream is lower than that cell (point H). The point L is
lifted and point H is carved by the parameter “increment”, whose default is 0.01 m.

The demAdjust2 program conducts each of the above procedure repeatedly for each flow path
ways from all the detected upstream cells until all negative slopes are removed. Note that the
above procedure does not change flow direction.

Edit demAdjust2.txt if necessary and run demAdjustment2 program by typing in


“demAdjustment2.exe” on Command Prompt under the project folder (e.g. solo15s or solo30s).

The process is necessary even if a user would like to use original dem data. “demAdjust2”
program modifies not only “dem” data but also flow direction data “dir”. The modified “dir”
(named as “adir”) has flow direction equals to zero at outlet cells. This operation must be
done and “adir” always must be used for RRI simulation. Also note that there is no
correction for “acc”, so use the original “acc” regardless the demAdjust2 procedure.

Read the adjusted dem and dir data to ArcGIS to visualize the data.

Select [ArcToolBox]>[Conversion tool]>[Conversion from raster]>[ASCII→Raster].

“adem”, “adir”, “acc” are the three important topography data for the RRI simulation.

3-24
4. Preparing Input Rainfall Data

This section explains the method to prepare rainfall data for RRI Model. A user can prepare
the data by any method as far as it follows a specified data format. Currently three program
sets are prepared for processing:
1) gauged rainfall with Thiessen polygon interpolation (/etc/rainThiessen),
2) GSMaP satellite based rainfall (/etc/GSMaP) and
3) 3B42RT (/etc/3B42RT) satellite based rainfall.

4.1 Prepare Input Rainfall Data from Gauged Rainfall Records

To use ground gauged data for creating input rainfall for the RRI simulation, one can use
rainThiessen.exe (./RRI-CUI/etc/rainThiessen/rainThiessen.f90) program.

① First, prepare rain gauge data in Excel (e.g. /solo30s/rain/gauge_solo_1d.xlsx).

Latitude and longitude of


the rain gauges
Number of rain gauges
i

Time step of the data in second Rainfall data


(Note: start from zero) [mm/d] or [mm/h]
The data is not necessary to be regardless the time
in constant intervals interval

Number of rain gauges

Set any negative value (e.g. -999) for missing data, not to be used for the interpolation.

② Select all cells having values, and copy and paste on a text editor. Then save it as txt file
(e.g. gauge_1d.txt)
③ Edit the input file “rainThiessen.txt” as follows.

4-1
./rain/gauge_1d.txt
1D rainfall data prepared above
24
./rain/rain.dat Divide parameter
./rain/gauge_map.txt set 1 if the input rain data is in [mm/h],
ncols 336 set 24 if it is in [mm/d]
nrows 204
Output file names
xll 110.2 L3 : output rainfall (i.e. input for RRI) [mm/h]
yll -8.3 L4 : output map file (to check the spatial
cellsize 0.0083333333333333 distribution of rain gauges)

Coordinate specifications of the output rainfall file. One can


copy and paste the header of a topographic file (i.e. dem).

However any coordinates values and cellsize can be specified


as far as the same coordinate is set in “RRI_Input.txt” and the
range covers an entire domain. See the detail in Section 8.2.

④ On command prompt under the project file (e.g. RRI/Project/solo30s/), type in


“rainThiessen.exe” to execute the program.
⑤ Confirm an input rainfall file for RRI Model (e.g. “rain.dat”) is newly created.

4.2 Prepare Input Rainfall Data from GSMaP

GSMaP products were updated on September 2014. Now the products include GSMaP_NRT
(realtime), GSMaP_MVK (standard ver.5 or ver.6) and GSMaP_Gauge (gauge composite).
Refer to the following website for the latest information and the registration to download the
data. (http://sharaku.eorc.jaxa.jp/GSMaP/index.htm)

4.2.1 Download GSMaP Data

① First, create “gsmap” folder under your project folder (e.g. solo30s).
② Under “gsmap” folder, create “infile” and “cutfile” folders.
③ Download all GSMaP rainfall data you would like to proceed and save them in “infile”.

4.2.2 Calculate Rainfall Data Range for a Target Catchment

To calculate the range for the data delineation, calc_area_gsmap.exe can be used. Before
executing calc_area_gsmap.exe, copy /etc/GSMaP/calc_area_gsmap.txt and paste it under the
created “gsmap” folder.

4-2
In the copied “calc_area.txt”, specify “horizontal_resolution [d]” and “temporal_resolution [h]”
of original GSMaP product you will use. Also specify “ncols” to “cellsize” based on the target
catchment, whose parameters can be obtained from the headers of topographic files of “dem”,
“acc” or “dir”.

Note: The holizontal resolution of GSMaP product is either 0.1 [deg] or 0.25 [deg], and the
temporal resolution is either 1 [h] or 24 [h].
(In case of 0.1 deg  xul = 0.05, yul = 59.95; 0.25  xul = 0.125, yul = 59.875).

Running calc_area_gsmap.exe creates a file named “out_by_calc_area_gsmap.txt”.

horizontal_resolution [d] : 0.1000000 out_by_calc_area_by_gsmap.txt


temporal_resolution [h] : 1

xll : 110.2000
yll : -8.300000
xur : 113.0000
yur : -6.600000

xll_rain : 110.1250 Information that is necessary to


yll_rain : -8.375000 delineate GSMaP
(jleft, ibottom, iright, itop)
xur_rain : 113.1250
yur_rain : -6.375000

jleft : 440
ibottom : 273 Rainfall location information to
jright : 452 be specified in the RRI_Input.txt
itop : 265 (xllcorner, yllcorner, cellsize)

xllcorner_rain (raster) : 110.0000


yllcorner_rain (raster) : -8.500000
cellsize_rain : 0.2500000

4.2.3 Delineating GSMaP Data for Target Area


④ Unzip all the downloaded files (a linux user may use “gunzip *”, otherwise please find an
appropriate program to unzip “.dat.gz” files)
⑤ Copy “/etc/GSMaP/makeList.bat” under “gsmap” folder and execute it to list up all the
unziped files as "list.txt”

4-3
dir /b infile > list.bat

Revise the pass, then


save and execute.

When executed,
[list.txt] is created

⑥ Type in “read_gsmap.exe” on command prompt at “gsmap”.

Running the program creates


“rain.data”, which is rainfall
input file for RRI simulation

4.3 Prepare Input Rainfall Data from 3B42RT

4.3.1 Download 3B42RT Data


① Access the following FTP site for downloading 3B42RT data
ftp://trmmopen.gsfc.nasa.gov/pub/merged
② Download "3B42RT.20*****.7R2.bin.gz" files from the FTP site and save them
under ./etc/3B42RT/read/infile/

4.3.2 Calculate Rainfall Data Range for a Target Catchment

To calculate the suitable range for the delineation, /etc/3B42RT/calc_area.f90 program can be
used. See details in 4.2.2, the same process is used for GSMaP data extraction.

4.3.3 Delineating 3B42RT Data for Target Area

① The following process uses “bash script”. Windows users may install “clink” program to
run bash scripts (*.sh) on windows command prompt. The “clink” program can be
downloaded from: http://code.google.com/p/clink/
② To calculate the suitable range for the delineation, /etc/3B42RT/calc_area.f90 program

4-4
can be used. See details in 4.2.2 because the same process is applied also to GSMaP data
extraction.
③ Execute "bash unzip.sh" in /etc/3B42RT/read/ to unzip the downloaded files
under ./etc/3B42RT/read/infile.
④ Edit "read_rt_file.sh" file to set extraction range in L4 to L7 (jleft, ibottom, jright, itop)
suggested by calc_area.f90.
⑤ Execute "bash read_rt_file.sh" to extract data
Note: the extract does not run if the same output files already exist
⑥ Edit "combine.sh" by setting the extraction range in L4 to L7 (jleft, ibottom, jright, itop)
suggested by "out_by_calc_area.txt", and set output file name on L9. Also edit L14, L17
and L20 to indicate which year, month and day of the data should be processed.
⑦ Execute "bash ./combine.sh" to combine all rainfall files to create the RRI input, so that
the rainfall file, which can be read by the RRI program, will be created.

4.4 Format of Input Rainfall Data for RRI Model

Here is the format of the input rainfall data used for RRI Model. By specifying the cell size,
xll_corner and yll_corner of the rainfall data into a control file of RRI model (i.e.
“RRI_Input.txt”), the model can overlay the rainfall distribution even if the ranges and the
resolutions are different from topographic data as far as the rainfall data covers all the
simulation extent.

Number of X,Y grids


Number of Y grids

Number of X grids

time stamp

time stamp

4-5
※ The input unit of rainfall must be always mm/hr regardless the data interval.
※ The time interval is not necessary to be constant.
※ Rainfall between 3600 and 7200 is written under the time stamp of 7200
(just like rain gauge data).

【RRI_Input.txt】・・・Control file of the RRI Model

RRI_Input_Format_Ver1_4_2
RRI_Input.txt
./rain/rain.dat
./topo/adem.txt
./topo/acc.txt
./topo/adir.txt

0 # utm(1) or latlon(0)
1 # 4-direction (0), 8-direction(1)
360 # lasth
600 # dt Coordinates and grid size of the
south-west end of the rainfall data range
60 # dt_riv
96 # outnum
110.2d0 # xllcorner_rain
-8.3d0 # yllcorner_rain
0.00833333d0 0.00833333d0 # cellsize_rain

4.5 Calculation of Catchment Average Rainfall

To calculate catchment average rainfall from the input rainfall data, a user can use
“rainBasin.exe” program. To run the program, “rainBasin.txt” must be prepared in the
following way.

./rain/rain.dat
rainBasin.txt
./topo/adem.txt
110.2d0
-8.3d0
0.00833333d0 0.00833333d0
./rain/rain_hyeto.txt
./rain/rain_dist.txt
./rain/rain_cum.txt

L1 : [in] rainfall file (RRI format) [mm/h]

4-6
L2 : [in] catchment mask file (e.g. dem file)
L3 : [in] rainfall xll corner
L4 : [in] rainfall yll corner
L5 : [in] rainfall cellsize (x, y)
L6 : [out] hyetograph [mm/h]
L7 : [out] total rainfall distribution map [mm]
L8 : [out] cumulative rainfall [mm]

On command prompt, type in “rainBasin.exe” to create three output files identified in L6, L7
and L8 to show hyetograph, total rainfall distribution map and cumulative rainfall,
respectively.

Note: To calculate average rainfall over a sub-catchment, one can replace the file indicated in
L2. First, one can use GIS to delineate the sub-catchment and convert the mask into ASCII
GIS format. For areas having pixel values greater than -10 will be considered as a
sub-catchment area.

4-7
5. Conditions Setting for RRI Simulation

5.1 Folder Configuration

The following shows the folder configuration inside ./RRI-CUI/Project/solo30s

[.//RRI-CUI/Project/solo30s]
- Folders-
topo:Stores following sets of topographic data
・Digital elevation model (dem.txt)
・Adjusted digital elevation model (adem.txt)
・Flow accumulation (acc.txt)
・Flow direction (dir.txt)
・Adjusted flow direction (adir.txt)
・(optional) Land use data (landuse.txt)
rain:Stores following sets of input rainfall data
・Rainfall data (rain.dat)
・(optional) Evapotranspiration data (PET.txt)
out:Stores simulation results for each output time step
・hr_:River water depth [m]
・hs_:Slope water depth [m]
・qr_:River discharge [m3/s]
・qu_:Slope discharge for x direction [m3/s]
・qv_:Slope discharge for y direction [m3/s]
・gampt_ff:Green-Ampt cumulative water depth [m]
・storage.dat:water balance checking file
hs : Stores figures of inundation depths (hs) by gnuplot
gis : Stores GIS related data
obs: Stores observation related data
riv: Stores river section related data
【Control files】
・RRI_Input.txt : RRI model control file for 0_rri_1_4_2.exe
・demAdjust2.txt : demAdjustment program (demAdjust2.exe) [pre-processing]
・rainThiessen.txt : Rainfall processing program (rainThiessen.exe) [pre-processing]
・calcHydro.txt : Hydrograph calculation program (calcHydro.exe) [post-processing]
・calcPeak.txt : Peak inundation depth calculation program (calcPeak.exe) [post-processing]
・rainBasin.txt : Rainfall analysis program (rainBasin.exe) [post-processing]
【Input Files Other Programs and Files】
・hydro.plt : gnuplot script to draw hydrograph
・hs.plt : gnuplot script to create inundation depths figures (prepared by /etc/prepHsPlt)
・ciirdubate.xlsx: excel file to covert from (i, j) to (x, y) or (x, y) to (i, j)
・location.txt : Location list to draw hydrographs

5-1
5.2 RRI Model Control File (RRI_Input.txt)

L1 RRI_Input_Format_Ver1_4_2
L2 RRI_Input.txt
L3 ./rain/rain.dat
L4 ./topo/adem.txt
L5 ./topo/acc.txt
L6 ./topo/adir.txt
L7
L8 0 # utm(1) or latlon(0)
L9 1 # 4-direction (0), 8-direction(1)
L10 360 # lasth [hour]
L11 600 # dt [sec]
L12 60 # dt_riv [sec]
L13 96 # outnum [-]
L14 110.2d0 # xllcorner_rain
L15 -8.3d0 # yllcorner_rain
L16 0.00833333d0 0.00833333d0 # cellsize_rain
L17

Note that #comment is allowed only for lines with numbers like L8 to L16, but it is not
allowed for lines with characters like L3 to L6.

L1 : Version of the control file format.


This version has to be compatible with the RRI program version. When RRI Model version is
updated, user may be requested to modify this control file to be suitable for the updated
version.

L3 – L6 : Paths of the input files (rainfall, dem, acc, dir)


Note that adjusted direction file having zero at the outlet must be read in the flow direction
column. This adjustment (for dem and dir) can be implemented through the process of
demAdjust2.

L8 : Topographic and rainfall data coordinate system (UTM (1) or Lat Lon(0))
L9 : Simulating with 4- (0) or 8-direction (1) by the two dimensional model [default : 1]
L10 : Simulation period [hour]
L11 : Simulation time step [sec], [default : 600 sec]
L12 : Simulation time step for river [sec], [default : 60 sec]
The above time steps are just initial setting. The adaptive Runge-Kutta algorithm used for
RRI simulation may shorten the time steps if necessary.

5-2
L13 : Number of output files
Simulation period specified above is equally divided for simulation output.
L14 – L16 : South west coordinate and resolution of rainfall data
Number of col and row are written in the rainfall data.

L18 0.03d0 # ns_river


RRI_Input.txt
L19 1 # num_of_landuse
L20 1 # diffusion(1) or kinematic(0)
L21 0.4d0 # ns_slope
L22 1.0d0 # soildepth
L23 0.475d0 # gammaa
L24
L25 0.d0 # kv (m/s)
L26 0.3163d0 # Sf (m)
L27
L28 0.0d0 # ka (m/s)
L29 0.0d0 # gammam (-)
L30 0.0d0 # beta (-)
L31

L18 : Manning’s roughness in river channel

L19 : Number of landuse


Parameter sets specified below should correspond to the number of landuse specified here.
For example, if there are three landuse types in a catchment, write three different parameter
sets. Prepare also the landuse map which has numbers from one to three, so that the
parameter sets described below will be assigned to each landuse grid cell. First column
parameters are assigned to landuse type “1” in the landuse map.

L20 : diffusion (1) or kinematic (0) [default : 1]


The default mode of RRI model uses diffusion wave equations. However, by setting zero here,
RRI model can use kinematic wave approximation.

L21 : Manning’s roughness on slope cells


L22 : Soil depths [m]
L23 : Effective porosity [-]

L25, L26 : Green-Ampt infiltration model parameters


Set ksv = 0 for inactivating Green-Ampt infiltration model.

5-3
“ksv” : vertical saturated hydraulic conductivity [m/s], ”faif” is the suction at the wetting front
defined by S f .

Note: In the previous versions of RRI Model, “delta” and “infilt_limit” parameters were used.
The parameter “delta” is now replaced by “gamma” to represent soil porosity minus initial
water volume content (φ − θ ι ). The “infilt_limit” parameter is computed within the RRI
program by multiplying “soildepth” and “gamma” to estimate the maximum cumulative
infiltration depths in meter. Once the cumulative infiltration depths reaches to this maximum
depths, no more infiltration happens at the grid-cells.

L28 – L30 : lateral subsurface and surface model parameters


L28 and L30 are options to consider unsaturated and saturated subsurface flow and surface
flow in lateral direction. “kv” is lateral saturated hydraulic conductivity (which is typically
two or three orders high compared with the vertical hydraulic conductivity set for
Green-Ampt model. To start with, set zero for “dm” to inactivate the option to consider
unsaturated subsurface flow. Setting zero makes no saturated subsurface flow consideration.
See 8.7 for the details of the parameter settings.

Note: In the previous version of RRI Model, a parameter “da” was used to represent maximum
water depth in saturated subsurface flow. Now this is calculated as “soil depth” times
“gammaa” within the program.

L32 – L36
Set “ksg = 0.d0” to avoid deep groundwater component, whose algorithm is under
development and not completed at RRI ver1.4.2. L33-L36 become inactive with ksg = 0.d0.

L38 – L44 : River channel geometry setting by equations

width = cw Asw
depth = cd Asd
The above equations are used as default settings for river channel widths and depths.
Note that A in the equations is the upstream catchment area [km2] for each river grid-cell.

L46 – L49 : River channel geometry setting by files (optional)


If one would like to set width, depth and embankment height from files instead of the above
equations, set 1 in L46 and prepare the files in ESRI/ASCII format.

5-4
L38 100 # riv_thresh
RRI_Input.txt
L39 5.0d0 # width_param_c
L40 0.35d0 # width_param_s
L41 0.95d0 # depth_param_c
L42 0.20d0 # depth_param_s
L43 0.d0 # height_param
L44 20 # height_limit_param
L45
L46 0
L47 ./riv/width.txt
L48 ./riv/depth.txt
L49 ./riv/height.txt
L50

L51 – L55 : Initial water depth on slope, river, groundwater and GA Model cumulative by files
(optional)
If one would like to set initial water depths on slope and river for each grid cell, set 1 in L51
and prepare the initial condition distribution files specified in L52, L53, L54 and L55. Note
that the format of the files is the same as RRI model output.

L51 0000
RRI_Input.txt
L52 ./init/hs_init_dummy.out
L53 ./init/hr_init_dummy.out
L54 ./init/hg_init_dummy.out
L55 ./init/gamptff_init_dummy.out
L56
L57 00
L58 ./bound/hs_bound.txt
L59 ./bound/hr_bound.txt
L60
L61 00
L62 ./bound/qs_bound.txt
L63 ./bound/qr_bound.txt
L64

L57 – L59 : Water depths boundary conditions (optional)


L57 : Slope water depths boundary conditions, L58 : River water depths boundary conditions
See Section 8 for the format of the boundary condition files. Use flag 1 for one-dimensional
data format (i.e. time series data at specific boundary condition locations). Use flag 2 in case
the boundary condition files are prepared in two-dimensional data format, whose number of
grid-cells must be the same as the topographic data including dem, dir, and acc. In both cases,

5-5
time stamps in the boundary condition can vary within the file.

L61 – L63 : Water discharge boundary conditions (optional)


(Same as L57 – L59)

L65 0
L66 ./topo/landuse.txt RRI_Input.txt
L67
L68 0
L69 ./dam.txt
L70
L71 0
L72 ./div.txt
L73
L74 0
L75 ./infile/PET.txt
L76 110.2d0 # xllcorner_evp
L77 -8.3d0 # yllcorner_evp
L78 0.00833333d0 0.00833333d0 # cellsize_rain
L79
L80 0
L81 ./riv/length.txt
L82
L83 0
L84 ./riv/sec_map.txt
L85 ./riv/section/sec_
L86

L65 – L66 : Landuse setting (optional)


If one would like to use multiple parameter sets for different grid-cells, set 1 in L65 and read
landuse file specified in L66.

L68 – L69 : Dam condition setting (optional)


RRI model simulates the effect of dam reservoir operations based on simple rule. Refer to the
source code “RRI_Dam.f90” for details. (See also 8.11)

L71 – L72 : River diversion setting (optional)


River channel diversion setting (See also 8.10)

L74 – L78 : Evapotranspiration setting (optional)

5-6
Prepare ET file and specify the path on L75. The format of ET file is the same as rainfall. The
resolution and xll and yll corners can be different from the rainfall file as far as it covers all
the simulation domain.

L80 – L81 : River length setting (optional) : newly added option to set arbitrary the length of
river channel for each river grid cell (under preparation for more detail on this option).

L83 – L85 : River cross section settings (optional) : newly added option to set arbitrary cross
section information for each river grid cell (under preparation for more detail on this option).

L87 1101000001
RRI_Input.txt
L88 ./out/hs_
L89 ./out/hr_
L90 ./out/hg_
L91 ./out/qr_
L92 ./out/qu_
L93 ./out/qv_
L94 ./out/gu_
L95 ./out/gv_
L96 ./out/gampt_ff_
L97 ./out/storage.dat
L98
L99 1
L100 ./location.txt

L87 – L97 : Output file settings


Change the settings of L87 to “1” to output different sets of simulation results listed in the
same order between L88 and L97

L99 – L100 : Output hydrographs at specified locations (Optional)


Set 1 in L99 to read the location file and output hydrographs at the specified locations.

5-7
6. Running RRI Model

① Prepare “RRI_Input.txt” under your project folder (e.g. “./RRI-CUI/Project/solo30s)”


② Move current folder to your project folder and type in “0_rri_1_4_2.exe” and return.

Prepare “RRI_Input.txt” before


executing 0_rri_1_4_2.exe

Calculation status is
displayed

6-1
7. Visualize Output Data

This section explains how to visualize RRI Model output.

7.1 Format of the Output Files

Each output file contains water depths on slope (hs_) and on river (hr_) and river discharges
(qr_) on river at a particular time step. The units of the output are [m] for water depths and
[m3/s] for discharge.

Number of grids in X direction (col)

col
Number of grids in Y direction (row)

(1, 1) (1, loc_j) (1, loc_j)

(loc_i, 1) (loc_i, loc_j)

loc_i

(row, 1) (row, col)

.
※The numbers of rows and columns are the same as those of the topographic data.

Note that for each type of model output, the number of the files is defined in RRI_Input.txt
(L13 : outnum). The simulation period is equally divided by “outnum” and the number
assigned to each output file represents the output time stamp.

7.2 Visualize Inundation Depth with GNUPLOT

GNUPLOT can be used to illustrate flood inundation depth distributions. Inside the project
folder, the GNUPLOT script named “hs.plt” is included. To change the settings, one can edit
“hs.plt” directly or create another “hs.plt” by using a Fortran program named
“prepHsPlt.f90” saved in “RRI/etc/prepHsPlt”.

7-1
① Edit “hs.plt” file to change the configurations.

reset
hs_plt.txt
set terminal gif medium size 672, 408 crop
The size of
set pm3d map output GIF file,
set palette defined (0.0 "gray", 1.5 "blue", 3 "green") X and Y
direction.
Use the same X
set xrange [0:] Color pattern settings
and Y ratio as
set yrange [:] reverse DEM’s col and
set zrange [0:] reverse row.

#set xrange [180:200]


#set yrange [435:455] reverse

Color range
set cbrange[0.:3]
set zrange[0.0:]
From RRI output (hs_***.out) to gif
set output "./hs/hs_000001.gif"
splot "./out/hs_000001.out" matrix t "000001 / 000096"

set output "./hs/hs_000002.gif"


splot "./out/hs_000002.out" matrix t "000002 / 000096"

set output "./hs/hs_000003.gif"


splot "./out/hs_000003.out" matrix t "000003 / 000096"

② Start GNUPLOT program by clicking “/RRI-CUI/etc/gnuplot/binary/wgnuplot.exe”


Then open and select “hs.plt” script file.

GNUPLOT

Select “hs.plt”

7-2
RRI/Model/hs Right click and preview

7.3 Hydrographs at Specific Locations

A Fortran program named “calcHydro.exe” can be used to generate hydrographs by picking


up values from “out/qr_***.txt” at specified locations.

① Edit “RRI/Model/calcHydro.txt” (see more details “RRI-CUI/etc/calcHydro/00_readme.txt”)


L1 : [In] location file (e.g. ./infile/solo30s/location_solo_30s.txt)
L2 : [In] RRI output file (e.g. ./out/qr_)
L3 : [Out] hydrograph file (e.g. ./infile/solo30s/disc_)

./infile/solo30s/location_solo_30s.txt
calcHydro.txt
out/qr_
./infile/solo30s/disc_

Cepu 68 167
location_30s_solo.txt
(list all target locations)

② Run “calcHydro.exe”. (Execute “makePostProcess.bat” in advance to compile.)


③ Check the created files specified in L3 of “calcHydro.txt”. (e.g. ./infile/solo30s/disc_)
④ From GNUPLOT screen, open and select “hydrograph.plt”, which is a GNUPLOT script
file to plot hydrographs. Any other plotting software, such as Excel, can be also used to

7-3
draw hydrographs from created files (e.g. ./infile/solo30s/disc_Cepu.txt).

In the location file (e.g. ./infile/solo30s/location_solo_30s.txt), one can list all target points,
which you want to calculate hydrographs. Write the “name of location” and “loc_i”
(y-direction) and “loc_j” (x-direction)
Note that “loc_i” is the row (y-direction from top) and “loc_j” is the col (x-direction from left).

To identify the observation points in mesh coordinate (loc_i, loc_j), one can use
“/RRI/etc/coordinate.xlsx” to calculate based on the coordinate in latitude(y) and longitude(x).

① Find the latitude (y) and longitude (x) of the observation point using ArcGIS.

2) Click identify “i” button

1) Click target point

3) Read the coordinate lon and lat

(Displaying “acc” on top to make sure the selected point is on a river grid cell.)

② Open one of the topographic data (i.e. dem, dir, or acc)

ncols 336
nrows 204
acc_solo_30s.txt
xllcorner 110.2
yllcorner -8.3
cellsize 0.00833333333333
NODATA_value -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999

7-4
③ Read the header part (red box in the above figure) of the topographic data and copy the
same information in the Excel file (i.e. /RRI-CUI/etc/coordinate.xlsx).

④ Type x and y (or lon and lat) coordinate of the target point, then the calculated mesh
coordinate (loc_i, loc_j) appears in (E4, E5).

(“coordinate.xlsx” can be used also to convert from (loc_i, loc_j) to (lon, lat).

7.4 Visualize Peak Inundation Depths

Fortran program named “calcPeak.exe” can be used to compute the maximum flood depths
based on RRI Model output (“out/hs_*.out”). See 2.2.3 the procedure more in detail.

① Edit “RRI/Model/calcPeak.txt” file after RRI model execution.


In “calcPeak.txt”, L1 sets the path of dem file, L2 sets the RRI model output file to
calculate the peak, and L3 sets the number of output files. L4 defines the output file of
calcPeak program. See details the readme file of “/etc/calcPeak”.
② Execute “calcPeak.exe”. (Execute “makePostProcess.bat” if the executable file does not
exist.)
③ Check the created files specified in L4 of “calcPeak.txt”.
④ The obtained peak water data follows ESRI/ASCII format that can be visualized with
ArcGIS.

7-5
7.5 Visualize Inundation Depths with Google Earth (Optional)

7.5.1 Preparing KML File

By using “RRI/etc/makeKML.f90”, a kml file (e.g. “runoff.kml”) can be prepared.


User needs to edit “RRI/etc/Kml_input.txt”.

2007 12 24 0 0 : Start time (Year Month Day Hour Min ( UTC ))


96 : Number of gif files( = "outnum" of RRI_Input.txt )
3.75 : Timestep (hourly) ( ≒ "lasth / outnum" of RRI_Input.txt )
./infile/solo/adem_30s_solo.txt : Dem file name (for lat,lon)
./runoff.kml : Output file name
Kml_input.txt

“Time step” needs to be input as “hourly” data.


This “Time step” should be “lasth” / ”outnum” input
in ”RRI_Input.dat”.

<Folder>
runoff.kml
<GroundOverlay>
When it is executed, <TimeSpan>
“runoff.kml” is output. <begin>2007-12-24T00:00Z</begin>
<end>2007-12-24T03:45Z</end>
</TimeSpan>
<Icon>
<href>hs_kml/hs_000001.gif</href>
</Icon>
<LatLonBox>
<north> -6.60000</north>
<south> -8.30000</south>
<east> 113.00000</east>
<west> 110.20000</west>
</LatLonBox>
</GroundOverlay>

※ The output of “runoff.kml” reads gif files created in the folder of “hs_kml”.

7-6
7.5.2 Preparing GIF Files with GNUPLOT

The method of plotting “hs_kml.plt” using “gnuplot” is shown below.

① Prepare a gnuplot file (e.g. “RRI/Model/hs_kml.plt”), which can be essentially the


same as hs.plt explained above. However, the gnuplot script file used here (i.e.
hs_kml.plt) must have some additional statements in the blue box in the following
figure. The statements delete unnecessary axis and legends to be appropriately
overlay on Google Earth.

reset
hs_kml.plt
modify
set terminal gif medium size 672, 408 crop
add
set lmargin 0
Designate size so that the aspect ratio of
set bmargin 0
size and ratio of number of meshes match.
set rmargin 0
set tmargin 0
set notics
This part must be added
set nokey to the original hs.plt file.
unset colorbox

set pm3d map


set palette defined (0.0 "gray", 1.5 "blue", 3 "green")

set xrange [0:]


set yrange [:] reverse
set zrange [0:] reverse

#set xrange [180:200]


#set yrange [435:455] reverse

set cbrange[0.:3] The folder name, “hs_kml”


set zrange[0.0:] should be input here.
modify
set output "./hs_kml/hs_000001.gif"
splot "./out/hs_000001.out" matrix t "000001 / 000096"

7-7
② Start “GNUPLOT” and run “RRI/Model/ hs_kml.plt”.

Click
Select hs_kml.plt

③ An image file is prepared in the “RRI/Model/hs_kml” folder. (Note that a new folder
hs_kml must be created in advance.)

7.5.3 Visualize GIF files with Google Earth

① Start Google Earth and drag “/RRI/Model/runoff.kml”.

Drag
runoff.kml.

7-8
② Designate the number of figures to display at once and their transparency.
1. To reduce the number of
figures, move the left marker to
the right edge, and superimpose
it on the right marker.

2. Set the permeability with the


permeability slider.

※ On time slider: The right marker represents the present time, while the left
marker is used for the number of figures to overlay. Figures in the period between
two markers are displayed.

7-9
③ Execute animation.

1. Drag the right marker, and move 3. If user wants to change the speed
it to the start time. of animation, click option button.

Set the animation


speed by this slider.

2. Clicking starts animation display.

※ <note>. During the animation, two markers should be moved at the same time.
If user can’t move the left marker, stop the animation and fit the left marker to the
position of right marker and restart the animation.

④ Save the results with kmz file, so that it can be distributed to other users without gif files.

Select “kmz” from types of file,


designate the file name as
“runoff.kmz”, and click the save
button.

Select “Save Place as …”


from the right click menu.

7.6 Visualize Results with Tecplot (Optional)

7.6.1 Preparing input File of Tecplot

7-10
calcTecplot.txt
2007 12 24 00 # start time : Year, Month, Day, Hour
360 # lasth [hour] : calculation time ( l.10 )
96 # outnum [-] : output file number ( l.13 )

./Model/infile/solo30s/rain_solo_30s_gauge.dat : Rainfall file ( l.3 )


./Model/infile/solo30s/adem_30s_solo.txt : Dem file ( l.4 )

110.2d0 # xllcorner_rain grid data of Rainfall


-8.3d0 # yllcorner_rain ( from l.14 to l.16 )
0.00833333d0 0.00833333d0 # cellsize_rain

1101110001 Output file from RRI


./Model/out/hs_ (from l.87 to l.96)
./Model/out/hr_
./Model/out/hg_
User needs to edit these lines in “calcTecplot.txt”.
./Model/out/qr_ All the lines except for the first line (start time)
./Model/out/qu_ can be copied from “RRI_Input.txt” to be
./Model/out/qv_ compatible with simulation setting.
./Model/out/gu_
./Model/out/gv_
./Model/out/gampt_ff_
Output file name for Tecplot
./calcTecplot_out.dat (use “dat” for the extention)

TITLE = "Internally created data set"


VARIABLES = "X" All data outside the red border are
"Y" header information, which is not
necessary to be modified.
"DEM (m)"
"Rainfall (mm/h)"
"Water depth hs (m)"
"Water depth hr (m)"
“VARIABLES =” …” shows the variables to
"Water depth hg (m)"
be displayed on Tecplot. Edit this if
"River discharge qr (m3/s)" necessary.
"Slope discharge qu (m3/s)"
"Slope discharge qv (m3/s)"
"Ground discharge gu (m3/s) "
"Ground discharge gv (m3/s)"
"g-ampt (m)"

ZONE T="Contour T ="


STRANDID=1, SOLUTIONTIME=
I=336, J=204, K=1, ZONETYPE=Ordered
DATAPACKING=POINT
DT=(SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE
SINGLE SINGLE SINGLE SINGLE)

7-11
Use “RRI/etc/calcTecplot.f90” to prepare an input file for Tecplot (e.g. “calcTecplot_out.dat”).
Prior to running calcTecplot.exe, edit “RRI/etc/calcTecplot.txt”, which sets the condition for
generating the input file.

7.6.2 Displaying on Tecplot

① Start Tecplot, and load data file.


[File] > [Load Data file(s)] > [Tecplot Data Loader] > [calcTecplot_out.dat]
It takes several minutes to load the data file.

Choose “Tecplot Data


Loader” format, and
Click OK.

Select the output file of


“calcTecplot.f90”.

7-12
Choose“3D Cartesian”,
and Click “OK”

3D elevation data is
displayed on Tecplot.

② Write data file (changing input data to binary data), and also save as layout file.
[File] > [Write Data file…]
[File] > [Save Layout] ..
By Making the binary data (*.plt), user can reduce the amount of time to reload
layout file. User needs longer time to reload without the binary file.

Choose
Binary

Select “Binary” in
“Save Data File Using”
and Click “OK”.

Edit your binary file


name, and Click “Save”.

7-13
Edit your layout file
name, and Click “Save”

7.6.3 Edit display options on Tecplot

① Edit the ratio of XYZ and hide the axes.


[Plot] > [Axis …] Select “XY Dependent” in Dependency on “Z” tab and input Size
Factors in Z (following example shows the Size Factors Z is set to 0.1). Uncheck “Show
X(Y,orZ)-axis” on X, Y and Z tab to hide the axis.

Uncheck “show Z-axis” checkboxes


on X, Y and Z axis.

After selecting “XY


Dependent”, set “Size
Factor” of Z as around 0.1.

7-14
② Fit the data display range to the target range.
[View] > [Data fit]

③ Edit point of sight angle.


[View] > [Rotate…] Uncheck “Edge”

Set as follows;
Psi 5.00
Theta -90.00
Alpha 0.00

7-15
④ Delete unnecessary frame
[Frame] > [Edit Active Frame…]

Uncheck “show Border”


checkbox.

⑤ Edit translucency of shade


Click “Zone Style” and edit the value of “Surface Translucency” on “Effects Tab” to change
the translucency of shade (e.g. 10%).

7-16
7.6.4 Draw contour figure on Tecplot
① Select variables to draw contour. User can select variables up to eight variables. The
legends of variables are automatically set. The method to edit them is described in ③.

Legend ID and Selected variables


selected variables

※ Following variables are selected as an


example.
1. DEM
2. Rainfall(mm/h)
3. Water depth hs (m)
4. Water depth hr (m)
5. River discharge qr (m3/s)
6. Slope discharge qu (m3/s)
7. Slope discharge qv (m3/s)

② Select variable to display. User can select variable from variables identified in ①. Click
“Zone Style” and edit “Flood By” on “Contour” tab to edit target variable and its
legend. ”Water depth hs (m)” is selected in the following figure as an example.

7-17
③ Edit legend.
User can edit color legend of contour as follows;

Set “Contour level Range”

④ User also can edit “cut off” to display upper and lower color limits. Color up to 0.5m is cut
in the following figure as an example.

7-18
⑤ User can check the time series of the contour figure.
[Animate] > [Time…]

Start animation.

7-19
⑥ Export animation file
User can export animation file.
[Animate] > [Time…]
Select “To File” in “Destination” and “AVI” in “File Format” on “Animates” tab in “Time
Details”. If user needs to edit animation speed, click “Generate Animation File” and edit
“Animation Speed” if necessary.

7.6.5 Supplement of display

① Display timestamp information on animation


If user needs to display timestamp information on the contour figure, add textbox and
input as follows;
Time = &(SolutionTime%ddd dd-mmm-yyyy at hh:mm)

② Display time series graph on plane view.


Select [Tools] > [Time Series Plot] > [Probe To Create Time Series Plot] and identify the
position by left click with the pointer “+” to display the time-series. Note that the variable
selected as “Flood By” will be shown on the time series graph. Hence user needs to change
the setting of Zone Style and “Flood By” to display different time-series (e.g. qr).

7-20
7-21
8. Application Example

This section presents the application of RRI Model to the lower Indus River basin. The target
area is below Tarbela dam, Kabul and Panjdnad points as indicated below. The simulation
domain is about 340,000 km2 and the river length is about 1,400 km. In this example, the
river discharge boundary conditions are prepared based on observed discharge records during
2010 floods to force the model with rainfall records.

RRI Target Area

A polygon covering the simulation target (the red mask in the above figure) was prepared first.
The flow direction data in HydroSHEDS (30sec) was used to identify the entire Indus River
basin. Then the upstream areas above Tarbela, Kabul and Panjnad were removed from the
entire Indus River basin.

The background image of the above figure can be obtained from the following site
(http://goto.arcgisonline.com/maps/World_Imagery) and used in ArcGIS.

8.1 On Input Topography

By using the catchment polygon, dem, acc and dir datasets were clipped for the catchment
area. The function embedded in ArcGIS ([Spatial Analyst Tools]  [Conditional]  [Con]) was
used to mask the target area out of the regional datasets of HydroSHEDS (30 second
resolution). Then “demAdjust2” program was used to adjust dem and dir to create adem and
adir.

8-1
dem acc dir

(m)
4500 500

0 0

8.2 On Input Rainfall

Ground gauged rainfall records provided by Pakistan Meteorological Department (PMD) were
used for the simulation. The green dots in the left figure below show their spatial distribution.
The below right figure is the formatted ground gauged rainfall data with the latitude and
longitude information. Total 93 data was used to create spatially distributed rainfall data.

Rain gauge

Note that the first column of the excel sheet represents the time stamp of the rainfall data in
second. For example, at the row of 172800 sec, the daily rainfall [mm/d] between time 86400
and 172800 sec was stored. Then all the data was copied to a text editor and save it as ASCII.

8-2
The ASCII file is the input data of /etc/rainThiessen program that generates the spatially
distributed rainfall data. Note that the “gauge_map_lower_indus.txt” is also created after
running /etc/rainThiessen program, so that one can check the spatial representation of each
rain gauge (see the figure below after converting from the ASCII to Raster with ArcGIS).

gauge_map_lower_indus.txt

Here is the sample of the rainThiessen program input file (rainThiessen.txt).

./indus/gauge_1d_2010.txt
rainThiessen.txt
24
./indus/rain_lower_indus_gauge_2010.dat
./indus/gauge_map_lower_indus.txt
ncols 80
nrows 120
xll 66.0
yll 23.0
cellsize 0.1 in degree

The rainfall data must cover all the simulation domain. However, it is not necesssary to have
the same resolution or the same coverage area. For exmaple, 0.1 degree (approx. 10 km) may
be fine enough to distribute the ground gauged rainfall for this case. Thus above
rainThiessen.txt read by the rainThiessen program specifies the output resolution of 0.1
degree.

8-3
ncols 960
nrows 1440
xllcorner 66
yllcorner 23
cellsize 0.00833333333333
NODATA_value -9999

35.0 66.0

Topography Rainfall
66.0 0.0083333 degree 74.0 66.0 23.0
0.1 degree
resolution resolution

23.0 23.0

No need to be the same extent or the same resolutions,


as far as rainfall data covers entire simulation domain

RRI_Input_Format_Ver1_4_1
RRI_Input.txt

./infile/lowerindus/rain/rain_lower_indus_gauge_2010.dat
./infile/lowerindus/adem2_lid1k.txt
./infile/lowerindus/acc_lid1k.txt
./infile/lowerindus/adir_lid1k.txt

0 # utm(1) or latlon(0)
1 # 4-direction (0), 8-direction(1)
2568 # lasth
600 # dt
60 # dt_riv
104 # outnum
66.0d0 # xllcorner_rain xllcorner_rain, yllcorner_rain
23.0d0 # yllcorner_rain cellsize_rain (x, y) are specified
0.1 0.1 # cellsize_rain in RRI_Input.txt

8.3 On Input Evapotranspiration

Current version of RRI Model does not have a function to estimate evapotranspiration from
climate variables. However, by giving evapotranspiration rate as one of the input files, the
model takes the equivalent amount of water from surface and subsurface storages.

8-4
The format of the evapotranspiration input is the same as rainfall. Hense the grid cell size
and time step of evapotranspiration file can be arbitrary set. For example, to set the constant
rate of evapotranspiration, one can prepare the following input file (e.g. evp_4mm.txt), in
which the value of 0.166667 mm/h corresponds to 4 mm/d of evapotranspiration.

011
0.166667 evp_4mm.txt
10000000 1 1
0.166667

To read the evapotranspiration input file, set flag 1 on the L71 and specify the input file name.
The coordinate of south west corner (xllcorner and yllcorner) as well as the cellsize (x and y
direction) must be also set in L73-L75.

L71 1
L72 ./infile/lowerindus/evp_4mm.txt RRI_Input.txt
L73 66.0d0 # xllcorner_evp
xllcorner_evp, yllcorner_evp
L74 23.0d0 # yllcorner_evp
L75 1000.d0 1000.d0 # cellsize_rain cellsize_rain (x, y) are specified
in RRI_Input.txt

Note that if sufficient water exists on a slope grid cell, and if the grid cell store water in the
Green Ampt-Model, the model takes water from the cumulative water in GA model. If a user
wants to avoid the evapotranspiration from the GA model, use flag “2” instead of “1” on L71.

8.4 On River Channel Geometry Setting

RRI Model assumes the rectangle shape for all river cross sections. To determine river cross
sections (incl. width W, depth D and levee height H e ), the following two options are available.

hs He

D hr

8-5
A) Use empirical equations with parameters defined in RRI_Input.txt

B) Read the values from files and specify the files in RRI_Input.txt

L38 100 # riv_thresh


RRI_Input.txt
L39 2.5d0 # width_param_c
L40 0.4d0 # width_param_s
L41 0.1d0 # depth_param_c Option A
L42 0.4d0 # depth_param_s
L43 0.d0 # height_param
L44 20 # height_limit_param
L45
L46 1  0 : Option A / 1 : Option B (Read from files)
L47 ./infile/lowerindus/width_lid1k.txt
L48 ./infile/ lowerindus /depth_lid1k.txt Option B
L49 ./infile/ lowerindus /height_lid1k.txt
L50

A) For the first option, the parameters of the following empirical equations must be
appropriately set to represent target catchment condition (L38 – L44 of RRI_Input.txt).

width = cw Asw
depth = cd Asd
where A in the equations is the upstream catchment area [km2] for each river grid-cell.
The unit of width and depth are [m]. The parameter “riv_thresh” defines the threshold of flow
accumulation (i.e. number of upstream cells) to distinguish river grid cells or slope grid cells.
Recall that for RRI model, slope exists even on a river grid cell.

8-6
B) For the second option, a user can prepare three files separately to represent width, depth,
and height distributions. All those files must have the same number of row, column and
resolution as the topography data (i.e. adem, acc and adir). The format of these data is ArcGIS
ASCII format (i.e. the same as the topography data).

Note that the width file (e.g. ./infile/lowerindus/width_lid1k.txt) is used to decide whether
each grid-cell has river or not (width > 0 is treated as a river grid cell). The values of depths
and heights must be appropriately defined on a cell where the width > 0.

To support for creating the width, depth and height files, a Fortran program called
/etc/makeRiver2/ can be used. The program reads “acc” file to calculate the upstream
catchment area A [km2] for each grid cell and a user can define different equations or fixed
values within the program to create the three river cross section files.

8.5 On Embankment Setting

There are two kinds of embankment settings in RRI simulation.

A) Embankment along rivers

B) Embankment on slope grid cells

A) The first type of embankment is illustrated in the figure of a river cross section. The effect
of embankment is considered during the interaction of water between river and slope. To
include the first type of embankment, the height value (height > 0) must be set on river grid
cells (width > 0). Because of the RRI Model basic structure, a river is set as a centerline of a

8-7
slope grid, it is not possible to apply different embankment height for different side of the
river for this option.

B) The second type of embankment represents roads, railways or other structures that
prevent water to across. Since the embankment along the main Indus River is located a few
kilometers apart from the main channel (see above figure), this second type suits better. The
location information of the embankment was converted to raster data having the same
resolution with topographic data on ArcGIS. The above mentioned “height” file specified in
RRI_Input.txt can contain the height information (and therefore the embankment location
information) on slope grid cells.

Note that even if a user intends to set a continuous embankment apart from a main river, if a
tributary joins into the river and if the “height” value is set on a river grid cell where width >

8-8
0, the embankment would be regarded as the embankment of Type A. As a result, the set
embankment will be discontinuous at the location.

To avoid the situation and elevate DEM even on the tributary (or river grid cells), one can use
the flag of “2” on L46.

8.6 On Land Class Setting

The effects of land cover (or soil type) can be reflected by assigning different model
parameters. In this example, GLCC-V2 (Global Land Cover Characterization) provided by
USGS was used. The original land cover data (left) is too detail to assign all different
parameters; therefore, similar land cover types were merged into two categories: Cropland
and Sparsely Vegetated, and also overlaid additional Floodplain polygon.

Cropland
Sparsely Vegetated
Floodplain

For re-classing the original land cover data, ArcGIS function [Spatial Analyst Tools] 
[Reclass]  [Reclass by ASCII File] was used. The following lookup table was prepared by a
text editor to define the re-class. Different lookup tables may be defined for different projects.
Note that the number of the raster data (in this case 1, 2 and 3) corresponds to the column of
parameter sets in RRI_Input.txt. Thus provide sequential numbers starting from 1 for
representing different land covers.

8-9
Finally the re-classed land cover was converted to the ArcGIS/ASCII format and saved it as
“lu_lid1k.txt”. Note that the file can be read by RRI Model by indicating the file link in
“RRI_Input.txt”.

Lookup Table Legend of GLCC-V2


(Indus Example)
USGS Land Use/Land Cover System Legend (Modified
Level 2)
Value Description
1:1 1 Urban and Built-Up Land
2:1 2 Dryland Cropland and Pasture
3:1 3 Irrigated Cropland and Pasture
4:1 4 Mixed Dryland/Irrigated Cropland
5:1 5 Cropland/Grassland Mosaic
6:1 6 Cropland/Woodland Mosaic
7:1 7 Grassland
8:2 8 Shrubland
9:1 9 Mixed Shrubland/Grassland
10 : 1 10 Savanna
11 : 1 11 Deciduous Broadleaf Forest
12 : 1 12 Deciduous Needleleaf Forest
13 : 1 13 Evergreen Broadleaf Forest
14 : 1 14 Evergreen Needleleaf Forest
15 : 1 15 Mixed Forest
16 : 1 16 Water Bodies
17 : 1 17 Herbaceous Wetland
18 : 1 18 Wooded Wetland
19 : 2 19 Barren or Sparsely Vegetated
20 : 1 20 Herbaceous Tundra
21 : 1 21 Wooded Tundra
22 : 1 22 Mixed Tundra
23 : 1 23 Bare Ground Tundra
24 : 1 24 Snow or Ice
99 : 1 99 Interrupted Areas
100 : 1 100 Missing Data

8.7 On Parameter Setting

Model parameter values are defined in RRI_Input.txt. In this section, the general idea to
decide model parameters are described first, then a calibrated model parameter set for the
Indus River basin will be shown as an example.

For each land cover class, decide (A), (B) or (C) in the following figure depending on
infiltration and subsurface processes, so that the number of calibration parameters will be
limited.

8-10
Surface / subsurface flow conditions

(A) Only overland flow (B) Vertical infiltration (C) Saturated subsurface
(no infiltration loss, + Infiltration excess + Saturation excess
no subsurface flow) overland flow overland flow

Example of parameter values (their recommended ranges)


Parameters Notation (A) (B) (C)
n (River) (m-1/3s) ns_river 0.03d0 (0.015 ~ 0.04)
n (Land) (m-1/3s) ns_slope 0.3 d0 (0.15 ~ 1.0)
Soil depth (m) soildepth 1.0 d0 (0.5 ~ 2.0)
Porosity (-) gammaa 0.471d0 (0.3 ~ 0.5)

k v (m/s) kv 0.d0 5.56d-7 0.d0


Sf Sf inactive 0.273d0 inactive

k a (m/s) ka 0.d0 0.d0 0.1d0 (0.01-0.3)


Unsat. porosity (-) gammam Inactive 0.d0
β beta inactive Inactive inactive
Note: 0.d0 is used in RRI_Input.txt to represent double precision of 0.0.

For case (A), where only overland flow without infiltration or subsurface flow process are
considered, set both kv and ka equal to 0.
For case (B), where vertical infiltration + infiltration excess overland flow are considered, set
ka = 0, and the parameter “da” is equal to “soil depth” times “porosity”.
For case (c), where saturated subsurface + saturation excess overland flow are considered, set
kv = 0, and the infiltration limit (defined as a parameter in the previous versions of the RRI
model) equals to “soil depth” times “porosity”.
Note that the parameter values in the above table are just one example values (approximate
ranges).

8-11
Note that even though the values in inactive part do not affect the simulation result, a double
precision value like 0.0d0 must be filled in RRI_Input.txt (see the sample below).

* Set “ksg = 0.d0” to avoid groundwater computation, whose algorithm is under development
and not completed at RRI ver1.4.2.
** If both ka and kv are set to be non-zero, RRI will stop with an error message.

The following figure shows an example of parameter settings

L18 0.03d0 # ns_river RRI_Input.txt


L19 3 # num_of_landuse
L20 1 1 1 # diffusion(1) or kinematic(0)
L21 0.15d0 0.15d0 0.15d0 # ns_slope
L22 1.0d0 1.0d0 1.0d0 # soildepth
L23 0.4d0 0.4d0 0.4d0 # gammaa
L24
L25 5.556d-7 6.056d-7 0.d0 # kv
L26 0.273d0 0.1101d0 0.d0 # Sf
L27
L28 0.1d0 0.1d0 0.1d0 # ka
L29 0.0d0 0.0d0 0.0d0 # gammam
L29 8.0d0 8.0d0 8.0d0 # beta
L31
L32 0.d0 0.d0 0.d0 # ksg
L33 - L36 are inactive under ksg = 0.d0

Reference Table : Green-Ampt Infiltration Parameters for different soil texture


Soil texture class k v (m/s) φ [gammaa] S f (m)
Sand 6.54E-05 0.437 0.0495
Loamy sand 1.66E-05 0.437 0.0613
Sandy loam 6.06E-06 0.453 0.1101
Loam 3.67E-06 0.463 0.0889
Silt loam 1.89E-06 0.501 0.1668
Sandy clay loam 8.33E-07 0.398 0.2185
Clay loam 5.56E-07 0.464 0.2088
Silty clay loam 5.56E-07 0.471 0.273
Sandy clay 3.33E-07 0.43 0.239
Silty clay 2.78E-07 0.479 0.2922
Clay 1.67E-07 0.475 0.3163

8-12
From Rawls, W.J. et al.., 1992. Infiltration and soil water movement. In: Handbook of hydrology. New York:

McGrow-Hill Inc., 5.1–5.51. (Units are conveted for RRI Model)

8.8 On Boundary Condition

The following river boundary conditions were set based on the observed discharges at the
three locations during the 2010 flood.

The steps to set river discharge boundary conditions are described below.

① Find locations to provide the boundary conditions.

Viewing acc values on ArcGIS can help you to identify appropriate position with lat lon
information along a river channel. Use i (identify) icon to find out the coordinate.

Then use the “/etc/coordinate.xls” to convert from the lat lon coordinate to loc_i and loc_j. See
Section 7.3 on the conversion in detail.

8-13
Kabul
Tarbela

② Prepare a 1D boundary condition file with the following format.

The number of boundary condition setting points

The loc_i and loc_j of all points to give


3
boundary conditions
loc_i 110 119 680
loc_j 803 719 602
0 3936.041733 3007.249151 917.4658428
21600 3936.041733 3007.249151 917.4658428
43200 3936.041733 3007.249151 917.4658428
64800 3879.408039 3044.061053 917.4658428
86400 4813.86399 3015.744206 917.4658428
108000 4700.596602 2944.952088 917.4658428
129600 4842.180837 2899.645133 917.4658428
151200 4672.279755 2922.29861 1093.030294
….. ….. …. ….

Time series of the boundary condition


data (units: [m3/s] for river discharge,
and [m] for water depth)

③ Settings in RRI_Input.txt

8-14
After preparing the boundary conditon file (e.g. disc_lid1k_2010.txt) and move the file in the
appropriate folder (e.g ./infile/lowerindus/), edit the RRI_Input.txt file as follows.

L51 0000 RRI_Input.txt


L52 ./infile/lowerindus/hs_init_dummy.out
L53 ./infile/lowerindus/hr_init_lid1k.txt
L54 ./infile/lowerindus/hg_init_sample.out
L55 ./infile/lowerindus/gampt_ff_init_dummy.out
L56
L57 00
L58 ./infile/wlev_bound_dummy.txt
L59 ./infile/hr_bound_dummy.txt
L60 Write the file name of river discharge boundary
L61 01
L62 ./infile/qs_bound_dummy.txt
L63 ./infile/lowerindus/bounds/bound_lid_2010.txt
L64

Another option is to use two-dimension format for setting boundary conditons. In that case,
prepare the following “setBound.txt” first as the input file to “/RRI/etc/setBound” program,
which creates the input boundary conditon file (e.g. ./disc_lid1k_2010.txt) on two dimensional
basis. The two-dimensional boundary condition files can be read with flag 2 on L61.

../../Model/infile/lowerindus/adem_lid1k.txt
setBound.txt
../../Model/infile/lowerindus/acc_lid1k.txt
../../Model/infile/lowerindus/adir_lid1k.txt
./infile/lowerindus/disc_Constant.txt
../../Model/infile/lowerindus/disc_lid1k_Constant.txt
3
119 719
110 803
680 602

In the above example of “setBound.txt”, L1 to L3 are the paths to the topography files (dem,
acc and dir). L4 is the 1D discharge file (input) prepared above and the L5 is the output of the
setBound program. L6 indicates the number of points to give the boundary conditions,
followed by the positions in loc_i and loc_j.

8-15
The created boundary condition files have the same format as the rainfall file. However,
unlike rainfall files, the number of columns and rows must be exactly the same as the
topography data, so that RRI Model knows where to give the boundary.

Note that discharge boundary conditions including along river and on slope must have the
information of the directions. In other words, they should be vector values rather than the
scalar values. To decide the direction of the discharge boundary conditions, RRI Model refers
to the flow direction in “dir” file.

Water level boundary conditions on slope and/or river can be also set by changing the value on
L57 to 1 and specitying the boundary condition file name. The file format is the same as the
river discharge boundary condion.

8.9 On Initial Condition

RRI Model can take initial conditions for water depths on slope and river as well as the
cumulative water depth in the Green-Ampt model. The format of the files is the same as the
output of those variables, so that one can use the output of the RRI as the input for the next
simulation.

This feature enables the continuous long-term simulation. In order to read the initial
conditions, L49 to L52 in the RRI_Input.txt must be edited in a same manner as the example
of the boundary condition setting.

8.10 Diversion option (for advanced users)

RRI model can simulate the effect of diversion in a simple way. The portion of the diversion
from a main channel to a diversion channel must be pre-defined by a model user and
described in RRI_Div.f90 program. The followings are the basic steps to activate the option.

① Edit input river cross section files (i.e. width, depth, height) and flow direction files to add
necessary diversion channels (e.g green arrow for the below figure).

② Check a origin cell (loc_i_org, loc_j_org) and a destination cell (loc_i_dest, loc_j_dest).
Both the origin and destination cells must be specified on river grid-cells. Typically these
two are adjacent, but not necessary (i.e. diverted water can jump into an apart cell).

8-16
j=1 j=2 j=3 j=4

i=1 Diversion origin cell (loc_i = 1, loc_j = 2)

i=2 Added diversion channel

(Diversion destination (loc_i = 2, loc_j = 3)

i=3 dir = 2, width > 0, depth > 0, height ≥ 0

64
dir 32 128
i=4

16 1
i=5

8 2
4

③ Prepare a file to specify the origin and destination cells based on the following format.
One can list up multiple lines if more than one diversion should be considered.
“div_rate” specifies the ratio of discharge diverted from the main river to the diversion..

1 2 2 3 0.2
div_sample.txt

loc_i_org loc_j_org loc_i_dest loc_j_dest div_rate

④ Activate this option by setting flag 1 on L70 and specify the diversion file name (e.g.
div_sample.txt) on L71 in RRI_Input.txt.

8.11 Dam option (for advanced users)

RRI model can simulate the effect of dam reservoirs in a simple way. The dam model has two
parameters: outflow discharge and maximum storage volume. The model takes storage
volume as a state variable, which continues being updated based on simulated inflow and
outflow. The outflow is maintained at a certain discharge rate that is lower than the inflow
rate until the storage volume reaches the dam’s maximum storage level. After the storage
volume exceeds the maximum level, the model is designed to release the water at the same
rate as the inflow rate. The parameters must be determined based on dam operation records.
The followings are the basic steps to activate the dam model.

① Prepare a dam parmmeter file by the following format.

8-17
2
Bhumibol 166 71 5800000000 150 dam_sample.txt
Sirikit 135 166 3510000000 500

dam names, loc_i_dam, loc_j_dam, storage volume [m3], constant discharge [m3/s]

② Activate the dam model by setting flag 1 on L65 and specify the dam file name on L66 in
RRI_Input.txt.

8.12 Arbitrary cross sections (for advanced users)

In addition to the rectangular river cross sections, the RRI Model can incorporate also
arbitrary cross section directly. The followings explain the procedure to reflect cross section
information to the model.

① Use “section.f90” program in the “etc” folder to prepare cross section files (e.g.
sec_000001.txt) based on cross section coordinate information files (e.g. CS99C2.txt).
② Prepare a map file (e.g. sec_map.txt) to define which river grid cells should reflect which cross
section files (e.g. sec_000001.txt).
③ Change RRI_Input.txt setting to read sec_map.txt and the cross section files.
④ (Optional) prepare and read river length file from the RRI_Input.txt

The followings explain the detailed step to reflect the cross section information.
① The following steps use “RRI-CUI/etc/section/section.f90” program. Suppose cross section
coordinate information files are available in the following format.

3.000000 25.35900
CS99C2.txt
5.000000 25.27600
6.000000 24.65500
8.000000 23.83900
… …

(First column: x, second column: z)

8-18
Prepare “section.txt” file accordingly to be inputted to “section.f90” program.

CS99C2.txt section.tx
sec_000001.txt
0.03 ! Manning’s roughness in river
100 ! div
25. ! datum level
1 ! startx
30 ! endx

where the first two lines are input and output file names and the third line sets the
Mannings’s roughness in the river. The fourth line defines “div”, which determines the
number of divisions in depth directions, with 100 divisions in the above example. The fifth
line is a datum level (m), which is the elevation of floodplain level identified from the cross
section information (e.g. CS99C2.txt) as shown in the figure below. The RRI Model sets the
defined cross section in a way that this datum level will be equal to the DEM elevation at each
grid-cell.

8-19
For example, suppose the DEM of a grid-cell to set a river cross section is 24 m, while the
estimated flood plain level read by the cross section file (i.e. elevation of ③ in the above
figure) is 25 m. In this case, a user has the following two options.

a) Regardless the elevation information contained in the cross section data, prioritize
the elevation of DEM 24 m and the floodplain level in the cross section will be at 24
m. For this option, please set the above “datum level” as 25 m. This means that the
25 m in the cross section will be regarded as the datum and this level will be the
same as the DEM.
b) If both absolute elevation information contained in the DEM and cross section files
are reliable and they are generally consistent each other, the user may set “datum
level” as 24 m to use the elevation information contained in the cross section file
directly. This means that the level of 24 m in the cross section will be equal to the
level in DEM.

For L6 (startx) and L7 (endx) in the “section.txt”, please set minimum and maximum x
coordinates, which should be within a river grid-cell, as shown in the above figure ① and ②.

Based on the above setting, “section.f90” will automatically proceed the following steps.
STEP 1: The program measures depth (d) and levee height (h). The depth (d) is the elevation
difference between the deepest position in the cross section and the level of ③ . The height (h)
is the smaller elevation either ①or ②measured from ③.
STEP 2: It divides a cross section into the number of “div” (i.e. 100 in this case) from the
deepest point to the datum level.
STEP 3: It outputs perimeters, widths and the Manning’s roughness parameters
corresponding to each depth.

An example of output files by section.f90 (e.g. sec_000001.txt)

8-20
div d h sec_000001.txt

100 10.98000 0.00000


0.11339 23.78646 23.77967 0.03000
0.22678 27.57293 27.55933 0.03000
0.34017 31.35939 31.33900 0.03000
0.45356 35.14586 35.11867 0.03000

11.11222 298.35455 295.76846 0.03000
11.22561 298.56949 295.95105 0.03000
11.33900 300.62881 298.00000 0.03000

depth perimeter width roughness

* section.f90 reads the Manning’s roughness as a single parameter and set the constant
value in the output file. However as shown in the above figure, the file can set different
composite Manning’s roughness values depending on water depths. One may change the
roughness values if necessary.

② Prepare a section map file (e.g. sec_map.txt”) to define the position of grid-cells to set
cross section files. The “sec_map.txt” should have the same format (and size) as the
dem.txt and contains numbers (greater than 1) at grid cells, whose numbers
corresponding to cross section files. For example, if “sec_map.txt” indicates “5” at a
particular grid cell, the RRI Model will find “sec_000005.txt” and reads and assigns the
cross section information.

③ By setting 1 in L83 of RRI_Input.txt, the model will read “./riv/sec_map.txt” and


corresponding river cross section files (e.g. sec_******.txt).

④ If necessary, a user may set river length at each grid-cell defined by “length.txt”, whose
format and the matrix size must be the same as “dem.txt”. In that case, set 1 in the L80
and reads “./riv/length.txt” from the RRI_Input.txt. This can be activated when rivers are
meandering or one would like to reflect distant information contained in cross sections.

(Reference) The method of RRI calculation depending on the datum level ③.

8-21
In case of left panel in the upper figure, the model will start exchange water between the river
and slope cells once the river water exceeds the level of ③. As a result, the modeled river
sections become smaller than the actual one indicated by the figure.

In case of right panel in the upper figure, the model does not exchange water between the
river and slope cells unless the river water exceeds the level of ③. As a result, the modeled
river sections become larger than the actual one indicated by the figure.

8-22
9. Use of RRI Graphical User Interface (GUI)

This section explains how to use RRI-GUI to apply the model at a basin and visualize the
simulation results.

9.1 Pre-setting

1) Unzip “RRI_1_4_2.zip” and save it under a working folder (e.g. C:/”).


3) Check your PC is 32 or 64 bit. (My Computer  Property)

4) Install two programs saved in “RRI-GUI/Pre-setting”


① w_fcompxe_redist_intel64.msi
② vcredist_x64.exe
(for 32 bit, install vcredist_x86.exe and w_fcompxe_redist_ia32.msi )

For “vcredist_x64.exe”, you may encounter an error message suggesting you have already
the newer version of “Microsoft Visual C++ 2010 Redistributable”. In that case, you can just
close the error message and cancel to install “vcredist_x64.exe”.

5) Execute RRI_BUILDER_64.exe
(for 32 bit machine, execute RRI_BUILDER_32.exe)

9-1
9.2 Model application and running with RRI_BUILDER

9.2.1 Preparing Input Topography Data

The first screen of the “RRI_BUILDER_64.exe” is to choose “New Project” or “Load Project”.

New project

Select “New Project” in this exercise.

Type in a new project name (e.g. “solo30s”) with the selections of “Use HydroSHEDS” and
“Asia30”, then click “OK”.

Project name

9-2
Move and zoom

Move: Ctrl + mouse left drag


Zoom: Ctrl + mouse scroll

Zoom into Java Island in Indonesia

9-3

After zoom into the outlet area of the Solo River basin, click a pixel along the main river near
the river mouth (not necessary to be exactly the same as the above example).
Then choose “Yes” on the window and “Confirm” on the left panel.

Click “Extract Basin” after you confirm the area of the basin.
(If not satisfactory, click “Reset Basin” and retry it.)

9-4
If the background map is available, the following extracted basin will be displayed.
(Even the background image is not shown for some reasons, it is essentially no problem for
the following simulation).

(Optional)
The step of “Scale up DEM” is an optional. Use this option in case you want to scale up the
DEM for example changing the model resolution from 30 second to 60 seconds.

The next step is to execute “AdjustDEM”. This procedure is always necessary for the stable
simulation.

Choose OK with the default setting. (you will see a command screen running AdjustDEM
program).

9-5
Now select “DATA” Tab on the left top and click “Set river”.


Click all the three “Make File” on River parameter setting.


These values are the parameters to determine the cross sections based on the equations.
For this exercise, use default values.

9-6
After confirming the three green signs, close this window.

9.2.2 Preparing Input Rainfall Data


① Set “Start time” and “End time” under <Rain>
Start : 2007/12/24 0:00, End : 2008/1/8 0:00

③ Click “Use ground gauged rainfall”

② Click “Select” to find a input rainfall file


(In this excercise, “RRI-GUI/Obsdata/rain_Solo_2007.csv”)

9-7
An input rainfall file must be the following format saved as csv. The file can be prepared by a
text editor or Excel (saved as csv).

Please note that the format is slightly different from the one used by the Thiessen Polygon
program explained for RRI-CUI (Command User Interface). The first column of the fille (L4-)
is date and time. Currently the date and time must be in the form of “yyyy/mm/dd h:mm”.

After selecting the input csv file, please choose “Yes” on the confirmation window then click
“OK” with the default setting of the creating rainfall distribution file.

9-8
9.2.3 Running RRI Model

Select “Edit” tab after the topographic and rainfall data is ready.
You can confirm different distributions including DEM, ACC, DIR, River Width, River Depth,
Bank height as well as cumulative Rain.

These distribution files except for the cumulative rainfall, can be edited on the window. For
example you can choose river width and select any area inside the basin to display the
following image. (For this exercise, no need to change the values.)

9-9

② Click on any location in the basin

① Cancel

In addition, you find parameter and other input file settings if you click “Edit
RRI_INPUT.TXT”. The editting the values will be reflected to the RRI_Input.txt file, which
is the control file of the RRI model. (For this exercise, no need to change the values.)

Finally, click “Run RRI” and “OK” to start the simulation.

9-10
9.2.4 Additional functions of RRI_BUILDER

The latest version of “RRI_BUILDER.exe” has a function to use global dataset for landuse
and soil distribution to assign different sets of model parameters. To read the maps for the
target river basin, one can click “Extract Land cover and Soil” under BASIN tab.

9-11
① Click on Extract Land use and Soil

② Extracted landuse can be found


under current data of EDIT tab.

④ Extracted soil map can be found


under current data of EDIT tab.

③ Click “EDIT RRI_Input.txt” to set different values for each


combination of the landuse and soil distribution.

Under “EDIT RRI_Input.txt”, click “Set Parameters”, so that different parameters are
assigned (e.g. 1, 2, 3, … 8), which can be confirmed by selecting “Parameter”.

9-12
⑤ Try to select different
parameter sets

⑥ Click “Set Parameters”

⑦ Then “Save RRI_Input.txt”

Finally Save “RRI_Input.txt” to update the RRI_Input.txt file.

Note that now new map called “Parameter” is created under Current Data of Edit tab. The
map shows the distributions of ID numbers, corresponding to the above parameter set
created by the combination of landuse and soil distribution. For example, the area with the
gray color in the following map (i.e. ID = 1) will be assigned with parameter set 1.

9-13
9.3 Visualizing results with RRI_VIEWER

Execute “RRI_VIEWER_64.exe” (or _32.exe for a 32 bit machine).

Read RRI_Input.txt file prepared in the previous subsection. In this exercise, find
RRI-GUI/Project/solo30s

Please do not double click the


RRI_Input.txt due to a small bag
in the current viewer. To open
the file, please click the “open”
① button after selecting the file.

9.3.1 Visualize flood inundation

On the displayed map image, one can use CTRL and left drag to move the map and also
CTRL and mouse scroll to zoom in and out. This operation is the same as
RRI_BUILDER_64.exe

9-14
To display the animation of flood inundation depth distribution, please select inundation on
the top left panel and click the start button.

After stopping the animation, try to click any grid cell inside a basin to visualize the time
seris of flood inundation depths.

9-15
Then display the maximum inundation depth distribution by choosing hs max.
For the maximum inundation depths, one can check values by selecting a area on the map.

(Optional)

9-16
File output for maximum
flood inundation depths

To change the color

9.3.2 Visualize river discharge and water depth

To display the animation of river discharge or river water depth distribution, please select qr
(River Disc.) or hr (River WD) on the top left panel and click the start button.

River discharge (qr) or


river water depth (hr)

9-17
After stopping the animation, try to click any river grid-cell to visualize the time serises of
river discharge (i.e. hydrograph) and river water depth.

Double click at the river location


to display water depth (blue
color, left) and river discharge
(led color, right).

9.3.3 Visualize the longitudinal profile of river water level

To visualize the longitudinal profile of river water level, first select hr (River WD) and click
“Set River Path” on the left pannel.

9-18
① Select hr

③ Click Yes

② Click Set River Path

⑤ Click Yes ④ Click here as


the Upstream end
point

9-19
⑥ Click here as
⑦ Show Profile the Downstream
end point

⑧ Change the vertical range of


the graph, e.g. to 100 m then
redraw

9-20
⑨ Change the plotting time by animation or
move this button to show the longitudinal profile
of river water level (blue).

Click “Delete Path” to delete the selected longitudinal path.

9.3.1 Visualize the profile of flood inundation depth

To visualize the profile of flood inundation depth, one can draw a profile line (e.g. red line
below) as “Shift + Left Draw”.

① Draw a line at the interest


section to display flood
inundation depths by
② Click Set River Path Shift + Left Draw

③ Change the range of


the figure (e.g. from 5
to 10 m) and Redraw

9-21

You might also like