BasinData: Constructor function of class 'BasinData'

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/BasinData.R

Description

Standard construction function of BasinData objects, used by package baseflow to store daily hydroclimatic data for a given catchment. As the separation algorithm proposed in baseflow does not handle missing streamflow values, a filling routine using airGR package is provided.

Usage

1
BasinData(Name, startDate, endDate, P, PET, Qobs, fill = "none")

Arguments

Name

Character string giving the name of the catchment. Can be a code or a plain-text description.

startDate

Starting date of hydroclimatic data as a POSIXct object.

endDate

End date of hydroclimatic data as a POSIXct object.

P

Numeric vector giving daily total lumped precipitation over the catchment, in mm. Must be of the same length as PET and Qobs.

PET

Numeric vector giving daily total lumped potential evapotranspiration over the catchment, in mm. Must be of the same length as P and Qobs.

Qobs

Numeric vector giving daily streamflow of the catchment, as depth of runoff in mm. Must be of the same length as PET and Qobs.

fill

Character string describing filling methods. Must be one of the following : "none" (no filling, default), "GR4J", "GR5J" or "GR6J".

Details

The expected length of data vectors is equal to the number of days between the two provided dates. It is recommended to store data into a data frame before using this function. This function does not handle missing values : any NA will produce an error. If there are missing values in streamflow, the fill argument must be different from "none". Filling routine requires airGR package. One of the following hydrological lumped models can be used : GR4J, GR5J or GR6J. See airGR documentation for further details.

Value

A BasinData object containing provided data.

Author(s)

Pelletier and Andreassian (antoine.pelletier@irstea.fr)

References

Pelletier, A. and Andréassian, V.: Hydrograph separation: an impartial parametrisation for an imperfect method, Hydrol. Earth Syst. Sci., 24, 1171–1187, doi: 10.5194/hess-24-1171-2020, 2020

See Also

BasinData

BaseflowFilter

BaseflowFilter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(baseflow)

# Loading example data from airGR package
data(L0123001, package = 'airGR')

# Defining BasinData object

Name <- BasinInfo$BasinName
startDate <- BasinObs$DatesR[1]
endDate <- BasinObs$DatesR[length(BasinObs$DatesR)]
P <- BasinObs$P
PET <- BasinObs$E
Qobs <- BasinObs$Qmm

BasinData_Example <- BasinData(Name, startDate, endDate, P, PET, Qobs, fill = "GR4J")

baseflow documentation built on March 19, 2021, 1:06 a.m.