The 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 model MAESPA. The model also uses cohorts for the development of the coffee buds and fruits to better represent fruit carbon demand distribution along the year.

DynACof(
  Period = NULL,
  WriteIt = F,
  ...,
  parallel = TRUE,
  output_f = ".RData",
  Inpath = NULL,
  Outpath = Inpath,
  Simulation_Name = "DynACof",
  FileName = list(Site = "1-Site.R", Meteo = NULL, Soil = "3-Soil.R", Coffee =
    "4-Coffee.R", Tree = NULL)
)

Arguments

Period

Period of time to be simulated, see details. Default: NULL

WriteIt

If TRUE, write the outputs to disk using write.results(), see details. Default: FALSE

...

Further arguments to pass to write.results().

parallel

Boolean. Parallelize the computation over crop rotations.

output_f

Output format. If output_f = ".RData", the output list will be saved as a unique .RData file. Any other value: write the output list in several .csv and .txt files. Default: .RData

Inpath

Path to the input parameter list folder, Default: NULL (take package values)

Outpath

Path pointing to the folder were the results will be writen, Default: Outpath = Inpath

Simulation_Name

Character name of the simulation file name if WriteIt = T. Default: "DynACof"

FileName

A list of input file names :

Site

Site parameters file name, see details. Default: '1-Site.R'

Meteo

Meteo parameters file name, see details. Default: '2-Meteorology.txt'

Soil

Soil parameters file name, see details. Default: '3-Soil.R'

Coffee

Coffee parameters file name, see details. Default: '4-Coffee.R'

Tree

Shade tree parameters file name, see details. Default: NULL

Default input files are provided with the package as an example parameterization.

Value

Return invisibly a list containing three objects (Parameters, Meteo and Sim):

  • Sim: A data.frame of the simulation outputs at daily time-step:

    TypeVarunitDefinition
    GeneralCycle-Plantation cycle ID
    Plot_AgeyearPlantation age (starting at 1)
    Plot_Age_numyear (numeric)Numeric age of plantation
    LAIplotm2 leaves m-2 soilPlot (Coffee + Shade Tree if any) Leaf Area Index
    Suffixes for Coffee organsx_RE-Reserves
    x_SCR-Stump and Coarse roots
    x_Fruit-Fruit
    x_Shoot-Resprout wood (= branches)
    x_FRoot-Fine roots
    x_LeafLeaves
    Suffixes for Shade Tree org.x_RE_Tree-Reserves
    x_Stem_Tree-Stem (= trunk)
    x_Branch_Tree-Branches
    x_CoarseRoot_Tree-Coarse roots
    x_FRoot_Tree-Fine roots
    x_Leaf_TreeLeaves
    EnergyRn_totMJ m-2 d-1System net radiation
    Rn_TreeMJ m-2 d-1Shade tree net radiation
    Rn_CoffeeMJ m-2 d-1Coffee net radiation
    Rn_SoilMJ m-2 d-1Soil net radiation
    Rn_Soil_SWMJ m-2 d-1Soil net radiation computed using Shuttleworth & Wallace (1985) for reference
    LE_xMJ m-2 d-1System/Coffee/Tree/Soil latent heat
    H_xMJ m-2 d-1System/Coffee/Tree/Soil sensible heat
    Q_SoilMJ m-2 d-1Soil heat transport
    Transmittance_TreefractionFraction of light transmitted by the shade trees
    PAR_Trans_TreeMJ m-2 d-1Light transmitted by the shade trees canopy
    PAR_TransMJ m-2 d-1Light transmitted by the Coffea canopy
    K_Dir-Direct light extinction coefficient
    K_Dif-Diffuse light extinction coefficient
    APARMJ m-2 d-1Absorbed PAR by the plant
    APAR_DifMJ m-2 d-1Absorbed diffuse PAR (Direct is APAR-APAR_Dif)
    luegC MJLight use efficiency
    Tleaf_Coffeedeg CCoffee canopy temperature computed by DynACof
    WindSpeed_xm s-1Wind speed at the center of the layer
    TairCanopy_xdeg CAir tempetature at the center of the layer
    DegreeDays_Tcandeg CGrowing degree days computed using Coffee Canopy Temperature
    CarbonGPPgC m-2 d-1Gross primary productivity
    Consumption_REgC m-2 d-1Daily reserve consumption
    Carbon_Lack_MortalitygC m-2 d-1Mortality from a higher carbon consumption than Supply
    RmgC m-2 d-1Total Coffee maintenance respiration
    Rm_xgC m-2 d-1Maintenance respiration at organ scale
    RggC m-2 d-1Total Coffee growth respiration
    Rg_xgC m-2 d-1Growth respiration at organ scale
    RagC m-2 d-1Coffee layer autotrophic respiration (=Rm+Rg)
    Demand_xgC m-2 d-1C demand at organ scale (fruit, leaf and fine root only)
    Alloc_xgC m-2 d-1C allocation to organ net of Rm (NPP+Rg)
    SupplygC m-2 d-1C supply at the begining of the day at layer scale (GPP+Reserve consumption-Rm)
    Supply_xgC m-2 d-1C supply to organ, net of Rm
    NPPgC m-2 d-1Net primary productivity at layer scale
    NPP_xgC m-2 d-1Net primary productivity at organ scale
    Mnat_xgC m-2 d-1Organ natural mortality (= due to lifespan)
    Mprun_xgC m-2 d-1Organ mortality due to pruning
    M_ALSgC m-2 d-1Coffee leaf mortality from American Leaf Spot
    Mortality_xgC m-2 d-1Total organ mortality
    LAIm2 leaves m-2 soilLeaf Area Index
    CM_xgC m-2 d-1Organ C mass
    DM_xgDM m-2 d-1Organ dry mass
    Fruit developmentBudInitPeriodbooleanBud initiation period (BIP)
    BudinitBuds d-1Total Number of Buds Initiated per day
    ratioNodestoLAINodes LAI-1Number of fruiting nodes per LAI unit
    Temp_cor_BudfractionTemperature correction factor for bud development
    pbreak0-1Daily probability of bud dormancy break
    BudBreakBuds d-1Total number of buds breaking dormancy per day
    SMg m-2 d-1Coffee Fruit Sucrose Mass
    SCg Sugar gDMCoffee Fruit Sucrose Content
    Maturation_durationdays Fruit cohort-1Coffee Fruit Total Maturation Duration for each cohort
    Harvest_Maturity_PotFractionDaily average fruit maturity (0-1)
    Date_harvestday of yeardate of harvest
    Harvest_FruitgC m-2Total fruit carbon mass at harvest
    Harvest_MaturityFractionAverage fruit maturity at harvest (0-1)
    Overriped_FruitgC m-2 d-1Overriped fruits that fall onto the ground
    WaterIntercMaxmmMaximum potential rainfall interception by canopy
    CanopyHumectmmRainfall interception by canopy
    ThroughfallmmRainfall not intercepted by the canopy, coming to the soil
    SuperficialRunoffmmWater runoff from the superficial soil layer
    ExcessRunoffmmDischarge from the superficial soil layer
    TotSuperficialRunoffmmSum of discharge+ExcessRunoff
    InfilCapammSuperficial water infiltration capacity to first layer of soil
    InfiltrationmmSuperficial water infiltration to first layer of soil
    Drain_[1-3]mmWater drainage from soil layer 1, 2 or 3
    WSurfaceResmmSoil water content from the surface layer
    W_totmmTotal soil profile water content
    W_[1-3]mmSoil water content from the layer 1, 2 or 3
    REW_tot-Relative extractable water from the soil
    REW_[1-3]-Relative extractable water from the layer 1, 2 or 3
    EW_totmmExtractable water from the soil
    EW_[1-3]mmExtractable water from the layer 1, 2 or 3
    SWDmmsoil water deficit
    RootWaterExtract_[1-3]mmRoot water extraction for soil layer 1 to 3
    IntercRevapormmEvaporation by canopy
    T_xmmTranspiration at system/Coffee/Tree scale
    E_SoilmmSoil evaporation
    ETRmmSystem evapotranspiration
    SoilWaterPotMPaSoil water potential
    PSILMpaCoffee leaf water potential
    Special shade tree variablesLA_Treem2 leaves tree-1shade tree leaf area
    Crown_H_TreemCrown height
    Trunk_H_TreemTrunk height
    Height_TreemShade tree total height (used for boundary conductance), set to 0 if no shade trees
    DBH_TreemDiameter at breast height
    LAD_Treem2 m-3Shade tree Leaf Area Density
    CrownRad_TreemCrown radius
    CrownProj_Treem2 crown tree-1Crown projection
    Stocking_Treetree m-2Shade tree density
    TimetoThin_TreebooleanDays on which tree is thinned
    MThinning_x_Treegc m-2 d-1Mortality due to thining at organ scale
  • Meteo: A data.frame of the input meteorology, potentially coming from the output of Meteorology():

    VarunitDefinitionIf missing
    DatePOSIXctDate in POSIXct formatComputed from start date parameter, or set a dummy date if missing
    yearyearYear of the simulationComputed from Date
    DOYdayday of the yearComputed from Date
    RainmmRainfallAssume no rain
    TairCelsiusAir temperature (above canopy)Computed from Tmax and Tmin
    TmaxCelsiusMaximum air temperature during the dayRequired (error)
    TminCelsiusMinimum air temperature during the dayRequired (error)
    RH%Relative humidityNot used, but prefered over VPD for Rn computation
    RADMJ m-2 d-1Incident shortwave radiationComputed from PAR
    PressurehPaAtmospheric pressureComputed from VPD, Tair and Elevation, or alternatively from Tair and Elevation.
    WindSpeedm s-1Wind speedTaken as constant: Parameters$WindSpeed
    CO2ppmAtmospheric CO2 concentrationTaken as constant: Parameters$CO2
    DegreeDaysCelsiusGrowing degree daysComputed using GDD()
    PARMJ m-2 d-1Incident photosynthetically active radiationComputed from RAD
    FDiffFractionDiffuse light fractionComputed using Diffuse_d() using Spitters et al. (1986) formula
    VPDhPaVapor pressure deficitComputed from RH
    RnMJ m-2 d-1Net radiation (will be depreciated)Computed using Rad_net() with RH, or VPD
    DaysWithoutRaindayNumber of consecutive days with no rainfallComputed from Rain
    Air_Densitykg m-3Air density of moist air (\(\rho\)) above canopyComputed using bigleaf::air.density()
    ZENradianSolar zenithal angle at noonComputed from Date, Latitude, Longitude and Timezone
  • Parameters: A list of the input parameters (see site())

Details

The user can import a simulation using base::readRDS(). Almost all variables for coffee exist also for shade trees with the suffix _Tree after the name of the variable, e.g. : LAI = coffee LAI, LAI_Tree = shade tree LAI. Special shade tree variables (see return section) are only optional, and it may have more variables upon parameterization because variables can be added in the metamodels parameter file in Metamodels() or Allometries(). Important : It is highly recommended to set the system environment timezone to the one from the meteorology file. For example the default meteorology file (Aquiares()) has to be set to Sys.setenv(TZ="UTC").

Note

All variable units are available as attributes (see example).

For simulations with custom initialisations (e.g. at age > 0), or running a simulation day by day, see dynacof_i().

See also

Examples

if (FALSE) { if(interactive()){ Sys.setenv(TZ="UTC") Sim= DynACof(Period= as.POSIXct(c("1979-01-01", "1980-12-31"))) # Get the units of the input variables: attr(Sim$Meteo,"unit") # Get the units of the output variables: attr(Sim$Sim,"unit") } }