get_amax: A function to obtain annual maxima (AMAX) data using the NRFA...

View source: R/get_winfapapi.R

get_amaxR Documentation

A function to obtain annual maxima (AMAX) data using the NRFA API

Description

The function queries the NRFA API for the .AM file similar to the WINFAP file for a given stations. It then processes the file in a fashion similar to read_amax.

Usage

get_amax(station)

Arguments

station

the NRFA station number for which the annual maxima records should be obtained. Can also be a vector of station numbers.

Value

a data.frame with information on the annual maxima for the station with the following columns

Station

NRFA station number (can be a vector of station numbers)

WaterYear

the correct water year for the peak flow

Date

date of maximum flow

Flow

the maximum flow in m3/s

Stage

the stage (height) reached by the river - this information is used to derive the flow via a rating curve

Rejected

logical, if TRUE the water year has been flagged as rejected by the NRFA

See Also

read_amax. Information on river flow gauging in the UK and the annual maxima can be found at the National River Flow Archive website https://nrfa.ceh.ac.uk

Examples

  a40003 <- get_amax(40003) # the Medway at Teston / East Farleigh
  multipleStations <- get_amax(c(40003, 42003))
  names(multipleStations)
  summary(multipleStations$`42003`)

winfapReader documentation built on June 22, 2024, 9:26 a.m.