Index: doc/_build/doctrees/calib_report.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/environment.pickle =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/faq.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/framework.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/index.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/testrunner_wflowhbv.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wf_DynamicFramework.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wflow_adapt.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wflow_building.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wflow_delwaq.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wflow_fit.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wflow_floodmap.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wflow_gr4.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wflow_hbv.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wflow_lib.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wflow_openda.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wflow_sbm.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wflow_usage.doctree =================================================================== diff -u Binary files differ Index: doc/_build/doctrees/wflow_wave.doctree =================================================================== diff -u Binary files differ Index: doc/_build/html/.buildinfo =================================================================== diff -u --- doc/_build/html/.buildinfo (revision 0) +++ doc/_build/html/.buildinfo (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +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: 14d88ced41b5a157dec0b7647e18786e +tags: 645f666f9bcd5a90fca523b33c5a78b7 Index: doc/_build/html/_downloads/prep.ini =================================================================== diff -u --- doc/_build/html/_downloads/prep.ini (revision 0) +++ doc/_build/html/_downloads/prep.ini (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,54 @@ +[directories] +# all paths are relative to the workdir set on the command line +# The directories in which the scripts store the output: +step1dir = step1 +step2dir = step2 + +[files] +# Name of the DEM to use +masterdem=srtm_58_14.map +# name of the lad-use map to use +landuse=globcover_javabali.map +soil=soil.map +# Shape file with river/drain network. Use to "burn in" into the dem. +river=river.shp + + + +[settings] +# Nr to reduce the initial map with in step 1. This means that all work is done +# on an upscaled version of the initial DEM. May be usefull for very +# large maps. If set to 1 no scaling is taking place +initialscale=1 +# Set lddmethod to dem (other methods are not working at the moment) +lddmethod=dem + +# If set to 1 the gauge points are moved to the neares river point on a river +# with a strahler order higher of identical as defined in this ini file +snapgaugestoriver=1 + +# The strahler order above (and including) a pixel is defined as a river cell +riverorder=4 + +# X and y cooordinates of gauges (subcatchments). Please note the the locations +# are based on the river network of the DEM used in step2 (the lower resuolution +# DEM). This may need some experimenting... is most case the snap function +# will work by ymmv. To set multiple gauges use [x_gauge_1, x_gauge_2] + +gauges_y = [-6.1037] +gauges_x = [107.4357] + + +# settings for subgrid to create. This also determines how the +# original dem is (up)scaled. If the cellsize is the same +# as the original dem no scaling is performed. This grid will +# be the grid the final model runs on +Yul = -6.07 +Xul = 106.9 +Ylr = -7.30271 +Xlr = 107.992 +cellsize = 0.009166666663 + +# tweak ldd creation. Default should be fine +lddoutflowdepth=1E35 +lddglobaloption=lddout Index: doc/_build/html/_images/beta-hbv.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_00.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_01.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_02.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_03.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_04.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_05.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_06.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_07.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_08.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_09.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_10.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_11.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_12.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_13.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_00.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_01.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_02.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_03.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_04.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_05.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_06.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_07.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_08.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_09.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_10.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_11.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_12.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/calibplot_lunew_13.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/dataprepare.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/delwaq-exchanges.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/hbv-snow.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/hbv-soilmoist.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/hbv-upper.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/hbv96.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/kin-dyn.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/ldd-mini.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/ldd-res.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/ldd-rhine.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/m-plot.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/malay_7.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/mult_firstzonemin.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/mult_ksat_rhine.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/mult_m_rhine.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/s-curve-freezingsoil.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/s-curve-soil.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/sbm_flowtypes.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/sing_24.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_images/wflow_soil.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_sources/calib_report.txt =================================================================== diff -u --- doc/_build/html/_sources/calib_report.txt (revision 0) +++ doc/_build/html/_sources/calib_report.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,103 @@ +Calibration of the wflow\_sbm model for the Rhine catchment using EOBS data +=========================================================================== + +DEM and landuse data +-------------------- + +The digital elevation model used was the SRTM 90x90 m resolution dataset. The +DEM was used to determine the river network and the altitude of each cell using the +following steps: + +# The 90x90 m DEM was used to determine the local drainage network (D8) and pits were removed from the network +# The network determined above was used to fix the river network when resampling the DEM to a 900x900 m resolution DEM. +# [pm] resampling procedure + +Corina land-use map and reclassification [PM] + + + + +Forcing data +------------ + +The wflow\sbm model was calibrated for the Rhine basin using daily temperature +and precipitation data from the EOBS dataset [Haylock]_ (version 5.0). +Discharge was taken from the CHR daily dataset ([gorgen]_). Potential +evapotranspiration was determined using and adjusted version Hargraeves' method +([weiland]_): + + +.. math:: + + E_{pot} = 0.0031 (T + 17.78) abs(T_{max} - T_{min})^{0.5} R + +In which 0.0031 is a calibration factor and :math:`R` is the clear sky solar +radiation expressed in mm/day. + +Within the wflow\_sbm model the temperature is corrected for altitude +differences within one EOBS cell. For each wflow\_sbm 1x1km cell the temperature +is corrected by using the differences between the altitude in that cell and the +average altitude within the matching EOBS cell and applying a lapse rate. + +Gauge data from CHR + +Calibration procedure +--------------------- + + + +Calibration was performed in two steps. First an initial gues of all parameters +was made based on land-use type. Secondly a full matrix search of a number of parameters +was performed and best perfroming sets have been chosen per subcatchment (based on NS and bias). + +The plots below show the calibration results for the period 1985 -- 1995 for the +following stations:: + + Rhein-Basel, Rheinhalle + Kalkhoven + Rockenau + Kaub + Koeln + Lobith + Raunheim + Cochem + Andernach + Maxau + Schermbeck + Menden + Hattingen + +The title of the plots also shows the model efficiency (Nash +and Sutcliffe). + +Original landuse +---------------- + +.. plot:: plots/calibplot.py + +Modified landuse +---------------- + +.. plot:: plots/calibplot_lunew.py + + + +.. [Haylock] Haylock, M.R., N. Hofstra, A.M.G. Klein Tank, E.J. Klok, P.D. +Jones, M. New. 2008: A European daily high-resolution gridded dataset of surface +temperature and precipitation. J. Geophys. Res (Atmospheres), 113, D20119, +doi:10.1029/2008JD10201" + + +.. [gorgen] Görgen, K., Beersma, J., Brahmer, G., Buiteveld, H., Carambia, M., +de Keizer, O., Krahe, P., Nilson, E., Lammersen, R., Perrin, C. and Volken, D. +(2010) Assessment of Climate Change Impacts on Discharge in the Rhine River +Basin: Results of the RheinBlick2050 Project, CHR report, I-23, 229 pp., +Lelystad, ISBN 978-90-70980-35-1 + + + +.. [weiland] Sperna Weiland, F. C., C. Tisseuil, H. H. Dürr, M. Vrac, and L. P. +H. Van Beek, “Selecting the optimal method to calculate daily global reference +potential evaporation from CFSR reanalysis data for application in a +hydrological model study,” Hydrology and Earth System Sciences, vol. 16, pp. +983–1000, 2012. Index: doc/_build/html/_sources/faq.txt =================================================================== diff -u --- doc/_build/html/_sources/faq.txt (revision 0) +++ doc/_build/html/_sources/faq.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,26 @@ +Questions and answers +===================== + +Questions +--------- + +[1]_ The discharge in the timeseries output gives weird numbers (!E31) what is going wrong? + +[2]_ How do a setup a wflow model? + + + +Answers +------- + +.. [1] The 1E31 values indicate missing values. This probably means that at least one + of the cells in the part upstreasm of the discharge points has a missing value. + Missing values are routed downstreams so any missing values upstreams of a discharge + will cause the discharge to evetually become a missing value. To resolve this check the following: + + - Check if the .tbl files are correct ( do that cover all va;ues in the landuse soil and subcatchment maps) + - check for missing values in the input maps + - check of model parameters are within the working range + - check all maps in the runId/outsum directory so see at which stage the missing values starts + +.. [2] First read the section on :ref:`Setting-up a-new-model`. Next check one of the supplied example models \ No newline at end of file Index: doc/_build/html/_sources/framework.txt =================================================================== diff -u --- doc/_build/html/_sources/framework.txt (revision 0) +++ doc/_build/html/_sources/framework.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,53 @@ +Using the framework +=================== + +This section only gives a brief description of the framework focussing on the extensions +made for OpenStreams. A full description of the current version of the framwork can be found +at http://www.pcraster.eu. + +In order to build a dynamic model the one needs to define a model class and add several methods +to the class to describe the model behaviour. The easiest way to get started is to copy +and modify the ``wflow_sceleton.py`` example model. You can also use the other models +for inspiration. + +In order to faclitate reusing data between models the data is stored in the following directory +tree: + +.. digraph:: file_system + + //rankdir=LR; + size="8,11"; + "Case" -> "inmaps"; + "Case" -> "instate"; + "Case" -> "intbl"; + "Case" -> "intss"; + "Case" -> "outstate"; + "Case" -> "Run"; + "Case" -> "staticmaps"; + "Run" -> " intbl"; + "Run" -> "outmaps"; + "Run" -> " outstate"; + "Run" -> "outsum"; + "Run" -> "runinfo"; + +Although it is possible to deviate from this layout it is highly recommended to +adhere to this if you build your own model. Also make sure you use an ini file to +specify model settings instead of putting those in the python code. + +A basic sceleton of a model is given below: + +.. automodule:: wflow_sceleton + :members: WflowModel, main + :private-members: + :special-members: + :member-order: bysource + + + +Anotated source code for the above +---------------------------------- + +.. include:: ../../../src/wflow-py/wflow/wflow_sceleton.py + :literal: + + Index: doc/_build/html/_sources/index.txt =================================================================== diff -u --- doc/_build/html/_sources/index.txt (revision 0) +++ doc/_build/html/_sources/index.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,229 @@ +================================= +Welcome to wflow's documentation! +================================= + +.. note:: + + $Id: index.rst 908 2014-01-16 11:42:57Z schelle $ + $HeadURL: https://repos.deltares.nl/repos/Hydrology/trunk/OpenStreams/doc/wflow/sphinx/index.rst $ + + This documentation is for version |version| of wflow, release |release| + This documentation was generated |today| + +Introduction +============ + +This document describes the wflow distributed hydrological modelling platform. +wflow is part of the Deltares' +OpenStreams project (http://www.openstreams.nl). Wflow consists of a +set of python programs that can be run on the command line and perform +hydrological simulations. The models are based on the PCRaster python +framework. In wflow this framework is extended (the ``wf_DynamicFramework`` +class) so that models build using the framework can be controlled using +the API. Links to OpenMI (www.openmi.org) and OpenDAP (www.openda.org) +are being tested. + +The wflow distributed hydrological model platform currently includes +the following models: + +- the wflow\_sbm model (derived from `topog\_sbm `_ ) + +- the wflow\_hbv model (a distributed version of the HBV96 model). + +- the wflow\_gr4 model (a distributed version of the gr4h/d models). + +- the wflow\_wave model (a dynamic wave model that can run on the output of the sbm and hbv models). + +- the wflow\_floodmap model (a flood mapping model that can use the output of the wflow\_wave model or de sbm and hbv models). + +The low level api and links to other frameworks allow the models to be +linked as part of larger modelling systems: + + +.. digraph:: Linking + + WFLOW_HBV -> WFLOWAPI; + WFLOW_SBM -> WFLOWAPI; + WFLOWAPI -> "PI" [dir=both]; + "Data and Models" -> "PI"; + WFLOWAPI -> OpenMI [dir=both]; + ModelX -> OpenMI; + ModelY -> OpenMI; + WFLOWAPI -> OpenDA [dir=both]; + Calibration -> OpenDA; + Assimilation -> OpenDA; + WFLOWAPI [shape=square]; + OpenDA [shape=square]; + OpenMI [shape=square]; + "PI" [shape=square]; + dpi=69; + + +.. note:: + + wflow is part of the Deltares OpenStreams project + (http://www.openstreams.nl). The OpenStreams project is a work in + progress. Wflow functions as a toolkit for distributed hydrological + models within OpenStreams. + +.. warning:: + + At the moment the models and documentation are being worked on. Things + that worked yesterday may stop working tomorrow. + +The different wflow models share the same structure but are fairly +different with respect to the conceptualisation. The shared software +framework includes the basic maps (dem, landuse, soil etc) and the +hydrological routing via the kinematic wave. The Python class framework +also exposes the models as an API and is based on the PCRaster/Python +version 4.0 Beta (www.pcraster.eu). + +The wflow\_sbm model maximises the use of available spatial data. +Soil depth, for example, is estimated from the DEM using a topographic +wetness index . The model is derived from the [CQFLOW]_ model that has +been applied in various countries, most notably in Central America. The +wflow\_hbv model is derived from the HBV-96 model but does not +include the routing functions, instead it uses the same kinematic wave +routine as the wflow\_sbm model to route the water downstream. + +The models are programmed in a dynamic GIS language called PCRaster +available as a Python extension. As such, the structure of the model is +transparent, 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.7 are needed. + + +.. only:: html + + .. note:: A pdf version of this version of the documentation can be + found at + (http://publicwiki.deltares.nl/download/attachments/76613461/wflow.pdf) + +.. only:: latex + + .. note:: A html version of this version of the documentation can be + found at (http://schj.home/xs4all.nl/html) or zipped at + (http://publicwiki.deltares.nl/download/attachments/76613461/wflow_html.zip) + + +The wflow\_hbv model +==================== +.. toctree:: + :maxdepth: 2 + + wflow_hbv + +The wflow\_sbm model +==================== +.. toctree:: + :maxdepth: 2 + + wflow_sbm + +The wflow\_gr4 model +==================== +.. toctree:: + :maxdepth: 2 + + wflow_gr4 + +The wflow\_wave model +===================== +.. toctree:: + :maxdepth: 2 + + wflow_wave + +The wflow\_floodmap model +========================= +.. toctree:: + :maxdepth: 2 + + wflow_floodmap + + +Building a model +================ +.. toctree:: + :maxdepth: 1 + + wflow_building + +How to use the models +===================== +.. toctree:: + :maxdepth: 2 + + wflow_usage + +The wflow Delft-FEWS adapter +============================ +.. toctree:: + :maxdepth: 2 + + wflow_adapt + +wflow modules and libraries +=========================== +.. toctree:: + :maxdepth: 2 + + wflow_fit + wflow_lib + wflow_delwaq + + +Examples and tests +================== +.. toctree:: + :maxdepth: 2 + + testrunner_wflowhbv + calib_report + + +Adding a new model using the framework +====================================== +.. toctree:: + :maxdepth: 2 + + framework + wf_DynamicFramework + +FAQ +=== +.. toctree:: + :maxdepth: 2 + + faq + + +OpenDA +====== +.. toctree:: + :maxdepth: 2 + + wflow_openda + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + + +References +========== + +.. [CQFLOW] Köhler, L., Mulligan, M., Schellekens, J., Schmid, S. and + Tobón, C.: Final Technical Report DFID-FRP Project no. R7991 Hydrological + impacts of converting tropical montane cloud forest to pasture, with + initial reference to northern Costa Rica.,, 2006. + + +TODO +==== + +.. todolist:: Index: doc/_build/html/_sources/testrunner_wflowhbv.txt =================================================================== diff -u --- doc/_build/html/_sources/testrunner_wflowhbv.txt (revision 0) +++ doc/_build/html/_sources/testrunner_wflowhbv.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,52 @@ +run wflow\_hbv via API +====================== + +Settings in the ini file +------------------------ + +In the ini file example below several variables are configured to be available via the +API. For most settings this only defines +what the API will expose to the outside world. However, if you specify 0 (input) +as a role for one of the forcing variables the ``wf_readmap`` function will no longer +read maps from disk for that variable but will return the contents of that +variable via the API. + + +Settings in the API section +--------------------------- + +The API section specifies variables that are exposed via the ere. Use the following +convention: + +:: + + variable_name_in_model=variable_role,variable_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 = - + + +Use role 0 for input maps to the model (those that are normally read from disk), role 1 +for outputs, role 2 for state variables and role3 for model parameters. + + +.. include:: ../../../examples/wflow_rhine_hbv/wflow_hbv_mem.ini + :literal: + +.. automodule:: testrunner_wflowhbv + +.. literalinclude:: ../../../src/wflow-py/wflow/testrunner_wflowhbv.py + + Index: doc/_build/html/_sources/wf_DynamicFramework.txt =================================================================== diff -u --- doc/_build/html/_sources/wf_DynamicFramework.txt (revision 0) +++ doc/_build/html/_sources/wf_DynamicFramework.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,6 @@ +wf_DynamicFramework Module +========================== + +.. automodule:: wf_DynamicFramework + :members: wf_DynamicFramework + :undoc-members: Index: doc/_build/html/_sources/wflow_adapt.txt =================================================================== diff -u --- doc/_build/html/_sources/wflow_adapt.txt (revision 0) +++ doc/_build/html/_sources/wflow_adapt.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,100 @@ +.. _wflow_adapt: + + + +wflow_adapt Module +================== + + +Introduction +------------ + +wflow_adapt is an adapter that links wflow to Delft-FEWS +(http://publicwiki.deltares.nl/display/FEWSDOC/Home). it is typically run from the +Delft-FEWS general adapter. + + +Linking wflow models to Delft-FEWS +---------------------------------- + + +To run the model from Delft-FEWS the following actions need to be +performed: + +- wflow_[sbm|hbv].py needs to be run with the -F option where the argument refers + to a Delft-FEWS runinfo.xml file + +- you need to specify fewsrun=1 in the model section of the .ini file + +- The postadapter (wflow\_adapt.py) needs to be run after the wflow run + +Because DELFT-FEWS exports the mapstacks beginning at 0 and pcraster +expects them to start at 1 you will need to add a delay of one +timesstep to mapstack timeseries exported to wflow. This will mean +the first timestep (.000) is empty but that one will be ignored by +wflow anyway. + + +Command line arguments: + + + +An example of executing wflow from the Delft-FEWS general adapter +is shown below: + + +:: + + + + Run wflow + bin-wflow\wflow_sbm.exe + + -C + rhine + -F + rhine/inmaps/runinfo.xml + -f + + 7200000 + + + Run wflow post + bin-wflow\wflow_adapt.exe + -M + Post + -s + rhine/instate/state.xml + -o + rhine/instate/outstate.xml + -r + rhine/inmaps/runinfo.xml + -w + ./ + -C + rhine + -I + wflow_sbm.ini + -T + 86400 + + 1200000 + + + + + +The wflow_adapt module can also be used by other programs to convert .tss files to +pi-xml vv. Below the API documentation of the module is given. + + +How to use the adapter +---------------------- + +[PM] + +Module function documentation +----------------------------- + +.. automodule:: wflow_adapt + :members: Index: doc/_build/html/_sources/wflow_building.txt =================================================================== diff -u --- doc/_build/html/_sources/wflow_building.txt (revision 0) +++ doc/_build/html/_sources/wflow_building.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,572 @@ +Data requirements +================= + +The actual data requirements depend on the application of the model. The +following list summarizes the data requirements: + +- Static data + + - Digital Evelevation Model (DEM) + + - A Land Cover map + + - A map representing Soil physical parameters (the Land Cover map + can also be used) + +- Dynamic data (spatial time series, map-stacks) + + - Precipitation + + - Potential evapotranspiration + + - Temperature (optional, only needed for snow pack modelling) + +- Model parameters (per land use/soil type) + + - Soil Depth + + - etc... (see `Input parameters (lookup tables or maps)`_) + +The module can be linked to the Delft-FEWS system 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 section :ref:`wflow_adapt` + + +.. _Setting-up a-new-model: + +Setting-up a new model +====================== + + +Setting-up a new model first starts with making a number of decisions and gathering the +required data: + +#. Do I have the static input maps in pcraster fromat (DEM ,land-use map, soil map)? +#. what resolution do I want to run the model on? +#. do i need to define multiple sub-catchments to report totals/flows for seperately? +#. what forcing data do i have available for the model (P, Temp, ET)? +#. do I have gridded forcing data or scalar timeseries? + + +.. note:: + + Quantum Gis (QGIS) can read and write pcraster maps (via gdal) and is a very handy tool + to support data preparation. + + +Depending on the formats of the data some converting of data may be needed. The +procedure described below assumes you have the main maps available in pcraster +format. If that is not the case free tools like Qgis (www.qgis.org) and gdal can be +used to convert the maps to the required format. Qgis is also very handy +to see if the results of the scripts match reality by overlaying it with +a google maps or openstreetmaps layer using the qgis openlayers plugin. + +When all data is available setting up the model requires the following steps: + +#. Run the wflow_prepare_step1 and 2 scripts or prepare the input maps by hand (see :ref:`Preparing`) +#. Setup the wflow model directory structure (Setup a case) and copy the files (results from step2 of the prepare scripts) there (see :ref:`Setting_Up`) +#. Test run the model +#. Supply all the .tbl files (or complete maps) for the model parameters (see :ref:`Input-Parameters`) +#. Calibrate the model + +.. _Preparing: + +Preparing static input maps +--------------------------- + +Introduction +~~~~~~~~~~~~ + +Preparing the input maps for a distributed model is not always trivial. +wflow comes with two scripts that help in this process. The scripts are +made with the assumption that the base DEM you have is a higher +resolution as the DEM you want to use for the final model. When +upscaling the scripts try to maintain as much information from the high +resolution DEM as possible. The procedure described here can be used for +all wflow models (wflow\_sbm or wflow\_hbv). + +Using the scripts +~~~~~~~~~~~~~~~~~ + +The scripts assume you have a DEM, landuse and soil map available in pcraster +format. If you do not have a soil or landuse map the you can generate a uniform map. +The resolution and domain of these maps does not need to be the +same, the scripts will take care of resampling. The process is devided +in two scripts, wflow\_prepare\_step1.py and wflow\_prepare\_step2.py. +In order to run the scripts the following maps/files need to be +prepared. + +.. note:: + + Both scripts need pcraster and gdal executables (version >= 1.10) to be available + in your computers search path + + +- a DEM in pcraster format + +- a land use map in pcraster format. If the resolution is different + from the DEM the scripts will resample this map to match the DEM (or + the DEM cutout). If no landuse map is found a uniform map will be + created. + +- a soil map in pcraster format. If no soil map is found a unifrom map will be created. + +- a configuration file for the prepare scripts that defines how they operate + (.ini format) file (see below) + +- an optional shape file with a river network + +- an optional catchment mask file + +The scripts work in two steps, each script need to be given at least one +command-line option, the configuration file. The first script performs +the following tasks: + +- wflow\_prepare\_step1.py + + #. Performs an initial upscaling of the DEM if required (set in the + configuration file). This initial upscaling may be needed if the + processing steps (such as determining the drainage network) take a + very long time or if the amount of available memory is not + sufficient. The latter may be the case on 32bit systems. For + example a 90x90 m grid for the Rhine/Meuse catchment could not be + handled on a 32 bit system. + + #. Create the local drainage network. If the ldd is already present + if will use the existing ldd. Use the force option to overwrite an + existing ldd. + + #. Optionally use a shape file with a river network to "burn-in" this network + and force the ldd to follow the river. In flat areas wher the river can + be higher than the surrounding area having a river shape is crucial. + + .. tip:: + + Another option is to prepare a "pseudo dem" from a shape file with already + defined catchment boundaries and outlets. Here all non boundary points would get a + value of 1, all boundaries a value of 2 and all outlets a value of -10. This + helps in generating a ldd for polder areas or other areas where the topography + is not the major factor in determining the drainage network. + + #. Determine various statistics and also the largest catchment + present in the DEM. This area will be used later on to make sure + the catchments derived in the second step will match the catchment + derived from the high resolution DEM + +- wflow\_prepare\_step1.py + + #. Create a map with the extend and resolution defined in the + configuration file and resample all maps from the first step to + this resolution + + #. Create a new LDD using the following approach: + + - Construct a new dem to derive the ldd from suing the minimum + dem from the first step for all the pixels that are located on + a river and the maximum dem from the first step for all other + pixels. + + - In addition raise all cells outside of the largest catchment + defined in the first step with 1000 meter divided by the + distance of each cell to the largest catchment. + + - Derive the ldd and determine the catchments + + .. figure:: _images/dataprepare.png + :align: center + :alt: Steps in creating the wflow model input + + Steps in creating the wflow model input + +Once the script is finished successfully the following maps should have +been created, the data type is shown between brackets: + +- wflow\_catchment.map (ordinal) + +- wflow\_dem.map (scalar) + +- wflow\_demmax.map (scalar) + +- wflow\_demmin.map (scalar) + +- wflow-dem*percentile* - (10,25,33,50,66,75,90) (scalar) + +- wflow\_gauges.map (ordinal) + +- wflow\_landuse.map (nominal) + +- wflow\_soil.map (nominal) + +- wflow\_ldd.map (ldd) + +- wflow\_outlet.map (scalar) + +- wflow\_riverburnin.map (boolean) + +- wflow\_riverlength\_fact.map (scalar) + +- wflow\_river.map (ordinal) + +- wflow\_streamorder.map (ordinal) + +- wflow\_subcatch.map (ordinal) + +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. + + +.. note:: + + Getting the subcatchment right can be a bit of a problem. In order + for the subcatchment calculations to succeed the gauges that determine + the outlets must be on a river grid cell. If the subcatchment + creation causes problems the best way to check what is going on is + to import both wflow_gauges,map en wflow_streamorder.map in qgis so + you can check if the gauges are on a river cell. In the ini file you define + the order above which a grid cell is regarded as a river. + + + +.. note:: + + If the cellsize of the output maps is identical to the input DEM + the second script shoudl NOT be run. All data will be produced by + the first script. + +Command line parameters +~~~~~~~~~~~~~~~~~~~~~~~ + +Both scripts take the same command-line parameters: + +:: + + wflow_prepare_step1 -I inifile [-W workdir][-f][-h] + + -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 + +contents of the configuration file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +An example can be found :download:`here. <_download/prep.ini>` +:: + + [directories] + # all paths are relative to the workdir set on the command line + # The directories in which the scripts store the output: + step1dir = step1 + step2dir = step2 + + [files] + # Name of the DEM to use + masterdem=srtm_58_14.map + # name of the lad-use map to use + landuse=globcover_javabali.map + soil=soil.map + # Shape file with river/drain network. Use to "burn in" into the dem. + river=river.shp + riverattr=river + # The riverattr above should be the shapefile-name without the .shp extension + + [settings] + # Nr to reduce the initial map with in step 1. This means that all work is done + # on an upscaled version of the initial DEM. May be usefull for very + # large maps. If set to 1 (default) no scaling is taking place + initialscale=1 + + # Set lddmethod to dem (other methods are not working at the moment) + lddmethod=dem + + # If set to 1 the gauge points are moved to the neares river point on a river + # with a strahler order higher of identical as defined in this ini file + snapgaugestoriver=1 + + # The strahler order above (and including) a pixel is defined as a river cell + riverorder=4 + + # X and y cooordinates of gauges (subcatchments). Please note the the locations + # are based on the river network of the DEM used in step2 (the lower resuolution + # DEM). This may need some experimenting... is most case the snap function + # will work by ymmv. To set multiple gauges use [x_gauge_1, x_gauge_2] + + gauges_y = [-6.1037] + gauges_x = [107.4357] + + + # settings for subgrid to create. This also determines how the + # original dem is (up)scaled. If the cellsize is the same + # as the original dem no scaling is performed. This grid will + # be the grid the final model runs on + Yul = -6.07 + Xul = 106.9 + Ylr = -7.30271 + Xlr = 107.992 + cellsize = 0.009166666663 + + # tweak ldd creation. Default should be fine + lddoutflowdepth=1E35 + lddglobaloption=lddout + + +Problems +~~~~~~~~ + +In many cases the scripts will not produce the maps the way you want them +in the first try. The most common problems are: + +#. The gauges do not coincide with a river and thus the subcatchment is not correct + + - Move the gauges to a location on the rivers as determiend by the scripts. The + best way to do this is to load the wflow\_subcatch.map in qgis and use the cursor + to find the nearest river cell fro a gauge. + +#. The delimited catchment is not correct even if the gauges is at the rigth location + + - Get a better DEM or fix the current DEM. + - Use a river shape file to fix the river location + - Use a catchment mask to force the catchment delineated to use that. Or just clip the DEM with the catchment mask. + +If you still run into problems you can adjust the scripts yourself to get better results. + +Script documentation +==================== + +.. automodule:: wflow_prepare_step1 + :members: + :undoc-members: + +.. automodule:: wflow_prepare_step2 + :members: + :undoc-members: + + +.. _Setting_Up: + +Setting Up a Case +================= + +PM + +.. note:: + Describes how to setup a model case structure. Probably need to write a script + that does it automatically. + + +.. _Input-Parameters: + +Input parameters (lookup tables or maps) +======================================== + +The PCRaster lookup tables listed below are used by the model to create +input parameter maps. Each table should have at least four columns. The +first column is used to identify the land-use class in the wflow\_landuse +map, the second column indicates the subcatchment (wflow\_subcatch), +the third column the soil type (wflow\_soil.map) and the last column +list the value that will be assigned based on the first three columns. + +Alternatively the lookup table can be replaced by a PCRaster map (in +the staticmaps directory) with the same name as the tbl file (but with +a .map extension). + +.. note:: + The order in which the model look for the parameters is as follows: + - at first the staticmaps directory is checked for a map of the parameter + - next the intbl directory is checked fo a lookup table + - if both options fail a default value is used + +.. note:: + Note that the list model parameters is out of date. Getting the .tbl + files from the example models (default\_sbm and default\_hbv) is + probably the best way to start. In any case wflow will use default + vaues for the tbl files that are missing. (shown in the log + messages). + + +Below the contents of an example .tbl file is shown. In this case +the parameters are identical for each subcatchment (and soil type) +but is different for each landuse type. See the pcraster documentation +(http://www.pcraster.eu) for details on how to create .tbl files. + +:: + + 1 <,14] 1 0.11 + 2 <,14] 1 0.11 + 3 <,14] 1 0.15 + 4 <,14] 1 0.11 + 5 <,14] 1 0.11 + 6 <,14] 1 0.11 + + +.. note:: + please note that if the rules in the tble file do not cover + all cells used in the model you will get missing values in the + output. Check the maps in the runid/outsum directory to see if + this is the case. + +Beta.tbl + Beta parameter used in the kinematic wave function. Should be set to + 0.6 (will ebe removed later) + +CanopyGapFraction.tbl + Gash interception model parameter: the free throughfall coefficient. + +EoverR.tbl + Gash interception model parameter. Ratio of average wet canopy + evaporation rate over average precipitation rate. + +FirstZoneCapacity.tbl + Maximum capacity of the saturated store [mm] + +MaxLeakage.tbl + Maximum leakage [mm/day]. Leakage is lost to the model. Usually + only used for i.e. linking to a dedicated groundwater model. + Normally set to zero in all other cases. + +FirstZoneKsatVer.tbl + Saturated conductivity of the store at the surface. The M parameter + determines how this decreases with depth. + +FirstZoneMinCapacity.tbl + Minimum capacity of the saturated store [mm] + +InfiltCapPath.tbl + Infiltration capacity [mm/day] of the compacted soil (or paved + area) fraction of each gridcell + +InfiltCapSoil.tbl + Infiltration capacity [mm/day] of the non-compacted soil + fraction (unpaved area) of each gridcell + +M.tbl + Soil parameter determining the decrease of saturated conductivity + with depth. Usually between 20 and 2000 (if the soil depth is in mm) + +MaxCanopyStorage.tbl + Canopy storage [mm]. Used in the Gash interception model + +N.tbl + Manning N parameter for the Kinematic wave function. Higher values + dampen the discharge peak. + +PathFrac.tbl + Fraction of compacted area per gridcell + +RootingDepth.tbl + Rooting depth of the vegetation [mm] + +thetaR.tbl + Residual water content + +thetaS.tbl + Water content at saturation + + + + + +Common problems +=============== + +- Missing values in the discharge + - make sure thereare no missing values in any of the input maps + - make sure all values in the intbl are set to realistic values. +- No initial conditions + - run the model with the -I option first and copy the resulting files in runid\\outstate back to the instate directory + + + + +Calibrating the wflow\_sbm model +================================= + +Introduction +------------ +As with all hydrological models calibration is needed for optimal performance. +Currently we are working on getting the link with the OpenDA calibration +environment running (not tested yet). We have calibrated the Rhine/Meuse +models using simple shell scripts and the XX and XX command-line parameters +to multiply selected model parameters and evaluate the results later. + + + +Parameters +---------- + +M + Once the depth of the soil has been set for the different land-use + types the M parameter is the most important variable in calibrating + the model. The decay of the conductivity with depth controls the + baseflow resession and part of the stormflow curve. + +N + The Manning N parameter controls the shape of the hydrograph (the + peak parts). In general it is advised to set N to realistic values + for the rivers, for the land phase higher values are usually needed. + +Ksat + Increasing the Ksat will lower the hydrograph (baseflow) and + flatten the peaks. The latter also depend on the shape of the + catchment. + +FirstZoneCapacity + Increasing the storage capacity of the soil will decrease the + outflow + +RunoffGeneratingGWPerc + Default is 0.1. Determines the (upper) part of the groudwater that + can generate runoff in a cell. This is only used of the + RunoffGenSigmaFunction option is set to 1. In general generating + more runoff before a cell is completely saturated (which is the case + if RunoffGenSigmaFunction is set to 0) will lead to more baseflow + and flattening of the peaks. + + +Changes in hydrographs for different values of parameters +--------------------------------------------------------- + + .. figure:: _images/mult_firstzonemin.png + :align: center + :alt: image + :height: 600px + + + + .. figure:: _images/mult_ksat_rhine.png + :align: center + :alt: image + :height: 600px + + + + .. figure:: _images/mult_m_rhine.png + :align: center + :height: 600px + + +Common problems +=============== + +Missing values in output + This can have a number of reasons, the most common are: + (1) one of the input tables does not have an entry for the landuse soil + or catchment catchment map. For example, you forgot to put in an entry for a + reclassified LU map and now all cell for that new class have a missing value. + (2) the soil/landuse/catchment maps does not cover the whole domain + (3) you have set a parameter (e.g. the canopy gap fraction in the interception model > 1) + to an unrealistic value + + .. note:: + note that missing values in upstreams cells are routed down and will eventually make + all downstreams values missing. Check the maps in the runid/outsum directory to see if the tbl files are correct + + +wflow stops and complains about types not matching + The underlying pcraster framework is very picky about data types. As such the maps must all be of the + expected type. e.g. your landuse map MUST be nominal. See the pcraster documentation at pcraster.eu + for more information + + .. note:: + If you create maps with qgis (or gdal) specify the rigth output type (e.g. Float32 for scalar maps) Index: doc/_build/html/_sources/wflow_delwaq.txt =================================================================== diff -u --- doc/_build/html/_sources/wflow_delwaq.txt (revision 0) +++ doc/_build/html/_sources/wflow_delwaq.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,257 @@ +wflow_delwaq Module +=================== + + +The wflow\_delwaq module provides a set of functions to construct a +delwaq pointer file from a PCRaster local drainage network. +A command-line interface is provide that allows you to +create a delwaq model that can be linked to a wflow model. + +.. figure:: _images/ldd-rhine.png + :width: 640px + + +The script sets-up a one-layer model (representing the kinematic wave +reservoir). Water is labeled according to the area and flux where it +enters the kinematic wave reservoir. + +For the script to work a run of the wflow model must be available and a +template directory in which the delwaq model is created should also be +available. These are indicated by the -C -R and -D command line +options. The -R and -C options indicate the wflow case and wflow run +directories while the -D option indicates the delwaq template +directory. + +The template used is shown below: + +:: + + debug/ + fixed/ + fixed/B2_numsettings.inc + fixed/B4_dispersion.inc + fixed/B4_dispx.inc + fixed/B9_Hisvar.inc + fixed/B9_Mapvar.inc + includes_deltashell/ + includes_flow/ + run.bat + dlwqlib.dll + libcta.dll + libiomp5md.dll + waq_plugin_wasteload.dll + delwaq1.exe + delwaq2.exe + deltashell.inp + +The debug, includes_flow, and includes_deltashell directories are +filled by the script. After that delwaq1.exe and delwaq2.exe programs +may be run (the run.bat file shows how this is done):: + + delwaq1.exe deltashell.inp -np + delwaq2.exe deltashell.inp + +the script sets up delwaq such that the result for the wflow gauges locations +are stored in the deltashell.his file. + + + +How the script works +-------------------- + +The pointer file for delwaq is made using the following information: + +#. The wflow\_ldd.map files is used to create the internal flow network, + it defines the segments and how water flows between the segments +#. The number of inflows into each segment determines is taken + from the sources mapstacks (-S option). Together these sources + should include all the water that enters the kinematic wave + reservoir. These are the red and green arrows in the figure below +#. The delwaq network is generated for the area define in the + wflow_catchment map. The included area is define by all cells were the + catchment id in a cel is larger than 1. + + +.. figure:: _images/delwaq-exchanges.png + :width: 640px + + Figure: How exchanges and inflows are connected + + +Within the includes_flow directory the following files are made: + +- volume.dat - volumes (N+1) noseg +- flow.dat - flows (N). Contents is noq +- area.dat - N timesteps. Content is noq +- surface.dat - surface area of the water per segment (N+1), noseq +- length.dat - One timestep only (constant). Content is two times noq + +Here nrseg is the number of segments (taken from the non-missing grid +cell in the wflow_ldd.map file) and noq is the number of exchanges which +is calculated as the number of segments plus number the of inflows +(in each segment) times the number of segments + +Delwaq expects volumes to be instantanious values at the start of a +timestes while flows are integrated between tow timesteps. For volumes +N+1 timesteps are needed, for flows N timesteps. The figure below +demonstrates this principle for N=4. + +.. digraph:: Flows + + node[shape=record,width=.1,height=.1]; + node0 [label="{Time|Volume|Flow integrated}"]; + node1 [label="{T=0|Volume=0|Flow=0 to 1}"]; + node2 [label="{T=1|Volume=1|Flow=1 to 2}"]; + node3 [label="{T=2|Volume=2|Flow=2 to 3}"]; + node4 [label="{T=3|Volume=3|Flow=3 to 4}"]; + node5 [label="{T=4|Volume=4|May be zero}"]; + node1 -> node2 + node2 -> node3 + node3 -> node4 + node4 -> node5 + +The volume.dat file is filled with N+1 steps of volumes of the wflow +kinematic wave reservoir. To obtain the needed lag between the flows and +the volumes the volumes are taken from the kinematic wave reservoir one +timestep back (OldKinWaveVolume). + +The flow.dat files is filled as follows. For each timestep internal +flows (within the kinematic wave reservoir, i.e. flows from segment to +segment) are written first (blue in the layout above). Next the flow +into each segment are written. Depending on how many inflow types are +given to the script (sources). For one type, one set of flows is +written, if there are two types two sets etc (green and red in the +layout above). + + +Very simple example: +-------------------- + +The following very simple example demonstrated how the pointer file is +created. First the pcraster ldd: + +.. figure:: _images/ldd-mini.png + +The resulting network consist of 10 points: + +.. figure:: _images/ldd-res.png + + +As can be seen both 9 and 10 are bottom points. The +generated pointer file is shown below:: + + ;Written by dw_WritePointer + ;nr of pointers is: 20 + 1 3 0 0 + 2 4 0 0 + 3 5 0 0 + 4 6 0 0 + 5 7 0 0 + 6 8 0 0 + 7 9 0 0 + 8 10 0 0 + 9 -1 0 0 + 10 -2 0 0 + -3 1 0 0 + -4 2 0 0 + -5 3 0 0 + -6 4 0 0 + -7 5 0 0 + -8 6 0 0 + -9 7 0 0 + -10 8 0 0 + -11 9 0 0 + -12 10 0 0 + + + +Case study for Malaysia and Singapore +===================================== + +To estimate load of different nutrients to Johor strait two wflow\_sbm models +have been setup. Next these models where linked to delwaq as follows: + +#. A delwaq segment network similar to the wflow D8 ldd was made +#. The volumes in the delwaq segment are taken from the wflow\_sbm + kinematic wave volumes +#. For each segment two sources (inflows) are constructed, fast and slow + each representing different runoff compartments from the wflow model. + Fast represents SOF [#]_, HOF [#]_ and SSSF [#]_ while Slow represent + groundwater flow. +#. Next the flow types are combined with the available land-use classes. + As such a Luclass times flowtypes matrix of constituents is made. + Each constituent (e.g. Slow flow of LU class 1) is traced troughout + the system. All constituents are conservative and have a + concentration of 1 as they flow in each segement. +#. To check for consistency an Initial water type and a Check water + type are introduced. The Initial water will leave the system gradually + after a cold start, the Check water type is added to each flow + component and should be 1 at each location in the system (Mass Balance + Check). + +.. [#] SOF: Saturation Overland Flow +.. [#] HOF: Hortonian Overland Flow (or infiltration excess Overland Flow) +.. [#] SSSF: SubSurface Storm Flow. Rapid lateral flow through the + top part of the soil profile. + +The above results in a system in which the different flow types (including +the LU type where they have been generated) can be traced throughout the +system. Each each gauge location the discharge and the flow components +that make up the discharge are reported. + +.. figure:: _images/sing_24.png + :width: 800px + + Figure: Discharge and flow types for a small Singapore catchment. The + Singapore catchment are dominated by fast flow types but during the end + of the dry periods the slow flow types start to rise in importance. + +.. figure:: _images/malay_7.png + :width: 800px + + Figure: Discharge, flow types and resulting total P for a catchment in + Malaysia. + +By assuming each flow type is an end-member in a mixing model we can add +fixed concentration of real parameters to the flow fractions and multiply +those with the concentrations of the end-membesrt modelled concentration +at the gauge locations can be obtained for each timestep. + +.. figure:: _images/sbm_flowtypes.png + + Figure: Flow types in the topog\_sbm models used in the + Singapore/Malaysia case. HOF = Hortonian or Infiltration excess + overland flow. SOF = Saturation overland flow, GW = exfiltrating + groundwater. Note that the subcell representation of saturated + areas means that both SOF and GW can occur before a cell is + completely saturated. + +The figure above shows the flow types in the models used in Singapore and +Malaysia. Groundwater flow (both from completely saturated cell and +subcell groundwater flow) makes up the Slow flow that is fed into the delwaq +model while SOF and HOF make up the Fast flow to the delwaq model. In addition +the water is also labelled according to the landuse type of the cell that +it flows out off. + + +The whole procedure was setup in a Delft-FEWS configuration that can run +the following steps operationally: + +.. digraph:: Flows + + node[shape=record,width=.1,height=.1]; + "Pre-Process P, T and PET data to match the model grid" -> "Run the hydrological Model" + "Run the hydrological Model" -> " Save all flows per cell" + " Save all flows per cell" -> "Feed flows per LU type and flow type to delwaq" + "Feed flows per LU type and flow type to delwaq" -> "Obtain flow fraction per LU and flow type at gauge locations" + "Obtain flow fraction per LU and flow type at gauge locations" -> "Multiply constituent concentration per LU and flow type with fraction" + "Multiply constituent concentration per LU and flow type with fraction" -> "Sum all fraction concentrations to obtain total concentration at gauge locations" + + + +wflow\_delwaq module documentation +================================== + +.. automodule:: wflow_delwaq + :members: + :undoc-members: Index: doc/_build/html/_sources/wflow_fit.txt =================================================================== diff -u --- doc/_build/html/_sources/wflow_fit.txt (revision 0) +++ doc/_build/html/_sources/wflow_fit.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,111 @@ +The wflow_fit module +==================== + + +Introduction +------------ +The wflow\_fit module provides simple automated least square fitting +for the wflow models. It uses the scipy.optimize function to perform +the fitting. + +The program works mu multipling the fit parameter with a factor and optimise this +factor. To get the new optimised parameters for your model you have to +multiply your original parameters with the optimised factor. You +can specify measured and simulated Q pairs to use and which area of the model +you wan to adjust for each Simulated/Measured pair + +In order to use the fit module you must have a: + +- A working wflow model +- a tss file with measured discharge +- an [fit] section in the ini file + + + + +The ini file +------------ +To be able to use the fit module you must add a [fit] section to the +.ini file of the wflow model you want to fit. + + +:: + + [fit] + # The parameters are name parameter_0 to parameter_n + parameter_0 = M + parameter_1 = RootingDepth + # Q specifies the tss file with measure discharge data + # the path is relative to the case directory + Q = testing.tss + # The columns in the measured Q you want to fit to + ColMeas = [1,5] + # The columns in the measured Q you want to fit + ColSim = [1,5] + # Number of warup timesteps. This are not used in fitting + WarmUpSteps = 1 + # The map defining the areas you want to adjust + areamap=staticmaps/wflow_catchment.map + # The areas you want to adjust for each Qmeas/Qsim combination + areacode=[1,5] + + + + +Fitting results +--------------- + +Results are saved in the wflow_fit.res file in the case/runid directory. In addition, +the program saves a graph of modelled and observed data in the file fit.png and maps +of the original and fitted parameters are also saved. + +If you specify the -U option the resulting maps are saved in the staticmaps directory +after each steps. As such, next steps (if you calibrate multiple subcatchments/areas) +also include the results of the previous steps. Note that this will overwrite your +maps if you already have those! + + + +How to fit +---------- + +Although wflow\_sbm has a fairly large number of parameters most should not be +fitted automatically. The parameters that are most suited for fitting are: + +- M +- FirstZoneKsatVer +- RunoffGeneratingGWPerc (if this is switched on. It is usually best to first + setup the model without this parameter!) +- RootingDepth + +It is recommended to only fit one or two parameters at one time. + +The wflow\_rhine\_sbm example can be used to test the fitting procedure. + +:: + + wflow_fit.py -M wflow\_sbm -T 300 -C wflow\rhine\_sbm + +Description of the python module +================================ + +.. automodule:: wflow_fit + :members: + + + + + + + + + + + + + + + + + + Index: doc/_build/html/_sources/wflow_floodmap.txt =================================================================== diff -u --- doc/_build/html/_sources/wflow_floodmap.txt (revision 0) +++ doc/_build/html/_sources/wflow_floodmap.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,41 @@ +The wflow_floodmap module +========================= + + +Introduction +------------ +The wflow\_floodmap module can generate flood maps from output +of a wflow\_sbm|hbv|wave model. Is needs to be run inside an existing +case and runid of either of these models. + +.. warning:: + + The documentation is incomplete + + + + + +Description of the python module +================================ + +.. automodule:: wflow_floodmap + :members: + + + + + + + + + + + + + + + + + + Index: doc/_build/html/_sources/wflow_gr4.txt =================================================================== diff -u --- doc/_build/html/_sources/wflow_gr4.txt (revision 0) +++ doc/_build/html/_sources/wflow_gr4.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,67 @@ +wflow_gr4 Module +================ + + +.. 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 +================================ + +.. automodule:: wflow_gr4 + :members: + :undoc-members: + :show-inheritance: Index: doc/_build/html/_sources/wflow_hbv.txt =================================================================== diff -u --- doc/_build/html/_sources/wflow_hbv.txt (revision 0) +++ doc/_build/html/_sources/wflow_hbv.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,396 @@ +The wflow_hbv model +=================== + + +Introduction +------------ + +The Hydrologiska Byrans Vattenbalansavdelning (HBV) model was introduced +back in 1972 by the Swedisch Meteological and Hydrological Institute +(SMHI). The HBV model is mainly used for runoff simulation +and hydrological forecasting. The model is particularly useful for +catchments where snow fall and snow melt are dominant factors, but +application of the model is by no means restricted to these type of +catchments. + + +Description +----------- + +The model is based on the HBV-96 model. However, the hydrological +routing represent in HBV by a triangular function controlled by the +MAXBAS parameter has been removed. Instead, the kinematic wave function +is used to route the water downstream. All runoff that is generated +in a cell in one of the HBV reservoirs is added to the kinematic wave +reservoir at the end of a timestep. There is no connection between +the different HBV cells within the model. Wherever possible all functions +that describe the distribution of parameters within a subbasin have +been removed as this is not needed in a distributed application/ + +A catchment is divided into a number of grid cells. For each of the +cells individually, daily runoff is computed through application of +the HBV-96 of the HBV model. The use of the grid cells offers the +possibility to turn the HBV modelling concept, which is originally +lumped, into a distributed model. + +.. figure:: _images/hbv96.png + :width: 600px + + Schematic view of the relevant components of the HBV model + +The figure above shows a schematic view of hydrological response +simulation with the HBV-modelling concept. The land-phase of the hydrological +cycle is represented by three different components: a snow routine, +a soil routine and a runoff response routine. Each component is discussed +separately below. + + +The snow routine +~~~~~~~~~~~~~~~~ + +Precipitation enters the model via the snow routine. If the air temperature, +:math:`T_{a}`, is below a user-defined threshold :math:`TT (\approx0^{o}C)` +precipitation occurs as snowfall, whereas it occurs as rainfall if +:math:`T_{a}\geq TT`. A another parameter :math:`TTI` defines how precipitation +can occur partly as rain of snowfall (see the figure below). +If precipitation occurs as snowfall, it is added to the dry snow component +within the snow pack. Otherwise it ends up in the free water reservoir, +which represents the liquid water content of the snow pack. Between +the two components of the snow pack, interactions take place, either +through snow melt (if temperatures are above a threshold :math:`TT`) or +through snow refreezing (if temperatures are below threshold :math:`TT`). +The respective rates of snow melt and refreezing are: + +.. math:: + + Q_{m} = cfmax(T_{a}-TT)\;\;;T_{a}>TT + + Q_{r} = cfmax*cfr(TT-T_{a})\;;T_{a} Cmax , Cmax - CanopyStorage , 0.0) + self.CanopyStorage = CanopyStorage - DD + + # Add the precipitation that falls on the canopy to the store + CanopyStorage = CanopyStorage + Pfrac + + # Now do the Evap, make sure the store does not get negative + dC = -1 * min(CanopyStorage, PotEvap) + CanopyStorage = CanopyStorage + dC + + LeftOver = PotEvap +dC; # Amount of evap not used + + + # Now drain the canopy storage again if needed... + D = ifthenelse (CanopyStorage > Cmax , CanopyStorage - Cmax , 0.0) + CanopyStorage = CanopyStorage - D + + # Calculate throughfall + ThroughFall = DD + D + p * Precipitation + StemFlow = Precipitation * pt + + # Calculate interception, this is NET Interception + NetInterception = Precipitation - ThroughFall - StemFlow + Interception = -dC + + return NetInterception, ThroughFall, StemFlow, LeftOver, Interception, CanopyStorage + + + + +The soil model +-------------- + +Infiltration +~~~~~~~~~~~~ + +If the surface is (partly) saturated the rainfall that falls onto the +saturated area is added to the surface runoff component. Infiltration of +the remaining water is determined as follows: + +First the soil infiltration capacity is adjusted in case the soil is +frozen. The remaining storage capacity of the unsaturated store is +determined. The infiltrating water is split is two parts, the part that +fall on compacted areas and the part that fall on non-compacted areas. +First the amount of water that infiltrates in non-compacted areas is +calculated by taking the mimimum of the remaining storage capacity, the +maximum soil infiltration rate and the water on non-compated areas. +After adding the infiltrated water to the unsaturated store the same is +done for the compated areas after updatting the remaining storage +capacity. + + + +The wflow\_sbm soil water accounting scheme +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A detailed description of the SBM model has been given by [vertessy]_. Briefly: +the soil is considered as a bucket with a certain depth +(:math:`z_{t}`), divided into a saturated store (:math:`S`) and an +unsaturated store (:math:`U`), the magnitudes of which are expressed +in units of depth. The top of the :math:`S` store forms a pseudo-water +table at depth :math:`z_{i}` such that the value of :math:`S` at any +time is given by: + +.. math:: + + S=(z_{t}-z_{i})(\theta_{s}-\theta_{r}) + +where: + +:math:`\theta_{s}` and :math:`\theta_{r}` are the +saturated and residual soil water contents, respectively. + +The unsaturated store (:math:`U`) is subdivided into storage +(:math:`U_{s}`) and deficit (:math:`U_{d}`) which are again +expressed in units of depth: + +.. math:: + + U_{d}=(\theta_{s}-\theta_{r})z_{i}-U + + U_{s}=U-U_{d} + + +The saturation deficit (:math:`S_{d}`) for the soil profile as a +whole is defined as: + +.. math:: + + S_{d}=(\theta_{s}-\theta_{r})z_{t}-S + + +All infiltrating rainfall enters the :math:`U` store first. The +transfer of water from the :math:`U` store to the :math:`S` store +(:math:`st`) is controlled by the saturated hydraulic conductivity {} +at depth :math:`z_{i}` and the ratio between :math:`U` and +:math:`S_{d}`: + +.. math:: + + st=K_{\mathit{sat}}\frac{U_{s}}{S_{d}} + +Hence, as the saturation deficit becomes smaller, the rate of the +transfer between the :math:`U` and :math:`S` stores increases. + +.. figure:: _images/wflow_soil.png + + Schematisation of the soil within the wflow\_sbm model + +Saturated conductivity (:math:`K_{sat}`) declines with soil depth (:math:`z`) in +the model according to: + +.. math::`K_{sat}=K_{0}e^{(-fz)}` + +where: + + :math:`K_{0}` is the saturated conductivity at the soil surface and + + :math:`f` is a scaling parameter [:math:`m^{-1}`] + +The scaling parameter :math:`f` is defined by: + +:math:`f=\frac{\theta_{s}-\theta_{r}}{M}` + +with :math:`\theta_{s}` and :math:`\theta_{r}` as defined +previously and :math:`M` representing a model parameter (expressed in +meters). + + +Figure: Plot of the relation between depth and conductivity for different values of M + +.. plot:: plots/m-plot.py + + +The :math:`S` store can be drained laterally via subsurface flow +according to: + +:math:`sf=K_{0}\mathit{tan}(\beta)e^{-S_{d}/M}` + +where: + + :math:`\beta` is element slope angle [deg.] + + :math:`sf` is the calculated subsurface flow [:math:`m^{2}d^{-1}`] + + :math:`S_{d}` is the saturation deficit defined as: (:math:`(\theta_{s}-\theta_{r})z_{t}-S`) + +with :math:`M` and :math:`S_{d}` as defined previously. A schematic +representation of the various hydrological processes and pathways +modelled by SBM (infiltration, exfiltration, Hortonian and saturation +overland flow, subsurface flow) is provided by verstessy (1999). + +The original SBM model does not include transpiration or a notion of +capilary rise. In wflow\_sbm transpiration is first taken from the +:math:`S` store if the roots reach the water table :math:`z_{i}`. If +the :math:`S` store cannot satisfy the demand the :math:`U` store is +used next. First the number of wet roots is determined (going from 1 to 0) using +an sigmoid function as follows: + +.. math:: + + WetRoots = 1.0/(1.0 + e^{-SharpNess (WaterTable - RootingDepth)}) + +Here the sharpness parameter (by default a large negative value, -80000.0) parameter +determines if there is a stepwise output or a more gradual output (default is stepwise). +WaterTable is the level of the Water table in the gridcell in mm below the +surface, RootingDepth is the maximum depth of the roots also in mm below the +surface. For all values of WaterTable smaller that RootingDepth a +value of 1 is returned if they are +equal a value of 0.5 is returned if the WaterTable is larger than the RootingDepth +a value of 0 is returned. The returned WetRoots fraction is multiplied +by the potential evaporation (and limited by the available water in saturated zone) +to get the transpiration from the saturated part of the soil. + +Figure: Plot showing the fraction of wet roots for different values of c +for a RootingDepth of 275mm + +.. plot:: plots/s-curve-soil.py + + + +Next the remaining potential evaporation is used to extract water from the +unsaturated store: + +:: + + FirstZoneDepth = FirstZoneDepth - ActEvapSat + RestPotEvap = PotTrans - ActEvapSat + + # now try unsat store + AvailCap = min(1.0,max (0.0,(WTable - RootingDepth)/(RootingDepth + 1.0))) + + MaxExtr = AvailCap * UStoreDepth + ActEvapUStore = min(MaxExtr,RestPotEvap,UStoreDepth) + UStoreDepth = UStoreDepth - ActEvapUStore + + ActEvap = ActEvapSat + ActEvapUStore + + +Capilary rise is determined using the following approach: +first the :math:`K_{sat}` is determined at the water table +:math:`z_{i}`; next a potential capilary rise is determined from the +minimum of the :math:`K_{sat}`, the actual transpiration taken from +the :math:`U` store, the available water in the :math:`S` store and +the deficit of the :math:`U` store. Finally the potential rise is +scaled using the distance between the roots and the water table using: + + :math:`CS=CSF/(CSF+z_{i}-RT)` + +in which :math:`CS` is the scaling factor to multiply the potential +rise with, :math:`CSF` is a model parameter (default = 100, use +CapScale.tbl to set differently) and :math:`RT` the rooting depth. If +the roots reach the water table (:math:`RT>z_{i}`) :math:`CS` is set +to zero thus setting the capilary rise to zero. + +#. Water in the saturated store is transferred laterally along the DEM + using the following steps: + + #. a maximum flux for each cell is determined by determining the {} + over the saturated part and the available water in each cell + + #. water is routed downslope (using the PCRaster accucapacityflux + operator) by multiplying the {} by the slope and limiting the flux + the the maximum determined in the previous step + + #. the program can either use the DEM to route the water or (more + appropriate in flat areas) the actual slope of the water table. + The latter option slows down the program considerably + +#. surplus water in cells as a result of the previous step is added to + the kinematic wave reservoir + + + +Soil temperature +~~~~~~~~~~~~~~~~ + +The near surface soil temperature is modelled using a simple equation [Wigmosta]_: + + .. math:: T_s^{t} = T_s^{t-1} + w (T_a - T_s^{t-1}) + +where :math:`T_s^{t}` is the near-surface soil temperature at time t, :math:`T_a` is air temperature and :math:`w` is a +weighting coefficient determined through calibration (default is 0.1125 for daily timesteps, 0.9 for 3-hourly timesteps) + +if T_s < 0 than a K_{sat} reduction factor (default 0.038) is applied. An S-curve (see plot below) +is used to make a smooth transition (a c-factor of 8 is used). + +.. plot:: plots/s-curve-freezingsoil.py + + +Sub-grid runoff generation +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Sub-grid runoff generaten can be switched on on off in the configuration file. In +general this feature is used if the grid cell size is relatively lager compared +to the variation of topography. In addition you will need to have information +on the ditribution of altotude within a grid-cell. Depending on the topography sub-grid +runoff generation may be useful aroun 1x1km and larger. + +The basis is formed by a sigmoid (:math:`S`) function that is fitted using +a 10, 50 and 90 percentile DEM. The :math:`S` function is defined as: + + .. math:: S = 1.0/(b + e^{(-c (X - a))}) + +Where: + + X = input variable (in this case the absolute scaled groundwater level) + + b = 1.0 + + c = sharpness parameter. Higher values give sharper step + + a = centre-point of the curve (normally the 50% DEM) + +The :math:`c` parameter is estimated by reversing the function above to: + + .. math:: c = log(1.0/p - 1)/(dem_{p} - dem_{50}) + +where: + + percentile is the percentile of :math:`dem_{p}` + + :math:`dem_{50}` is the average altitude in the gridcell + + :math:`dem_{p}` is the altitude below with percentile (p) cells of the dem + are found + + +The outcome of the :math:`S` will range from 0 to 1 for inputs ranging from the +minimum altitude to the maximum altitude (within the gridcell). Thereore, +the calculated groundwater levels within the cell are scale to match the minimum and +maximum altitude within the cell using: + +.. math:: G_s = (A_{max}-A_{min})/FZT/GWPerc + +where: + + :math:`G_s` is the scaling factor + + :math:`A_{max}` the maximum altitude within the cell + + :math:`A_{min}` the minumum altitude within the cell + + :math:`FZT` the total thickness of the soil in the model + + :math:`GWperc` is a dimensionless parameter (from >0 to 1) that determines which + part of the soil profile generates runoff. If it is 1 runoff is generated whenever + there is groundwater in the system. If it is 0.1 only the top 10 % of the + soil profile generated runoff + +:: + + self.DemMax=readmap(self.Dir + "/staticmaps/wflow_demmax") + self.DrainageBase=readmap(self.Dir + "/staticmaps/wflow_demmin") + self.CC = min(100.0,-log(1.0/0.1 - 1)/min(-0.1,self.DrainageBase - self.Altitude)) + self.GWScale = (self.DemMax-self.DrainageBase)/self.FirstZoneThickness / self.RunoffGeneratingGWPerc + + + + +.. note:: + + at present the model uses the drainage base (minimum DEM) and treats this as the 10% percentile + to which the curve is fitted. So at present only two points are used (10 % and 50%) + +.. warning:: + + This is an poorly tested feature + +In the dynamic section of the model the absolute groundwater level is determined and +scaled before it is +fed into the :math:`S` curve function. The result is a estimated saturated fraction within a +the gridcell. The saturated fraction is used to generated Saturation Overland Flow (SOF) +and generate ouflow from the groundwater reservoir: + +1. The saturated conductivity for the average groundwaterlevel is determined +2. The available water at the surface is multiplied by the saturated fraction and + added to the kinematic wave reservoir (SOF) +3. Outflow from the groundwater reservoir is determined using average slope multiplied + by the conductivity and the saturated fraction limited by the amount of water + in the groundwater reservoir. + + + +in dynamic:: + + self.AbsoluteGW=self.DemMax-(self.zi*self.GWScale) + self.SubCellFrac = sCurve(self.AbsoluteGW,c=self.CC,a=self.Altitude+1.0) + self.SubCellRunoff = self.SubCellFrac * FreeWaterDepth + self.SubCellGWRunoff = min(self.SubCellFrac * self.FirstZoneDepth,\ + self.SubCellFrac * self.Slope * self.FirstZoneKsatVer * \ + exp(-self.f * self.zi) * self.timestepsecs/self.basetimestep) + self.FirstZoneDepth=self.FirstZoneDepth-self.SubCellGWRunoff + FreeWaterDepth = FreeWaterDepth - self.SubCellRunoff + + + +Kinematic wave and River Width +------------------------------ + + +The river width is determined from the DEM the upstream area and yearly +average discharge ([Finnegan]_): + +.. math: + + W = [\alpha (\alpha + 2)^{2/3}]^{3/8} Q^{3/8} S^{-3/16} n^{3/8} + +The early average Q at outlet is scaled for each point in the drainage network +with the upstream area. :math:`\alpha` ranges from 5 to > 60. Here 5 is used for hardrock, +largre values are used for sediments + + +Implementation:: + + upstr = catchmenttotal(1, self.TopoLdd) + Qscale = upstr/mapmaximum(upstr) * Qmax + W = (alf * (alf + 2.0)**(0.6666666667))**(0.375) * Qscale**(0.375) *\ + (max(0.0001,windowaverage(self.Slope,celllength() * 4.0)))**(-0.1875) *\ + self.N **(0.375) + RiverWidth = W + + +The table below list commonly used Manning's N values (in the N_River .tbl file). +Please note that the values for non river cells may arguably be set +significantly higher. (Use N.tbl for non-river cells and N_River.tbl for river cells) + +.. csv-table:: Manning's N values + :header: "Type of Channel and Description", "Minimum", "Normal", "Maximum" + :widths: 70,10,10,10 + + "*Main Channels*" + "clean, straight, full stage, no rifts or deep pools", "0.025", "0.03", "0.033 " + "same as above, but more stones and weeds", "0.03", "0.035", "0.04" + "clean, winding, some pools and shoals", "0.033", "0.04","0.045" + "same as above, but some weeds and stones", 0.035, 0.045, 0.05 + "same as above, lower stages, more ineffective slopes and sections", 0.04, 0.048, 0.055 + "same as second with more stones", 0.045, 0.05, 0.06 + "sluggish reaches, weedy, deep pools", 0.05, 0.07, 0.08 + "very weedy reaches, deep pools, or floodways with heavy stand of timber and underbrush", 0.075, 0.1, 0.15 + "*Mountain streams*" + "bottom: gravels, cobbles, and few boulders", 0.03, 0.04, 0.05 + "bottom: cobbles with large boulders", 0.04, 0.05, 0.07 + + + + +Dynamic wave +------------ + +.. warning:: + + As of version 0.93 this is moved to the wflow\_wave module. + +An *experimental* implementation of the full dynamic wave equations has been +implemented. The current implementation is fairly unstable and *very* slow. +It can be switched on by setting dynamicwave=1 in the [dynamicwave] +section of the ini file. See below for an example: + + +:: + + [dynamicwave] + # Switch on dynamic wave for main rivers + dynamicwave=1 + + # Number of timeslices per dynamic wave substep + TsliceDyn=100 + + # 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 supplied timeseries (see levelTss) + # level < 0.0 use upstream water level + fixedLevel = 3.0 + + # if this is set the program will try to keep the volume at the pits at + # a constant value + 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 + + # If set to 1 the program will try to optimise the timestep + # Experimental, mintimestep is the smallest to be used + #AdaptiveTimeStepping = 1 + #mintimestep =1.0 + + + +A description of the implementation of the dynamicwave is given on the +`pcraster website `_. + +In addition to the settings in the ini file you need to give the model additional maps +or lookuptables: + +- ChannelDepth.[map|tbl] - depth of the main channel in metres +- ChannelRoughness.[map|tbl] - manning roughness coefficient (default = 0.03) +- ChannelForm.[map|tbl] - form of the chnaggel (default = 0.0) +- FloodplainWidth.[map|tbl] - width of the floodplain in metres (default = ) + +The following variables for the dynamicwave function are set as follows: + +- ChannelBottomLevel - Taken from the dem +- ChannelLength - Taken from the length in the kinematic wave +- ChannelBottomWidth - taken from the wflow_riverwidth map (this map can be user supplied + or when it is not supplied a geomorphological relation is used) + + +Becuase the dynamic wave can be unstable priming the model with new initial +conditions is best done in several steps: + +#. Run the model with the -I option and the dynamic wave switch off +#. Copy back the resulting state files to the instate directory +#. Re-run the model with the without the -I option +#. Copy back the resulting states of the Dynamic wave to the instate directory + + + +Model variables stores and fluxes +--------------------------------- + +The diagram below shows the stores and fluxes in the model in terms of internal variable names. It +onlys shows the soil and Kinematic wave reservoir, not the canopy model. + +.. digraph:: grids + + compound=true; + node[shape=record]; + UStoreDepth [shape=box]; + OutSide [style=dotted]; + FirstZoneDepth [shape=box]; + UStoreDepth -> FirstZoneDepth [label="Transfer [mm]"]; + FirstZoneDepth -> UStoreDepth [label="CapFlux [mm]"]; + FirstZoneDepth ->KinematicWaveStore [label="ExfiltWaterCubic [m^3/s]"]; + "OutSide" -> UStoreDepth [label="ActInfilt [mm]"]; + UStoreDepth -> OutSide [label="ActEvapUStore [mm]"]; + FirstZoneDepth -> OutSide [label="ActEvap-ActEvapUStore [mm]"]; + FirstZoneDepth -> KinematicWaveStore [label="SubCellGWRunoffCubic [m^3/s]"]; + "OutSide" -> KinematicWaveStore [label="SubCellRunoffCubic [m^3/s]"]; + "OutSide" -> KinematicWaveStore [label="RunoffOpenWater [m^3/s]"] ; + "OutSide" -> KinematicWaveStore [label="FreeWaterDepthCubic [m^3/s]"] ; + + + +Processing of meteorological forcing data +----------------------------------------- + +Although the model has been setup to do as little data processing +as possible it includes an option to apply an altitude correction to the +temperature inputs. The three squares below demonstrate the principle. + +.. digraph:: grids + + node[shape=record]; + a[label="{5|5|5}|{5|5|5}|{5|5|5}"]; + b[label="{1|2|3}|{4|5|6}|{7|8|9}"]; + c[label="{4|3|2}|{1|0|-1}|{-2|-3|-4}"]; + "Average T input grid" -> a + "Correction per cell" -> b + "Resulting T" -> c + +wflow\_sbm takes the correction grid as input and applies this to the input +temperature. The correction grid has to be made outside of the model. +The correction grid is optional. + +.. note:: + + The temperature correction map is specified in the model section of the ini file: + + [model] + TemperatureCorrectionMap=NameOfTheMap + + If the entry is not in the file the correction will not be applied + + +Guidelines for wflow\sbm model parameters +----------------------------------------- + +The tables below shows the most important parameters and suggested ranges + +CanopyGapFraction +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/Cfmax.tbl + +- EoverR - Ratio of average wet canopy evaporation rate over + precipitation rate - usually between 0.06 and 0.15 depending on climate and site. + +- FirstZoneCapacity - + +:: + + FirstZoneKsatVer.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/FirstZoneMinCapacity.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/InfiltCapPath.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/InfiltCapSoil.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/M.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/MaxCanopyStorage.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/MaxLeakage.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/N_River.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/N.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/RootingDepth.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/RunoffGeneratingGWPerc.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/thetaR.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/thetaS.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/TT.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/TTI.tbl + file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/WHC.tbl + + + + +References +---------- + +.. [vertessy] Vertessy, R.A. and H. Elsenbeer, “Distributed modelling of storm flow generation in an Amazonian rainforest catchment: effects of model parameterization,” Water Resources Research, vol. 35, no. 7, pp. 2173–2187, 1999. + +.. [Finnegan] Noah J. Finnegan et al 2005 Controls on the channel width of rivers: Implications for modeling fluvial incision of bedrock" + +.. [Wigmosta] Wigmosta, M. S., L. J. Lane, J. D. Tagestad, and A. M. Coleman (2009), Hydrologic and erosion models to assess land use and management practices affecting soil erosion, Journal of Hydrologic Engineering, 14(1), 27-41. + +wflow_sbm module documentation +============================== + +.. automodule:: wflow_sbm + :members: + :undoc-members: + :show-inheritance: Index: doc/_build/html/_sources/wflow_usage.txt =================================================================== diff -u --- doc/_build/html/_sources/wflow_usage.txt (revision 0) +++ doc/_build/html/_sources/wflow_usage.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,506 @@ +Using the models +================ + +Directory structure: cases and runs +----------------------------------- + +A case is a directory holding all the data needed to run the model. +Multiple cases may exist next to each other in separate directories. The +model will only work with one case at the time. If no case is +specified when starting the model a default case (default\_sbm or +default\_hbv) is assumed. Within a case the model output (the results) +are stored in a separate directory. This directory is called the run, +indicated with a runId. This structure is indicated in the figure below: + +.. digraph:: file_system + + //rankdir=LR; + size="8,11"; + "Case" -> "inmaps"; + "Case" -> "instate"; + "Case" -> "intbl"; + "Case" -> "intss"; + "Case" -> "outstate"; + "Case" -> "Run"; + "Case" -> "staticmaps"; + "Run" -> " intbl"; + "Run" -> "outmaps"; + "Run" -> " outstate"; + "Run" -> "outsum"; + "Run" -> "runinfo"; + + + +If you want to save the results and not overwrite the results from a previous +run a new runId must be specified. + + +inmaps + Directory holding the dynamic input data. Maps of Precipitation, + potential evapotranspiration and (optionally) temperature in pcraster + mapstack format. + +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. This is done using the -I command-line option. + +intbl + Directory holding the lookup tables. These hold the model parameters + specified per landuse/soiltype class. Note that you can use the -i + option to specify an alternative name (e.g. to support an + alternative model calibration) + +intss + Directory holding the scalar input timeseries. Scalar input data is + only assumed if the ScalarInput entry in the ini file is set to 1 + (True). + +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. + +wflow\_sbm\|hbv.ini + The default settings file for wflow\_sbm of wflow\_hbv + + +Running the model +----------------- + +Overview +~~~~~~~~ + +In general the model is run from the dos/windows/linux command line. +Based on the system settings you can call the wFlow\_[sbm|hbv].py file +directly or you need to call python with the script as the first argument +e.g.: + +:: + + python wflow_sbm.py -C myCase -R calib_run -T 365 -f + +In the example above the wflow\_sbm model is run using the +information in case myCase storing the results in runId calib\_run. A +total to 365 timesteps is performed and the the model will overwrite +existing output in the calib\_run directory. The default .ini file +wflow\_sbm.ini located in the myCase directory is read at startup. + + +Command-line options +~~~~~~~~~~~~~~~~~~~~ + +The command line options for wflow are summarized below, use wflow +-h to view them at the command line: + +:: + + 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] + +:: + + -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. + -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) + -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 + -E: Switch on reinfiltration of overland flow + -c: name of wflow the configuration file (default: Cassename/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 program 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. + -u: list of gauges/columns to use in update. Format: + -u [1 , 4 ,13] + The above example uses column 1, 4 and 13 + Note that this also sets the order in which the updating takes place! In + general specify downstream gauges first. + -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 'Precipitation' : 1.2 to increase Precipitation + by 20%, multiply with 1.2) + -v: set verbosity level + +wflow\_sbm\|hbv.ini file +------------------------ + +The wflow\_sbm\|hbv.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]). Variables can be set in each section using a +``keyword = value`` combination (e.g. ``ScalarInput = 1``). The default +settings for the ini file are given in the subsections below. + +[model] Options for all models: + + +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 + directory., If set to 1 the model will use input timeseries from the + inputtss directory and interpolate these to maps at run-time. + +InterpolationMethod=pol + Interpolation method when using scalar timeseries input. The method + can be ``pol`` (Thiessen polygons) or ``inv`` (Inverse Distance). + The same method is used for all parameters (P. PET, T). + +WIMaxScale=0.8 + Scaling for the topographical wetness vs soil depth method + +Tslice=1 + Number of timeslices per timestep used in the kinematic wave formula + +UpdMaxDist=10000.0 + Maximum distance from the gauge to apply updating to. Only used if + you force the model with measured discharge + +fewsrun=0 + Indicates the model is running from Delft-FEWS or not + +Specific options for wflow\_sbm : + +RunoffGenSigmaFunction = 0 + Use subcell runoff generation based on fitting a Sigmoid function to + percentile Dems.(wflow\_sbm only) + + +reinit = 0 + If set to 1 (one) the model will not read the save initial state files + from the instates directory but start with cold states. + +OverWriteInit = 0 + If set to one the initial states will be overwritten + +updating = 0 + Set to 1 to switch on Q updating. + +updateFile + If updating is set to 1 specify a + +sCatch = 0 + If set to another value than 0 the model will only use only the specified subcatchment + +inblt = intbl + directory from which to read the lookup tables (relative to the case directory) + +timestepsecs = 86400 + timestep of the model in seconds + +Alpha = 60 + Alpha term in the river width estimation function + +AnnualDischarge = 300 + Average annual discharge at the outlet of the catchment for the river wiidth estimation function. + +UpdMaxDist = 100 + Maximum distance from the gauge used in updating for which to update the kinamatic wave reservoir (in model units, metres or degree lat lon) + +waterdem = 0 + if set to 1 the ldd will be recalculate each timestep based on the DEM + the water level + +reInfilt = 0 + If set to 1 water from the kinamatic wave reservoir can reinfiltrate in the soil + + +The options below should normally not be needed.Here you can chnage the location of some of the input maps. + + +wflow_subcatch=staticmaps/wflow_subcatch.map + map with the subcatchments + +wflow_dem=staticmaps/wflow_dem.map + the digital elevation map + +wflow_ldd=staticmaps/wflow_ldd.map + the local drainage network + +wflow_river=staticmaps/wflow_river.map + all the cells marked as river + +wflow_riverlength=staticmaps/wflow_riverlength.map + the length of the 'river' in each cell + +wflow_riverlength_fact=staticmaps/wflow_riverlength_fact.map + factor to multiply the river length with + +wflow_landuse=staticmaps/wflow_landuse.map + landuse map + +wflow_soil=staticmaps/wflow_soil.map + soil map + +wflow_gauges=staticmaps/wflow_gauges.map + map with the gauge locations + +wflow_inflow=staticmaps/wflow_inflow.map + map with forced inflow points (optional) + +wflow_mgauges=staticmaps/wflow_mgauges.map + map with locations of the meteorological gauges (only neede if you use scalar timeseries as input) + +wflow_riverwidth=staticmaps/wflow_riverwidth.map + map with the width of the river + + + +[defaultfortbl] + +RunoffGeneratingGWPerc = 0.1 + Default value for the upper fraction of the groundwater reservoir + that generates runoff (wflow\_sbm only) + + + +[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. + +[outputmaps] + +Outputmaps to save per timestep. Valid options for the keys in the +wFlow\_sbm model are all variables visible the dynamic section of the +model (see the code). A few useful variables are listed below. + +:: + + [outputmaps] + self.Runoff=run + self.SnowMelt=sno + self.FirstZoneFlux=fzf + self.FirstZoneDepth=fir + + +.. tip:: + NB See the wflow.py code for all the available variables as this list + is incomplete. + +The values on the right side of the equal sign can be choosen freely. + +Example content: + +:: + + Self.Runoff=run + self.FirstZoneFlux=fzf + self.FirstZoneDepth=fir + + +[outputtss] + +.. note:: + + Depricated. This is the old method. Use outputcsv_0 or outputtss_0 instead (see below) + +List all timeseries here that you want to have saved (in tss format). +Timeseries are produced as averages per subcatchment. Note that each +timeseries you add here slows down the program so only save what you +need, especially in operational applications. Possible values are: + + Note the run.tss and lev.tss are always saved (runoff and water + level at the gauge locations) + + + +:: + + [outputtss] + self.ActEvap=aet + self.watbal=wat + self.PotEvap=pot + self.FirstZoneDepth=fir + self.Interception=int + self.UStoreDepth=ust + self.zi=zi_ + self.ExfiltWater=exf + self.UStoreCapacity=tde + self.Transfer=tra + self.Ksat=ksa + self.Snow=sno + self.SnowMelt=snm + self.SnowWater=snw + self.FirstZoneFlux=fzf + + +[outputcsv_0-n] +[outputtss_0-n] + +Number of sections to define output timeseries in csv format. Each section +should at lears contain one samplemap item and one or more variables to save. +The samplemap is the map that determines how the timesries are averaged/sampled. +All other items are variabale filename pairs. The filename is given relative +to the case directory. + +Example: + +:: + + [outputcsv_0] + samplemap=staticmaps/wflow_subcatch.map + self.SurfaceRunoffMM=Qsubcatch_avg.csv + + [outputcsv_1] + samplemap=staticmaps/wflow_gauges.map + self.SurfaceRunoffMM=Qgauge.csv + self.WaterLevel=Hgauge.csv + + [outputtss_0] + samplemap=staticmaps/wflow_landuse.map + self.SurfaceRunoffMM=Qlu.tss + + + +In the above example the discharge of this model (self.SurfaceRunoffMM) is +saved as an average per subcatchment, a sample at the gauge locations and as +an average per landuse. + + +[inputmapstacks] + +This section can be used to overwrite the default names of the input mapstacks + +Precipitation = /inmaps/P + timeseries for rainfall + +EvapoTranspiration = /inmaps/PET + potential evapotranspiration + +Temperature = /inmaps/TEMP + temperature time series + +Inflow = /inmaps/IF + in/outflow locations (abstractions) + + + + + + +Updating using measured data +---------------------------- + +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 determined + +- this difference is added to the unsaturated store for all cells + +- the ratio of measured Q divided by simulated Q at the outlet is used + to multiply the kinematic wave store with. This ratio is scaled + according to a maximum distance from the gauge. + + +All possible options in wflow\_sbm.ini file +------------------------------------------- + +:: + + + [outputtss] + # All variables in the dynamic section can be put here + + [defaultfortbl] + RunoffGeneratingGWPerc = 0.1 + + [layout] + sizeinmetres = 1 + + [fit] + areamap = staticmaps/wflow_subcatch.map + areacode = 1 + Q = testing.tss + WarmUpSteps = 1 + ColMeas = 0 + parameter_1 = RootingDepth + parameter_0 = M + ColSim = 0 + + [misc] + + [outputmaps] + self.SurfaceRunoff = run + + [framework] + debug = 0 + outputformat = 1 + + [inputmapstacks] + Inflow = /inmaps/IF + Precipitation = /inmaps/P + Temperature = /inmaps/TEMP + EvapoTranspiration = /inmaps/PET + + [model] + wflow_river = staticmaps/wflow_river.map + InterpolationMethod = inv + reinit = 1 + WIMaxScale = 0.6 + wflow_riverlength_fact = staticmaps/wflow_riverlength_fact.map + OverWriteInit = 0 + intbl = intbl + wflow_riverwidth = staticmaps/wflow_riverwidth.map + wflow_soil = staticmaps/wflow_soil.map + ExternalQbase = 0 + updateFile = no_set + sCatch = 0 + Alpha = 120 + UpdMaxDist = 300000.0 + wflow_subcatch = staticmaps/wflow_subcatch.map + wflow_mgauges = staticmaps/wflow_mgauges.map + timestepsecs = 86400 + RunoffGeneratingGWPerc = 1.0 + RunoffGenSigmaFunction = 1 + ScalarInput = 0 + reInfilt = 0 + fewsrun = 0 + wflow_dem = staticmaps/wflow_dem.map + ModelSnow = 0 + AnnualDischarge = 2290 + wflow_landuse = staticmaps/wflow_landuse.map + updating = 0 + TemperatureCorrectionMap = staticmaps/wflow_tempcor.map + wflow_inflow = staticmaps/wflow_inflow.map + wflow_riverlength = staticmaps/wflow_riverlength.map + wflow_ldd = staticmaps/wflow_ldd.map + wflow_gauges = staticmaps/wflow_gauges.map + Tslice = 1 + waterdem = 0 + Index: doc/_build/html/_sources/wflow_wave.txt =================================================================== diff -u --- doc/_build/html/_sources/wflow_wave.txt (revision 0) +++ doc/_build/html/_sources/wflow_wave.txt (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,114 @@ +wflow_wave Module +================== + + +.. warning:: + + The documentation is incomplete + +Introduction +------------ +An *experimental* implementation of the full dynamic wave equations has been +implemented. The current implementation is fairly unstable and *very* slow. + +However, in flat of tidal areas and areas that flood the dynamic wave can provide +much better results. The plot below is from the Rio Mamore in Bolivia in the +lower partes of the river with extensive wetlands that flood nearly each year. + + +.. plot:: plots/kin-dyn.py + + +Dependencies +------------ +This module is setup to be run in *an existing case and runid* of a wflow\_sbm +or wflow\_hbv model. In order for wflow\_wave to run they must have saved +discharge and waterlevel for each timesteps. This output will be used as a forcing +for the dynamic wave module. The wflow\_wave module will also use the existing ldd +and DEM + + +Configuration +------------- + + +It needs anumber of settings in the ini file. The default name for the file +is wflow\_wave.ini. it is also possible to insert this section in the +wflow\_sbm or wflow\_hbv ini file and point to that file. + +See below for an example: + +:: + + [inputmapstacks] + # Name of the mapstack with discharge (output from the hydrological model) + Q = run + # Name of the mapstack with waterlevel (output from the hydrological model) + H = lev + + [dynamicwave] + + # Number of timeslices per dynamic wave substep + TsliceDyn=100 + + # 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 supplied timeseries (see levelTss) + # level < 0.0 use upstream water level + fixedLevel = 3.0 + + # if this is set the program will try to keep the volume at the pits at + # a constant value + 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 + + # If set to 1 the program will try to optimise the timestep + # Experimental, mintimestep is the smallest to be used + AdaptiveTimeStepping = 1 + mintimestep =0.1 + + +A description of the implementation of the dynamicwave is given on the +`pcraster website `_. + +In addition to the settings in the ini file you need to give the model additional maps +or lookuptables in the staticmaps or intbl directories: + + +- ChannelDepth.[map|tbl] - depth of the main channel in metres +- ChannelRoughness.[map|tbl] - 1/n n = manning roughness coefficient (default = 1/0.03) +- ChannelForm.[map|tbl] - form of the channel (default = 1.0) +- FloodplainWidth.[map|tbl] - width of the floodplain in metres (default = 0) + + +The following variables for the dynamicwave function are set as follows and are taken from the +hydrological model run by default: + +- ChannelBottomLevel - Taken from the dem (wflow_dem.map in the staticmaps dir) +- ChannelLength - Taken from the length in the kinematic wave (DCL.map from the outsum dir) +- ChannelBottomWidth - taken from the wflow_riverwidth map from the outsum dir + + + + + +wflow_wave module documentation +================================ + +.. automodule:: wflow_wave + :members: + :undoc-members: + :show-inheritance: Index: doc/_build/html/_static/agogo.css =================================================================== diff -u --- doc/_build/html/_static/agogo.css (revision 0) +++ doc/_build/html/_static/agogo.css (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,464 @@ +/* + * agogo.css_t + * ~~~~~~~~~~~ + * + * Sphinx stylesheet -- agogo theme. + * + * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +* { + margin: 0px; + padding: 0px; +} + +body { + font-family: "Verdana", Arial, sans-serif; + line-height: 1.4em; + color: black; + background-color: #eeeeec; +} + + +/* Page layout */ + +div.header, div.content, div.footer { + width: 70em; + margin-left: auto; + margin-right: auto; +} + +div.header-wrapper { + background: #555573 url(bgtop.png) top left repeat-x; + border-bottom: 3px solid #2e3436; +} + + +/* Default body styles */ +a { + color: #ce5c00; +} + +div.bodywrapper a, div.footer a { + text-decoration: underline; +} + +.clearer { + clear: both; +} + +.left { + float: left; +} + +.right { + float: right; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +h1, h2, h3, h4 { + font-family: "Georgia", "Times New Roman", serif; + font-weight: normal; + color: #3465a4; + margin-bottom: .8em; +} + +h1 { + color: #204a87; +} + +h2 { + padding-bottom: .5em; + border-bottom: 1px solid #3465a4; +} + +a.headerlink { + visibility: hidden; + color: #dddddd; + padding-left: .3em; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink { + visibility: visible; +} + +img { + border: 0; +} + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 2px 7px 1px 7px; + border-left: 0.2em solid black; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +dt:target, .highlighted { + background-color: #fbe54e; +} + +/* Header */ + +div.header { + padding-top: 10px; + padding-bottom: 10px; +} + +div.header .headertitle { + font-family: "Georgia", "Times New Roman", serif; + font-weight: normal; + font-size: 180%; + letter-spacing: .08em; + margin-bottom: .8em; +} + +div.header .headertitle a { + color: white; +} + +div.header div.rel { + margin-top: 1em; +} + +div.header div.rel a { + color: #fcaf3e; + letter-spacing: .1em; + text-transform: uppercase; +} + +p.logo { + float: right; +} + +img.logo { + border: 0; +} + + +/* Content */ +div.content-wrapper { + background-color: white; + padding-top: 20px; + padding-bottom: 20px; +} + +div.document { + width: 50em; + float: left; +} + +div.body { + padding-right: 2em; + text-align: justify; +} + +div.document h1 { + line-height: 120%; +} + +div.document ul { + margin: 1.5em; + list-style-type: square; +} + +div.document dd { + margin-left: 1.2em; + margin-top: .4em; + margin-bottom: 1em; +} + +div.document .section { + margin-top: 1.7em; +} +div.document .section:first-child { + margin-top: 0px; +} + +div.document div.highlight { + padding: 3px; + background-color: #eeeeec; + border-top: 2px solid #dddddd; + border-bottom: 2px solid #dddddd; + margin-top: .8em; + margin-bottom: .8em; +} + +div.document h2 { + margin-top: .7em; +} + +div.document p { + margin-bottom: .5em; +} + +div.document li.toctree-l1 { + margin-bottom: 1em; +} + +div.document .descname { + font-weight: bold; +} + +div.document .docutils.literal { + background-color: #eeeeec; + padding: 1px; +} + +div.document .docutils.xref.literal { + background-color: transparent; + padding: 0px; +} + +div.document blockquote { + margin: 1em; +} + +div.document ol { + margin: 1.5em; +} + + +/* Sidebar */ + +div.sidebar { + width: 20em; + float: right; + font-size: .9em; +} + +div.sidebar a, div.header a { + text-decoration: none; +} + +div.sidebar a:hover, div.header a:hover { + text-decoration: underline; +} + +div.sidebar h3 { + color: #2e3436; + text-transform: uppercase; + font-size: 130%; + letter-spacing: .1em; +} + +div.sidebar ul { + list-style-type: none; +} + +div.sidebar li.toctree-l1 a { + display: block; + padding: 1px; + border: 1px solid #dddddd; + background-color: #eeeeec; + margin-bottom: .4em; + padding-left: 3px; + color: #2e3436; +} + +div.sidebar li.toctree-l2 a { + background-color: transparent; + border: none; + margin-left: 1em; + border-bottom: 1px solid #dddddd; +} + +div.sidebar li.toctree-l3 a { + background-color: transparent; + border: none; + margin-left: 2em; + border-bottom: 1px solid #dddddd; +} + +div.sidebar li.toctree-l2:last-child a { + border-bottom: none; +} + +div.sidebar li.toctree-l1.current a { + border-right: 5px solid #fcaf3e; +} + +div.sidebar li.toctree-l1.current li.toctree-l2 a { + border-right: none; +} + +div.sidebar input[type="text"] { + width: 170px; +} + +div.sidebar input[type="submit"] { + width: 30px; +} + + +/* Footer */ + +div.footer-wrapper { + background: url(bgfooter.png) top left repeat-x; + border-top: 4px solid #babdb6; + padding-top: 10px; + padding-bottom: 10px; + min-height: 80px; +} + +div.footer, div.footer a { + color: #888a85; +} + +div.footer .right { + text-align: right; +} + +div.footer .left { + text-transform: uppercase; +} + + +/* Styles copied from basic theme */ + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +/* -- viewcode extension ---------------------------------------------------- */ + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family:: "Verdana", Arial, sans-serif; +} + +div.viewcode-block:target { + margin: -1px -3px; + padding: 0 3px; + background-color: #f4debf; + border-top: 1px solid #ac9; + border-bottom: 1px solid #ac9; +} \ No newline at end of file Index: doc/_build/html/_static/ajax-loader.gif =================================================================== diff -u Binary files differ Index: doc/_build/html/_static/basic.css =================================================================== diff -u --- doc/_build/html/_static/basic.css (revision 0) +++ doc/_build/html/_static/basic.css (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,537 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 0px; + margin-left: -100%; + font-size: 90%; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox input[type="text"] { + width: 170px; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + width: 30px; +} + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- general body styles --------------------------------------------------- */ + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.field-list ul { + padding-left: 1em; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px 7px 0 7px; + background-color: #ffe; + width: 40%; + float: right; +} + +p.sidebar-title { + font-weight: bold; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px 7px 0 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +div.admonition dl { + margin-bottom: 0; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + border: 0; + border-collapse: collapse; +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.field-list td, table.field-list th { + border: 0 !important; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dt:target, .highlighted { + background-color: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.optional { + font-size: 1.3em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +td.linenos pre { + padding: 5px 0px; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +tt.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +tt.descclassname { + background-color: transparent; +} + +tt.xref, a tt { + background-color: transparent; + font-weight: bold; +} + +h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file Index: doc/_build/html/_static/bgfooter.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_static/bgtop.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_static/comment-bright.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_static/comment-close.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_static/comment.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_static/default.css =================================================================== diff -u --- doc/_build/html/_static/default.css (revision 0) +++ doc/_build/html/_static/default.css (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,507 @@ +/** + * Alternate Sphinx design + * Originally created by Armin Ronacher for Werkzeug, adapted by Georg Brandl. + */ + +body { + font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif; + font-size: 14px; + letter-spacing: -0.01em; + line-height: 150%; + text-align: center; + /*background-color: #AFC1C4; */ + background-color: #BFD1D4; + color: black; + padding: 0; + border: 1px solid #aaa; + + margin: 0px 80px 0px 80px; + min-width: 740px; +} + +a { + color: #CA7900; + text-decoration: none; +} + +a:hover { + color: #2491CF; +} + +pre { + font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.95em; + letter-spacing: 0.015em; + padding: 0.5em; + border: 1px solid #ccc; + background-color: #f8f8f8; +} + +td.linenos pre { + padding: 0.5em 0; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +cite, code, tt { + font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.95em; + letter-spacing: 0.01em; +} + +hr { + border: 1px solid #abc; + margin: 2em; +} + +tt { + background-color: #f2f2f2; + border-bottom: 1px solid #ddd; + color: #333; +} + +tt.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; + border: 0; +} + +tt.descclassname { + background-color: transparent; + border: 0; +} + +tt.xref { + background-color: transparent; + font-weight: bold; + border: 0; +} + +a tt { + background-color: transparent; + font-weight: bold; + border: 0; + color: #CA7900; +} + +a tt:hover { + color: #2491CF; +} + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.refcount { + color: #060; +} + +dt:target, +.highlight { + background-color: #fbe54e; +} + +dl.class, dl.function { + border-top: 2px solid #888; +} + +dl.method, dl.attribute { + border-top: 1px solid #aaa; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +pre { + line-height: 120%; +} + +pre a { + color: inherit; + text-decoration: underline; +} + +.first { + margin-top: 0 !important; +} + +div.document { + background-color: white; + text-align: left; + background-image: url(contents.png); + background-repeat: repeat-x; +} + +/* +div.documentwrapper { + width: 100%; +} +*/ + +div.clearer { + clear: both; +} + +div.related h3 { + display: none; +} + +div.related ul { + background-image: url(navigation.png); + height: 2em; + list-style: none; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 0; + padding-left: 10px; +} + +div.related ul li { + margin: 0; + padding: 0; + height: 2em; + float: left; +} + +div.related ul li.right { + float: right; + margin-right: 5px; +} + +div.related ul li a { + margin: 0; + padding: 0 5px 0 5px; + line-height: 1.75em; + color: #EE9816; +} + +div.related ul li a:hover { + color: #3CA8E7; +} + +div.body { + margin: 0; + padding: 0.5em 20px 20px 20px; +} + +div.bodywrapper { + margin: 0 240px 0 0; + border-right: 1px solid #ccc; +} + +div.body a { + text-decoration: underline; +} + +div.sphinxsidebar { + margin: 0; + padding: 0.5em 15px 15px 0; + width: 210px; + float: right; + text-align: left; +/* margin-left: -100%; */ +} + +div.sphinxsidebar h4, div.sphinxsidebar h3 { + margin: 1em 0 0.5em 0; + font-size: 0.9em; + padding: 0.1em 0 0.1em 0.5em; + color: white; + border: 1px solid #86989B; + background-color: #AFC1C4; +} + +div.sphinxsidebar ul { + padding-left: 1.5em; + margin-top: 7px; + list-style: none; + padding: 0; + line-height: 130%; +} + +div.sphinxsidebar ul ul { + list-style: square; + margin-left: 20px; +} + +p { + margin: 0.8em 0 0.5em 0; +} + +p.rubric { + font-weight: bold; +} + +h1 { + margin: 0; + padding: 0.7em 0 0.3em 0; + font-size: 1.5em; + color: #11557C; +} + +h2 { + margin: 1.3em 0 0.2em 0; + font-size: 1.35em; + padding: 0; +} + +h3 { + margin: 1em 0 -0.3em 0; + font-size: 1.2em; +} + +h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { + color: black!important; +} + +h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { + display: none; + margin: 0 0 0 0.3em; + padding: 0 0.2em 0 0.2em; + color: #aaa!important; +} + +h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, +h5:hover a.anchor, h6:hover a.anchor { + display: inline; +} + +h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover, +h5 a.anchor:hover, h6 a.anchor:hover { + color: #777; + background-color: #eee; +} + +table { + border-collapse: collapse; + margin: 0 -0.5em 0 -0.5em; +} + +table td, table th { + padding: 0.2em 0.5em 0.2em 0.5em; +} + +div.footer { + background-color: #E3EFF1; + color: #86989B; + padding: 3px 8px 3px 0; + clear: both; + font-size: 0.8em; + text-align: right; +} + +div.footer a { + color: #86989B; + text-decoration: underline; +} + +div.pagination { + margin-top: 2em; + padding-top: 0.5em; + border-top: 1px solid black; + text-align: center; +} + +div.sphinxsidebar ul.toc { + margin: 1em 0 1em 0; + padding: 0 0 0 0.5em; + list-style: none; +} + +div.sphinxsidebar ul.toc li { + margin: 0.5em 0 0.5em 0; + font-size: 0.9em; + line-height: 130%; +} + +div.sphinxsidebar ul.toc li p { + margin: 0; + padding: 0; +} + +div.sphinxsidebar ul.toc ul { + margin: 0.2em 0 0.2em 0; + padding: 0 0 0 1.8em; +} + +div.sphinxsidebar ul.toc ul li { + padding: 0; +} + +div.admonition, div.warning { + font-size: 0.9em; + margin: 1em 0 0 0; + border: 1px solid #86989B; + background-color: #f7f7f7; +} + +div.admonition p, div.warning p { + margin: 0.5em 1em 0.5em 1em; + padding: 0; +} + +div.admonition pre, div.warning pre { + margin: 0.4em 1em 0.4em 1em; +} + +div.admonition p.admonition-title, +div.warning p.admonition-title { + margin: 0; + padding: 0.1em 0 0.1em 0.5em; + color: white; + border-bottom: 1px solid #86989B; + font-weight: bold; + background-color: #AFC1C4; +} + +div.warning { + border: 1px solid #940000; +} + +div.warning p.admonition-title { + background-color: #CF0000; + border-bottom-color: #940000; +} + +div.admonition ul, div.admonition ol, +div.warning ul, div.warning ol { + margin: 0.1em 0.5em 0.5em 3em; + padding: 0; +} + +div.versioninfo { + margin: 1em 0 0 0; + border: 1px solid #ccc; + background-color: #DDEAF0; + padding: 8px; + line-height: 1.3em; + font-size: 0.9em; +} + + +a.headerlink { + color: #c60f0f!important; + font-size: 1em; + margin-left: 6px; + padding: 0 4px 0 4px; + text-decoration: none!important; + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink { + visibility: visible; +} + +a.headerlink:hover { + background-color: #ccc; + color: white!important; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +img.inheritance { + border: 0px +} + +form.pfform { + margin: 10px 0 20px 0; +} + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} Index: doc/_build/html/_static/doctools.js =================================================================== diff -u --- doc/_build/html/_static/doctools.js (revision 0) +++ doc/_build/html/_static/doctools.js (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,238 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for all documentation. + * + * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + +/** + * make the code below compatible with browsers without + * an installed firebug like debugger +if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", + "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", + "profile", "profileEnd"]; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {}; +} + */ + +/** + * small helper function to urldecode strings + */ +jQuery.urldecode = function(x) { + return decodeURIComponent(x).replace(/\+/g, ' '); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s == 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node) { + if (node.nodeType == 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { + var span = document.createElement("span"); + span.className = className; + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this); + }); + } + } + return this.each(function() { + highlight(this); + }); +}; + +/** + * Small JavaScript module for the documentation. + */ +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initIndexTable(); + }, + + /** + * i18n support + */ + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, + LOCALE : 'unknown', + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated == 'undefined') + return string; + return (typeof translated == 'string') ? translated : translated[0]; + }, + + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated == 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; + }, + + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; + }, + + /** + * add context elements like header anchor links + */ + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, + + /** + * workaround a firefox stupidity + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash && $.browser.mozilla) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + if (!body.length) { + body = $('body'); + } + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlighted'); + }); + }, 10); + $('') + .appendTo($('#searchbox')); + } + }, + + /** + * init the domain index toggle buttons + */ + initIndexTable : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + $('tr.cg-' + idnum).toggle(); + if (src.substr(-9) == 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { + togglers.click(); + } + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('#searchbox .highlight-link').fadeOut(300); + $('span.highlighted').removeClass('highlighted'); + }, + + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this == '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + } +}; + +// quick alias for translations +_ = Documentation.gettext; + +$(document).ready(function() { + Documentation.init(); +}); Index: doc/_build/html/_static/down-pressed.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_static/down.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_static/file.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_static/jquery.js =================================================================== diff -u --- doc/_build/html/_static/jquery.js (revision 0) +++ doc/_build/html/_static/jquery.js (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,2 @@ +/*! jQuery v1.8.3 jquery.com | jquery.org/license */ +(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
t
",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
","
"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file Index: doc/_build/html/_static/logo.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_static/minus.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_static/plus.png =================================================================== diff -u Binary files differ Index: doc/_build/html/_static/pygments.css =================================================================== diff -u --- doc/_build/html/_static/pygments.css (revision 0) +++ doc/_build/html/_static/pygments.css (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,62 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #eeffcc; } +.highlight .c { color: #408090; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #007020; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #007020 } /* Comment.Preproc */ +.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #333333 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #007020 } /* Keyword.Pseudo */ +.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #902000 } /* Keyword.Type */ +.highlight .m { color: #208050 } /* Literal.Number */ +.highlight .s { color: #4070a0 } /* Literal.String */ +.highlight .na { color: #4070a0 } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.highlight .no { color: #60add5 } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #007020 } /* Name.Exception */ +.highlight .nf { color: #06287e } /* Name.Function */ +.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #bb60d5 } /* Name.Variable */ +.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #208050 } /* Literal.Number.Float */ +.highlight .mh { color: #208050 } /* Literal.Number.Hex */ +.highlight .mi { color: #208050 } /* Literal.Number.Integer */ +.highlight .mo { color: #208050 } /* Literal.Number.Oct */ +.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ +.highlight .sc { color: #4070a0 } /* Literal.String.Char */ +.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ +.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ +.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #c65d09 } /* Literal.String.Other */ +.highlight .sr { color: #235388 } /* Literal.String.Regex */ +.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ +.highlight .ss { color: #517918 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ +.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ +.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ +.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file Index: doc/_build/html/_static/searchtools.js =================================================================== diff -u --- doc/_build/html/_static/searchtools.js (revision 0) +++ doc/_build/html/_static/searchtools.js (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,622 @@ +/* + * searchtools.js_t + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilties for the full-text search. + * + * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + + +/** + * Porter Stemmer + */ +var Stemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + + + +/** + * Simple result scoring code. + */ +var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [filename, title, anchor, descr, score] + // and returns the new score. + /* + score: function(result) { + return result[4]; + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: {0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5}, // used to be unimportantResults + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + // query found in terms + term: 5 +}; + + +/** + * Search Module + */ +var Search = { + + _index : null, + _queued_query : null, + _pulse_status : -1, + + init : function() { + var params = $.getQueryParameters(); + if (params.q) { + var query = params.q[0]; + $('input[name="q"]')[0].value = query; + this.performSearch(query); + } + }, + + loadIndex : function(url) { + $.ajax({type: "GET", url: url, data: null, + dataType: "script", cache: true, + complete: function(jqxhr, textstatus) { + if (textstatus != "success") { + document.getElementById("searchindexloader").src = url; + } + }}); + }, + + setIndex : function(index) { + var q; + this._index = index; + if ((q = this._queued_query) !== null) { + this._queued_query = null; + Search.query(q); + } + }, + + hasIndex : function() { + return this._index !== null; + }, + + deferQuery : function(query) { + this._queued_query = query; + }, + + stopPulse : function() { + this._pulse_status = 0; + }, + + startPulse : function() { + if (this._pulse_status >= 0) + return; + function pulse() { + var i; + Search._pulse_status = (Search._pulse_status + 1) % 4; + var dotString = ''; + for (i = 0; i < Search._pulse_status; i++) + dotString += '.'; + Search.dots.text(dotString); + if (Search._pulse_status > -1) + window.setTimeout(pulse, 500); + } + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch : function(query) { + // create the required interface elements + this.out = $('#search-results'); + this.title = $('

' + _('Searching') + '

').appendTo(this.out); + this.dots = $('').appendTo(this.title); + this.status = $('

').appendTo(this.out); + this.output = $('
'); + } + // Prettify the comment rating. + comment.pretty_rating = comment.rating + ' point' + + (comment.rating == 1 ? '' : 's'); + // Make a class (for displaying not yet moderated comments differently) + comment.css_class = comment.displayed ? '' : ' moderate'; + // Create a div for this comment. + var context = $.extend({}, opts, comment); + var div = $(renderTemplate(commentTemplate, context)); + + // If the user has voted on this comment, highlight the correct arrow. + if (comment.vote) { + var direction = (comment.vote == 1) ? 'u' : 'd'; + div.find('#' + direction + 'v' + comment.id).hide(); + div.find('#' + direction + 'u' + comment.id).show(); + } + + if (opts.moderator || comment.text != '[deleted]') { + div.find('a.reply').show(); + if (comment.proposal_diff) + div.find('#sp' + comment.id).show(); + if (opts.moderator && !comment.displayed) + div.find('#cm' + comment.id).show(); + if (opts.moderator || (opts.username == comment.username)) + div.find('#dc' + comment.id).show(); + } + return div; + } + + /** + * A simple template renderer. Placeholders such as <%id%> are replaced + * by context['id'] with items being escaped. Placeholders such as <#id#> + * are not escaped. + */ + function renderTemplate(template, context) { + var esc = $(document.createElement('div')); + + function handle(ph, escape) { + var cur = context; + $.each(ph.split('.'), function() { + cur = cur[this]; + }); + return escape ? esc.text(cur || "").html() : cur; + } + + return template.replace(/<([%#])([\w\.]*)\1>/g, function() { + return handle(arguments[2], arguments[1] == '%' ? true : false); + }); + } + + /** Flash an error message briefly. */ + function showError(message) { + $(document.createElement('div')).attr({'class': 'popup-error'}) + .append($(document.createElement('div')) + .attr({'class': 'error-message'}).text(message)) + .appendTo('body') + .fadeIn("slow") + .delay(2000) + .fadeOut("slow"); + } + + /** Add a link the user uses to open the comments popup. */ + $.fn.comment = function() { + return this.each(function() { + var id = $(this).attr('id').substring(1); + var count = COMMENT_METADATA[id]; + var title = count + ' comment' + (count == 1 ? '' : 's'); + var image = count > 0 ? opts.commentBrightImage : opts.commentImage; + var addcls = count == 0 ? ' nocomment' : ''; + $(this) + .append( + $(document.createElement('a')).attr({ + href: '#', + 'class': 'sphinx-comment-open' + addcls, + id: 'ao' + id + }) + .append($(document.createElement('img')).attr({ + src: image, + alt: 'comment', + title: title + })) + .click(function(event) { + event.preventDefault(); + show($(this).attr('id').substring(2)); + }) + ) + .append( + $(document.createElement('a')).attr({ + href: '#', + 'class': 'sphinx-comment-close hidden', + id: 'ah' + id + }) + .append($(document.createElement('img')).attr({ + src: opts.closeCommentImage, + alt: 'close', + title: 'close' + })) + .click(function(event) { + event.preventDefault(); + hide($(this).attr('id').substring(2)); + }) + ); + }); + }; + + var opts = { + processVoteURL: '/_process_vote', + addCommentURL: '/_add_comment', + getCommentsURL: '/_get_comments', + acceptCommentURL: '/_accept_comment', + deleteCommentURL: '/_delete_comment', + commentImage: '/static/_static/comment.png', + closeCommentImage: '/static/_static/comment-close.png', + loadingImage: '/static/_static/ajax-loader.gif', + commentBrightImage: '/static/_static/comment-bright.png', + upArrow: '/static/_static/up.png', + downArrow: '/static/_static/down.png', + upArrowPressed: '/static/_static/up-pressed.png', + downArrowPressed: '/static/_static/down-pressed.png', + voting: false, + moderator: false + }; + + if (typeof COMMENT_OPTIONS != "undefined") { + opts = jQuery.extend(opts, COMMENT_OPTIONS); + } + + var popupTemplate = '\ +
\ +

\ + Sort by:\ + best rated\ + newest\ + oldest\ +

\ +
Comments
\ +
\ + loading comments...
\ +
    \ +
    \ +

    Add a comment\ + (markup):

    \ +
    \ + reStructured text markup: *emph*, **strong**, \ + ``code``, \ + code blocks: :: and an indented block after blank line
    \ +
    \ + \ +

    \ + \ + Propose a change ▹\ + \ + \ + Propose a change ▿\ + \ +

    \ + \ + \ + \ + \ + \ +
    \ +
    '; + + var commentTemplate = '\ +
    \ +
    \ +
    \ + \ + \ + \ + \ + \ + \ +
    \ +
    \ + \ + \ + \ + \ + \ + \ +
    \ +
    \ +
    \ +

    \ + <%username%>\ + <%pretty_rating%>\ + <%time.delta%>\ +

    \ +
    <#text#>
    \ +

    \ + \ + reply ▿\ + proposal ▹\ + proposal ▿\ + \ + \ +

    \ +
    \
    +<#proposal_diff#>\
    +        
    \ +
      \ +
      \ +
      \ +
      \ + '; + + var replyTemplate = '\ +
    • \ +
      \ +
      \ + \ + \ + \ + \ + \ + \ +
      \ +
    • '; + + $(document).ready(function() { + init(); + }); +})(jQuery); + +$(document).ready(function() { + // add comment anchors for all paragraphs that are commentable + $('.sphinx-has-comment').comment(); + + // highlight search words in search results + $("div.context").each(function() { + var params = $.getQueryParameters(); + var terms = (params.q) ? params.q[0].split(/\s+/) : []; + var result = $(this); + $.each(terms, function() { + result.highlightText(this.toLowerCase(), 'highlighted'); + }); + }); + + // directly open comment window if requested + var anchor = document.location.hash; + if (anchor.substring(0, 9) == '#comment-') { + $('#ao' + anchor.substring(9)).click(); + document.location.hash = '#s' + anchor.substring(9); + } +}); Index: doc/_build/html/calib_report.html =================================================================== diff -u --- doc/_build/html/calib_report.html (revision 0) +++ doc/_build/html/calib_report.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,383 @@ + + + + + + + + Calibration of the wflow_sbm model for the Rhine catchment using EOBS data — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      Calibration of the wflow_sbm model for the Rhine catchment using EOBS data

      +
      +

      DEM and landuse data

      +

      The digital elevation model used was the SRTM 90x90 m resolution dataset. The +DEM was used to determine the river network and the altitude of each cell using the +following steps:

      +

      # The 90x90 m DEM was used to determine the local drainage network (D8) and pits were removed from the network +# The network determined above was used to fix the river network when resampling the DEM to a 900x900 m resolution DEM. +# [pm] resampling procedure

      +

      Corina land-use map and reclassification [PM]

      +
      +
      +

      Forcing data

      +

      The wflowsbm model was calibrated for the Rhine basin using daily temperature +and precipitation data from the EOBS dataset [Haylock] (version 5.0). +Discharge was taken from the CHR daily dataset ([gorgen]). Potential +evapotranspiration was determined using and adjusted version Hargraeves’ method +([weiland]):

      +
      +

      E_{pot} = 0.0031 (T + 17.78) abs(T_{max} - T_{min})^{0.5} R

      +

      In which 0.0031 is a calibration factor and R is the clear sky solar +radiation expressed in mm/day.

      +

      Within the wflow_sbm model the temperature is corrected for altitude +differences within one EOBS cell. For each wflow_sbm 1x1km cell the temperature +is corrected by using the differences between the altitude in that cell and the +average altitude within the matching EOBS cell and applying a lapse rate.

      +

      Gauge data from CHR

      +
      +
      +

      Calibration procedure

      +

      Calibration was performed in two steps. First an initial gues of all parameters +was made based on land-use type. Secondly a full matrix search of a number of parameters +was performed and best perfroming sets have been chosen per subcatchment (based on NS and bias).

      +

      The plots below show the calibration results for the period 1985 – 1995 for the +following stations:

      +
      Rhein-Basel, Rheinhalle
      +Kalkhoven
      +Rockenau
      +Kaub
      +Koeln
      +Lobith
      +Raunheim
      +Cochem
      +Andernach
      +Maxau
      +Schermbeck
      +Menden
      +Hattingen
      +
      +
      +

      The title of the plots also shows the model efficiency (Nash +and Sutcliffe).

      +
      +
      +

      Original landuse

      +

      (Source code)

      +
      +_images/calibplot_00.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_01.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_02.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_03.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_04.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_05.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_06.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_07.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_08.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_09.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_10.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_11.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_12.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_13.png +

      (png, hires.png, pdf)

      +
      +
      +
      +

      Modified landuse

      +

      (Source code)

      +
      +_images/calibplot_lunew_00.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_01.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_02.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_03.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_04.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_05.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_06.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_07.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_08.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_09.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_10.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_11.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_12.png +

      (png, hires.png, pdf)

      +
      +
      +_images/calibplot_lunew_13.png +

      (png, hires.png, pdf)

      +
      +
      + + + + +
      [Haylock]Haylock, M.R., N. Hofstra, A.M.G. Klein Tank, E.J. Klok, P.D.
      +

      Jones, M. New. 2008: A European daily high-resolution gridded dataset of surface +temperature and precipitation. J. Geophys. Res (Atmospheres), 113, D20119, +doi:10.1029/2008JD10201”

      + + + + + +
      [gorgen]Görgen, K., Beersma, J., Brahmer, G., Buiteveld, H., Carambia, M.,
      +

      de Keizer, O., Krahe, P., Nilson, E., Lammersen, R., Perrin, C. and Volken, D. +(2010) Assessment of Climate Change Impacts on Discharge in the Rhine River +Basin: Results of the RheinBlick2050 Project, CHR report, I-23, 229 pp., +Lelystad, ISBN 978-90-70980-35-1

      + + + + + +
      [weiland]Sperna Weiland, F. C., C. Tisseuil, H. H. Dürr, M. Vrac, and L. P.
      +

      H. Van Beek, “Selecting the optimal method to calculate daily global reference +potential evaporation from CFSR reanalysis data for application in a +hydrological model study,” Hydrology and Earth System Sciences, vol. 16, pp. +983–1000, 2012.

      + + + + + + + + + +
      + + + + + + + \ No newline at end of file Index: doc/_build/html/faq.html =================================================================== diff -u --- doc/_build/html/faq.html (revision 0) +++ doc/_build/html/faq.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,209 @@ + + + + + + + + Questions and answers — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      Questions and answers

      +
      +

      Questions

      +

      [1] The discharge in the timeseries output gives weird numbers (!E31) what is going wrong?

      +

      [2] How do a setup a wflow model?

      +
      +
      +

      Answers

      + + + + + +
      [1]

      The 1E31 values indicate missing values. This probably means that at least one +of the cells in the part upstreasm of the discharge points has a missing value. +Missing values are routed downstreams so any missing values upstreams of a discharge +will cause the discharge to evetually become a missing value. To resolve this check the following:

      +
        +
      • Check if the .tbl files are correct ( do that cover all va;ues in the landuse soil and subcatchment maps)
      • +
      • check for missing values in the input maps
      • +
      • check of model parameters are within the working range
      • +
      • check all maps in the runId/outsum directory so see at which stage the missing values starts
      • +
      +
      + + + + + +
      [2]First read the section on Setting-up a new model. Next check one of the supplied example models
      +
      +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/framework.html =================================================================== diff -u --- doc/_build/html/framework.html (revision 0) +++ doc/_build/html/framework.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,324 @@ + + + + + + + + Using the framework — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      Using the framework

      +

      This section only gives a brief description of the framework focussing on the extensions +made for OpenStreams. A full description of the current version of the framwork can be found +at http://www.pcraster.eu.

      +

      In order to build a dynamic model the one needs to define a model class and add several methods +to the class to describe the model behaviour. The easiest way to get started is to copy +and modify the wflow_sceleton.py example model. You can also use the other models +for inspiration.

      +

      In order to faclitate reusing data between models the data is stored in the following directory +tree:

      +

      +digraph file_system {
+//rankdir=LR;
+size="8,11";
+"Case" -> "inmaps";
+"Case" -> "instate";
+"Case" -> "intbl";
+"Case" -> "intss";
+"Case" -> "outstate";
+"Case" -> "Run";
+"Case" -> "staticmaps";
+   "Run" -> " intbl";
+   "Run" -> "outmaps";
+   "Run" -> " outstate";
+   "Run" -> "outsum";
+   "Run" -> "runinfo";
+} +

      +

      Although it is possible to deviate from this layout it is highly recommended to +adhere to this if you build your own model. Also make sure you use an ini file to +specify model settings instead of putting those in the python code.

      +

      A basic sceleton of a model is given below:

      +
      +

      Definition of the wflow_sceleton model.

      +

      This simple model calculates soil temperature using +air temperature as a forcing.

      +

      Usage: +wflow_sceleton -C case -R Runid -c inifile

      +
      +

      -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)

      +
      +

      $Author: schelle $ +$Id: wflow_sceleton.py 898 2014-01-09 14:47:06Z schelle $ +$Rev: 898 $

      +
      +
      +class wflow_sceleton.WflowModel(cloneMap, Dir, RunDir, configfile)
      +

      The user defined model class. This is your work!

      +
      +
      +__init__(cloneMap, Dir, RunDir, configfile)
      +

      Required

      +

      The init function must contain what is shown below. Other functionality +may be added by you if needed.

      +
      + +
      +
      +stateVariables()
      +

      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 = [])

      +

      In the simple example here the TSoil variable is a state +for the model.

      + +++ + + + +
      Variables:TSoil – Temperature of the soil [oC]
      +
      + +
      +
      +supplyCurrentTime()
      +

      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
      • +
      +
      +
      + +
      +
      +suspend()
      +

      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.

      +
      + +
      +
      +initial()
      +

      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.

      +
      + +
      +
      +resume()
      +

      Required

      +

      This function is required. Read initial state maps (they are output of a +previous call to suspend()). The implementation showns here is the most basic +setup needed.

      +
      + +
      +
      +dynamic()
      +

      Required

      +

      This is where all the time dependent functions are executed. Time dependent +output should also be saved here.

      +
      + +
      + +
      +
      +wflow_sceleton.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.

      +
      + +
      +
      +

      Anotated source code for the above

      +
      +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/genindex.html =================================================================== diff -u --- doc/_build/html/genindex.html (revision 0) +++ doc/_build/html/genindex.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,793 @@ + + + + + + + + + Index — wflow 1.0RC1 documentation + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + + +

      Index

      + +
      + _ + | A + | C + | D + | G + | I + | L + | M + | O + | P + | R + | S + | T + | U + | W + +
      +

      _

      + + +
      + +
      __init__() (wflow_sceleton.WflowModel method) +
      + +
      + +

      A

      + + +
      + +
      actEvap_SBM() (in module wflow_sbm) +
      + +
      + +

      C

      + + +
      + +
      configget() (in module wflow_fit) +
      + +
      + +
      (in module wflow_prepare_step1) +
      + + +
      (in module wflow_prepare_step2) +
      + +
      +
      + +

      D

      + + + +
      + +
      dw_CreateDwRun() (in module wflow_delwaq) +
      + + +
      dw_mkDelwaqPointers() (in module wflow_delwaq) +
      + + +
      dw_pcrToDataBlock() (in module wflow_delwaq) +
      + + +
      dw_Write_B2_outlocs() (in module wflow_delwaq) +
      + + +
      dw_Write_Substances() (in module wflow_delwaq) +
      + + +
      dw_Write_Times() (in module wflow_delwaq) +
      + + +
      dw_WriteBoundData() (in module wflow_delwaq) +
      + +
      + +
      dw_WriteBoundlist() (in module wflow_delwaq) +
      + + +
      dw_WriteInitials() (in module wflow_delwaq) +
      + + +
      dw_WriteNrExChnages() (in module wflow_delwaq) +
      + + +
      dw_WriteNrSegments() (in module wflow_delwaq) +
      + + +
      dw_WritePointer() (in module wflow_delwaq) +
      + + +
      dw_WriteSegmentOrExchangeData() (in module wflow_delwaq) +
      + + +
      dynamic() (wflow_floodmap.WflowModel method) +
      + +
      + +
      (wflow_gr4.WflowModel method) +
      + + +
      (wflow_hbv.WflowModel method) +
      + + +
      (wflow_sbm.WflowModel method) +
      + + +
      (wflow_sceleton.WflowModel method) +
      + + +
      (wflow_wave.WflowModel method) +
      + +
      +
      + +

      G

      + + + +
      + +
      getEndTimefromRuninfo() (in module wflow_adapt) +
      + + +
      getMapStacksFromRuninfo() (in module wflow_adapt) +
      + +
      + +
      getStartTimefromRuninfo() (in module wflow_adapt) +
      + + +
      getTimeStepsfromRuninfo() (in module wflow_adapt) +
      + +
      + +

      I

      + + + +
      + +
      initial() (wflow_floodmap.WflowModel method) +
      + +
      + +
      (wflow_gr4.WflowModel method) +
      + + +
      (wflow_hbv.WflowModel method) +
      + + +
      (wflow_sbm.WflowModel method) +
      + + +
      (wflow_sceleton.WflowModel method) +
      + + +
      (wflow_wave.WflowModel method) +
      + +
      + +
      initUH1() (in module wflow_gr4) +
      + +
      + +
      initUH2() (in module wflow_gr4) +
      + +
      + +

      L

      + + +
      + +
      log2xml() (in module wflow_adapt) +
      + +
      + +

      M

      + + + +
      + +
      main() (in module wflow_adapt) +
      + +
      + +
      (in module wflow_delwaq) +
      + + +
      (in module wflow_floodmap) +
      + + +
      (in module wflow_gr4) +
      + + +
      (in module wflow_hbv) +
      + + +
      (in module wflow_prepare_step1) +
      + + +
      (in module wflow_prepare_step2) +
      + + +
      (in module wflow_sbm) +
      + + +
      (in module wflow_sceleton) +
      + + +
      (in module wflow_wave) +
      + +
      + +
      mapstackxml() (in module wflow_adapt) +
      + + +
      mk_qres() (in module wflow_gr4) +
      + +
      + +
      multdynapars (in module wflow_hbv) +
      + + +
      multpars (in module wflow_hbv) +
      + + +
      multVarWithPar() (wflow_fit.wfmodel_fit_API method) +
      + +
      + +

      O

      + + +
      + +
      OpenConf() (in module wflow_prepare_step1) +
      + +
      + +
      (in module wflow_prepare_step2) +
      + +
      +
      + +

      P

      + + + +
      + +
      pcr_tanh() (in module wflow_gr4) +
      + + +
      pixml_state_updateTime() (in module wflow_adapt) +
      + +
      + +
      pixml_totss() (in module wflow_adapt) +
      + + +
      pixml_totss_dates() (in module wflow_adapt) +
      + +
      + +

      R

      + + + +
      + +
      readTS() (in module wflow_delwaq) +
      + + +
      resamplemaps() (in module wflow_prepare_step2) +
      + + +
      resume() (wflow_floodmap.WflowModel method) +
      + +
      + +
      (wflow_gr4.WflowModel method) +
      + + +
      (wflow_hbv.WflowModel method) +
      + + +
      (wflow_sbm.WflowModel method) +
      + + +
      (wflow_sceleton.WflowModel method) +
      + + +
      (wflow_wave.WflowModel method) +
      + +
      +
      + +
      run() (wflow_fit.wfmodel_fit_API method) +
      + + +
      runDynamicWave() (wflow_wave.WflowModel method) +
      + +
      + +

      S

      + + + +
      + +
      savemaps() (wflow_fit.wfmodel_fit_API method) +
      + + +
      setlogger() (in module wflow_adapt) +
      + + +
      shutdown() (wflow_fit.wfmodel_fit_API method) +
      + + +
      SnowPackHBV() (in module wflow_sbm) +
      + +
      + +
      stateVariables() (wflow_floodmap.WflowModel method) +
      + +
      + +
      (wflow_gr4.WflowModel method) +
      + + +
      (wflow_hbv.WflowModel method) +
      + + +
      (wflow_sbm.WflowModel method) +
      + + +
      (wflow_sceleton.WflowModel method) +
      + + +
      (wflow_wave.WflowModel method) +
      + +
      + +
      supplyCurrentTime() (wflow_floodmap.WflowModel method) +
      + +
      + +
      (wflow_gr4.WflowModel method) +
      + + +
      (wflow_hbv.WflowModel method) +
      + + +
      (wflow_sbm.WflowModel method) +
      + + +
      (wflow_sceleton.WflowModel method) +
      + + +
      (wflow_wave.WflowModel method) +
      + +
      + +
      suspend() (wflow_floodmap.WflowModel method) +
      + +
      + +
      (wflow_gr4.WflowModel method) +
      + + +
      (wflow_hbv.WflowModel method) +
      + + +
      (wflow_sbm.WflowModel method) +
      + + +
      (wflow_sceleton.WflowModel method) +
      + + +
      (wflow_wave.WflowModel method) +
      + +
      +
      + +

      T

      + + +
      + +
      tss_topixml() (in module wflow_adapt) +
      + +
      + +

      U

      + + + +
      + +
      updateCols (in module wflow_hbv) +
      + + +
      updateRunOff() (wflow_hbv.WflowModel method) +
      + +
      + +
      (wflow_sbm.WflowModel method) +
      + +
      +
      + +
      usage() (in module wflow_delwaq) +
      + +
      + +
      (in module wflow_gr4) +
      + + +
      (in module wflow_hbv) +
      + + +
      (in module wflow_prepare_step1) +
      + + +
      (in module wflow_prepare_step2) +
      + + +
      (in module wflow_sbm) +
      + + +
      (in module wflow_wave) +
      + +
      +
      + +

      W

      + + + +
      + +
      wflow_adapt (module) +
      + + +
      wflow_delwaq (module) +
      + + +
      wflow_fit (module) +
      + + +
      wflow_floodmap (module) +
      + + +
      wflow_gr4 (module) +
      + + +
      wflow_hbv (module) +
      + + +
      wflow_prepare_step1 (module) +
      + +
      + +
      wflow_prepare_step2 (module) +
      + + +
      wflow_sbm (module) +
      + + +
      wflow_sceleton (module) +
      + + +
      wflow_wave (module) +
      + + +
      WflowModel (class in wflow_floodmap) +
      + +
      + +
      (class in wflow_gr4) +
      + + +
      (class in wflow_hbv) +
      + + +
      (class in wflow_sbm) +
      + + +
      (class in wflow_sceleton) +
      + + +
      (class in wflow_wave) +
      + +
      + +
      wflowVersion (in module wflow_hbv) +
      + + +
      wfmodel_fit_API (class in wflow_fit) +
      + +
      + + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/index.html =================================================================== diff -u --- doc/_build/html/index.html (revision 0) +++ doc/_build/html/index.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,532 @@ + + + + + + + + Welcome to wflow’s documentation! — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      Welcome to wflow’s documentation!

      +
      +

      Note

      +
      +
      $Id: index.rst 908 2014-01-16 11:42:57Z schelle $ +$HeadURL: https://repos.deltares.nl/repos/Hydrology/trunk/OpenStreams/doc/wflow/sphinx/index.rst $
      +

      This documentation is for version 1.0 of wflow, release 1.0RC1 +This documentation was generated March 13, 2014

      +
      +
      +

      Introduction

      +

      This document describes the wflow distributed hydrological modelling platform. +wflow is part of the Deltares’ +OpenStreams project (http://www.openstreams.nl). Wflow consists of a +set of python programs that can be run on the command line and perform +hydrological simulations. The models are based on the PCRaster python +framework. In wflow this framework is extended (the wf_DynamicFramework +class) so that models build using the framework can be controlled using +the API. Links to OpenMI (www.openmi.org) and OpenDAP (www.openda.org) +are being tested.

      +

      The wflow distributed hydrological model platform currently includes +the following models:

      +
        +
      • the wflow_sbm model (derived from topog_sbm )
      • +
      • the wflow_hbv model (a distributed version of the HBV96 model).
      • +
      • the wflow_gr4 model (a distributed version of the gr4h/d models).
      • +
      • the wflow_wave model (a dynamic wave model that can run on the output of the sbm and hbv models).
      • +
      • the wflow_floodmap model (a flood mapping model that can use the output of the wflow_wave model or de sbm and hbv models).
      • +
      +

      The low level api and links to other frameworks allow the models to be +linked as part of larger modelling systems:

      +

      +digraph Linking {
+WFLOW_HBV -> WFLOWAPI;
+WFLOW_SBM -> WFLOWAPI;
+WFLOWAPI -> "PI"  [dir=both];
+"Data and Models" -> "PI";
+WFLOWAPI -> OpenMI  [dir=both];
+ModelX -> OpenMI;
+ModelY -> OpenMI;
+WFLOWAPI -> OpenDA  [dir=both];
+Calibration -> OpenDA;
+Assimilation -> OpenDA;
+WFLOWAPI [shape=square];
+OpenDA [shape=square];
+OpenMI [shape=square];
+"PI" [shape=square];
+dpi=69;
+} +

      +
      +

      Note

      +

      wflow is part of the Deltares OpenStreams project +(http://www.openstreams.nl). The OpenStreams project is a work in +progress. Wflow functions as a toolkit for distributed hydrological +models within OpenStreams.

      +
      +
      +

      Warning

      +

      At the moment the models and documentation are being worked on. Things +that worked yesterday may stop working tomorrow.

      +
      +

      The different wflow models share the same structure but are fairly +different with respect to the conceptualisation. The shared software +framework includes the basic maps (dem, landuse, soil etc) and the +hydrological routing via the kinematic wave. The Python class framework +also exposes the models as an API and is based on the PCRaster/Python +version 4.0 Beta (www.pcraster.eu).

      +

      The wflow_sbm model maximises the use of available spatial data. +Soil depth, for example, is estimated from the DEM using a topographic +wetness index . The model is derived from the [CQFLOW] model that has +been applied in various countries, most notably in Central America. The +wflow_hbv model is derived from the HBV-96 model but does not +include the routing functions, instead it uses the same kinematic wave +routine as the wflow_sbm model to route the water downstream.

      +

      The models are programmed in a dynamic GIS language called PCRaster +available as a Python extension. As such, the structure of the model is +transparent, 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.7 are needed.

      +
      +

      Note

      +

      A pdf version of this version of the documentation can be +found at +(http://publicwiki.deltares.nl/download/attachments/76613461/wflow.pdf)

      +
      +
      + + + + + + + + + + + + +
      +

      OpenDA

      + +
      +
      +

      Indices and tables

      + +
      +
      +

      References

      + + + + + +
      [CQFLOW]Köhler, L., Mulligan, M., Schellekens, J., Schmid, S. and +Tobón, C.: Final Technical Report DFID-FRP Project no. R7991 Hydrological +impacts of converting tropical montane cloud forest to pasture, with +initial reference to northern Costa Rica.,, 2006.
      +
      +
      +

      TODO

      +
      +

      Todo

      +

      rewrite and simplify

      +
      +

      (The original entry is located in C:\Users\schelle\AppData\Local\Continuum\Anaconda\Scripts\wflow_adapt.py:docstring of wflow_adapt, line 23.)

      +
      +

      Todo

      +

      add support for a coarser delwaq network based on supplied map.

      +
      +

      (The original entry is located in C:\Users\schelle\AppData\Local\Continuum\Anaconda\Scripts\wflow_delwaq.py:docstring of wflow_delwaq, line 58.)

      +
      +

      Todo

      +

      Test option to seperate construction of network from filling of the input +arrays

      +
      +

      (The original entry is located in C:\Users\schelle\AppData\Local\Continuum\Anaconda\Scripts\wflow_delwaq.py:docstring of wflow_delwaq, line 63.)

      +
      +

      Todo

      +

      Ad support to not only follow the kinematic wave reservoir but also +the flow trough the soil reservoirs. Basically make three layers:

      +
      +
        +
      1. kinematic wave reservoir (surface water)
      2. +
      3. unsaturated store (only vertical flow)
      4. +
      5. saturated store (horizontal and vertical flow)
      6. +
      +
      +
      +

      (The original entry is located in C:\Users\schelle\AppData\Local\Continuum\Anaconda\Scripts\wflow_delwaq.py:docstring of wflow_delwaq, line 68.)

      +
      +

      Todo

      +
        +
      • add labeling of different inflows ( the information is already present)
      • +
      +
      +

      (The original entry is located in C:\Users\schelle\AppData\Local\Continuum\Anaconda\Scripts\wflow_delwaq.py:docstring of wflow_delwaq.dw_WriteBoundlist, line 8.)

      +
      +

      Todo

      +

      Add exta column with boundary labels (of the inflows)

      +
      +

      (The original entry is located in C:\Users\schelle\AppData\Local\Continuum\Anaconda\Scripts\wflow_delwaq.py:docstring of wflow_delwaq.dw_mkDelwaqPointers, line 30.)

      +
      +

      Todo

      +

      add routing state vars

      +
      +

      (The original entry is located in C:\Users\schelle\AppData\Local\Continuum\Anaconda\Scripts\wflow_gr4.py:docstring of wflow_gr4.WflowModel.stateVariables, line 10.)

      +
      +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/objects.inv =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot.py =================================================================== diff -u --- doc/_build/html/plots/calibplot.py (revision 0) +++ doc/_build/html/plots/calibplot.py (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +""" +Created on Mon Jun 18 14:42:47 2012 + +@author: schelle +""" + + +import numpy +import matplotlib as mpl +#mpl.use('Agg') +import matplotlib.pyplot as plt +import datetime +import pandas +import pcrut +from stats import * + +Case = "rhine_sbm" +#Case = "rhineNew" +warmup = 500 # timesteps to skip in warmup phase for calculations +cooldown = 50 + +location = 7 +obs,head=pcrut.readtss(Case + "/calib_new.tss") +obs = obs[1:3601,:] + + +for location in range(0,14): + sim,hd=pcrut.readtss(Case + "/newcalib/run.tss") + #shift one day!!!! + pers = numpy.size(obs,axis=0) + + a = get_nash_sutcliffe(obs[warmup:len(obs)-cooldown,location],sim[warmup:len(sim)-cooldown,location],NoData=numpy.nan) + + #trange = pandas.DatetimeIndex(datetime.datetime(1985,1,1),periods=pers,offset=pandas.DateOffset()) + ts = pandas.Series(obs[:,location],index=pandas.date_range('1/1/1985',periods=pers)) + tssim = pandas.Series(sim[:,location],index=pandas.date_range('1/1/1985',periods=pers)) + + plt.figure(location) + plt.autoscale(enable=True) + ts.plot(label='Observed',color='blue') + plt.autoscale(enable=False) + tssim.plot(label='Simulated',color='black') + plt.title(head[location] + ": NS = " + str(a[0])) + plt.legend() + + Index: doc/_build/html/plots/calibplot_00.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_00.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_00.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_01.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_01.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_01.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_02.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_02.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_02.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_03.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_03.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_03.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_04.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_04.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_04.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_05.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_05.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_05.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_06.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_06.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_06.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_07.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_07.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_07.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_08.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_08.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_08.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_09.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_09.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_09.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_10.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_10.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_10.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_11.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_11.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_11.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_12.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_12.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_12.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_13.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_13.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_13.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew.py =================================================================== diff -u --- doc/_build/html/plots/calibplot_lunew.py (revision 0) +++ doc/_build/html/plots/calibplot_lunew.py (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +""" +Created on Mon Jun 18 14:42:47 2012 + +@author: schelle +""" + + +import numpy +import matplotlib as mpl +#mpl.use('Agg') +import matplotlib.pyplot as plt +import datetime +import pandas +import pcrut +from stats import * + +Case = "rhine_sbm" +#Case = "rhineNew" +warmup = 500 # timesteps to skip in warmup phase for calculations +cooldown = 50 + +location = 7 +obs,head=pcrut.readtss(Case + "/calib_new.tss") +obs = obs[1:3601,:] + + + +for location in range(0,14): + sim,hd=pcrut.readtss(Case + "/newlu_test/run.tss") + #shift one day!!!! + pers = numpy.size(obs,axis=0) + + a = get_nash_sutcliffe(obs[warmup:len(obs)-cooldown,location],sim[warmup:len(sim)-cooldown,location],NoData=numpy.nan) + + #trange = pandas.DatetimeIndex(datetime.datetime(1985,1,1),periods=pers,offset=pandas.DateOffset()) + ts = pandas.Series(obs[:,location],index=pandas.date_range('1/1/1985',periods=pers)) + tssim = pandas.Series(sim[:,location],index=pandas.date_range('1/1/1985',periods=pers)) + + plt.figure(location) + plt.autoscale(enable=True) + ts.plot(label='Observed',color='blue') + plt.autoscale(enable=False) + tssim.plot(label='Simulated',color='black') + plt.title(head[location] + ": NS = " + str(a[0])) + plt.legend() \ No newline at end of file Index: doc/_build/html/plots/calibplot_lunew_00.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_00.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_00.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_01.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_01.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_01.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_02.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_02.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_02.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_03.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_03.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_03.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_04.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_04.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_04.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_05.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_05.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_05.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_06.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_06.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_06.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_07.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_07.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_07.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_08.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_08.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_08.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_09.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_09.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_09.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_10.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_10.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_10.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_11.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_11.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_11.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_12.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_12.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_12.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_13.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_13.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/calibplot_lunew_13.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/kin-dyn.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/kin-dyn.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/kin-dyn.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/kin-dyn.py =================================================================== diff -u --- doc/_build/html/plots/kin-dyn.py (revision 0) +++ doc/_build/html/plots/kin-dyn.py (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +""" +Created on Fri Jun 15 10:09:44 2012 + +@author: schelle +""" + +import matplotlib.pyplot as plt +import numpy as np +from pcrut import * + +runkin, d = readtss('run.tss') +rundyn, d = readtss('rundyn.tss') + +plt.figure() +ax =plt.plot(rundyn[:,6],label="Dynamic") +ax =plt.plot(runkin[:,6],label="Kinematic") +leg = plt.legend() +plt.title("Difference between kinematic and dynamic wave") Index: doc/_build/html/plots/m-plot.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/m-plot.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/m-plot.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/m-plot.py =================================================================== diff -u --- doc/_build/html/plots/m-plot.py (revision 0) +++ doc/_build/html/plots/m-plot.py (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,18 @@ +# make plot of soil depth function for different values of M +from pylab import * + +thetaS = 0.6 +Zi = arange(0,1000,5) +Ksat = 100 + +MM = arange(50,800,150) + +for mm in MM: + f = thetaS/mm + Ks = Ksat * exp(-f * Zi) + plot (Ks,-Zi) + text(50,-50 - (mm* 1.1) ,"M = " + str(mm)) + +xlabel("K") +ylabel("-zi (depth)") +show() Index: doc/_build/html/plots/s-curve-freezingsoil.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/s-curve-freezingsoil.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/s-curve-freezingsoil.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/s-curve-freezingsoil.py =================================================================== diff -u --- doc/_build/html/plots/s-curve-freezingsoil.py (revision 0) +++ doc/_build/html/plots/s-curve-freezingsoil.py (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +""" +Created on Fri Jun 15 10:09:44 2012 + +@author: schelle +""" + +import matplotlib.pyplot as plt +import numpy as np + +def sCurve(X,a=0.0,b=1.0,c=1.0): + + s = 1.0/(b + np.exp(-c * (X-a))) + return s + +C=8 +CC=4 +CCC=3 +CCCC=1 + +swredu = 0.038 +b=1/(1-swredu) +zz = np.array(np.arange(-3,3,0.1)) +S = sCurve(zz,a=0,b=b,c=C) + swredu +SS = sCurve(zz,a=0,b=b,c=CC) + swredu +SSS = sCurve(zz,a=0,b=b,c=CCC) + swredu +SSSS = sCurve(zz,a=0,b=b,c=CCCC) + swredu +plt.plot(zz,S,label='c=' + str(C)) +plt.plot(zz,SS,label='c=' + str(CC)) +plt.plot(zz,SSS,label='c=' + str(CCC)) +plt.plot(zz,SSSS,label='c=' + str(CCCC)) +plt.title('Ksat reduction for frozen soil') +plt.ylabel('Reduction factor (cf_soil)') +plt.xlabel('Temperature oC') +plt.legend() +plt.show() Index: doc/_build/html/plots/s-curve-soil.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/s-curve-soil.pdf =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/s-curve-soil.png =================================================================== diff -u Binary files differ Index: doc/_build/html/plots/s-curve-soil.py =================================================================== diff -u --- doc/_build/html/plots/s-curve-soil.py (revision 0) +++ doc/_build/html/plots/s-curve-soil.py (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +""" +Created on Fri Jun 15 10:09:44 2012 + +@author: schelle +""" + +import matplotlib.pyplot as plt +import numpy as np + +def sCurve(X,a=0.0,b=1.0,c=1.0): + + s = 1.0/(b + np.exp(-c * (X-a))) + return s + +C=-8000 +CC=-1 +CCC=-0.5 +CCCC=-0.3 +zz = np.array(np.arange(250,300)) +S = sCurve(zz,a=275,c=C) +SS = sCurve(zz,a=275,c=CC) +SSS = sCurve(zz,a=275,c=CCC) +SSSS = sCurve(zz,a=275,c=CCCC) +plt.plot(zz,S,label='c=' + str(C)) +plt.plot(zz,SS,label='c=' + str(CC)) +plt.plot(zz,SSS,label='c=' + str(CCC)) +plt.plot(zz,SSSS,label='c=' + str(CCCC)) +plt.title('Wet roots fraction for a rooting depth of 275 mm') +plt.ylabel('Fraction of wet roots') +plt.xlabel('Water table depth below surface (zi in mm)') +plt.legend() +plt.show() Index: doc/_build/html/py-modindex.html =================================================================== diff -u --- doc/_build/html/py-modindex.html (revision 0) +++ doc/_build/html/py-modindex.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,233 @@ + + + + + + + + Python Module Index — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + + + + +
      +py4sci +
      + + + + + + + + \ No newline at end of file Index: doc/_build/html/search.html =================================================================== diff -u --- doc/_build/html/search.html (revision 0) +++ doc/_build/html/search.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,189 @@ + + + + + + + + Search — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +

      Search

      +
      + +

      + Please activate JavaScript to enable the search + functionality. +

      +
      +

      + From here you can search these documents. Enter your search + words into the box below and click "search". Note that the search + function will automatically search for all of the words. Pages + containing fewer words won't appear in the result list. +

      +
      + + + +
      + +
      + +
      + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/searchindex.js =================================================================== diff -u --- doc/_build/html/searchindex.js (revision 0) +++ doc/_build/html/searchindex.js (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1 @@ +Search.setIndex({envversion:42,terms:{poorli:[14,16],four:0,secondli:[13,14],wflow_cqf:7,actevap_sbm:14,deviat:9,under:14,digit:[0,17,13],downstream:[0,1,6,8,17,16],aroun:14,rise:[14,16,8],dynamicwav:[14,11],upstream:[0,6,14,3,11],affect:[14,8],subbasin:8,swedisch:8,wflow_lib:[],rfcf:[14,8],b4_dispx:16,geomorpholog:14,seper:[0,1,16],direct:8,lddmethod:0,lddoutflowdepth:0,consequ:8,second:[0,3,5,7,8,9,11,17,14,16],blue:16,lddout:0,neg:[14,16],altitud:[13,14,8],conduct:[0,14],"new":[13,6],net:[14,3,8],elimin:8,never:5,here:[0,1,3,5,8,9,10,11,17,14,16],wtabl:14,locationnam:2,path:[0,10,16,7],dry:[14,16,8],exchnag:16,pastur:1,datetim:2,precip:[17,14,8],evepor:14,studi:13,temperaturecorrectionmap:[17,14],sdate:2,multvarwithpar:7,b5_boundlist:16,schermbeck:13,topographi:[0,17,14],kaub:13,total:[0,17,14,16,8],unit:[17,14,3,4],highli:9,plot:[13,14,11],describ:[0,1,8,9,10,14],would:0,choosen:17,wflow_riverburnin:0,call:[1,3,5,8,9,17],python25:10,recommend:[9,7],type:[0,13,14,16,8],exfiltwat:17,subsurfac:[14,16],snowpackhbv:14,relat:[14,16,8],fewsdoc:2,warn:[5,11,14,3,8],exce:[14,8],progam:[14,8],hold:[17,8],must:[0,3,5,7,8,9,11,17,14,16],setup:[0,3,5,6,7,9,11,14,16],work:[0,6,2],dw_writeiniti:16,root:[0,14],wflow_hboun:[14,11],climat:[13,14],give:[9,6,14,11],indic:6,gr4h:[1,3],want:[0,17,7],r_x3:3,hof:16,subcatc:16,end:[17,14,16,8],firstzonecapac:[0,14],turn:8,how:6,groundwaterlevel:14,celciu:4,config:[0,3,5,7,9,11],masterdem:0,updat:[14,2,3,8],lad:0,after:[2,3,5,7,8,9,11,14,16],substanc:16,lump:8,diagram:14,befor:[0,14,16],wrong:6,lat:[17,3],demonstr:[14,16],domin:[16,8],third:0,maintain:0,environ:[0,10],enter:[14,16,8],dw_mkdelwaqpoint:[1,16],order:[0,1,2,5,7,8,9,11,17],wind:14,incis:14,over:[0,17,14,3,8],govern:14,becaus:[2,8],vari:[14,8],fir:17,fit:[],fix:[0,10,11,13,14,16],better:[0,14,11],fig:8,them:[0,2,3,5,8,9,11,17],thei:[0,3,5,8,9,11,14,16],default_hbv:[0,17],wflow_streamord:0,bank:5,wflow_riverlength:17,largr:14,timeout:2,each:[0,3,5,7,8,9,11,17,13,14,16],debug:[3,5,8,11,17,14,16],wflow_dynriv:[14,11],european:13,side:17,mean:[0,2,6,8,14,16],resum:[3,5,8,9,11,14],forgot:0,extract:14,"24z":8,network:[0,1,17,13,14,16],subcel:[17,14,16],d20119:13,crucial:0,content:2,first_step:[17,14,7],sluggish:14,basetimestep:14,outputstatefil:2,linear:8,wflow_ldd:[0,17,16],situat:14,infiltcappath:[0,14],free:[0,9,5,11,8],unifrom:0,celllength:14,"_fitrun":7,faclit:9,calib_run:17,fairli:[1,14,7,11],angl:14,interflow:8,moment:[0,1],regress:14,onto:14,srtm_58_14:0,dimens:3,rang:[6,14],surfacerunoff:[17,14,16,8],"06z":[9,14],capac:[0,14,3,8],restrict:8,alreadi:[0,1,5,16,7],thick:14,drysnow:8,wflow_soil:[0,17],waq_plugin_wasteload:16,fromat:0,top:[14,16],tow:16,nameofthemap:14,thedir:16,bbstochmodelconfig:10,inflow:[17,1,16],savemap:7,tool:0,task:0,conserv:16,inwat:16,clonemap:[3,5,7,8,9,11,14],technic:1,tagestad:14,keyword:17,provid:[16,14,2,7,11],delwaq2:16,delwaq1:16,tree:9,zero:[0,3,11,17,14,16],project:[1,13],lobith:13,substep:[14,11],getendtimefromruninfo:2,oldkinwavevolum:16,manner:8,seen:16,topog_sbm:[1,14,16],fixedlevel:[14,11],recreat:0,latter:[0,14],snow:0,diagnist:2,fname:16,even:[0,8],object:[2,3],b2_sysclock:16,phase:[0,14,8],hargraev:13,doi:13,simplif:14,doc:1,riverattr:0,flow:[0,1,3,8,17,14,16],stoptim:7,dlwqlib:16,doe:[0,1,14,2,8],bracket:[0,17],waterdem:17,sum:[14,8],api:[],syntax:[14,8],runid:[0,2,3,5,6,7,8,9,10,11,17,14,16],earth:13,chnage:17,schmid:1,absolut:14,layout:[17,9,16,3],configur:[],reinit:17,tropic:1,folder:10,rica:1,klein:13,stop:[0,1],linux:[17,14],report:[0,1,13,16],recalcul:17,transpir:14,bat:16,suz:8,gaug:[0,3,8,17,13,14,16],pcorr:8,b4_pointer:16,result:[0,13,16],fail:[0,2],best:[0,13,14,7],wflow_demmin:[0,14],postbox:10,b2_outputtim:16,figur:[17,14,16,8],wflow_outlet:[0,14,11],wimaxscal:17,variat:14,approach:[0,14],accord:[17,14,16,8],extend:[0,1],were:[13,16],extens:[0,1,11,9],vaue:0,extent:5,libcta:16,shapefil:0,howev:[4,5,8,9,10,11],"36z":16,maxflooddist:5,countri:1,excess:16,readmap:14,wiidth:17,assum:[0,3,5,8,9,11,17,14,16],summar:[0,17],duplic:2,beek:13,numpi:16,three:[0,1,14,16,8],been:[0,1,8,11,13,14,16],frp:1,berglov:8,basic:[1,3,5,9,14,16],basin:13,cooordin:0,kquickflow:8,argument:[17,10,14,2,8],"k\u00f6hler":1,ident:0,tank:13,tanh:3,air:[9,14,8],calcul:[0,9,13,14,16],inblt:17,toolkit:1,inputparamet:[17,14],firstzoneflux:17,sever:[9,14,4],perform:[0,1,2,3,5,7,8,9,11,17,13,14],suggest:14,make:[0,1,8,9,10,14,16],transpar:1,pathfrac:[0,14],simil:14,split:14,dimensionless:14,complet:[0,14,16],dw_writebounddata:16,rain:8,hand:[0,8],runoff:[0,16],rais:0,kin:[14,8],flowtyp:16,kept:8,bewar:11,thu:[0,14],min:14,timesstep:2,magnitud:14,thi:[0,1,2,3,4,5,6,7,8,9,10,11,17,14,16],snowmelt:[17,14,8],epf:8,fromto:16,identifi:0,just:0,statevari:[1,3,5,8,9,11,14],ordin:0,gettimestepsfromruninfo:2,yet:0,languag:1,previous:14,expos:[1,4],step2:0,step1:0,timestep:[2,3,4,5,7,8,9,11,17,14,16],save:[3,5,7,8,9,11,17,14,16],amazonian:14,applic:[0,17,13,8],dwdir:16,mutipli:[14,8],b9_hisvar:16,measur:[14,7,8],specif:[3,5,8,9,11,17,14],modeltofit:7,manual:8,unstabl:[14,16,11],underli:0,www:[0,1,9],right:[0,17],old:17,interv:[14,8],riverord:0,percentag:8,malaysia:[],intern:[17,14,16,8],flatten:0,scurv:14,successfulli:0,openstream:[1,9],"32bit":0,icf:8,includes_deltashel:16,b5_bounddata:16,templaterunid:10,plu:[16,8],burn:0,ecorr:8,wflow_catch:[0,16,7],post:2,chapter:10,exfiltr:[14,16],slightli:8,publicwiki:[1,2],surround:0,simul:[17,1,7,8],unsat:14,done:[0,17,14,16],produc:[0,17,3],perfrom:13,sof:[14,16],down:[0,17,14],storag:[0,14,8],wan:7,suffici:0,bolivia:11,support:[0,1,16,17],getstarttimefromruninfo:2,avail:[0,1,4,8,17,14,16],width:8,fraction:[0,17,14,16,8],wat:17,wflow_delwaq:[],bedrock:14,lowest:14,postadapt:2,form:[14,11],availcap:14,channellength:[14,11],argv:[3,5,8,9,11,14],altotud:14,solar:13,absolutegw:14,"true":[17,16],tbl_dir:[17,14],maximum:[0,3,5,8,17,14],"900x900":13,absenc:14,sfcf:[14,8],gridcel:[0,14],colsim:[17,7],featur:14,khq:8,"abstract":17,exist:[0,3,5,8,11,17,14,16],quantiti:3,check:[0,6,16],topoldd:14,when:[0,17,13,14],supplycurrenttim:[3,5,8,9,11,14],wher:0,flood:[1,5,11],role:4,jone:13,presum:8,realiti:0,subdivid:14,booolean:[14,8],externalqbas:17,substract:3,intens:14,consid:14,longer:4,furthermor:[10,16],bottom:[14,16,8],pseudo:[0,14],elemenst:3,ignor:2,time:[0,2,3,5,7,8,9,11,17,14,16],daili:[3,5,8,9,11,13,14,16],concept:[14,8],appdata:1,betaseepag:8,logfilenam:2,global:13,row:16,depend:[0,5,16],zone:[14,8],graph:7,savetoinput:7,decis:0,sourc:13,kinwavevolum:8,condit:[0,3,5,8,11,17,14,16],casenam:[3,5,7,8,9,11,17,14],gue:13,level:[1,5,8,11,17,14],leftov:14,edat:2,item:17,timeslic:[17,14,11],groudwat:0,quick:8,dir:[0,3,5,7,8,9,10,11,14,16],upper:[0,17,8],slower:[17,14],timesri:17,sign:17,pirunfil:10,anaconda:1,precipit:[0,3,8,17,13,14],appear:2,melt:8,uniform:[0,3],current:[0,1,3,5,7,8,9,10,11,17,14],inxml:2,deriv:[0,1,14],subcellfrac:14,gener:[0,5,2,16,8],coeffici:[0,11,14,3,8],water:[0,5,16,3,8],explicitli:14,drainag:[0,17,13,14,16],coincid:0,surfacerunoffdyn:[14,11],def:14,rhein:13,weird:6,hbv:[5,14,2,8],surpluss:8,commonli:14,instat:[0,17,14,2],useful:0,tweak:0,modul:[],setlogg:2,visibl:17,instal:10,perc:8,geophi:13,sharper:14,memori:0,wf_readmap:4,kalkhoven:13,endtim:2,demmax:14,easiest:9,minimum:[0,14,8],can:[0,1,2,3,5,7,8,9,11,17,14,16],purpos:8,nearest:0,rundynamicwav:11,stream:14,outputtss_0:17,sizeinmetr:[17,3],critic:[14,8],deltashel:16,gwscale:14,occur:[14,16,8],contribut:14,alwai:[0,17,16,3],multipl:[0,2,7,8,17,14,16],interceptionstorag:8,pathwai:14,write:[0,2,16,8],coleman:14,downslop:14,map:[13,6],product:3,b4_nrofexch:16,max:[5,14,3],snm:17,maa:14,snw:17,inflowtyp:16,mai:[0,1,2,9,17,14,16],b1_t0:16,"g\u00f6rgen":13,man:0,practic:14,liquid:8,noseq:16,inform:[0,1,3,4,5,7,8,9,11,17,14,16],"switch":[17,14,7,11],combin:[17,16,7,8],delwaqdir:16,gorgen:13,channeldepth:[14,11],gradual:[14,16],infiltr:[0,16,8],runoffgensigmafunct:[0,17],ymmv:0,tti:[14,8],cold:[17,16],still:[0,10],pointer:16,dynam:[0,5,16,3,8],channelbottomwidth:[14,11],vertessi:14,platform:1,window:17,wetroot:14,main:[0,2,3,5,8,9,11,14,16],non:[0,11,14,16,8],initi:[0,1,3,5,7,8,9,11,17,13,14,16],cellsiz:0,includes_flow:16,polder:0,now:[0,14,16,8],discuss:8,nor:14,shoudl:0,wfmodel_fit_api:7,mamor:11,term:[17,14],name:[0,3,5,7,8,9,10,11,17,14,16],realist:0,revers:14,focuss:9,dynamicpcrasterbas:[14,3,11],separ:[17,8],overwriteinit:17,xlr:0,domain:0,ouflow:14,replac:[0,8],individu:8,significantli:14,year:[2,11],keizer:13,shown:[0,2,3,5,9,14,16],percol:8,absorpt:8,profil:[14,16],thimestep:14,"51z":[3,11],formula:17,correct:[0,13,6,14,8],lag:16,ustorecapac:17,catchmenttot:14,org:[0,1],care:0,casedir:16,"d\u00fcrr":13,thing:1,place:[0,17,8],yul:0,infiltcapsoil:[0,14],principl:[14,16,8],beersma:13,neglect:14,first:[0,2,6,7,8,17,13,14,16],oper:[0,17,14],suspend:[3,5,8,9,11,14],directli:[17,14,8],onc:[0,3,5,8,9,11,14],arrai:[1,3,5,9,11,16],yourself:0,wflow_rhine_sbm:7,simplyfi:14,"long":[0,17,3,8],tomorrow:1,meltconst:[14,8],size:[17,14,3,11],wflow_mgaug:17,given:[0,2,3,8,9,11,17,14,16],convent:4,fmt:16,tssfile:2,averag:[0,3,8,17,13,14],outputtss:[17,3],especi:17,copi:[0,9,14,17],specifi:[0,2,4,5,7,9,11,17,14,16],savetxt:16,than:[0,17,14,16,8],png:[13,14,7,11],wide:14,hortonian:[14,16],qgaug:17,realquickflow:8,balanc:16,timestepsec:[17,14,2,16],mulligan:1,seri:[0,17,14],pre:2,hafilerk:10,ani:[0,10,6,14,8],delin:0,no_set:17,sat:14,intbl:[0,17,11,14,8],xmlfilenam:2,chnaggel:14,engin:14,squar:[17,14,7],mapstack:[17,5,2,16,11],waterleveldyn:[14,11],note:[0,16,7],take:[0,17,14,16,8],advis:[0,9,5,11],green:16,channel:[14,11],begin:[2,3],sure:[0,9,14],trace:16,normal:[0,4,8,17,14,16],multipli:[0,7,8,17,14,16],beta:[0,1,8],globcover_javabali:0,pair:[17,7],america:1,renam:[0,2],subdaili:14,later:[0,17,14,16,8],byran:8,axi:8,slope:14,last_step:[17,14,7],show:[0,13,14,16,8],verstessi:14,actevap:[17,14],threshold:[14,8],forecast:8,xml:[0,2,3,5,8,10,11,17,14,16],onli:[0,1,2,3,4,5,7,8,9,11,17,14,16],slow:[17,11,14,16,8],ratio:[0,17,14,3],activ:16,state:[1,2,3,4,5,8,9,11,17,14],overwritten:17,nearli:11,variou:[0,1,14],get:[0,2,7,8,9,10,14],kinemat:[0,16,8],elsenb:14,repo:1,dyn:14,cannot:[14,8],outlet:[0,17,14],theta:[0,14],requir:[],prime:14,warmupstep:[17,7],yield:14,qsim:7,uh2:3,where:[0,2,5,8,9,11,14,16],defaultfortbl:17,restpotevap:14,label:[1,16],between:[0,5,8,9,17,13,14,16],"import":[0,10,16,14],maxcanopystorag:[0,14],snowwat:[17,14,8],assumpt:0,bankful:5,cycl:8,timestepinsecond:2,come:[0,1,8],mani:[0,16],meteolog:8,pot:17,inspir:9,period:[13,16],yearli:14,outputcsv_1:17,outputcsv_0:17,seepag:8,step1dir:0,folow:16,cfsr:13,invers:17,mark:[17,14],eros:14,cflux:8,surplu:[14,8],resolut:[0,13],fieldcapac:8,inputstatefil:2,those:[2,4,7,9,14,16],"case":2,staticmap:[0,5,7,10,11,17,14,16],wflow_fit:[],inituh1:3,inituh2:3,outcom:14,mapstackxml:2,suse:8,soil:[0,6,16,3],strait:16,henc:14,runinfo:[2,3,5,8,11,17,14,16],ascii:16,"__init__":9,par:7,develop:1,author:[2,3,5,7,8,9,11,14,16],media:14,same:[0,1,14,17,11],interact:8,dcl:11,resamplemap:0,eventu:0,intss:[17,14,11],finish:0,evetu:6,weed:14,snapgaugestoriv:0,updmaxdist:17,costa:1,appropri:14,wflow_adapt:[],cassenam:17,without:[0,10,16,7,14],w_soil:14,abund:8,execut:[0,2,3,5,8,9,11,14],reinfiltr:[17,14],"1x1km":[13,14],variabal:17,topog:14,concentr:[16,8],rockenau:13,inifil:[0,9,5,2,11],param:16,areamap:[17,16,7],dw_writepoint:16,dw_writesegmentorexchangedata:16,real:16,tisseuil:13,read:[0,2,3,4,5,6,8,9,11,17,14,16],s_x1:3,sceleton:9,temperatur:[0,13,8],grid:[0,13,16,3,8],mon:8,world:4,pol:17,kinamat:17,either:[5,14,8],output:[0,1,2,3,4,5,6,8,9,11,17,14,16],capflux:[14,8],ayyar:3,manag:14,"2008jd10201":13,haylock:13,channelvol:11,hydraul:14,throughfal:[0,14,8],yesterdai:1,freez:14,"90x90":[0,13],dw_write_tim:16,deficit:14,anumb:11,evapor:[0,13,3],complic:8,refer:13,arrow:16,power:8,timeseri:[0,2,3,6,8,11,17,14],mapstacknam:2,rainfall_interception_modrut:14,ceas:14,starttim:[16,2,7],fulli:[2,8],b3_nrofseg:16,capscal:14,stone:14,central:1,qmax:14,win32_ifort:10,degre:[17,14,4],stand:14,routin:[0,16],dw_pcrtodatablock:16,configget:[0,7],resampl:[0,13],your:[0,3,5,7,9,11],het:14,loc:16,log:[0,14,2],her:[5,3],area:[0,7,8,11,14,16],hboun:[14,11],lon:17,overwrit:[0,3,7,8,17,14],start:[0,2,3,5,6,7,8,9,11,17,14,16],interfac:16,low:1,lot:[17,10,14],colmea:[17,7],snowfal:[14,8],regard:0,lane:14,satur:[0,1,14,16],catchid:16,resrvoir:[14,8],hire:[13,14,11],possibl:[0,14,8],"default":[0,3,7,8,11,17,14,16],bucket:14,mintimestep:[14,11],expect:[0,2,3,5,8,10,11,17,14,16],creat:[0,17,14,2,16],certain:14,deep:14,decreas:0,"48z":7,file:6,fill:[1,14,16,8],again:[14,2],googl:0,e31:6,event:8,field:8,hofstra:13,wai:[0,9,14],spatial:[0,1],ttime:16,docstr:1,briefli:14,peak:0,pool:14,reduc:[0,8],log2xml:2,lookupt:[14,11],directori:[0,3,5,6,7,8,10,14,16],"_gaug":14,mask:0,mass:16,potenti:[0,13],nutrient:16,represent:[14,16],all:[0,3,5,6,8,13,14,16],basedir:16,consider:[14,2],focfmax:8,alf:14,scalar:[0,17],ksat:[0,17,14],follow:[0,1,2,4,6,8,9,10,11,17,13,14,16],disk:[3,4,5,8,9,11,14],als:16,albrecht:10,init:9,program:[1,2,7,11,17,14,16],introduc:[14,16,8],openconf:0,fals:7,capillari:8,potevap:[17,14],fall:[14,8],veri:[0,2],dampen:0,maximis:1,pixml_totss:2,list:[0,2,3,5,8,9,11,17,14,16],"tob\u00f3n":1,adjust:[0,13,14,7,8],small:[14,16],thiessen:17,hbv96:1,rate:[0,13,14,8],design:14,inpumap:17,ssave:7,what:[0,9,6,17,4],sub:0,defin:[0,3,4,5,7,8,9,11,17,14,16],section:6,abl:[14,7],brief:9,version:[0,1,3,8,9,13,14,16],method:[0,9,13,17],full:[9,13,14,11],deltabox:10,behaviour:[9,8],trunk:[1,14],valu:6,search:[0,1,13],amount:[0,14,2,8],base:[0,1,3,5,8,11,17,13,14,16],parameternam:2,action:2,determiend:0,cobbl:14,via:[],tsoil:[9,14],declin:14,pixml_state_updatetim:2,transit:14,filenam:[17,2],qsubcatch_avg:17,select:[0,13],qscale:14,wflow_riverwidth:[17,14,11],percolari:14,two:[0,7,8,13,14,16],reclassif:13,formul:14,dynamicmodel:[14,3,11],taken:[3,5,11,17,13,14,16],basi:14,wflow_gaug:[0,17,16,8],more:[0,8,10,17,14,16],flat:[0,14,11],desir:2,wflow_inflow:17,resuolut:0,rheinblick2050:13,flag:[17,14],wflow_dem:[0,17,11],known:8,none:[3,5,8,9,11,14],hour:[14,2,3],remain:14,therear:0,"275mm":14,soiltyp:17,nname:2,deg:14,share:1,templat:16,wf_dynamicframework:[],compart:16,incom:8,sharp:14,subcatchid:[17,14],divid:[0,17,14,3,8],anoth:[0,17,14,8],stemflow:14,becuas:14,tocub:[14,8],maxextr:14,csv:17,simpl:[0,2],gash:0,resourc:14,perrin:13,reclassifi:0,xul:0,menden:13,postfix:2,caus:[0,6],membesrt:16,constitu:16,help:[0,5,11],reservoir:[1,3,8,17,14,16],tslicedyn:[14,11],through:[14,16,8],uh1:3,paramet:[13,6,2],coarser:[1,16],capilari:[14,8],baseflow:[0,8],might:10,scipi:7,"return":[0,2,3,4,5,7,8,9,11,14],sssf:16,cel:[5,16],weedi:14,maxba:8,rundyn:5,complain:0,radiat:13,easili:[1,5,11,9],corina:13,found:[0,1,14,7,9],lddglobalopt:0,weight:14,heavi:14,connect:[9,5,11,16,8],watbal:17,quantum:0,operation:16,reduct:[14,8],difboun:16,research:14,print:[17,14,7,3,8],differ:13,reason:0,resess:0,put:[0,9,17,11],rewrit:[1,2,8],gdal:0,sbm:[17,1,14,2],role3:4,b1_sublist:16,veloc:5,exponenti:8,rainforest:14,assign:0,feed:[16,3],major:0,alphanl:8,exchang:[16,3],misc:17,number:[0,2,3,6,7,8,10,11,17,13,14,16],wflowmodel:[1,3,5,8,9,11,14],least:[0,6,16,7],shoal:14,miss:[0,6,16],jep:10,lowerflowbound:[14,11],stormflow:0,construct:[0,1,16],station:13,accucapacityflux:14,storm:[14,16],run_default:17,store:[0,16,3,8],adher:[9,5,11],option:[0,2,3,5,7,8,14,16],snowpack:14,qlu:17,drain:[0,14],pars:[9,5,2,3,11],upstreasm:6,vattenbalansavdeln:8,remov:[0,13,16,8],horizont:[1,16],reus:9,raunheim:13,comput:[0,8],atmospher:13,wflow_riverlength_fact:[0,17],dedic:0,mountain:14,equival:8,self:[3,5,8,11,17,14,16],percentil:[0,17,14],dw_write_b2_outloc:16,build:[],penman:14,distribut:[0,1,14,8],koeln:13,previou:[3,5,7,8,9,17,14],reach:14,most:[0,1,3,4,5,7,8,9,11,17,14],amap:16,alpha:17,datablock:16,exf:17,clear:[13,8],cover:[0,6],part:[0,1,3,5,6,8,9,11,14,16],exp:14,latest:10,headurl:1,particularli:8,maxleakag:[0,14],fine:0,find:0,writeascii:16,noah:14,northern:1,solut:2,factor:[0,7,8,17,13,14],boulder:14,rigth:0,hit:14,express:[13,14],troughout:16,restart:[9,5,11,3,8],continuum:1,whenev:14,rainfal:8,singapor:[],common:[],srtm:13,river:[0,5,13,8],set:[13,6],dump:16,sustanc:16,outputmap:[17,3],startup:[17,16],seg:16,see:[0,3,6,8,10,11,17,14],sec:[11,4],arg:[0,3,8,11,14,16],contour:14,dw_writeboundlist:[1,16],smallest:[14,11],cutout:0,experi:0,aet:17,altern:[0,3,5,8,11,17,14,16],numer:14,diffboun:16,hydrologiska:8,both:[0,1,16,8],last:[0,17,14,16,7],delimit:0,annual:17,adaptivetimestep:[14,11],boundid:16,pdf:[1,13,14,11],whole:[0,14,16],load:[0,16],dfid:1,point:[0,6,11,17,14,16],schelleken:1,unrealist:0,residu:[0,14],carambia:13,littl:14,shutdown:7,modelsnow:17,throughout:16,along:14,snowvolum:[14,8],vertic:[1,16],devid:0,empti:[9,5,2,11],actevapustor:14,hardrock:14,johor:16,gap:[0,8],r7991:1,partli:[14,8],demand:14,upstr:14,look:0,frozen:14,straight:14,budget:8,"while":[14,16],abov:13,error:[3,5,8,10,11,14],meteorolog:[],pack:[0,14,8],subsect:17,earli:14,vol:[13,14,16],centr:14,floodplainvol:11,rio:11,itself:[0,11],readt:16,wave:[0,5,16,8],higher:[0,14,8],optim:[0,13,7],wherea:8,sourcemap:16,user:[1,3,5,8,9,11,14],variable_rol:4,warup:7,wherev:8,stack:0,stateless:[9,5,11],lower:[0,5,11,14,8],howver:3,executeact:2,entri:[0,1,14,2,17],wflow_prep:17,libiomp5md:16,schell:[1,2,3,5,7,8,9,11,14,16],picki:0,elev:[0,17,13,8],nilson:13,unsatur:[17,1,14,16],ldd:[0,17,14,16,11],interpolationmethod:17,channelbottomlevel:[14,11],shape:0,mk_qre:3,rundir:[3,5,8,9,11,14],timber:14,inputtimeseriesxml:2,firstzonethick:14,soilmoistur:8,depric:17,zi_:17,snap:0,input:[6,2],float32:0,bin:2,march:1,format:[0,17,14,3,8],wflowvers:8,big:14,bia:13,luclass:16,outstat:[0,17,2],insert:11,bit:0,semi:8,resolv:6,flux:[16,8],canopygapfract:[0,14],b2_simtim:16,often:14,simplifi:[1,2],montieth:14,creation:0,some:[0,17,10,14],back:[0,2,8,17,14,16],reinfilt:17,sampl:[17,3],smoothpar:14,montan:1,b9_mapvar:16,scale:[0,17,14],pet:17,wflow_demmax:[0,14],framwork:9,per:[0,3,8,11,17,13,14,16],larg:[0,14,7],wflow_bin:10,run:[],subcellgwrunoff:14,stem:14,step:[0,3,7,8,17,13,14,16],buiteveld:13,tidal:11,subtract:[14,8],downward:14,tble:0,ylr:0,cmax:14,block:16,pythonpath:10,within:[1,3,5,6,7,8,9,10,11,17,13,14,16],ensur:8,chang:13,implic:14,institut:8,fast:[17,14,16,8],includ:[0,1,7,8,14,16],suit:7,fzf:17,offer:8,"1e35":0,properli:2,"1e31":6,link:[],line:2,info:[10,2,16],consist:[17,1,16],quickflow:8,wigmosta:14,mapmaximum:14,similar:16,curv:[0,14,8],groundwat:[0,17,14,16],constant:[11,14,16,8],overland:[17,14,16],doesn:8,repres:[0,14,16,8],incomplet:[17,5,10,3,11],dynsubstep:[14,11],cfmax:[14,8],polygon:17,titl:13,leveltss:[14,11],b4_dispers:16,b2_numset:16,initialscal:0,eoverr:[0,14],clean:14,gross:14,evap:[14,8],generaten:14,testwflow:10,ago:10,gr4:3,land:[0,13,14,16,8],multpar:8,n_river:14,freewat:8,depth:[0,1,8,11,17,14],qmea:7,nash:13,code:13,underbrush:14,scratch:[5,11],levdyn:5,compact:[0,14],exit:2,gravel:14,subcatch:[0,3,6,7,8,17,13,14,16],volum:[11,14,16,8],trough:[1,16],relev:8,tra:17,notabl:1,waterlevel:[17,11,14,16,8],"try":[0,17,14,11],wdepth:14,potenevap:14,wflow_:[17,2,7],pleas:[0,14],impli:8,smaller:[14,11],maxau:13,leakag:[0,14],download:1,cfr:8,outputdir:2,append:16,compat:14,index:[1,14,8],vanarno:10,compar:14,scatch:17,gauges_x:0,subcellrunoff:14,cell:[0,3,5,6,8,17,13,14,16],hourli:[14,3],experiment:[16,10,14,3,11],gauges_i:0,openmi:1,impact:[1,13],wflowsbm:13,intercept:0,tde:17,lev:[17,5,16,11],becom:[6,14,8],sinc:[3,5,8,9,10,11],convert:[0,1,2,8,14,16],ineffect:14,larger:[1,14,16,8],clonemapfilenam:10,typic:2,appli:[17,1,13,14,8],app:10,"boolean":0,dw_createdwrun:16,rootingdepth:[0,17,14,7],cloud:1,fed:[14,16],from:[0,1,2,3,4,5,7,8,9,11,17,13,14,16],areamap_class:16,next:[0,6,7,17,14,16],websit:[14,11],dw_writenrexchnag:16,chr:13,ust:17,floodplain:[14,11],channelrough:[14,11],hgaug:17,account:3,unpav:0,wflow:6,evelev:0,meet:8,pcraster:[0,1,2,3,5,8,9,10,11,17,14,16],control:[0,1,14,8],process:[0,8],high:[0,13,8],updatefil:17,tag:16,schemat:[14,8],multdynapar:8,everywher:16,surfac:[0,1,8,11,13,14,16],inmap:[2,3,5,11,17,16],rootdistpar:14,lowerzonestorag:8,forest:[1,8],configfil:[3,5,7,8,9,11,17,14],instead:[1,8,9,11,17,14],delai:[2,3,8],precalcul:8,watert:14,hotstart:17,hydrolog:[0,1,7,8,11,13,14],topograph:[17,1],redund:8,physic:0,essenti:[3,5,8,9,11,14],loglevel:[5,11,14,3,8],bind:1,element:[14,2],issu:2,allow:[1,14,16],timestap:8,ouput:[9,5,11,3,8],sigmoid:[17,14],move:[0,14],meter:[0,14],fluvial:14,outxml:2,stepwis:14,effici:[13,14,8],segement:16,inputtss:17,inflow_numb:16,chosen:13,suppli:[0,1,3,5,6,8,9,11,14,16],qgi:0,decai:[0,14],pixel:[0,8],pixml_totss_d:2,python:[2,16],dai:[0,2,8,10,17,13,14],fewsrun:[2,3,5,8,11,17,14],dat:16,mention:8,lowerzon:8,parameter:14,exta:[1,16],lammersen:13,metr:[17,14,3,11],variable_unit:4,scalarinput:17,"static":[],our:8,out:[0,14,16],variabl:[0,3,5,8,10,16],matrix:[13,16],weert:10,rev:[2,3,5,7,8,9,11,14,16],discharg:[0,3,5,6,7,8,11,17,13,14,16],stuf:14,rel:[0,7,10,17,14,16],sno:17,wich:8,ref:8,red:16,evapotranspir:[0,3,8,17,13,14],wflow_landus:[0,17],conceptualis:1,insid:5,subgrid:0,refreez:[14,8],dictionari:[17,14,16,8],releas:1,volken:13,could:0,keep:[14,11],cevpf:8,length:[3,5,8,11,17,14,16],outsid:[0,14,4],upscal:0,upperzonestorag:8,softwar:1,isbn:13,firstzonemincapac:[0,14],date:[0,2,8],tslice:[17,3],laps:13,outsum:[0,5,6,11],system:[0,1,2,17,13,14,16],messag:0,attach:1,migth:[17,14],"final":[0,1,14],floodwai:14,shell:0,tss_topixml:2,shallow:[17,14],rst:1,cpython:10,structur:[0,5,16],annualdischarg:17,steep:[17,14],nrseg:16,pfrac:14,clip:0,cochem:13,have:[0,5,7,8,11,17,13,14,16],need:[0,1,2,3,5,8,9,10,11,17,14,16],optimis:[14,7,11],ditribut:14,noseg:16,rout:[0,1,3,6,8,14],mix:16,which:[0,6,7,8,17,13,14,16],wflow_tempcor:17,graviti:14,singl:8,jaap:10,unless:8,whc:[14,8],channelform:[14,11],segment:16,"class":[0,1,3,5,7,8,9,11,17,14,16],updatecol:[17,14,8],gather:0,updaterunoff:[14,8],determin:[0,2,3,5,8,11,17,13,14,16],xmlfile:2,recess:8,verbos:17,empir:8,rough:[14,11],trivial:0,anywai:2,sh1:3,sh2:3,locat:[0,1,2,3,5,8,11,17,14,16],step2dir:0,basel:13,should:[0,3,5,7,8,9,10,11,17,14,16],jan:8,ksa:17,parameter_1:[17,7],parameter_0:[17,7],local:[0,1,13,16,17],pottran:14,rheinhal:13,count:2,floodext:5,drainagebas:14,setkquickflow:8,pave:0,autom:7,tbl:[0,3,6,8,11,14],increas:[0,17,14,8],flattend:16,shp:0,parameter_n:7,variable_name_in_model:4,integr:[14,16],contain:[17,9,10,16],strahler:0,sediment:14,view:[17,8],cf_soil:14,wetland:11,configfilenam:10,dlc:[14,8],correctli:10,mainli:8,boundari:[0,1,14,16,11],below:[0,2,3,4,8,9,11,17,13,14,16],dll:[10,16],mycas:17,written:[2,16],progress:1,neither:14,spinup:17,kei:17,windowaverag:14,notion:14,addit:[0,14,16,7,11],plugin:0,canopi:[0,14,8],equal:[17,14,8],openda_bin:10,etc:[0,1,16,17],equat:[11,14,8],freeli:17,minumum:14,hattingen:13,guidelin:[],brahmer:13,moistur:[3,8],solv:[10,14],respect:[1,11,14,8],thereor:14,andernach:13,firstzoneksatv:[0,14,7],compon:[14,16,8],outflow:[0,17,14,16,8],actevapsat:14,treat:14,trajectori:14,"0rc1":1,dw_writenrseg:16,inv:17,thetar:[0,14],"57z":1,presenc:[14,8],meus:0,hypsograph:8,togeth:16,present:[0,1,3,5,8,9,11,14,16],statist:0,getmapstacksfromruninfo:2,modelnam:7,tss:[2,3,7,8,11,17,14],cursor:0,smhi:8,observ:[14,7],openstreetmap:0,instantani:16,layer:[0,1,16,8],site:14,cqflow:1,opendap:1,pcrmap:16,revis:8,scienc:13,mimimum:14,schematis:[14,16],satisfi:14,member:16,handl:0,largest:0,inc:16,"35z":5,wflow_subcatch:[0,17,16,7],outputformat:17,workdir:[0,2],http:[0,1,2,9],effect:14,handi:0,logfil:[17,14,8],rift:14,off:[14,16,8],well:2,exampl:6,command:2,interpol:17,usual:[0,14,7],deltar:[1,2],distanc:[0,17,5,14,3],less:14,wflow_riv:[0,17],obtain:[16,8],expon:8,rapid:[1,16],sky:13,noq:16,script:2,add:[1,2,3,7,9,17,14,16],valid:17,wet:[0,1,14,17],logger:2,match:[0,17,13,14,8],waven:11,vrac:13,finnegan:14,arguabl:14,ustoredepth:[17,14],klok:13,redesign:16,you:[0,2,4,5,7,9,10,11,17,14,16],loss:14,like:0,lost:0,dw_write_subst:16,poros:14,necessari:0,page:1,lager:14,exceed:8,inputmapstack:[17,5,11],actinfilt:14,wflow_bankful:5,casedirectori:10,"export":[2,16],home:[10,2],lead:0,b8_initi:16,lear:17,tend:14,estim:[17,1,14,16],leav:[16,8],x_gauge_1:0,x_gauge_2:0,overlai:0,riverwidth:[5,14],canopystorag:14,journal:14,usag:[0,2,3,5,7,8,9,11,17,14,16],floodplainwidth:[14,11],although:[9,14,7],stage:[6,14],about:0,actual:[0,17,5,14,8],column:[0,1,2,7,8,17,14,16],pcr_tanh:3,runinfofil:[17,14,2,7,8],"56z":2,own:9,fro:[0,14],automat:[0,7],dataset:13,assess:[13,14],openlay:0,reanalysi:13,van:13,transfer:[17,14,8],much:[0,14,11],"var":[0,1,7,3],"function":[],timest:16,triangular:8,lelystad:13,runoffgeneratinggwperc:[0,17,14,7],bug:10,leastsq:7,also:[0,1,2,3,5,7,8,9,10,11,17,13,14,16],sutcliff:13,made:[0,9,13,14,16],temp:[0,17],veget:[0,14],smooth:14,displai:[5,2,11],delwaq:[1,16],limit:[14,2,7,8],otherwis:[17,5,8],problem:[],succe:0,colum:[16,7],evalu:0,ifthenels:14,"int":[17,3],descript:2,dure:[14,16,8],inw:16,inp:16,nomin:0,implement:[3,5,8,9,11,14],ini:[],freewaterdepth:14,firstzonedepth:[17,14,8],pit:[13,14,11],probabl:[0,6],default_sbm:[0,17],sperna:13,detail:[0,14],areacod:[17,7],other:[0,1,2,5,8,9,11,17],lookup:[],getopt:[9,5,3,11],stat:17,surfacerunoffmm:[17,8],krahe:13,sphinx:1,weiland:13,"_sbm":7,rule:[0,2],netintercept:14,samplemap:17},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method","4":"py:data"},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"],"4":["py","data","Python data"]},filenames:["wflow_building","index","wflow_adapt","wflow_gr4","testrunner_wflowhbv","wflow_floodmap","faq","wflow_fit","wflow_hbv","framework","wflow_openda","wflow_wave","wf_DynamicFramework","calib_report","wflow_sbm","wflow_lib","wflow_delwaq","wflow_usage"],titles:["Data requirements","Welcome to wflow’s documentation!","wflow_adapt Module","wflow_gr4 Module","run wflow_hbv via API","The wflow_floodmap module","Questions and answers","The wflow_fit module","The wflow_hbv model","Using the framework","Linking wflow to OpenDA","wflow_wave Module","wf_DynamicFramework Module","Calibration of the wflow_sbm model for the Rhine catchment using EOBS data","wflow_sbm Module","wflow_lib Module","wflow_delwaq Module","Using the models"],objects:{"":{wflow_adapt:[2,0,0,"-"],wflow_prepare_step1:[0,0,0,"-"],wflow_sceleton:[9,0,0,"-"],wflow_floodmap:[5,0,0,"-"],wflow_fit:[7,0,0,"-"],wflow_hbv:[8,0,0,"-"],wflow_wave:[11,0,0,"-"],wflow_gr4:[3,0,0,"-"],wflow_sbm:[14,0,0,"-"],wflow_delwaq:[16,0,0,"-"],wflow_prepare_step2:[0,0,0,"-"]},wflow_sbm:{usage:[14,1,1,""],actEvap_SBM:[14,1,1,""],main:[14,1,1,""],WflowModel:[14,2,1,""],SnowPackHBV:[14,1,1,""]},wflow_prepare_step2:{usage:[0,1,1,""],OpenConf:[0,1,1,""],main:[0,1,1,""],resamplemaps:[0,1,1,""],configget:[0,1,1,""]},"wflow_wave.WflowModel":{suspend:[11,3,1,""],resume:[11,3,1,""],stateVariables:[11,3,1,""],initial:[11,3,1,""],dynamic:[11,3,1,""],supplyCurrentTime:[11,3,1,""],runDynamicWave:[11,3,1,""]},wflow_sceleton:{main:[9,1,1,""],WflowModel:[9,2,1,""]},wflow_floodmap:{main:[5,1,1,""],WflowModel:[5,2,1,""]},"wflow_floodmap.WflowModel":{suspend:[5,3,1,""],resume:[5,3,1,""],stateVariables:[5,3,1,""],initial:[5,3,1,""],dynamic:[5,3,1,""],supplyCurrentTime:[5,3,1,""]},"wflow_hbv.WflowModel":{suspend:[8,3,1,""],resume:[8,3,1,""],stateVariables:[8,3,1,""],initial:[8,3,1,""],dynamic:[8,3,1,""],supplyCurrentTime:[8,3,1,""],updateRunOff:[8,3,1,""]},wflow_hbv:{multdynapars:[8,4,1,""],wflowVersion:[8,4,1,""],multpars:[8,4,1,""],WflowModel:[8,2,1,""],usage:[8,1,1,""],main:[8,1,1,""],updateCols:[8,4,1,""]},"wflow_sceleton.WflowModel":{suspend:[9,3,1,""],resume:[9,3,1,""],stateVariables:[9,3,1,""],initial:[9,3,1,""],dynamic:[9,3,1,""],supplyCurrentTime:[9,3,1,""],"__init__":[9,3,1,""]},"wflow_sbm.WflowModel":{suspend:[14,3,1,""],resume:[14,3,1,""],stateVariables:[14,3,1,""],initial:[14,3,1,""],dynamic:[14,3,1,""],supplyCurrentTime:[14,3,1,""],updateRunOff:[14,3,1,""]},"wflow_fit.wfmodel_fit_API":{run:[7,3,1,""],savemaps:[7,3,1,""],multVarWithPar:[7,3,1,""],shutdown:[7,3,1,""]},"wflow_gr4.WflowModel":{suspend:[3,3,1,""],resume:[3,3,1,""],stateVariables:[3,3,1,""],initial:[3,3,1,""],dynamic:[3,3,1,""],supplyCurrentTime:[3,3,1,""]},wflow_wave:{usage:[11,1,1,""],main:[11,1,1,""],WflowModel:[11,2,1,""]},wflow_fit:{wfmodel_fit_API:[7,2,1,""],configget:[7,1,1,""]},wflow_gr4:{pcr_tanh:[3,1,1,""],mk_qres:[3,1,1,""],initUH1:[3,1,1,""],initUH2:[3,1,1,""],WflowModel:[3,2,1,""],usage:[3,1,1,""],main:[3,1,1,""]},wflow_prepare_step1:{usage:[0,1,1,""],OpenConf:[0,1,1,""],main:[0,1,1,""],configget:[0,1,1,""]},wflow_delwaq:{dw_WriteInitials:[16,1,1,""],dw_WriteBoundData:[16,1,1,""],dw_WriteSegmentOrExchangeData:[16,1,1,""],dw_Write_Substances:[16,1,1,""],readTS:[16,1,1,""],dw_WritePointer:[16,1,1,""],dw_WriteNrSegments:[16,1,1,""],dw_WriteNrExChnages:[16,1,1,""],dw_WriteBoundlist:[16,1,1,""],dw_mkDelwaqPointers:[16,1,1,""],dw_Write_B2_outlocs:[16,1,1,""],usage:[16,1,1,""],dw_pcrToDataBlock:[16,1,1,""],dw_Write_Times:[16,1,1,""],main:[16,1,1,""],dw_CreateDwRun:[16,1,1,""]},wflow_adapt:{mapstackxml:[2,1,1,""],getMapStacksFromRuninfo:[2,1,1,""],log2xml:[2,1,1,""],pixml_state_updateTime:[2,1,1,""],pixml_totss:[2,1,1,""],getEndTimefromRuninfo:[2,1,1,""],getStartTimefromRuninfo:[2,1,1,""],getTimeStepsfromRuninfo:[2,1,1,""],setlogger:[2,1,1,""],tss_topixml:[2,1,1,""],main:[2,1,1,""],pixml_totss_dates:[2,1,1,""]}},titleterms:{all:17,code:9,wflow_gr4:[1,3],infiltr:14,python:[5,7,8],rutter:14,via:4,dynam:14,paramet:[0,14],depend:[3,11],wflow_prepare_step2:0,wflow_prepare_step1:0,configur:[0,3,11],overview:17,input:0,analyt:14,sourc:9,dem:13,kinemat:14,faq:1,wave:14,framework:[1,9],temperatur:14,grid:14,veri:16,requir:0,introduct:[0,1,2,3,5,7,8,11,14,16],measur:17,wflow_lib:15,rainfal:14,singapor:16,common:0,man:14,river:14,set:[0,4],gash:14,procedur:13,malaysia:16,"static":0,result:7,respons:8,todo:[1,16,2,3],librari:1,variabl:14,rhine:13,flux:14,section:4,definit:[9,5,3,11],content:0,adapt:[1,2],"new":[0,1],evapor:8,refer:[1,14],wflow_wav:[1,11],run:[17,4],wflowsbm:14,gener:14,water:14,intercept:[14,8],modifi:[13,14],valu:[0,14],openda:[1,10],fit:7,anot:9,runoff:[14,8],chang:0,wflow_sbm:[0,1,13,14,17],origin:13,routin:8,calibr:[0,13],guidelin:14,modul:[1,2,3,5,7,8,11,12,14,15,16],api:4,differ:0,script:[0,16],test:1,question:6,wflow_hbv:[1,8,4],few:[1,2],scheme:14,wflow_delwaq:16,"function":2,option:17,forc:[13,14],catchment:13,link:[10,2],line:[0,17],"case":[0,17,16],account:14,possibl:17,wflow_sceleton:9,prepar:0,work:16,wflow_fit:7,wflow:[1,10,2],landus:13,abov:9,meteorolog:14,problem:0,process:14,soil:[14,8],store:14,indic:1,width:14,ini:[17,7,4],file:[0,17,7,4],tabl:[0,1],wf_dynamicframework:12,welcom:1,snow:8,note:3,how:[1,16,2,7],lookup:0,build:1,answer:6,document:[0,1,2,3,11,14,16],simpl:16,updat:17,map:0,structur:17,hydrograph:0,data:[0,17,13,14],studi:16,sub:14,eob:13,hbv:17,wflow_adapt:2,directori:17,descript:[5,7,8],exampl:[1,16],command:[0,17],potenti:8,delft:[1,2],model:[0,1,2,3,5,8,9,11,17,13,14],wflow_floodmap:[1,5]}}) \ No newline at end of file Index: doc/_build/html/testrunner_wflowhbv.html =================================================================== diff -u --- doc/_build/html/testrunner_wflowhbv.html (revision 0) +++ doc/_build/html/testrunner_wflowhbv.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,210 @@ + + + + + + + + run wflow_hbv via API — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      run wflow_hbv via API

      +
      +

      Settings in the ini file

      +

      In the ini file example below several variables are configured to be available via the +API. For most settings this only defines +what the API will expose to the outside world. However, if you specify 0 (input) +as a role for one of the forcing variables the wf_readmap function will no longer +read maps from disk for that variable but will return the contents of that +variable via the API.

      +
      +
      +

      Settings in the API section

      +

      The API section specifies variables that are exposed via the ere. Use the following +convention:

      +
      variable_name_in_model=variable_role,variable_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 = -
      +
      +
      +

      Use role 0 for input maps to the model (those that are normally read from disk), role 1 +for outputs, role 2 for state variables and role3 for model parameters.

      +
      +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/wf_DynamicFramework.html =================================================================== diff -u --- doc/_build/html/wf_DynamicFramework.html (revision 0) +++ doc/_build/html/wf_DynamicFramework.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,175 @@ + + + + + + + + wf_DynamicFramework Module — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + + + + + + + \ No newline at end of file Index: doc/_build/html/wflow_adapt.html =================================================================== diff -u --- doc/_build/html/wflow_adapt.html (revision 0) +++ doc/_build/html/wflow_adapt.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,383 @@ + + + + + + + + wflow_adapt Module — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      wflow_adapt Module

      +
      +

      Introduction

      +

      wflow_adapt is an adapter that links wflow to Delft-FEWS +(http://publicwiki.deltares.nl/display/FEWSDOC/Home). it is typically run from the +Delft-FEWS general adapter.

      +
      +
      +

      Linking wflow models to Delft-FEWS

      +

      To run the model from Delft-FEWS the following actions need to be +performed:

      +
        +
      • wflow_[sbm|hbv].py needs to be run with the -F option where the argument refers +to a Delft-FEWS runinfo.xml file
      • +
      • you need to specify fewsrun=1 in the model section of the .ini file
      • +
      • The postadapter (wflow_adapt.py) needs to be run after the wflow run
      • +
      +

      Because DELFT-FEWS exports the mapstacks beginning at 0 and pcraster +expects them to start at 1 you will need to add a delay of one +timesstep to mapstack timeseries exported to wflow. This will mean +the first timestep (.000) is empty but that one will be ignored by +wflow anyway.

      +

      Command line arguments:

      +

      An example of executing wflow from the Delft-FEWS general adapter +is shown below:

      +
      <executeActivities>
      +<executeActivity>
      +<description>Run wflow</description>
      +<command><executable>bin-wflow\wflow_sbm.exe</executable></command>
      +    <arguments>
      +    <argument>-C</argument>
      +    <argument>rhine</argument>
      +    <argument>-F</argument>
      +    <argument>rhine/inmaps/runinfo.xml</argument>
      +    <argument>-f</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>
      +    <argument>-I</argument>
      +    <argument>wflow_sbm.ini</argument>
      +    <argument>-T</argument>
      +    <argument>86400</argument>
      +</arguments>
      +<timeOut>1200000</timeOut>
      +</executeActivity>
      +</executeActivities>
      +
      +
      +

      The wflow_adapt module can also be used by other programs to convert .tss files to +pi-xml vv. Below the API documentation of the module is given.

      +
      +
      +

      How to use the adapter

      +

      [PM]

      +
      +
      +

      Module function documentation

      +

      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:

      +
      +
      wflow_adapt-M Post -t InputTimeseriesXml -s inputStateFile -I inifile
      +
      -o outputStateFile -r runinfofile -w workdir -C case -T timestepInSeconds [-R runId]
      +
      +

      Issues:

      +
        +
      • Delft-Fews exports data from 0 to timestep. PCraster starts to count at 1. +Renaming the files is not desireable. The solution is the add a delay of 1 +timestep in the GA run that exports the mapstacks to wflow.
      • +
      • Not tested very well.
      • +
      • There is a considerable amount of duplication (e.g. info in the runinfo.xml and +the .ini file that you need to specify again :-())
      • +
      +
      +
      +

      Todo

      +

      rewrite and simplify

      +
      +
      +

      $Author: schelle $ +$Id: wflow_adapt.py 915 2014-02-10 07:33:56Z schelle $ +$Rev: 915 $

      +
      +
      +wflow_adapt.getEndTimefromRuninfo(xmlfile)
      +

      Gets the endtime of the run from the FEWS runinfo file

      +
      + +
      +
      +wflow_adapt.getMapStacksFromRuninfo(xmlfile)
      +

      Gets the list of mapstacks fews expect from the runinfo file and create those

      +
      + +
      +
      +wflow_adapt.getStartTimefromRuninfo(xmlfile)
      +

      Gets the starttime from the FEWS runinfo file

      +
      + +
      +
      +wflow_adapt.getTimeStepsfromRuninfo(xmlfile, timestepsecs)
      +

      Gets the number of timesteps from the FEWS runinfo file.

      +
      + +
      +
      +wflow_adapt.log2xml(logfilename, xmlfilename)
      +

      Converts an (adapter) log file the a FEW pi XML diagnistics file

      +
      + +
      +
      +wflow_adapt.main()
      +

      Main entry for using the module as a command line program (e.g. from the Delft-FEWS GA)

      +
      + +
      +
      +wflow_adapt.mapstackxml(mapstackxml, mapstackname, locationname, parametername, Sdate, Edate, timestepsecs)
      +

      writes mapstack xml file

      +
      + +
      +
      +wflow_adapt.pixml_state_updateTime(inxml, outxml, DT)
      +

      Reads the pi-state xml file inxml and updates the data/time of +the state using datetime. Writes updated file to outxml

      +
        +
      • Can be use in scripts to set the date.time of the +output state.xml that Delft-FEWS writes.
      • +
      +
      +

      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.

      +
      +
      + +
      +
      +wflow_adapt.pixml_totss(nname, outputdir)
      +

      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
      • +
      +
      +
      + +
      +
      +wflow_adapt.pixml_totss_dates(nname, outputdir)
      +

      Gets Date/time info from XML file and creates .tss files with:

      +
      +
        +
      • Day of year
      • +
      • Hour of day
      • +
      • Others may follow
      • +
      +
      +
      + +
      +
      +wflow_adapt.setlogger(logfilename)
      +

      Set-up the logging system and return a logger object. Exit if this fails

      +

      Input: +- filename

      +

      Output: +- Logger object

      +
      + +
      +
      +wflow_adapt.tss_topixml(tssfile, xmlfile, locationname, parametername, Sdate, timestep)
      +

      Converts a .tss file to a PI-xml file

      +
      + +
      +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/wflow_building.html =================================================================== diff -u --- doc/_build/html/wflow_building.html (revision 0) +++ doc/_build/html/wflow_building.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,773 @@ + + + + + + + + Data requirements — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      Data requirements

      +

      The actual data requirements depend on the application of the model. The +following list summarizes the data requirements:

      +
        +
      • Static data
          +
        • Digital Evelevation Model (DEM)
        • +
        • A Land Cover map
        • +
        • A map representing Soil physical parameters (the Land Cover map +can also be used)
        • +
        +
      • +
      • Dynamic data (spatial time series, map-stacks)
          +
        • Precipitation
        • +
        • Potential evapotranspiration
        • +
        • Temperature (optional, only needed for snow pack modelling)
        • +
        +
      • +
      • Model parameters (per land use/soil type) +
      • +
      +

      The module can be linked to the Delft-FEWS system 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 section wflow_adapt Module

      +
      +
      +

      Setting-up a new model

      +

      Setting-up a new model first starts with making a number of decisions and gathering the +required data:

      +
        +
      1. Do I have the static input maps in pcraster fromat (DEM ,land-use map, soil map)?
      2. +
      3. what resolution do I want to run the model on?
      4. +
      5. do i need to define multiple sub-catchments to report totals/flows for seperately?
      6. +
      7. what forcing data do i have available for the model (P, Temp, ET)?
      8. +
      9. do I have gridded forcing data or scalar timeseries?
      10. +
      +
      +

      Note

      +

      Quantum Gis (QGIS) can read and write pcraster maps (via gdal) and is a very handy tool +to support data preparation.

      +
      +

      Depending on the formats of the data some converting of data may be needed. The +procedure described below assumes you have the main maps available in pcraster +format. If that is not the case free tools like Qgis (www.qgis.org) and gdal can be +used to convert the maps to the required format. Qgis is also very handy +to see if the results of the scripts match reality by overlaying it with +a google maps or openstreetmaps layer using the qgis openlayers plugin.

      +

      When all data is available setting up the model requires the following steps:

      +
        +
      1. Run the wflow_prepare_step1 and 2 scripts or prepare the input maps by hand (see Preparing static input maps)
      2. +
      3. Setup the wflow model directory structure (Setup a case) and copy the files (results from step2 of the prepare scripts) there (see Setting Up a Case)
      4. +
      5. Test run the model
      6. +
      7. Supply all the .tbl files (or complete maps) for the model parameters (see Input parameters (lookup tables or maps))
      8. +
      9. Calibrate the model
      10. +
      +
      +

      Preparing static input maps

      +
      +

      Introduction

      +

      Preparing the input maps for a distributed model is not always trivial. +wflow comes with two scripts that help in this process. The scripts are +made with the assumption that the base DEM you have is a higher +resolution as the DEM you want to use for the final model. When +upscaling the scripts try to maintain as much information from the high +resolution DEM as possible. The procedure described here can be used for +all wflow models (wflow_sbm or wflow_hbv).

      +
      +
      +

      Using the scripts

      +

      The scripts assume you have a DEM, landuse and soil map available in pcraster +format. If you do not have a soil or landuse map the you can generate a uniform map. +The resolution and domain of these maps does not need to be the +same, the scripts will take care of resampling. The process is devided +in two scripts, wflow_prepare_step1.py and wflow_prepare_step2.py. +In order to run the scripts the following maps/files need to be +prepared.

      +
      +

      Note

      +

      Both scripts need pcraster and gdal executables (version >= 1.10) to be available +in your computers search path

      +
      +
        +
      • a DEM in pcraster format
      • +
      • a land use map in pcraster format. If the resolution is different +from the DEM the scripts will resample this map to match the DEM (or +the DEM cutout). If no landuse map is found a uniform map will be +created.
      • +
      • a soil map in pcraster format. If no soil map is found a unifrom map will be created.
      • +
      • a configuration file for the prepare scripts that defines how they operate +(.ini format) file (see below)
      • +
      • an optional shape file with a river network
      • +
      • an optional catchment mask file
      • +
      +

      The scripts work in two steps, each script need to be given at least one +command-line option, the configuration file. The first script performs +the following tasks:

      +
        +
      • wflow_prepare_step1.py

        +
          +
        1. Performs an initial upscaling of the DEM if required (set in the +configuration file). This initial upscaling may be needed if the +processing steps (such as determining the drainage network) take a +very long time or if the amount of available memory is not +sufficient. The latter may be the case on 32bit systems. For +example a 90x90 m grid for the Rhine/Meuse catchment could not be +handled on a 32 bit system.

          +
        2. +
        3. Create the local drainage network. If the ldd is already present +if will use the existing ldd. Use the force option to overwrite an +existing ldd.

          +
        4. +
        5. Optionally use a shape file with a river network to “burn-in” this network +and force the ldd to follow the river. In flat areas wher the river can +be higher than the surrounding area having a river shape is crucial.

          +
          +

          Tip

          +

          Another option is to prepare a “pseudo dem” from a shape file with already +defined catchment boundaries and outlets. Here all non boundary points would get a +value of 1, all boundaries a value of 2 and all outlets a value of -10. This +helps in generating a ldd for polder areas or other areas where the topography +is not the major factor in determining the drainage network.

          +
          +
        6. +
        7. Determine various statistics and also the largest catchment +present in the DEM. This area will be used later on to make sure +the catchments derived in the second step will match the catchment +derived from the high resolution DEM

          +
        8. +
        +
      • +
      • wflow_prepare_step1.py

        +
          +
        1. Create a map with the extend and resolution defined in the +configuration file and resample all maps from the first step to +this resolution

          +
        2. +
        3. Create a new LDD using the following approach:

          +
            +
          • Construct a new dem to derive the ldd from suing the minimum +dem from the first step for all the pixels that are located on +a river and the maximum dem from the first step for all other +pixels.
          • +
          • In addition raise all cells outside of the largest catchment +defined in the first step with 1000 meter divided by the +distance of each cell to the largest catchment.
          • +
          • Derive the ldd and determine the catchments
          • +
          +
          +
          +Steps in creating the wflow model input +

          Steps in creating the wflow model input

          +
          +
          +
        4. +
        +
      • +
      +

      Once the script is finished successfully the following maps should have +been created, the data type is shown between brackets:

      +
        +
      • wflow_catchment.map (ordinal)
      • +
      • wflow_dem.map (scalar)
      • +
      • wflow_demmax.map (scalar)
      • +
      • wflow_demmin.map (scalar)
      • +
      • wflow-dem*percentile* - (10,25,33,50,66,75,90) (scalar)
      • +
      • wflow_gauges.map (ordinal)
      • +
      • wflow_landuse.map (nominal)
      • +
      • wflow_soil.map (nominal)
      • +
      • wflow_ldd.map (ldd)
      • +
      • wflow_outlet.map (scalar)
      • +
      • wflow_riverburnin.map (boolean)
      • +
      • wflow_riverlength_fact.map (scalar)
      • +
      • wflow_river.map (ordinal)
      • +
      • wflow_streamorder.map (ordinal)
      • +
      • wflow_subcatch.map (ordinal)
      • +
      +

      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.

      +
      +

      Note

      +

      Getting the subcatchment right can be a bit of a problem. In order +for the subcatchment calculations to succeed the gauges that determine +the outlets must be on a river grid cell. If the subcatchment +creation causes problems the best way to check what is going on is +to import both wflow_gauges,map en wflow_streamorder.map in qgis so +you can check if the gauges are on a river cell. In the ini file you define +the order above which a grid cell is regarded as a river.

      +
      +
      +

      Note

      +

      If the cellsize of the output maps is identical to the input DEM +the second script shoudl NOT be run. All data will be produced by +the first script.

      +
      +
      +
      +

      Command line parameters

      +

      Both scripts take the same command-line parameters:

      +
      wflow_prepare_step1 -I inifile [-W workdir][-f][-h]
      +
      +    -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
      +
      +
      +
      +
      +

      contents of the configuration file

      +

      An example can be found here.

      +
      [directories]
      +# all paths are relative to the workdir set on the command line
      +# The directories in which the scripts store the output:
      +step1dir = step1
      +step2dir = step2
      +
      +[files]
      +# Name of the DEM to use
      +masterdem=srtm_58_14.map
      +# name of the lad-use map to use
      +landuse=globcover_javabali.map
      +soil=soil.map
      +# Shape file with river/drain network. Use to "burn in" into the dem.
      +river=river.shp
      +riverattr=river
      +# The riverattr above should be the shapefile-name without the .shp extension
      +
      +[settings]
      +# Nr to reduce the initial map with in step 1. This means that all work is done
      +# on an upscaled version of the initial DEM. May be usefull for very
      +# large maps. If set to 1 (default) no scaling is taking place
      +initialscale=1
      +
      +# Set lddmethod to dem (other methods are not working at the moment)
      +lddmethod=dem
      +
      +# If set to 1 the gauge points are moved to the neares river point on a river
      +# with a strahler order higher of identical as defined in this ini file
      +snapgaugestoriver=1
      +
      +# The strahler order above (and including) a pixel is defined as a river cell
      +riverorder=4
      +
      +# X and y cooordinates of gauges (subcatchments). Please note the the locations
      +# are based on the river network of the DEM used in step2 (the lower resuolution
      +# DEM). This may need some experimenting... is most case the snap function
      +# will work by ymmv. To set multiple gauges use [x_gauge_1, x_gauge_2]
      +
      +gauges_y = [-6.1037]
      +gauges_x = [107.4357]
      +
      +
      +# settings for subgrid to create. This also determines how the
      +# original dem is (up)scaled. If the cellsize is the same
      +# as the original dem no scaling is performed. This grid will
      +# be the grid the final model runs on
      +Yul = -6.07
      +Xul = 106.9
      +Ylr = -7.30271
      +Xlr = 107.992
      +cellsize = 0.009166666663
      +
      +# tweak ldd creation. Default should be fine
      +lddoutflowdepth=1E35
      +lddglobaloption=lddout
      +
      +
      +
      +
      +

      Problems

      +

      In many cases the scripts will not produce the maps the way you want them +in the first try. The most common problems are:

      +
        +
      1. The gauges do not coincide with a river and thus the subcatchment is not correct

        +
        +
          +
        • Move the gauges to a location on the rivers as determiend by the scripts. The +best way to do this is to load the wflow_subcatch.map in qgis and use the cursor +to find the nearest river cell fro a gauge.
        • +
        +
        +
      2. +
      3. The delimited catchment is not correct even if the gauges is at the rigth location

        +
        +
          +
        • Get a better DEM or fix the current DEM.
        • +
        • Use a river shape file to fix the river location
        • +
        • Use a catchment mask to force the catchment delineated to use that. Or just clip the DEM with the catchment mask.
        • +
        +
        +
      4. +
      +

      If you still run into problems you can adjust the scripts yourself to get better results.

      +
      +
      +
      +
      +

      Script documentation

      +
      +

      wflow_prepare_step1

      +

      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: $

      +
      +
      +wflow_prepare_step1.OpenConf(fn)
      +
      + +
      +
      +wflow_prepare_step1.configget(config, section, var, default)
      +

      gets parameter from config file and returns a default value +if the parameter is not found

      +
      + +
      +
      +wflow_prepare_step1.main()
      +
      +++ + + + +
      Variables:
        +
      • masterdem – digital elevation model
      • +
      • dem – digital elevation model
      • +
      • river – optional river map
      • +
      +
      +
      + +
      +
      +wflow_prepare_step1.usage(*args)
      +
      + +
      +
      +

      wflow_prepare_step2

      +

      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: $

      +
      +
      +wflow_prepare_step2.OpenConf(fn)
      +
      + +
      +
      +wflow_prepare_step2.configget(config, section, var, default)
      +
      + +
      +
      +wflow_prepare_step2.main()
      +
      + +
      +
      +wflow_prepare_step2.resamplemaps(step1dir, step2dir)
      +

      Resample the maps from step1 and rename them in the process

      +
      + +
      +
      +wflow_prepare_step2.usage(*args)
      +
      + +
      +
      +
      +

      Setting Up a Case

      +

      PM

      +
      +

      Note

      +

      Describes how to setup a model case structure. Probably need to write a script +that does it automatically.

      +
      +
      +
      +

      Input parameters (lookup tables or maps)

      +

      The PCRaster lookup tables listed below are used by the model to create +input parameter maps. Each table should have at least four columns. The +first column is used to identify the land-use class in the wflow_landuse +map, the second column indicates the subcatchment (wflow_subcatch), +the third column the soil type (wflow_soil.map) and the last column +list the value that will be assigned based on the first three columns.

      +

      Alternatively the lookup table can be replaced by a PCRaster map (in +the staticmaps directory) with the same name as the tbl file (but with +a .map extension).

      +
      +

      Note

      +

      The order in which the model look for the parameters is as follows: +- at first the staticmaps directory is checked for a map of the parameter +- next the intbl directory is checked fo a lookup table +- if both options fail a default value is used

      +
      +
      +

      Note

      +

      Note that the list model parameters is out of date. Getting the .tbl +files from the example models (default_sbm and default_hbv) is +probably the best way to start. In any case wflow will use default +vaues for the tbl files that are missing. (shown in the log +messages).

      +
      +

      Below the contents of an example .tbl file is shown. In this case +the parameters are identical for each subcatchment (and soil type) +but is different for each landuse type. See the pcraster documentation +(http://www.pcraster.eu) for details on how to create .tbl files.

      +
      1   <,14]   1 0.11
      +2   <,14]   1 0.11
      +3   <,14]   1 0.15
      +4   <,14]   1 0.11
      +5   <,14]   1 0.11
      +6   <,14]   1 0.11
      +
      +
      +
      +

      Note

      +

      please note that if the rules in the tble file do not cover +all cells used in the model you will get missing values in the +output. Check the maps in the runid/outsum directory to see if +this is the case.

      +
      +
      +
      Beta.tbl
      +
      Beta parameter used in the kinematic wave function. Should be set to +0.6 (will ebe removed later)
      +
      CanopyGapFraction.tbl
      +
      Gash interception model parameter: the free throughfall coefficient.
      +
      EoverR.tbl
      +
      Gash interception model parameter. Ratio of average wet canopy +evaporation rate over average precipitation rate.
      +
      FirstZoneCapacity.tbl
      +
      Maximum capacity of the saturated store [mm]
      +
      MaxLeakage.tbl
      +
      Maximum leakage [mm/day]. Leakage is lost to the model. Usually +only used for i.e. linking to a dedicated groundwater model. +Normally set to zero in all other cases.
      +
      FirstZoneKsatVer.tbl
      +
      Saturated conductivity of the store at the surface. The M parameter +determines how this decreases with depth.
      +
      FirstZoneMinCapacity.tbl
      +
      Minimum capacity of the saturated store [mm]
      +
      InfiltCapPath.tbl
      +
      Infiltration capacity [mm/day] of the compacted soil (or paved +area) fraction of each gridcell
      +
      InfiltCapSoil.tbl
      +
      Infiltration capacity [mm/day] of the non-compacted soil +fraction (unpaved area) of each gridcell
      +
      M.tbl
      +
      Soil parameter determining the decrease of saturated conductivity +with depth. Usually between 20 and 2000 (if the soil depth is in mm)
      +
      MaxCanopyStorage.tbl
      +
      Canopy storage [mm]. Used in the Gash interception model
      +
      N.tbl
      +
      Manning N parameter for the Kinematic wave function. Higher values +dampen the discharge peak.
      +
      PathFrac.tbl
      +
      Fraction of compacted area per gridcell
      +
      RootingDepth.tbl
      +
      Rooting depth of the vegetation [mm]
      +
      thetaR.tbl
      +
      Residual water content
      +
      thetaS.tbl
      +
      Water content at saturation
      +
      +
      +
      +

      Common problems

      +
        +
      • +
        Missing values in the discharge
        +
          +
        • make sure thereare no missing values in any of the input maps
        • +
        • make sure all values in the intbl are set to realistic values.
        • +
        +
        +
        +
      • +
      • +
        No initial conditions
        +
          +
        • run the model with the -I option first and copy the resulting files in runid\outstate back to the instate directory
        • +
        +
        +
        +
      • +
      +
      +
      +

      Calibrating the wflow_sbm model

      +
      +

      Introduction

      +

      As with all hydrological models calibration is needed for optimal performance. +Currently we are working on getting the link with the OpenDA calibration +environment running (not tested yet). We have calibrated the Rhine/Meuse +models using simple shell scripts and the XX and XX command-line parameters +to multiply selected model parameters and evaluate the results later.

      +
      +
      +

      Parameters

      +
      +
      M
      +
      Once the depth of the soil has been set for the different land-use +types the M parameter is the most important variable in calibrating +the model. The decay of the conductivity with depth controls the +baseflow resession and part of the stormflow curve.
      +
      N
      +
      The Manning N parameter controls the shape of the hydrograph (the +peak parts). In general it is advised to set N to realistic values +for the rivers, for the land phase higher values are usually needed.
      +
      Ksat
      +
      Increasing the Ksat will lower the hydrograph (baseflow) and +flatten the peaks. The latter also depend on the shape of the +catchment.
      +
      FirstZoneCapacity
      +
      Increasing the storage capacity of the soil will decrease the +outflow
      +
      RunoffGeneratingGWPerc
      +
      Default is 0.1. Determines the (upper) part of the groudwater that +can generate runoff in a cell. This is only used of the +RunoffGenSigmaFunction option is set to 1. In general generating +more runoff before a cell is completely saturated (which is the case +if RunoffGenSigmaFunction is set to 0) will lead to more baseflow +and flattening of the peaks.
      +
      +
      +
      +

      Changes in hydrographs for different values of parameters

      +
      +
      +image +
      +
      +image +
      +
      +_images/mult_m_rhine.png +
      +
      +
      +
      +
      +

      Common problems

      +
      +
      Missing values in output
      +

      This can have a number of reasons, the most common are: +(1) one of the input tables does not have an entry for the landuse soil +or catchment catchment map. For example, you forgot to put in an entry for a +reclassified LU map and now all cell for that new class have a missing value. +(2) the soil/landuse/catchment maps does not cover the whole domain +(3) you have set a parameter (e.g. the canopy gap fraction in the interception model > 1) +to an unrealistic value

      +
      +

      Note

      +

      note that missing values in upstreams cells are routed down and will eventually make +all downstreams values missing. Check the maps in the runid/outsum directory to see if the tbl files are correct

      +
      +
      +
      wflow stops and complains about types not matching
      +
      +
      The underlying pcraster framework is very picky about data types. As such the maps must all be of the +expected type. e.g. your landuse map MUST be nominal. See the pcraster documentation at pcraster.eu +for more information
      +
      +

      Note

      +

      If you create maps with qgis (or gdal) specify the rigth output type (e.g. Float32 for scalar maps)

      +
      +
      +
      +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/wflow_delwaq.html =================================================================== diff -u --- doc/_build/html/wflow_delwaq.html (revision 0) +++ doc/_build/html/wflow_delwaq.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,668 @@ + + + + + + + + wflow_delwaq Module — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      wflow_delwaq Module

      +

      The wflow_delwaq module provides a set of functions to construct a +delwaq pointer file from a PCRaster local drainage network. +A command-line interface is provide that allows you to +create a delwaq model that can be linked to a wflow model.

      +
      +_images/ldd-rhine.png +
      +

      The script sets-up a one-layer model (representing the kinematic wave +reservoir). Water is labeled according to the area and flux where it +enters the kinematic wave reservoir.

      +

      For the script to work a run of the wflow model must be available and a +template directory in which the delwaq model is created should also be +available. These are indicated by the -C -R and -D command line +options. The -R and -C options indicate the wflow case and wflow run +directories while the -D option indicates the delwaq template +directory.

      +

      The template used is shown below:

      +
      debug/
      +fixed/
      +fixed/B2_numsettings.inc
      +fixed/B4_dispersion.inc
      +fixed/B4_dispx.inc
      +fixed/B9_Hisvar.inc
      +fixed/B9_Mapvar.inc
      +includes_deltashell/
      +includes_flow/
      +run.bat
      +dlwqlib.dll
      +libcta.dll
      +libiomp5md.dll
      +waq_plugin_wasteload.dll
      +delwaq1.exe
      +delwaq2.exe
      +deltashell.inp
      +
      +
      +

      The debug, includes_flow, and includes_deltashell directories are +filled by the script. After that delwaq1.exe and delwaq2.exe programs +may be run (the run.bat file shows how this is done):

      +
      delwaq1.exe deltashell.inp -np
      +delwaq2.exe deltashell.inp
      +
      +
      +

      the script sets up delwaq such that the result for the wflow gauges locations +are stored in the deltashell.his file.

      +
      +

      How the script works

      +

      The pointer file for delwaq is made using the following information:

      +
        +
      1. The wflow_ldd.map files is used to create the internal flow network, +it defines the segments and how water flows between the segments
      2. +
      3. The number of inflows into each segment determines is taken +from the sources mapstacks (-S option). Together these sources +should include all the water that enters the kinematic wave +reservoir. These are the red and green arrows in the figure below
      4. +
      5. The delwaq network is generated for the area define in the +wflow_catchment map. The included area is define by all cells were the +catchment id in a cel is larger than 1.
      6. +
      +
      +_images/delwaq-exchanges.png +

      Figure: How exchanges and inflows are connected

      +
      +

      Within the includes_flow directory the following files are made:

      +
        +
      • volume.dat - volumes (N+1) noseg
      • +
      • flow.dat - flows (N). Contents is noq
      • +
      • area.dat - N timesteps. Content is noq
      • +
      • surface.dat - surface area of the water per segment (N+1), noseq
      • +
      • length.dat - One timestep only (constant). Content is two times noq
      • +
      +

      Here nrseg is the number of segments (taken from the non-missing grid +cell in the wflow_ldd.map file) and noq is the number of exchanges which +is calculated as the number of segments plus number the of inflows +(in each segment) times the number of segments

      +

      Delwaq expects volumes to be instantanious values at the start of a +timestes while flows are integrated between tow timesteps. For volumes +N+1 timesteps are needed, for flows N timesteps. The figure below +demonstrates this principle for N=4.

      +

      +digraph Flows { +node[shape=record,width=.1,height=.1]; +node0 [label="{Time|Volume|Flow integrated}"]; +node1 [label="{T=0|Volume=0|Flow=0 to 1}"]; +node2 [label="{T=1|Volume=1|Flow=1 to 2}"]; +node3 [label="{T=2|Volume=2|Flow=2 to 3}"]; +node4 [label="{T=3|Volume=3|Flow=3 to 4}"]; +node5 [label="{T=4|Volume=4|May be zero}"]; +node1 -> node2 +node2 -> node3 +node3 -> node4 +node4 -> node5 +} +

      +

      The volume.dat file is filled with N+1 steps of volumes of the wflow +kinematic wave reservoir. To obtain the needed lag between the flows and +the volumes the volumes are taken from the kinematic wave reservoir one +timestep back (OldKinWaveVolume).

      +

      The flow.dat files is filled as follows. For each timestep internal +flows (within the kinematic wave reservoir, i.e. flows from segment to +segment) are written first (blue in the layout above). Next the flow +into each segment are written. Depending on how many inflow types are +given to the script (sources). For one type, one set of flows is +written, if there are two types two sets etc (green and red in the +layout above).

      +
      +
      +

      Very simple example:

      +

      The following very simple example demonstrated how the pointer file is +created. First the pcraster ldd:

      +
      +_images/ldd-mini.png +
      +

      The resulting network consist of 10 points:

      +
      +_images/ldd-res.png +
      +

      As can be seen both 9 and 10 are bottom points. The +generated pointer file is shown below:

      +
       ;Written by dw_WritePointer
      + ;nr of pointers is:  20
      +  1          3          0          0
      +  2          4          0          0
      +  3          5          0          0
      +  4          6          0          0
      +  5          7          0          0
      +  6          8          0          0
      +  7          9          0          0
      +  8         10          0          0
      +  9         -1          0          0
      + 10         -2          0          0
      + -3          1          0          0
      + -4          2          0          0
      + -5          3          0          0
      + -6          4          0          0
      + -7          5          0          0
      + -8          6          0          0
      + -9          7          0          0
      +-10          8          0          0
      +-11          9          0          0
      +-12         10          0          0
      +
      +
      +
      +
      +
      +

      Case study for Malaysia and Singapore

      +

      To estimate load of different nutrients to Johor strait two wflow_sbm models +have been setup. Next these models where linked to delwaq as follows:

      +
        +
      1. A delwaq segment network similar to the wflow D8 ldd was made
      2. +
      3. The volumes in the delwaq segment are taken from the wflow_sbm +kinematic wave volumes
      4. +
      5. For each segment two sources (inflows) are constructed, fast and slow +each representing different runoff compartments from the wflow model. +Fast represents SOF [1], HOF [2] and SSSF [3] while Slow represent +groundwater flow.
      6. +
      7. Next the flow types are combined with the available land-use classes. +As such a Luclass times flowtypes matrix of constituents is made. +Each constituent (e.g. Slow flow of LU class 1) is traced troughout +the system. All constituents are conservative and have a +concentration of 1 as they flow in each segement.
      8. +
      9. To check for consistency an Initial water type and a Check water +type are introduced. The Initial water will leave the system gradually +after a cold start, the Check water type is added to each flow +component and should be 1 at each location in the system (Mass Balance +Check).
      10. +
      + + + + + +
      [1]SOF: Saturation Overland Flow
      + + + + + +
      [2]HOF: Hortonian Overland Flow (or infiltration excess Overland Flow)
      + + + + + +
      [3]SSSF: SubSurface Storm Flow. Rapid lateral flow through the +top part of the soil profile.
      +

      The above results in a system in which the different flow types (including +the LU type where they have been generated) can be traced throughout the +system. Each each gauge location the discharge and the flow components +that make up the discharge are reported.

      +
      +_images/sing_24.png +

      Figure: Discharge and flow types for a small Singapore catchment. The +Singapore catchment are dominated by fast flow types but during the end +of the dry periods the slow flow types start to rise in importance.

      +
      +
      +_images/malay_7.png +

      Figure: Discharge, flow types and resulting total P for a catchment in +Malaysia.

      +
      +

      By assuming each flow type is an end-member in a mixing model we can add +fixed concentration of real parameters to the flow fractions and multiply +those with the concentrations of the end-membesrt modelled concentration +at the gauge locations can be obtained for each timestep.

      +
      +_images/sbm_flowtypes.png +

      Figure: Flow types in the topog_sbm models used in the +Singapore/Malaysia case. HOF = Hortonian or Infiltration excess +overland flow. SOF = Saturation overland flow, GW = exfiltrating +groundwater. Note that the subcell representation of saturated +areas means that both SOF and GW can occur before a cell is +completely saturated.

      +
      +

      The figure above shows the flow types in the models used in Singapore and +Malaysia. Groundwater flow (both from completely saturated cell and +subcell groundwater flow) makes up the Slow flow that is fed into the delwaq +model while SOF and HOF make up the Fast flow to the delwaq model. In addition +the water is also labelled according to the landuse type of the cell that +it flows out off.

      +

      The whole procedure was setup in a Delft-FEWS configuration that can run +the following steps operationally:

      +

      +digraph Flows { +node[shape=record,width=.1,height=.1]; +"Pre-Process P, T and PET data to match the model grid" -> "Run the hydrological Model" +"Run the hydrological Model" -> " Save all flows per cell" +" Save all flows per cell" -> "Feed flows per LU type and flow type to delwaq" +"Feed flows per LU type and flow type to delwaq" -> "Obtain flow fraction per LU and flow type at gauge locations" +"Obtain flow fraction per LU and flow type at gauge locations" -> "Multiply constituent concentration per LU and flow type with fraction" +"Multiply constituent concentration per LU and flow type with fraction" -> "Sum all fraction concentrations to obtain total concentration at gauge locations" +} +

      +
      +
      +

      wflow_delwaq module documentation

      +
      +

      Introduction

      +

      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:

      +
      +
        +
      1. kinematic wave reservoir (surface water)
      2. +
      3. unsaturated store (only vertical flow)
      4. +
      5. saturated store (horizontal and vertical flow)
      6. +
      +
      +
      +

      $Author: schelle $ +$Id: wflow_delwaq.py 813 2013-10-07 09:18:36Z schelle $ +$Rev: 813 $

      +
      +
      +wflow_delwaq.dw_CreateDwRun(thedir)
      +

      ” +create the dir to save delwaq info in

      +
      + +
      +
      +wflow_delwaq.dw_WriteBoundData(fname, areas)
      +

      writes B5_bounddata.inc

      +
      + +
      +
      +wflow_delwaq.dw_WriteBoundlist(fname, pointer, areas, of, inflowtypes)
      +

      Writes the boundary list file +B5_boundlist.inc +Numbering is abs(exchnage id)

      +
      +
      Input:
      +
        +
      • fname, pointer
      • +
      +
      +
      +
      +

      Todo

      +
        +
      • add labeling of different inflows ( the information is already present)
      • +
      +
      +
      + +
      +
      +wflow_delwaq.dw_WriteInitials(fname, inmaps)
      +

      B8_initials.inc

      +
      + +
      +
      +wflow_delwaq.dw_WriteNrExChnages(fname, nr)
      +

      Writes the number of exchnages to file (number of rows in the pointer file)

      +

      B4_nrofexch.inc

      +
      + +
      +
      +wflow_delwaq.dw_WriteNrSegments(fname, nr)
      +

      Writes the number of segments to B3 file

      +

      B3_nrofseg.inc

      +
      + +
      +
      +wflow_delwaq.dw_WritePointer(fname, pointer)
      +

      WRites the pointer file +B4_pointer.inc

      +
      + +
      +
      +wflow_delwaq.dw_WriteSegmentOrExchangeData(ttime, fname, datablock, boundids, WriteAscii=True)
      +

      Writes a timestep to a segment/exchange data file (appends to an existing +file or creates a new one).

      +
      +
      Input:
      +
        +
      • time - time for this timestep
      • +
      • fname - File path of the segment/exchange data file</param>
      • +
      • datablock - array with data
      • +
      • boundids to write more than 1 block
      • +
      • WriteAscii - set to 1 to alse make an ascii dump
      • +
      +
      +
      +
      + +
      +
      +wflow_delwaq.dw_Write_B2_outlocs(fname, gauges, segs)
      +

      Write an output loc file based on the wflow_gauges +map.

      +
      + +
      +
      +wflow_delwaq.dw_Write_Substances(fname, areas)
      +

      Writes the B1_sublist.inc file +input:

      +
      +
      it writes substances for the areas and an initial and mass balance +check substance
      +
      + +
      +
      +wflow_delwaq.dw_Write_Times(dwdir, T0, timeSteps, timeStepSec)
      +

      Writes B1_T0.inc, B2_outputtimers.inc, B2_sysclock.inc and /B2_simtimers.inc +Assumes daily timesteps for now!

      +
      + +
      +
      +wflow_delwaq.dw_mkDelwaqPointers(ldd, amap, difboun, layers)
      +

      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.

      +
      +
      Input:
      +
        +
      • ldd
      • +
      • map to determine the active points)
      • +
      • difboun : number of inflow boundaries per cell
      • +
      • layers [nr of soil layers (only vertical flow)].
      • +
      +
      +
      +
      +

      Note

      +

      Only one layer at present (layers must be 1)

      +
      +
      +
      Output:
      +
        +
      • pointer, fromto, outflows, boundaries, segment
      • +
      • matrix with 4 colums: from to, zero, zero.
      • +
      • catchid
      • +
      +
      +
      +
      +

      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)

      +
      +
      + +
      +
      +wflow_delwaq.dw_pcrToDataBlock(pcrmap)
      +

      Converts a pcrmap to a numpy array.that is flattend and from which +missing values are removed. Used for generating delwaq data

      +
      + +
      +
      +wflow_delwaq.main()
      +
      + +
      +
      +wflow_delwaq.readTS(name, ts)
      +

      Read a pcraster map for a timestep without using the dynamic framework

      +
      + +
      +
      +wflow_delwaq.usage(*args)
      +
      + +
      +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/wflow_fit.html =================================================================== diff -u --- doc/_build/html/wflow_fit.html (revision 0) +++ doc/_build/html/wflow_fit.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,319 @@ + + + + + + + + The wflow_fit module — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      The wflow_fit module

      +
      +

      Introduction

      +

      The wflow_fit module provides simple automated least square fitting +for the wflow models. It uses the scipy.optimize function to perform +the fitting.

      +

      The program works mu multipling the fit parameter with a factor and optimise this +factor. To get the new optimised parameters for your model you have to +multiply your original parameters with the optimised factor. You +can specify measured and simulated Q pairs to use and which area of the model +you wan to adjust for each Simulated/Measured pair

      +

      In order to use the fit module you must have a:

      +
        +
      • A working wflow model
      • +
      • a tss file with measured discharge
      • +
      • an [fit] section in the ini file
      • +
      +
      +
      +

      The ini file

      +

      To be able to use the fit module you must add a [fit] section to the +.ini file of the wflow model you want to fit.

      +
      [fit]
      +  # The parameters are name parameter_0 to parameter_n
      +parameter_0 = M
      +parameter_1 = RootingDepth
      +  # Q specifies the tss file with measure discharge data
      +  # the path is relative to the case directory
      +Q = testing.tss
      +  # The columns in the measured Q you want to fit to
      +ColMeas = [1,5]
      +  # The columns in the measured Q you want to fit
      +ColSim = [1,5]
      +  # Number of warup timesteps. This are not used in fitting
      +WarmUpSteps = 1
      +  # The map defining the areas you want to adjust
      +areamap=staticmaps/wflow_catchment.map
      +  # The areas you want to adjust for each Qmeas/Qsim combination
      +areacode=[1,5]
      +
      +
      +
      +
      +

      Fitting results

      +

      Results are saved in the wflow_fit.res file in the case/runid directory. In addition, +the program saves a graph of modelled and observed data in the file fit.png and maps +of the original and fitted parameters are also saved.

      +

      If you specify the -U option the resulting maps are saved in the staticmaps directory +after each steps. As such, next steps (if you calibrate multiple subcatchments/areas) +also include the results of the previous steps. Note that this will overwrite your +maps if you already have those!

      +
      +
      +

      How to fit

      +

      Although wflow_sbm has a fairly large number of parameters most should not be +fitted automatically. The parameters that are most suited for fitting are:

      +
        +
      • M
      • +
      • FirstZoneKsatVer
      • +
      • RunoffGeneratingGWPerc (if this is switched on. It is usually best to first +setup the model without this parameter!)
      • +
      • RootingDepth
      • +
      +

      It is recommended to only fit one or two parameters at one time.

      +

      The wflow_rhine_sbm example can be used to test the fitting procedure.

      +
      wflow_fit.py -M wflow\_sbm -T 300 -C wflow\rhine\_sbm
      +
      +
      +
      +
      +
      +

      Description of the python module

      +

      Fit a wflow_ hydrological model using scipy.leastsq.

      +

      usage

      +
      wflow_fit -M ModelName [-h][-F runinfofile][-C casename]
      +      [-c configfile][-T last_step][-S first_step][-s seconds]
      +      
      +
      +-M: model to fit (e.g. wflow_sbm, wflow_hbv, wflow_cqf)          
      +                  
      +-T: Set last timestep
      +
      +-S: Set the start timestep (default = 1)
      +
      +-C: set the name  of the case (directory) to run
      +
      +-R: set the name runId within the current case
      +
      +-U: save the map after each step ti the input (staticmaps) dir so 
      +    that next steps (colums) use the previous results
      +
      +-c: name of wflow the configuration file (default: Casename/wflow_sbm.ini). 
      +
      +-h: print usage information
      +
      +
      +

      For this program to work you must add a [fit] section to the +ini file of the program to fit (e.g. the wflow_hbv program)

      +

      $Author: schelle $ +$Id: wflow_sbm.py 669 2013-05-16 05:25:48Z schelle $ +$Rev: 669 $

      +
      +
      +wflow_fit.configget(config, section, var, default)
      +

      gets parameter from config file and returns a default value +if the parameter is not found

      +
      + +
      +
      +class wflow_fit.wfmodel_fit_API(startTime, stopTime, casename, runId='_fitrun', modeltofit='wflow_sbm', config='wflow_sbm.ini', clonemap='wflow_subcatch.map')
      +

      Class that initializes and runs a wflow model

      +
      +
      +multVarWithPar(pars)
      +

      Multiply a parameter in the model with the fit parameters. +Use a map to limit the area to adjust

      +
      + +
      +
      +run(pars)
      +

      Run the model for the number of timesteps.

      +
      + +
      +
      +savemaps(pars, savetoinput=False)
      +

      Ssave the adjusted (and original) parameter maps

      +
      + +
      +
      +shutdown(pars)
      +

      Shutdown the model

      +
      + +
      + +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/wflow_floodmap.html =================================================================== diff -u --- doc/_build/html/wflow_floodmap.html (revision 0) +++ doc/_build/html/wflow_floodmap.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,335 @@ + + + + + + + + The wflow_floodmap module — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      The wflow_floodmap module

      +
      +

      Introduction

      +

      The wflow_floodmap module can generate flood maps from output +of a wflow_sbm|hbv|wave model. Is needs to be run inside an existing +case and runid of either of these models.

      +
      +

      Warning

      +

      The documentation is incomplete

      +
      +
      +
      +
      +

      Description of the python module

      +
      +

      Definition of the wflow_floodmap model.

      +

      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: schelle $ +$Id: wflow_floodmap.py 916 2014-02-11 14:49:35Z schelle $ +$Rev: 916 $

      +
      +
      +class wflow_floodmap.WflowModel(cloneMap, Dir, RunDir, configfile)
      +

      The user defined model class. This is your work!

      +
      +
      +dynamic()
      +

      Required

      +

      This is where all the time dependent functions are executed. Time dependent +output should also be saved here.

      + +++ + + + +
      Variables:
        +
      • self.FLOOD – Actual flood level [m]
      • +
      • self.FloodExtent – Actual flood extent [-]
      • +
      +
      +
      + +
      +
      +initial()
      +

      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.

      +
      + +
      +
      +resume()
      +

      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.

      +
      + +
      +
      +stateVariables()
      +

      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
      +
      + +
      +
      +supplyCurrentTime()
      +

      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
      • +
      +
      +
      + +
      +
      +suspend()
      +

      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

      +
      + +
      + +
      +
      +wflow_floodmap.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.

      +
      + +
      +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/wflow_gr4.html =================================================================== diff -u --- doc/_build/html/wflow_gr4.html (revision 0) +++ doc/_build/html/wflow_gr4.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,463 @@ + + + + + + + + wflow_gr4 Module — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      wflow_gr4 Module

      +
      +

      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

      +
      +
      -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: schelle $ +$Id: wflow_gr4.py 913 2014-02-04 13:10:51Z schelle $ +$Rev: 913 $

      +
      +
      +

      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.
      • +
      +
      +
      +class wflow_gr4.WflowModel(cloneMap, Dir, RunDir, configfile)
      +

      Bases: pcraster.framework.dynamicPCRasterBase.DynamicModel

      +

      The user defined model class. This is your work!

      +
      +
      +dynamic()
      +

      Required

      + +++ + + + +
      Variables:
        +
      • self.Pn – net precipitation [mm]
      • +
      • self.En – net evapotranspiration [mm]
      • +
      • self.Ps – part of Pn that feeds the production reservoir [mm]
      • +
      • self.Es – evaporation quantity substracted from the production reservoir [mm]
      • +
      +
      +
      + +
      +
      +initial()
      +

      Initial part of the gr4 model, executed only once. Reads all static model +information (parameters) and sets-up the variables used in modelling.

      + +++ + + + +
      Variables:
        +
      • dt.tbl – time step (1) [hour]
      • +
      • B.tbl – routing ratio (0.9) [-]
      • +
      • NH – UH dimension (number) taken from ini file [-]
      • +
      • D.tbl – variable for hourly time steps (1.25) [-]
      • +
      • C.tbl – variable (number) [hour]
      • +
      +
      +

      Parameters

      + +++ + + + +
      Variables:
        +
      • X1.tbl – capacity of the production store, accounts for soil moisture (number) [mm]
      • +
      • X2.tbl – water exchange coefficient (number) [mm]
      • +
      • X3.tbl – capacity of the routing store (number) [mm]
      • +
      • (in ini) (X4) – time base of the unit hydrograph (number) [hour]
      • +
      +
      +
      + +
      +
      +resume()
      +

      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.

      +
      + +
      +
      +stateVariables()
      +

      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:
        +
      • self.S_X1 – production reservoir content at the beginning of the time step (divided by X1) [mm]
      • +
      • self.R_X3 – routing reservoir content at the beginning of the time step (divided by X3) [mm]
      • +
      +
      +
      +

      Todo

      +

      add routing state vars

      +
      +
      + +
      +
      +supplyCurrentTime()
      +

      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
      • +
      +
      +
      + +
      +
      +suspend()
      +

      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.

      +
      + +
      + +
      +
      +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)
      +
      + +
      +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/wflow_hbv.html =================================================================== diff -u --- doc/_build/html/wflow_hbv.html (revision 0) +++ doc/_build/html/wflow_hbv.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,716 @@ + + + + + + + + The wflow_hbv model — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      The wflow_hbv model

      +
      +

      Introduction

      +

      The Hydrologiska Byrans Vattenbalansavdelning (HBV) model was introduced +back in 1972 by the Swedisch Meteological and Hydrological Institute +(SMHI). The HBV model is mainly used for runoff simulation +and hydrological forecasting. The model is particularly useful for +catchments where snow fall and snow melt are dominant factors, but +application of the model is by no means restricted to these type of +catchments.

      +
      +
      +

      Description

      +

      The model is based on the HBV-96 model. However, the hydrological +routing represent in HBV by a triangular function controlled by the +MAXBAS parameter has been removed. Instead, the kinematic wave function +is used to route the water downstream. All runoff that is generated +in a cell in one of the HBV reservoirs is added to the kinematic wave +reservoir at the end of a timestep. There is no connection between +the different HBV cells within the model. Wherever possible all functions +that describe the distribution of parameters within a subbasin have +been removed as this is not needed in a distributed application/

      +

      A catchment is divided into a number of grid cells. For each of the +cells individually, daily runoff is computed through application of +the HBV-96 of the HBV model. The use of the grid cells offers the +possibility to turn the HBV modelling concept, which is originally +lumped, into a distributed model.

      +
      +_images/hbv96.png +

      Schematic view of the relevant components of the HBV model

      +
      +

      The figure above shows a schematic view of hydrological response +simulation with the HBV-modelling concept. The land-phase of the hydrological +cycle is represented by three different components: a snow routine, +a soil routine and a runoff response routine. Each component is discussed +separately below.

      +
      +

      The snow routine

      +

      Precipitation enters the model via the snow routine. If the air temperature, +T_{a}, is below a user-defined threshold TT (\approx0^{o}C) +precipitation occurs as snowfall, whereas it occurs as rainfall if +T_{a}\geq TT. A another parameter TTI defines how precipitation +can occur partly as rain of snowfall (see the figure below). +If precipitation occurs as snowfall, it is added to the dry snow component +within the snow pack. Otherwise it ends up in the free water reservoir, +which represents the liquid water content of the snow pack. Between +the two components of the snow pack, interactions take place, either +through snow melt (if temperatures are above a threshold TT) or +through snow refreezing (if temperatures are below threshold TT). +The respective rates of snow melt and refreezing are:

      +
      +

      Q_{m} = cfmax(T_{a}-TT)\;\;;T_{a}>TT + +Q_{r} = cfmax*cfr(TT-T_{a})\;;T_{a}<TT

      +

      where Q_{m} is the rate of snow melt, Q_{r} is the rate of snow +refreezing, and $cfmax$ and $cfr$ are user defined model parameters +(the melting factor mm/(^{o}C*day) and the refreezing factor +respectively)

      +
      +

      Note

      +

      The FoCFMAX parameter from the original HBV version is not used. instead +the CFMAX is presumed to be for the landuse per pixel. Normally for +forested pixels the CFMAX is 0.6 {*} CFMAX

      +
      +

      The air temperature, T_{a}, is related to measured daily average +temperatures. In the original HBV-concept, elevation differences within +the catchment are represented through a distribution function (i.e. +a hypsographic curve) which makes the snow module semi-distributed. +In the modified version that is applied here, the temperature, T_{a}, +is represented in a fully distributed manner, which means for each +grid cell the temperature is related to the grid elevation.

      +

      The fraction of liquid water in the snow pack (free water) is at most +equal to a user defined fraction, WHC, of the water equivalent +of the dry snow content. If the liquid water concentration exceeds +WHC, either through snow melt or incoming rainfall, the surpluss +water becomes available for infiltration into the soil:

      +
      +

      Q_{in}=max\{(SW-WHC*SD);\;0.0\}

      +

      where Q_{in} is the volume of water added to the soil module, SW +is the free water content of the snow pack and SD is the dry snow +content of the snow pack.

      +
      +_images/hbv-snow.png +

      Schematic view of the snow routine

      +
      +
      +
      +

      Potential Evaporation

      +

      The original HBV version includes both a multiplication factor for +potential evaporation and a exponential reduction factor for potential +evapotranspiration during rain events. The CEVPF factor is used +to connect potential evapotranspiration per landuse. In the original +version the CEVPFO is used and it is used for forest landuse only.

      +
      +
      +

      Interception

      +

      The parameters ICF0 and ICFI introduce interception storage +for forested and non-forested zones respectively in the original model. +Within our application this is replaced by a single $ICF$ parameter +assuming the parameter is set for each grid cell according to the +land-use. In the original application it is not clear if interception +evaporation is subtracted from the potential evaporation. In this +implementation we dos subtract the interception evaporation to ensure +total evaporation does not exceed potential evaporation. From this +storage evaporation equal to the potential rate ET_{p} will occur +as long as water is available, even if it is stored as snow. All water +enters this store first, there is no concept of free throughfall (e.g. +through gaps in the canopy). In the model a running water budget is +kept of the interception store:

      +
      +
        +
      • The available storage (ICF-Actual storage) is filled with the water +coming from the snow routine (Q_{in})
      • +
      • Any surplus water now becomes the new Q_{in}
      • +
      • Interception evaporation is determined as the minimum of the current +interception storage and the potential evaporation
      • +
      +
      +
      +
      +

      The soil routine

      +

      The incoming water from the snow and interception routines, Q_{in}, +is available for infiltration in the soil routine. The soil layer +has a limited capacity, F_{c}, to hold soil water, which means +if F_{c} is exceeded the abundant water cannot infiltrate and, +consequently, becomes directly available for runoff.

      +
      +

      Q_{dr}=max\{(SM+Q_{in}-F_{c});\;0.0\}

      +

      where Q_{dr} is the abundant soil water (also referred to as direct +runoff) and SM is the soil moisture content. Consequently, the +net amount of water that infiltrates into the soil, I_{net}, equals:

      +
      +

      I_{net}=Q_{in}-Q_{dr}

      +

      Part of the infiltrating water, I_{net}, will runoff through the +soil layer (seepage). This runoff volume, SP, is related to the +soil moisture content, SM, through the following power relation:

      +
      +

      SP=\left(\frac{SM}{F_{c}}\right)^{\beta}I_{net}\label{eq:SP}

      +

      where \beta is an empirically based parameter. Application of this equation +implies that the amount of seepage water increases with +increasing soil moisture content. The fraction of the infiltrating +water which doesn’t runoff, I_{net}-SP, is added +to the available amount of soil moisture, SM. The \beta parameter +affects the amount of supply to the soil moisture reservoir that is +transferred to the quick response reservoir. Values of \beta vary +generally between 1 and 3. Larger values of \beta reduce runoff +and indicate a higher absorption capacity of the soil (see Figure +ref{fig:HBV-Beta}).

      +
      +_images/hbv-soilmoist.png +

      Schematic view of the soil moisture routine

      +
      +
      +_images/beta-hbv.png +

      Figure showing the relation between SM/F_{c} (x-axis) and the +fraction of water running off (y-axis) for three values of \beta :1, +2 and 3

      +
      +

      A percentage of the soil moisture will evaporate. This percentage +is related to the measured potential evaporation and the available +amount of soil moisture:

      +
      +

      E_{a} = \frac{SM}{T_{m}}E_{p\;\;};SM<T_{m}\\ + +E_{a} = E_{p}\;\;\;;SM\geq T_{m}

      +

      where E_{a} is the actual evaporation, E_{p} is the potential +evaporation and T_{m} (\leq F_{c}) is a user defined threshold, +above which the actual evaporation equals the potential evaporation. +T_{m} is defined as LP*F_{c}\; in which LP is a soil dependent +evaporation factor (LP\leq1).

      +

      In the original model (Berglov, 2009 XX), a correction to Ea is +applied in case of interception. If Ea from the soil moisture storage +plus Ei exceeds ETp - Ei (Ei = interception +evaporation) then the exceeding part is multiplied by a factor (1-ered), +where the parameter ered varies between 0 and 1. This correction is presently not present in the wflow_hbv model.

      +
      +
      +

      The runoff response routine

      +

      The volume of water which becomes available for runoff, S_{dr}+SP, +is transferred to the runoff response routine. In this routine the +runoff delay is simulated through the use of a number of linear reservoirs.

      +

      Two linear reservoir are defined to simulate the different runoff +processes: the upper zone (generating quick runoff and interflow) +and the lower zone (generating slow runoff). The available runoff +water from the soil routine (i.e. direct runoff, S_{dr}, and seepage, +SP) in principle ends up in the lower zone, unless the percolation +threshold, PERC, is exceeded, in which case the redundant water +ends up in the upper zone:

      +
      +

      \triangle V_{LZ} = min\{PERC;(S_{dr}+SP)\}\\ + +\triangle V_{UZ} = max\{0.0;(S_{dr}+SP-PERC)\}

      +

      where V_{UZ} is the content of the upper zone, V_{LZ} is the +content of the lower zone and \triangle means increase +of.

      +

      Capillary flow from the upper zone to the soil moisture reservoir +is modeled according to:

      +
      +

      Q_{cf}=cflux*(F_{c}-SM)/F_{c}

      +

      where cflux is the maximum capilary flux in mm/day.

      +

      The Upper zone generates quick runoff (Q_{q}) using:

      +
      +

      Q_{q}=K*UZ^{(1+alpha)}

      +

      here K is the upper zone recession coefficient, and \alpha determines +the amount of non-linearity. Within HBV-96, the value of K is determined +from three other parameters: \alpha, KHQ, and HQ (mm/day). +The value of HQ represents an outflow rate of the upper zone for +which the recession rate is equal to KHQ. if we define UZ_{HQ} to +be the content of the upper zone at outflow rate HQ we can write +the following equation:

      +
      +

      HQ=K*UZ_{HQ}^{(1+\alpha)}=KHQ*UZ_{HQ}

      +

      If we eliminate UZ_{HQ} we obtain:

      +
      +

      HQ=K*\left(\frac{HQ}{KHQ}\right)^{(1+\alpha)}

      +

      Rewriting for K results in:

      +
      +

      K=KQH^{(1-alpha)}HQ^{-alpha}

      +
      +

      Note

      +

      Note that the HBV-96 manual mentions that for a recession rate larger +than 1 the timestap in the model will be adjusted.

      +
      +

      The lower zone is a linear reservoir, which means the rate of slow +runoff, Q_{LZ}, which leaves this zone during one time step equals:

      +
      +

      Q_{LZ}=K_{LZ}*V_{LZ}

      +

      where K_{LZ} is the reservoir constant.

      +

      The upper zone is also a linear reservoir, but it is slightly more +complicated than the lower zone because it is divided into two zones: +A lower part in which interflow is generated and an upper part in +which quick flow is generated (see Figure ref{fig:upper}).

      +
      +_images/hbv-upper.png +

      Schematic view of the Upper zone

      +
      +

      If the total water content of the upper zone, V_{UZ}, is lower +than a threshold UZ1, the upper zone only generates interflow. +On the other hand, if V_{UZ} exceeds UZ1, part of the upper +zone water will runoff as quick flow:

      +
      +

      Q_{i} = K_{i}*min\{UZ1;V_{uz}\} + +Q_{q} = K_{q}*max\{(V_{UZ}-UZ1);0.0\}

      +

      Where Q_{i} is the amount of generated interflow in one time step, +Q_{q} is the amount of generated quick flow in one time step and +K_{i} and K_{q} are reservoir constants for interflow and quick +flow respectively.

      +

      The total runoff rate, Q, is equal to the sum of the three different +runoff components:

      +
      +

      Q=Q_{LZ}+Q_{i}+Q_{q}

      +

      The runoff behaviour in the runoff response routine is controlled +by two threshold values P_{m} and UZ1 in combination with three +reservoir parameters, K_{LZ}, K_{i} and K_{q}. In order to +represent the differences in delay times between the three runoff +components, the reservoir constants have to meet the following requirement:

      +
      +

      K_{LZ}<K_{i}<K_{q}

      +
      +
      +
      +
      +

      Description of the python module

      +

      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: 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!
      +
      +

      -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

      +
      +
      -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)

      +

      -X overwrites the initial values at the end of each timestep

      +

      $Author: schelle $ +$Id: wflow_hbv.py 904 2014-01-13 14:39:24Z schelle $ +$Rev: 904 $

      +
      +
      +class wflow_hbv.WflowModel(cloneMap, Dir, RunDir, configfile)
      +

      The user defined model class. All maps are defined here for documentation +purposes

      +
      +
      +dynamic()
      +

      Below a list of variables that can be save to disk as maps or as +timeseries (see ini file for syntax):

      +

      Dynamic variables

      + +++ + + + +
      Variables:
        +
      • self.SurfaceRunoff – Surface runoff in the kinematic wave [m^3/s]
      • +
      • self.WaterLevel – Water level in the kinematic wave [m] (above the bottom)
      • +
      • self.InterceptionStorage – actual interception storage [mm]
      • +
      • self.Snow – Snow depth [mm]
      • +
      • self.SnowWater – water content of the snow [mm]
      • +
      • self.LowerZoneStorage – water content of the lower zone [mm]
      • +
      • self.UpperZoneStorage – water content of the Upper zone [mm]
      • +
      • self.BaseFlow – Specific runoff (baseflow part) per cell [mm]
      • +
      • self.Percolation – actual percolation to the lower zone [mm]
      • +
      • self.SoilMoisture – actual soil moisture [mm]
      • +
      • self.QuickFlow – specific runoff (quickflow part) [mm]
      • +
      • self.RealQuickFlow – specific runoff (quickflow), If K upper zone is precalculated [mm]
      • +
      • self.CapFlux – capilary rise [mm]
      • +
      • self.SurfaceRunoffMM – Surfacerunoff in mm
      • +
      • self.KinWaveVolume – Volume in the kinematic wave reservoir
      • +
      +
      +

      Static variables

      + +++ + + + +
      Variables:
        +
      • self.Altitude – The altitude of each cell [m]
      • +
      • self.Bw – Width of the river [m]
      • +
      • self.River – booolean map indicating the presence of a river [-]
      • +
      • self.DLC – length of the river within a cell [m]
      • +
      • self.ToCubic – Mutiplier to convert mm to m^3/s for fluxes
      • +
      +
      +
      + +
      +
      +initial()
      +

      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:
        +
      • FC.tbl – Field Capacity (260.0) [mm]
      • +
      • BetaSeepage.tbl – exponent in soil runoff generation equation (1.8) [-]
      • +
      • LP.tbl – fraction of Fieldcapacity below which actual evaporation=potential evaporation (0.53000)
      • +
      • K4.tbl – Recession constant baseflow (0.02307)
      • +
      +
      +

      If SetKquickFlow is set to 1

      + +++ + + + +
      Variables:
        +
      • KQuickFlow.tbl – (0.09880)
      • +
      • SUZ.tbl – Level over wich K0 is used (100.0)
      • +
      • K0.tbl – (0.3)
      • +
      +
      +

      If SetKquickFlow is set to 0

      + +++ + + + +
      Variables:
        +
      • KHQ.tbl – recession rate at flow HQ (0.09880)
      • +
      • HQ.tbl – high flow rate HQ for which recession rate of upper reservoir is known (3.27000)
      • +
      • AlphaNL.tbl – measure of non-linearity of upper reservoir (1.1)
      • +
      • PERC.tbl – Percolation from Upper to Lowerzone (0.4000) [mm/day]
      • +
      • CFR.tbl – Refreezing efficiency constant in refreezing of freewater in snow (0.05000)
      • +
      • Pcorr.tbl – Correction factor for precipitation (1.0)
      • +
      • RFCF.tbl – Correction factor for rainfall (1.0)
      • +
      • SFCF.tbl – Correction factor for snowfall(1.0)
      • +
      • Cflux.tbl – Maximum capillary rise from runoff response routine to soil moisture routine (2.0)
      • +
      • ICF.tbl – Maximum interception storage (in forested AND non-forested areas) (2.0)
      • +
      • CEVPF.tbl – Correction factor for potential evaporation (1.0)
      • +
      • EPF.tbl – Exponent of correction factor for evaporation on days with precipitation(0.0)
      • +
      • ECORR.tbl – Evap correction (1.0)
      • +
      +
      +

      Snow modelling parameters

      + +++ + + + +
      Variables:
        +
      • TTI.tbl – critical temperature for snowmelt and refreezing (1.000) [oC]
      • +
      • TT.tbl – defines interval in which precipitation falls as rainfall and snowfall (-1.41934) [oC]
      • +
      • Cfmax.tbl – meltconstant in temperature-index ( 3.75653) [-]
      • +
      • WHC.tbl – fraction of Snowvolume that can store water (0.1) [-]
      • +
      +
      +
      + +
      +
      +resume()
      +

      read initial state maps (they are output of a previous call to suspend())

      +
      + +
      +
      +stateVariables()
      +
      +

      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:
        +
      • self.SurfaceRunoff – Surface runoff in the kin-wave resrvoir [m^3/s]
      • +
      • self.WaterLevel – Water level in the kin-wave resrvoir [m]
      • +
      • self.DrySnow – Snow pack [mm]
      • +
      • self.FreeWater – Available free water [mm]
      • +
      • self.UpperZoneStorage – Water in the upper zone [mm]
      • +
      • self.LowerZoneStorage – Water in the lower zone [mm]
      • +
      • self.SoilMoisture – Soil moisture [mm]
      • +
      • self.InterceptionStorage – Amount of water on the Canopy [mm]
      • +
      +
      +
      + +
      +
      +supplyCurrentTime()
      +

      gets the current time in seconds after the start of the run

      +
      +
      Ouput:
      +
        +
      • time in seconds since the start of the model run
      • +
      +
      +
      +
      + +
      +
      +suspend()
      +

      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

      +
      + +
      +
      +updateRunOff()
      +

      Updates the kinematic wave reservoir

      +
      + +
      + +
      +
      +wflow_hbv.main(argv=None)
      +

      Perform command line execution of the model.

      +
      + +
      +
      +wflow_hbv.multdynapars = {}
      +

      Dictionary with parameters and multipliers (dynamic) (used in calibration)

      +
      + +
      +
      +wflow_hbv.multpars = {}
      +

      Dictionary with parameters and multipliers (static) (used in calibration)

      +
      + +
      +
      +wflow_hbv.updateCols = []
      +

      Column sused in updating

      +
      + +
      +
      +wflow_hbv.usage(*args)
      +

      Print usage information

      +
        +
      • *args: command line arguments given
      • +
      +
      + +
      +
      +wflow_hbv.wflowVersion = '$Revision: 904 $ $Date: 2014-01-13 15:39:24 +0100 (Mon, 13 Jan 2014) $'
      +

      revision of the model

      +
      + +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/wflow_lib.html =================================================================== diff -u --- doc/_build/html/wflow_lib.html (revision 0) +++ doc/_build/html/wflow_lib.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,175 @@ + + + + + + + + wflow_lib Module — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + + + + + + + \ No newline at end of file Index: doc/_build/html/wflow_openda.html =================================================================== diff -u --- doc/_build/html/wflow_openda.html (revision 0) +++ doc/_build/html/wflow_openda.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,208 @@ + + + + + + + + Linking wflow to OpenDA — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      Linking wflow to OpenDA

      +
      +

      Warning

      +

      This is experimental and incomplete

      +
      +

      There are lot of folders that need to be set in the PATH and PYTHONPATH environment variables for this to work. Also you need the latest wflow python scripts, since Jaap fixed a bug a few days ago. These are also in Albrecht’s postbox:

      +
      \\hafilerk\homes\Deltabox\Postbox\Weerts, Albrecht\vanArno\testWflow\wflow_bin\
      +
      +
      +

      You need to set the following folders in the following environment variables:

      +

      PATH:

      +
      1. folder with jep.dll file (e.g. f:\testWflow\openda_bin\win32_ifort\)
      +2. folder with PCRaster dll files (e.g. C:\PCRaster\apps).
      +3. folder with CPython installation (e.g. C:\Python25)
      +
      +
      +

      PYTHONPATH:

      +
      1. folder with WFLOW python scripts (e.g. f:\testWflow\wflow_bin\)
      +2. folder with PCRaster python scripts (e.g. C:\PCRaster\Python).
      +
      +
      +Furthermore here is the description of the arguments that are configured in the bbStochModelConfig.xml file:
      +6 arguments expected:
      +
      +
      +
      1: piRunFile: pi run info file path (relative to working dir)."
      +2: name of the python module that contains the model to use (e.g. wflow_hbv)."
      +3: caseDirectory: case directory path (relative to working dir)."
      +4: templateRunId: name of the runId within the current case (relative to the caseDirectory)."
      +5: configFileName: name of the model configuration file (relative to the caseDirectory)."
      +6: cloneMapFileName: name of the map file that describes the catchment (relative to the staticmaps folder in the caseDirectory)."
      +
      +
      +

      This should make it run without any errors, however Albrecht and I are still working to get the OpenDA code working correctly, so we might run into some more problems to solve.

      +
      +

      Note

      +

      See also the chapter on configuring the models. There are a number of settings in the ini file (the API section) that are +important. See [run wflow_hbv via API]_

      +
      +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/wflow_sbm.html =================================================================== diff -u --- doc/_build/html/wflow_sbm.html (revision 0) +++ doc/_build/html/wflow_sbm.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,1190 @@ + + + + + + + + wflow_sbm Module — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      wflow_sbm Module

      +
      +

      Introduction

      +

      The soil part of wflow_sbm model follows the same concepts as the +topog_sbm model. topog_sbm is specifically designed to similate fast +runoff processes in small catchments while wflow_sbm can be applied more +widely. The main differences are:

      +
        +
      • The addition of evapotranspiration losses
      • +
      • The addition of a percolary rise
      • +
      • Wflow routes water over a D8 network while topog uses an element +network based on contour lines and trajectories.
      • +
      • The (optional) addition of sub-cell runoff to be able to +run on larger grid sizes
      • +
      +

      The sections below describe the working of the model in more detail.

      +
      +
      +

      The rainfall interception model

      +
      +

      The analytical (Gash) model

      +

      The analytical model of rainfall interception is based on Rutter’s +numerical model . The simplifications that introduced allow the model to +be applied on a daily basis, although a storm-based approach will yield +better results in situations with more than one storm per day . The +amount of water needed to completely saturate the canopy is defined as:

      +
      +

      P'=\frac{-\overline{R}S}{\overline{E}_{w}}ln\left[1-\frac{\overline{E}_{w}}{\overline{R}}(1-p-p_{t})^{-1}\right]

      +

      where \overline{R} is the average precipitation intensity on a saturated canopy +and \overline{E}_{w} the average evaporation from the wet canopy +and with the vegetation parameters S, p and p_t as defined +previously. The model uses a series of expressions to calculate the +interception loss during different phases of a storm. +An analytical integration of the total evaporation and rainfall under +saturated canopy conditions is then done for each storm to determine +average values of \overline{E}_{w} and \overline{R}. +The total evaporation from the canopy ( the +total interception loss) is calculated as the sum of the components +listed in the table below. Interception losses from the stems are +calculated for days with P\geq S_{t}/p_{t} . p_t and S_t are +small and neglected in the wflow_sbm model.

      +

      Table: Formulation of the components of interception loss according to Gash:

      + ++++++ + + + + + + + + + + + + + + + + + + + + +
      For m small storms (P_{g}<{P'}_{g})(1-p-p_{t})\sum_{j=1}^{m}P_{g,j}
      Wetting up the canopy in n large storms (P_{g}\geq{P'}_{g})n(1-p-p_{t}){P'}_{g}-nS
      Evaporation from saturated canopy during rainfall\overline{E}/\overline{R}\sum_{j=1}^{n}(P_{g,j}-{P'}_{g})
      Evaporation after rainfall ceases for n large stormsnS
      Evaporation from trunks in q storms that fill the trunk storageqS_{t}
      Evaporation from trunks in (m+n-q) storms that do not fill the trunk storagep_{t}\sum_{j=1}^{m+n-q}P_{g,j}
      +

      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 is used . \overline{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.

      +

      Gash (1979) has shown that in a regression of interception loss on rainfall (on a +storm basis) the regression coefficient should equal to \overline{E}_w/\overline{R}. Assuming that +neither \overline{E}_w nor \overline{R} vary considerably in time, \overline{E}_w can be estimated in this +way from \overline{R} in the absence of above-canopy climatic observations . +Values derived in this way generally tend to be (much) higher than +those calculated with the penman-montieth equation .

      +
      +
      +

      The modified rutter model

      +

      For subdaily timesteps the model uses a simplification of the Rutter model. The simplyfied +model is solved explicitly and does not take drainage from the canopy into account.

      +
      def rainfall_interception_modrut(Precipitation,PotEvap,CanopyStorage,CanopyGapFraction,Cmax):
      +   """
      +   Interception according to a modified Rutter model. The model is solved
      +   explicitly and there is no drainage below Cmax.
      +
      +   Returns:
      +       - NetInterception: P - TF - SF (may be different from the actual wet canopy evaporation)
      +       - ThroughFall:
      +       - StemFlow:
      +       - LeftOver: Amount of potential eveporation not used
      +       - Interception: Actual wet canopy evaporation in this thimestep
      +       - CanopyStorage: Canopy storage at the end of the timestep
      +
      +   """
      +
      +   ##########################################################################
      +   # Interception according to a modified Rutter model with hourly timesteps#
      +   ##########################################################################
      +
      +   p = CanopyGapFraction
      +   pt = 0.1 * p
      +
      +   # Amount of P that falls on the canopy
      +   Pfrac = (1 - p -pt) * Precipitation
      +
      +   # S cannot be larger than Cmax, no gravity drainage below that
      +   DD = ifthenelse (CanopyStorage > Cmax , Cmax - CanopyStorage , 0.0)
      +   self.CanopyStorage = CanopyStorage - DD
      +
      +   # Add the precipitation that falls on the canopy to the store
      +   CanopyStorage = CanopyStorage + Pfrac
      +
      +   # Now do the Evap, make sure the store does not get negative
      +   dC = -1 * min(CanopyStorage, PotEvap)
      +   CanopyStorage = CanopyStorage + dC
      +
      +   LeftOver = PotEvap +dC; # Amount of evap not used
      +
      +
      +   # Now drain the canopy storage again if needed...
      +   D = ifthenelse (CanopyStorage > Cmax , CanopyStorage - Cmax , 0.0)
      +   CanopyStorage = CanopyStorage - D
      +
      +   # Calculate throughfall
      +   ThroughFall = DD + D + p * Precipitation
      +   StemFlow = Precipitation * pt
      +
      +   # Calculate interception, this is NET Interception
      +   NetInterception = Precipitation - ThroughFall - StemFlow
      +   Interception = -dC
      +
      +   return NetInterception, ThroughFall, StemFlow, LeftOver, Interception, CanopyStorage
      +
      +
      +
      +
      +
      +

      The soil model

      +
      +

      Infiltration

      +

      If the surface is (partly) saturated the rainfall that falls onto the +saturated area is added to the surface runoff component. Infiltration of +the remaining water is determined as follows:

      +

      First the soil infiltration capacity is adjusted in case the soil is +frozen. The remaining storage capacity of the unsaturated store is +determined. The infiltrating water is split is two parts, the part that +fall on compacted areas and the part that fall on non-compacted areas. +First the amount of water that infiltrates in non-compacted areas is +calculated by taking the mimimum of the remaining storage capacity, the +maximum soil infiltration rate and the water on non-compated areas. +After adding the infiltrated water to the unsaturated store the same is +done for the compated areas after updatting the remaining storage +capacity.

      +
      +
      +

      The wflow_sbm soil water accounting scheme

      +

      A detailed description of the SBM model has been given by [vertessy]. Briefly: +the soil is considered as a bucket with a certain depth +(z_{t}), divided into a saturated store (S) and an +unsaturated store (U), the magnitudes of which are expressed +in units of depth. The top of the S store forms a pseudo-water +table at depth z_{i} such that the value of S at any +time is given by:

      +
      +

      S=(z_{t}-z_{i})(\theta_{s}-\theta_{r})

      +

      where:

      +

      \theta_{s} and \theta_{r} are the +saturated and residual soil water contents, respectively.

      +

      The unsaturated store (U) is subdivided into storage +(U_{s}) and deficit (U_{d}) which are again +expressed in units of depth:

      +
      +

      U_{d}=(\theta_{s}-\theta_{r})z_{i}-U + +U_{s}=U-U_{d}

      +

      The saturation deficit (S_{d}) for the soil profile as a +whole is defined as:

      +
      +

      S_{d}=(\theta_{s}-\theta_{r})z_{t}-S

      +

      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 {} +at depth z_{i} and the ratio between U and +S_{d}:

      +
      +

      st=K_{\mathit{sat}}\frac{U_{s}}{S_{d}}

      +

      Hence, as the saturation deficit becomes smaller, the rate of the +transfer between the U and S stores increases.

      +
      +_images/wflow_soil.png +

      Schematisation of the soil within the wflow_sbm model

      +
      +

      Saturated conductivity (K_{sat}) declines with soil depth (z) in +the model according to:

      +

      where:

      +
      +

      K_{0} is the saturated conductivity at the soil surface and

      +

      f is a scaling parameter [m^{-1}]

      +
      +

      The scaling parameter f is defined by:

      +

      f=\frac{\theta_{s}-\theta_{r}}{M}

      +

      with \theta_{s} and \theta_{r} as defined +previously and M representing a model parameter (expressed in +meters).

      +

      Figure: Plot of the relation between depth and conductivity for different values of M

      +

      (Source code, png, hires.png, pdf)

      +
      +_images/m-plot.png +
      +

      The S store can be drained laterally via subsurface flow +according to:

      +

      sf=K_{0}\mathit{tan}(\beta)e^{-S_{d}/M}

      +

      where:

      +
      +

      \beta is element slope angle [deg.]

      +

      sf is the calculated subsurface flow [m^{2}d^{-1}]

      +

      S_{d} is the saturation deficit defined as: ((\theta_{s}-\theta_{r})z_{t}-S)

      +
      +

      with M and S_{d} as defined previously. A schematic +representation of the various hydrological processes and pathways +modelled by SBM (infiltration, exfiltration, Hortonian and saturation +overland flow, subsurface flow) is provided by verstessy (1999).

      +

      The original SBM model does not include transpiration or a notion of +capilary rise. In wflow_sbm transpiration is first taken from the +S store if the roots reach the water table z_{i}. If +the S store cannot satisfy the demand the U store is +used next. First the number of wet roots is determined (going from 1 to 0) using +an sigmoid function as follows:

      +
      +

      WetRoots = 1.0/(1.0 + e^{-SharpNess (WaterTable - RootingDepth)})

      +

      Here the sharpness parameter (by default a large negative value, -80000.0) parameter +determines if there is a stepwise output or a more gradual output (default is stepwise). +WaterTable is the level of the Water table in the gridcell in mm below the +surface, RootingDepth is the maximum depth of the roots also in mm below the +surface. For all values of WaterTable smaller that RootingDepth a +value of 1 is returned if they are +equal a value of 0.5 is returned if the WaterTable is larger than the RootingDepth +a value of 0 is returned. The returned WetRoots fraction is multiplied +by the potential evaporation (and limited by the available water in saturated zone) +to get the transpiration from the saturated part of the soil.

      +

      Figure: Plot showing the fraction of wet roots for different values of c +for a RootingDepth of 275mm

      +

      (Source code, png, hires.png, pdf)

      +
      +_images/s-curve-soil.png +
      +

      Next the remaining potential evaporation is used to extract water from the +unsaturated store:

      +
      FirstZoneDepth = FirstZoneDepth - ActEvapSat
      +RestPotEvap = PotTrans - ActEvapSat
      +
      +# now try unsat store
      +AvailCap = min(1.0,max (0.0,(WTable - RootingDepth)/(RootingDepth + 1.0)))
      +
      +MaxExtr = AvailCap  * UStoreDepth
      +ActEvapUStore = min(MaxExtr,RestPotEvap,UStoreDepth)
      +UStoreDepth = UStoreDepth - ActEvapUStore
      +
      +ActEvap = ActEvapSat + ActEvapUStore
      +
      +
      +

      Capilary rise is determined using the following approach: +first the K_{sat} is determined at the water table +z_{i}; next a potential capilary rise is determined from the +minimum of the K_{sat}, the actual transpiration taken from +the U store, the available water in the S store and +the deficit of the U store. Finally the potential rise is +scaled using the distance between the roots and the water table using:

      +
      +
      CS=CSF/(CSF+z_{i}-RT)
      +

      in which CS is the scaling factor to multiply the potential +rise with, CSF is a model parameter (default = 100, use +CapScale.tbl to set differently) and RT the rooting depth. If +the roots reach the water table (RT>z_{i}) CS is set +to zero thus setting the capilary rise to zero.

      +
        +
      1. Water in the saturated store is transferred laterally along the DEM +using the following steps:
          +
        1. a maximum flux for each cell is determined by determining the {} +over the saturated part and the available water in each cell
        2. +
        3. water is routed downslope (using the PCRaster accucapacityflux +operator) by multiplying the {} by the slope and limiting the flux +the the maximum determined in the previous step
        4. +
        5. the program can either use the DEM to route the water or (more +appropriate in flat areas) the actual slope of the water table. +The latter option slows down the program considerably
        6. +
        +
      2. +
      3. surplus water in cells as a result of the previous step is added to +the kinematic wave reservoir
      4. +
      +
      +
      +

      Soil temperature

      +

      The near surface soil temperature is modelled using a simple equation [Wigmosta]:

      +
      +
      +

      T_s^{t} = T_s^{t-1} + w (T_a - T_s^{t-1})

      +
      +

      where T_s^{t} is the near-surface soil temperature at time t, T_a is air temperature and w is a +weighting coefficient determined through calibration (default is 0.1125 for daily timesteps, 0.9 for 3-hourly timesteps)

      +

      if T_s < 0 than a K_{sat} reduction factor (default 0.038) is applied. An S-curve (see plot below) +is used to make a smooth transition (a c-factor of 8 is used).

      +

      (Source code, png, hires.png, pdf)

      +
      +_images/s-curve-freezingsoil.png +
      +
      +
      +

      Sub-grid runoff generation

      +

      Sub-grid runoff generaten can be switched on on off in the configuration file. In +general this feature is used if the grid cell size is relatively lager compared +to the variation of topography. In addition you will need to have information +on the ditribution of altotude within a grid-cell. Depending on the topography sub-grid +runoff generation may be useful aroun 1x1km and larger.

      +

      The basis is formed by a sigmoid (S) function that is fitted using +a 10, 50 and 90 percentile DEM. The S function is defined as:

      +
      +
      +

      S = 1.0/(b + e^{(-c (X - a))})

      +
      +

      Where:

      +
      +

      X = input variable (in this case the absolute scaled groundwater level)

      +

      b = 1.0

      +

      c = sharpness parameter. Higher values give sharper step

      +

      a = centre-point of the curve (normally the 50% DEM)

      +
      +

      The c parameter is estimated by reversing the function above to:

      +
      +
      +

      c = log(1.0/p - 1)/(dem_{p} - dem_{50})

      +
      +

      where:

      +
      +

      percentile is the percentile of dem_{p}

      +

      dem_{50} is the average altitude in the gridcell

      +

      dem_{p} is the altitude below with percentile (p) cells of the dem +are found

      +
      +

      The outcome of the S will range from 0 to 1 for inputs ranging from the +minimum altitude to the maximum altitude (within the gridcell). Thereore, +the calculated groundwater levels within the cell are scale to match the minimum and +maximum altitude within the cell using:

      +
      +

      G_s = (A_{max}-A_{min})/FZT/GWPerc

      +

      where:

      +
      +

      G_s is the scaling factor

      +

      A_{max} the maximum altitude within the cell

      +

      A_{min} the minumum altitude within the cell

      +

      FZT the total thickness of the soil in the model

      +

      GWperc is a dimensionless parameter (from >0 to 1) that determines which +part of the soil profile generates runoff. If it is 1 runoff is generated whenever +there is groundwater in the system. If it is 0.1 only the top 10 % of the +soil profile generated runoff

      +
      +
      self.DemMax=readmap(self.Dir + "/staticmaps/wflow_demmax")
      +self.DrainageBase=readmap(self.Dir + "/staticmaps/wflow_demmin")
      +self.CC = min(100.0,-log(1.0/0.1 - 1)/min(-0.1,self.DrainageBase - self.Altitude))
      +self.GWScale = (self.DemMax-self.DrainageBase)/self.FirstZoneThickness / self.RunoffGeneratingGWPerc
      +
      +
      +
      +

      Note

      +

      at present the model uses the drainage base (minimum DEM) and treats this as the 10% percentile +to which the curve is fitted. So at present only two points are used (10 % and 50%)

      +
      +
      +

      Warning

      +

      This is an poorly tested feature

      +
      +

      In the dynamic section of the model the absolute groundwater level is determined and +scaled before it is +fed into the S curve function. The result is a estimated saturated fraction within a +the gridcell. The saturated fraction is used to generated Saturation Overland Flow (SOF) +and generate ouflow from the groundwater reservoir:

      +
        +
      1. The saturated conductivity for the average groundwaterlevel is determined
      2. +
      3. The available water at the surface is multiplied by the saturated fraction and +added to the kinematic wave reservoir (SOF)
      4. +
      5. Outflow from the groundwater reservoir is determined using average slope multiplied +by the conductivity and the saturated fraction limited by the amount of water +in the groundwater reservoir.
      6. +
      +

      in dynamic:

      +
      self.AbsoluteGW=self.DemMax-(self.zi*self.GWScale)
      +self.SubCellFrac = sCurve(self.AbsoluteGW,c=self.CC,a=self.Altitude+1.0)
      +self.SubCellRunoff = self.SubCellFrac * FreeWaterDepth
      +self.SubCellGWRunoff = min(self.SubCellFrac * self.FirstZoneDepth,\
      +    self.SubCellFrac * self.Slope * self.FirstZoneKsatVer * \
      +    exp(-self.f * self.zi) * self.timestepsecs/self.basetimestep)
      +self.FirstZoneDepth=self.FirstZoneDepth-self.SubCellGWRunoff
      +FreeWaterDepth = FreeWaterDepth - self.SubCellRunoff
      +
      +
      +
      +
      +
      +

      Kinematic wave and River Width

      +

      The river width is determined from the DEM the upstream area and yearly +average discharge ([Finnegan]):

      +

      The early average Q at outlet is scaled for each point in the drainage network +with the upstream area. \alpha ranges from 5 to > 60. Here 5 is used for hardrock, +largre values are used for sediments

      +

      Implementation:

      +
      upstr = catchmenttotal(1, self.TopoLdd)
      +Qscale = upstr/mapmaximum(upstr) * Qmax
      +W = (alf * (alf + 2.0)**(0.6666666667))**(0.375) * Qscale**(0.375) *\
      +     (max(0.0001,windowaverage(self.Slope,celllength() * 4.0)))**(-0.1875) *\
      +     self.N **(0.375)
      +RiverWidth = W
      +
      +
      +

      The table below list commonly used Manning’s N values (in the N_River .tbl file). +Please note that the values for non river cells may arguably be set +significantly higher. (Use N.tbl for non-river cells and N_River.tbl for river cells)

      + + ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Manning’s N values
      Type of Channel and DescriptionMinimumNormalMaximum
      Main Channels   
      clean, straight, full stage, no rifts or deep pools0.0250.030.033
      same as above, but more stones and weeds0.030.0350.04
      clean, winding, some pools and shoals0.0330.040.045
      same as above, but some weeds and stones0.0350.0450.05
      same as above, lower stages, more ineffective slopes and sections0.040.0480.055
      same as second with more stones0.0450.050.06
      sluggish reaches, weedy, deep pools0.050.070.08
      very weedy reaches, deep pools, or floodways with heavy stand of timber and underbrush0.0750.10.15
      Mountain streams   
      bottom: gravels, cobbles, and few boulders0.030.040.05
      bottom: cobbles with large boulders0.040.050.07
      +
      +
      +

      Dynamic wave

      +
      +

      Warning

      +

      As of version 0.93 this is moved to the wflow_wave module.

      +
      +

      An experimental implementation of the full dynamic wave equations has been +implemented. The current implementation is fairly unstable and very slow. +It can be switched on by setting dynamicwave=1 in the [dynamicwave] +section of the ini file. See below for an example:

      +
      [dynamicwave]
      +# Switch on dynamic wave for main rivers
      +dynamicwave=1
      +
      +# Number of timeslices per dynamic wave substep
      +TsliceDyn=100
      +
      +# 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 supplied timeseries (see levelTss)
      +# level < 0.0 use upstream water level
      +fixedLevel = 3.0
      +
      +# if this is set the program will try to keep the volume at the pits at
      +# a constant value
      +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
      +
      +# If set to 1 the program will try to optimise the timestep
      +# Experimental, mintimestep is the smallest to be used
      +#AdaptiveTimeStepping = 1
      +#mintimestep =1.0
      +
      +
      +

      A description of the implementation of the dynamicwave is given on the +pcraster website.

      +

      In addition to the settings in the ini file you need to give the model additional maps +or lookuptables:

      +
        +
      • ChannelDepth.[map|tbl] - depth of the main channel in metres
      • +
      • ChannelRoughness.[map|tbl] - manning roughness coefficient (default = 0.03)
      • +
      • ChannelForm.[map|tbl] - form of the chnaggel (default = 0.0)
      • +
      • FloodplainWidth.[map|tbl] - width of the floodplain in metres (default = )
      • +
      +

      The following variables for the dynamicwave function are set as follows:

      +
        +
      • ChannelBottomLevel - Taken from the dem
      • +
      • ChannelLength - Taken from the length in the kinematic wave
      • +
      • ChannelBottomWidth - taken from the wflow_riverwidth map (this map can be user supplied +or when it is not supplied a geomorphological relation is used)
      • +
      +

      Becuase the dynamic wave can be unstable priming the model with new initial +conditions is best done in several steps:

      +
        +
      1. Run the model with the -I option and the dynamic wave switch off
      2. +
      3. Copy back the resulting state files to the instate directory
      4. +
      5. Re-run the model with the without the -I option
      6. +
      7. Copy back the resulting states of the Dynamic wave to the instate directory
      8. +
      +
      +
      +

      Model variables stores and fluxes

      +

      The diagram below shows the stores and fluxes in the model in terms of internal variable names. It +onlys shows the soil and Kinematic wave reservoir, not the canopy model.

      +

      +digraph grids { +compound=true; +node[shape=record]; +UStoreDepth [shape=box]; +OutSide [style=dotted]; +FirstZoneDepth [shape=box]; +UStoreDepth -> FirstZoneDepth [label="Transfer [mm]"]; +FirstZoneDepth -> UStoreDepth [label="CapFlux [mm]"]; +FirstZoneDepth ->KinematicWaveStore [label="ExfiltWaterCubic [m^3/s]"]; +"OutSide" -> UStoreDepth [label="ActInfilt [mm]"]; +UStoreDepth -> OutSide [label="ActEvapUStore [mm]"]; +FirstZoneDepth -> OutSide [label="ActEvap-ActEvapUStore [mm]"]; +FirstZoneDepth -> KinematicWaveStore [label="SubCellGWRunoffCubic [m^3/s]"]; +"OutSide" -> KinematicWaveStore [label="SubCellRunoffCubic [m^3/s]"]; +"OutSide" -> KinematicWaveStore [label="RunoffOpenWater [m^3/s]"] ; +"OutSide" -> KinematicWaveStore [label="FreeWaterDepthCubic [m^3/s]"] ; +} +

      +
      +
      +

      Processing of meteorological forcing data

      +

      Although the model has been setup to do as little data processing +as possible it includes an option to apply an altitude correction to the +temperature inputs. The three squares below demonstrate the principle.

      +

      +digraph grids { +node[shape=record]; +a[label="{5|5|5}|{5|5|5}|{5|5|5}"]; +b[label="{1|2|3}|{4|5|6}|{7|8|9}"]; +c[label="{4|3|2}|{1|0|-1}|{-2|-3|-4}"]; + "Average T input grid" -> a + "Correction per cell" -> b + "Resulting T" -> c +} +

      +

      wflow_sbm takes the correction grid as input and applies this to the input +temperature. The correction grid has to be made outside of the model. +The correction grid is optional.

      +
      +

      Note

      +

      The temperature correction map is specified in the model section of the ini file:

      +

      [model] +TemperatureCorrectionMap=NameOfTheMap

      +

      If the entry is not in the file the correction will not be applied

      +
      +
      +
      +

      Guidelines for wflowsbm model parameters

      +

      The tables below shows the most important parameters and suggested ranges

      +

      CanopyGapFraction +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/Cfmax.tbl

      +
        +
      • EoverR - Ratio of average wet canopy evaporation rate over +precipitation rate - usually between 0.06 and 0.15 depending on climate and site.
      • +
      • FirstZoneCapacity -
      • +
      +
      FirstZoneKsatVer.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/FirstZoneMinCapacity.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/InfiltCapPath.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/InfiltCapSoil.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/M.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/MaxCanopyStorage.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/MaxLeakage.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/N_River.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/N.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/RootingDepth.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/RunoffGeneratingGWPerc.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/thetaR.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/thetaS.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/TT.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/TTI.tbl
      +file:///media/schelle/BIG/LINUX/wflow/cases/maas/intbl/WHC.tbl
      +
      +
      +
      +
      +

      References

      + + + + + +
      [vertessy]Vertessy, R.A. and H. Elsenbeer, “Distributed modelling of storm flow generation in an Amazonian rainforest catchment: effects of model parameterization,” Water Resources Research, vol. 35, no. 7, pp. 2173–2187, 1999.
      + + + + + +
      [Finnegan]Noah J. Finnegan et al 2005 Controls on the channel width of rivers: Implications for modeling fluvial incision of bedrock”
      + + + + + +
      [Wigmosta]Wigmosta, M. S., L. J. Lane, J. D. Tagestad, and A. M. Coleman (2009), Hydrologic and erosion models to assess land use and management practices affecting soil erosion, Journal of Hydrologic Engineering, 14(1), 27-41.
      +
      +
      +
      +

      wflow_sbm module documentation

      +

      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: schelle $ +$Id: wflow_sbm.py 900 2014-01-09 17:41:06Z schelle $ +$Rev: 900 $

      +
      +
      +wflow_sbm.SnowPackHBV(Snow, SnowWater, Precipitation, Temperature, TTI, TT, Cfmax, WHC)
      +

      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:
        +
      • Snow
      • +
      • SnowWater
      • +
      • Precipitation
      • +
      • Temperature
      • +
      +
      Returns:

      Snow,SnowMelt,Precipitation

      +
      +
      + +
      +
      +class wflow_sbm.WflowModel(cloneMap, Dir, RunDir, configfile)
      +

      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

      +
      +
      +
      +dynamic()
      +

      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:
        +
      • self.Precipitation – Gross precipitation [mm]
      • +
      • self.Temperature – Air temperature [oC]
      • +
      • self.PotenEvap – Potential evapotranspiration [mm]
      • +
      • self.PotTrans – Potential Transpiration (after subtracting Interception from PotenEvap) [mm]
      • +
      • self.Interception – Actual rainfall interception [mm]
      • +
      • self.ActEvap – Actual evaporation [mm]
      • +
      • self.SurfaceRunoff – Surface runoff in the kinematic wave [m^3/s]
      • +
      • self.SurfaceRunoffDyn – Surface runoff in the dyn-wave resrvoir [m^3/s]
      • +
      • self.WaterLevelDyn – Water level in the dyn-wave resrvoir [m^]
      • +
      • self.ActEvap – Actual EvapoTranspiration [mm]
      • +
      • self.WaterLevel – Water level in the kinematic wave [m] (above the bottom)
      • +
      • self.ActInfilt – Actual infiltration into the unsaturated zone [mm]
      • +
      • self.CanopyStorage – actual canopystorage (only for subdaily timesteps) [mm]
      • +
      • self.FirstZoneDepth – Amount of water in the saturated store [mm]
      • +
      • self.UStoreDepth – Amount of water in the unsaturated store [mm]
      • +
      • self.Snow – Snow depth [mm]
      • +
      • self.SnowWater – water content of the snow [mm]
      • +
      • self.TSoil – Top soil temperature [oC]
      • +
      • self.FirstZoneDepth – amount of available water in the saturated part of the soil [mm]
      • +
      • self.UStoreDepth – amount of available water in the unsaturated zone [mm]
      • +
      • self.Transfer – downward flux from unsaturated to saturated zone [mm]
      • +
      • self.CapFlux – capilary flux from saturated to unsaturated zone [mm]
      • +
      • self.CanopyStorage – Amount of water on the Canopy [mm]
      • +
      +
      +

      Static variables

      + +++ + + + +
      Variables:
        +
      • self.Altitude – The altitude of each cell [m]
      • +
      • self.Bw – Width of the river [m]
      • +
      • self.River – booolean map indicating the presence of a river [-]
      • +
      • self.DLC – length of the river within a cell [m]
      • +
      • self.ToCubic – Mutiplier to convert mm to m^3/s for fluxes
      • +
      +
      +
      + +
      +
      +initial()
      +

      Initial part of the model, executed only once. Reads all static data from disk

      +

      Soil

      + +++ + + + +
      Variables:
        +
      • M.tbl – M parameter in the SBM model. Governs the decay of Ksat with depth [-]
      • +
      • thetaR.tbl – Residual water content [mm/mm]
      • +
      • thetaS.tbl – Saturated water content (porosity) [mm/mm]
      • +
      • FirstZoneKsatVer.tbl – Saturated conductivity [mm/d]
      • +
      • PathFrac.tbl – Fraction of compacted area per grid cell [-]
      • +
      • InfiltCapSoil.tbl – Soil infiltration capacity [m/d]
      • +
      • InfiltCapPath.tbl – Infiltration capacity of the compacted areas [mm/d]
      • +
      • FirstZoneMinCapacity.tbl – Minimum wdepth of the soil [mm]
      • +
      • FirstZoneCapacity.tbl – Maximum depth of the soil [m]
      • +
      • RootingDepth.tbl – Depth of the roots [mm]
      • +
      • MaxLeakage.tbl – Maximum leakage out of the soil profile [mm/d]
      • +
      • CapScale.tbl – Scaling factor in the Capilary rise calculations (100) [mm/d]
      • +
      • RunoffGeneratingGWPerc – Fraction of the soil depth that contributes to subcell runoff (0.1) [-]
      • +
      • rootdistpar.tbl – Determine how roots are linked to water table. The number +should be negative. A more negative number means that all roots are wet if the water +table is above the lowest part of the roots. +A less negative number smooths this. [mm] (default = -80000)
      • +
      +
      +

      Canopy

      + +++ + + + +
      Variables:
        +
      • CanopyGapFraction.tbl – Fraction of precipitation that does not hit the canopy directly [-]
      • +
      • MaxCanopyStorage.tbl – Canopy interception storage capacity [mm]
      • +
      • EoverR.tbl – Ratio of average wet canopy evaporation rate over rainfall rate [-]
      • +
      +
      +

      Surface water

      + +++ + + + +
      Variables:
        +
      • N.tbl – Manning’s N parameter
      • +
      • N_river.tbl – Manning’s N parameter fro cells marked as river
      • +
      +
      +

      Snow and frozen soil modelling parameters

      + +++ + + + +
      Variables:
        +
      • cf_soil.tbl – Soil infiltration reduction factor when soil is frozen [-] (< 1.0)
      • +
      • TTI.tbl – critical temperature for snowmelt and refreezing (1.000) [oC]
      • +
      • TT.tbl – defines interval in which precipitation falls as rainfall and snowfall (-1.41934) [oC]
      • +
      • Cfmax.tbl – meltconstant in temperature-index ( 3.75653) [-]
      • +
      • WHC.tbl – fraction of Snowvolume that can store water (0.1) [-]
      • +
      • w_soil.tbl – Soil temperature smooth factor. Given for daily timesteps. (0.1125) [-] Wigmosta, M. S., L. J. Lane, J. D. Tagestad, and A. M. Coleman (2009).
      • +
      +
      +
      + +
      +
      +resume()
      +
      + +
      +
      +stateVariables()
      +
      +

      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:
        +
      • self.SurfaceRunoff – Surface runoff in the kin-wave resrvoir [m^3/s]
      • +
      • self.SurfaceRunoffDyn – Surface runoff in the dyn-wave resrvoir [m^3/s]
      • +
      • self.WaterLevel – Water level in the kin-wave resrvoir [m]
      • +
      • self.WaterLevelDyn – Water level in the dyn-wave resrvoir [m^]
      • +
      • self.Snow – Snow pack [mm]
      • +
      • self.SnowWater – Snow pack water [mm]
      • +
      • self.TSoil – Top soil temperature [oC]
      • +
      • self.UStoreDepth – Water in the Unsaturated Store [mm]
      • +
      • self.FirstZoneDepth – Water in the saturated store [mm]
      • +
      • self.CanopyStorage – Amount of water on the Canopy [mm]
      • +
      +
      +
      + +
      +
      +supplyCurrentTime()
      +

      gets the current time in seconds after the start of the run

      +
      + +
      +
      +suspend()
      +
      + +
      +
      +updateRunOff()
      +

      Updates the kinematic wave reservoir. Should be run after updates to Q

      +
      + +
      + +
      +
      +wflow_sbm.actEvap_SBM(RootingDepth, WTable, UStoreDepth, FirstZoneDepth, PotTrans, smoothpar)
      +

      Actual evaporation function:

      +
        +
      • first try to get demand from the saturated zone, using the rootingdepth as a limiting factor
      • +
      • secondly try to get the remaining water from the unsaturated store
      • +
      • it uses an S-Curve the make sure roots het wet/dry gradually (basically) +representing a root-depth distribution
      • +
      +

      Input:

      +
      +
        +
      • RootingDepth,WTable, UStoreDepth,FirstZoneDepth, PotTrans, smoothpar
      • +
      +
      +

      Output:

      +
      +
        +
      • ActEvap, FirstZoneDepth, UStoreDepth ActEvapUStore
      • +
      +
      +
      + +
      +
      +wflow_sbm.main(argv=None)
      +

      Perform command line execution of the model.

      +
      + +
      +
      +wflow_sbm.usage(*args)
      +
      + +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/wflow_usage.html =================================================================== diff -u --- doc/_build/html/wflow_usage.html (revision 0) +++ doc/_build/html/wflow_usage.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,594 @@ + + + + + + + + Using the models — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      Using the models

      +
      +

      Directory structure: cases and runs

      +

      A case is a directory holding all the data needed to run the model. +Multiple cases may exist next to each other in separate directories. The +model will only work with one case at the time. If no case is +specified when starting the model a default case (default_sbm or +default_hbv) is assumed. Within a case the model output (the results) +are stored in a separate directory. This directory is called the run, +indicated with a runId. This structure is indicated in the figure below:

      +

      +digraph file_system { +//rankdir=LR; +size="8,11"; +"Case" -> "inmaps"; +"Case" -> "instate"; +"Case" -> "intbl"; +"Case" -> "intss"; +"Case" -> "outstate"; +"Case" -> "Run"; +"Case" -> "staticmaps"; + "Run" -> " intbl"; + "Run" -> "outmaps"; + "Run" -> " outstate"; + "Run" -> "outsum"; + "Run" -> "runinfo"; +} +

      +

      If you want to save the results and not overwrite the results from a previous +run a new runId must be specified.

      +
      +
      inmaps
      +
      Directory holding the dynamic input data. Maps of Precipitation, +potential evapotranspiration and (optionally) temperature in pcraster +mapstack format.
      +
      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. This is done using the -I command-line option.
      +
      intbl
      +
      Directory holding the lookup tables. These hold the model parameters +specified per landuse/soiltype class. Note that you can use the -i +option to specify an alternative name (e.g. to support an +alternative model calibration)
      +
      intss
      +
      Directory holding the scalar input timeseries. Scalar input data is +only assumed if the ScalarInput entry in the ini file is set to 1 +(True).
      +
      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.
      +
      wflow_sbm|hbv.ini
      +
      The default settings file for wflow_sbm of wflow_hbv
      +
      +
      +
      +

      Running the model

      +
      +

      Overview

      +

      In general the model is run from the dos/windows/linux command line. +Based on the system settings you can call the wFlow_[sbm|hbv].py file +directly or you need to call python with the script as the first argument +e.g.:

      +
      python wflow_sbm.py -C myCase -R calib_run -T 365 -f
      +
      +
      +

      In the example above the wflow_sbm model is run using the +information in case myCase storing the results in runId calib_run. A +total to 365 timesteps is performed and the the model will overwrite +existing output in the calib_run directory. The default .ini file +wflow_sbm.ini located in the myCase directory is read at startup.

      +
      +
      +

      Command-line options

      +

      The command line options for wflow are summarized below, use wflow +-h to view them at the command line:

      +
      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]
      +
      +
      +
      -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.
      +-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)
      +-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
      +-E: Switch on reinfiltration of overland flow
      +-c: name of wflow the configuration file (default: Cassename/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 program 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.
      +-u: list of gauges/columns to use in update. Format:
      +    -u [1 , 4 ,13]
      +    The above example uses column 1, 4 and 13
      +    Note that this also sets the order in which the updating takes place! In
      +    general specify downstream gauges first.
      +-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 'Precipitation' : 1.2 to increase Precipitation
      +    by 20%, multiply with 1.2)
      +-v: set verbosity level
      +
      +
      +
      +
      +
      +

      wflow_sbm|hbv.ini file

      +

      The wflow_sbm|hbv.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]). Variables can be set in each section using a +keyword = value combination (e.g. ScalarInput = 1). The default +settings for the ini file are given in the subsections below.

      +

      [model] Options for all models:

      +
      +
      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 +directory., If set to 1 the model will use input timeseries from the +inputtss directory and interpolate these to maps at run-time.
      +
      InterpolationMethod=pol
      +
      Interpolation method when using scalar timeseries input. The method +can be pol (Thiessen polygons) or inv (Inverse Distance). +The same method is used for all parameters (P. PET, T).
      +
      WIMaxScale=0.8
      +
      Scaling for the topographical wetness vs soil depth method
      +
      Tslice=1
      +
      Number of timeslices per timestep used in the kinematic wave formula
      +
      UpdMaxDist=10000.0
      +
      Maximum distance from the gauge to apply updating to. Only used if +you force the model with measured discharge
      +
      fewsrun=0
      +
      Indicates the model is running from Delft-FEWS or not
      +
      +

      Specific options for wflow_sbm :

      +
      +
      RunoffGenSigmaFunction = 0
      +
      Use subcell runoff generation based on fitting a Sigmoid function to +percentile Dems.(wflow_sbm only)
      +
      reinit = 0
      +
      If set to 1 (one) the model will not read the save initial state files +from the instates directory but start with cold states.
      +
      OverWriteInit = 0
      +
      If set to one the initial states will be overwritten
      +
      updating = 0
      +
      Set to 1 to switch on Q updating.
      +
      updateFile
      +
      If updating is set to 1 specify a
      +
      sCatch = 0
      +
      If set to another value than 0 the model will only use only the specified subcatchment
      +
      inblt = intbl
      +
      directory from which to read the lookup tables (relative to the case directory)
      +
      timestepsecs = 86400
      +
      timestep of the model in seconds
      +
      Alpha = 60
      +
      Alpha term in the river width estimation function
      +
      AnnualDischarge = 300
      +
      Average annual discharge at the outlet of the catchment for the river wiidth estimation function.
      +
      UpdMaxDist = 100
      +
      Maximum distance from the gauge used in updating for which to update the kinamatic wave reservoir (in model units, metres or degree lat lon)
      +
      waterdem = 0
      +
      if set to 1 the ldd will be recalculate each timestep based on the DEM + the water level
      +
      reInfilt = 0
      +
      If set to 1 water from the kinamatic wave reservoir can reinfiltrate in the soil
      +
      +

      The options below should normally not be needed.Here you can chnage the location of some of the input maps.

      +
      +
      wflow_subcatch=staticmaps/wflow_subcatch.map
      +
      map with the subcatchments
      +
      wflow_dem=staticmaps/wflow_dem.map
      +
      the digital elevation map
      +
      wflow_ldd=staticmaps/wflow_ldd.map
      +
      the local drainage network
      +
      wflow_river=staticmaps/wflow_river.map
      +
      all the cells marked as river
      +
      wflow_riverlength=staticmaps/wflow_riverlength.map
      +
      the length of the ‘river’ in each cell
      +
      wflow_riverlength_fact=staticmaps/wflow_riverlength_fact.map
      +
      factor to multiply the river length with
      +
      wflow_landuse=staticmaps/wflow_landuse.map
      +
      landuse map
      +
      wflow_soil=staticmaps/wflow_soil.map
      +
      soil map
      +
      wflow_gauges=staticmaps/wflow_gauges.map
      +
      map with the gauge locations
      +
      wflow_inflow=staticmaps/wflow_inflow.map
      +
      map with forced inflow points (optional)
      +
      wflow_mgauges=staticmaps/wflow_mgauges.map
      +
      map with locations of the meteorological gauges (only neede if you use scalar timeseries as input)
      +
      wflow_riverwidth=staticmaps/wflow_riverwidth.map
      +
      map with the width of the river
      +
      +

      [defaultfortbl]

      +
      +
      RunoffGeneratingGWPerc = 0.1
      +
      Default value for the upper fraction of the groundwater reservoir +that generates runoff (wflow_sbm only)
      +
      +

      [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.
      +
      +

      [outputmaps]

      +

      Outputmaps to save per timestep. Valid options for the keys in the +wFlow_sbm model are all variables visible the dynamic section of the +model (see the code). A few useful variables are listed below.

      +
      [outputmaps]
      +self.Runoff=run
      +self.SnowMelt=sno
      +self.FirstZoneFlux=fzf
      +self.FirstZoneDepth=fir
      +
      +
      +
      +

      Tip

      +

      NB See the wflow.py code for all the available variables as this list +is incomplete.

      +
      +

      The values on the right side of the equal sign can be choosen freely.

      +

      Example content:

      +
      Self.Runoff=run
      +self.FirstZoneFlux=fzf
      +self.FirstZoneDepth=fir
      +
      +
      +

      [outputtss]

      +
      +

      Note

      +

      Depricated. This is the old method. Use outputcsv_0 or outputtss_0 instead (see below)

      +
      +

      List all timeseries here that you want to have saved (in tss format). +Timeseries are produced as averages per subcatchment. Note that each +timeseries you add here slows down the program so only save what you +need, especially in operational applications. Possible values are:

      +
      +
      Note the run.tss and lev.tss are always saved (runoff and water +level at the gauge locations)
      +
      [outputtss]
      +self.ActEvap=aet
      +self.watbal=wat
      +self.PotEvap=pot
      +self.FirstZoneDepth=fir
      +self.Interception=int
      +self.UStoreDepth=ust
      +self.zi=zi_
      +self.ExfiltWater=exf
      +self.UStoreCapacity=tde
      +self.Transfer=tra
      +self.Ksat=ksa
      +self.Snow=sno
      +self.SnowMelt=snm
      +self.SnowWater=snw
      +self.FirstZoneFlux=fzf
      +
      +
      +

      [outputcsv_0-n] +[outputtss_0-n]

      +

      Number of sections to define output timeseries in csv format. Each section +should at lears contain one samplemap item and one or more variables to save. +The samplemap is the map that determines how the timesries are averaged/sampled. +All other items are variabale filename pairs. The filename is given relative +to the case directory.

      +

      Example:

      +
      [outputcsv_0]
      +samplemap=staticmaps/wflow_subcatch.map
      +self.SurfaceRunoffMM=Qsubcatch_avg.csv
      +
      +[outputcsv_1]
      +samplemap=staticmaps/wflow_gauges.map
      +self.SurfaceRunoffMM=Qgauge.csv
      +self.WaterLevel=Hgauge.csv
      +
      +[outputtss_0]
      +samplemap=staticmaps/wflow_landuse.map
      +self.SurfaceRunoffMM=Qlu.tss
      +
      +
      +

      In the above example the discharge of this model (self.SurfaceRunoffMM) is +saved as an average per subcatchment, a sample at the gauge locations and as +an average per landuse.

      +

      [inputmapstacks]

      +

      This section can be used to overwrite the default names of the input mapstacks

      +
      +
      Precipitation = /inmaps/P
      +
      timeseries for rainfall
      +
      EvapoTranspiration = /inmaps/PET
      +
      potential evapotranspiration
      +
      Temperature = /inmaps/TEMP
      +
      temperature time series
      +
      Inflow = /inmaps/IF
      +
      in/outflow locations (abstractions)
      +
      +
      +
      +

      Updating using measured data

      +

      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 determined
      • +
      • this difference is added to the unsaturated store for all cells
      • +
      • the ratio of measured Q divided by simulated Q at the outlet is used +to multiply the kinematic wave store with. This ratio is scaled +according to a maximum distance from the gauge.
      • +
      +
      +
      +

      All possible options in wflow_sbm.ini file

      +
      [outputtss]
      +# All variables in the dynamic section can be put here
      +
      +[defaultfortbl]
      +RunoffGeneratingGWPerc = 0.1
      +
      +[layout]
      +sizeinmetres = 1
      +
      +[fit]
      +areamap = staticmaps/wflow_subcatch.map
      +areacode = 1
      +Q = testing.tss
      +WarmUpSteps = 1
      +ColMeas = 0
      +parameter_1 = RootingDepth
      +parameter_0 = M
      +ColSim = 0
      +
      +[misc]
      +
      +[outputmaps]
      +self.SurfaceRunoff = run
      +
      +[framework]
      +debug = 0
      +outputformat = 1
      +
      +[inputmapstacks]
      +Inflow = /inmaps/IF
      +Precipitation = /inmaps/P
      +Temperature = /inmaps/TEMP
      +EvapoTranspiration = /inmaps/PET
      +
      +[model]
      +wflow_river = staticmaps/wflow_river.map
      +InterpolationMethod = inv
      +reinit = 1
      +WIMaxScale = 0.6
      +wflow_riverlength_fact = staticmaps/wflow_riverlength_fact.map
      +OverWriteInit = 0
      +intbl = intbl
      +wflow_riverwidth = staticmaps/wflow_riverwidth.map
      +wflow_soil = staticmaps/wflow_soil.map
      +ExternalQbase = 0
      +updateFile = no_set
      +sCatch = 0
      +Alpha = 120
      +UpdMaxDist = 300000.0
      +wflow_subcatch = staticmaps/wflow_subcatch.map
      +wflow_mgauges = staticmaps/wflow_mgauges.map
      +timestepsecs = 86400
      +RunoffGeneratingGWPerc = 1.0
      +RunoffGenSigmaFunction = 1
      +ScalarInput = 0
      +reInfilt = 0
      +fewsrun = 0
      +wflow_dem = staticmaps/wflow_dem.map
      +ModelSnow = 0
      +AnnualDischarge = 2290
      +wflow_landuse = staticmaps/wflow_landuse.map
      +updating = 0
      +TemperatureCorrectionMap = staticmaps/wflow_tempcor.map
      +wflow_inflow = staticmaps/wflow_inflow.map
      +wflow_riverlength = staticmaps/wflow_riverlength.map
      +wflow_ldd = staticmaps/wflow_ldd.map
      +wflow_gauges = staticmaps/wflow_gauges.map
      +Tslice = 1
      +waterdem = 0
      +
      +
      +
      +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/html/wflow_wave.html =================================================================== diff -u --- doc/_build/html/wflow_wave.html (revision 0) +++ doc/_build/html/wflow_wave.html (revision d200c1a6509757b11288719d8aefb33a0d19512e) @@ -0,0 +1,465 @@ + + + + + + + + wflow_wave Module — wflow 1.0RC1 documentation + + + + + + + + + + + + + + + + +
      +py4sci +
      + + +
      +
      +
      + +
      +
      +
      + +
      +

      wflow_wave Module

      +
      +

      Warning

      +

      The documentation is incomplete

      +
      +
      +

      Introduction

      +

      An experimental implementation of the full dynamic wave equations has been +implemented. The current implementation is fairly unstable and very slow.

      +

      However, in flat of tidal areas and areas that flood the dynamic wave can provide +much better results. The plot below is from the Rio Mamore in Bolivia in the +lower partes of the river with extensive wetlands that flood nearly each year.

      +

      (Source code, png, hires.png, pdf)

      +
      +_images/kin-dyn.png +
      +
      +
      +

      Dependencies

      +

      This module is setup to be run in an existing case and runid of a wflow_sbm +or wflow_hbv model. In order for wflow_wave to run they must have saved +discharge and waterlevel for each timesteps. This output will be used as a forcing +for the dynamic wave module. The wflow_wave module will also use the existing ldd +and DEM

      +
      +
      +

      Configuration

      +

      It needs anumber of settings in the ini file. The default name for the file +is wflow_wave.ini. it is also possible to insert this section in the +wflow_sbm or wflow_hbv ini file and point to that file.

      +

      See below for an example:

      +
      [inputmapstacks]
      +# Name of the mapstack with discharge (output from the hydrological model)
      +Q = run
      +# Name of the mapstack with waterlevel (output from the hydrological model)
      +H = lev
      +
      +[dynamicwave]
      +
      +# Number of timeslices per dynamic wave substep
      +TsliceDyn=100
      +
      +# 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 supplied timeseries (see levelTss)
      +# level < 0.0 use upstream water level
      +fixedLevel = 3.0
      +
      +# if this is set the program will try to keep the volume at the pits at
      +# a constant value
      +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
      +
      +# If set to 1 the program will try to optimise the timestep
      +# Experimental, mintimestep is the smallest to be used
      +AdaptiveTimeStepping = 1
      +mintimestep =0.1
      +
      +
      +

      A description of the implementation of the dynamicwave is given on the +pcraster website.

      +

      In addition to the settings in the ini file you need to give the model additional maps +or lookuptables in the staticmaps or intbl directories:

      +
        +
      • ChannelDepth.[map|tbl] - depth of the main channel in metres
      • +
      • ChannelRoughness.[map|tbl] - 1/n n = manning roughness coefficient (default = 1/0.03)
      • +
      • ChannelForm.[map|tbl] - form of the channel (default = 1.0)
      • +
      • FloodplainWidth.[map|tbl] - width of the floodplain in metres (default = 0)
      • +
      +

      The following variables for the dynamicwave function are set as follows and are taken from the +hydrological model run by default:

      +
        +
      • ChannelBottomLevel - Taken from the dem (wflow_dem.map in the staticmaps dir)
      • +
      • ChannelLength - Taken from the length in the kinematic wave (DCL.map from the outsum dir)
      • +
      • ChannelBottomWidth - taken from the wflow_riverwidth map from the outsum dir
      • +
      +
      +
      +
      +

      wflow_wave module documentation

      +
      +

      Definition of the wflow_wave 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: schelle $ +$Id: wflow_wave.py 913 2014-02-04 13:10:51Z schelle $ +$Rev: 913 $

      +
      +
      +class wflow_wave.WflowModel(cloneMap, Dir, RunDir, configfile)
      +

      Bases: pcraster.framework.dynamicPCRasterBase.DynamicModel

      +

      The user defined model class. This is your work!

      +
      +
      +dynamic()
      +

      Required

      +

      This is where all the time dependent functions are executed. Time dependent +output should also be saved here.

      + +++ + + + +
      Variables:
        +
      • self.FloodPlainVol – Volume of water in the floodplain [m^3]
      • +
      • self.ChannelVol – Volume of water in the channel [m^3]
      • +
      • self.WaterLevelDyn – Water Level [m]
      • +
      • self.SurfaceRunoffDyn – Discharge [m^3/s]
      • +
      +
      +
      + +
      +
      +initial()
      +

      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.

      +
      + +
      +
      +resume()
      +

      reads the initial conditions:

      + +++ + + + +
      Variables:
        +
      • self.WaterLevelDyn – Dynamic wave waterlevel [m]
      • +
      • self.SurfaceRunoffDyn – Dynamic wave surface runoff [m^3/s]
      • +
      +
      +
      + +
      +
      +runDynamicWave()
      +

      Runs the dynamic wave for the main river +Beware: Experimental, very slow and unstable

      +
      + +
      +
      +stateVariables()
      +

      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:
        +
      • SurfaceRunoffDyn.map – Discharge in m^3/sec
      • +
      • WaterLevelDyn.map – Discharge in m
      • +
      +
      +
      + +
      +
      +supplyCurrentTime()
      +

      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
      • +
      +
      +
      + +
      +
      +suspend()
      +

      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

      +
      + +
      + +
      +
      +wflow_wave.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_wave.usage(*args)
      +
      + +
      +
      + + +
      +
      +
      +
      + +
      +
      +
      + + + + + \ No newline at end of file Index: doc/_build/plot_directive/plots/calibplot_00.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_00.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_00.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_01.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_01.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_01.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_02.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_02.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_02.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_03.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_03.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_03.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_04.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_04.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_04.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_05.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_05.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_05.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_06.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_06.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_06.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_07.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_07.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_07.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_08.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_08.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_08.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_09.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_09.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_09.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_10.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_10.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_10.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_11.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_11.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_11.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_12.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_12.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_12.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_13.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_13.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_13.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_00.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_00.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_00.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_01.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_01.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_01.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_02.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_02.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_02.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_03.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_03.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_03.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_04.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_04.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_04.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_05.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_05.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_05.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_06.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_06.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_06.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_07.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_07.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_07.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_08.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_08.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_08.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_09.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_09.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_09.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_10.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_10.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_10.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_11.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_11.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_11.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_12.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_12.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_12.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_13.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_13.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/calibplot_lunew_13.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/kin-dyn.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/kin-dyn.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/kin-dyn.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/m-plot.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/m-plot.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/m-plot.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/s-curve-freezingsoil.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/s-curve-freezingsoil.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/s-curve-freezingsoil.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/s-curve-soil.hires.png =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/s-curve-soil.pdf =================================================================== diff -u Binary files differ Index: doc/_build/plot_directive/plots/s-curve-soil.png =================================================================== diff -u Binary files differ