wflow
wflow
J. Schellekens
[email protected] or [email protected]
1 Introduction 5
3 Model description 15
3.1 Processing of meteorological forcing data . . . . . . . . . . . . . . . . . . . 15
3.2 The rainfall interception model . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2.1 The analytical (Gash) model . . . . . . . . . . . . . . . . . . . . . . . 15
3.3 The soil model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4 Kinematic wave and River Width . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5 Updating using measured data . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.6 Setting-up a new model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.6.2 Basic maps needed . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.6.3 Model parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3
4 Contents
References 29
1
—
I NTRODUCTION
The wFlow hydrological model is a distributed hydrological model that required little
calibration and maximises the used of available spatial data. Soil depth, for example, is
estimated from the DEM using a topographic wetness index (ref to CSIRO report). The
model is derived from the CQFLOW model [Köhler et al., 2006]) that has been applied in
various countries, most notably in Central America.
The model is programmed in a dynamic GIS language called PCRaster [van Deursen,
1995]. As such, the structure of the model is transparent (and can be changed by other
modellers easily) and the system allows for rapid development. The PCRaster version
used here is a beta version that comes with bindings to the Python language. In order to
run the model both PCRaster and Python 2.5 are needed.
Some of the key features of the model are:
1. Interception is modelled using the Gash model for rainfall interception that works
with daily time steps. When running the model with sub-daily timesteps an adapted
version of the Gash model will be used. *
2. The model uses potential evapotranspiration and reduces this based on soil water
content and vegetation type
3. The soil is represented using a simple bucket model (comparable to the TOPOG SBM
model) that assumes an exponential decay of Ksat with depth. Lateral subsurface
flow is modelled using the Darcy equation. Soil depth is specified for different
land-use type and subsequently scaled using the Topographic Wetness Index.
6. The model can run with any timestep. However, the model uses a simple explicit
solution for most processes. As such, changing the timestep may call for recalibra-
tion of the model.
* This is a work in progress, currently the interception model is disabled when using sub-daily timesteps
5
6 CHAPTER 1. INTRODUCTION
7. The model can update the kinematic wave reservoir based on measured discharge
at the outlet. This can be usefull for operational applications of the model in e.g.
forecasting systems.
8. Optional snow pack modelling using degree days. This is largely untested.
The actual data requirements depend on the application of the model. The following
list summarizes the data requirements:
• Static data
– Precipitation
– Potential evapotranspiration
– Temperature (optional, only needed for snow pack modelling)
– Soil Depth
– etc... (see Section 2.3)
The module can be linked to the Delft-FEWS system Werner et al. [2004] using the
general adapter. The model itself comes with the necessary reading/writing routines for
the Delft-FEWS pi XML files. An example of the link to Delft-FEWS is given in Appendix
XX.
2
—
U SING THE MODEL
A case contains all the data needed to run the model. A case is a directory holding all the
data needed to run the model. Multiple cases may exists next to eachother in seperate
directories. The model will only work with one case at the same time. If no case is
specified when starting the model a default case (XXX) is assumed. Within a case the
model output (the results) are stored in a separate directory, the run. If you want to
save the results and not overwrite the results from a previous run a new run Id must be
specified. Within a case the following files and subdirectories should be present:
inmaps Directory holding the dynamic input data. Maps of Precipitation, potential
evapotranspiration and (optionally) temperature
instate Directory holding the input initial conditions. Can be used to hotstart the model.
Alternatively the model can start with default initial conditions but in that case a
long spinup procedure may be needed.
intbl Directory holding the lookup tables. These hold the model parameters specified
per landuse/soiltype class.
intss Directory holding the scalar input timeseries. Sclara input data is onlu assumed if
the ScalarInput entry in the ini file is set to 1 (True).
maps processing This directory usually holds the raw maps that are used by the wflow prep
script. This directory is not used by the actual model.
outstate Directory holding the stat variable at the end of the run. These can be copied
back to the instate directory to have the model start from these conditions. These
are also saves in the runId/outstate directory
run default The default name for a run. if no runId is given all output data is saved in
this directory.
staticmaps Static maps (DEM, etc) as prepared by the wflow prep script.
7
8 CHAPTER 2. USING THE MODEL
A script (wflow prep.py) is available that can perform most of the input data preperation
automatically. For the script to work the following data needs to be present:
• a land use map in arc/ascii or pcraster format. If the resulution is different from the
DEM the script will resample this map to match the DEM (or the DEM cutout).
• a .col file indicating the locations of the gauges. The first gauge should be the catch-
ment outlet.
Once the script has finished sucessfully the following maps should have been created:
• wflow landuse.map
• wflow ssubcatch.map
• wflow subcatch.map
• wflow gauges.map
• wflow catchment.map
• wflow river.map
• wflow streamorder.map
• wflow dem.map
• wflow ldd.map
• wflow demforldd.map
• master scale.map
• master cutout.map
The maps are created in the data processing directory. To use the maps in the model
copy them to the staticmaps directory of the case you have created.
Beta.tbl Beta parameter used in the kinematic wave function. Should be set to 0.6 (will
ebe removed later)
EoverR.tbl Gash interception model parameter. Ratio of average wet canopy evapora-
tion rate over average precipitation rate.
M.tbl Soil parameter determining the decrease of saturated conductivity with depth.
Usually between 20 and 2000 (if the soil depth is in mm)
N.tbl Manning N parameter for the Kinematic wave function. Higher values dampen
the discharge peak.
To run the model from Delft-FEWS the following actions need to be performed:
• wflow.py needs to be run with the -F option wher the argument refers to a Delft-
FEWS runinfo.xml file
<executeActivities>
<executeActivity>
<description>Run wflow</description>
<command>
<executable>bin-wflow\wflow.exe</executable>
10 CHAPTER 2. USING THE MODEL
</command>
<arguments>
<argument>-C</argument>
<argument>rhine</argument>
<argument>-F</argument>
<argument>rhine/inmaps/runinfo.xml</argument>
</arguments>
<timeOut>7200000</timeOut>
</executeActivity>
<executeActivity>
<description>Run wflow post</description>
<command>
<executable>bin-wflow\wflow_adapt.exe</executable>
</command>
<arguments>
<argument>-M</argument>
<argument>Post</argument>
<argument>-s</argument>
<argument>rhine/instate/state.xml </argument>
<argument>-o</argument>
<argument>rhine/instate/outstate.xml</argument>
<argument>-r</argument>
<argument>rhine/inmaps/runinfo.xml</argument>
<argument>-w</argument>
<argument>./</argument>
<argument>-C</argument>
<argument>rhine</argument>
</arguments>
<timeOut>1200000</timeOut>
</executeActivity>
</executeActivities>
-F: if set wflow is expected to be run by FEWS. It will determine the timesteps from the
runinfo.xml file and save the output initial conditions to an alternate location
-N: No lateral flow, use runoff response function to generate fast runoff
-c: name of wflow the configuration file (default: wflow.ini). At the moment this file only
determines which mapstacks ar written to disk for each timestep. By default only
the Runoff in m3 /s is written
-S: Determine extra statistics and write at end of run [NOT IMPLEMENTED]
-W: If set, this flag indicates that an ldd is created for the water level for each timesteps.
If not the water is assumed to flow according to the DEM. Wflow will run a lot
slower with this option. Most of the time (shallow soil, steep topography) you do
not need this option.
-U: The argument to this option should be a .tss file with measured discharge in [m3 /s]
which the progam will use to update the internal state to match the measured flow
The wflow.ini file holds a number of settings that determine how the model is operated.
The files consists of sections that hold entries. A section is define using a keyword in
square brackets (e.g. [model]). Variable can be set in each section using a keyword =
value combination (e.g. ScalarInput = 1). The default settings for the ini file are
give in the subsections below.
2.6.1 [ MODEL ]
RiverWidth=10 Sets the width (in m) for all cells that are regarded as part of the river.
ModelSnow=0 Set to 1 to model snow using a simple degree day model (in that case
temperature data is needed)
ScalarInput=0 If set to 0 input maps are needed for each timestep in the inpumaps di-
rectory., If set to 1 the model will use input timeseries from the inputtss directory
and interpolate these to maps at run-time.
12 CHAPTER 2. USING THE MODEL
2.6.2 [ MISC ]
mapSaveInterval=365 Save model state maps at this interval.
2.6.3 [ LAYOUT ]
sizeinmetres = 0 If set to zero the cell-size is given in lat/long (the default), otherwise
the size is assumed to be in metres.
2.6.4 [ OUTPUTMAPS ]
Outputmaps to save per timestep. Valid options for the keys are:
The values on the right side of the equal sign can be choosen freely.
Example content:
Runoff=run
SaturationDeficit=def
self.FirstZoneFlux=fzf
self.FirstZoneDepth=fir
2.6. WFLOW.INI FILE 13
2.6.5 [ STATVARIABLES ]
Variables to determine basic statistics for (and save to disk at the and of the run). Note
that the statistics are only calculated if the -S command-line option is given. THIS DOES
NOT WORK YET. NEED TO FIND OUT HOW TO DEFINE VARIABLES WITH EVAL!
Example content:
self.FirstZoneDepth=fir
14 CHAPTER 2. USING THE MODEL
3
—
M ODEL DESCRIPTION
and with the vegetation parameters S, p and pt as defined previously. The model
uses a series of expressions to calculate the interception loss during different phases of
Table 3.1: Formulation of the components of interception loss according to Gash [1979]
Component of interception loss Formulation
For m small storms (Pg < P0 g ) (1 − p − p t ) ∑ m
j=1 Pg,j
Wetting up the canopy in n large storms (Pg ≥ P0 g ) n(1 − p − pt ) P0 g − nS
Evaporation from saturated canopy during rainfall E/R ∑nj=1 ( Pg,j − P0 g )
Evaporation after rainfall ceases for n large storms nS
Evaporation from trunks in q storms that fill the trunk qSt
storage
m+n−q
Evaporation from trunks in (m + n − q) storms that do p t ∑ j =1 Pg,j
not fill the trunk storage
15
16 CHAPTER 3. MODEL DESCRIPTION
a storm (Table 3.1). An analytical integration of the total evaporation and rainfall under
saturated canopy conditions is then done for each storm to determine average values of
Ew and R. The total evaporation from the canopy (i.e. the total interception loss Ei ) is
calculated as the sum of the components listed in Table 3.1. Interception losses from the
stems are calculated for days with P ≥ St /pt [Gash, 1979]. Because pt and St are small in
the present case, (Section ??), evaporation from the stems was neglected.
In applying the analytical model, saturated conditions are assumed to occur when
the hourly rainfall exceeds a certain threshold. Often a threshold of 0.5 mm hr −1 is used
[Gash, 1979, Gash et al., 1980, Lloyd et al., 1988]. R is calculated for all hours when the
rainfall exceeds the threshold to give an estimate of the mean rainfall rate onto a saturated
canopy. Ew is then calculated using Eq. ?? and Eq. ?? (as in the Rutter model) the same
hours.
Gash [1979] has shown that in a regression of interception loss on rainfall (on a storm
basis) the regression coefficient should equal Ew /R. Assuming that neither Ew nor R vary
considerably in time, Ew can be estimated in this way from R in the absence of above-
canopy climatic observations [Rowe, 1983, Bruijnzeel and Wiersum, 1987, Dykes, 1997].
Values of Ew derived in this way generally tend to be (much) higher than those calculated
with Eq. ?? and Eq. ?? [Gash et al., 1980, Bruijnzeel and Wiersum, 1987, Waterloo et al.,
1999].
where θs and θr are the saturated and residual soil water contents, respectively. The
unsaturated store (U) is subdivided into storage (Us ) and deficit (Ud ) which are again
expressed in units of depth:
Ud = (θs − θr )zi − U (3.3)
and:
Us = U − Ud (3.4)
The saturation deficit (Sd ) for the soil profile as a whole is defined as:
Sd = ( θ s − θr ) z t − S (3.5)
All infiltrating rainfall enters the U store first. The transfer of water from the U store to
the S store (st) is controlled by the saturated hydraulic conductivity Ksat at depth zi and
3.3. THE SOIL MODEL 17
Kinematic wave
Free Surface
water
Free Surface
water
Infiltration
Exfiltration
Infiltration
Exfiltration
Unsaturated
Store
Unsaturated
Store
Exchange based
accuflux limited by on Ksat at water
Saturated Ksat horizontal table
Store
Saturated
Store
where:
K0 saturated conductivity at the soil surface [m d−1 ]
f scaling parameter [m−1 ]
θ s − θr
f = (3.8)
M
18 CHAPTER 3. MODEL DESCRIPTION
0
−200
−400
−Zi
0 20 40 60 80 100
Ks
Figure 3.2: Decay of conductivity with depth and the effect of the parameter M
where:
β element slope angle [deg.]
sf calculated subsurface flow [m2 d−1 ]
Sd saturation deficit ((θs − θr )zt − S) [m]
Within the wflow model code the TOPOG SBM model is implemented as follows:
1. Transpiration is first taken from the U store. If the U store cannot satisfy the demand
the S store is used if the pseudo waterlevel zi is not below the rootingdepth
1 # Step 1 try from unsaturated store...
2 # First decrease the amount of available water from the unsaturated
3 # zone according to the rooting depth and the depth of the water table
4
5 AvailCap = ifthenelse(self.zi < self.RootingDepth, self.zi/self.RootingDepth, self.RootingDepth/self.zi)
6 MaxExtr = AvailCap * self.UStoreDepth*(1-self.thetaR)
7 ActEvapUStore = ifthenelse ( MaxExtr < PotTrans, MaxExtr, PotTrans)
8 self.UStoreDepth = self.UStoreDepth - ActEvapUStore
9 RestPotEvap = PotTrans - ActEvapUStore
10
11 # Step 2 do rest from saturated zone, use rootingDepth as a limiting factor
12 ActEvapSat = min( ifthenelse(self.zi > self.RootingDepth, 0.0, self.FirstZoneDepth*(1-self.thetaR)),
RestPotEvap)
13 self.FirstZoneDepth = self.FirstZoneDepth - ActEvapSat
14 ActEvap = ActEvapSat + ActEvapUStore
2. The capacity of the U store is determine by subtracting the saturated depth and the
unsaturated depth from the total soil depth.
3. Precipitation is added to unsaturated store. Any surplus is fed into the fast runoff
reservoir, a kinematic wave
4. Water is transferred from the U store by first determining the Ksat at the current
depth of the water table and next multiplying this with the ratio of the depth of the
unsaturated zone and the saturation deficit
1 ##########################################################################
2 # Transfer of water from unsaturated to saturated store...################
3 ##########################################################################
4 self.zi = self.FirstZoneCapacity - self.FirstZoneDepth
5 #/(thetaS -thetaR); # Determine actual water depth
6 Ksat = self.FirstZoneKsatVer * exp(-self.f * self.zi)
7
8 # Determine saturation deficit
9 SaturationDeficit = self.FirstZoneCapacity - self.FirstZoneDepth
10
11 # now the actual tranfer to the saturated store..
12 Transfer = min(self.UStoreDepth*(1-self.thetaR),ifthenelse (SaturationDeficit <= 0.00001, 0.0, Ksat * self
.UStoreDepth/(SaturationDeficit+1)))
5. Optional leakge out of the catchment is subtracted from the saturated store
6. Water in the saturated store is transferred laterally along the DEM using the follow-
ing steps:
(a) a maximum flux for each cell is determined by determining the Ksat over the
saturated part and the available water in each cell
(b) water is routed downslope (using the PCRaster accucapacityflux operator) by
multiplying the Ksat by the slope and limiting the flux the the maximum de-
termined in the previous step
(c) the program can either use the DEM to route the water of (more appropiate in
flat areas) the actual slope of the water table. The latter option slows down the
program considerably
20 CHAPTER 3. MODEL DESCRIPTION
7. surplus water in cells as a result of the previous step is added to the kinematic wave
reservoir
If a file (in .tss format) with measured discharge is specified using the -U command-
line option the model will try to update (match) the flow at the outlet to the measured
discharge. The following steps are taken:
• the difference at the outlet between measured and simulated Q (in mm) is deter-
mined
• the ratio of measured Q divided by simulated Q at the outlet is used to multiply the
entire kinematic wave store with
Currently, the system can only update for one location, the outlet.
3.6. SETTING-UP A NEW MODEL 21
3.6.1 I NTRODUCTION
3.6.2 B ASIC MAPS NEEDED
All maps should have their cellsize in degrees. The model presently uses an equation to
convert this to metres.
You will need to prepare the following maps. The wflow prep.py can be used as a
starting point fro a script to create the maps.
wflow riverlength.map River length per gridcell. if the maps is not present wflow will
caculate it using: downstreamdist(ldd)
wflow ldd.map
wflow ssubcatch.map
wflow subcatch.map
wflow gauges.map
wflow landuse.map
wflow streamorder.map
wflow catchment.map
wflow river.map
wflow dem.map
4.1 I NTRODUCTION
4.2 PARAMETERS
Once the depth of the soil has been set for the different land-use types the M parameters
is most probably the most important variable in calibratin the model. The decay of the
conductivity with depth controls: baseflow resession - parth of the stormflow curve.
The N parameter controls the shape of the hydrograph (the peak parts).
CCCCCCCCCCC
23
24 CHAPTER 4. CALIBRATING THE MODEL
4.2. PARAMETERS 25
26 CHAPTER 4. CALIBRATING THE MODEL
5
—
D ESCRIPTION OF THE test run EXAMPLE
27
28 CHAPTER 5. DESCRIPTION OF THE TEST RUN EXAMPLE
R EFERENCES
29
30 References
Micha Werner, Marc van Dijk, and Jaap Schellekens. Delft-fews: an open shell flood
forecasting system. In Phoon Liong and Babovic, editors, Proceedings of the 6th Interna-
tional Conference on Hydroinformatics, pages 1205–1212, 2004.