biasco: A wrapper function for univariate bias correction and delta...

Description Usage Arguments Details Value See Also Examples

View source: R/biasco.R

Description

biasco returns bias corrected data as an object of type BiascoTimeSeries. Several methods of different complexity are available in the package (see details).

Usage

1
biasco(obs.in, ctrl.in, scen.in, type = "abs", method = "M1", ...)

Arguments

obs.in

A vector containing the reference data.

ctrl.in

A vector of simulated data used to calibrate the method

scen.in

A vector of data for the scenario period simulation

type

String defining the type of adjustment. Currently type recognizes two values:

  • abs: Absolute scale is used. This approach is typically applied measured in the absolute scale (e.g temperature)

  • ratio: The adjustment is made in ratio format. This approach is typically applied to non-continuous variables such as precipitation.

method

Method to be used to bias adjust scen.in. The following options are available:

...

Additional parameters used to handle the behavior of specific bias correction methods.

Details

The following univariate methods have currently been implemented in this package:

Value

An object of type BiascoTimeSeries, which contains the adjusted data and parameter values related to a particular method.

See Also

biasco2d for two-dimensional bias correction of temperature and precipitation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(lubridate)
library(BCUH)

data("obs_data")
data("model_data")

#Create objects which contain the bias corrected data
bc6 <- biasco(varsO[,"temp"], varsC[,"temp"], varsC[,"temp"], type = "abs", method = "M6")
bc9 <- biasco(varsO[,"temp"], varsC[,"temp"], varsC[,"temp"], type = "abs", method = "M9")
#Visualise the results
plot(quantile(dat(adj(bc6)), seq(0,1,0.01)), type = "l",
     main="Quantile plot", xlab = "%", ylab = "Celcius", ylim = c(10,30))
lines(quantile(dat(adj(bc9)), seq(0,1,0.01)), col = "black",lty=2)
lines(quantile(varsO[,"temp"], seq(0,1,0.01)), col = "red")
lines(quantile(varsC[,"temp"], seq(0,1,0.01)), col = "blue")
lines(quantile(varsC[,"temp"], seq(0,1,0.01)), col = "blue", lty = 2)
legend("topleft", c("M6","M9","Obs","Ctrl","Scen"),
       col = c("black","black","red","blue","blue"), lty = c(1,2,1,1,2))

RatyO/BCUH documentation built on April 24, 2021, 5:46 a.m.