module3: module3

View source: R/module3.R

module3R Documentation

module3

Description

Module 3: Calculate Adult Emergence and Overwintering. This function calculates the emergence times and overwintering status of the pine weevil.

Usage

module3(
  npop,
  params,
  stump_temp,
  today,
  prep,
  start,
  stagepp,
  stagepl,
  owr,
  emerge,
  i,
  j,
  gemtime,
  gemtime_new,
  gemwinter,
  gemmonth,
  year,
  gstyear,
  month,
  t0,
  rweevil
)

Arguments

npop

A single numeric value representing the population size.

params

A list containing various model parameters, such as degree days for emergence and overwintering.

stump_temp

A list containing stump temperature and cold data.

today

A single numeric value representing the current day.

prep

A numeric vector of length 'npop' containing the pre-pupal development times for each individual.

start

A single numeric value representing the starting day of the time series.

stagepp

A numeric vector of length 'npop' containing the pre-pupal stage duration for each individual.

stagepl

A numeric vector of length 'npop' containing the pupal stage duration for each individual.

owr

A logical vector of length 'npop' containing the overwintering status for each individual.

emerge

A numeric vector of length 'npop' containing the emergence times for each individual.

i

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

j

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

gemtime

A numeric vector of length 'npop' containing the emergence times relative to the initial time (t0) for each individual.

gemtime_new

A numeric vector of length 'npop' containing the new emergence times for each individual.

gemwinter

A numeric vector of length 'npop' containing the number of winters passed before emergence for each individual.

gemmonth

A numeric vector of length 'npop' containing the month of emergence for each individual.

year

A numeric vector containing the year for each day.

gstyear

A numeric vector of length 'npop' containing the generation start year for each individual.

month

A numeric vector containing the month for each day.

t0

A numeric vector of length 'npop' containing the initial time for each individual.

rweevil

A numeric vector of length 'npop' containing the re-emergence status for overwintering individuals.

Value

A list containing updated values for various insect development times and overwintering status, including:

  • Current day (today).

  • Re-emergence status for overwintering individuals (rweevil).

  • Emergence times relative to the initial time (t0) for each individual (gemtime).

  • Number of winters passed before emergence for each individual (gemwinter).

  • Month of emergence for each individual (gemmonth).

  • Emergence times for each individual (emerge).


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