mc_env_temp: Standardised myClim temperature variables

View source: R/env.R

mc_env_tempR Documentation

Standardised myClim temperature variables

Description

The wrapper function returning 7 standardised and ecologically relevant myClim variables derived from temperature measurements.

Usage

mc_env_temp(
  data,
  period,
  use_utc = TRUE,
  custom_start = NULL,
  custom_end = NULL,
  min_coverage = 1,
  gdd_t_base = 5,
  fdd_t_base = 0
)

Arguments

data

cleaned myClim object see myClim-package

period

output period see mc_agg()

use_utc

if FALSE, then local time is used for day aggregation see mc_agg() (default TRUE)

custom_start

start date for custom period see mc_agg() (default NULL)

custom_end

end date for custom period see mc_agg() (default NULL)

min_coverage

the threshold specifying how many missing values can you accept within aggregation period. see mc_agg() value from range 0-1 (default 1)

gdd_t_base

base temperature for Growing Degree Days mc_calc_gdd() (default 5)

fdd_t_base

base temperature for Freezing Degree Days mc_calc_fdd() (default 0)

Details

This function was designed for time-series of step shorter than one day and will not work with coarser data. It automatically use all available sensors in myClim object and returns all possible variables based on sensor type and measurement height/depth. In contrast with other myClim functions returning myClim objects, this wrapper function returns long table. The mc_env_temp function first aggregates time-series to daily time-step and then aggregates to the final time-step set in period parameter. Because freezing and growing degree days are always aggregated with sum function, these two variables are not first aggregated to the daily time-steps. Variables are named based on sensor name, height, and function e.g., (T.air_15_cm.max95p, T.air_15_cm.drange)

Standardised myClim temperature variables:

  • min5p: Minimum temperature = 5th percentile of daily minimum temperatures

  • mean: Mean temperature = mean of daily mean temperatures

  • max95p: Maximum temperature = 95th percentile of daily maximum temperatures

  • drange: Temperature range = mean of daily temperature range (i.e., difference between daily minima and maxima)

  • GDD5: Growing degree days = sum of growing degree days above defined base temperature (default 5°C) gdd_t_base

  • FDD0: Freezing degree days = sum of freezing degree days bellow defined base temperature (default 0°C) fdd_t_base

  • frostdays: Frost days = number of days with frost (daily minimum < 0°C) fdd_t_base

Value

table in long format with standardised myClim variables

Examples

data <- mc_prep_crop(mc_data_example_clean, lubridate::ymd_h("2020-11-01 00"),
                     lubridate::ymd_h("2021-02-01 00"), end_included = FALSE)
mc_env_temp(data, "month")

myClim documentation built on Oct. 21, 2024, 5:07 p.m.