Index: doc/_build/doctrees/environment.pickle =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/framework.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/index.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/testrunner_wflowhbv.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/wf_DynamicFramework.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/wflow_adapt.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/wflow_building.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/wflow_delwaq.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/wflow_floodmap.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/wflow_gr4.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/wflow_hbv.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/wflow_lib.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/wflow_routing.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/wflow_sbm.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/doctrees/wflow_wave.doctree =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 Binary files differ Index: doc/_build/html/.buildinfo =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 --- doc/_build/html/.buildinfo (.../.buildinfo) (revision 22042fca85bb7d8aff51fa64f016c617050529e2) +++ doc/_build/html/.buildinfo (.../.buildinfo) (revision 215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89) @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 5bc3a2d1560f154c993a87ad62d3b99c +config: e70edcfb0cf6f90cb92002e39e3f9f25 tags: 645f666f9bcd5a90fca523b33c5a78b7 Index: doc/_build/html/calib_report.html =================================================================== diff -u -r22042fca85bb7d8aff51fa64f016c617050529e2 -r215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89 --- doc/_build/html/calib_report.html (.../calib_report.html) (revision 22042fca85bb7d8aff51fa64f016c617050529e2) +++ doc/_build/html/calib_report.html (.../calib_report.html) (revision 215f841de7a8cf2a6ad1b2f1ccfd54e26a860b89) @@ -6,15 +6,15 @@
-Example of how to use the framework to control the wflow_* models +from other software, in this case a python script.
+In this example case the controlling piece of software (this script) +provides the forcing data using the API. It also interrogates the model +to get results and display them on screen.
+Each wflow_* model should provide a def supplyVariableNamesAndRoles function +that returns a list of variables and their roles. This function can than +be used by the controlling program to interrogate the model.
+Some important things to consider:
+"""
Controlling the model via the API
---------------------------------
@@ -307,7 +327,7 @@
This is a replacement for the standard pcraster/python DynamicFramwork class.It provides extra functionality to simplify linking the models build in the framwork +with other models. The provided functionality allows external programs to control +and interrogate the model.
+Compared to the original pcraster class the usermodel needs to be extended with +the stateVariables() method which lists the state variables. Other items to be +exchanged most be listed in the API section of the .ini file
+In addition, the following methods must also be called at startup:
++++
+- createRunId()
+
$Author$ +$Id$ +$Rev$
+Create runId dir and copy table files to it +Also changes the working dir to the case/runid directory
+Reads .ini file and returns a config object.
+Sets up the logging system assuming we are in the runId directory
+First check if a prepared maps of the same name is present +in the staticmaps directory. next try to +read a tbl file to match a landuse, catchment and soil map. Returns +the default value if the tbl file is not found.
+Todo
+Add checking for missing values
Runs the dynamic model for all timesteps
+Resumes the state variable of the previous timestep in memory +it uses the wf_supplyVariableNamesAndRoles() function to find them. +The variables are inserted into the model object
+Save the state variable of the current timestep in memory +it uses the wf_supplyVariableNamesAndRoles() function to find them. +The variables are inserted into the model object +This function is normally called as part of the run. Normally there is +no need to call it directly.
+multiply a parameter map with a single scalar +value. Current settings for dimensions are assumed.
+This method must be called after the runinitial() method
+| Returns: | 1 if the map was present, 0 if nothing was done | +
|---|
multiply a parameter map with a single scalar +value for area with id area only. Current settings for dimensions are assumed.
+This method must be called after the runinitial() method
+| Returns: | 1 if the map was present, 0 if nothing was done | +
|---|
Adjusted version of readmapNew. the style variable is used to indicated +how the data is read:
+1 - default: reads pcrmaps
+2 - memory: assumes the map is made available (in memory) using
+the in-memory interface
+Read a climatology map. The current date/time is onverted to: +1: a month and the file fro the current month is returend +2: days of year and the file for the current day is implmented +3: hour of day and the file for the current hours is returned
+| Parameters: |
|
+
|---|---|
| Returns: | a map + |
+
Resumes the state variables from disk as .map files (or arrays of maps files using +a _? postfix)
+Print .ini defined output csv/tss timeseries per timestep
+Save the maps defined in the ini file for the dynamic section
+Todo
+Save maps to be used in memory at startup and do not call the ini file each time
+Saves the maps defined in the summary section to disk +[summary] # Single values or end values +[summary_sum] # accumulative maps over the model run +[summary_avg] # average of maps over the model run +[summary_max] # max of maps over the model run +[summary_min] # min of maps over the model run
+set a parameter map with values from a python list or a single scalar +value. In case a single value is specified the value will be distributed +uniformly over the map. Current settings for dimensions are assumed.
+This method must be called _after_ the runinitial() method
+mapname - string with name of map
+scalar
+| Returns: | 1 if the map was present, 0 if nothing was done | +
|---|
set single value in a map on xcor, ycor (0 based). All other values in the +map remain the same.
+| Returns: | 1 if the map was present, 0 if nothing was done | +
|---|
set single value in an ldd on xcor, ycor (0 based). All other values in the +map remain the same. Calls lddrepair to ensure the ldd is sound
+mapname of tipy ldd - string with name of map
+xcor - xcor to set the value in
+ycor - ycor to set the value in
+e.g. use 5 for setting a pit
+| Returns: | 1 if the map was present, 0 if nothing was done | +
|---|
set single value in a map on row, col (0 based). All other values in the +map remain the same. Numbering starts at the upper left corner.
+| Returns: | 1 if the map was present, 0 if nothing was done | +
|---|
set a map with values from a python list or a single scalar +value. In case a single value is specified the value will be distributed +uniformly over the map. Current settings for +dimensions are assumed.
+mapname - string with name of map
+scalar
+| Returns: | 1 if the map was present, 0 if a new map was created | +
|---|
set a map with values from a numpy array. Current settings for +dimensions are assumed.
+| Returns: | 1 if the map was present, 0 if a new map was created | +
|---|
set a map with values from a pcrmap. Current settings for +dimensions are assumed.
+| Returns: | 1 if the map was present, 0 if a new map was created | +
|---|
gets the current time in seconds after the start of the run +Assumed daily timesteps if not defined in the user model
+Todo
+Get timestep info from from config file
+gets the end time of the model run +:return: current time as seconds since epoch
+return the dimension of the current model grid as list:
+[ Xul, Yul, xsize, ysize, rows, cols]
+Returns a python list for the specified map and the current +timestep. If the maps is not dynamic the current status of the map is +returned which may be undefined for maps that are filled with data +at the end of a run
+Returns a numpy array (matrix) for the specified map and the current +timestep. If the maps is not dynamic the current staus of the map is +returns which may be undefined for maps that are filled with data +at the end of a run +Missing value is -999
+Returns a pcrmap for the specified map and the current +timestep. If the maps is not dynamic the current staus of the map is +returns which may be undefined for maps that are filled with data +at the end of a run +Missing value is -999
+Returns a python list for the specified parameter map and the current +timestep. If the maps is not dynamic the current status of the map is +returned.
+returns a tuple (Row,Col) for the given X and y coordinate
+returns a single value for the x and y coordinates from the +map given uses getValAtPoint(in_map,xcor,ycor) from terrain_lib.py
+returns a single value for row and col from the +map given (zero based).
+gets the start time of the model run +:return: current time as seconds since epoch
+Returns a list of variables +List of list with the following structure:
+[[ name, role, unit]
+[ name, role, unit]
+...
+]
+role: 0 = input (to the model)
+ 1 = is output (from the model)
+ 2 = input/output (state information)
+ 3 = model parameter
+unit: 0 = mm/timestep
+ 1 = m^3/sec
+ 2 = m
+ 3 = degree Celcius
+ 4 = mm
+ 5 = -
+The first time this function is called the exchangeitems object is filled +with data from the ini file.
+Suspend the state variables to disk as .map files +Also saves the summary maps
+wflow_adapt.py: Simple wflow Delft-FEWS adapter in python. This file can be run +as a script from the command-line or be used as a module that provides (limited) +functionality for converting PI-XML files to .tss and back.
+Usage pre adapter:
+wflow_adapt -M Pre -t InputTimeseriesXml -I inifile -T timestepInSeconds
+Usage postadapter:
+Issues:
+++++Todo
+rewrite and simplify +convert log to XML
$Author$ +$Id$ +$Rev$
+Gets the endtime of the run from the FEWS runinfo file
+Gets the list of mapstacks fews expect from the runinfo file and create those
+Gets the starttime from the FEWS runinfo file
+Gets the number of timesteps from the FEWS runinfo file.
+Converts a wflow log file to a Delft-Fews XML diag file
+Main entry for using the module as a command line program (e.g. from the Delft-FEWS GA)
+writes a mapstack xml file
+Reads the pi-state xml file inxml and updates the data/time of +the state using datetime. Writes updated file to outxml
+Warning
+++This function does not fully parse the xml file and will only work properly
if the xml files date the dateTime element written on one line.
Converts and PI xml timeseries file to a number of tss files.
+The tss files are created using the following rules:
++++
+- tss filename determined by the content of the parameter element with a ”.tss” postfix
+- files are created in “outputdir”
+- multiple locations will be multiple columns in the tss file written in order +of appearance in the XML file
+
Gets Date/time info from XML file and creates .tss files with:
++++
+- Day of year
+- Hour of day
+- Others may follow
+
Set-up the logging system and return a logger object. Exit if this fails
+Converts a .tss file to a PI-xml file
+wflow data preparation script. Data preparation can be done by hand or using +the two scripts. This script does the first step. The second script does +the resampling. This scripts need the pcraster and gdal executables to be +available in you search path.
+Usage:
+wflow_prepare_step1 [-W workdir][-f][-h] -I inifile
+
+-f force recreation of ldd if it already exists
+-h show this information
+-W set the working directory, default is current dir
+-I name of the ini file with settings
+$Id$
+gets parameter from config file and returns a default value +if the parameter is not found
+| Variables: |
|
+
|---|
wflow data preparation script. Data preparation can be done by hand or using +the two scripts. This script does the resampling. This scripts need the pcraster and gdal executables to be +available in you search path.
+Usage:
+wflow_prepare_step2 [-W workdir][-f][-h] -I inifile
+-f force recreation of ldd if it already exists
+-h show this information
+-W set the working directory, default is current dir
+-I name of the ini file with settings
+$Id$
+Resample the maps from step1 and rename them in the process
+PM
@@ -630,7 +729,7 @@Simple export library for pcraster/python delwaq link. The module can be +used to export an ldd to a delwaq pointer file and fill the input arrays. +The library includes a command-line interface that allows you to setup +a delwaq model and feed it with forcing data.
+Warning
+This is an experimental version. A complete redesign is needed as this +version is unstable and very poorly structured!
the wflow run should have saved at least the folowing mapstacks:
+- self.OldKinWaveVolume=vol
+- self.WaterLevel=lev
+- self.SurfaceRunoff=run
+- self.Inwater=inw (or the different components that make up this flux)
+The script always sets-up at least two Substances, Initial and Check. Initial +is present everywhere at startup and the concentration is zero +in all inputs. Check is not present at startup and set to 1 in all inputs.
+The script takes an areamap that can be used to tag water as it enters the +model. This can be a landuse map, a subcatchment map etc. Furthermore water +can also be tagged based on the flux into the model.
+The naming of the sustances is as follows: “Area” areamap_class inflow_number
+Command line options:
+-C: caseDir - set the wflow case directory to use
+-R: runId - set the wflow runId to use
+-T: Set last timestep
+-O: set starttime ('%Y-%m-%d% H:%M:%S')
+-a: Also write dynamic area data if this option is set
+-j: if this option is set the static data is not generated (default is on)
+-A: sets the areamap used to specify the fraction sources. This can be
+ a subcatcment map, a soil type map, a land use maps etc. Default is:
+ staticmaps/wflow_subcatch.map (relative to the caseDir directory)
+-D: delwaqdir - set the basedir to create the delwaq schematisation in
+-S: sourcemap - name of the wflow output map to use as source.
+ it should be a variable that flows into the kinematic wave routine
+ inw is normally used as it contain all water per cell that flows into
+ the kinematic wave function.
+ Use multiple -S options to include multiple maps
+-s: Set the model timesteps in seconds (default 86400)
+-F: if set the model 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.
+-c: Name of the wflow configuration file
+Todo
+add support for a coarser delwaq network based on supplied map.
+Todo
+Test option to seperate construction of network from filling of the input +arrays
+Todo
+Ad support to not only follow the kinematic wave reservoir but also +the flow trough the soil reservoirs. Basically make three layers:
++++
+- kinematic wave reservoir (surface water)
+- unsaturated store (only vertical flow)
+- saturated store (horizontal and vertical flow)
+
$Author$ +$Id$ +$Rev$
+” +create the dir to save delwaq info in
+writes B5_bounddata.inc
+Writes the boundary list file +B5_boundlist.inc +Numbering is abs(exchnage id)
+Todo
+B8_initials.inc
+Writes the number of exchnages to file (number of rows in the pointer file)
+B4_nrofexch.inc
+Writes the number of segments to B3 file
+B3_nrofseg.inc
+WRites the pointer file +B4_pointer.inc
+Writes a timestep to a segment/exchange data file (appends to an existing +file or creates a new one).
+Write an output loc file based on the wflow_gauges +map.
+Writes the B1_sublist.inc file +input:
+++it writes substances for the areas and an initial and mass balance +check substance
Writes B1_T0.inc, B2_outputtimers.inc, B2_sysclock.inc and /B2_simtimers.inc +Assumes daily timesteps for now!
+An ldd is used to determine the from-to relations for delwaq using +the PCraster up/downstreams commands. +amap is used to link boundaries to the segments for delwaq (negative +numbers). These are area based boundaries. Diffboun is a +python dictionary with inflows for each +cell.
+Note
+Only one layer at present (layers must be 1)
+Note
+use savetxt(“pointer.inc”,pointer,fmt=’%10.0f’) to save this +for use with delwaq
+Note
+The pointers list first contains the “internal” fluxes in +the kinematic wave reservoir, next the fluxes (1-n) into the +kinematic wave reservoir.
+Todo
+Add exta column with boundary labels (of the inflows)
+Converts a pcrmap to a numpy array.that is flattend and from which +missing values are removed. Used for generating delwaq data
+Read a pcraster map for a timestep without using the dynamic framework
+Runs flood mapping (very basic) based on an existing +wflow_sbm|hbv model run.
+The wflow_sbm|hbv model must have saved mapstacks for +water level and discharge for each timestep (run*****.*** and lev*****.***). +If the name of you Q and/or H maps are different specify these in the +[inputmapstacks] section, e.g:
+[inputmapstacks]
+Q = runDyn
+H = levDyn
+If a wflow_bankfull.map map is present in the staticmaps directory that map will +be used to determine if the river is flooding, otherwise bankfull +is determined using: Bankful = RiverWidth/60 (the RiverWidth map is taken +from the runid/outsum directory)
+Ini file settings:
+[model]
+# Maximum distance between a cell to be flooded cell and a river cell
+# or already flooded cel. Functions as a max flooding velocity
+# Never set lower that the length of one cell.
+maxflooddist= 0.3
+Usage: +wflow_floodmap -C case -R Runid -c inifile -h -I
+++-C: set the name of the case (directory) to run
+-I: generate initial conditions from scratch
+-R: set the name runId within the current case
+-c name of the config file (in the case directory)
++
+- -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 displays help information
+-l: loglevel (most be one of DEBUG, WARNING, ERROR)
+
$Author$ +$Id$ +$Rev$
+The user defined model class. This is your work!
+Required
+This is where all the time dependent functions are executed. Time dependent +output should also be saved here.
+| Variables: |
|
+
|---|
Required
+Initial part of the model, executed only once. It reads all static model +information (parameters) and sets-up the variables used in modelling.
+This function is required. The contents is free. However, in order to +easily connect to other models it is advised to adhere to the directory +structure used in the other models.
+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.
+Required
+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. This is +where you specify the state variables of you model. If your model is stateless +this function must return and empty array (states = [])
+| Variables: | FloodExtent.map – Current FloodExtent | +
|---|
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
+
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
+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.
+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
+Run the wflow_hbv hydrological model..
+usage: +wflow_hbv:
+[-h][-v level][-F runinfofile][-L logfile][-C casename][-R runId]
+[-c configfile][-T timesteps][-s seconds][-W][-E][-N][-U discharge]
+[-P parameter multiplication][-X][-l loglevel]
+-f: Force overwrite of existing results
+-T: Set the number of timesteps to run
+-N: No lateral flow, use runoff response function to generate fast runoff
+-s: Set the model timesteps in seconds
+-I: re-initialize the initial model conditions with default
+-i: Set input table directory (default is intbl)
+-x: run for subcatchment only (e.g. -x 1)
+-C: set the name of the case (directory) to run
+-R: set the name runId within the current case
+-L: set the logfile
+-c: name of wflow the configuration file (default: Casename/wflow_hbv.ini).
+-h: print usage information
+-l: loglevel (most be one of DEBUG, WARNING, ERROR)
+-X overwrites the initial values at the end of each timestep
+$Author$ +$Id$ +$Rev$
+The user defined model class. All maps are defined here for documentation +purposes
+Returns a list of default summary-maps at the end of a run. +This is model specific. You can also add them to the [summary]section of the ini file but stuff +you think is crucial to the model should be listed here
+++Example:
Below a list of variables that can be save to disk as maps or as +timeseries (see ini file for syntax):
+Dynamic variables
+| Variables: |
|
+
|---|
Static variables
+| Variables: |
|
+
|---|
Initial part of the model, executed only once. Reads all static model +information (parameters) and sets-up the variables used in modelling.
+HBV Soil
+| Variables: |
|
+
|---|
If SetKquickFlow is set to 1
+| Variables: |
|
+
|---|
If SetKquickFlow is set to 0
+| Variables: |
|
+
|---|
Snow modelling parameters
+| Variables: |
|
+
|---|
read initial state maps (they are output of a previous call to suspend())
+++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: |
|
+
|---|
gets the current time in seconds after the start of the run
+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
+Updates the kinematic wave reservoir
+Perform command line execution of the model.
+Dictionary with parameters and multipliers (dynamic) (used in calibration)
+Dictionary with parameters and multipliers (static) (used in calibration)
+Column sused in updating
+revision of the model
+Run the wflow_sbm hydrological model..
+usage
+wflow_sbm [-h][-v level][-F runinfofile][-L logfile][-C casename][-R runId]
+ [-c configfile][-T last_step][-S first_step][-s seconds][-W][-E][-N][-U discharge]
+ [-P parameter multiplication][-X][-f][-I][-i tbl_dir][-x subcatchId][-u updatecols]
+ [-p inputparameter multiplication][-l loglevel]
+
+-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. Also set fewsrun=1 in the .ini file!
+
+-X: save state at the end of the run over the initial conditions at the start
+
+-f: Force overwrite of existing results
+
+-T: Set last timestep
+
+-S: Set the start timestep (default = 1)
+
+-s: Set the model timesteps in seconds
+
+-I: re-initialize the initial model conditions with default
+
+-i: Set input table directory (default is intbl)
+
+-x: Apply multipliers (-P/-p ) for subcatchment only (e.g. -x 1)
+
+-C: set the name of the case (directory) to run
+
+-R: set the name runId within the current case
+
+-L: set the logfile
+
+-E: Switch on reinfiltration of overland flow
+
+-c: name of wflow the configuration file (default: Casename/wflow_sbm.ini).
+
+-h: print usage information
+
+-W: If set, this flag indicates that an ldd is created for the water level
+ for each timestep. 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. Also, if you
+ need it you migth actually need another model.
+
+-U: The argument to this option should be a .tss file with measured discharge in
+ [m^3/s] which the progam will use to update the internal state to match
+ the measured flow. The number of columns in this file should match the
+ number of gauges in the wflow\_gauges.map file.
+
+-u: list of gauges/columns to use in update. Format:
+ -u [1 , 4 ,13]
+ The above example uses column 1, 4 and 13
+
+-P: set parameter multiply dictionary (e.g: -P {'self.FirstZoneDepth' : 1.2}
+ to increase self.FirstZoneDepth by 20%, multiply with 1.2)
+
+-p: set input parameter (dynamic, e.g. precip) multiply dictionary
+ (e.g: -p {'self.Precipitation' : 1.2} to increase Precipitation
+ by 20%, multiply with 1.2)
+
+-l: loglevel (most be one of DEBUG, WARNING, ERROR)
+$Author$ +$Id$ +$Rev$
+HBV Type snowpack modelling using a Temperature degree factor. All correction +factors (RFCF and SFCF) are set to 1. The refreezing efficiency factor is set to 0.05.
+| Variables: |
|
+
|---|---|
| Returns: | Snow,SnowMelt,Precipitation + |
+
Bases: pcraster.framework.dynamicPCRasterBase.DynamicModel
+Changed in version 0.91: - Calculation of GWScale moved to resume() to allow fitting.
New in version 0.91: - added S-curve for freezing soil infiltration reduction calculations
+Returns a list of default summary-maps at the end of a run. +This is model specific. You can also add them to the [summary]section of the ini file but stuff +you think is crucial to the model should be listed here
+Stuf that is done for each timestep
+Below a list of variables that can be save to disk as maps or as +timeseries (see ini file for syntax):
+Dynamic variables
+| Variables: |
|
+
|---|
Static variables
+| Variables: |
|
+
|---|
Initial part of the model, executed only once. Reads all static data from disk
+Soil
+| Variables: |
|
+
|---|
Canopy
+| Variables: |
|
+
|---|
Surface water
+| Variables: |
|
+
|---|
Snow and frozen soil modelling parameters
+| Variables: |
|
+
|---|
++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: |
|
+
|---|
gets the current time in seconds after the start of the run
+Updates the kinematic wave reservoir. Should be run after updates to Q
+Actual evaporation function:
+Input:
++++
+- RootingDepth,WTable, UStoreDepth,FirstZoneDepth, PotTrans, smoothpar
+
Output:
++++
+- ActEvap, FirstZoneDepth, UStoreDepth ActEvapUStore
+
Perform command line execution of the model.
+Runs the pcraster dynamic wave based on the output from the +kinematic wave.
+The wflow_sbm|hbv model must have saved mapstacks for +water level and discharge for each timestep (run*****.*** and lev*****.***). +If the name of you Q and/or H maps are different specify these in the +[inputmapstacks] section, e.g:
+[inputmapstacks]
+Q = run
+H = lev
+The Settings for the dynamic wave itself should be put in the [dynamicwave] section +of the ini file.
+[dynamicwave]
+# Switch on dynamic wave for main rivers
+
+# Number of timeslices per dynamic waven substep
+TsliceDyn=900
+
+# number of substeps for the dynamic wave with respect to the model timesteps
+dynsubsteps=24
+
+# map with level boundary points
+#wflow_hboun = staticmaps/wflow_outlet.map
+
+# Optional river map for the dynamic wave that must be the same size or smaller as that of the
+# kinematic wave
+wflow_dynriver = staticmaps/wflow_dynriver.map
+
+# a fixed water level for each non-zero point in the wflow_hboun map
+# level > 0.0 use that level
+# level == 0.0 use timeseries
+# level < 0.0 use upstream water level
+fixedLevel = -8.0
+
+# If this is set to one the program will try to keep the volume at the pits at a constant level
+lowerflowbound=1
+
+# instead of a fixed level a tss file with levels for each timesteps and each
+# non-zero value in the wflow_hboun map
+#levelTss=intss/Hboun.tss
+#AdaptiveTimeStepping=1
+Usage: +wflow_wave -C case -R Runid -c inifile -h
+++-C: set the name of the case (directory) to run
+-R: set the name runId within the current case
+-I: generate initial conditions from scratchs
+-c name of the config file (in the case directory)
++
+- -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 displays help 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
+This is where all the time dependent functions are executed. Time dependent +output should also be saved here.
+| Variables: |
|
+
|---|
Required
+Initial part of the model, executed only once. It reads all static model +information (parameters) and sets-up the variables used in modelling.
+This function is required. The contents is free. However, in order to +easily connect to other models it is advised to adhere to the directory +structure used in the other models.
+reads the initial conditions:
+| Variables: |
|
+
|---|
Runs the dynamic wave for the main river +Beware: Experimental, very slow and unstable
+Required
+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. This is +where you specify the state variables of you model. If your model is stateless +this function must return and empty array (states = [])
+| Variables: |
|
+
|---|
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
+
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
+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.
+