get_cd {winfapReader}R Documentation

A function to obtain information on the station and on the catchment upstream of the station using the NRFA API

Description

The function queries the NRFA API for for information of a given station. Unlike get_amax and get_pot, the output of this function is not exactly the same from the output of the read_cd3 function due to differences in the information made available by the NRFA API

Usage

get_cd(station, fields = "feh")

Arguments

station

the NRFA station(s) number for which the the information is required

fields

the type of information which is required. Can be "feh" (default), which outputs a subset of information typically used when applying the flood estimation handbook methods, or "all", which output all information made available in the NRFA API.

Value

a data.frame of one row with different columns depending on whether fields = "all" or fields = "feh" was selected.

See Also

read_cd3. Information on catchment descriptors river flow gauging in the UK can be found at the National River Flow Archive website https://nrfa.ceh.ac.uk

Examples

 cdMult <- get_cd(c(40003,42003), fields = "all")
 ### lots of information on the catchment/station
 ### including information on rejected annual maxima
 cdMult$`40003`$`peak-flow-rejected-amax-years` ## no rejections
 cdMult$`42003`$`peak-flow-rejected-amax-years` ## several rejections
 cd40003 <- get_cd(40003, fields = "feh")
 # less information, mostly the FEH descriptors
 dim(cd40003)
 sapply(cdMult, ncol)


[Package winfapReader version 0.1-5.1 Index]