rchlumsk / RavenR

R package for handling Raven hydrologic modelling framework inputs, outputs, and diagnostics
36 stars 16 forks source link

Monthly bias plot fix (#103) #106

Closed rchlumsk closed 2 years ago

rchlumsk commented 2 years ago

In the equation below, observed runoff is summed monthly even when there are days within a specific month with many NAN values. Besides, if all values within a month are NAN, then the result is 0 which results in "diff" with Inf values when using the flag normalize =TRUE due to the division by 0 and therefore no plot. obs.monthly <- apply.monthly(obs, sum, na.rm = TRUE)

The simulated runoff is also summed monthly, but there is no gaps in the daily data thus subtracting monthly simulated runoff from monthly observed runoff will always tend to be overestimated if months missing some days of observed data are included in the analysis. My suggestion is to include a flag to exclude the summation of observed months with incomplete data and printing a couple of lines to quickly check how many were included/excluded fromthe analysis.