read_pot: A function to read .PT files

View source: R/readerFuncs.R

read_potR Documentation

A function to read .PT files


The function reads .PT files once these are in a local folder: these files contain information on Peaks-Over-Threshold (POT) records from the instantaneous river flow measurements. The function checks for the presence of any [POT GAPS] and [POT REJECTED] periods. If these are present, they are merged and information on the proportion of days with missing records in each water year is provided.


read_pot(station, loc_WinFapFiles = getwd(), getAmax = FALSE)



NRFA station number(s) for which the .PT file (names station.PT) should be read.


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


logical. If TRUE the annual maxima values (extracted from a station.AM file) will be attached to the WaterYearInfo table


a list of three objects tablePOT, WaterYearInfo and dateRange.

tablePOT contains a table with all the peaks above the threshold present in the .PT file

WaterYearInfo a table containing the information on the percentage of missing values in any water year for which some data is available in the POT record. This is useful to assess whether the lack of exceedances is genuine or the result of missing data and to assess whether the threshold exceedances present in tablePOT can be deemed to be representative of the whole year

dateRange a vector with the first and last date of recording for the POT record as provided in the [POT Details] field. Note that this period might be different than the period for which annual maxima records are available

See Also

Information on the .PT files and river flow gauging in the UK can be found at the National River Flow Archive website

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