-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnd_Report.Rmd
More file actions
132 lines (91 loc) · 9.71 KB
/
End_Report.Rmd
File metadata and controls
132 lines (91 loc) · 9.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
title: "Improving on SOC storage models "
author: "**Rick Venema & Bas Kasemir**"
date: "`r Sys.Date()`"
output:
pdf_document:
toc: False
number_sections: True
pandoc_args: [
"-V", "classoption=twocolumn"
]
header-includes:
- \usepackage{multicol}
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
\begin{abstract}
SOC storage models can give better insights in the amount of carbon in the soil. Existing models are not versatile. Existing models were changed to make them usable for further work with the models. Eventually a lot of the model could be simplified, there were however parts that could not be simplified. We used the model from Cardinael et al. 2018\cite{Cardinael18}. This model represents the SOC storage in the soil. The model was taken apart and the parts were examined to understand the code and what it does. The first idea was to add a nitrogen model to the code, this was however not possible due to the hard
\end{abstract}
***
# Introduction
Organic carbon in the soil is very important in good yield of products produced by the soil. A better understanding of organic carbon in the soil can give more insights in improving the yield of agricultural plots. Models for organic carbon storage exists, these models represent an existing agroforestry plot.
This paper extends the SOC (soil organic carbon) storage model by Cardinael et al. This model describes the flow of carbon in an agroforestry plot. The model of Cardinael et al 2018\cite{Cardinael18}. was however a hardcoded model. To be able to extend the model and use it for different locations, the model has to be improved on to be more versatile and more flexible. This can be done by rewriting big parts of the code and making tweaking parameters easier.
# Methods
## The model
The model is defined in the paper by Cardinael et al. (2018), this model follows a three pool model.
The fresh organic compound (FOC) difference can be found in formula \ref{eq:deltafoc}. This formula calculates the difference of FOC. This is calculated by using the input of carbon, given by $I_{t,z,d}$. This is calculated by adding all the imports from the different environmental inputs (Tree, Grass, and Crop).
\begin{equation} \label{eq:deltafoc}\
\begin{aligned}
\frac{\delta FOC_{t,z,d}}{\delta t} = I_{t,z,d} + \frac{\delta F_{AD}}{\delta z} + h * f_{2}* dec\_HSOC_{t,z,d} \\ + h *dec\_HSOC2_{tzd} - dec\_FOC_{t,z,d}
\end{aligned}
\end{equation}
The $\frac{\delta F_{AD}}{\delta z}$ parameter in formula \ref{eq:deltafoc} corresponds to the flux of carbon in the soil that is transported downwards. This flux is given by formula \ref{eq:FAD}.
\begin{equation} \label{eq:FAD}
F_{AD} = F_{A} + F_{D}
\end{equation}
In formula \ref{eq:FAD} the $F_{D}$ corresponds to Fick's law. This law is represented by formula \ref{eq:fick}.
\begin{equation} \label{eq:fick}
F_{D} = -D * \frac{\delta ^2 C}{\delta z^2}
\end{equation}
The $F_{A}$ parameter in \ref{eq:FAD} represents the advection. This represents the flow of C in the soil. This is given by formula \ref{eq:advec}
\begin{equation} \label{eq:advec}
F_{A} = A * C
\end{equation}
\begin{equation} \label{eq:deltahsoc1}
\frac{\delta HSOC1}{\delta t} = \frac{\delta F_{AD}}{\delta z} + h * f_{1} * dec\_FOC_{t,z,d} - dec\_HSOC1_{t,z,d}
\end{equation}
LORUM
\begin{equation} \label{eq:deltahsoc2}
\begin{aligned}
\frac{\delta HSOC2}{\delta t} = \frac{\delta F_{AD}}{\delta z} + h * (1-f_{1} * dec\_FOC_{t,z,d} \\ + h *(1-f_{2})*dec\_HSOC1_{t,z,d} - dec\_HSOC2_{t,z,d}
\end{aligned}
\end{equation}
## Understanding the model
The model was taken apart for better understanding of the code and its functions. The model was divided into several parts which each correspond to a parameter or group of parameters
wat gedaan met code
# Results
After looking carefully at the code, it has been divided into 4 parts. For each of these parts is described what it does and how it could be rewritten to make it less complex and less CPU intensive.
## Bulk density -BAS
The bulk density model is obtained from Cardinael et al., 2015 Geoderma \cite{CardinaelGeoderma} . In this model the measured values are expanded. This is done by a for loop that iterates over all the depths. The measured bulk density values are added to a new dataframe that already have the depths in it. for the measured values there is a if statement that kools if the iteration is at the depth of a measured bulk density. If so, the bulk denisty is added to the dataframe.
After adding the measured bulk densities to the corresponding depths in the dataframe, the bulk density for every other depth is interpolated. An if statement checks if the iteration is at a specifik depth and the interpolation is done using the r ```approx()``` function. This function contains several hardcoded parameters that are corresponding to a certain depth.
if statements
## Moyano et al. model | 340-553 -OOK BAS BLIJKBAAR
After looking at the model, the parameters were moved to a separate file, like the model by Moyano et al. 2012\cite{Moyano12}. This model was used to calculate the moist in the clay.
The Moyano et al. model starts with reading in a few comma seperated values (CSV) files. These files contain moisture respiration data, data description and function indexes. These values are stored in a dataframe that contains the description, the values and some statistics about these values. The values are splitted in subsets too. For the next step in the preparation the subsetted value is combined with one of the CSV files and the subsetted value matrix is deleted. The last step transforms a column of another CSV file to a practical scale and makes a subset of this matrix.
After these preparation steps, a number of calculations are made. These calcualtions give an indication of the capacity of the different soil types to retain water. Cardinael et al. added a function that analyzes the water holding capacity to the original model of Moyano et al. Cardinael et al. also uses their own SOC inputs, instead of letting the model calculate these data. This is done due the lack of enough datasets and to improve the runtime of the script.
## SOC stocks -BAS
The model for the SOC stocks is obtained from Cardinael et al., 2015 Geoderma\cite{CardinaelGeoderma}. This model initalizes some values, such as a matrix with values of the clay, and generates a sequence for the humufied layer. It also gets a value from the moyano model: the moist in the clay.
For each depth, the items in the sequence, the model calcualtes the moisture function. This is done for the control, the tree line and the inner row. if the moisture function is higher than 1. the moisture function is set to 1.
After this the Diameter at breast height (DBH) is calculated. Next, the yield values for the wheat in the controlgroup is set. For the other groups, the yield is calculated. After this calculation, some mortality parameters are set. These parameters are then used in the equotations to calculate the amount of carbon that is coming to the soil in a certain timespan. This input is calculated for the top layer of the soil aswell for the belowgrounds layers. The amount of carbon that is picked up by the tree's roots is also calculated.
## Roots profile -BAS
The model for the roots profile is obtained from another study: Cardinael et al. 2015 Plant and Soil \cite{CardinaelRoot}.
For the roots profile, at first there is created a matrix. This matrix contains the depths and the distances. For every depth and distance the amount of roots in the soil is calculated. This calcualtion is done three times: one for the amount of tree roots, one for the amount of crop roots and one for the amount of of grass under the tree line. In every calculation is included that ther may grow grass to a specified number of meters from the tree. This results in the following statement: if the distance is below the limit of where the grass grows, put the value to zero.
# Discussion
The model by Cardinael et al. 2018 \cite{Cardinael18} was a hard model to rewrite. This was eventually not done due to time issues.
conclusie van het verhaal, hoe was het goed uit te voeren?, waarom niet helemaal belicht, verschil.
# Conclusion
WAT NU VERDER
\begin{thebibliography}{9}
\bibitem{Cardinael18}
Cardinael, R., Guenet, B., Chevallier, T., Dupraz, C., Cozzi, T., and Chenu, C.: \textit{High organic imputs explain shallow and deep SOC storage in a long-term agroforestry system - combining experimental and modeling approaches}, Biogeosciences, 15, 297-317, https://di.org/10.5194/bg-15-297-2018, 2018.
\bibitem{CardinaelGeoderma}
Cardinael, Rémi & Chevallier, Tiphaine & Barthès, B & Saby, Nicolas & Parent, Théophile & Dupraz, Christian & Bernoux, Martial & Chenu, Claire. (2015). Impact of alley cropping agroforestry on stocks, forms and spatial distribution of soil organic carbon — A case study in a Mediterranean context. Geoderma. 259-260. 288-299. 10.1016/j.geoderma.2015.06.015.
\bibitem{CardinaelRoot}
Germon, Amandine & Cardinael, Rémi & Dupraz, Christian & Laclau, Jean-Paul & Jourdan, Christophe. (2015). Fine root lifespan depending on their diameter and soil depth. 10.13140/RG.2.1.3101.0967.
\bibitem{Soertaert10}
Soetaert, K., Petzoldt, T., and Woodrow Setzer, R.: \textit{Solving differential equations in R: package deSolve}, J. Stat. Softw., 33, 1-25, 2010.
\bibitem{Moyano12}
Moyano, F. E., Vasilyeva, N., Bouckaert, L., Cook, F., Craine, J., Curiel Yuste, J., Don, A., Epron, D., Formanek, P., Franzluebbers, A., Ilstedt, U., K?tterer, T., Orchard, V., Reichstein, M., Rey, A., Ruamps, L., Subke, J.-A., Thomsen, I. K., and Chenu, C.:\textit{ The moisture response of soil heterotrophic respiration: interaction with soil properties}, Biogeosciences, 9, 1173-1182, https://doi.org/10.5194/bg-9-1173-2012, 2012.
\end{thebibliography}