R/Validation_plots.R
plot_observed_vs_simulated_density.Rd
Compares the density of observed and simulated data for specific weather variables across seasons. It generates density plots for each variable, distinguishing between observed and simulated data, and arranges them by season. This function relies on `ggplot2` for plotting and `patchwork` for combining plots.
plot_observed_vs_simulated_density(
sim,
observed,
dates,
seasons,
location,
names,
names_seasons = NULL
)
A 3-dimensional array of simulated weather data with dimensions [time, location, variable].
A 3-dimensional array of observed weather data with dimensions [time, location, variable].
A vector of dates corresponding to the first dimension of `sim` and `observed`.
A list where each element defines the start and end days and months of a season.
The index of the location for which to plot the data.
A vector of strings indicating the names of the variables to be plotted.
(Optional) A vector of season names corresponding to the `seasons` list. If `NULL`, the names are derived from the `seasons` list itself.
A `ggplot` object representing the combined density plots for observed and simulated data across the specified seasons and variables.