R/uStar.R

Defines functions uStar

Documented in uStar

#' @title Calculates the water friction velocity, uStar
#' 
#' @description uStar is the water friction velocity due to wind stress at the lake surface,
#' it is calculated following the methods of Imberger (1985) as a function of
#' the shear stress of air (Fischer et al., 1979), drag coefficient for
#' momentum (Hicks, 1972), and a dimensionless constant (von Karman constant)
#' that decribes the logarithmic velocity profile at the air-water interface
#' 
#' 
#' @param wndSpeed a numeric vector of wind speed in m s-1
#' @param wndHeight a numeric vector of wind measurement height in m
#' @param averageEpiDense a numeric vector of epilimnion density in kg m-3
#' @return a numeric vector of uStar
#' @seealso \code{\link{ts.uStar}} \code{\link{layer.density}}
#' @references
#' 
#' Hicks, B.B., 1972. \emph{A procedure for the formulation of bulk transfer
#' coefficients over water bodies of different sizes}. Boundary-Layer
#' Meterology 3: 201-213.
#' 
#' Amorocho, J., DeVries, J.J., 1980. \emph{A new evaluation of the wind stress
#' coefficient over water surfaces}. Journal of Geophysical Research 85:
#' 433-442.
#' 
#' Fischer, H.B., List, E.J., Koh, R.C.Y., Imberger, J., Brooks, N.H., 1979.
#' \emph{Mixing in inland and coastal waters}. Academic Press.
#' 
#' Imberger, J., 1985. \emph{The diurnal mixed layer}. Limnology and
#' Oceanography 30: 737-770.
#' @keywords manip
#' @examples
#' 
#' 
#'   wndSpeed  <- c(5.1,6.3,6.3,5.2,7,7.2)
#'   wndHeight	<-	2
#'   averageEpiDense	<- c(14,15,14.2,13,12,12)
#' 
#'   cat('uStar for input vector is: ')
#'   cat(uStar(wndSpeed,wndHeight,averageEpiDense))
#' @export
uStar <- function(wndSpeed,wndHeight,averageEpiDense){
  
  # define constants
  rhoAir <- 1.2 # density of air
  vonK <- 0.4 # von Karman constant

  # -- calculate drag coefficient (from Hicks, 1972)
  Cd <- rep(0.0015, length(wndSpeed))
  Cd[wndSpeed < 5] <- 0.001

  # -- correct for wind measurement height if < 10 m (Amorocho and DeVries, 1980)
  if (wndHeight != 10){
    wndSpeed <- wndSpeed/(1-sqrt(Cd)/vonK*log(10/wndHeight))
  }
    
  # -- calculate shear stress of air (Fischer et al., 1979)
  tau <- Cd*rhoAir*wndSpeed^2
  
  # -- calculate uStar following Imberger (1985)
  uStar <- sqrt(tau/averageEpiDense)
  return(uStar)
}

Try the rLakeAnalyzer package in your browser

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

rLakeAnalyzer documentation built on March 18, 2018, 1:51 p.m.