R/Validation_plots.R
plot_wet_frequency.Rd
Generates plots comparing the frequency of wet days between observed and simulated precipitation data across specified seasons and geographic locations. Each season is visualized in a separate plot, with observed and simulated data presented side-by-side for direct comparison. The function uses a threshold to classify days as wet or dry and calculates the percentage of wet days for each location.
plot_wet_frequency(sim, observed, dates, seasons, coordinates, names_seasons)
A 3-dimensional array of simulated precipitation data with dimensions [time, location, variable].
A 3-dimensional array of observed precipitation data with the same dimensions as `sim`.
A vector of dates corresponding to the first dimension of the `sim` and `observed` arrays.
A list where each element defines the start and end days and months of a season.
A data frame or matrix containing the geographic coordinates (longitude and latitude) for each location in the `sim` and `observed` arrays.
(Optional) A vector of names corresponding to the seasons defined in the `seasons` list. If `NULL`, the names are derived from the `seasons` list itself.
A combined `ggplot` object that includes the plots for all seasons, arranged side-by-side, each comparing the wet day frequency between observed and simulated data for the specified locations.