User Manual for Distributed Hydrological Model: 1K-DHM-event
Version 3.40 and 4.10, November 23, 2020
Yasuto TACHIKAWA and Tomohiro TANAKA
Dept. of Civil and Earth Resources Eng., Kyoto University, Kyoto 615-8540, Japantachikawa@hywr.kuciv.kyoto-u.ac.jp, tanaka.tomohiro.7c@kyoto-u.ac.jp

1. Introduction
1K-DHM-event is a distributed hydrologic model based on kinematic wave theory. The
model structure is the same as the 1K-FRM-event. 1K-FRM adopts a surface flow momentum
equation. Adding surface flow, 1K-DHM includes a surface and subsurface flow momentum
equation. From version 2.22, a relation between slope and river channel components are
modified to include a river flow routing to all cells. In the version 1 and 2, the topography
data is supposed to generate from HydroSHED with 30 second resolution (about 1km
resolution). From version 3, any spatial resolution of topography data is accepted and it has an
option to set a spatial distribution of the parameter values from data files. The source program
is coded using C++ language and it works under Microsoft windows environment and theLinux environment. All program source codes are provided from the home page of Hydrology
and Water Resources Research Laboratory at Department of Civil and Earth Resources
Engineering, Kyoto University
http://hywr.kuciv.kyoto-u.ac.jp/products/1K-DHM/1K-DHM.html
To generate topography data for 1K-DHM, two programs are provided:⚫

⚫

Hysroshed2topo: The input data of Hydroshed2topo are DEM and flow direction. The
input data of Hydroshed2topo for the Asian region are developed by using HydroSHED
https://hydrosheds.org/ and provided from 1K-DHM web page. The input and output
spatial resolution is only 30 seconds.
AsciiRaster2topo: a program to process any resolution DEM and flow direction data.
Accepted input data format is the ESRI Ascii raster format. The data source will be 3, 15
and 30 seconds HydroSHED and 1 second digital elevation model and flow direction JFlwDir developed by Prof D. Yamazaki at IIS University of Tokyo, http://hydro.iis.utokyo.ac.jp/~yamadai/JapanDir/index.html.

Forcing data to drive 1K-DHM-event such as precipitation is supposed to be hourly gridded
data for version 3 and 10 minutes gridded data for version 4.
In this document, at first, a method to develop topography data for 1K-DHM-event is
described. Next, a data format of rainfall input is described. Then, by using the developed, an
example of rainfall-runoff simulation using 1K-DHM-event is demonstrated. Finally, several
tools to analyze the simulated data is explained. Figure 1 shows entire structure of thecoordinate system used for 1K-DHM-event rainfall-runoff simulation.

1

Figure 1: Geographic relation of flow routing simulation area and rainfall grid region.
2. Preparation of Topography Data for 1K-DHM-event
2.1 Program to prepare topography data

1) Hydroshed2topo
Hydroshed2topo generate input topography data for 1K-FRM-event, 1K-FRM, 1K-DHMevent and 1K-DHM. The input data of Hydroshed2topo are DEM and flow direction. The
input data of Hydroshed2topo for the Asian region are developed by using HydroSHED andprovided from 1K-DHM web page. The input and output spatial resolution is only 30 seconds.
2) AsciiRaster2topo
AsciiRaster2topo generate input topography data for 1K-FRM-event, 1K-FRM, 1K-DHMevent and 1K-DHM. The input data of AsciiRaster2topo are DEM and flow direction.
Accepted input data format is the ESRI Ascii raster format.
2.2 Input topography data for Hydroshed2topo and AsciiRaster2topo

The topographic data to run 1K-DHM-event are a digital elevation and flow direction datawith ESRI ASCII raster format. The data source will be the DEM and flow direction data of 3,
15 and 30 seconds for all globe in HydroSHED https://hydrosheds.org/. 1 second data inJapan, J-FlwDir developed by Prof D. Yamazaki at IIS University of Tokyo is also available,
http://hydro.iis.u-tokyo.ac.jp/~yamadai/JapanDir/index.html. From these data, ESRI ASCII
raster files for DEM and FlwDir are easily generated by using various software for example
ArcGIS. The two files are input data for AsciiRaster2topo. For AsciiRaster2topo, upstream
2

grid number and drainage area are also input data. These two data is not used for 1K-DHM, souses may commented out these parts not to use the upstream grid number and drainage area as
input data.
Hydroshed2toto and AsciiRaster2topo.cc generate all necessary topographic input files withbinary format to run the 1K-DHM-event version 3 and 4 and additional ESRI ASCII files toview by using GIS software such as ArcGIS. First, you need to specify the study area byediting the parameter data file:⚫
⚫

hydroshed2topo/clipArea.dat, or
asciiRaster2topo/clipArea.dat

This file is a text data file. The study area is determined as a rectangular region by setting
longitude and latitude as shown in Figure 2.
⚫
⚫
⚫
⚫

The first row specifies the number of columns for the study region. The value must be an
integer value.
The second row specifies the number of rows for the study region. The value must be an
integer value.
The third row specifies Longitude (degree) of South West (lower left) corner of the study
area. The value is a real value.
The fourth row specifies Latitude (degree) of South West (lower left) corner of the study
area. The value is a real value.

The longitude (second) of j-th cell center is set as follows, where Δ is a cell size.
longitude = (int)(SWlon*3600) +Δ *j + Δ/2;
latitude = (int)(SWlat*3600) + Δ30*i + Δ/2;

120
60
138
35.5
Figure 2: Setting study area (left) and an example of clipArea.dat (right).
2.3 Run the program

Compile and run to generate topographic information for 1K-DHM-event⚫ Compile hydroshed2topo.cc and run hydroshed2topo.exe, or3⚫

Compile asciiraster2topo.cc and run asciiRaster2topo.exe.

2.4 Output files

All output files used for the 1K-DHM-event are generated in the folder:⚫
⚫

hydroshed2topo/output, or
asciiRaster2topo/output

The binary files for 1K-DHM-event runoff simulation and additional files to view using GIS
software are generated. The binary files include data from the South-West grid and lining toEast, and then, moving to the North in the next line, which means the South line comes first
and then moves to the North. This is a typical GrADS data format. Sample GrADS control
files are attached in asciiRaster2topo to visualize the data. The additional files to view thegenerated topography data has ESRI ASCII raster format, which have data from the SouthWest grid and lining to East, and then, moving to the South in the next line, which means theNorth line comes first and then moves to the South. The files generated are below:⚫

modDem.bin: This is the corrected (pit removed) elevation information of the study area.
The data was written in real 4-byte binary data format.

Figure 3: A sample of modem.bin.
⚫

flowDir.bin: Flow direction information. The direction convention is shown in Figure 3.
The data format is integer 4-bite binary.

Figure 4: A sample of flowDir.bin.
4

8

1

7
6

5

2

32

3

16

4

8

(a) 1K-DHM

64

128

1
4

2

(b) ESRI format

Figure 5: Flow direction specified by the integer value.
⚫

flowAcc.bin: Flow accumulation information. The data format is integer 4-bite binary.

Figure 6: A sample of flowAcc.bin.
⚫

riverNum.bin: Each river basin is numbered starting from 1 and then the number isassigned to each grid cell in which of the basin the cell is belongs to. The data format is
integer 4-bite binary.

Figure 7: A sample of riverNum.bin.
⚫

riverNumList.txt: This is a text file which contains basin information as below:
Column 1: river basin number of the study area,
Column 2: the basin area (acmulated number of grids).
Column 3: column number starting from 1 (starting from West),
Column 4: row number starting from 1 (starting from South),
Column 5: longitude (second),
Column 6: latitude (second),5Column 7: longitude (degree), andColumn 8: latitude (degree)1 5 10 59 497085 129555 138.079 35.9875
2 3 14 59 497205 129555 138.113 35.9875
3 4 16 59 497265 129555 138.129 35.9875
4 4 17 59 497295 129555 138.137 35.9875
5 4 18 59 497325 129555 138.146 35.9875…

Figure 8: An example of riverNumList.txt.

To calculate rainfall-runoff simulation for only some selected basins, keep the lines of theselected basins in the riverNumList.txt and delete other lines from this file.

Additional files are also created under the folder⚫
⚫

hydrosged2topo/output/arcgis, or
asciiRaster2topo/output/arcgis

These files have the ESRI ASCII file format.
⚫
⚫
⚫
⚫
⚫
⚫
⚫
⚫
⚫
⚫
⚫

cutDem.asc: The DEM data for the study region. This is the original data clipped for the
study region.
cutDir.asc: The DIR data for the study region. This is the original data clipped for the
study region.
cutUpa.asc: The upstream drainage area for the study region. This is the original dataclipped for the study region. AasciiRaster2topo only.
cutUpg.asc: The grid number of upstream area for the study region. This is the original
data clipped for the study region. AasciiRaster2topo only.
distance.asc: The distance from the river mouth.
flowAcc.asc: Flow accumulation value information, which corresponds to flowAcc.bin.
flowDir.asc: The Flow Direction data for the study region, which corresponds toflowDir.bin.
modDem.asc: The DEM data for the study region. This is the corrected (pit removed)
elevation information of the study area, which corresponds to moDem.bin.
riverNum.asc: The river basin numbers of the study area, which corresponds toriverNum.bin.
Col.asc: The column number of each grid for the study region. This file is used to obtain
the exact column number overlapping with other data.
Row.asc: The row number of each grid for the study region. This file is used to obtain theexact row number overlapping with other data.
63. Preparation of Forcing Data (Rainfall data)
A spatially distributed rainfall intensity data is given to 1K-DHM-event. The rainfall file isplaced at
1k-dhm-event/input/rain.dat
The name of the file must be “rain.dat” and the file should be placed under “input” folder. An
example of rain.dat is shown in Figure 9. The first line of “rain.dat” is Year, Month, Day,
Hour, Column Number, and Row Number of spatially gridded rainfall data. From the nextline, rainfall intensity values (mm/hr) are stored beginning from the North-West grid andlining to East, then, moving to the South in the next line. Each data is delimited by whitespace characters (SPACE, TAB, or CR).
1979 12 1 1 5 61979 12 1 1 0 5 6

0.1 0.2 0.3 0.4 0.5

0.1 0.2 0.3 0.4 0.5

0.6 0.7 0.8 0.9 1.0

0.6 0.7 0.8 0.9 1.0

1.1 1.2 1.3 1.4 1.5

1.1 1.2 1.3 1.4 1.5

1.6 1.7 1.8 1.9 2.0

1.6 1.7 1.8 1.9 2.0

2.1 2.2 2.3 2.4 2.5

2.1 2.2 2.3 2.4 2.5

2.6 2.7 2.8 2.9 3.0

2.6 2.7 2.8 2.9 3.0…

…

(a) example of version 3 for hourly data(b) example of version 4 for 10minutes data

Figure 9: Part of rain.dat. Left is for 1K-DHM-event version 3 and right is for version 4. For
the left example for version 3, the 1st Row is: Year, Month, Day, Hour, Column Number, Row
Number. For the right example for version 4, the 1st Row is: Year, Month, Day, Hour, Minute,
Column Number, Row Number. From the 2nd to 7th Rows, effective rainfall intensities (5columns and 6 rows) in mm/hr are stored for the left example and mm/10monutes for the rightexample.

If the data period is shorter than the simulation time, the rainfall intensity after the given datatime is assumed to zero.
The geographic structure is shown in Figure 10. The rainfall intensity data represents theintensity of each grid center. The time interval of the rainfall intensity must be hour forversion3 and 10 minutes for version 4. Figure 11 shows the relation between the rainfallrunoff simulation region and rainfall grid region. For runoff simulation, the nearest grid of
rainfall intensity is selected.

7

The grid size of forcing data is set in the parameter setting file for 1K-DHM-event. The gridcenter of longitude (degree) and latitude (degree) of j-th column and i-th row for input data
are set as follows:
longitude = ROF_WLON + j*Delta_x; // set longitudelatitude = ROF_SLAT + j*Delta_y;// set latitude

Topography
regionFigure 10: Structure of coordinate of the rainfall grid system.

Topography region including study
basins. Any cell size is available higher
than version 3.0

Figure 11: Geographic relation of rainfall-runoff simulation area and rainfall grid region.

Rainfall data is also provided in the binary format with each value being 4-byte floating
number. The rainfall data file name is then “rain.bin” and should be placed at
8

1k-dhm-event/input/rain.bin
The binary data should be arranged from south to north against the above text format. Rainfall
data format is switched by changing a parameter “Format of rainfall data” in the “param-dhmevent.dat”.

4. Hydrologic Simulation Using 1K-DHM-event
Figure 11 shows the geographic relation of the rainfall-runoff simulation area and the rainfall
grid region for the example data. The procedures for runoff simulation are as follows:
4.1 Setting data

1)
Topography data setting:
Copy the topographic information files (above“hydroshed2topo/output/” to “1k-dhm-event/topoData/”

mentioned

five

files)

from2) Rainfall data setting:Set the rain data and place rainfall data file at “1k-dhm-event/input/rain.dat”. The file namemust be “rain.dat”, or “1k-dhm-event/input/rain.bin” when data is prepared in the binary
format.

3) Runoff simulation parameter setting:
Edit the runoff simulation parameter file:“1k-dhm-event/param-event-ver310.dat” for version 3 shown in Figure 12.
“1k-dhm-event/param-event-ver400.dat” for version 4 shown in Figure 13.
by using any text editor. Delimiter of each data is white space characters.

9

1.0

DEM resolution as second unit.

120

Number of columns of the study area

60

Number of rows of the study area

138.0

Longitude (degree) of South West corner of the study area

35.5

Latitude (degree) of South West corner of the study area.

1

Format of rainfall data (1: text, 2: 4-byte binary)

5

Number of columns of the input forcing data

6

Number of rows in the input forcing data

0.1875

Input data grid size of x-direction (degree)

0.1875

Input data grid size of y-direction (degree)

137.8

Longitude of the center of the Southwest corner of input data (degree)

35.325Latitude of the center of the Southwest corner of input data (degree)

4

Simulation duration (days)

10

simulation time step (sec)5number of spatial divisions

0.65

0.5 < theta <= 1.0

0.5

Manning’s roughness coefficient for slope (m-s unit)

0.0046

Hydraulic conductivity (m/s)

0.3440Depth of capillary and non-capillary soil layers (m)0.2875Depth of capillary soil layers (m)6.3486

Exponent constant of unsaturated hydraulic conductivity (-)

0.03

Manning’s roughness coefficient for river (m-s unit)0

Grid accumulated number to differentiate slope and river (-). If the value
is zero, river routing is included to all grids. If the value is 10, the gridswith the accumulated number is less than 10 do not include river routing.

15.0

Slope length (m)0.0001

Initial runoff height (mm/hr). Zero and negative values are not arrowed.

Figure 12: An example of param-event-ver310.dat.

10

1.0

DEM resolution as second unit.

120

Number of columns of the study area

60

Number of rows of the study area

138.0

Longitude (degree) of South West corner of the study area

35.5

Latitude (degree) of South West corner of the study area.

1

Format of rainfall data (1: text, 2: 4-byte binary)

10

Rainfall time interval (minutes) ←only version 4

5

Number of columns of the input forcing data

6

Number of rows in the input forcing data

0.1875

Input data grid size of x-direction (degree)

0.1875

Input data grid size of y-direction (degree)

137.8

Longitude of the center of the Southwest corner of input data (degree)

35.325Latitude of the center of the Southwest corner of input data (degree)

4

Simulation duration (days)

10

simulation time step (sec)5number of spatial divisions

0.65

0.5 < theta <= 1.0

0.5

Manning’s roughness coefficient for slope (m-s unit)

0.0046

Hydraulic conductivity (m/s)

0.3440Depth of capillary and non-capillary soil layers (m)0.2875Depth of capillary soil layers (m)6.3486

Exponent constant of unsaturated hydraulic conductivity (-)

0.03

Manning’s roughness coefficient for river (m-s unit)0

Grid accumulated number to differentiate slope and river (-). If thevalue is zero, river routing is included to all grids. If the value is 10, thegrids with the accumulated number is less than 10 do not include river
routing.

15.0

Slope length (m)0.0001

Initial runoff height (mm/hr). Zero and negative values are not arrowed.
Figure 13: An example of param-event-ver400.dat.

The parameter values to set in param-event-ver400.dat are as follows:⚫ The 1st row defines the resolution of topography grid in second init.
⚫ From the 2nd row to 5th row, the parameters of the study region are specified:int Col=120// number of columns for study area.
11

int Row=60
double SWLON=135.0
double SWLAT=34.0// number of rows for study area.
// Longitude (degree) of north west corner of the study area.
// Latitude (degree) of north west corner of the study area.

⚫ From 6th row to 13th row, the parameters of the rainfall data is specified:int ROFdata_type = 1// Format of input rainfall data (1: text, 2: 4-byte binary)
int ROFtime step = 10// Rainfall time step (min). This line is only for version 4.
int ROFnum_col = 5// Number of columns of input rainfall data
int ROFnum_row = 6// Number of rows of input rainfall data
double Delta_x = 0.1875// Input data grid size of x-direction (degree)
double Delta_y = 0.1875// Input data grid size of y-direction (degree)
double ROF_WLON = 135.0// Longitude of the center of the Southwest corner of// Input data (degree)
double ROF_SLAT = 35.0// Latitude of the center of the Southwest corner of// input data (degree)⚫ The 14th row is a parameter to determine the simulation term.
int Ndays = 4// Simulation duration (days)⚫

From 15th row to 17th row, the parameters for the finite difference condition are specified.
Usually, you do not need to change these parameter values.
int Time_Step = 10// Simulation time step (sec)int Nspace = 5// Number of spatial divisions
double Theta = 0.65// weight value 0.5 < theta <= 1.0⚫ From 18th row to 25th row, the parameters for the kinematic wave model are specified.
double Man_slope = 0.5// Manning’s roughness coefficient for slope (m-s)
double Ka = 0.0046// Hydraulic conductivity (m/s)
double Da = 0.3440// Depth of capillary and non-capillary soil layers (m)double Dm = 0.2875// Depth of capillary soil layers (m)double Beta = 6.3486// Exponent constant of unsaturated hydraulic conductivity (-)
double Man_channel = 0.03 // Manning’s roughness coefficient for river (m-s)
int Threshold_basin = 0// Grid accumulated number to differentiate slope and river (-)
double Ls = 500.0// Slope length (m)To read the parameter values Man_slope, Ka, Da, Dm, Beta, Man_channel and initial runoff
height from data files, negative value such as -999 is set. An example of Ka is given in Figure
14. The file format is ESRI Ascii Raster format. The parameter data should be arranged from
North to South and the region should be completely the same as the DEM data. The files must
be placed under “paramData” folder and the names is fixed as below:
Man_slopeKaDaparam_dist_Ns.dat
param_dist_Ka.dat
param_dist_Da.dat
12

Dm
param_dist_Dm.dat
Betaparam_dist_Beta.dat
Man_channel param_dist_Nr.dat
Initial runoff height param_dist_ROFinitial.dat
Grid accumulated number is used to differentiate slope and rive. If the value is zero, river
routing is included to all grids. If the value is 10, the grids with the accumulated number isless than 10 do not include river routing.
⚫ The 26th row is a parameter to determine the initial condition.
double initialROF = 0.0001 // Initial runoff height (mm/hr). Zero and negative values are// not arrowed.
ncols 13
nrows 20
xllcorner 135
yllcorner 34
cellsize 0.000277778
NODATA_value -9999
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05…
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05
0.07 0.07 0.07 0.07 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05 0.05
Figure 14: An example of param_dist_Ka.dat.

13

4.2 Rainfall-runoff simulation

Move to the folder “/project/1k-dhm-event” and run“1k-dhm-event-ver???.exe”
All runoff simulation results are created under the folder:“1k-dhm-event/output”
The files created are below:⚫ discharge10minMean.bin: The file contains the average 10 minutes flow (m3/sec).
⚫ discharge10minSnapshot.bin: The file contains snapshot of 10 minutes flow (m3/sec).
⚫ dischargeHourlyMean.bin: The file contains the hourly mean flow (m3/sec).
The data are stored in GRADS binary data format and can be visualized using GRADS(http://www.iges.org /grads/). All data arranges from west to east at the South row, then North
row. GrADS control file:⚫
⚫

flowAnalysisGradsDaily.ctl
flowAnalysisGradsHourly.ctl

are attached. To extract hydrographs from the output files, the below program is attached in“output” folder.
⚫
⚫
⚫
⚫

extract10minDischarge-ver???.cc: extracts 10 minutes mean and snapshot time series
ascii data from the above binary data.
extractHourlyMeanDischarge-ver???.cc: extracts hourly mean time series ascii data fromthe above binary data.
makeppm10minMeanDischarge-ver???.cc: generate time series of spatial distribution of
10 minutes mean discharge with PPM data format from the above binary data.
makeppmHourlyMeanDischarge-ver???.cc: generate time series of spatial distribution ofhourly mean discharge with PPM data format from the above binary data.

4.3 Additional settings

1) Dam model setting
Default model setting is no dam model. If you need to include dam operation in 1K-DHM, thefollowing dam operation is available.
Standard operation of Japanese dam reservoirs is below:• Dam inflow I is released when I is smaller than a pre-determined flood discharge Qf ;• Flood control starts and release Qf when inflow discharge I exceeds Qf ;• If dam storage volume S (t ) reaches the effective total storage SSL , all inflow I isreleased to avoid overtopping, where S (t ) = S F (t ) + S S − S P ( S F (t ) is storage volume14

stored until time t , S S is initial dam storage volume, and S P is the volume of preliminary
release);According to the above rules, outflow discharge at time t , Q (t ) is summarized as follows;
I (t ) (I (t )  Qf )Q(t ) =  Qf (I (t )  Q f and S (t )  S SL )
 I (t ) (I (t )  Q and S (t )  S )fSLWhen dam storage capacity is not considered, outflow discharge at time t , Q (t ) issummarized as follows; I (t ) (I (t )  Qf )Q(t ) = 
 Qf (I (t )  Q f )
8
0

2

70

67

0.0e0 0.0e0 0.0e0 0.0e0 Seta

1

1

60

59

8.4e2 0.0e0 6.0e6 2.0e7 Amagase

2

1

82

44

1.3e3 0.0e0 1.38e7 4.92e7 Takayama

3

1

95

26

4.5e2 0.0e0 1.54e7 2.38e7 Shorenji

4

1

81

20

3.0e2 0.0e0 6.55e6 1.43e7 Murou

5

1

78

38

1.0e2 0.0e0 9.0e6 1.54e7 Nunome

6

1

23

91

1.5e2 0.0e0 1.6e7 5.8e7 Hiyoshi

71

99 15:27An example
3.0e2 of
0.0e0
1.84e7 Hinachi
Figurea dam9.4e6
configuration
file.

Dam operation type and associated parameters are defined in a dam configuration file:- ./input/dam.dat
Detail of the file is as follow:⚫ 1st line:Number of dams
⚫ From 2nd line: Setting of each dam reservoir• 1st column: ID of dam• 2nd column: Type of dam operation (0: Read dam outflow data, 1: Standard operationof Japanese dam reservoirs, 2: When dam storage capacity is not considered)• 3rd and 4th columns: Row and column number of dam cell• 5th column: Dam inflow when dam operation starts• 6th column: Volume of preliminary release [m3]• 7th column: Average dam storage [m3]• 8th column: Effective dam storage [m3]15•

9th column: Name of dam

When reading dam outflow data, please set a time series of dam release in the file named:- ./input/ realDamOutflow/Real[Dam Name].dat[Dam Name] must be the same as the 9th column of a dam configuration file. A time series
should be stated day, hour, and outflow [m3/s] at each line.
When you need new type of dam operation, please add dam setting/operation in the following
functions of the source code in C++:⚫ setDamGrid: setting the grid of dam location,⚫ calculateDamOutflow: dam operation,⚫ setDamInitialState: setting of initial state variables, and⚫ setDamParameter: setting of parameter values
2
1

38

77

12000 Hodu

2

92

47

1500

IwakuraFigure 16: An example of a reservoir configuration file.
These functions should be set by users depending on a study catchment.
2) Flood inundation model setting
Default model setting is no flood inundation model. If you need to include flood inundation in
1K-DHM, a linear reservoir model is available. A reservoir configuration file:-./input/reservoir.dat

should include the following information:⚫ 1st line: Number of reservoirs⚫ From 2nd line: Setting of each dam reservoir• 1st column: ID of dam• 2rd and 3th columns: Row and column number of dam cell• 4th column: A parameter of a linear reservoir model• 5th column: Name of dam

4.4 Compile
Linux environment: The executable is created by using the GNU g++ compiler as following
command16

% g++ -o 1k-dhm-event-ver222 1k-dhm-event-ver222.cc cellfunc-event.cc roffuncevent.cc
For Intel C++ compiler of Linux version% icc -o 1k-dhm-event-ver222 1k-dhm-event-ver222.cc cellfunc-event.cc roffunc-event.cc

MS Windows environment: Microsoft Visual Studio 2008 or 2010 with C++ compiler isuseful. You can download a free version of Visual C++ Express Edition 2008 or 2010 fromMicrosoft web site.The solution file 1k-dhm-event.sln should be created according to theMicrosoft Visual Studio to use Visual Studio environment. You can also use the commandprompt window of the Microsoft Visual Studio. In this case, after opening the commandprompt window, you can compile the program as:% cl 1k-dhm-event-ver222.cc cellfunc-event.cc roffunc-event.cc

For Intel C++ compiler of windows version% icl 1k-dhm-event-ver222.cc cellfunc-event.cc roffunc-event.cc

5. Output Data Analysis
5.1 Visualization of time and space change of discharge using GRADSGRADS is a free visualization software mainly used by meteorologists. The software works
on Windows and Linux/Unix environment. GRADS is available from http://www.iges.org/grads/.
You can use an example of GRADS control files “flowAnalysisGradsDayly.ctl” and“flowAnalysisGradsHourly.ctl” in “/project/misc/gradsControlFiles”. Please see the detail
information at the web page. Figure 17 is a spatial distribution of discharge at the study region.

Figure 17: Spatial view of simulated discharge using GrADS.

17

5.2 Visualization of time and space change of discharge using makeImage.exe andIrfanView
If you do not have GrADS, you can generate PPM format image files and see it using a free
image viewer IrfanView. The procedure to see the animation of time and space change ofdischarge is as follows:
1) Run the image generation program makeppm.exe, which is included in 1K-DHM output
folder.
⚫ makeppmHourlyMeanDischarge-ver???.exe reads the GrADS format output
hourly discharge data dischargeHourly.bin generate time series of spatial
distribution of hourly mean discharge with PPM data format from the above binarydata.
⚫ makeppm10minMeanDischarge-ver???.exe generate time series of spatial
distribution of 10 minutes mean discharge with PPM data format from the above
binary data.
2) Generate PPM format image files under image folder. To run the program,
1-1) Open the folder “1k-dhm-event”
1-2) Click “makeppm.exe”
1-3) Image files are gerenated under “1k-dhm-event/image/”.
3) Install IrfanView. This is a very popular free image viewer. Download the file and follw
the instruction. The viewer is installed and you will find the icon on your MS-Windows
desktop.
4) Click the IrfanView icon and select [File]→[Slideshow]. Then, set the location of PPT
image file. You can enjoy the animation.
5) Another method to view the animation is to select [FIle]→[Open], select the image folder
and click the first image. Then, select [View]→[Start/Stop automatic viewing]. You canselect [View]→[Display option (window mode)] to enlarge the image.
5.3 Time series of discharge data at specific point
The procedures to extract the time series of discharge data at the specific point is as follows:
1) Run the time series extraction program extract???.exe. This program reads the GRADS
format output data and generates text format time series data under /output.
⚫
⚫

extract10minDischarge-ver???.exe: extracts 10 minutes mean and snapshot timeseries ascii data from the above binary data.
extractHourlyMeanDischarge-ver???.exe: extracts hourly mean time series ascii
data from the above binary data.

2) To run the program,
1-1) Open the folder “1k-dhm-event”.
1-2) Click “extract10minDischarge-ver???.exe”.
1-3) You will be asked to input the column and row number to extract the data. To
determine the column and row number, it is useful to see the accumulated
catchment data “hydroshed2topo/output/flowAcc.asc to examine the discarge withlarge catchment size. The row and column number begins from the South Westcorner starting from 1.

18

1-4)

The extracted data is genereated under “1k-dhm-event\output\Col-Rowdischarge.dat”. The first column of the data is time count (hour) and thesecondcolumn is discharge (m3/sec).

Set image files folder

Set slideshow time interval

Slideshow start!

Figure 18: IrfanView Slideshow setting.
1

0.0882515

20.65377732.2653

4

7.359365

14.48676

20.414

7

25.6387832.4114943.863810

55.3801…

Figure 19: An example of time series discharge data extracted by using
extractHourlyMeanDischarge-ver???.exe3) To draw the hydrograph, you can use Excel or GnuPlot (http://www.gnuplot.info/).
19