ppModelSetup: Data preparation for perfect-prog model construction

View source: R/ppModelSetup.R

ppModelSetupR Documentation

Data preparation for perfect-prog model construction

Description

Performs the various data pre-processing and formatting steps required to implement the different perfect-prog downscaling methods.

Usage

ppModelSetup(y, x, newdata)

Arguments

y

A grid or station data containing the observed climate data for the training period

x

A grid containing the simulated climate by the model for the training period. This can be either the same variable as obs, in the case of model calibration (bias correction and related techniques) or MOS (model output statistics) approaches, or a set of predictors in the case of perfect prog downscaling approaches (possibly after principal component analysis via the prinComp output).

newdata

A grid containing the simulated climate for the variables used in x, but considering the test period. If x is a multimember grid (the member dimension is > 1), the function assumes that the order of the members is the same in newdata.

Details

The function accepts either PCA or raw grids as predictors. In the first case, it handles the mapping of EOFs onto the newdata grids.

Value

A list with differet components required by the downscaling functions:

  • stations Logical indicating whether the predictand comes from station data

  • multi.member Logical indicating whether newdata is multi-member or not

  • pred.mat 2D matrix of predictors. Predictors are arranged in columns and time in rows

  • sim.mat A list of 2D matrices containing the prediction data. The list is of length n, being n the number of members considered (n = 1 for deterministic/single member predictions).

  • sim.dates The Dates element of the newdata (either a list of start/end lists for several predictors or a list of two with the estart/end of a single predictor. See dateReplacement for details).

  • init.dates Initialization dates inherited from 'newdata' if a forecast. NULL otherwise.

  • member.names Names of the members inherited from 'newdata' if a forecast. NULL otherwise.

Author(s)

J. Bedia


SantanderMetGroup/downscaleR documentation built on July 4, 2023, 4:28 a.m.