fitaci {plantecophys} | R Documentation |
Fit the Farquhar-Berry-von Caemmerer model of leaf photosynthesis
Description
Fits the Farquhar-Berry-von Caemmerer model of photosynthesis to measurements of
photosynthesis and intercellular CO_2
concentration (Ci). Estimates Jmax, Vcmax, Rd
and their standard errors. A simple plotting method is also included, as well as the function
fitacis
which quickly fits multiple A-Ci curves (see its help page). Temperature
dependencies of the parameters are taken into account following Medlyn et al. (2002), see
Photosyn
for more details.
Usage
fitaci(
data,
varnames = list(ALEAF = "Photo", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PARi", Rd =
"Rd"),
Tcorrect = TRUE,
Patm = 100,
citransition = NULL,
quiet = FALSE,
startValgrid = TRUE,
fitmethod = c("default", "bilinear", "onepoint"),
algorithm = "default",
fitTPU = FALSE,
alphag = 0,
useRd = FALSE,
PPFD = NULL,
Tleaf = NULL,
alpha = 0.24,
theta = 0.85,
gmeso = NULL,
EaV = 82620.87,
EdVC = 0,
delsC = 645.1013,
EaJ = 39676.89,
EdVJ = 2e+05,
delsJ = 641.3615,
GammaStar = NULL,
Km = NULL,
id = NULL,
...
)
## S3 method for class 'acifit'
plot(
x,
what = c("data", "model", "none"),
xlim = NULL,
ylim = NULL,
whichA = c("Ac", "Aj", "Amin", "Ap"),
add = FALSE,
pch = 19,
addzeroline = TRUE,
addlegend = !add,
legendbty = "o",
transitionpoint = TRUE,
linecols = c("black", "blue", "red"),
lwd = c(1, 2),
lty = 1,
...
)
Arguments
data |
Dataframe with Ci, Photo, Tleaf, PPFD (the last two are optional). For |
varnames |
List of names of variables in the dataset (see Details). |
Tcorrect |
If TRUE, Vcmax and Jmax are corrected to 25C. Otherwise, Vcmax and Jmax are estimated at measurement temperature. Warning : since package version 1.4, the default parameters have been adjusted (see Details). |
Patm |
Atmospheric pressure (kPa) |
citransition |
If provided, fits the Vcmax and Jmax limited regions separately (see Details). |
quiet |
If TRUE, no messages are written to the screen. |
startValgrid |
If TRUE (the default), uses a fine grid of starting values to increase the chance of finding a solution. |
fitmethod |
Method to fit the A-Ci curve. Either 'default' (Duursma 2015), 'bilinear' (See Details), or 'onepoint' (De Kauwe et al. 2016). |
algorithm |
Passed to |
fitTPU |
Logical (default FALSE). Attempt to fit TPU limitation (fitmethod set to 'bilinear' automatically if used). See Details. |
alphag |
When estimating TPU limitation (with |
useRd |
If Rd provided in data, and useRd=TRUE (default is FALSE), uses measured Rd in fit. Otherwise it is estimated from the fit to the A-Ci curve. |
PPFD |
Photosynthetic photon flux density ('PAR') (mu mol m-2 s-1) |
Tleaf |
Leaf temperature (degrees C) |
alpha |
Quantum yield of electron transport (mol mol-1) |
theta |
Shape of light response curve. |
gmeso |
Mesophyll conductance (mol m-2 s-1 bar-1). If not NULL (the default), Vcmax and Jmax are chloroplastic rates. |
EaV , EdVC , delsC |
Vcmax temperature response parameters |
EaJ , EdVJ , delsJ |
Jmax temperature response parameters |
Km , GammaStar |
Optionally, provide Michaelis-Menten coefficient for Farquhar model, and Gammastar. If not provided, they are calculated with a built-in function of leaf temperature. |
id |
Names of variables (quoted, can be a vector) in the original dataset to be stored
in the result. Most useful when using |
... |
Further arguments (ignored at the moment). |
x |
For plot.acifit, an object returned by |
what |
The default is to plot both the data and the model fit, or specify 'data' or 'model' to plot one of them, or 'none' for neither (only the plot region is set up) |
xlim |
Limits for the X axis, if left blank estimated from data |
ylim |
Limits for the Y axis, if left blank estimated from data |
whichA |
By default all photosynthetic rates are plotted (Aj=Jmax-limited (blue), Ac=Vcmax-limited (red), Hyperbolic minimum (black)), TPU-limited rate (Ap, if estimated in the fit). Or, specify one or two of them. |
add |
If TRUE, adds to the current plot |
pch |
The plotting symbol for the data |
addzeroline |
If TRUE, the default, adds a dashed line at y=0 |
addlegend |
If TRUE, adds a legend (by default does not add a legend if add=TRUE) |
legendbty |
Box type for the legend, passed to argument bty in |
transitionpoint |
For plot.acifit, whether to plot a symbol at the transition point. |
linecols |
Vector of three colours for the lines (limiting rate, Ac, Aj), if one value provided it is used for all three. |
lwd |
Line widths, can be a vector of length 2 (first element for Ac and Aj, second one for the limiting rate). |
lty |
Line type (only for Amin - the limiting rate). |
Details
Fitting method
The default method to fit A-Ci curves (set by
fitmethod="default"
) uses non-linear regression to fit the A-Ci curve. No assumptions
are made on which part of the curve is Vcmax or Jmax limited. Normally, all three parameters
are estimated: Jmax, Vcmax and Rd, unless Rd is provided as measured (when useRd=TRUE
,
and Rd is contained in the data). This is the method as described by Duursma (2015, Plos One).
The 'bilinear' method to fit A-Ci curves (set by fitmethod="bilinear"
) linearizes
the Vcmax and Jmax-limited regions, and applies linear regression twice to estimate first
Vcmax and Rd, and then Jmax (using Rd estimated from the Vcmax-limited region). The transition
point is found as the one which gives the best overall fit to the data (i.e. all possible
transitions are tried out, similar to Gu et al. 2010, PCE). The advantage of this method is that
it always returns parameter estimates, so it should be used in cases where the default
method fails. Be aware, though, that the default method fails mostly when the curve contains
bad data (so check your data before believing the fitted parameters).
When citransition
is set, it splits the data into a Vcmax-limited (where Ci < citransition),
and Jmax-limited region (Ci > citransition). Both parameters are then estimated separately for
each region (Rd is estimated only for the Vcmax-limited region). Note that the actual
transition point as shown in the standard plot of the fitted A-Ci curve may be quite different
from that provided, since the fitting method simply decides which part of the dataset to use
for which limitation, it does not constrain the actual estimated transition point directly.
See the example below. If fitmethod="default"
, it applies non-linear regression to
both parts of the data, and when fitmethod="bilinear", it uses linear regression on the
linearized photosynthesis rate. Results will differ between the two methods (slightly).
The 'onepoint' fitting method is a very simple estimation of Vcmax and Jmax for every point
in the dataset, simply by inverting the photosynthesis equation. See De Kauwe et al. (2016)
for details. The output will give the original data with Vcmax and Jmax added (note you can
set Tcorrect
as usual!). For increased reliability, this method only works if
dark respiration (Rd) is included in the data (useRd
is set automatically when
setting fitmethod='one-point'
). This method is not recommended for full A-Ci curves,
but rather for spot gas exchange measurements, when a simple estimate of Vcmax or Jmax
is needed, for example when separating stomatal and non-stomatal drought effects on
photosynthesis (Zhou et al. 2013, AgForMet). The user will have to decide whether the Vcmax
or Jmax rates are used in further analyses. This fitting method can not be used in fitacis
,
because Vcmax and Jmax are already estimated for each point in the dataset.
TPU limitation
Optionally, the fitaci
function estimates the triose-phosphate
utilization (TPU) rate. The TPU can act as another limitation on photosynthesis, and can be
recognized by a 'flattening out' of the A-Ci curve at high Ci. When fitTPU=TRUE
, the
fitting method used will always be 'bilinear'. The TPU is estimated by trying out whether the
fit improves when the last n points of the curve are TPU-limited (where n=1,2,...). When TPU is
estimated, it is possible (though rare) that no points are Jmax-limited (in which case estimated
Jmax will be NA). A minimum of two points is always reserved for the estimate of Vcmax and Rd.
An additional parameter (alphag
) can be set that affects the behaviour at high Ci (see
Ellsworth et al. 2015 for details, and also Photosyn
). See examples.
Temperature correction
When Tcorrect=TRUE
(the default), Jmax and Vcmax
are re-scaled to 25C, using the temperature response parameters provided (but Rd is always
at measurement temperature). When Tcorrect=FALSE
, estimates of all parameters are at
measurement temperature. If TPU is fit, it is never corrected for temperature. Important
parameters to the fit are GammaStar and Km, both of which are calculated from leaf temperature
using standard formulations. Alternatively, they can be provided as known inputs. Warning :
since package version 1.4, the default parameters have been adjusted. The new parameter values
(EaV, EdVJ, delSJ, etc.) were based on a comprehensive literature review. See
vignette("new_T_responses")
or the article on remkoduursma.github.io/plantecophys.
Mesophyll conductance
It is possible to provide an estimate of the mesophyll
conductance as input (gmeso
), in which case the fitted Vcmax and Jmax are to be interpreted
as chloroplastic rates. When using gmeso, it is recommended to use the 'default' fitting
method (which will use the Ethier&Livingston equations inside Photosyn
). It is also
implemented with the 'bilinear' method but it requires more testing (and seems to give
some strange results). When gmeso is set to a relatively low value, the resulting fit
may be quite strange.
Other parameters
The A-Ci curve parameters depend on the values of a number
of other parameters. For Jmax, PPFD is needed in order to express it as the asymptote. If
PPFD is not provided in the dataset, it is assumed to equal 1800 mu mol m-2 s-1 (in which
case a warning is printed). It is possible to either provide PPFD as a variable in the
dataset (with the default name 'PARi', which can be changed), or as an argument to
the fitaci
directly.
Plotting and summarizing
The default plot of the fit is constructed
with plot.acifit
, see Examples below. When plotting the fit, the A-Ci curve
is simulated using the Aci
function, with leaf temperature (Tleaf) and PPFD
set to the mean value for the dataset. The coefficients estimated in the fit
(Vcmax, Jmax, and usually Rd) are extracted with coef
. The summary of the fit is
the same as the 'print' method, that is myfit
will give the same output as
summary(myfit)
(where myfit
is an object returned by fitaci
).
Because fitaci returns the fitted nls
object, more details on statistics of
the fit can be extracted with standard tools. The Examples below shows the use of the
nlstools to extract many details of the fit at once. The fit also includes the
root mean squared error (RMSE), which can be extracted as myfit$RMSE
. This
is a useful metric to compare the different fitting methods.
Predicting and the CO2 compensation point
The fitted object contains two functions
that reproduce the fitted curve exactly. Suppose your object is called 'myfit', then
myfit$Photosyn(200)
will give the fitted rate of photosynthesis at a Ci of 200.
The inverse, calculating the Ci where some rate of photosynthesis is achieved, can be done with
myfit$Ci(10)
(find the Ci where net photosynthesis is ten). The (fitted!) CO2
compensation point can then be calculated with : myfit$Ci(0)
.
Atmospheric pressure correction
Note that atmospheric pressure (Patm) is taken into account, assuming the original data are in molar units (Ci in mu mol mol-1, or ppm). During the fit, Ci is converted to mu bar, and Km and Gammastar are recalculated accounting for the effects of Patm on the partial pressure of oxygen. When plotting the fit, though, molar units are shown on the X-axis. Thus, you should get (nearly) the same fitted curve when Patm was set to a value lower than 100kPa, but the fitted Vcmax and Jmax will be higher. This is because at low Patm, photosynthetic capacity has to be higher to achieve the same measured photosynthesis rate.
Value
A list of class 'acifit', with the following components:
- df
A dataframe with the original data, including the measured photosynthetic rate (Ameas), the fitted photosynthetic rate (Amodel), Jmax and Vcmax-limited gross rates (Aj, Ac), TPU-limited rate (Ap), dark respiration (Rd), leaf temperature (Tleaf), chloroplastic CO2 (Cc), PPFD, atmospheric pressure (Patm), and 'original Ci, i.e. the Ci used as input (which is different from the Ci used in fitting if Patm was not set to 100kPa)
- pars
Contains the parameter estimates and their approximate standard errors
- nlsfit
The object returned by
nls
, and contains more detail on the quality of the fit- Tcorrect
whether the temperature correction was applied (logical)
- Photosyn
A copy of the
Photosyn
function with the arguments adjusted for the current fit. That is, Vcmax, Jmax and Rd are set to those estimated in the fit, and Tleaf and PPFD are set to the mean value in the dataset. All other parameters that were set in fitaci are also used (e.g. temperature dependency parameters, TPU, etc.).- Ci
As Photosyn, except the opposite: calculate the Ci where some rate of net photosynthesis is achieved.
- Ci_transition
The Ci at which photosynthesis transitions from Vcmax to Jmax limited photosynthesis.
- Ci_transition2
The Ci at which photosynthesis transitions from Jmax to TPU limitation. Set to NA is either TPU was not estimated, or it could not be estimated from the data.
- Rd_measured
Logical - was Rd provided as measured input?
- GammaStar
The value for GammaStar, either calculated or provided to the fit.
- Km
he value for Km, either calculated or provided to the fit.
- kminput
Was Km provided as input? (If FALSE, it was calculated from Tleaf)
- gstarinput
Was GammaStar provided as input? (If FALSE, it was calculated from Tleaf)
- fitmethod
The fitmethod uses, either default or bilinear
- citransition
The input citransition (NA if it was not provided as input)
- gmeso
The mesophyll conductance used in the fit (NA if it was not set)
- fitTPU
Was TPU fit?
- alphag
The value of alphag used in estimating TPU.
- RMSE
The Root-mean squared error, calculated as
sqrt(sum((Ameas-Amodel)^2))
.- runorder
The data returned in the 'df' slot are ordered by Ci, but in rare cases the original order of the data contains information; 'runorder' is the order in which the data were provided.
References
Duursma, R.A., 2015. Plantecophys - An R Package for Analysing and Modelling Leaf Gas Exchange Data. PLoS ONE 10, e0143346. doi:10.1371/journal.pone.0143346
De Kauwe, M. G. et al. 2016. A test of the 'one-point method' for estimating maximum carboxylation capacity from field-measured, light-saturated photosynthesis. New Phytol 210, 1130-1144.
Examples
## Not run:
# Fit an A-Ci curve on a dataframe that contains Ci, Photo and optionally Tleaf and PPFD.
# Here, we use the built-in example dataset 'acidata1'.
f <- fitaci(acidata1)
# Note that the default behaviour is to correct Vcmax and Jmax for temperature,
# so the estimated values are at 25C. To turn this off:
f2 <- fitaci(acidata1, Tcorrect=FALSE)
# To use different T response parameters (see ?Photosyn),
f3 <- fitaci(acidata1, Tcorrect=TRUE, EaV=25000)
# Make a standard plot
plot(f)
# Look at a summary of the fit
summary(f)
# Extract coefficients only
coef(f)
# The object 'f' also contains the original data with predictions.
# Here, Amodel are the modelled (fitted) values, Ameas are the measured values.
with(f$df, plot(Amodel, Ameas))
abline(0,1)
# The fitted values can also be extracted with the fitted() function:
fitted(f)
# The non-linear regression (nls) fit is stored as well,
summary(f$nlsfit)
# Many more details can be extracted with the nlstools package
library(nlstools)
overview(f$nlsfit)
# The curve generator is stored as f$Photosyn:
# Calculate photosynthesis at some value for Ci, using estimated
# parameters and mean Tleaf, PPFD for the dataset.
f$Photosyn(Ci=820)
# Photosynthetic rate at the transition point:
f$Photosyn(Ci=f$Ci_transition)$ALEAF
# Set the transition point; this will fit Vcmax and Jmax separately. Note that the *actual*
# transition is quite different from that provided, this is perfectly fine :
# in this case Jmax is estimated from the latter 3 points only (Ci>800), but the actual
# transition point is at ca. 400ppm.
g <- fitaci(acidata1, citransition=800)
plot(g)
g$Ci_transition
# Use measured Rd instead of estimating it from the A-Ci curve.
# The Rd measurement must be added to the dataset used in fitting,
# and you must set useRd=TRUE.
acidata1$Rd <- 2
f2 <- fitaci(acidata1, useRd=TRUE)
f2
# Fit TPU limitation
ftpu <- fitaci(acidata1, fitTPU=TRUE, PPFD=1800, Tcorrect=TRUE)
plot(ftpu)
## End(Not run)