Description Usage Arguments Details Value Author(s) Examples
View source: R/qm.empqm.doy.fa.R
qm.empqm.doy.fa
is the actual QM function considering
the day-of-year (DOY) and including frequency adaptation for precipitation.
1 2 3 | qm.empqm.doy.fa(series, doy.series, cdf.mod, cdf.obs, cdf.obs.wet, cor.fun,
fwet.obs, fwet.mod, pr.wet, method = c("linear", "bin"), var,
output.diag = FALSE, minq, maxq, incq)
|
series |
Time series of modelled data, e.g. transient (control+) scenario series. |
doy.series |
Corresponding series of DOYs (output of function qm.doystring). |
cdf.mod |
CDF of the modelled time series in the calibration period, estimated with function qm.cdf.doy(...) (matrix[365,nquantiles]). |
cdf.obs |
CDF of the observed time series in the calibration period, estimated with function qm.cdf.doy(...) (matrix[365,nquantiles]). |
cdf.obs.wet |
CDF of the observed time series in the calibration period for wet days only, estimated with function qm.cdf.doy(...) (matrix[365,nquantiles]). |
fwet.obs |
Observed wet day frequency for each DOY (vector[365], output of function qm.cdf.doy). |
fwet.mod |
Modelled wet day frequency for each DOY (vector[365], output of function qm.cdf.doy). |
pr.wet |
Internal precipitation wet day threshold [mm/day]. |
method |
QM method: "binary" -> correction for closest quantile is used, "linear" -> linear interpolation of correction function between lower and upper quantile. |
var |
Variable to correct. |
output.diag |
Diagnostic QM console output (TRUE) or not (FALSE); default: FALSE. |
minq |
Minimum quantile for correction function [0.01 .. 0.99]; note: should not be 0 (for correct handling of extremes)! |
maxq |
Maximum quantile for correction function [0.01 .. 0.99]; note: should not be 1 (for correct handling of extremes)! |
incq |
Quantile increment for correction function (bin size). |
corr.fun |
Additive correction function (cdf A - cdf B), obtained by function qm.corfun.doy(...). |
The function estimates the index (quantile) in which an observation falls with respect to the calibration period. Based on this quantile (and the DOY) a correction is applied, the final quantile map. If the number of dry days in the modelled time series is larger than the number in the reference series, an additional frequency adaptation is carried out: for modelled dry days it is first determined (using a random number) if the corrected value should be zero as well. If not, a random value is drawn from the wet day distribution. Old and new extremes beyond the min and max percentile considered are corrected according to the correction of the min and max percentile, respectively (first and last quantile considered therefore have to be 0.01 and 0.99 -> check in function qm.doqm).
List of 3: $qm.input.series: Input series to QM (input argument series). $qm.corrected.series: Corrected series. $quantile.index: A series of quantile indices wrt. simulated series in calibration period.
Jan Rajczak (ETH Zurich), Sven Kotlarski (MeteoSwiss)
1 2 3 4 5 6 7 | ## Not run:
# Carry out DOY-dependent QM with frequency adaptation. Standard quantiles.
# Variable: precipitation. Wet-day treshold of 0.1 mm/day. Linear QM,
# diagnostic terminal output.
qm.empqm.doy.fa(series, doy.series, cdf.modelled, cdf.observed, cdf.observed.wet, correction.function, fwet.obs, fwet.mod, 0.1, 'linear', 'pr', TRUE, 0.01, 0.00, 0.01)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.