Skip to contents

A fork of {cropsim} (Hijmans et al. 2009) designed to make using the EPIRICE model (Savary et al. 2012) for rice diseases easier to use and to implement the EPIWHEAT model in the same R package. This version provides easy to use functions to fetch weather data from NASA POWER, via the {nasapower} package (Sparks 2018) and predict disease intensity of five rice diseases using a generic Susceptible-Exposed-Infectious-Removed (SEIR) model (Zadoks 1971) function, seir().

This package implements the original EPIRICE model as detailed in Savary et al. (2012), which introduces the model and uses it to model global epidemics of rice diseases illustrating the risk of bacterial blight, brown spot, leaf blast, sheath blight and rice tungro disease. Additional models included for rice are adapted from Kim et al. (2015) for rice sheath blight and leaf blast.

The original EPIWHEAT model as presented in Savary et al. (2015) is also included in this implementation and can be used to model potential epidemics of two wheat diseases, leaf rust and Septoria tritici blotch, is also included in this package.

Users may also provide their own paramters to the generic epicrop_sim() function to simulate other crop diseases as long as the weather data provided meet the model’s requirements.

Quick start

{epicrop} is not yet on CRAN. You can install it this way.

install.packages("epicrop",
  repos = c("https://adamhsparks.r-universe.dev",
            "https://cloud.r-project.org"))

Get weather data

First you need to provide weather data for the model; {epicrop} provides the get_wth() function to do this. Using it you can fetch weather data for any place in the world from 1983 to near present by providing the and latitude and dates or length of rice growing season as shown below.

library(epicrop)

# Fetch weather for year 2000 wet season for a 120 day rice variety at the IRRI
# Zeigler Experiment Station
wth <- get_wth(
  lonlat = c(121.25562, 14.6774),
  dates = "2000-07-01",
  duration = 120
)

wth
#> Key: <YYYYMMDD>
#>        YYYYMMDD   DOY  TEMP  TMIN  TMAX  RHUM  RAIN     LAT      LON  YEAR
#>          <IDat> <int> <num> <num> <num> <num> <num>   <num>    <num> <num>
#>   1: 2000-07-01   183 25.29 23.86 27.78 92.20 23.12 14.6774 121.2556  2000
#>   2: 2000-07-02   184 26.13 23.54 29.90 86.01 17.34 14.6774 121.2556  2000
#>   3: 2000-07-03   185 25.50 24.28 27.23 94.16 29.08 14.6774 121.2556  2000
#>   4: 2000-07-04   186 25.81 24.50 27.56 92.42 13.01 14.6774 121.2556  2000
#>   5: 2000-07-05   187 25.97 25.13 27.40 92.34 32.20 14.6774 121.2556  2000
#>  ---                                                                      
#> 117: 2000-10-25   299 25.82 23.44 29.54 89.76 12.04 14.6774 121.2556  2000
#> 118: 2000-10-26   300 25.44 24.14 26.99 94.93 13.03 14.6774 121.2556  2000
#> 119: 2000-10-27   301 25.74 24.54 27.69 91.43 11.54 14.6774 121.2556  2000
#> 120: 2000-10-28   302 25.44 24.72 26.62 91.90 74.20 14.6774 121.2556  2000
#> 121: 2000-10-29   303 24.97 24.15 26.34 94.15 29.11 14.6774 121.2556  2000
#>         MM    DD
#>      <int> <int>
#>   1:     7     1
#>   2:     7     2
#>   3:     7     3
#>   4:     7     4
#>   5:     7     5
#>  ---            
#> 117:    10    25
#> 118:    10    26
#> 119:    10    27
#> 120:    10    28
#> 121:    10    29

Modelling bacterial blight disease intensity

Once you have the weather data, run the model for any of the five rice diseases by providing the emergence or crop establishment date for transplanted rice.

bb_sim <- bacterial_blight(wth, emergence = "2000-07-01")

bb_sim
#>      simday      dates     sites   latent infectious  removed    senesced
#>       <int>     <Date>     <num>    <num>      <num>    <num>       <num>
#>   1:      1 2000-07-01  108.6875  0.00000     0.0000   0.0000    1.000000
#>   2:      2 2000-07-02  118.1002  0.00000     0.0000   0.0000    2.086875
#>   3:      3 2000-07-03  128.2934  0.00000     0.0000   0.0000    3.267877
#>   4:      4 2000-07-04  139.3254  0.00000     0.0000   0.0000    4.550811
#>   5:      5 2000-07-05  151.2581  0.00000     0.0000   0.0000    5.944065
#>  ---                                                                     
#> 116:    116 2000-10-24 1447.1969 42.91601   882.1001 499.8577 1816.288533
#> 117:    117 2000-10-25 1429.3000 39.43396   858.8877 544.8076 1830.760502
#> 118:    118 2000-10-26 1412.7346 35.15905   838.8631 586.0107 1845.053503
#> 119:    119 2000-10-27 1397.3041 50.90893   795.3101 629.5637 1859.180849
#> 120:    120 2000-10-28 1383.3219 65.19296   749.9324 674.9414 1873.153890
#>       rateinf  rlex rtransfer rremoved  rgrowth rsenesced diseased intensity
#>         <num> <num>     <num>    <num>    <num>     <num>    <num>     <num>
#>   1:  0.00000     0   0.00000  0.00000  9.68750  1.000000    0.000 0.0000000
#>   2:  0.00000     0   0.00000  0.00000 10.49959  1.086875    0.000 0.0000000
#>   3:  0.00000     0   0.00000  0.00000 11.37416  1.181002    0.000 0.0000000
#>   4:  0.00000     0   0.00000  0.00000 12.31499  1.282934    0.000 0.0000000
#>   5:  0.00000     0   0.00000  0.00000 13.32593  1.393254    0.000 0.0000000
#>  ---                                                                        
#> 116:  0.00000     0  22.24980 48.78973 14.84370 14.468215 1424.874 0.3899380
#> 117: 18.25549     0  21.73754 44.94989 14.83057 14.471969 1443.129 0.3859397
#> 118: 16.90356     0  21.17847 41.20307 14.63115 14.293000 1460.033 0.3822104
#> 119: 15.74988     0   0.00000 43.55303 14.44665 14.127346 1475.783 0.3771831
#> 120: 14.28403     0   0.00000 45.37768 14.27491 13.973041 1490.067 0.3707732
#>          lat      lon
#>        <num>    <num>
#>   1: 14.6774 121.2556
#>   2: 14.6774 121.2556
#>   3: 14.6774 121.2556
#>   4: 14.6774 121.2556
#>   5: 14.6774 121.2556
#>  ---                 
#> 116: 14.6774 121.2556
#> 117: 14.6774 121.2556
#> 118: 14.6774 121.2556
#> 119: 14.6774 121.2556
#> 120: 14.6774 121.2556

Lastly, you can visualise the result of the model run.

library(ggplot2)

ggplot(
  data = bb_sim,
  aes(
    x = dates,
    y = intensity
  )
) +
  labs(
    y = "Intensity",
    x = "Date"
  ) +
  geom_line() +
  geom_point() +
  theme_classic()
Bacterial blight disease progress over time. Results for wet season year 2000 at IRRI Zeigler Experiment Station shown. Weather data used to run the model were obtained from the NASA Langley Research Center POWER Project funded through the NASA Earth Science Directorate Applied Science Program.

Bacterial blight disease progress over time. Results for wet season year 2000 at IRRI Zeigler Experiment Station shown. Weather data used to run the model were obtained from the NASA Langley Research Center POWER Project funded through the NASA Earth Science Directorate Applied Science Program.

Meta

  • Please report any issues or bugs.

  • License: GPL-3

  • To cite {epicrop}, please use the output from citation(package = "epicrop").

Code Coverage

#> epicrop Coverage: 69.02%
#> R/build_epicrop_emergence.R: 0.00%
#> R/fetch_epicrop_weather_list.R: 0.00%
#> R/run_epicrop_model.R: 0.00%
#> R/validation.R: 73.71%
#> R/format_wth.R: 80.00%
#> R/get_wth.R: 81.16%
#> R/epicrop_sim.R: 85.47%
#> R/audpc.R: 87.50%
#> R/leaf_wetness.R: 90.62%
#> src/seir_core.cpp: 98.41%
#> R/disease_models.R: 100.00%
#> R/interpolation.R: 100.00%

Code of Conduct

Please note that the epicrop project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Other Implementations in R

  • The EPIRICE model was originally written in R as a part of the {cropsim} package (Hijmans et al. 2009).

  • The EPIRICE model is also available from CRAN in the {ZeBook} package (Brun et al. 2018) to accompany, “Working with dynamic crop models: methods, tools and examples for agriculture and environment” (Wallach et al. 2018).

References

Brun François, David Makowski, Daniel Wallach, and James W Jones. (2018). ZeBook: Working with Dynamic Models for Agriculture and Environment. DOI: 10.32614/CRAN.package.ZeBook R package version 1.1, https://CRAN.R-project.org/package=ZeBook.

Kwang-Hyung Kim, Jaepil Cho, Yong Hwan Lee, and Woo-Seop Lee. (2015). Predicting potential epidemics of rice leaf blast and sheath blight in South Korea. Agricultural and Forest Meteorology, 203: 191-207. DOI: 10.1016/j.agrformet.2015.01.011

Robert J. Hijmans, Serge Savary, Rene Pangga and Jorrel Aunario. cropsim. (2009). Simulation modeling of crops and their diseases. R package version 0.2-6.

Serge Savary, Andrew Nelson, Laetitia Willocquet, Ireneo Pangga and Jorrel Aunario. (2012). Modeling and mapping potential epidemics of rice diseases globally. Crop Protection, Volume 34, Pages 6-17, ISSN 0261-2194 DOI: 10.1016/j.cropro.2011.11.009.

Serge Savary, Stacia Stetkiewicz, François Brun, and Laetitia Willocquet. Modelling and Mapping Potential Epidemics of Wheat Diseases-Examples on Leaf Rust and Septoria Tritici Blotch Using EPIWHEAT. (2015). European Journal of Plant Pathology 142, no. 4:771–90. DOI: 10.1007/s10658-015-0650-7.

Adam Sparks. (2018). nasapower: A NASA POWER Global Meteorology, Surface Solar Energy and Climatology Data Client for R. Journal of Open Source Software, 3(30), 1035, DOI: 10.21105/joss.01035.

Jan C. Zadoks. (1971). Systems Analysis and the Dynamics of Epidemics. Phytopathology 61:600. DOI: 10.1094/Phyto-61-600.

Wallach, Daniel, David Makowski, James W. Jones, and François Brun. (2018) Working with dynamic crop models: methods, tools and examples for agriculture and environment. Academic Press. DOI: 10.1016/C2016-0-01552-8.