## ----setup, include = FALSE--------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width = 7, fig.height = 5 ) ## ----load--------------------------------------------------------------------- library(ET0RadModels) data(jhansi_weather) head(jhansi_weather) ## ----single-day--------------------------------------------------------------- # FAO Penman-Monteith (reference) et0_fao_pm(Tmin = 15, Tmax = 35, RH_morning = 90, RH_evening = 40, u2 = 1.5, n = 9, J = 172, lat = 25.43, z = 216) # Jensen-Haise (simple radiation-based) et0_jensen_haise(Tmean = 25, J = 172, lat = 25.43, n = 9) # Priestley-Taylor (uses net radiation) et0_priestley_taylor(Tmin = 15, Tmax = 35, RH_morning = 90, RH_evening = 40, n = 9, J = 172, lat = 25.43, z = 216) ## ----all-models--------------------------------------------------------------- result <- et0_rad_all( Tmin = jhansi_weather$Tmin[1:5], Tmax = jhansi_weather$Tmax[1:5], RH_morning = jhansi_weather$RH_morning[1:5], RH_evening = jhansi_weather$RH_evening[1:5], u2 = jhansi_weather$WS[1:5], n = jhansi_weather$SSH[1:5], J = jhansi_weather$J[1:5], lat = 25.43, z = 216 ) round(result, 2) ## ----evaluation--------------------------------------------------------------- full_result <- et0_rad_all( Tmin = jhansi_weather$Tmin, Tmax = jhansi_weather$Tmax, RH_morning = jhansi_weather$RH_morning, RH_evening = jhansi_weather$RH_evening, u2 = jhansi_weather$WS, n = jhansi_weather$SSH, J = jhansi_weather$J, lat = 25.43, z = 216 ) obs <- full_result$FAO_PM preds <- full_result[, c("Jensen_Haise", "Makkink", "Priestley_Taylor", "Turc")] metrics <- evaluate_models(obs, preds) print(metrics) ## ----scatter, fig.width=6, fig.height=6--------------------------------------- plot_scatter(obs, preds, main = "Radiation-Based Models vs FAO-PM") ## ----taylor, fig.width=7, fig.height=7---------------------------------------- plot_taylor(obs, preds, main = "Taylor Diagram - Radiation-Based Models")