biasco2D: Joint bias correction of temperature and precipitation.

Description Usage Arguments Value Examples

View source: R/biasco.R

Description

A wrapper function for a copula-based bias correction method of temperature and precipitation

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
biasco2D(
  obs.in,
  ctrl.in,
  scen.in,
  names = NULL,
  cond = "P",
  separate = F,
  threshold = 0.1,
  jittering = F,
  fit.skew = F,
  ...
)

Arguments

obs.in

Either a 2-column array, matrix or data.frame. of observed temperature and precipitation

ctrl.in

Data used to calibrate the method given in the format as obs.in

scen.in

Data for the scenario period simulation given in the format as obs.in

names

names of the variables at different columns

cond

The conditioning order of temperature and precipitation. If cond = "P" then the precipitation marginal is adjusted first, while the adjustment of temperature is made conditionally on precipitation

threshold

Threshold for wet day precipitation. Everything below threshold is handled as zero precipitation

...

Method-specific parameters to be implemented

Value

An object of type BiascoTimeSeriesPT which contains a matrix of bias adjusted temperature and precipitation and also additional information on the used parameter values

Examples

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

data("obs_data")
data("model_data")
biasco2d.object <- biasco2D(varsO,varsC,varsC,cond="P",
                            names = c("temp", "prec"), 
                            threshold=0.1)

#Visualise the results:

par(mfrow=c(1,2))
plot(varsO)
points(varsC,col="red")
legend("topleft",c("Obs","Ctrl"),col=c("black","red"),pch=c(1,1))

plot(dat(adj(biasco2d.object)))
points(varsO,col="red")
legend("topleft",c("Adj","Scen"),col=c("black","red"),pch=c(1,1))

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