\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\usepackage{authblk}
\usepackage{hyperref}

%\VignetteIndexEntry{Root system architecture}
%\VignettePackage{medfate}

\title{Root system architecture}
\author[1,2]{Miquel De Cáceres}
\affil[1]{Centre Tecnològic Forestal de Catalunya. Ctra. St. Llorenç de Morunys km 2, 25280, Solsona, Catalonia, Spain}
\affil[2]{CREAF, Cerdanyola del Vallès, 08193, Spain}

\begin{document}
\SweaveOpts{concordance=TRUE}

\maketitle
\tableofcontents

<<echo=FALSE>>=
options(width=67)
library(medfate)
@
\section{Introduction}

\subsection{Soil description}
The soil of the stand is described using three layers (topsoil: 0 – 30 cm; subsoil: from 30 cm to soil depth ($Z_{soil}$); rocky layer: from soil depth to a maximum depth $Z_{rocksoil}$). Soil texture (i.e. percent of sand, silt and clay), bulk density and rock fragment content can differ between soil layers. Specifying a rocky layer is important because Mediterranean plants may extend their roots into cracks existing in the parent rock (Ruffault et al., 2013). The soil depth attribute ($Z_{soil}$) refers to the sum of topsoil and subsoil layers (thus, subsoil may not exist in very shallow soils). 
\subsection{LDR root system}
The rooting system of each cohort $i$ (i.e. the proportions $v_{ij}$) can obtained assuming conic distribution of fine roots where the only parameter is rooting depth. Alternatively, one can adopt the linear dose response model (Collins and Bras, 2007; Schenk and Jackson, 2002): 
\begin{equation}
Y_i(z)=\frac{1}{1+(z/Z_{50,i})^{c_i}}
\end{equation}
where $Y_i(z)$ is the cumulative fraction of fine root mass located between surface and depth $z$; $Z_{50,i}$ is the depth above which 50\% of the root mass is located; and $c_i$ is a shape parameter related to $Z_{50,i}$ and $Z_{95,i}$ as $c_i  = 2.94 / \ln(Z_{50,i} / Z_{95,i})$. 

\begin{center}
<<fig=TRUE, width=4, height=4, echo=FALSE>>==
P = root.ldrProfile(c(100,500), c(200,1500), rep(50,31))
matplot(x=t(P), y=seq(0,1500, by=50), type="l", xlim=c(0,0.5), ylim=c(1500,0), ylab = "Depth (mm)", 
        xlab="Root density")
legend("bottomright", legend=c("Z50 = 100, Z95 = 200", 
       "Z50 = 200, Z95 = 1500"), col=c("black","red"), lty=1:2, bty="n")
@
\end{center}
\begin{center}
\emph{Fig. 1}: Two examples of root density profile according to the linear dose response model
\end{center}

The depth of soil layers and the linear dose response model is used to determine $v_{i,s}$, the proportion of plant fine roots of cohort $i$ that are in a given soil layer $s$. The minor fraction of mass located below soil depth is redistributed within the existing layers and the proportion of roots in each soil layer is assumed proportional to the amount of water extracted from it. All vegetation variables except $LAI$ (for deciduous species) are assumed to stay constant during water balance simulations.


\section{References}
\begin{itemize}
\item{Collins, D.B.G., Bras, R.L., 2007. Plant rooting strategies in water-limited ecosystems. Water Resour. Res. 43, W06407. doi:10.1029/2006WR005541}

\item{Schenk, H., Jackson, R., 2002. The global biogeography of roots. Ecol. Monogr. 72, 311–328.}
\end{itemize}

\end{document}