A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

DynACof

Process-based model computes plot-scale Net Primary Productivity, carbon allocation, growth, yield, energy, and water balance of coffee plantations according to management.
https://github.com/VEZY/DynACof

Category: Consumption
Sub Category: Agriculture and Nutrition

Last synced: about 20 hours ago
JSON representation

Repository metadata

The Dynamic Agroforestry Coffee Crop Model

https://github.com/VEZY/DynACof/blob/master/

          


# [DynACof](https://vezy.github.io/DynACof): The Dynamic Agroforestry Coffee Crop Model 



[![Project Status: Active – The project has reached a stable, usable
state and is being actively
developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![R-CMD-check](https://github.com/VEZY/DynACof/workflows/R-CMD-check/badge.svg)](https://github.com/VEZY/DynACof/actions)
[![Join the chat at
https://gitter.im/DynACof/Lobby\#](https://badges.gitter.im/DynACof/Lobby.svg?token=1d2e733532f5122f05de&branch=master)](https://gitter.im/DynACof/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![License: GPL
v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1256816.svg)](https://doi.org/10.5281/zenodo.1256816)


## Overview

The [DynACof](https://vezy.github.io/DynACof) process-based model
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](https://maespa.github.io/). The model also
uses coffee bud and fruit cohorts for reproductive development to better
represent fruit carbon demand distribution along the year.

A research article presenting and evaluating the model is published in
Vezy et al. (2020). The official website is available
[here](https://vezy.github.io/DynACof).

DynACof is also available as a [Julia](https://julialang.org/) package.
Use this one for better performance (\~100x). Its repository is
available [here](https://github.com/VEZY/DynACof.jl), and the
documentation is available
[here](https://vezy.github.io/DynACof.jl/dev/). The Julia version is
also available from the R package. See [the
vignette](https://vezy.github.io/DynACof/articles/julia-version.html)
for more details. Note that the input parameter files are different from
the R-version. They are accessible in the
[DynACof.jl\_inputs](https://github.com/VEZY/DynACof.jl_inputs)
repository.

## Installation

The development version from [GitHub](https://github.com/) can be
installed with:

``` r
# install.packages("devtools")
devtools::install_github("VEZY/DynACof")
```

Or using the lightweight
[remotes](https://github.com/r-lib/remotes#readme) package:

``` r
# install.packages("remotes")
remotes::install_github("VEZY/DynACof")
```

The package is tested routinely to pass all
[CRAN](https://CRAN.R-project.org) tests using Travis-CI (linux) and
AppVeyor (Windows), but is not released to the CRAN servers because we
believe DynACof users are not widespread enough to bother CRAN people
and use their free server time.

## Example

This is a basic example using all defaults (parameters and meteorology)
over 2 years :

``` r
rm(list = ls())
library("DynACof")
Sys.setenv(TZ="UTC")
DynACof(Period= as.POSIXct(c("1979-01-01", "1980-12-31")))
```

To use your own data, you have to tell DynACof where to find it using
`Inpath` parameter, and what are the file names with the `FileName`
parameter list. A separate [Github
repository](https://github.com/VEZY/DynACof_inputs) is available for
input files templates, and some help on how to proceed.

Example using custom input parameter files:

``` r
rm(list = ls())
library("DynACof")
Sys.setenv(TZ="UTC")
DynACof(WriteIt = T, Period = as.POSIXct(c("1979-01-01", "1980-12-31")),
        Inpath = "1-Input/Aquiares/", Simulation_Name = "Test1",
        FileName = list(Site = "1-Site.R", Meteo ="2-Meteorology.txt",
                        Soil = "3-Soil.R",Coffee = "4-Coffee.R", Tree = NULL))
```

Note that the Meteo file can be of any regular format because the model
uses the `data.table::fread` function internally.

## Notes

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](CODE_OF_CONDUCT.md). By participating in this project you agree
to abide by its terms.

## Acknowledgments

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](https://www.cirad.fr/) and
[INRAE](https://www.inrae.fr/). The authors are grateful for the support
of the [Aquiares farm](https://aquiares.com/) and the
[CATIE](https://www.catie.ac.cr/) 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](http://www.anaee-france.fr/fr/); 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.

MACACC project: ANR-13-AGRO-0005, Viabilité et Adaptation des
Ecosystèmes Productifs, Territoires et Ressources face aux Changements
Globaux, AGROBIOSPHERE 2013 program.

-----

The DynACof logo was made using
LogoMakr.com 

## References

Vezy, R., le Maire, G., Christina, M., Georgiou, S., Imbach, P., Hidalgo, H.G., Alfaro, E.J., Blitz-Frayret, C., Charbonnier, F., Lehner, P., Loustau, D., Roupsard, O., 2020. DynACof: A process-based model to study growth, yield and ecosystem services of coffee agroforestry systems. Environmental Modelling & Software 124, 104609.

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 220
Total Committers: 1
Avg Commits per committer: 220.0
Development Distribution Score (DDS): 0.0

Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Rémi VEZY v****i@g****m 220

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 9
Total pull requests: 0
Average time to close issues: 9 months
Average time to close pull requests: N/A
Total issue authors: 2
Total pull request authors: 0
Average comments per issue: 0.33
Average comments per pull request: 0
Merged pull request: 0
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/VEZY/DynACof

Top Issue Authors

  • VEZY (8)
  • AlexandraThorn (1)

Top Pull Request Authors


Top Issue Labels

  • enhancement (3)

Top Pull Request Labels


Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • JuliaCall * imports
  • bigleaf * imports
  • crayon * imports
  • data.table * imports
  • doParallel * imports
  • dplyr * imports
  • foreach * imports
  • lubridate * imports
  • magrittr * imports
  • methods * imports
  • parallel * imports
  • rstudioapi * imports
  • solartime * imports
  • tidyverse * imports
  • zoo * imports
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 2.1.0 suggests

Score: 2.3978952727983707