# NOT RUN {
# First weather data needs to be imported and formatted with `format_weather`
Newmarracarra <-
read.csv(system.file("extdata",
"1998_Newmarracarra_weather_table.csv", package = "ascotraceR"))
station_data <-
system.file("extdata", "stat_dat.csv", package = "ascotraceR")
weather_dat <- format_weather(
x = Newmarracarra,
POSIXct_time = "Local.Time",
temp = "mean_daily_temp",
ws = "ws",
wd_sd = "wd_sd",
rain = "rain_mm",
wd = "wd",
station = "Location",
time_zone = "Australia/Perth",
lonlat_file = station_data)
# Now the `trace_asco` function can be run to simulate disease spread
traced <- trace_asco(
weather = weather_dat,
paddock_length = 100,
paddock_width = 100,
initial_infection = "1998-06-10",
sowing_date = "1998-06-09",
harvest_date = "1998-06-30",
time_zone = "Australia/Perth",
gp_rr = 0.0065,
primary_inoculum_intensity = 40,
spores_per_gp_per_wet_hour = 0.22,
primary_infection_foci = "centre")
traced[[23]] # extracts the model output for day 23
# }
Run the code above in your browser using DataLab