R/hydrology.R

Defines functions setup_hydrology_null Hydrology.null Hydrology

Documented in Hydrology Hydrology.null setup_hydrology_null

# Methods to set up variables describing exogenous forcing by hydrology

#' @title Set the values of exogenous variables describing hydrology
#' @description This method dispatches on the type of `pars$HYDROLOGY`.
#' @param t current simulation time
#' @param pars a [list]
#' @return [list]
#' @export
Hydrology <- function(t, pars) {
  UseMethod("Hydrology", pars$HYDROLOGY)
}

#' @title Set the values of exogenous variables describing hydrology
#' @description Implements [Hydrology] for the null model of hydrology (do nothing)
#' @inheritParams Hydrology
#' @return [list]
#' @export
Hydrology.null <- function(t, pars) {
  return(pars)
}

#' @title Make parameters for the null model for hydrology (do nothing)
#' @param pars a [list]
#' @return [list]
#' @export
setup_hydrology_null <- function(pars) {
  HYDROLOGY <- list()
  class(HYDROLOGY) <- 'null'
  pars$HYDROLOGY <- HYDROLOGY
  return(pars)
}
dd-harp/MicroMoB documentation built on June 6, 2024, 4:43 p.m.