powered by
Creates a quadratic thermal tolerance curve of the form: width_param * (temp - optim_temp)^2 + max_a Negative values are *not* returned as 0 for speed of computation. You should check for this after.
thermal_curve_a(temp, optim_temp = 15, max_a = 1.4, width_param = 0.02)
The input temperature value.
The optimal temperature.
The maximum productivity parameter `a` from a Ricker model (or whatever the y-axis value is you want to return).
A parameter to control the width of the parabola. Smaller numbers make wider parabolas.
A productivity parameter given the location on a thermal tolerance curve.
# NOT RUN { x <- seq(5, 30, length.out = 200) plot(x, thermal_curve_a(x), ylab = "a", xlab = "Temperature", type = "l") # }
Run the code above in your browser using DataLab