monthly2daily: Disaggregate Daily Means by Month-of-the-year into Daily...

Description Usage Arguments Details Value Author(s)

View source: R/monthly2daily.R

Description

Wrapper around na.approx/na.spline which disaggregates monthly to daily values by linear interpolation or cubic spline interpolation, respectively.

Usage

1
monthly2daily(from, to, values, FUN = zoo::na.spline, ...)

Arguments

from

Beginning of the interpolated time series, as Date object

to

End of the interpolated time series, as Date object

values

Vector of daily mean values for each month (length=12)

FUN

interpolation function to use, must be either na.approx (linear) or na.spline (spline)

...

further arguments passed to approx/spline via na.approx/na.spline

Details

The values for interpolation are mean daily data grouped by month (i.e. 12 values corresponding to the calendar month, as produced by hydroTSM::monthlyfunction with FUN=mean).

Monthly input data is fixed to the middle of each month for the interpolation, and values at the left and right margins are interpolated by extending the monthly datapoints accordingly.

Value

A daily timeseries (zoo) interpolated from daily mean values for each month of the year

Author(s)

Joschka Thurner, joschka.thurner@th-koeln.de


jthurner/hbvPSO documentation built on Oct. 15, 2020, midnight