R/calcPhotic.R

Defines functions calcPhotic

Documented in calcPhotic

  #' Calculate Euphotic Depth
  #'
  #' Calculates euphotic depth from a Secchi disk measuremnt (meters) based on relationships between light attenuation (Kd), optical properties of water (F), and a measured Secchi depth (Zsd). Based on equations specified by Kirk (1994) and Koenings and Edmundson (1991).
  #'
  #' Kirk, J. T. O. (1994). Light and Photosynthesis in Aquatic Ecosystems. Cambridge University Press.
  #' Koenings, J. P., & Edmundson, J. A. (1991). Secchi disk and photometer estimates of light regimes in Alaskan lakes: Effects of yellow color and turbidity. Limnology and Oceanography, 36(1), 91–105. https://doi.org/10.4319/lo.1991.36.1.0091
  #'
  #' @param F numerical constant that accounts for optical properties of water, default = 1.99
  #' @details
    #' We recommend finding a value from the literature that most accurately reflects the water quality of the study system, but values for generalized conditions are included from Koenings and Edmundson (1991).
    #' F = 2.76 for stained lakes
    #' F = 1.99 for clear lakes
    #' F = 1.05 for turbid lakes
    #'
  #' @param Z numeric value for measured Secchi disk depth in meters
  #' @author Tristan Blechinger, Department of Zoology & Physiology, University of Wyoming
  #' @export
  #' @examples
    #' calcPhotic(Z = 4, F = 1.99)

calcPhotic <- function(Z, F = 1.99) {

   if(!is.numeric(Z) || is.na(F))
    stop("Input values must be numeric")
  if(Z == 0 || F == 0)
    stop("Input values cannot be zero")

  Kd = F/Z
  Deu = 4.605/Kd

  return(Deu)
}

Try the rLakeHabitat package in your browser

Any scripts or data that you put into this service are public.

rLakeHabitat documentation built on March 28, 2026, 1:06 a.m.