Title: | Process Based Epidemiological Model for Cercospora Leaf Spot of Sugar Beet |
---|---|
Description: | Estimates sugar beet canopy closure with remotely sensed leaf area index and estimates when action might be needed to protect the crop from a Leaf Spot epidemic with a negative prognosis model based on published models. |
Authors: | Paul Melloy [aut, cre, trl, cph] (<https://orcid.org/0000-0003-4253-7167>, Translated equations from literature and developed package.), Rene Heim [aut, cph] (<https://orcid.org/0000-0002-0666-2588>, Code review and development of leaf area index model), Nathan Okole [aut, ctb, cph] (<https://orcid.org/0000-0002-5375-2420>, Code review and development of leaf area index model), Facundo Ramón Ispizua Yamati [dtc, ctb] (<https://orcid.org/0000-0001-5775-3554>, Code review), Anne-Katrin Mahlein [ctb, cph] |
Maintainer: | Paul Melloy <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.1 |
Built: | 2024-12-15 01:32:57 UTC |
Source: | https://github.com/paulmelloy/cercospora |
Calculate canopy closure date
calc_c_closure(param_rxt, x1 = 1.3, k = 6)
calc_c_closure(param_rxt, x1 = 1.3, k = 6)
param_rxt |
Output of the function calc_r_x0, which produces a
list containing parameters that are necessary to calculate |
x1 |
LAI value at which 90% canopy closure is reached. It is fixed to 1.3 for sugar beet. |
k |
carrying capacity, which is the maximum LAI that can be attained. This value can be cultivar-dependent. The default is fixed to 6 |
Calculates canopy closure dates from LAI and growth rate parameters
c_closure
date at which 90% canopy closure is reached at each
location.
img_dir <- system.file("extdata", "uav_img",package = "cercospoRa") epidemic_onset_param <- read_sb_growth_parameter(img_files = list.files(img_dir,pattern = "tif", full.names = TRUE), img_dates = as.POSIXct( c("2022-06-14","2022-06-28"),tz = "UTC"), target_res = 10) param_rxt <- calc_r_x0(epidemic_onset_param, min_r = 0.02, max_r = 0.05, k = 6) c_closure <- calc_c_closure(param_rxt, x1 = 1.3, k=6 )
img_dir <- system.file("extdata", "uav_img",package = "cercospoRa") epidemic_onset_param <- read_sb_growth_parameter(img_files = list.files(img_dir,pattern = "tif", full.names = TRUE), img_dates = as.POSIXct( c("2022-06-14","2022-06-28"),tz = "UTC"), target_res = 10) param_rxt <- calc_r_x0(epidemic_onset_param, min_r = 0.02, max_r = 0.05, k = 6) c_closure <- calc_c_closure(param_rxt, x1 = 1.3, k=6 )
This function calculates the daily infection values for Cercospora beticola on sugar beet. Functions were adapted from Wolf and Verreet (2005) and Wolf et al (2001)
calc_DIV(date_time, Tm, RH, rain, dat)
calc_DIV(date_time, Tm, RH, rain, dat)
date_time |
POSIX_ct, date time the weather recording was taken |
Tm |
numeric, temperature, in Celsius' at time increment in
|
RH |
numeric, relative humidity (%) at time increment in |
rain |
numeric, volume of rain in millimetres recorded between time recordings |
dat |
data.frame, containing column names "times","temp","rh","rain" with each of the respective arguments for input. provided as a convenience |
data.table, with probability of infection for each day, between 0 and 1 Undertaken with two methods by Wolf and Verreet (2005)
Wolf, P. F. J., and J. A. Verreet. “Factors Affecting the Onset of Cercospora Leaf Spot Epidemics in Sugar Beet and Establishment of Disease-Monitoring Thresholds.” Phytopathology® 95, no. 3 (March 2005): 269–74. https://doi.org/10.1094/PHYTO-95-0269.
Wolf, P. F. J., M. Heindl, and J. A. Verreet. “Influence of Sugar Beet Leaf Mass Development on Predisposition of the Crop to Cercospora Beticola (Sacc.).” Journal of Plant Diseases and Protection 108, no. 6 (2001): 578–92.
date_t <- Sys.time() + seq(0, 179 * 60 * 10, (60 * 10)) Tm <- rnorm(180,20,10) RH <- runif(180,min = 40,90) rain <- rbinom(180,1,0.1) * runif(180,0.1,20) DIV1 <- calc_DIV( date_time = date_t, Tm = Tm, RH = RH, rain = rain )
date_t <- Sys.time() + seq(0, 179 * 60 * 10, (60 * 10)) Tm <- rnorm(180,20,10) RH <- runif(180,min = 40,90) rain <- rbinom(180,1,0.1) * runif(180,0.1,20) DIV1 <- calc_DIV( date_time = date_t, Tm = Tm, RH = RH, rain = rain )
Calculate epidemic onset
calc_epidemic_onset(start, end, c_closure, weather, cultivar_sus = 5)
calc_epidemic_onset(start, end, c_closure, weather, cultivar_sus = 5)
start |
POSIXct, start date in which to begin calculating the epidemic onset, if not specified, the first date in the weather data will be used. |
end |
POSIXct, end date, last date to complete calculating the epidemic onset, if not specified, the last date in the weather data will be used. |
c_closure |
POSIXct formatted date to start the model running the model This is usually at canopy closure (Wolf) |
weather |
data.table, formatted with |
cultivar_sus |
character, susceptibility of the cultivar in "R" resistant, "S" susceptible, "MR" moderately resistant etc. |
If the input weather is conducive for epidemic, the function returns a POSIX_ct date when epidemic commences. If no epidemic occurs, a numeric, proportion indicating the progress an epidemic is returned
wethr <- read.csv(system.file("extdata", "clean_weather.csv", package = "cercospoRa")) wethr <- format_weather(wethr,time_zone = "UTC") calc_epidemic_onset(start = as.POSIXct("2022-04-25",tz = "UTC"), end = as.POSIXct("2022-09-30",tz = "UTC"), c_closure = as.POSIXct("2022-07-01",tz = "UTC"), weather = wethr)
wethr <- read.csv(system.file("extdata", "clean_weather.csv", package = "cercospoRa")) wethr <- format_weather(wethr,time_zone = "UTC") calc_epidemic_onset(start = as.POSIXct("2022-04-25",tz = "UTC"), end = as.POSIXct("2022-09-30",tz = "UTC"), c_closure = as.POSIXct("2022-07-01",tz = "UTC"), weather = wethr)
Calculate epidemic onset from image
calc_epidemic_onset_from_image( start, end, c_closure, weather, cultivar_sus = 5 )
calc_epidemic_onset_from_image( start, end, c_closure, weather, cultivar_sus = 5 )
start |
POSIXct, start date in which to begin calculating the epidemic onset, if not specified, the first date in the weather data will be used. |
end |
POSIXct, end date, last date to complete calculating the epidemic onset, if not specified, the last date in the weather data will be used. |
c_closure |
map of canopy closure dates formatted as number of days since 1970-01-01. It defines the date to start running the model (Wolf) |
weather |
data.table, formatted with |
cultivar_sus |
character, susceptibility of the cultivar in "R" resistant, "S" susceptible, "MR" moderately resistant etc. |
If the input weather is conducive for epidemic, the function returns a POSIX_ct date when epidemic commences. If no epidemic occurs, a numeric, proportion indicating the progress an epidemic is returned
wethr <- read.csv(system.file("extdata", "clean_weather.csv", package = "cercospoRa")) wethr <- format_weather(wethr,time_zone = "UTC") img_dir <- system.file("extdata", "uav_img",package = "cercospoRa") epidemic_onset_param <- read_sb_growth_parameter( list.files(img_dir,pattern = "tif", full.names = TRUE), img_dates = as.POSIXct(c("2022-06-14","2022-06-28"), tz = "UTC"), 10) param_rxt <- calc_r_x0(epidemic_onset_param, min_r = 0.02, max_r = 0.05, k = 6) c_closure <- calc_c_closure(param_rxt, x1 = 1.3, k=6 ) # this takes about 20 sec to run epidemic_onset_map <- calc_epidemic_onset_from_image(start = as.POSIXct("2022-04-25",tz = "UTC"), end = as.POSIXct("2022-09-30",tz = "UTC"), c_closure = c_closure, weather = wethr) terra::plot(epidemic_onset_map)
wethr <- read.csv(system.file("extdata", "clean_weather.csv", package = "cercospoRa")) wethr <- format_weather(wethr,time_zone = "UTC") img_dir <- system.file("extdata", "uav_img",package = "cercospoRa") epidemic_onset_param <- read_sb_growth_parameter( list.files(img_dir,pattern = "tif", full.names = TRUE), img_dates = as.POSIXct(c("2022-06-14","2022-06-28"), tz = "UTC"), 10) param_rxt <- calc_r_x0(epidemic_onset_param, min_r = 0.02, max_r = 0.05, k = 6) c_closure <- calc_c_closure(param_rxt, x1 = 1.3, k=6 ) # this takes about 20 sec to run epidemic_onset_map <- calc_epidemic_onset_from_image(start = as.POSIXct("2022-04-25",tz = "UTC"), end = as.POSIXct("2022-09-30",tz = "UTC"), c_closure = c_closure, weather = wethr) terra::plot(epidemic_onset_map)
Calculate growth rate and LAI at t0
calc_r_x0(param_r, min_r = 0.02, max_r = 0.05, k = 6)
calc_r_x0(param_r, min_r = 0.02, max_r = 0.05, k = 6)
param_r |
Output of the function read_sb_growth_parameter, which produces a list containing the LAI images and the associated dates |
min_r |
minimum growth rate for sugar beet. Default |
max_r |
maximum growth rate for sugar beet. Default |
k |
carrying capacity, which is the maximum LAI that can be attained. This value can be cultivar-dependent. The default is fixed to 6 |
Fits a non-linear model to remotely sensed LAI values and estimates the leaf area index (LAI) and growth rate r at the start of the time window t0.
param_rxt: list containing parameters that are necessary to calculate
c_closure
. These parameters are r
, the growth rate, x0
,
the initial LAI value, and t0
, the initial date.
img_dir <- system.file("extdata", "uav_img",package = "cercospoRa") epidemic_onset_param <- read_sb_growth_parameter(img_files = list.files(img_dir,pattern = "tif", full.names = TRUE), img_dates = as.POSIXct( c("2022-06-14","2022-06-28"),tz = "UTC"), target_res = 10) param_rxt <- calc_r_x0(epidemic_onset_param, min_r = 0.02, max_r = 0.05, k = 6)
img_dir <- system.file("extdata", "uav_img",package = "cercospoRa") epidemic_onset_param <- read_sb_growth_parameter(img_files = list.files(img_dir,pattern = "tif", full.names = TRUE), img_dates = as.POSIXct( c("2022-06-14","2022-06-28"),tz = "UTC"), target_res = 10) param_rxt <- calc_r_x0(epidemic_onset_param, min_r = 0.02, max_r = 0.05, k = 6)
Formats raw weather data into an object suitable for use in the affiliated
spore dispersal packages such as ascotraceR
and blackspot.sp
. This
standardised data format ensures that the supplied weather data meet the
requirements for functions in the aforementioned packages. Input weather
data expects a 'long' data format, where each line is an observation at
a point in time.
format_weather( w, YYYY = NULL, MM = NULL, DD = NULL, hh = NULL, mm = NULL, ss = NULL, POSIXct_time = NULL, time_zone = NULL, temp, rain, rh, ws, wd, wd_sd, station, lon = NULL, lat = NULL, lonlat_file = NULL, data_check = TRUE )
format_weather( w, YYYY = NULL, MM = NULL, DD = NULL, hh = NULL, mm = NULL, ss = NULL, POSIXct_time = NULL, time_zone = NULL, temp, rain, rh, ws, wd, wd_sd, station, lon = NULL, lat = NULL, lonlat_file = NULL, data_check = TRUE )
w |
a |
YYYY |
Column name |
MM |
Column name |
DD |
Column name |
hh |
Column name |
mm |
Column name |
ss |
Column name |
POSIXct_time |
Column name |
time_zone |
Time zone (Olsen time zone format) |
temp |
Column name |
rain |
Column name |
rh |
Column name |
ws |
Column name |
wd |
Column name |
wd_sd |
Column name |
station |
Column name |
lon |
Column name |
lat |
Column name |
lonlat_file |
A file path ( |
data_check |
If |
time_zone
The time-zone in which the time
was recorded. All weather
stations in w
must fall within the same time-zone. If the required stations
are located in differing time zones, format_weather()
should be run separately
on each object, then data can be combined after formatting.
wd_sd
If weather data is
provided in hourly increments, a column
with the standard deviation of the wind direction over the hour is required
to be provided. If the weather data are sub-hourly, the standard deviation
will be calculated and returned automatically.
lon
, lat
and lonlat_file
If w
provides longitude and
latitude values for station locations, these may be specified in the lon
and lat
columns. If the coordinates are not relevant to the study
location NA
can be specified and the function will drop these column
variables. If these data are not included, (NULL
) a separate file may be
provided that contains the longitude, latitude and matching station name to
provide station locations in the final epiphy.weather
object that is
created by specifying the file path to a CSV file using
lonlat_file
.
A epiphy.weather
object (an extension of data.table)
containing the supplied weather aggregated to each hour in a suitable
format for use with disease models. Depending on the input weather, classes
will be given to the output object to indicate which models it meets the data
requirements for. Some of the columns returned are as follows:
times: | Time in POSIXct format with "UTC" time-zone |
rain: | Rainfall in mm |
temp: | Temperature in degrees Celsius |
ws: | Wind speed in km / h |
wd: | Wind direction in compass degrees |
wd_sd: | Wind direction standard deviation in compass degrees |
lon: | Station longitude in decimal degrees |
lat: | Station latitude in decimal degrees |
station: | Unique station identifying name |
YYYY: | Year |
MM: | Month |
DD: | Day |
hh: | Hour |
mm: | Minute |
# load the weather data to be formatted weather_station_data <- read.csv(system.file("extdata", "scaddan_weather.csv", package = "cercospoRa")) weather_station_data$Local.Time <- as.POSIXct(weather_station_data$Local.Time, format = "%Y-%m-%d %H:%M:%S", tz = "UTC") weather <- format_weather( w = weather_station_data, POSIXct_time = "Local.Time", ws = "meanWindSpeeds", wd_sd = "stdDevWindDirections", rain = "Rainfall", temp = "Temperature", wd = "meanWindDirections", lon = "Station.Longitude", lat = "Station.Latitude", station = "StationID", time_zone = "UTC" ) # Reformat saved weather # Create file path and save data file_path_name <- paste(tempdir(), "weather_saved.csv", sep = "\\") write.csv(weather, file = file_path_name, row.names = FALSE) # Read data back in to weather2 <- read.csv(file_path_name, stringsAsFactors = FALSE) # reformat the data to have appropriate column classes and data class weather2 <- format_weather(weather2, time_zone = "UTC") unlink(file_path_name) # remove temporary weather file
# load the weather data to be formatted weather_station_data <- read.csv(system.file("extdata", "scaddan_weather.csv", package = "cercospoRa")) weather_station_data$Local.Time <- as.POSIXct(weather_station_data$Local.Time, format = "%Y-%m-%d %H:%M:%S", tz = "UTC") weather <- format_weather( w = weather_station_data, POSIXct_time = "Local.Time", ws = "meanWindSpeeds", wd_sd = "stdDevWindDirections", rain = "Rainfall", temp = "Temperature", wd = "meanWindDirections", lon = "Station.Longitude", lat = "Station.Latitude", station = "StationID", time_zone = "UTC" ) # Reformat saved weather # Create file path and save data file_path_name <- paste(tempdir(), "weather_saved.csv", sep = "\\") write.csv(weather, file = file_path_name, row.names = FALSE) # Read data back in to weather2 <- read.csv(file_path_name, stringsAsFactors = FALSE) # reformat the data to have appropriate column classes and data class weather2 <- format_weather(weather2, time_zone = "UTC") unlink(file_path_name) # remove temporary weather file
Calculate Cercospora Latent Period
latent_period(Tm, ref = "wolf")
latent_period(Tm, ref = "wolf")
Tm |
numeric, Average temperature in degrees Celsius for a hour of the day |
ref |
character, method for calculating latent period. Default is
|
Calculates the latent period for Cercospora beticola infections on sugar beet. Note the published formula in Wolf and Verreet (2005) contains an error in the exponent. e(0.35 x (Tm - 10)) should be e(-0.35 x (Tm - 10)). See issue #22 on Github for additional information.
numeric, Latent period for a given hour. ref = "jarroudi"
returns latent period in days.
Wolf, P. F. J., and J. A. Verreet. “Factors Affecting the Onset of Cercospora Leaf Spot Epidemics in Sugar Beet and Establishment of Disease-Monitoring Thresholds.” Phytopathology® 95, no. 3 (March 2005): 269–74. https://doi.org/10.1094/PHYTO-95-0269.
El Jarroudi, Moussa, Fadia Chairi, Louis Kouadio, Kathleen Antoons, Abdoul-Hamid Mohamed Sallah, and Xavier Fettweis. “Weather-Based Predictive Modeling of Cercospora Beticola Infection Events in Sugar Beet in Belgium.” Journal of Fungi 7, no. 9 (September 18, 2021): 777. https://doi.org/10.3390/jof7090777.
Read LAI images at several time points
read_sb_growth_parameter(img_files, img_dates, target_res)
read_sb_growth_parameter(img_files, img_dates, target_res)
img_files |
character vector providing the file paths of at least two
georeferenced images for the study location. Dates of image capture need to
be defined in |
img_dates |
POSIXct vector of dates corresponding to the images supplied in
|
target_res |
desired spatial resolution. |
SpatRast
with a layer for each input layer. Each layer
contains is named according to the img_dates
. The output
SpatRast
is suitable for input in calc_r_x0()
epidemic_onset_param <- read_sb_growth_parameter(img_files = list.files(system.file("extdata", "uav_img", package = "cercospoRa"), pattern = ".tif", full.names = TRUE), img_dates = as.POSIXct(c("2022-06-14", "2022-06-28"), tz = "UTC"), target_res = 10)
epidemic_onset_param <- read_sb_growth_parameter(img_files = list.files(system.file("extdata", "uav_img", package = "cercospoRa"), pattern = ".tif", full.names = TRUE), img_dates = as.POSIXct(c("2022-06-14", "2022-06-28"), tz = "UTC"), target_res = 10)
Temperature index is a proportional representation of the latent period. Temperatures at or above the optimum temperature for the disease cycle will yield 1 and the lower the temperature the infinitely longer the latent period.
temperature_index(Tm, opt_Tm = 21)
temperature_index(Tm, opt_Tm = 21)
Tm |
numeric, temperature for any given hour |
opt_Tm |
numeric, the lowest temperature optimum at which all temperatures above will have the same (fastest) latent period. |
For equations and original documentation, see Wolf and Verreet (2005) and Wolf et al. (2001)
numeric, proportion representing the speed of the latent period in relation to the temperature optimum
Wolf, P. F. J., and J. A. Verreet. “Factors Affecting the Onset of Cercospora Leaf Spot Epidemics in Sugar Beet and Establishment of Disease-Monitoring Thresholds.” Phytopathology® 95, no. 3 (March 2005): 269–74. https://doi.org/10.1094/PHYTO-95-0269.
Wolf, P. F. J., F.-J. Weis, and J.-A. Verreet. “Threshold Values as Indicators of Fungicide Treatments for the Control of Leaf Blotching Caused by Cercospora Beticola (Sacc.) in Sugar Beets.” Journal of Plant Diseases and Protection 108, no. 3 (2001): 244–57.
A unformatted weather station dataset from Germany
Institute for Sugar Beet Research - IFZ
Climavi One + Climavi Soil, Agvolution GmbH, Gottingen, Germany A data frame with 8,016 rows and 15 columns: Weather station that accompanied field trial described in cercospora manuscript
Identifier
Date
hour
minute
Temperature in degrees Celcius at 5cm
Temperature in degrees Celcius at 200cm
Temperature in degrees Celcius at 20cm
Percentage Relative humidity at 200cm
Global radiation (W/m2) at 200cm
Wind direction degrees at 200cm
Precipitation (mm) at 100cm
Wind Speed (m/s) at 200cm
...