BasinData {baseflow} | R Documentation |
BasinData
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.
BasinData(Name, startDate, endDate, P, PET, Qobs, fill = "none")
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 |
endDate |
End date of hydroclimatic data as a |
P |
Numeric vector giving daily total lumped precipitation over the catchment, in mm. Must be of the same length as |
PET |
Numeric vector giving daily total lumped potential evapotranspiration over the catchment, in mm. Must be of the same length as |
Qobs |
Numeric vector giving daily streamflow of the catchment, as depth of runoff in mm. Must be of the same length as |
fill |
Character string describing filling methods. Must be one of the following : |
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.
A BasinData
object containing provided data.
Pelletier and Andreassian (antoine.pelletier@irstea.fr)
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")