View source: R/db_wasa_input.R
db_wasa_input | R Documentation |
Function retrieves parameters from a parameter database and generates ASCII files as input to the hydrological model WASA.
db_wasa_input(dbname, dest_dir = "./", files = c("info.dat",
"River/routing.dat", "River/response.dat", "Hillslope/hymo.dat",
"Hillslope/soter.dat", "Hillslope/terrain.dat",
"Hillslope/soil_vegetation.dat", "Hillslope/soil.dat",
"Hillslope/vegetation.dat", "Hillslope/svc_in_tc.dat", "do.dat",
"maxdim.dat", "part_class.dat", "Hillslope/soil_particles.dat",
"Hillslope/rainy_season.dat", "Hillslope/x_seasons.dat",
"Hillslope/svc.dat", "Reservoir/reservoir.dat", "Reservoir/lake.dat",
"Reservoir/lake_number.dat", "Reservoir/lake_maxvol.dat"),
overwrite = F, verbose = TRUE)
dbname |
Name of the data source (DSN) registered as ODBC source. |
dest_dir |
The directory in which the output files (= WASA input files) will be
written. Will be created if it does not exist. Default: |
files |
Character vector specifying WASA input files that should be created.
See |
overwrite |
|
verbose |
|
Consider function db_check
before running this function to ensure consistency
and completeness of data in the database. Otherwise, the input files might contain
errors, which might lead to errors or unexpected results during model application.
Note differences in variable notations between parameter database and WASA's input files!
Sediment transport specific variables are not yet included, please configure erosion.ctl
manually.
The following files will be created:
info.dat
General information (actual date, parameter database version etc.).
River/routing.dat
File contains routing order (i.e. flow direction) at subbasin level.
River/response.dat
File contains routing parameters (lag time and retention in days)
at subbasin level.
Hillslope/hymo.dat
File contains relations between subbasins and landscape units. Only subbasins
present in table 'subbasins' AND 'r_subbas_contains_lu' will be considered.
Columns:
Subbasin-ID
ID of subbasin.
Area
Area of each subbasin in km^2 (including reservoir areas).
nbr
Number of landscape units in the respective subbasin.
LU-IDs
IDs of landscape units in the respective subbasin
areal_fraction_of_LU
Areal fraction of each LU in the respective subbasin.
Hillslope/soter.dat
File contains landscape unit parameters and associated terrain components. Only LUs
present in table 'landscape_units' AND 'r_lu_contains_tc' will be considered.
LU-ID
ID of landscape unit.
No._of_TC
Number of TCs in the corresponding LU.
TC1
ID of first terrain component.
TC2
ID of second terrain component.
TC3
ID of third terrain component.
TCx
IDs of the other TCs as specified in field No._of_TC (if available).
kfsu[mm/d]
Hydraulic conductivity of bedrock in mm/d.
length[m]
Mean slope length in LU in m.
meandep[mm]
Mean maximum depth of soil zone in mm.
maxdep[mm]
Maximum depth of alluvial soil zone in mm.
Riverbed[mm]
Depth of River bed below terrain component in mm.
gwflag[0/1]
Groundwater flag for LU. 0: no groundwater, 1: with groundwater.
gw_dist[mm]
Initial depth of groundwater below surface in mm.
frgw_delay[day]
Storage coefficient for groundwater outflow in days.
Hillslope/terrain.dat
File contains specification of terrain components. Only TCs
present in tables 'terrain_components' AND 'r_lu_contains_tc' will be considered.
TC-ID
ID of terrain component.
fraction
Areal fraction of TC in corresponding LU.
slope[%]
Slope of TC in %.
position
Number indicating the relative position of TC along the hillslope. 1: highland,
2: middle, ..., [highest number]: foot slope.
ATTENTION: The order in WASA input file is reversed in comparison to order within
database!
Hillslope/svc_in_tc.dat
SVC relations to TC.
Hillslope/soil_vegetation.dat
Definition of soil vegetation components. Only SVCs occurring in table 'r_tc_contains_svc'
will be considered.
Hillslope/soil.dat
Horizon specific soil parameters. See file header and db_fill
for more information. Only soil types occurring in tables 'soil_veg_components'
and 'r_tc_contains_svc' will be considered.
Hillslope/vegetation.dat
Vegetation parameters. See file header and db_fill
for more information. Only vegetation types occurring in table 'soil_veg_components'
and 'r_tc_contains_svc' will be considered.
do.dat
File contains general parameters and control flags for WASA. See file's comments for
more information. Manual investigation and adjustment after creation is necessary
(e.g. for input/output directories, start/stop year of simulation etc.). Note that,
depending on your choices, the manual creation of additional input files will
be necessary. Consult the WASA documentation.
maxdim.dat
Optional file that contains maximum dimensions of spatial units to
optimise memory management and improve computational performance.
part_class.dat
Optional file for sediment modelling of multiple particle size classes.
File defines the number and the properties of the particle sizes that will be
modelled. Please note that class numbering has to be continuous, starting with
1. The particle size classes must be ordered from fine to coarse.
gauges_catchment_area.txt
Optional, auxiliary file not needed by WASA File relating subcatchment sizes, gauge names and upstream areas. Can be used for calibration workflow.
Hillslope/soil_particles.dat
File contains particle size distributions of topmost soil horizons.
Hillslope/rainy_season.dat, Hillslope/x_seasons.dat,
Optional file defining days of year (i.e. nodes, cf. vegetation parameters)
of the rainy/growing season for each year, subbasin and vegetation type. See
doc of db_fill
and rainy_season
for
more information. If this file is not supplied, only the first node value of
seasonal vegetation parameters is used.
Hillslope/svc.dat
Optional file defining soil vegetation components and giving some erosion
parameters. Mandatory for WASA's sediment module and/or saving/loading of model
states. See doc of db_fill
(-> 'soil_veg_components') for
description of header.
Reservoir/reservoir.dat
Optional file defining properties of strategic reservoirs.
Reservoir/lake.dat, lake_number.dat, lake_maxvol.dat
Optional file defining properties of small reservoirs.
Tobias Pilz tpilz@uni-potsdam.de, Till Francke francke@uni-potsdam.de
lumpR package introduction with literature study and sensitivity analysis:
Pilz, T.; Francke, T.; Bronstert, A. (2017): lumpR 2.0.0: an R package facilitating
landscape discretisation for hillslope-based hydrological models.
Geosci. Model Dev., 10, 3001-3023, doi: 10.5194/gmd-10-3001-2017
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.