pr_a_nb: Find the a parameter with no bias correction for...

Description Usage Arguments Value Examples

View source: R/adc_par.R

Description

Find the a parameter with no bias correction for precipitation

Usage

1
pr_a_nb(scen_q, ctrl_q, b)

Arguments

scen_q

60 and 90 quantiles of the scenario period precipitation data

ctrl_q

60 and 90 quantiles of the control period precipitation data

b

Already calculated b parameter with pr_b_nb

Value

The a parameter value

Examples

1
2
3
4
5
6
7
8
9
load('data/pr_sim.rda')
pr_sim[, pr5 := 60*60*24*frollsum(pr, 5, align = 'c')]
pr_sim = pr_sim[!is.na(pr5)]
pr_ctrl = pr_sim[year(DTM) %in% 1981:2010]
pr_scen = pr_sim[year(DTM) %in% 2071:2100]
ctrl_q = quantile(pr_ctrl$pr5, c(.6,.9))
scen_q = quantile(pr_scen$pr5, c(.6,.9))
pr_b <- pr_b_nb(scen_q, ctrl_q)
pr_a <- pr_a_nb(scen_q, ctrl_q, pr_b)

veravavan/AdvDeltaChange documentation built on Jan. 18, 2022, 7:05 p.m.