biasCorrection1D: Bias correction methods on 1D data

View source: R/biasCorrection.R

biasCorrection1DR Documentation

Bias correction methods on 1D data

Description

Implementation of several standard bias correction methods

Usage

biasCorrection1D(
  o,
  p,
  s,
  method,
  scaling.type,
  fitdistr.args,
  precip,
  pr.threshold,
  n.quantiles,
  extrapolation,
  theta,
  detrend,
  isimip3.args,
  parallel = FALSE,
  max.ncores = 16,
  ncores = NULL
)

Arguments

o

A vector (e.g. station data) containing the observed climate data for the training period

p

A vector containing the simulated climate by the model for the training period.

s

A vector containing the simulated climate for the variable used in p, but considering the test period.

method

method applied. Current accepted values are "eqm", "delta", "scaling", "pqm" , "gpqm", "mva", "variance","loci" and "ptr". See details in function biasCorrection.

scaling.type

Character indicating the type of the scaling method. Options are "additive" or "multiplicative" (see details). This argument is ignored if "scaling" is not selected as the bias correction method.

fitdistr.args

Further arguments passed to function fitdistr (densfun, start, ...). Only used when applying the "pqm" method (parametric quantile mapping). Please, read the fitdistr help document carefully before setting the parameters in fitdistr.args.

precip

Logical for precipitation data. If TRUE Adjusts precipitation frequency in 'x' (prediction) to the observed frequency in 'y'. This is a preprocess to bias correct precipitation data following Themeßl et al. (2012). To adjust the frequency, parameter pr.threshold is used (see below).

pr.threshold

The minimum value that is considered as a non-zero precipitation. Ignored when precip = FALSE. See details in function biasCorrection.

n.quantiles

Integer indicating the number of quantiles to be considered when method = "eqm".

extrapolation

Character indicating the extrapolation method to be applied to correct values in newdata that are out of the range of x. Extrapolation is applied only to the "eqm" method, thus, this argument is ignored if other bias correction method is selected.

theta

numeric indicating upper threshold (and lower for the left tail of the distributions, if needed) above which precipitation (temperature) values are fitted to a Generalized Pareto Distribution (GPD). Values below this threshold are fitted to a gamma (normal) distribution. By default, 'theta' is the 95th percentile (5th percentile for the left tail). Only for "gpqm" method.

detrend

logical. Detrend data prior to bias correction? Only for "dqm". Default. TRUE.

parallel

Logical. Should parallel execution be used?

max.ncores

Integer. Upper bound for user-defined number of cores.

ncores

Integer number of cores used in parallel computation. Self-selected number of cores is used when ncpus = NULL (the default), or when maxcores exceeds the default ncores value.

Author(s)

M. Iturbide


SantanderMetGroup/downscaleR documentation built on Nov. 16, 2024, 1:35 a.m.