calc_7dadm: Calculate the 7DADM from hourly temperature data.

View source: R/calc_7dadm.R

calc_7dadmR Documentation

Calculate the 7DADM from hourly temperature data.

Description

Calculate the daily maximum and rolling seven day average of the daily maximums (7DADM) by date from hourly data. The rolling average result is right aligned and indexed to the last day of the seven day period. 'Daily Maximum Temperature' and '7DADM Temperature' are values added to the constituent column.

Usage

calc_7dadm(
  df,
  datetime_col = "datetime",
  sim_col = "sim",
  dis_col = "model_km",
  value_col = "value"
)

Arguments

df

The input data frame. df must have the following columns:

  • datetime (with datetime as POSIXct),

  • sim (with simulation name in character format),

  • model_km (as numeric),

  • value (numeric hourly stream temperature)

  These can be generated using the \code{\link{format_outputs}} function.
datetime_col

datetime column name. Default is 'datetime'.

sim_col

Simulation column name. Default is 'sim'.

dis_col

Distance column name. Default is 'model_km'.

value_col

Value column name. Default is 'value'.

Value

data frame with columns 'sim', 'datetime', 'date', value of dis_col, 'constituent', and 'value'.


DEQrmichie/heatsourcetools documentation built on Jan. 25, 2025, 2:31 p.m.