db_extract_subcatch: Extracts sub-catchment(s) for specific subbasin(s) from a...

View source: R/db_extract_subcatch.R

db_extract_subcatchR Documentation

Extracts sub-catchment(s) for specific subbasin(s) from a database

Description

This function extracts the sub-catchment(s) for selected subbasin(s) from an existing and fully pre-processed WASA-SED parameter database.

Usage

db_extract_subcatch(dbname = NULL, sub_extract = NULL,
  dbname_new = NULL, verbose = T)

Arguments

dbname

Name of the data source (DSN) registered at ODBC. See Details of db_create.

sub_extract

vector of type numeric with the 'pid'(s) of table 'subbasins' in database dbname for which the associated sub-catchments shall be extracted.

dbname_new

vector of type character with the names of the databases containing the extracted sub-catchments. Database need to be registered for ODBC (see Details of db_create).

verbose

logical. Should detailed information during execution be printed? Default: TRUE.

Details

The function first copies the original databse. Then the upstream subbasins of the selected outlet subbasin are identified and the copied database is pruned accordingly. The latter only affects the tables subbasins, landscape_units, terrain_components, r_subbas_contains_lu, r_lu_contains_tc and r_tc_contains_svc. Thus, the other tables may contain redundant information which are contained to limit the processing time and retain the opportunity to (re-)include information later on.

Value

Function returns nothing. Only the databases are processed.

Author(s)

Tobias Pilz tpilz@uni-potsdam.de


tpilz/lumpR documentation built on Aug. 5, 2023, 1:31 a.m.