msTrans_dif {musica}R Documentation

Multiscale delta method

Description

Transforms observed data such that the changes in summary statistics of variables at custom time scales are similar to those obtained from climate model simulation. Number of functions can be used to summarize the variables.

Usage

msTrans_dif(dta, model = "const", model_par = list(NULL), agg_by = month,
  wet_int_thr = 0.1, maxiter = 10, tol = 1e-04, period = c("G1", "Y1",
  "M1", "D1"), qstep = 0.001)

Arguments

dta

List with components FROM (simulated data for the control period), TO (simulated data for the scenario period) and NEWDATA (observed data to be transformed). Each component is a data.table with columns DTM (date) and the climate variables (typically PR - precipitation and TAS - temperature)

model

One of loess, const, identity, lm, smooth, runmed, smooth.spline. The model is used to provide statistical summary of the empirical cumulative distribution function.

model_par

optional parameters of the model

agg_by

Function for specification of the period (season, month) to be additionaly included in output, see Details

wet_int_thr

Numeric value specifying the minimum depth to be considered wet

maxiter

Maximum number of iterations, see Details

tol

Stoping criterion of the iteration cycle, see Details

period

Specification of the aggregation lengths the correction is applied at with 'D' - day(s), 'M' - month(s), 'Y' - year(s) and 'G1' - the overall mean

qstep

A numeric value between 0 and 1. The ecdf is calculated only for the quantiles defined by quantile(0, 1, probs = seq(0, 1, by = qstep).

Value

transformed data.table

References

Hanel, M., Kozin, R., 2016. Bias and projected changes in climate model simulations at multiple time scales: consequences for hydrological impact assessment. Environmental Modelling and Software, submitted.

Examples

data("basin_PT")
scen = basin_PT$sim_scen
ctrl = basin_PT$sim_ctrl
obs = basin_PT$obs_ctrl
dta = list(TO = scen, FROM = ctrl, NEWDATA = obs)
## Not run: 
msTrans_dif(dta,  maxiter = 10, period = 'D1')

## End(Not run)

[Package musica version 0.1.3 Index]