The wflow_gr4 model

Warning

The documentation is incomplete

Introduction

An experimental implementation of the gr4 model. It is based on the hourly (gr4h) version

Dependencies

[PM]

Configuration

The model needs a number of settings in the ini file. The default name for the ini file is wflow_gr4.ini.

See below for an example:

[model]

Tslice=1
# Maximum upstream distance to update the flow in metres


[gr4]
dt = 1
B = 0.9
D = 1.25
X4 = 32.83
# X1,X2 and X3 are given as .tbl files or maps

[layout]
# if set to zero the cell-size is given in lat/long (the default)
sizeinmetres = 1

[outputmaps]
# Add maps here

# List all timeseries in tss format to save in this section. Timeseries are
# produced as averages per subcatchment. The discharge (run) timeseries
# is always saved (as samples at the gauge location)s.
[outputtss]
self.S_X1=S_X1
self.R_X3=R_X3
self.Pr=Pr
self.Q=Q

wflow_gr4 module documentation

Definition of the wflow_gr4 model.

Usage: wflow_gr4 [-l loglevel][-c configfile][-f][-h] -C case -R Runid -

-C: set the name of the case (directory) to run

-R: set the name runId within the current case

-c name of the config file (in the case directory)

-f: Force overwrite of existing results

-h: print usage information

-l: loglevel (most be one of DEBUG, WARNING, ERROR)

$Author: schelle $ $Id: wflow_gr4.py 923 2014-03-13 13:48:37Z schelle $ $Rev: 923 $

NOTES

  • The max length of the arrays is determined by the X4 parameter (int(X4))

  • The X4 parameter is always uniform over that catchment. Howvere, the state of the UH is determined per grid cell.

wflow_gr4.initUH1(X4, D)

Initialize the UH1 unit hydrograph

Input:
  • X4

  • D

Returns:
  • UH1, SH1

wflow_gr4.initUH2(X4, D)

Initialize the UH2 unit hydrograph

Input:

  • X4

  • D

Returns:

  • UH2, SH2

wflow_gr4.main(argv=None)

Optional

Perform command line execution of the model. This example uses the getopt module to parse the command line options.

The user can set the caseName, the runDir, the timestep and the configfile.

wflow_gr4.mk_qres(N)

Returns an array (or ayyar of maps) to store the delayed flow in

Input:

  • N nr op steps

Ouput:

  • nr of steps elemenst initialized with zeros’s

wflow_gr4.pcr_tanh(x)

define tanh for pcraster objects

wflow_gr4.usage(*args)