# WARNING - Generated by {fusen} from dev/flat_economic.Rmd: do not edit by hand # nolint: line_length_linter.

#' Irrigation need calculation
#' 
#' Calculate irrigation need according to irrigation need of the culture simulated and its surface
#' @param scenario data.frame scenario obtained with create_scenario function
#' @importFrom dplyr mutate
#' @return scenario_updated
#' 
#' @export
#' @examples
#' scenario_apprentissage <- create_scenario(
#'   system.file("input_1culture_2pop.xlsx", package = "ambre")
#' )
#' irrigation_need <- irrigation_need_calculation(scenario_apprentissage)
#' print(irrigation_need$irrigation_need_m3an)
irrigation_need_calculation <- function(scenario){
  scenario <- query_irrigation_need(scenario)
  
  scenario_updated <- scenario |> mutate("irrigation_need_m3an" = IrrigationNeed * Area)
  return(scenario_updated)
    
}
