DynACof: The Dynamic Agroforestry Coffee Crop Model
This is a Julia version of the DynACof model. To get to the R version, please follow this link. DynACof is a process-based model that computes plot-scale Net Primary Productivity, carbon allocation, growth, yield, energy, and water balance of coffee plantations according to management, while accounting for spatial effects using metamodels from the 3D process-based MAESPA. The model also uses coffee bud and fruit cohorts for reproductive development to better represent fruit carbon demand distribution along the year.
To download DynACof, simply execute these lines of code in the REPL:
The package is tested routinely to pass all tests using Travis-CI (Linux + Mac) and AppVeyor (Windows).
This is a basic example using the parameters and meteorology from Vezy et al. (2019). First, you have to dowload the data from this Github repository.
Then, simply execute this line of code to run a simulation over the whole period:
using DynACof Sim, Meteo, Parameters= dynacof(input_path= "the_path_where_you_downloaded_the_data/DynACof.jl_inputs", file_name= (constants= "constants.jl",site="site.jl",meteo="meteorology.txt", soil="soil.jl",coffee="coffee.jl",tree="tree.jl"));
To use your own data, you have to tell DynACof where to find it using the
input_path argument, and what are the file names with the
argument. A separate Github repository is available for input files templates, and some help on how to proceed.
Example of a simulation without shade trees:
Sim, Meteo, Parameters= dynacof(input_path= "the_path_where_you_downloaded_the_data/DynACof.jl_inputs", file_name= (constants= "constants.jl",site="site.jl",meteo="meteorology.txt", soil="soil.jl",coffee="coffee.jl",tree=""));
The model first computes the shade tree, then the coffee and then the soil. So if you need to update the metamodels, please keep in mind that the state of soil of a given day is only accessible on the next day for the tree and the coffee, unless the code is updated too. The model is implemented like this for simplicity, based on the hypothesis that the soil has a rather slow dynamic compared to plants dynamics.
Code of conduct
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
The DynACof model was mainly developed thanks to the MACCAC project, which was funded by the french ANR (Agence Nationale de la Recherche). The authors were funded by CIRAD and INRA. The authors are grateful for the support of the Aquiares farm and the CATIE for the long-term coffee agroforestry trial, the SOERE F-ORE-T which is supported annually by Ecofor, Allenvi and the French national research infrastructure ANAEE-F; the CIRAD-IRD-SAFSE project (France) and the PCP platform of CATIE. CoffeeFlux observatory was supported and managed by CIRAD researchers. We are grateful to the staff from Costa-Rica, in particular Alvaro Barquero, Alejandra Barquero, Jenny Barquero, Alexis Perez, Guillermo Ramirez, Rafael Acuna, Manuel Jara, Alonso Barquero for their technical and field support.
The DynACof logo was made using LogoMakr.com
MACACC project ANR-13-AGRO-0005, Viabilité et Adaptation des Ecosystèmes Productifs, Territoires et Ressources face aux Changements Globaux AGROBIOSPHERE 2013 program
Centre de Coopération Internationale en Recherche Agronomique pour le Développement
Institut National de la Recherche Agronomique
Centro Agronómico Tropical de Investigación y Enseñanza