stratificationperiod: Lake Stratification Periods

View source: R/stratificationperiod.R

stratificationperiodR Documentation

Lake Stratification Periods

Description

This function calculates the start and end of lake thermal stratification using daily lake temperature profile data (This will only work on data collected at or summarized to a daily scale). In this calculation, a lake is considered stratified when there is a difference of one degree C between one meter depth intervals anywhere within the water column.

Usage

stratificationperiod(
  tempdata,
  datedata,
  depthdata,
  tablestructure = "tall",
  consecutivedays = 10
)

Arguments

tempdata

a vector of temperature values

datedata

a vector of dates associated with the temperature values

depthdata

a vector of depths associated with the temperature values

tablestructure

determines if the output table should be in a "tall" or "wide" format. If "tall" the table will include "year", "date", "event", and "cons_days" (consecutive days) fields. If "wide" the table will include "year", "start_date", "end_date", and "cons_days" fields.

consecutivedays

the number of consecutive days of uninterrupted stratification required to consider the lake stratified for the season. A value of 0 will give all days the lake is stratified. Default is 10 days.

Value

a data.frame indicating the start and end dates of thermal lake stratification. If table structure is tall, stratification "events" include "S" - start, "E" - end, and "SE" - stratification started and ended on the same day.

Examples

## Not run: 
x <-stratificationperiod(
      tempdata = temperaturedata$mean_temp,
      datedata = temperaturedata$date,
      depthdata = temperaturedata$depth,
      tablestructure = "wide",
      consecutivedays = 15
      )

## End(Not run)

mnsentinellakes/mnsentinellakes documentation built on May 4, 2024, 7:48 p.m.