##' QGIS Algorithm provided by SAGA Next Gen Topmodel (sagang:topmodel). ---------------- Arguments ---------------- ATANB: Topographic Wetness Index Argument type: raster Acceptable values: - Path to a raster layer MOIST: Soil Moisture Deficit Argument type: rasterDestination Acceptable values: - Path for new raster layer WEATHER: Weather Records Argument type: source Acceptable values: - Path to a vector layer RECORD_P: Precipitation (m / dt) Argument type: field Acceptable values: - The name of an existing field - ; delimited list of existing field names RECORD_ET: Evapotranspiration (m / dt) Argument type: field Acceptable values: - The name of an existing field - ; delimited list of existing field names RECORD_DATE: Date/Time Argument type: field Acceptable values: - The name of an existing field - ; delimited list of existing field names TABLE: Simulation Output Argument type: vectorDestination Acceptable values: - Path for new vector layer DTIME: Time Step (h) Default value: 1 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression NCLASSES: Number of Classes Default value: 30 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression P_QS0: Initial subsurface flow per unit area (m/h) Default value: 3.3e-05 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression P_LNTE: Areal average of ln(T0) = ln(Te) (ln(m^2/h)) Default value: 5 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression P_MODEL: Model parameter (m) Default value: 0.032 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression P_SR0: Initial root zone storage deficit (m) Default value: 0.002 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression P_SRZMAX: Maximum root zone storage deficit (m) Default value: 0.05 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression P_SUZ_TD: Unsaturated zone time delay per unit storage deficit (h) Default value: 50 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression P_VCH: Main channel routing velocity (m/h) Default value: 3600 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression P_VR: Internal subcatchment routing velocity (m/h) Default value: 3600 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression P_K0: Surface hydraulic conductivity (m/h) Default value: 1 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression P_PSI: Wetting front suction (m) Default value: 0.02 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression P_DTHETA: Water content change across the wetting front Default value: 0.1 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression BINF: Green-Ampt Infiltration Default value: true Argument type: boolean Acceptable values: - 1 for true/yes - 0 for false/no - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression
##'
##' @title QGIS algorithm - Topmodel
##'
##' @param ATANB `raster` - Topographic Wetness Index. Path to a raster layer.
##' @param MOIST `rasterDestination` - Soil Moisture Deficit. Path for new raster layer.
##' @param WEATHER `source` - Weather Records. Path to a vector layer.
##' @param RECORD_P `field` - Precipitation (m \code{/} dt). The name of an existing field. ; delimited list of existing field names.
##' @param RECORD_ET `field` - Evapotranspiration (m \code{/} dt). The name of an existing field. ; delimited list of existing field names.
##' @param RECORD_DATE `field` - Date\code{/}Time. The name of an existing field. ; delimited list of existing field names.
##' @param TABLE `vectorDestination` - Simulation Output. Path for new vector layer.
##' @param DTIME `number` - Time Step (h). A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param NCLASSES `number` - Number of Classes. A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param P_QS0 `number` - Initial subsurface flow per unit area (m\code{/}h). A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param P_LNTE `number` - Areal average of ln(T0) = ln(Te) (ln(m^2\code{/}h)). A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param P_MODEL `number` - Model parameter (m). A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param P_SR0 `number` - Initial root zone storage deficit (m). A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param P_SRZMAX `number` - Maximum root zone storage deficit (m). A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param P_SUZ_TD `number` - Unsaturated zone time delay per unit storage deficit (h). A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param P_VCH `number` - Main channel routing velocity (m\code{/}h). A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param P_VR `number` - Internal subcatchment routing velocity (m\code{/}h). A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param P_K0 `number` - Surface hydraulic conductivity (m\code{/}h). A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param P_PSI `number` - Wetting front suction (m). A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param P_DTHETA `number` - Water content change across the wetting front. A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param BINF `boolean` - Green-Ampt Infiltration. 1 for true/yes. 0 for false/no. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param ... further parameters passed to `qgisprocess::qgis_run_algorithm()`
##' @param .complete_output logical specifying if complete out of `qgisprocess::qgis_run_algorithm()` should be used (`TRUE`) or first output (most likely the main) should read (`FALSE`). Default value is `TRUE`.
##' @param .quiet logical specifying if parameter `.quiet` for `qgisprocess::qgis_run_algorithm()` Default value is `TRUE`.
##' @param .messages logical specifying if messages from `qgisprocess::qgis_run_algorithm()` should be printed (`TRUE`) or not (`FALSE`). Default value is `FALSE`.
##'
##' @details
##' ## Outputs description
##' * MOIST - outputRaster - Soil Moisture Deficit
##' * TABLE - outputVector - Simulation Output
##'
##'
##' @export
##' @md
##' @importFrom qgisprocess qgis_run_algorithm
sagang_topmodel <- function(ATANB = qgisprocess:::qgis_default_value(), MOIST = qgisprocess:::qgis_default_value(), WEATHER = qgisprocess:::qgis_default_value(), RECORD_P = qgisprocess:::qgis_default_value(), RECORD_ET = qgisprocess:::qgis_default_value(), RECORD_DATE = qgisprocess:::qgis_default_value(), TABLE = qgisprocess:::qgis_default_value(), DTIME = qgisprocess:::qgis_default_value(), NCLASSES = qgisprocess:::qgis_default_value(), P_QS0 = qgisprocess:::qgis_default_value(), P_LNTE = qgisprocess:::qgis_default_value(), P_MODEL = qgisprocess:::qgis_default_value(), P_SR0 = qgisprocess:::qgis_default_value(), P_SRZMAX = qgisprocess:::qgis_default_value(), P_SUZ_TD = qgisprocess:::qgis_default_value(), P_VCH = qgisprocess:::qgis_default_value(), P_VR = qgisprocess:::qgis_default_value(), P_K0 = qgisprocess:::qgis_default_value(), P_PSI = qgisprocess:::qgis_default_value(), P_DTHETA = qgisprocess:::qgis_default_value(), BINF = qgisprocess:::qgis_default_value(),..., .complete_output = .complete_output_option(), .quiet = .quiet_option(), .messages = .message_option()) {
check_algorithm_necessities("sagang:topmodel")
if (.messages){
output <- qgisprocess::qgis_run_algorithm("sagang:topmodel", `ATANB` = ATANB, `MOIST` = MOIST, `WEATHER` = WEATHER, `RECORD_P` = RECORD_P, `RECORD_ET` = RECORD_ET, `RECORD_DATE` = RECORD_DATE, `TABLE` = TABLE, `DTIME` = DTIME, `NCLASSES` = NCLASSES, `P_QS0` = P_QS0, `P_LNTE` = P_LNTE, `P_MODEL` = P_MODEL, `P_SR0` = P_SR0, `P_SRZMAX` = P_SRZMAX, `P_SUZ_TD` = P_SUZ_TD, `P_VCH` = P_VCH, `P_VR` = P_VR, `P_K0` = P_K0, `P_PSI` = P_PSI, `P_DTHETA` = P_DTHETA, `BINF` = BINF,..., .quiet = .quiet)
} else {
suppressMessages(
output <- qgisprocess::qgis_run_algorithm("sagang:topmodel", `ATANB` = ATANB, `MOIST` = MOIST, `WEATHER` = WEATHER, `RECORD_P` = RECORD_P, `RECORD_ET` = RECORD_ET, `RECORD_DATE` = RECORD_DATE, `TABLE` = TABLE, `DTIME` = DTIME, `NCLASSES` = NCLASSES, `P_QS0` = P_QS0, `P_LNTE` = P_LNTE, `P_MODEL` = P_MODEL, `P_SR0` = P_SR0, `P_SRZMAX` = P_SRZMAX, `P_SUZ_TD` = P_SUZ_TD, `P_VCH` = P_VCH, `P_VR` = P_VR, `P_K0` = P_K0, `P_PSI` = P_PSI, `P_DTHETA` = P_DTHETA, `BINF` = BINF,..., .quiet = .quiet)
)
}
if (.complete_output) {
return(output)
}
else{
qgisprocess::qgis_extract_output(output, "MOIST")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.