devtools::install_github("RobelTakele/AquaBEHER") library(AquaBEHER) library(ggplot2) # load example data: data <- read.csv("C:/Users/wb562201/Downloads/arable_data.csv") head(data) # Estimate daily PET: PET <- calcEto(data, method = "PM", Zh = 10) # Add the estimated PET 'ET.Daily' to a new column in AgroClimateData: data$Eto <- PET$ET.Daily # Estimate daily water balance for the soil having 100mm of WHC: watBal <- calcWatBal(data, soilWHC = 100) # estimate the rainy season calandar (Onset, Cessation and Duration): onsetWind.start = "2020-09-01" # earliest possible start data of the onset window onsetWind.end = "2020-09-10" # the late possible date for end of the onset window cessaWind.end = "2021-11-30" # the late possible date for end of the cessation window seasCal.lst <- calcSeasCal(watBal, onsetWind.start, onsetWind.end, cessaWind.end, soilWHC = 100) str(seasCal.lst) season_onset<-seasCal.lst[[1]] season_cessation<-seasCal.lst[[2]] season_duration<-seasCal.lst[[3]] write.csv(season_onset, "C:/Users/wb562201/Downloads/season_onset.csv", row.names=FALSE) write.csv(season_cessation, "C:/Users/wb562201/Downloads/season_cessation.csv", row.names=FALSE) write.csv(season_duration, "C:/Users/wb562201/Downloads/season_duration.csv", row.names=FALSE)