adjust_coeffs: adjust the two elements of the list for the markov wx...

Description Usage Arguments Value Examples

View source: R/markov_in_modifiers.R

Description

The purpose of this function is to adjust the wgen input files so that simulated weather has an increased mean event size, decreased ppt frequency, and no change in mean temperature. Also no change in total precipitation

Usage

1
adjust_coeffs(coeffs, data, mean_mult = 1, adjust_sd = TRUE)

Arguments

coeffs

list created by rSOILWAT2::dbW_estimate_WGen_coefs

data

daily wather data (dataframe)

mean_mult

what to multiply mean event sizes by

adjust_sd

logical, whether to adjust the PPT_sd for a give DOY. This option is used so that a draw from a normal distribution with a new (larger) mean is no more/less likely draw a negative value

Value

a list with same elements as

Examples

1
2
3
4
# data <- precipr::wdata119 # this a more 'difficult' dataset to try
data <- data.frame(rSOILWAT2::dbW_weatherData_to_dataframe(rSOILWAT2::weatherData))
coeffs <- rSOILWAT2::dbW_estimate_WGen_coefs(data, imputation_type = "mean")
adjust_coeffs(coeffs, data, mean_mult = 2)

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