Skip to content

Commit

Permalink
filter weather by rain_threshold; apply data over spores_each_wet_hour
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Melloy committed Feb 18, 2021
1 parent 38f4bac commit bd8aa28
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion R/spread_spores.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,21 @@ spread_spores <-
# max_new_growing_points_limit = max_new_gp
# ))

for (hour in which(weather_hourly[["rain"]] >= 0.2)) {
# filter weather data to just wet hours
wet_hour_weather <-
weather_hourly[rain >= 0.2,]

newly_infected_list <-
lapply(
seq_len(nrow(wet_hour_weather)),
FUN = spores_each_wet_hour,
weather_hourly = weather_day,
paddock = paddock,
max_interception_probability = max_interception_probability,
spore_interception_parameter = spore_interception_parameter
)


newlyInfectedList <- c(
newlyInfectedList,
spores_each_wet_hour(
Expand Down

0 comments on commit bd8aa28

Please sign in to comment.