1. remove rows with duplicate timestamps 2. fill gaps within hydraulic events given by time intervals exceeding H threshold
validateAndFillHydraulicData(hydraulicData, tstep.fill.s = selectElements(settings, "tstep.fill.s"), replaceMissingQMethod = selectElements(settings, "replaceMissingQMethod"), regressionModels = selectElements(selectElements(settings, "regression"), "models")[[selectElements(settings, "station")]], regressionUsage = selectElements(selectElements(settings, "regression"), "usage")[[selectElements(settings, "station")]], hydraulicEvents = NULL, additionalColumns = NULL, modelDir = getOrCreatePath("REGRESSION_DIR", selectElements(settings, "dictionary")), settings = NULL)
hydraulicData | data frame with column DateTime, ... |
---|---|
tstep.fill.s | target time step in seconds. Time gaps in hydraulicData will be filled with interpolated values |
replaceMissingQMethod | one of c("interpolate", "predict"). "interpolate": linear interpolation "predict": prediction from water levels using a saved square regression |
regressionModels | data frame with character columns from, to (or POSIXct columns tBeg and tEnd) and modelFile determining the time intervals to which the different correlation models are assigned. |
regressionUsage | data frame with character columns from, to (or POSIXct columns tBeg and tEnd) defining the first and last timestamp of the time intervals in which the correlation is to be used |
hydraulicEvents | hydraulic events |
additionalColumns | columns additional to "DateTime", "H" and "Q" to be selected from hydraulicData |
modelDir | full path to the directory where the model files (of the current station) are stored) |
settings | settings as returned by |