Phenology.jl

Welcome to the documentation for Phenology.jl ! With this package you can predict the phenology (budburst and endo dormancy break) of apple and grapevine from temperatures data. The models used are the ones presented in Legave et al. (2013) for apple (F1 Gold 1) and in García de Cortázar-Atauri et al. (2009) for grapevine (BRIN model).

Tutorial

Data extraction

First, we need a file with the temperatures data and their dates. This package is adapted to use some type of txt.file from the ECA&D database and the portal DRIAS Les futurs du climat as it is explained in the section Temperatures data compatibility The data files exemples used in this tutorial are available in the station folder on the github repository of the package. As you will see further, the functions to predict phenological dates can take as arguments the data file path but if you want to extract the data in a dataframe you can use the function Phenology.extract_series :

using Phenology
#average daily temperatures in Montpellier
df_TG_Montpellier = extract_series(joinpath(stations_folder, "TG_Montpellier.txt"))
first(df_TG_Montpellier, 10)
10×2 DataFrame
RowDATETG
DateFloat64
11947-03-014.4
21947-03-024.3
31947-03-035.5
41947-03-047.8
51947-03-0512.6
61947-03-0612.9
71947-03-0711.0
81947-03-089.5
91947-03-097.5
101947-03-108.5

Apple Phenology

To predict apple dormancy break and budburst dates, just call the function Apple_Phenology_Pred on daily average temperatures data :

A_EB_Montpellier, A_BB_Montpellier = Apple_Phenology_Pred(df_TG_Montpellier.TG, df_TG_Montpellier.DATE)
first(A_BB_Montpellier, 5) #The budburst dates of the 5 first years.
5-element Vector{Dates.Date}:
 1948-04-04
 1949-04-18
 1950-04-12
 1951-04-11
 1952-04-14

Note that Apple_Phenology_Pred(df_TG_Montpellier) and Apple_Phenology_Pred(joinpath("stations", "TG_Montpellier.txt")) return the same output.

Grapevine Phenology

To predict grapevine dormancy break and budburst dates, call the function Vine_Phenology_Pred on daily minimal and maximal temperatures data :

G_EB_Montpellier, G_BB_Montpellier = Vine_Phenology_Pred(joinpath(stations_folder, "TN_Montpellier.txt"), joinpath(stations_folder, "TX_Montpellier.txt"))
first(G_BB_Montpellier, 5)
5-element Vector{Dates.Date}:
 1947-06-02
 1948-05-20
 1949-06-02
 1950-06-02
 1951-06-09

Like the apple function, calling the other methods with dataframes or vectors return the same results (see Vine_Phenology_Pred).

Freezing Risk

You can also predict the risk of freezing after budburst with the functions FreezingRisk and FreezingRiskMatrix, based on minimal daily temperatures, their dates and the budburst dates :

df_TN_Bonn = extract_series(joinpath(stations_folder, "TN_Bonn.txt"))
A_EB_Bonn, A_BB_Bonn = Apple_Phenology_Pred(joinpath(stations_folder, "TG_Bonn.txt"))
  • For exemple we predict the freezing risk after the fourth apple budburst in 1981 :
FreezingRisk(df_TN_Bonn, A_BB_Bonn[4])
2
  • Or after all apple budburst :
FreezingRiskMatrix(df_TN_Bonn, A_BB_Bonn)
47×2 Matrix{Int64}:
 1978  0
 1979  0
 1980  0
 1981  2
 1982  0
 1983  0
 1984  0
 1985  0
 1986  0
 1987  0
    ⋮  
 2016  0
 2017  1
 2018  0
 2019  0
 2020  1
 2021  1
 2022  0
 2023  0
 2024  2

Plots with CairoMakie extension.

If you have the package CairoMakie.jl loaded, you can use multiple plot functions, showed in Plots with CairoMakie section. For exemple you can plot the annual phenological dates from predictions on multiple sites :

using CairoMakie

A_EB_Nantes, A_BB_Nantes = Apple_Phenology_Pred(joinpath(stations_folder, "TG_Nantes.txt"))

colors = ["blue", "orange", "green"]
label = ["Montpellier", "Bonn", "Nantes"]
Plot_Pheno_Dates_EB_BB([A_EB_Montpellier, A_EB_Bonn, A_EB_Nantes],
    [A_BB_Montpellier, A_BB_Bonn, A_BB_Nantes],
    (10, 30),
    EB_label=label,
    BB_label=label,
    EB_colors=colors,
    BB_colors=colors
)
Example block output

Or the freezing risks :

Plot_Freeze_Risk_Bar(df_TN_Bonn, A_BB_Bonn,
    color="orange",
    label="Bonn")
Example block output

References


This page was generated using Literate.jl.