binterp: Bilinear interpolation function with missing chunk...

Description Usage Arguments Details Value

Description

Bilinear interpolation function with missing chunk preservation

Usage

1
binterp(x, ny = 15, gapsize = 1)

Arguments

x

input data.frame in wide format, first column is datetimestamp, column names are depth bins, z-values are to be interpolated

ny

numeric for number of observations to expand in the y direction (depth)

gapsize

numeric for maximum gap size beyond which chunks are not processed

Details

This function expands a variable on the depth axis using interp. A two-dimensional interpolation of time and depth is used to expand the data on the depth axis. This is also useful to interpolate values in time when depth data are insufficient to interpolate vertically. The depth bins are expanded to the divisions provided by ny and the original time step is preserved in the output data.

The gapsize argument specifies the number of observations in the native time step beyond which values are not interpolated. For example, a gapsize of ten will interpolate all values in the dataset except those separated by ten or more time steps. This is useful because interpolation errors increase with size of the missing chunk. A gap is considered one or more continuous time steps where all values are missing across the enire depth profile. The data are interpolated in separate chunks, where the chunks are separated by missing values defined by gapsize.

Value

The expanded data.frame


fawda123/EstuaryMetabolism documentation built on May 16, 2019, 10:57 a.m.