dateReplacement: Compute dates of a downscaled observational dataset

View source: R/helpers.R

dateReplacementR Documentation

Compute dates of a downscaled observational dataset

Description

The function calculates the appropiate Dates slot in the returned output of downscaling functions, considering the possible mismatches in time resolution between predictors and predictand, the multigrid dates slot etc.

Usage

dateReplacement(obs.dates, sim.dates)

Arguments

obs.dates

The Dates slot of the 'obs' input in the downscaling method

sim.dates

The Dates slot of the 'sim' input in the downscaling method

Details

The function is intended for internal use only. Sometimes the time resolution of the predictors does not match that of the downscaled variable (e.g., suppose that instantaneous surface temperature at 12:00 UTC is used as predictor of daily minimum temperature). In addition, in case of multiple predictors the Dates slot of the simulated series has several start/end time lists, one for each predictor, while there is only one predictand. For this reason, the function takes care of adjusting adequately the returned Dates slot. @author J. Bedia @keywords internal @export

Value

A new Dates list that preserves the temporal extent of the downscaled simulations but considering the temporal resolution of the downscaled variable


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