getStumpStats: getStumpStats

View source: R/getStumpStats.R

getStumpStatsR Documentation

getStumpStats

Description

Calculate Stump Temperature Statistics. This function calculates various statistics related to stump temperature, such as mean temperatures, dispersal days, emergence days, and overwintering days.

Usage

getStumpStats(
  nd,
  temp,
  maxtemp,
  day,
  year,
  firstdisp,
  lastdisp,
  firstemrg,
  firstow,
  noow,
  cold,
  params,
  cumcold,
  i
)

Arguments

nd

A single numeric value representing the number of days.

temp

A numeric vector of length 'nd' containing daily temperature data.

maxtemp

A numeric vector of length 'nd' containing daily maximum temperature data.

day

A numeric vector of length 'nd' containing the day of the year for each day.

year

A numeric vector of length 'nd' containing the year for each day .

firstdisp

A single numeric value representing the mean first dispersal day, updated during each iteration.

lastdisp

A single numeric value representing the mean last dispersal day, updated during each iteration.

firstemrg

A single numeric value representing the mean first emergence day, updated during each iteration.

firstow

A single numeric value representing the mean first overwintering day, updated during each iteration.

noow

A single numeric value representing the number of years with no overwintering, updated during each iteration.

cold

A numeric vector of length 'nd' containing cold-related information for each day.

params

A list containing various model parameters, such as threshold temperatures and time limits.

cumcold

A numeric vector of length 'nd' containing cumulative cold-related information for each day.

i

A single numeric value representing the current iteration of the outer loop.

Value

A list containing updated values for various stump temperature statistics, including:

  • Site mean temperature.

  • Cumulative cold-related information.

  • Cold day count (ccd).

  • Cold week count (cwd).

  • Mean first and last dispersal days.

  • Mean first emergence day.

  • Year, day, and cumulative cold information for calculating overwintering days.

  • Temporary date variable for overwintering calculations.

  • Number of years with no overwintering.

  • Mean first overwintering day.


Alessandra23/pineR documentation built on Aug. 26, 2023, 8 a.m.