PhenoFlex: PhenoFlex

View source: R/RcppExports.R

PhenoFlexR Documentation

PhenoFlex

Description

Combined model of the dynamic model for chill accumulation and the GDH model

Usage

PhenoFlex(
  temp,
  times,
  A0 = 6319.5,
  A1 = 5.939917e+13,
  E0 = 3372.8,
  E1 = 9900.3,
  slope = 1.6,
  Tf = 4,
  s1 = 0.5,
  Tu = 25,
  Tb = 4,
  Tc = 36,
  yc = 40,
  Delta = 4,
  Imodel = 0L,
  zc = 190,
  stopatzc = TRUE,
  deg_celsius = TRUE,
  basic_output = TRUE
)

Arguments

temp

Vector of temperatures.

times

numeric vector. Optional times at which the temperatures where measured, if not given, hourly temperatures will be assumed

A0

numeric. Parameter A_0 of the dynamic model

A1

numeric. Parameter A_1 of the dynamic model

E0

numeric. Parameter E_0 of the dynamic model

E1

numeric. Parameter E_1 of the dynamic model

slope

numeric. Slope parameter for sigmoidal function

Tf

numeric. Transition temperature (in degree Kelvin) for the sigmoidal function

s1

numeric. Slope of transition from chill to heat accumulation

Tu

numeric. GDH optimal temperature

Tb

numeric. GDH base temperature (lower threshold)

Tc

numeric. GDH upper temperature (upper threshold)

yc

numeric. Critical value defining end of chill accumulation

Delta

numeric. Width of Gaussian heat accumulation model

Imodel

integer. Heat accumulation model: 0 for GDH and 1 for Gaussian

zc

numeric. Critical value of z determining the end of heat accumulation

stopatzc

boolean. If 'TRUE', the PhenoFlex is applied until the end of the temperature series. Default is to stop once the value zc has been reached.

deg_celsius

boolean. whether or not the temperature vector and the model temperature parameters are in degree Celsius (Kelvin otherwise)

basic_output

boolean. If 'TRUE', only the bloomindex is returned as a named element of the return list.

Value

A list is returned with named element 'bloomindex', which is the index at which blooming occurs. When 'basic_output=FALSE' also 'x', 'y', 'z' and 'xs' are returned as named element of this list, which are numeric vectors of the same length as the input vector 'temp' containing the hourly temperatures.

Author(s)

Carsten Urbach <urbach@hiskp.uni-bonn.de>

Examples

data(KA_weather)
hourtemps <- stack_hourly_temps(KA_weather, latitude=50.4)
iSeason <- genSeason(hourtemps, years=c(2009))
zc <- 190
yc <- 40
x <- PhenoFlex(temp=hourtemps$hourtemps$Temp[iSeason[[1]]],
               times=c(1: length(hourtemps$hourtemps$Temp[iSeason[[1]]])),
               zc=zc, stopatzc=TRUE, yc=yc, basic_output=FALSE)
DBreakDay <- x$bloomindex
ii <- c(1:DBreakDay)
plot(x=ii, y=x$z[ii], xlab="Hour Index", ylab="z", col="red", type="l")
abline(h=zc, lty=2)
plot(x=ii, y=x$y[ii], xlab="Hour Index", ylab="y", col="red", type="l")
abline(h=yc, lty=2)

chillR documentation built on Nov. 28, 2023, 1:09 a.m.