read_amax: A function to read .AM files

View source: R/readerFuncs.R

read_amaxR Documentation

A function to read .AM files

Description

The function reads .AM files once these are in a local folder: these files contain information on annual maxima (AMAX) records extracted from the instantaneous river flow measurements. The function checks for the presence of any [AM Rejected] information and includes it in the output.

Usage

read_amax(station, loc_WinFapFiles = getwd())

Arguments

station

NRFA station number(s) for which the .AM file (named station.AM) should be read.

loc_WinFapFiles

the file.path of the WINFAP files, i.e. the location in which the station.AM file can be found. Default is the working directory

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

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


winfapReader documentation built on Sept. 8, 2022, 5:08 p.m.