Warning
The documentation is incomplete
An experimental implementation of the gr4 model. It is based on the hourly (gr4h) version
[PM]
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
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
- -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. The runinfo.xml file should be located in the inmaps directory of the case. Also set fewsrun=1 in the .ini file!
-h: print usage information
-l: loglevel (most be one of DEBUG, WARNING, ERROR)
$Author$ $Id$ $Rev$
Bases: pcraster.framework.dynamicPCRasterBase.DynamicModel
The user defined model class. This is your work!
Required
| Variables: |
|
|---|
Initial part of the gr4 model, executed only once. Reads all static model information (parameters) and sets-up the variables used in modelling.
| Variables: |
|
|---|
Parameters
| Variables: |
|
|---|
Required
This function is required. Read initial state maps (they are output of a previous call to suspend()). The implementation showns her is the most basic setup needed.
returns a list of state variables that are essential to the model. This list is essential for the resume and suspend functions to work.
This function is specific for each model and must be present.
| Variables: |
|
|---|
Todo
add routing state vars
Optional
Supplies the current time in seconds after the start of the run This function is optional. If it is not set the framework assumes the model runs with daily timesteps.
Ouput:
- time in seconds since the start of the model run
Required
Suspends the model to disk. All variables needed to restart the model are saved to disk as pcraster maps. Use resume() to re-read them
This function is required.
Initialize the UH1 unit hydrograph
Initialize the UH2 unit hydrograph
Input:
- X4
- D
Returns:
- UH2, SH2
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.
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
define tanh for pcraster objects