expected_ppt: expected annual ppt based on markov coefficients

Description Usage Arguments Value Examples

View source: R/markov_in_modifiers.R

Description

Calculates probability of rain each day and from that calculates expected value of annual precip. Accounts for the fact that when wgen draws negative value from normal distribution that day is converted to a dry day– this is still in testing, and currently I have removed this feature (ie not accounting for truncated normal???) The problem with this function currently is that while observed/simulated and expected ppt is normally very close, when the sd is increased, the mismatch grows

Usage

1
expected_ppt(coeffs, adjust_for_truncnorm = FALSE)

Arguments

coeffs

–list that contains mkv_doy element

adjust_for_truncnorm

logical, whether to adjust the number of expected wet days based on fact that the weather generator uses a truncated normal distribution (i.e. some 'wet' days then become dry)

Value

expected value of annual precipitation

Examples

1
2
3
4
data <-data.frame(rSOILWAT2::dbW_weatherData_to_dataframe(rSOILWAT2::weatherData))
coeffs <- rSOILWAT2::dbW_estimate_WGen_coefs(data)
ex <- expected_ppt(coeffs, adjust_for_truncnorm = TRUE)
ex

MartinHoldrege/precipr documentation built on Nov. 4, 2021, 11:10 a.m.