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.

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)
#> [1] "40003" "42003"
  summary(multipleStations$`42003`)
#>     Station        WaterYear         Date                       
#>  Min.   :42003   Min.   :1975   Min.   :1976-09-30 21:00:00.00  
#>  1st Qu.:42003   1st Qu.:1987   1st Qu.:1987-08-21 09:33:45.00  
#>  Median :42003   Median :1998   Median :1999-05-25 23:45:00.00  
#>  Mean   :42003   Mean   :1998   Mean   :1999-07-19 13:09:03.75  
#>  3rd Qu.:42003   3rd Qu.:2010   3rd Qu.:2011-05-20 23:15:00.00  
#>  Max.   :42003   Max.   :2022   Max.   :2023-01-16 12:00:00.00  
#>       Flow           Stage            Rejected      
#>  Min.   : 4.16   Min.   :-9999.000   Mode :logical  
#>  1st Qu.:15.69   1st Qu.:    1.241   FALSE:28       
#>  Median :20.60   Median :    1.382   TRUE :20       
#>  Mean   :23.88   Mean   :-1456.924                  
#>  3rd Qu.:28.12   3rd Qu.:    1.613                  
#>  Max.   :80.83   Max.   :    2.131